Ignore:
Timestamp:
2019-06-11T19:11:35+12:00 (5 years ago)
Author:
wy59
Message:
  1. Merging improvements of map-scripts::toggleSection() into classifier_scripts::toggleSection(), as the code was intended originally to be mostly duplicated. But improvements had been made to map-scripts::toggleSection independently, so bringing those across. 2. Likewise, map-scripts::httpRequest() originally largely duplicated classifier_scripts::httpRequest(), but documentbasket related conditional branch may have been added at a later point and had not been ported across into the map-scripts version. With Dr Bainbridge's permission, we've now done that. 3. Rest is cleanup
File:
1 edited

Legend:

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

    r33128 r33145  
    3737   
    3838    //If the div exists
    39     if(section.length)
     39    // Test if 'section' exists. 
     40    // ==> Because we're using jQuery to do this we need to test the length of the object returned
     41    // http://stackoverflow.com/questions/920236/how-can-i-detect-if-a-selector-returns-null
     42    if(section.length !== 0)
    4043    {
    4144        if(isExpanded(sectionID))
     
    4447            sectionToggle.attr("src", gs.imageURLs.expand);
    4548
    46             if(openClassifiers[sectionID] != undefined)
     49            if(openClassifiers[sectionID].length !== 0) //if(openClassifiers[sectionID] != undefined)
    4750            {
    4851                delete openClassifiers[sectionID];
Note: See TracChangeset for help on using the changeset viewer.