123456 |
- // Licensed Materials - Property of IBM
- // IBM Cognos Products: rs
- // (C) Copyright IBM Corp. 2003, 2022.
- // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- define([],function(){"use strict";function _5a4(_pvd, _b6k, _h0m){this._6ed=_pvd;this._vij=_b6k;this._uql=_h0m||64;};_5a4.prototype._fdm=function(){if(this._cej){return;}this._cej=true;if(this._vij&&this._vij._h32){this._vij._h32(this, this._6ed);this._vij=null;}if(this._7we){if(this._7zh){_icb._47g();}this._7we.parentNode.removeChild(this._7we);this._7we=null;}this._oyh=null;};_5a4.prototype._pxc=function(_hyf,_v7n,_kkn){var doc=document;var _dom=doc.body;var _0x4=_zpn._qsh["hal"]["enableAccessibility"];this._7we=doc.createElement("DIV");this._7we.style.position="absolute";this._7we.style.zIndex=10000;_dom.appendChild(this._7we);var nl=_7hn._x5g(this._6ed, "*/menuItem");this._b2i=nl.length;var _tqn=[];var _uqn=[];var _0w6=0;var _z18=0;var _l8i=[];var _799=(2.0*Math.PI)/ this._b2i;for(var _b0l=0.0;_b0l<(2*Math.PI);_b0l+= _799){_tqn.push(Math.round(this._uql*Math.cos(_b0l)));_uqn.push(Math.round(this._uql*Math.sin(_b0l)));}for(var i=0;i<this._b2i;i++){var _zzj=nl.item(i);var _pwg=this._7we.appendChild(doc.createElement("DIV"));_pwg.setAttribute( "tabIndex", "-1" );_pwg.setAttribute( "menuItemId", _zzj.getAttribute( "id" ) );_pwg.setAttribute( "id", _zzj.getAttribute( "id" ) );_pwg.style.textAlign="center";var _kxl=_pwg.appendChild(doc.createElement("DIV"));var _lxf=_zzj.getAttribute("smallSvgIcon");if(_lxf){if(_o7g._60n){var img=_kxl.appendChild(doc.createElement("IMG"));img.style.height="32px";img.style.width="32px";img.src="images/" + _lxf + ".svg";}else{_kxl.innerHTML='<svg class="clsSvgIcon32x32" style="fill:inherit"><use xlink:href="#' + _lxf + '"/></svg>';}}else{var img=_kxl.appendChild(doc.createElement("IMG"));img.style.height="32px";img.style.width="32px";img.src=_zzj.getAttribute("icon");}var _fzk=_pwg.appendChild(doc.createElement("DIV"));_fzk.className="clsCircularMenuLabel";_4qn._1je(_fzk, _frh._c6j(_zzj.getAttribute("idsLabel")));var _mdf=(0-(_pwg.offsetWidth / 2));var _szg=(0-(_pwg.offsetHeight / 2));_pwg.style.left=_mdf+"px";_pwg.style.top=_szg+"px";_pwg.className="clsCircularMenuItem";_0w6=Math.max(_0w6, _pwg.offsetHeight);_z18=Math.max(_z18, _pwg.offsetWidth);_l8i.push(_pwg);}if((_v7n+this._uql+(_z18 / 2))>_dom.clientWidth){_v7n=_6hn._iem(_dom.clientWidth-this._uql-(_z18 / 2));}else if(_v7n-(this._uql+(_z18 / 2))<0){_v7n+= this._uql+(_z18 / 2)-_v7n ;}if((_kkn+this._uql+(_0w6 / 2))>_dom.clientHeight){_kkn=_6hn._iem(_dom.clientHeight-this._uql-(_0w6 / 2));}else if(_kkn-(this._uql+(_0w6 / 2))<0){_kkn+= this._uql+(_0w6 / 2)-_kkn;}this._7we.style.left=_v7n+"px";this._7we.style.top=_kkn+"px";for(var i=0;i<this._b2i;i++){var _pwg=_l8i[i];var _mdf=(0-(_pwg.offsetWidth / 2));var _szg=(0-(_pwg.offsetHeight / 2));var _p2j="translate(" + ( ( _tqn[i] - ( _pwg.offsetWidth / 2 ) ) - _mdf ) + "px," + ( ( _uqn[i] - ( _pwg.offsetHeight / 2 ) ) - _szg ) + "px)";_pwg.style[_4qn._0c6]=_p2j;}if(_0x4){this._oyh=_l8i;_l8i[0].focus();this._zp5=0;}this._7zh=true;_icb._oje({onmousedown:this._4dg.bind(this),onStopCapture:this._56d.bind(this),onkeydown:_0x4?this._t4d.bind(this):null});};_5a4.prototype._zz=function(_ebf){_ebf=_4qn._n22(_ebf);if(_4qn._ihk(this._7we, _ebf)){for(var el=_ebf;el&&(el!=this._7we);el=el.parentNode){if(el.getAttribute("menuItemId")){return el;}}}return null;};_5a4.prototype._s2g=function(_qhh){return _7hn._ij8( this._6ed, ".//menuItem[@id=" + _cgm._zxc( _qhh ) + "]" );};_5a4.prototype._4dg=function(e){var _pwg=this._zz(e.target);var _qhh=_pwg?_pwg.getAttribute( "menuItemId" ):"";if(_qhh){var _00k=this._s2g(_qhh);var _80j=_00k.getAttribute("onCommand");if(_80j){( new Function( "_vqj", "_qhh", _80j ) )( e.shiftKey, _qhh );}if(this._vij&&this._vij._rx){this._vij._rx(this, _qhh);}}_icb._47g();};_5a4.prototype._56d=function(){this._7zh=false;this._fdm();};_5a4.prototype._t4d=function(e){switch(e.keyCode){case _4qn._x8j:_4qn._w0g(e);var _pwg=this._zz(e.target);if(_pwg){_k0d._6a6(_pwg, _4qn._ll8, e.ctrlKey, e.shiftKey);}break;case _4qn._wyc:case _4qn._1db:_4qn._w0g(e);if(++this._zp5==this._b2i){this._zp5=0;}this._oyh[this._zp5].focus();break;case _4qn._b8g:case _4qn._xyc:_4qn._w0g(e);if(--this._zp5<0){this._zp5=this._b2i-1;}this._oyh[this._zp5].focus();break;}};return _5a4;});
|