GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/js/ |
Upload File : |
// js/schedule.js function ScheduleCollapse() { var ListType = 'OL'; ScheduleCollapseList(ListType); ListType = 'UL'; ScheduleCollapseList(ListType); } // END ScheduleCollapse. function ScheduleCollapseList(ListType) { var DEBUG = false; if ( DEBUG ) { console.groupCollapsed(`${PC}ScheduleCollapseList[ListType=${ListType}]`,CG); }//Collapsed var AllLists = document.getElementsByTagName(ListType); for ( var i = 0; i < AllLists.length; i++ ) { // Loop thry all var List = AllLists[i]; //console.log(); var ULparentNode = List.parentNode; var typeofULparentNode = typeof ULparentNode; //console.log('ULparentNode.tagName='+ULparentNode.tagName); //console.log('ULparentNode.innerHTML='+ULparentNode.innerHTML); if ( DEBUG ) { console.log('List.id='+List.id+' List.className='+List.className+' ULparentNode.tagName='+ULparentNode.tagName); } if ( ( List.className === 'collapsible' || List.className === 'collapsed' ) && ULparentNode.tagName === 'LI' ) { // Is this a collapsible li? //console.log('ULparentNode.innerHTML='+ULparentNode.innerHTML); var LIfirstChild = ULparentNode.firstChild; if ( DEBUG ) { console.log("\t"+'LIfirstChild.tagName='+LIfirstChild.tagName+' LIfirstChild.innerHTML='+LIfirstChild.innerHTML); } ULparentNode.className = List.className; LIfirstChild.onclick = function(){ // li onclick function. var SPANparentNode = this.parentNode; console.log('SPANparentNode.tagName='+SPANparentNode.tagName); //+' SPANparentNode.innerHTML='+SPANparentNode.innerHTML var childList = SPANparentNode.getElementsByTagName(ListType); if ( DEBUG ) { console.log("\t"+'childList.length='+childList.length); } for( var j=0; j<childList.length; j++) { // Loop thru ul children. if ( childList[j].parentNode === SPANparentNode ) { // Is this a direct child? if ( DEBUG ) { console.log("\t"+'direct child'); } var currentState = childList[j].style.display; var currentClass = childList[j].className; if ( DEBUG ) { console.log("\t"+'id='+childList[j].id+' display='+currentState+' class='+currentClass); } if( currentState === "none" || currentClass === 'collapsed' ) { // Is this direct child collapsed? // Yes. childList[j].style.display="block"; childList[j].className = 'collapsible'; childList[j].parentNode.className = 'collapsible'; } else { // Is this direct child collapsed? // No. childList[j].style.display="none"; childList[j].className = 'collapsed'; childList[j].parentNode.className = 'collapsed'; } // Is this direct child collapsed? } // Is this a direct child? } // Loop thru ul children. }; // li onclick function. } // Is this a collapsible li? } console.groupEnd(); } // END ScheduleCollapseList. function weekHide(e) { // Get week number. var week = e.id.split('_'); week = week[1]; //console.log('weekHide week='+week+' LOCK_BELOW='+LOCK_BELOW); if ( week <= LOCK_BELOW ) { // Change onclick. e.onclick = function() { weekShow(this); }; // Change value. e.value = 'Show week '+week; // Hide ul. document.getElementById('week_'+week).style.display = 'none'; } else { // Change onclick. e.onclick = function() { weekShow(this); }; // Change value. e.value = 'Week '+week+' locked'; // Hide ul. document.getElementById('week_'+week).style.display = 'none'; } } function weekShow(e) { // Get week number. var week = e.id.split('_'); week = week[1]; //console.log('weekShow week='+week+' LOCK_BELOW='+LOCK_BELOW); if ( week <= LOCK_BELOW ) { // Change onclick. e.onclick = function() { weekHide(this); }; // Change value. e.value = 'Hide week '+week; // Show ul. document.getElementById('week_'+week).style.display = 'block'; } else { // Change onclick. e.onclick = function() { weekHide(this); }; // Change value. e.value = 'Week '+week+' unlocked'; // Show ul. document.getElementById('week_'+week).style.display = 'block'; } } function weekHideAll() { }