Changeset 33103


Ignore:
Timestamp:
2019-05-23T20:27:22+12:00 (5 years ago)
Author:
ak19
Message:

Fixing 2 issues with the berry basket to do with the existing delete: 1. The wrong id was retrieved (content instead of berryBasketContent), so that until the page was reloaded, it wouldn't tell you that the berry basket had become empty on delete of last item. 2. Code checked whether a PARENT list item of the deleted strawberry children had any children left, instead of checking whether the grandparent (ANCESTOR) ordered list item had any children left.

File:
1 edited

Legend:

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

    r33071 r33103  
    292292        }
    293293
    294         if (!parent.hasChildNodes()){
    295             var content =  YAHOO.util.Dom.get('content');
     294        if (!ancestor.hasChildNodes()){ // OL list of berries //if (!parent.hasChildNodes()){ // LI item per berry
     295            var content =  YAHOO.util.Dom.get('berryBasketContent');
    296296            while (content.hasChildNodes()) {
    297297                content.removeChild(content.firstChild);
Note: See TracChangeset for help on using the changeset viewer.