Changeset 25070

Show
Ignore:
Timestamp:
10.02.2012 15:33:38 (8 years ago)
Author:
sjm84
Message:

Added a clear basket link to the document basket

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/oran/js/documentbasket/documentbasket.js

    r24511 r25070  
    7676} 
    7777 
     78function clearBasket() 
     79{ 
     80    var delurlPath ="?a=pr&rt=r&ro=1&s=ClearDocuments&c=&o=XML&hhf=[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]&s1.c=" + gs.cgiParams.c; 
     81    var callback = 
     82    { 
     83        success:function(){console.log("Successfully removed document");}, 
     84        failed:function(){console.log("Failed to remove document " + docList[i].id + " from the document basket");} 
     85    } 
     86    YAHOO.util.Connect.asyncRequest("GET", delurlPath, callback); 
     87    docList = new Array(); 
     88    updateDocumentImages(); 
     89} 
     90 
    7891function updateDocumentImages(){ 
    7992