_tl.js 8.1 KB

123456
  1. // Licensed Materials - Property of IBM
  2. // IBM Cognos Products: rs
  3. // (C) Copyright IBM Corp. 2003, 2022.
  4. // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  5. define(["_gk3"],function(_gk3){"use strict";function _tl(_83m, _hfl, _w69){_tl.baseConstructor.call(this, _83m);this._etk=_hfl;this._bx8=_w69;};_olk._vjl(_tl, _gk3);_tl.prototype._j6b=function(){this._irl.removeAttribute("viewPagesAsTabs");var _35l=this._irl.selectSingleNode("layouts");var _t9n=_35l.selectSingleNode( ".//page[@iid='" + this._etk + "']" );var _b2m=_ath._36j(_t9n);_b2m.parentNode.removeChild(_b2m);_8qn._k5g(_35l, "*");if(_b2m.nodeName=="conditionalLayout"){_b2m.removeAttribute("refVariableValue");_b2m=_8qn._c6g(_b2m, "layout");}_35l.appendChild(_b2m);var _6am=this._bx8?"reportPages":"*";_8qn._k5g( _b2m, _6am+"//page[@iid!='" + this._etk + "']" );_8qn._k5g(_b2m, _6am+"//pageSet[not(.//page)]");_8qn._k5g(_b2m, _6am+"//bookletItem");_8qn._k5g(_b2m, _6am+"//conditionalRender");_q0n._bsc(_b2m);_8qn._k5g( _b2m, ".//*[self::TOCEntry | self::reportDrills | self::pageModule]" );_8qn._161( this._irl.selectNodes( "queries/query//filterDefinition//*[@parameterized]" ), "parameterized" );var nl=this._irl.selectNodes( "layouts//layoutComponentRef[not(reportPath) and not(layoutComponent)][not(ancestor::layoutComponent)]" );var _tzl=nl.length;for(var i=0;i<_tzl;i++){var _0y5=nl.item(i);var _vdn=_0y5.getAttribute("refLayoutElement");if(!_wle._y56(this._irl, _vdn)){var _ec9=_wle._y56(this._xba, _vdn);_0y5.appendChild(this._irl.ownerDocument.createElement("layoutComponent")).appendChild(_ec9.cloneNode(true));}}this._mg6(_35l);this._h82(_b2m);this._801(_35l);this._eo2(_b2m);_gk3.prototype._j6b.call(this);};_tl.prototype._mg6=function(_1an){var _cpn=_gyc._t5j()+"images/def_el_image.svg";var nl=_1an.selectNodes( ".//image/dataSource/staticValue[not(text()) or text()=''][not(ancestor::layoutComponent)]" );var _tzl=nl.length;for(var i=0;i<_tzl;i++){_7hn._qll(nl.item(i), _cpn);}};_tl.prototype._h82=function(_0pi){if(!this._rfa){var _w8i=["hyperlink","HTMLItem","layoutComponentRef","asOfTime","richTextItem","TOC","TOCEntry","CMMMap","viz","customControl"];_w8i=_w8i.concat(_geb._lw9).concat(_geb._oe7);_tl.prototype._rfa =".//list[not(listColumns/listColumn)][not(ancestor::layoutComponent)] | " +".//crosstab[not(descendant::*[@refDataItem])][not(ancestor::layoutComponent)] | " +".//repeaterTable[not(repeaterTableCell/contents/*)][not(ancestor::layoutComponent)] | " +".//*[self::repeater or self::singleton][not(contents/*)][not(ancestor::layoutComponent)] | " +".//listControl[not(lcColumns/lcColumn)][not(ancestor::layoutComponent)] | " +_8qn._o5b( ".//", _w8i, "[not(ancestor::layoutComponent)]" );}var d=_0pi.ownerDocument;var nl=_0pi.selectNodes(this._rfa);var _tzl=nl.length;for(var i=0;i<_tzl;i++){var n=nl.item(i);if(!_dth._ug8(n)){continue;}var _ick=n.nodeName;if(_geb._7f7[_ick]){if(!_n0n._c12(n)){n.parentNode.replaceChild(this._g62(this._363(n), n.getAttribute("iid")), n);}}else if(_ick=="viz"){if(!_7qn._7vc(n)){n.parentNode.replaceChild(this._g62(this._ek4(n), n.getAttribute("iid")), n);}}else{var _5dn=(new _oc8(n, true, false, true, true))._wfn();var _uyj=n.parentNode.insertBefore(this._g62(_5dn, n.getAttribute("iid")), n);switch(_ick){case "asOfTime":case "TOC":case "TOCEntry":break;default:n.parentNode.removeChild(n);}}}};_tl.prototype._363=function(_8rm){var _lbh=new _oc8(_8rm, true, true);var _xtn=new _ece();var _1ae="display: inline;";var _axf="width:300px; height:180px; text-align: center;";_1ae="display: inline-block;";_axf="text-align:center !important;";_lbh._7p9(_xtn, _8rm, "DIV", _lbh._psc(_8rm, _1ae, _axf));if(!_geb._wsh[_8rm.nodeName]){var _fon=_n0n._z77(_8rm);_xtn._uzm('<IMG src="images/chart/' + _fon + '" style="width:154px;height:110px;" class="clsEmptyChartImg"/>');}else{var _yti=_fnl._v66(_8rm);_xtn._uzm('<IMG src="' + _yti.img + '" style="width:' + _yti.width + 'px;height:' + _yti.height + 'px;" class="clsEmptyChartImg"/>');}_xtn._uzm("<DIV class='clsEmptyChartText'>");_xtn._uzm('<IMG src="' + _zpn._m2g( "cchl/images/insert_arrow_small.gif" ) + '" style="vertical-align:middle; width: 17px; height: 13px; margin: 0px 8px 0px 8px;"/>');_xtn._uzm(_frh._c6j("IDS_MSG_EMPTYCHART"));_xtn._uzm("</DIV>");_xtn._uzm("</DIV>");return _xtn._fkk();};_tl.prototype._ek4=function(_8rm){var _lbh=new _oc8(_8rm, true, true);var _xtn=new _ece();_3jl._qo9(_lbh, _8rm, _xtn, _4qn._k3g(), true);return _xtn._fkk();};_tl.prototype._801=function(_1an){var nl=_1an.selectNodes( ".//crosstab/crosstabRows//*" + _geb._871 + "[not(ancestor::layoutComponent)]");var _tzl=nl.length;for(var i=0;i<_tzl;i++){this._rc6( nl.item( i ), "_irh", "true" );}var nl=_1an.selectNodes( ".//crosstab/*[self::crosstabRows or self::crosstabColumns]//*" + _geb._871 + "[not(ancestor::layoutComponent)]");_tzl=nl.length;for(var i=0;i<_tzl;i++){this._rc6(nl.item(i), "memberCaretOption", _mlk._7i(nl.item(i)));}};_tl.prototype._eo2=function(_0pi){var d=_0pi.ownerDocument;var nl=_0pi.selectNodes(".//crosstab[not(crosstabFactCell)][not(ancestor::layoutComponent)]");var _tzl=nl.length;var _e88=(_tzl>0)?new _oc8(_0pi, true, false):null;for(var i=0;i<_tzl;i++){var _nxj=nl.item(i);var _eyj=_8qn._u0g(_nxj, "crosstabFactCell");_s0n._kqh( _eyj, ["clsTemplateText", "crosstabFactCell", _n9g._x42] );_eyj.setAttribute( "iid", _nxj.getAttribute( "iid" ) );_eyj.setAttribute( "template", "true" );var _s38=_8qn._u0g(_eyj, "contents");var _tkn=_8qn._987(_eyj, "style/CSS", true);_tkn.setAttribute( "value", "height:200px;text-align:center;vertical-align:middle" );this._rc6(_eyj, "_9ml", _mlk._1b6);this._rc6(_eyj, "specname", _nxj.nodeName);var _xtn=new _ece();_xtn._uzm( '<DIV style="text-align:center;cursor:default;' );_e88._jv9(_xtn, "clsTemplateText");_xtn._uzm('"');if(_zpn._qsh["hal"]["enableAccessibility"]){_xtn._uzm( ' role="gridcell" tabIndex="0"' );}_xtn._uzm('>');_xtn._uzm( '<IMG src="' + _zpn._m2g( "cchl/images/insert_arrow_small.gif" ) + '" style="margin-left:150px; width:17px; height:13px; vertical-align:middle; margin-right:5px"/><SPAN style="margin-right:150px">' );_xtn._uzm(_cgm._qoh(_frh._c6j("IDS_XTAB_MEASURES")));_xtn._uzm('</SPAN></DIV>');_s38.appendChild(this._g62(_xtn._fkk()));}var nl=_0pi.selectNodes(".//crosstab[not(crosstabColumns/crosstabNode)][not(ancestor::layoutComponent)]");var _tzl=nl.length;if((_tzl>0)&&!_e88){_e88=new _oc8(_0pi, true, false);}for(var i=0;i<_tzl;i++){this._3j1(d, nl.item(i), true, _e88);}var nl=_0pi.selectNodes(".//crosstab[not(crosstabRows/crosstabNode)][not(ancestor::layoutComponent)]");var _tzl=nl.length;if((_tzl>0)&&!_e88){_e88=new _oc8(_0pi, true, false);}for(var i=0;i<_tzl;i++){this._3j1(d, nl.item(i), false, _e88);}};_tl.prototype._3j1=function(d,_nxj,_gvl,_e88){var _k3m=_8qn._x8b( _nxj,(_gvl?"crosstabColumns":"crosstabRows" ) + "/crosstabNode/crosstabNodeMembers/crosstabSpacer", true );_k3m.setAttribute( "renderFactCells", "true" );var _jta=_8qn._u0g(_k3m, "contents");_s0n._kqh( _k3m, ["clsTemplateText", "crosstabNodeMember", _n9g._w42] );var _tkn=_8qn._987(_k3m, "style/CSS", true);_tkn.setAttribute( "value", "text-align:center;vertical-align:middle;height:" + ( _gvl?"50px;":"200px;width:90px;" ) );var _5ek=_gvl?"crosstabColumnNodeStyle":"crosstabRowNodeStyle";this._rc6(_k3m, "specname", _5ek);_k3m.setAttribute( "iid", _nxj.selectSingleNode( _5ek ).getAttribute( "iid" ) );var _xtn=new _ece();_xtn._uzm( '<DIV style="text-align:center;cursor:default;' );_e88._jv9(_xtn, "clsTemplateText");_xtn._uzm('"');if(_zpn._qsh["hal"]["enableAccessibility"]){_xtn._uzm( ' role="gridcell" tabIndex="0"' );}_xtn._uzm('>');_xtn._uzm( '<IMG src="' + _zpn._m2g( "cchl/images/insert_arrow_small.gif" ) + '" style="width:17px;height:13px;vertical-align:middle;margin-right:5px"/>' );_xtn._uzm(_cgm._qoh(_frh._c6j(_gvl?"IDS_XTAB_COLUMNS":"IDS_XTAB_ROWS")));_xtn._uzm('</DIV>');_jta.appendChild(this._g62(_xtn._fkk()));this._rc6(_k3m, "_9ml", _gvl?_mlk._4e7:_mlk._wcb);};_tl.prototype._g62=function(_fpn,_eon){var _uyj=this._irl.ownerDocument.createElement("HTMLItem");if(_qkk._qik("SendAppUsageFlagOnRun")){this._rc6(_uyj, "appUsage", "true", "XML");}_7hn._qll(_8qn._x8b(_uyj, "dataSource/staticValue", true), _fpn);if(_eon){_uyj.setAttribute("iid", _eon);}return _uyj;};return _tl;});