_ycm.js 16 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. var _ycm=new _lcm( "_ycm", "dlgGroups" );_ycm._jgn=function(_u4c,_6wa,_2if,_lz7,_s8f,_fsm){this._bye=_2if;var _ick=this._bye.nodeName;this._dq7=(_lz7==true);this._tue=_s8f!=false;this._ajm=typeof(_fsm)!="undefined"?_fsm:null;var _jxm=_frh._c6j(this._dq7?"IDS_PROP_Sorting":"IDS_PROP_Groups");if(this._dq7&&!_geb._cx9[_ick]){_jxm += " - " + _2if.getAttribute( ( ( _ick=="level" )||( _j9g._yzc[_ick] ) )?"name":"refDataItem" );}else{_jxm += " - " + _2if.getAttribute( "refQuery" );}this._4le(_u4c, _6wa, _jxm);};_ycm._x3d=function(){switch(this._bye.nodeName){case "repeaterTable":case "appDataDeck":return "repeaterGroups";case "pageSet":return "pageGroups";}return this._bye.nodeName+"Groups";};_ycm._soe=function(){switch(this._bye.nodeName){case "repeaterTable":case "appDataDeck":return "repeaterGroup";case "pageSet":return "pageGroup";}return this._bye.nodeName+"Group";};_ycm._16j=function(){if(this._dq7){return "dlgAdvLayoutSorting";}return "dlgGroups";};_ycm._4i5=function(){switch(this._bye.nodeName){case "list":return "listOverallGroup";case "pageSet":return "pageOverallGroup";}return "";};_ycm._5z2=function(){this._o21=this._2oh("btnProperties").style.display;if(this._dq7||(this._bye.nodeName=="burst")){this._2oh( "btnProperties" ).style.display = "none";}var _xaf=this._2oh("divDataItems");var _ozj=this._53g("GroupsList");this._9tb=new _pgk(_xaf, _ozj, this);var n=_ath._h03(this._bye);var _fsm=this._ajm;if(!_fsm){if(this._bye.nodeName=="level"){_fsm=_8qn._12g(this._bye, "query");}else{_fsm=_agm._kik(_erh._vtc(), n.getAttribute("refQuery"));}}_u0n._1y2(_ozj, _fsm, false, false);var nl=this._9tb._tfe();var _tzl=nl.length;for(var i=0;i<_tzl;i++){nl.item( i ).setAttribute( "specname", "dataItemRef" );}var _j5m=( this._bye.nodeName=="level" )?_m0n._je8( _8qn._fde( null, this._bye.selectNodes( "keys/key/@refDataItem | attributes/attribute/@refDataItem" ) ) ):null;if(_j5m){for(var i=_tzl-1;i>=0;i--){var _mzj=nl.item(i);var _uxm=_mzj.getAttribute("value");if(!_j5m[_uxm]){_mzj.parentNode.removeChild(_mzj);}}}_u0n._3a6(_xaf);_4qn._1je( this._2oh( "tdLabel" ), _frh._c6j( this._dq7?"IDS_LBL_SORTLIST":"IDS_LBL_GROUPS" ) );this._3gj=this._2oh("divGroups");this._flg=new _vgk(this._3gj, this._53g("GroupsTree"), this);_u0n._3a6(this._3gj);};_ycm._akb=function(){var _u2k=this._flg._cr9();var d=_u2k.ownerDocument;this._flg._bzm();if(this._dq7){this._9t8(d, _u2k, this._bye.selectSingleNode("sortList"));return;}var _6ra=this._ck7( d, _u2k, null, _frh._c6j( "IDS_GROUPS" ), "Groups", null, "def_hal_folder_16x16", true );var _xa8=this._4i5();if(_xa8){this._fo4(d, _6ra, this._bye.selectSingleNode(_xa8));}var nl=this._bye.selectNodes(this._x3d()+"/" + this._soe());for(var i=0;i<nl.length;i++){this._d6d(d, _6ra, nl.item(i));}if(this._bye.nodeName!="burst"){var _2c9=this._ck7( d, _u2k, null, _frh._c6j( "IDS_DETAIL_SORT_LIST" ), "DetailSortList", null, "def_hal_folder_16x16", true );this._9t8(d, _2c9, this._bye.selectSingleNode("sortList"));}};_ycm._fo4=function(d,_ksa,_twd){var _t2k=this._ck7( d, _ksa, null, _frh._c6j( "IDS_OVERALLGROUP" ), "OverallGroup", null, "def_el_group", false );var _axd=_twd&&_twd.selectSingleNode("propertyList");if(_axd){_t2k.appendChild(_axd.cloneNode(true));}};_ycm._d6d=function(d,_ksa,_qrm){var _4ac=this._ck7( d, _ksa, null, _qrm.getAttribute( "refDataItem" ), "Group", null, "def_el_group", true );var _axd=_qrm.selectSingleNode("propertyList");if(_axd){_4ac.appendChild(_axd.cloneNode(true));}_4ac.setAttribute( "roid", _qrm.getAttribute( "iid" ) );var _g58=this._ck7( d, _4ac, null, _frh._c6j( "IDS_EL_sortList" ), "sortList", null, "def_hal_folder_16x16", true );var _opm=this._9t8(d, _g58, _qrm.selectSingleNode("sortList"));_4ac.setAttribute( "expanded", _opm > 0?"true":"false" );};_ycm._9t8=function(d,_ksa,_52k){if(!_52k){return 0;}_ksa.setAttribute( "expanded", "true" );var nl=_52k.selectNodes("sortItem");for(var i=0;i<nl.length;i++){var _42k=nl.item(i);var _t2k=this._ck7( d, _ksa, null, _42k.getAttribute( "refDataItem" ), "sortItem", null, "def_el_dataItem", false );_t2k.setAttribute( "stateSmallIcon", "sortState_" + _42k.getAttribute( "sortOrder" ) + ".gif" );}return nl.length;};_ycm._wl3=function(){this._9tb._wfn();this._akb();this._flg._wfn();this._zj6();this._2oh("btnOK").focus();};_ycm._o46=function(){this._2oh("btnProperties").style.display=this._o21;this._9tb._fdm();delete this._9tb;this._flg._fdm();delete this._flg;delete this._bye;};_ycm._bgn=function(){var _ekd=[];if(this._tue){_erh._ybb();}var _u2k=this._flg._cr9();if(!this._dq7){var _l78={};var nl=this._bye.selectNodes(this._x3d()+"/" + this._soe());for(var i=0;i<nl.length;i++){var _qrm=nl.item(i);var _c4k=_8qn._k5g( _qrm, "listHeader | listFooter | headerPages | footerPages" );if(_c4k.length>0){_l78[_qrm.getAttribute("refDataItem")]=_8qn._6l3(null, _c4k);}}var _02m=_erh._h56(this._bye, this._x3d());_8qn._146(_ekd,_02m.selectNodes("descendant-or-self::*/@refDataItem"));_8qn._k5g(_02m, "*");var nl=_u2k.selectNodes("treeNode[@specname='Groups']/treeNode");for(var i=0;i<nl.length;i++){var _t2k=nl.item(i);var _5ek=_t2k.getAttribute("specname");if(_5ek=="OverallGroup"){var _xa8=this._4i5();_8qn._cqh(this._bye, _xa8+"/propertyList");var _axd=_t2k.selectSingleNode("propertyList");if(_axd){var _twd=_erh._h56(this._bye, _xa8);_twd.appendChild(_axd.parentNode.removeChild(_axd));}_8qn._cqh(this._bye, _xa8+"[not(*)]");continue;}var _5wf=_t2k.getAttribute("label");var _qrm=_erh._u0g(_02m, this._soe());_qrm.setAttribute("refDataItem", _5wf);if(_t2k.getAttribute("roid")&&_l78[_5wf]){_8qn._t0g(_qrm, _l78[_5wf]);}_8qn._cqh(_qrm, "propertyList");var _axd=_t2k.selectSingleNode("propertyList");if(_axd){_qrm.appendChild(_axd.parentNode.removeChild(_axd));}var _v9h=_t2k.selectNodes("treeNode[@specname='sortList']/treeNode");if(_v9h.length==0){continue;}var _52k=_erh._u0g(_qrm, "sortList");for(var j=0;j<_v9h.length;j++){var _f58=_v9h.item(j);var _42k=_erh._u0g(_52k, "sortItem");_42k.setAttribute( "refDataItem", _f58.getAttribute( "label" ) );if(_f58.getAttribute( "stateSmallIcon" )=="sortState_descending.gif" ){_42k.setAttribute( "sortOrder", "descending" );}}}}var _52k=_erh._h56(this._bye, "sortList");_8qn._146(_ekd,_52k.selectNodes("descendant-or-self::*/@refDataItem"));_8qn._k5g(_52k, "*");var n=_ath._h03(this._bye);var _fsm=this._ajm;if(!_fsm){if(this._bye.nodeName=="level"){_fsm=_8qn._12g(this._bye, "query");}else{_fsm=_agm._kik(_erh._vtc(), n.getAttribute("refQuery"));}}var _iy4=this._l11(_fsm);var _zu6=false;var nl=_u2k.selectNodes(this._dq7?"treeNode":"treeNode[@specname='DetailSortList']/treeNode");for(var i=0;i<nl.length;i++){var _t2k=nl.item(i);var _42k=_erh._u0g(_52k, "sortItem");_42k.setAttribute( "refDataItem", _t2k.getAttribute( "label" ) );if(_iy4&&!_zu6){var _qxj=_r0n._62g(_fsm, _t2k.getAttribute("label"));if(_nlk._7s9(_qxj)){_zu6=true;}}if(_t2k.getAttribute( "stateSmallIcon" )=="sortState_descending.gif" ){_42k.setAttribute( "sortOrder", "descending" );}}_8qn._k5g(this._bye, ".//sortList[not(*)]");_8qn._k5g( this._bye, ".//" + this._x3d() + "[not(*)]" );if(this._bye.nodeName=="list"){var nl=this._bye.selectNodes("listGroups/listGroup/@refDataItem");_8qn._k5g( this._bye, "listColumns/listColumn/listColumnBody/listColumnRowSpan" + _8qn._j12( "refDataItem", "=", _8qn._fde( null, nl ), "or", false, true ) );}var bRemoveDataItems=(this._bye.nodeName!="burst" )&&( _qkk._qik("DeleteQueryElements") );if(bRemoveDataItems){var _83m=_dth._ug8(_fsm);for(var i=0; i<_ekd.length;++i){_6aj._q23(_83m, _fsm, _ekd[i]);}}if(this._tue){_erh._iee(true);}if(_zu6){_m9b("IDS_MSG_SORTING_SERVERSIDE");}this._3le();};_ycm._l11=function(_fsm){var _ay7=(_fsm&&this._bye.nodeName=="vizCategoryDataItem")? true:false;if(_ay7){var _q8h=_8qn._12g(this._bye, "vizDataSet");var _x1m=_q8h.selectSingleNode("appContainerFilter");if(!_x1m){_ay7=false;}}return _ay7;};_ycm._gjg=1;_ycm._ck7=function(d, _ksa, _jpa, _dwm, _5ek, _cdn, _ygl, _0tg){var _t2k=_ksa.insertBefore(d.createElement("treeNode"), _jpa);_t2k.setAttribute("id", this._gjg++);_t2k.setAttribute( "expandable", _0tg?"true":"false" );_t2k.setAttribute("specname", _5ek);_t2k.setAttribute( "expanded", _0tg?"true":"false" );if(_dwm){_t2k.setAttribute("label", _dwm);}if(_cdn){_t2k.setAttribute("smallIcon", _cdn);}else if(_ygl){_t2k.setAttribute("smallSvgIcon", _ygl);if(_ygl=="def_hal_folder_16x16"){_t2k.setAttribute( "expandedSmallSvgIcon", "def_hal_folder_expanded_16x16" );}}return _t2k;};_ycm._ovc=function(){var _t2k=this._flg._5r9();if(!_t2k){return;}switch(_t2k.getAttribute("specname")){case "Group":case "sortItem":_t2k.parentNode.removeChild(_t2k);break;}this._flg._wfn();this._zj6();};_ycm._85g=function(){var _t2k=this._flg._5r9();if(_t2k){this._07a(this._flg, _t2k);}};_ycm._07a=function(_h7k,_t2k){var nl=_t2k.selectNodes("descendant-or-self::treeNode[@stateSmallIcon]");for(var i=0;i<nl.length;i++){var _pb9=nl.item(i);_pb9.setAttribute( "stateSmallIcon", _pb9.getAttribute( "stateSmallIcon" )=="sortState_ascending.gif"?"sortState_descending.gif":"sortState_ascending.gif" );}_h7k._wfn();this._zj6();};_ycm._fg4=function(_h7k,_t2k,_zdf){this._zj6();};_ycm._7k2=function(_h7k,_t2k){this._07a(_h7k, _t2k);};_ycm._dg4=function(_h7k,_n9i,_zdf,e){this._zj6();_nkk._szm(null, this, _n9i[0], _nkk.eEffectMove, _zdf);};_ycm._pe4=function(_a6k,_mzj,_zdf){this._zj6();};_ycm._oi2=function(_a6k,_mzj){var _wta=this._flg._5r9();if(!_wta&&!this._dq7){_wta=this._flg._cr9().selectSingleNode("treeNode");}var _fsj=_nkk.eLocationInside;if(_wta){switch(_wta.getAttribute("specname")){case "Group":case "sortItem":_fsj=_nkk.eLocationAfter;}}var _t2k=this._y8b(this._flg._cr9(), _mzj, _wta, _fsj);this._flg._wfn();if(_t2k){this._flg._6sc(_t2k);this._flg._gqh(_t2k);}};_ycm._oe4=function(_a6k,_i8i,_0a9,e){var _mzj=_i8i[0];_mzj.setAttribute( "specname", "dataItemRef" );_nkk._szm(null, this, _mzj, _nkk.eEffectLink, _0a9);};_ycm._r4g=function(){this._wi5();return true;};_ycm._uph=function(e,_t8n,_4v2,_bom,_0a9){var _3yl=_nkk.eEffectNone;this._fij={};this._fij._fsj=_nkk.eLocationNone;this._fij._g2b="";this._fij._qek="";var _sf9=this._flg._po9(e.clientX, e.clientY);if(_sf9){this._fij._g2b=_sf9.nNode.getAttribute("specname");this._fij._qek=_sf9.nNode.getAttribute("id");}if(!_4qn._84g(e, this._3gj)){this._flg._3g4(_sf9);return _3yl;}switch(_t8n.getAttribute("specname")){case "dataItemRef":switch(this._fij._g2b){case "Groups":case "sortList":case "DetailSortList":_3yl=_nkk.eEffectLink;if(_sf9){_sf9._j89=_nkk.eLocationInside;this._fij._fsj=_sf9._q2g();}break;case "Group":case "sortItem":case "OverallGroup":_3yl=_nkk.eEffectLink;if(_sf9){_sf9._j89=(this._fij._g2b=="OverallGroup")?_nkk.eLocationAfter:_nkk.eLocationBeforeOrAfter;this._fij._fsj=_sf9._q2g();}break;default:if(this._dq7){_3yl=_nkk.eEffectLink;if(_sf9){_sf9._j89=_nkk.eLocationInside;this._fij._fsj=_sf9._q2g();}}}break;case "sortItem":switch(this._fij._g2b){case "sortList":case "DetailSortList":_3yl=_nkk.eEffectMove;if(_sf9){_sf9._j89=_nkk.eLocationInside;this._fij._fsj=_sf9._q2g();}break;case "sortItem":_3yl=_nkk.eEffectMove;if(_sf9){_sf9._j89=_nkk.eLocationBeforeOrAfter;this._fij._fsj=_sf9._q2g();}break;}break;case "Group":switch(this._fij._g2b){case "Group":case "OverallGroup":_3yl=_nkk.eEffectMove;if(_sf9){_sf9._j89=(this._fij._g2b=="OverallGroup")?_nkk.eLocationAfter:_nkk.eLocationBeforeOrAfter;this._fij._fsj=_sf9._q2g();}break;}}this._flg._3g4(_sf9);return(_3yl & _4v2);};_ycm._tph=function(e,_t8n,_3yl,_0a9){this._flg._j65();this._em5();if(_3yl==_nkk.eEffectNone){return;}var _u2k=this._flg._cr9();var _4ek=_t8n.getAttribute("id");var _ita=_4ek?_u2k.selectSingleNode( ".//treeNode[@id='" + _4ek + "']" ):_t8n;var _wta=_u2k.selectSingleNode( ".//treeNode[@id='" + this._fij._qek + "']" );var _t2k=this._y8b(_u2k, _ita, _wta, this._fij._fsj);if(_zpn._70d&&_zpn._70d._ti){_zpn._70d._ti(e, this, _t8n);}this._flg._wfn();if(_t2k){this._flg._6sc(_t2k);this._flg._gqh(_t2k);}};_ycm._ybj=function(_ksa,_dwm){return(_ksa.selectSingleNode( "treeNode[@label=" + _cgm._zxc( _dwm ) + "]" ) != null );};_ycm._y8b=function(_u2k,_ita,_wta,_fsj){var d=_u2k.ownerDocument;var _g2b="";if(this._dq7&&!_wta){_g2b="sortList";_wta=this._flg._cr9();}else{_g2b=_wta.getAttribute("specname");}switch(_ita.getAttribute("specname")){case "dataItemRef":switch(_g2b){case "OverallGroup":if(_wta.nextSibling){return this._y8b(_u2k, _ita, _wta.nextSibling, _nkk.eLocationBefore);}return this._y8b(_u2k, _ita, _wta.parentNode, _nkk.eLocationInside);case "Groups":if(this._ybj(_wta, _ita.getAttribute("label"))){return null;}var _t2k=this._ck7( d, _wta, null, _ita.getAttribute( "label" ), "Group", null, "def_el_group", true );_t2k.setAttribute( "expanded", "true" );this._ck7( d, _t2k, null, _frh._c6j( "IDS_EL_sortList" ), "sortList", null, "def_hal_folder_16x16", true );return _t2k;case "Group":if(this._ybj(_wta.parentNode, _ita.getAttribute("label"))){return null;}var _usf=_ita.getAttribute("label");var _f1m=(_fsj==_nkk.eLocationBefore)?_wta:_8qn._t22(_wta);var _t2k=this._ck7( d, _wta.parentNode, _f1m, _usf, "Group", null, "def_el_group", true );_t2k.setAttribute( "expanded", "true" );var _g58=this._ck7( d, _t2k, null, _frh._c6j( "IDS_EL_sortList" ), "sortList", null, "def_hal_folder_16x16", true );var _f58=_u2k.selectSingleNode( ".//treeNode[@specname='sortItem' and @label=" + _cgm._zxc( _usf ) + "]" );if(_f58){_g58.appendChild(_f58.parentNode.removeChild(_f58));}return _t2k;case "sortList":case "DetailSortList":if(this._ybj(_wta, _ita.getAttribute("label"))){return null;}var _usf=_ita.getAttribute("label");var _t2k=this._ck7( d, _wta, null, _usf, "sortItem", null, "def_el_dataItem", false );_t2k.setAttribute( "stateSmallIcon", "sortState_ascending.gif" );return _t2k;case "sortItem":if(this._ybj(_wta.parentNode, _ita.getAttribute("label"))){return null;}var _f1m=(_fsj==_nkk.eLocationBefore)?_wta:_8qn._t22(_wta);var _t2k=this._ck7( d, _wta.parentNode, _f1m, _ita.getAttribute( "label" ), "sortItem", null, "def_el_dataItem", false );_t2k.setAttribute( "stateSmallIcon", "sortState_ascending.gif" );return _t2k;}break;case "sortItem":switch(_g2b){case "sortItem":var _f1m=(_fsj==_nkk.eLocationBefore)?_wta:_8qn._t22(_wta);if(_ita==_f1m){return _ita;}return _wta.parentNode.insertBefore(_ita.parentNode.removeChild(_ita), _f1m);case "sortList":case "DetailSortList":return _wta.appendChild(_ita.parentNode.removeChild(_ita));}break;case "Group":switch(_g2b){case "OverallGroup":if(_wta.nextSibling&&(_ita!=_wta.nextSibling)){return this._y8b(_u2k, _ita, _wta.nextSibling, _nkk.eLocationBefore);}return this._y8b(_u2k, _ita, _wta.parentNode, _nkk.eLocationInside);case "Group":var _f1m=(_fsj==_nkk.eLocationBefore)?_wta:_8qn._t22(_wta);if(_ita==_f1m){return _ita;}return _wta.parentNode.insertBefore(_ita.parentNode.removeChild(_ita), _f1m);}break;}};_ycm._ohe=function(){this._flg._j65();this._em5();this._zj6();};_ycm._em5=function(){this._9tb._r7j(true);};_ycm._wi5=function(){this._9tb._r7j(false);this._flg._rn9();};_ycm._acj=function(e){if((e.keyCode==_4qn._qrh)&&!this._2oh("btnDelete").disabled){this._ovc();}this._1f7(e);};_ycm._d7j=function(){var _t2k=this._flg._5r9();var _33m=_t2k.parentNode;var _f1m=_t2k.previousSibling;_33m.insertBefore(_33m.removeChild(_t2k), _f1m);this._flg._wfn();this._zj6();};_ycm._q4g=function(){var _t2k=this._flg._5r9();var _33m=_t2k.parentNode;var _f1m=_t2k.nextSibling.nextSibling;_33m.insertBefore(_33m.removeChild(_t2k), _f1m);this._flg._wfn();this._zj6();};_ycm._nb7=function(){var _t2k=this._flg._5r9();_8fm._jgn("_qmh", null, _t2k, this._bye, false);};_ycm._zj6=function(){var _t2k=this._flg._5r9();var _kvl=(_t2k!=null);if(_t2k){switch(_t2k.getAttribute("specname")){case "OverallGroup":case "Groups":case "DetailSortList":case "sortList":_kvl=false;break;}}var _k1c=false;var _8sg=false;if(_t2k){var _5ek=_t2k.getAttribute("specname");switch(_5ek){case "OverallGroup":case "Group":_k1c=true;}switch(_5ek){case "Group":case "sortItem":_8sg=true;}}this._pj8( "btnUp", _8sg&&_t2k.previousSibling&&( _t2k.previousSibling.getAttribute( "specname" ) != "OverallGroup" ) );this._pj8("btnDown", _8sg&&_t2k.nextSibling);this._pj8( "btnToggleSort", _kvl, "ToggleSort" );this._pj8("btnDelete", _kvl);this._pj8( "btnProperties", _k1c, "propertyList" );};_ycm._cr9=function(){return this._flg._cr9();};_ycm._he1=function(_p8m){return this._flg._67b(_p8m);};_ycm._w03=function(_atn){return this._flg._w03(_atn);};