Changeset 33342

Show
Ignore:
Timestamp:
23.07.2019 12:37:03 (4 weeks ago)
Author:
kjdon
Message:

change the empty basket message depending on whether it is a berry basket or a favourite basket

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/js/berrybasket/berrycheckout.js

    r33286 r33342  
    297297    }     
    298298} 
    299      
     299 
     300function emptyBasketText() { 
     301    if (gs.cgiParams.berrybasket == "on") { 
     302    return document.createTextNode(gs.text.berry.empty_basket); 
     303    } else { 
     304    // assume favourites 
     305    return document.createTextNode(gs.text.favourites.empty_basket); 
     306    } 
     307} 
     308 
    300309function showFullViewBerries(){ 
    301310 
     
    305314 
    306315    if (docList.length == 0){ 
    307         content.appendChild(document.createTextNode(gs.text.berry.empty_basket)); 
     316        content.appendChild(emptyBasketText()); 
    308317        return; 
    309318    } 
     
    359368        var berryBasketDelOptions = YAHOO.util.Dom.get('delOptions'); 
    360369    if (docList.length == 0){ 
    361         content.appendChild(document.createTextNode(gs.text.berry.empty_basket)); 
     370        content.appendChild(emptyBasketText()); 
    362371        if (berryBasketDelOptions != null) { 
    363372        berryBasketDelOptions.setAttribute("style","display:none;"); 
     
    431440    berryCheckoutPageClear(); 
    432441    if (docList.length == 0){ 
    433         content.appendChild(document.createTextNode(gs.text.berry.empty_basket));  
     442        content.appendChild(emptyBasketText());  
    434443        return; 
    435444    } 
     
    495504 
    496505    if (docList.length == 0){ 
    497         content.appendChild(document.createTextNode(gs.text.berry.empty_basket)); 
     506        content.appendChild(emptyBasketText()); 
    498507        return; 
    499508    }