pandorafms/pandora_console/include/javascript/x_event.js

2 lines
2.8 KiB
JavaScript
Raw Normal View History

2007-05-20 Sancho Lerena <slerena@artica.es> * pandoradb_data.sql: Uptated network component data. * include/styles/pandora.css: Few updates for style. * include/functions_db.php: Added functions for visual console features. * include/languages/language_en.php: New strings. * include/javascript: Moved all javascript files here. * include/javascript/x_slide.js, include/javascript/x_event.js: Copied from branch / console from Azabel. * include/javascript/wz_jsgraphics.js: New functions to draw lines. * pandoradb.sql: Created new tlayout and tlayout_data tables. * index.php: Small changes. Added support to refresh any page via POST. * operation/visual_console: Added Visual Console feature. * operation/agentes/estado_alertas.php: Updated styles and fixes damm bug when no alert available. * operation/agentes/status_monitor.php: Updated styles. * operation/agentes/estado_generalagente.php: Update styles. * operation/agentes/estado_agente.php: Updated style. * operation/servers/view_server.php: Updated style. * operation/reporting/graph_builder.php: Fixed some minor bugs. Needs to fix more bugs :( * operation/menu.php: Updated menu. Visual Console has dynamic items!. * images/pandora_logo_head.png: New header logo ! * images/pandora_logo.png: New Pandora FMS 1.3 logo ! :-)) * images/console/background: More samples added. * images/console/icons: Icons to be used in visual console. * reporting/fgraph.php: New feature added to simple graph to show only average values. * reporting/stat_win.php: Added support to avg_only and show avg, max and min values from each graph. Zoom factor is more usable now. * general/logoff.php: New style. * general/footer.php: Fixed style. * general/logon_failed.php: Fixed style. * general/login_page.php: New style. * general/header.php: Fixed style. * godmode/agentes/configurar_agente.php: Fixed styles. * godmode/agentes/agent_manager.php: Fixed styles. * operation/active_console: Removed from trunk: not ready to be used. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@459 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2007-05-20 19:12:31 +02:00
/* x_event.js compiled from X 4.0 with XC 0.27b. Distributed by GNU LGPL. For copyrights, license, documentation and more visit Cross-Browser.com */
function xAddEventListener(e,eT,eL,cap){if(!(e=xGetElementById(e))) return;eT=eT.toLowerCase();if((!xIE4Up && !xOp7Up) && e==window) {if(eT=='resize') { window.xPCW=xClientWidth(); window.xPCH=xClientHeight(); window.xREL=eL; xResizeEvent(); return; }if(eT=='scroll') { window.xPSL=xScrollLeft(); window.xPST=xScrollTop(); window.xSEL=eL; xScrollEvent(); return; }}var eh='e.on'+eT+'=eL';if(e.addEventListener) e.addEventListener(eT,eL,cap);else if(e.attachEvent) e.attachEvent('on'+eT,eL);else eval(eh);}function xResizeEvent(){if (window.xREL) setTimeout('xResizeEvent()', 250);var cw = xClientWidth(), ch = xClientHeight();if (window.xPCW != cw || window.xPCH != ch) { window.xPCW = cw; window.xPCH = ch; if (window.xREL) window.xREL(); }}function xScrollEvent(){if (window.xSEL) setTimeout('xScrollEvent()', 250);var sl = xScrollLeft(), st = xScrollTop();if (window.xPSL != sl || window.xPST != st) { window.xPSL = sl; window.xPST = st; if (window.xSEL) window.xSEL(); }}function xEvent(evt) {var e = evt || window.event;if(!e) return;if(e.type) this.type = e.type;if(e.target) this.target = e.target;else if(e.srcElement) this.target = e.srcElement;if (e.relatedTarget) this.relatedTarget = e.relatedTarget;else if (e.type == 'mouseover' && e.fromElement) this.relatedTarget = e.fromElement;else if (e.type == 'mouseout') this.relatedTarget = e.toElement;if(xOp6Dn) { this.pageX = e.clientX; this.pageY = e.clientY; }else if(xDef(e.pageX,e.pageY)) { this.pageX = e.pageX; this.pageY = e.pageY; }else if(xDef(e.clientX,e.clientY)) { this.pageX = e.clientX + xScrollLeft(); this.pageY = e.clientY + xScrollTop(); }if (xDef(e.offsetX,e.offsetY)) {this.offsetX = e.offsetX;this.offsetY = e.offsetY;}else if (xDef(e.layerX,e.layerY)) {this.offsetX = e.layerX;this.offsetY = e.layerY;}else {this.offsetX = this.pageX - xPageX(this.target);this.offsetY = this.pageY - xPageY(this.target);}if (e.keyCode) { this.keyCode = e.keyCode; } else if (xDef(e.which) && e.type.indexOf('key')!=-1) { this.keyCode = e.which; }this.shiftKey = e.shiftKey;this.ctrlKey = e.ctrlKey;this.altKey = e.altKey;}function xPreventDefault(e){if (e && e.preventDefault) e.preventDefault();else if (window.event) window.event.returnValue = false;}function xRemoveEventListener(e,eT,eL,cap){if(!(e=xGetElementById(e))) return;eT=eT.toLowerCase();if((!xIE4Up && !xOp7Up) && e==window) {if(eT=='resize') { window.xREL=null; return; }if(eT=='scroll') { window.xSEL=null; return; }}var eh='e.on'+eT+'=null';if(e.removeEventListener) e.removeEventListener(eT,eL,cap);else if(e.detachEvent) e.detachEvent('on'+eT,eL);else eval(eh);}function xStopPropagation(evt){if (evt && evt.stopPropagation) evt.stopPropagation();else if (window.event) window.event.cancelBubble = true;}