123456 |
- // Licensed Materials - Property of IBM
- // IBM Cognos Products: irot
- // (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 _lf1(_u05, _vl7, _hh8){this._bu4=_u05;this._0d7=_vl7;this._bc8=_hh8||64;};_lf1.prototype._1o8=function(){if(this._2b7){return;}this._2b7=true;if(this._0d7&&this._0d7._9o){this._0d7._9o(this, this._bu4);this._0d7=null;}if(this._if5){if(this._ao6){_d14._dx5();}this._if5.parentNode.removeChild(this._if5);this._if5=null;}this._1o6=null;};_lf1.prototype._hn4=function(_ws5,_p39,_db9){var doc=document;var _lt8=doc.body;var _1o1=_be9._kl6["hal"]["enableAccessibility"];this._if5=doc.createElement("DIV");this._if5.style.position="absolute";this._if5.style.zIndex=10000;_lt8.appendChild(this._if5);var nl=_999._mw5(this._bu4, "*/menuItem");this._yp6=nl.length;var _we9=[];var _xe9=[];var _cd2=0;var _ps2=0;var _rs6=[];var _k93=(2.0*Math.PI)/ this._yp6;for(var _508=0.0;_508<(2*Math.PI);_508+= _k93){_we9.push(Math.round(this._bc8*Math.cos(_508)));_xe9.push(Math.round(this._bc8*Math.sin(_508)));}for(var i=0;i<this._yp6;i++){var _1k7=nl.item(i);var _o86=this._if5.appendChild(doc.createElement("DIV"));_o86.setAttribute( "tabIndex", "-1" );_o86.setAttribute( "menuItemId", _1k7.getAttribute( "id" ) );_o86.setAttribute( "id", _1k7.getAttribute( "id" ) );_o86.style.textAlign="center";var _pf8=_o86.appendChild(doc.createElement("DIV"));var _ns5=_1k7.getAttribute("smallSvgIcon");if(_ns5){if(_kx5._uz8){var img=_pf8.appendChild(doc.createElement("IMG"));img.style.height="32px";img.style.width="32px";img.src="images/" + _ns5 + ".svg";}else{_pf8.innerHTML='<svg class="clsSvgIcon32x32" style="fill:inherit"><use xlink:href="#' + _ns5 + '"/></svg>';}}else{var img=_pf8.appendChild(doc.createElement("IMG"));img.style.height="32px";img.style.width="32px";img.src=_1k7.getAttribute("icon");}var _kz7=_o86.appendChild(doc.createElement("DIV"));_kz7.className="clsCircularMenuLabel";_fe9._u95(_kz7, _4l6._m67(_1k7.getAttribute("idsLabel")));var _4m5=(0-(_o86.offsetWidth / 2));var _ea6=(0-(_o86.offsetHeight / 2));_o86.style.left=_4m5+"px";_o86.style.top=_ea6+"px";_o86.className="clsCircularMenuItem";_cd2=Math.max(_cd2, _o86.offsetHeight);_ps2=Math.max(_ps2, _o86.offsetWidth);_rs6.push(_o86);}if((_p39+this._bc8+(_ps2 / 2))>_lt8.clientWidth){_p39=_899._no8(_lt8.clientWidth-this._bc8-(_ps2 / 2));}else if(_p39-(this._bc8+(_ps2 / 2))<0){_p39+= this._bc8+(_ps2 / 2)-_p39 ;}if((_db9+this._bc8+(_cd2 / 2))>_lt8.clientHeight){_db9=_899._no8(_lt8.clientHeight-this._bc8-(_cd2 / 2));}else if(_db9-(this._bc8+(_cd2 / 2))<0){_db9+= this._bc8+(_cd2 / 2)-_db9;}this._if5.style.left=_p39+"px";this._if5.style.top=_db9+"px";for(var i=0;i<this._yp6;i++){var _o86=_rs6[i];var _4m5=(0-(_o86.offsetWidth / 2));var _ea6=(0-(_o86.offsetHeight / 2));var _q47="translate(" + ( ( _we9[i] - ( _o86.offsetWidth / 2 ) ) - _4m5 ) + "px," + ( ( _xe9[i] - ( _o86.offsetHeight / 2 ) ) - _ea6 ) + "px)";_o86.style[_fe9._n52]=_q47;}if(_1o1){this._1o6=_rs6;_rs6[0].focus();this._ix1=0;}this._ao6=true;_d14._8a5({onmousedown:this._106.bind(this),onStopCapture:this._tq4.bind(this),onkeydown:_1o1?this._6q4.bind(this):null});};_lf1.prototype._qa=function(_xk5){_xk5=_fe9._xn(_xk5);if(_fe9._0r7(this._if5, _xk5)){for(var el=_xk5;el&&(el!=this._if5);el=el.parentNode){if(el.getAttribute("menuItemId")){return el;}}}return null;};_lf1.prototype._dv5=function(_8g6){return _999._7y2( this._bu4, ".//menuItem[@id=" + _jp8._mn4( _8g6 ) + "]" );};_lf1.prototype._106=function(e){var _o86=this._qa(e.target);var _8g6=_o86?_o86.getAttribute( "menuItemId" ):"";if(_8g6){var _2k7=this._dv5(_8g6);var _l37=_2k7.getAttribute("onCommand");if(_l37){( new Function( "_5g7", "_8g6", _l37 ) )( e.shiftKey, _8g6 );}if(this._0d7&&this._0d7._x9){this._0d7._x9(this, _8g6);}}_d14._dx5();};_lf1.prototype._tq4=function(){this._ao6=false;this._1o8();};_lf1.prototype._6q4=function(e){switch(e.keyCode){case _fe9._687:_fe9._8u5(e);var _o86=this._qa(e.target);if(_o86){_io4._u42(_o86, _fe9._bz2, e.ctrlKey, e.shiftKey);}break;case _fe9._yn4:case _fe9._n14:_fe9._8u5(e);if(++this._ix1==this._yp6){this._ix1=0;}this._1o6[this._ix1].focus();break;case _fe9._tx5:case _fe9._zn4:_fe9._8u5(e);if(--this._ix1<0){this._ix1=this._yp6-1;}this._1o6[this._ix1].focus();break;}};return _lf1;});
|