123456 |
- // Licensed Materials - Property of IBM
- // IBM Cognos Products: hal
- // (C) Copyright IBM Corp. 2003, 2017.
- // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- var U_CoolButton={};U_CoolButton.F_InitCoolButtonFromId=function(_hMQ1,_hH51){this.F_InitCoolButton(document.getElementById(_hMQ1), _hH51);};U_CoolButton.F_InitCoolButton=function(btn,_hH51){if(!btn){return;}btn.setAttribute( "HAL_isCoolButton", "true" );if(!_hH51){_hH51=btn.getAttribute("HAL_coolButtonClassPrefix");}btn._hH51=_hH51?_hH51:"clsCoolButton";btn.className=btn._hH51;btn.onfocus=this._hA42;btn[G_BrowserInfo.M_bIsPointerEnabled?"onpointerover":"onmouseover"]=this._hO91;btn[G_BrowserInfo.M_bIsPointerEnabled?"onpointerout":"onmouseout"]=this._hRG1;btn[G_BrowserInfo.M_bIsPointerEnabled?"onpointerdown":"onmousedown"]=this._hP91;btn[G_BrowserInfo.M_bIsPointerEnabled?"onpointerup":"onmouseup"]=this._h3O1;};U_CoolButton.F_InitCoolButtons=function(el){var nl=el.getElementsByTagName("BUTTON");var _hBZ1=nl.length;for(var i=0;i<_hBZ1;i++){var btn=nl.item(i);if(btn.getAttribute( "HAL_isCoolButton" )=="true" ){this.F_InitCoolButton(btn);}}};U_CoolButton.F_SetEnabledFromId=function(_hMQ1,_hFU1,_hX52){U_DOM.F_SetButtonEnabled(_hMQ1, _hFU1, _hX52);};U_CoolButton.F_SetEnabled=function(btn,_hFU1,_hX52){U_DOM.F_SetButtonEnabledFromButton(btn, _hFU1, _hX52);};U_CoolButton.F_ToggleButtonFromId=function(_hMQ1,_hD92){this.F_ToggleButton(document.getElementById(_hMQ1), _hD92);};U_CoolButton.F_ToggleButton=function(btn,_hD92){if(btn){btn.setAttribute( "_h0O1", _hD92?"true":"false" );btn.className=_hD92?(btn._hH51+"_pressed"):btn._hH51;U_Accessibility.F_SetAriaStateAndProperty(btn, "aria-pressed", _hD92);}};U_CoolButton._hA42=function(e){if(e.target==this&&!G_HAL.M_oLibraries["hal"]["enableAccessibility"]){this.blur();}};U_CoolButton._hO91=function(e){if(e.target==this){var _hZY1=( this.getAttribute( "_hZY1" )=="true" );var _h0O1=( this.getAttribute( "_h0O1" )=="true" );this.className=this._hH51+((_hZY1||_h0O1)?"_pressed":"_hover");}};U_CoolButton._hRG1=function(e){if(!this.contains(e.relatedTarget)){this.setAttribute( "_hZY1", "false" );var _h0O1=( this.getAttribute( "_h0O1" )=="true" );this.className=_h0O1?(this._hH51+"_pressed"):this._hH51;}};U_CoolButton._hP91=function(e){if(e.target==this||(e.target.nodeName=="IMG"&&e.target.parentNode==this)){this.setAttribute( "_hZY1", "true" );this.className=this._hH51+"_pressed";}};U_CoolButton._h3O1=function(e){if(e.target==this||(e.target.nodeName=="IMG"&&e.target.parentNode==this)){this.setAttribute( "_hZY1", "false" );var _h0O1=( this.getAttribute( "_h0O1" )=="true" );this.className=_h0O1?(this._hH51+"_pressed"):this._hH51;}};
|