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/Scheduler/js/ |
Upload File : |
"use strict"; /*jslint node: true */ /*jshint esversion: 6 */ // js/tooltip.js // Custom tooltip. // ttShow('tooltip_text); Will display the tooltip when the mouse if over the object. // ttHide(); Will hide the tooltip when the mouse leaves the object. // ietruebody() // Check compatibility. function ietruebody() { return (document.compatMode && document.compatMode !== "BackCompat")? document.documentElement : document.body; } function mouseX(evt) { if (!evt) { evt = window.event; } if (evt.pageX) { return evt.pageX; } else { if (evt.clientX) { return evt.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); } else { return 0; } } } function mouseY(evt) { if (!evt) { evt = window.event; } if (evt.pageY) { return evt.pageY; } else { if (evt.clientY) { return evt.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); } else { return 0; } } } // ttHide() // Hide the tooltip. function ttHide() { //console.info('ttHide[]'); if ( ( ns6 || ie ) && ( typeof ttObj !== 'undefined' ) ) { ttEnable=false; ttObj.style.display="none"; ttObj.style.visibility="hidden"; ttObj.style.left="-1000px"; ttObj.style.backgroundColor=''; ttObj.style.width=''; ttObj.className = ttClasses.pop(); } } // ttLoad(e, prefix, postfix, ttClass, stripIds) // Load the text in the element and show the tooltip. function ttLoad(e, prefix, postfix, ttClass, stripIds) { //console.log('ttLoad[e.id='+e.id+', prefix='+prefix+', postfix='+postfix+']'); if ( typeof e === 'string' ) { e = document.getElementById(e); } if ( typeof prefix === 'undefined' ) { prefix = ''; } if ( typeof postfix === 'undefined' ) { postfix = ''; } if ( typeof ttClass === 'undefined' ) { ttClass = ''; } if ( e ) { var ttHTML = e.innerHTML; if ( typeof stripIds !== 'undefined' && stripIds ) { ttHTML = ttHTML.replace(/id=/g, 'data-ttLoad-id='); ttHTML = ttHTML.replace(/style="height/g, 'style="ttLoad-height'); ttHTML = ttHTML.replace(/class="campus/g, 'class="ttLoad-campus'); } //console.log(ttHTML); var ttText = prefix + ttHTML + postfix;//.replace(/</g,'<'); //console.log('ttText='+ttText); //ttObj.innerHTML=ttText; /** / // BEGIN Debug ttLoad let fc = document.getElementById('filtercontainer'); fc.style.display = 'block'; fc.style.border = '5px solid orange'; fc.innerHTML=ttText; // END Debug ttLoad /**/ ttShow(ttText, ttClass); } else { ttShow('Element '+e+' not found in document.', 'error'); } } // ttPosition(e) // Position the tooltip. function ttPosition(e) { //console.log('ttPosition[]'); ttDebugMessage = ''; //e = e || window.event; // Get the event. if (ttEnable) { /**/ var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft; var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop; var hscroll = ie? ietruebody().scrollLeft : window.pageXOffset; var vscroll = ie? ietruebody().scrollTop : window.pageYOffset; /**/ // Find out how close the mouse is to the corner of the window. var rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX-ttOffsetX : window.innerWidth-e.clientX-ttOffsetX-20; var bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-ttOffsetY+ttMoveOffsetY : window.innerHeight-e.clientY-ttOffsetY-20+ttMoveOffsetY; var leftedge=(ttOffsetX<0)? ttOffsetX*(-1) : -1000; if ( DEBUG_hPosition ) { ttDebugMessage += '<br>'; } if ( DEBUG_hPosition ) { ttDebugMessage += ' 70 X='+curX+' hscroll='+hscroll+' re='+rightedge+' le='+leftedge+'<br> offsetWidth='+ttObj.offsetWidth+' ttOffsetX='+ttOffsetX; } if ( DEBUG_vPosition ) { ttDebugMessage += '<br>'; } if ( DEBUG_vPosition ) { ttDebugMessage += ' 72 Y='+curY+' vscroll='+vscroll+' be='+bottomedge+' offsetHeight='+ttObj.offsetHeight+' ttOffsetY='+ttOffsetY; } // If the horizontal distance isn't enough to accomodate the width of the tooltip then: var leftValue; var topValue; if ( rightedge < ttObj.offsetWidth) { // Move the horizontal position of the tooltip left by it's width. if ( DEBUG_hPosition ) { ttDebugMessage += '<br> 78 .pageXOffset='+window.pageXOffset+' e.clientX='+e.clientX; } var offsetx = ttOffsetX / 2; leftValue = ie? ietruebody().scrollLeft+event.clientX-ttObj.offsetWidth-offsetx : window.pageXOffset+e.clientX-ttObj.offsetWidth-offsetx; ttObj.style.left = parseInt(leftValue)+"px"; if ( DEBUG_hPosition ) { ttDebugMessage += '<br> 82 ttObj.style.left='+ttObj.style.left; } } else { if ( curX < leftedge ) { // Position the horizontal position of the tooltip 2 px from the left edge. leftValue = 2; ttObj.style.left = parseInt(leftValue)+"px"; if ( DEBUG_hPosition ) { ttDebugMessage += '<br> 88 ttObj.style.left='+ttObj.style.left; } } else { // Position the horizontal position of the tooltip where the mouse is positioned. leftValue = curX+ttOffsetX; ttObj.style.left = parseInt(leftValue)+"px"; if ( DEBUG_hPosition ) { ttDebugMessage += '<br> 93 ttObj.style.left='+ttObj.style.left; } } } if ( bottomedge < ttObj.offsetHeight ) { // If the vertical distance isn't enough to accomodate the height of the tooltip then: // Move the vertical position of the tooltip up by it's height. topValue = ie? ietruebody().scrollTop+event.clientY-ttObj.offsetHeight : window.pageYOffset+e.clientY-ttObj.offsetHeight; ttObj.style.top = parseInt(topValue)+"px"; if ( DEBUG_vPosition ) { ttDebugMessage += '<br>100 ttObj.style.top='+ttObj.style.top; } } else { // Position the vertical position of the tooltip where the mouse is positioned. topValue = curY+ttOffsetY+ttMoveOffsetY; ttObj.style.top = parseInt(topValue)+"px"; if ( DEBUG_vPosition ) { ttDebugMessage += '<br>105 ttObj.style.top='+ttObj.style.top; } } if ( topValue < vscroll ) { topValue = 1; ttObj.style.top = parseInt(topValue)+vscroll+"px"; if ( DEBUG_vPosition ) { ttDebugMessage += '<br>110 ttObj.style.top='+ttObj.style.top; } } ttObj.style.display="block"; ttObj.style.visibility="visible"; if ( DEBUG_vPosition ) { ttDebugMessage += '<br>'; } //if (!DEBUG_vPosition) ttDebugMessage += ' '+ttObj.style.top+' '+vscroll; //ttObj.innerHTML=ttDebugMessage+ttinnerHTML; ttObj.innerHTML=ttinnerHTML+ttDebugMessage; if ( DEBUG_vPosition ) { console.log(ttDebugMessage); } } } // ttShow(ttText, ttClass, ttWidth) // Show the tooltip. // " is changed to ". // ~~n is changed to \n. function ttShow(ttText, ttClass) { //, ttWidth) var DEBUG = false; if ( DEBUG ) { console.info('ttShow[ttText='+ttText+', ttClass='+ttClass+'] '); } if ( DEBUG ) { console.log('ns6='+ns6+', ie='+ie+', typeof ttObj='+(typeof ttObj)+''); } if ( ttText !== '' && (ns6 || ie) && ( typeof ttObj !== 'undefined' ) ) { let tt = document.getElementById(ttDiv); ttClasses.push(tt.className); if ( typeof ttClass !== 'undefined' ) { tt.className = ttClass; } ttinnerHTML = ttText.replace(/"/g,'"'); // Replace " with ". ttinnerHTML = ttinnerHTML.replace(/<\/table>\n<table/g,"</table><table"); // Remove newline between tables. ttinnerHTML = ttinnerHTML.replace(/~~n/g,"\n"); // Replace ~~n with newline. ttinnerHTML = ttinnerHTML.trim(); //console.warn('ttinnerHTML='+ttinnerHTML); ttObj.innerHTML=ttinnerHTML; if ( DEBUG ) { console.log('tt.id='+tt.id+' tt.className='+tt.className+' ttObj.id='+ttObj.id); } ttEnable=true; return false; } } /** / if ( ( ns6 || ie ) && ( typeof ttObj !== 'undefined' ) ) { ttEnable=false; ttObj.style.display="none"; ttObj.style.visibility="hidden"; ttObj.style.left="-1000px"; ttObj.style.backgroundColor=''; ttObj.style.width=''; ttObj.className = ttClasses.pop(); } /**/