Changeset 30736
- Timestamp:
- 2016-08-22T20:48:17+12:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/default/js/map-scripts.js
r29277 r30736 35 35 else 36 36 { 37 $("#map_canvas").css({visibility:"hidden", height:"0px"}); 37 //$("#map_canvas").css({visibility:"hidden", height:"0px"}); 38 $("#map_canvas").css({visibility:"hidden"}); 38 39 } 39 40 } … … 46 47 startStopCheckbox.click(function() 47 48 { 48 if(startStopCheckbox.attr("checked")) 49 { 49 // http://stackoverflow.com/questions/901712/how-to-check-if-a-checkbox-is-checked-in-jquery 50 // http://stackoverflow.com/questions/5270689/attrchecked-checked-does-not-work 51 52 if($('#scrollCheckbox').is(':checked')) // OR: if(document.getElementById('scrollCheckbox').checked) 53 { 50 54 if(_intervalHandle == null) 51 55 { … … 171 175 } 172 176 173 var url = gs.xsltParams.library_name + "?a=q&s=RawQuery&rt=rd&c=" + gs.cgiParams.c + "&s1.rawquery=" + query + "&excerptid=jsonNodes"; 174 175 $.ajax(url) 177 //var url = gs.xsltParams.library_name + "?a=q&s=RawQuery&rt=rd&c=" + gs.cgiParams.c + "&s1.rawquery=" + query + "&excerptid=jsonNodes"; 178 var url = gs.xsltParams.library_name; 179 var data = "a=q&s=RawQuery&rt=rd&c=" + gs.cgiParams.c + "&s1.rawquery=" + query + "&excerptid=jsonNodes"; 180 181 $.ajax({type:"POST", url:url, data:data}) 176 182 .success(function(responseText) 177 183 { 184 //console.log("*** responseText (first 250) = " + responseText.substring(0,256)); 185 178 186 if(responseText.search("id=\"jsonNodes") != -1) 179 187 { … … 207 215 208 216 _searchRunning = false; 217 }).fail(function(responseText, textStatus, errorThrown) // fail() has replaced error(), http://api.jquery.com/jquery.ajax/ 218 { 219 console.log("In map-scripts.performSearchForMarkers(): Got an error in ajax call"); 220 _searchRunning = false; 209 221 }); 210 222 } … … 631 643 } 632 644 633 if(section) 634 { 645 // Test if 'section' exists. 646 // ==> Because we're using jQuery to do this we need to test the length of the object returned 647 // http://stackoverflow.com/questions/920236/how-can-i-detect-if-a-selector-returns-null 648 if(section.length !== 0) 649 { 635 650 if(isExpanded(sectionID)) 636 651 { … … 638 653 sectionToggle.attr("src", gs.imageURLs.expand); 639 654 640 if(openClassifiers[sectionID] != undefined)655 if(openClassifiers[sectionID].length !== 0) //if(openClassifiers[sectionID] != undefined) 641 656 { 642 657 delete openClassifiers[sectionID]; … … 684 699 var newDiv = $("<div>"); 685 700 var sibling = gs.jqGet("title" + sectionID); 686 sibling. before(newDiv);701 sibling.after(newDiv); 687 702 688 703 newDiv.html(responseText);
Note:
See TracChangeset
for help on using the changeset viewer.