// 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. var _5qc=new _lcm( "_5qc", "dlgDrillBehavior" );_5qc._bgn=function(){var _83m=_erh._vtc();var _1yj=this._d0n._led.selectSingleNode("treeNode/treeNode[@nodeName='dropZone']");if(_1yj){this._d0n._1da._gqh(_1yj.parentNode);this._d0n._1da._onh(_1yj.parentNode);_67j("IDS_MSG_LINKEDDRILLITEMS_EMPTY_GROUP");return;}_erh._ybb();_8qn._cqh(_83m, "drillBehavior");var _h9c;var nl=this._d0n._oca._cr9().selectNodes("./treeNode/treeNode[@drillUp or @drillDown or @drillColumnTitle!='memberCaption']");if(nl.length>0){_h9c=_erh._u0g(_83m, "drillBehavior");}for(var i=0; i0){var _kx6=_erh._h56(_83m, "drillSetsBehavior");var _d05=_erh._h56(_kx6, "linkedDrillItemSets");var _1y5=_erh._u0g(_d05, "linkedDrillItemSet");_1y5.setAttribute("name", _gtm.item(i).getAttribute("label") );for(var j=0; j<_10e.length; j++){var _ic9=_erh._u0g(_1y5, "linkedDrillItem");_ic9.setAttribute("refQuery", _10e.item(j).getAttribute("query") );_ic9.setAttribute("refDataItem", _10e.item(j).getAttribute("name") );}}}};_5qc._5z2=function(){var _83m=_erh._vtc();var _s3m=_frh._53g("StaticTree");_7aj._ymh(_s3m, _83m, true);_7aj._a46(_s3m);var _ryd=_s3m.cloneNode(true);_ryd.setAttribute( "stateSmallIconHeight", "16px" );_ryd.setAttribute( "stateSmallIconWidth", "6px" );var _8z6=_s3m.cloneNode(true);_8z6.setAttribute( "stateSmallIconHeight", "16px" );_8z6.setAttribute( "stateSmallIconWidth", "10px" );_s3m.setAttribute("showCheckboxes", "true");_s3m.setAttribute( "showCheckedDescendents", "true" );var _r58=_s3m.cloneNode(true);var _4z5=_s3m;this._7t7=_r58;this._mq5=_4z5;this._ked=_ryd;this._d0n._jo6=_8z6;_u0n._3a6(this._2oh("divDrillUpDisable"));_u0n._3a6(this._2oh("divDrillDownDisable"));_u0n._3a6(this._2oh("divDIBehaviorTree"));_u0n._3a6(this._2oh("divQueriesForLinkingTree"));this._d0n._g0i=new _jgk( this._2oh( "cboDrillUp" ), this._53g("drillUpDown"), null, this );this._d0n._nve=new _jgk( this._2oh( "cboDrillDown" ), this._53g("drillUpDown"), null, this );this._d0n._6p5=new _jgk( this._2oh( "cboDrillColumnTitle" ), this._53g("drillColumnTitle"), null, this );this._d0n._6y8=new _jgk( this._2oh( "cboChangeExpr_drillUp" ), null, _frh._53g( "EmptyList" ), this );this._d0n._1n6=new _jgk( this._2oh( "cboChangeExpr_drillDown" ), null, _frh._53g( "EmptyList" ), this );this._d0n._cij=new _lfn(this._2oh("deckMain"));this._d0n._bze=new _lfn(this._2oh("deck_drillUp"));this._d0n._etb=new _lfn(this._2oh("deck_drillDown"));var nl=_83m.selectNodes("drillBehavior/drillQueryBehavior");for(var i=0; i1){return false;}switch(_n9i[0].getAttribute("nodeName")){case "dataItemRef":case "queryRef":break;case "linkedDrillItem":break;default:return false;}return true;};_5qc._dg4=function(_h7k,_n9i,_0a9,e){if(_h7k==this._d0n._1da||_h7k==this._d0n._lt7){if(this._kcg(_n9i)){_nkk._szm(null, this, _n9i, _nkk.eEffectLink, _0a9);}}};_5qc._r4g=function(){this._wi5();return true;};_5qc._uph=function(e,_t8n,_4v2,_bom,_0a9){var _3yl=_nkk.eEffectNone;this._fij={};this._fij._fsj=_nkk.eLocationNone;this._fij._92b=_t8n[0].getAttribute("nodeName");this._fij._f2b="";if(!_4qn._84g(e, this._2oh("divDILinksTree"))){this._d0n._1da._3g4(null);return _3yl;}if(_t8n[0].getAttribute("nodeName")=="queryRef"||_t8n[0].getAttribute("nodeName")=="linkedDrillItemSet"){this._d0n._1da._3g4(null);return _3yl;}var _sf9=this._d0n._1da._po9(e.clientX, e.clientY);if(_sf9){this._fij._u37=this._d0n._1da._ezm();this._fij._q9n=_sf9.nNode;this._fij._f2b=_sf9.nNode.nodeName;}if(_sf9){_3yl=_nkk.eEffectLink;_sf9._j89=_nkk.eLocationBeforeOrAfter;if(this._fij._q9n&&( this._fij._q9n.getAttribute( "nodeName" )=="linkedDrillItemSet" ||this._fij._q9n.getAttribute( "nodeName" )=="dropZone" ) ){_sf9._j89=_nkk.eLocationInside;}this._fij._fsj=_sf9._q2g();}else if(_4qn._84g(e, this._2oh("divDILinksTree"))){_3yl=_nkk.eEffectLink;}this._d0n._1da._3g4(_sf9);return(_3yl & _4v2);};_5qc._m82=function(_t8n,_a6h){var _zgc=_8qn._ya4(null, _a6h.selectNodes("treeNode/@query"));for(var _h7n=0; _h7n<_t8n.length; _h7n++){if(_zgc[ _t8n[ _h7n ].getAttribute("query")]){return true;}}var _rg9={};for(var i=0;i<_t8n.length;i++){if(_rg9[ _t8n[ i ].getAttribute("query")]){return true;}_rg9[ _t8n[ i ].getAttribute("query")]=true;}return false;};_5qc._6n4=function(_t8n){for(var i=0;i<_t8n.length;i++){if(_t8n[i].getAttribute("stateSmallIcon")=="icon_drill_link.gif"){return true;}}return false;};_5qc._tph=function(e,_t8n,_3yl,_0a9){this._d0n._1da._j65();if(_3yl==_nkk.eEffectNone){return;}if(this._6n4(_t8n)){_67j('IDS_MSG_CANNOT_INSERT_LINKEDDRILLITEM_FAILED_DATAITEM_USED');return;}var _a6h=null;var _u1h=null;if(!this._fij._q9n){var _3dl=_frh._c6j("IDS_DRILLBEHAVIOR_LINKS_DEFAULTNAME");_3dl=_8qn._g8b(this._d0n._led.selectNodes("treeNode/@label"), _3dl, true);_a6h=this._h62(_3dl);}else if(this._fij._q9n.getAttribute("expandable")=="true"){_a6h=this._fij._q9n;}else{_a6h=this._fij._q9n.parentNode;_u1h=(this._fij._fsj==_nkk.eLocationBefore)?this._fij._q9n:(this._fij._q9n?_8qn._dn3(this._fij._q9n):null);}if(this._m82(_t8n, _a6h)){this._d0n._1da._onh(_a6h);_67j('IDS_MSG_CANNOT_INSERT_LINKEDDRILLITEM_FAILED_QUERY_USED');return;}for(var i=0; i<_t8n.length; i++){var _zac=this._mj4( _a6h, _t8n[i].getAttribute("query"), _t8n[i].getAttribute("name"), _u1h );if(_t8n[i].getAttribute("nodeName")=="linkedDrillItem"){_t8n[i].parentNode.removeChild(_t8n[i]);}else{var _uyk=true;this._tw1(_zac, _uyk);}}this._k91();this._d0n._1da._wfn();this._d0n._1da._onh(_a6h);this._d0n._1da._gqh(_zac);this._7k6();};_5qc._ohe=function(){this._d0n._1da._j65();};_5qc._1a5=function(){var _oon=_frh._c6j("IDS_DRILLBEHAVIOR_LINKS_INPUTBOX_NAME");var _jxm=_frh._c6j("IDS_DRILLBEHAVIOR_LINKS_INPUTBOX_CREATE");var _3dl=_frh._c6j("IDS_DRILLBEHAVIOR_LINKS_DEFAULTNAME");_3dl=_8qn._g8b(this._d0n._led.selectNodes("treeNode/@label"), _3dl, true);var _45c=this._e33.bind(this);var _dpm=this._puc.bind(this);_zgk._jgn(this._xp9(), _oon, _jxm, _3dl, null, _dpm, null, null, _45c);};_5qc._e33=function(){var _dwm=_zgk._fkl();if(_dwm==""){_67j("IDS_ERR_INVALID_NAME");return false;}if(_5qc._d0n._led.selectNodes("treeNode[@label=" + _cgm._zxc( _dwm ) + "]").length ){_67j("IDS_ERR_NOT_UNIQUE_NAME");return false;}return true;};_5qc._h62=function(_vdn){var _s5l=this._d0n._led.appendChild(this._d0n._led.ownerDocument.createElement("treeNode"));_s5l.setAttribute("label", _vdn);_s5l.setAttribute("smallSvgIcon", "def_hal_folder_16x16");_s5l.setAttribute("expandedSmallSvgIcon", "def_hal_folder_expanded_16x16");_s5l.setAttribute("expandable", "true");_s5l.setAttribute("expanded", "true");_s5l.setAttribute("nodeName", "linkedDrillItemSet");return _s5l;};_5qc._puc=function(_e5m){var _s5l=this._h62(_zgk._fkl());this._k91();this._d0n._1da._wfn();this._d0n._1da._onh(_s5l);this._d0n._1da._gqh(_s5l);};_5qc._tw1=function(_3y5,_uyk){if(_3y5.getAttribute("nodeName")=="linkedDrillItem"){var _uwm=_3y5.getAttribute("query");var _79k=_3y5.getAttribute("name");var _py6=this._d0n._jo6.selectSingleNode("treeNode/treeNode[@query=" + _cgm._zxc( _uwm ) + "][@name=" + _cgm._zxc( _79k ) + "]");if(_uyk){_py6.setAttribute("stateSmallIcon", "icon_drill_link.gif");}else{_py6.removeAttribute("stateSmallIcon");}}};_5qc._ld6=function(_a6h){var _zac=null;_zac=_a6h.appendChild(this._d0n._led.ownerDocument.createElement("treeNode"));_zac.setAttribute("label", _frh._c6j("IDS_DRILLBEHAVIOR_LINKS_DROP_HERE") );_zac.setAttribute("nodeName", "dropZone");_zac.setAttribute("smallIcon", 'tv_drill_links_dropzone.gif');return _zac;};_5qc._k91=function(){var _668=this._d0n._led.selectNodes("treeNode");_8qn._k5g(this._d0n._led, "treeNode/treeNode[@nodeName='dropZone']");for(var i=0; i<_668.length; i++){var _kqa=_668.item(i);if(_kqa.selectNodes("treeNode[@nodeName='linkedDrillItem']").length==0){this._ld6(_kqa);this._ld6(_kqa);}else if(_kqa.selectNodes("treeNode[@nodeName='linkedDrillItem']").length==1){var _zac=this._ld6(_kqa);}}};_5qc._acj=function(e){if(this._d0n._0in._pee()==2){if((e.keyCode==_4qn._qrh)&&!this._2oh("btnDelete").disabled){this._c23();}}this._1f7(e);};_5qc._c23=function(){var _5zb=_5qc._d0n._1da._xg8();if(_5zb.length){for(var i=0;i<_5zb.length;i++){if(_5zb[i].getAttribute("nodeName")=="linkedDrillItemSet"){var _kif=_5zb[i].selectNodes("*");for(var j=0; j<_kif.length; j++){var _uyk=false;_5qc._tw1(_kif.item(j), _uyk);}}else{var _uyk=false;_5qc._tw1(_5zb[i], _uyk);}_5zb[i].parentNode.removeChild(_5zb[i]);}this._k91();_5qc._7k6();}};_5qc._3p3=function(){var _xua=this._d0n._led.selectNodes("treeNode/treeNode");for(var i=0; i<_xua.length; i++){var _uyk=false;this._tw1(_xua.item(i), _uyk);}_8qn._k5g(this._d0n._led, "*");this._7k6();};_5qc._g23=function(){var _45c=this._e33.bind(this);var _txd=_5qc._d0n._1da._5r9();_zgk._bc7(true);_zgk._jgn(this._xp9(),_frh._c6j("IDS_LBL_NAME"),_frh._c6j("IDS_TITLE_RENAME"),_txd.getAttribute("label"),null,Function("_5qc._j5a()"),null,null,_45c);};_5qc._j5a=function(){var _vdn=_zgk._fkl();var _txd=_5qc._d0n._1da._5r9();_txd.setAttribute("label", _vdn);_5qc._d0n._1da._wfn();};_5qc._whe=function(){var _txd=this._d0n._lt7._5r9();if(!_txd){return;}if(_txd.getAttribute("nodeName") != "dataItemRef" ){return;}var _a6h=this._d0n._1da._5r9();if(_a6h&&(_a6h.getAttribute("nodeName")=="linkedDrillItem" ||_a6h.getAttribute("nodeName")=="dropZone")){_a6h=_a6h.parentNode;}else if(!_a6h){var _a8l=this._d0n._led.selectNodes("treeNode");if(_a8l.length==1){_a6h=_a8l.item(0);}}if(this._6n4([_txd])){_67j('IDS_MSG_CANNOT_INSERT_LINKEDDRILLITEM_FAILED_DATAITEM_USED');return;}if(!_a6h){var _3dl=_frh._c6j("IDS_DRILLBEHAVIOR_LINKS_DEFAULTNAME");_3dl=_8qn._g8b(this._d0n._led.selectNodes("treeNode/@label"), _3dl, true);_a6h=this._h62(_3dl);}if(this._m82([_txd], _a6h)){this._d0n._1da._onh(_a6h);_67j('IDS_MSG_CANNOT_INSERT_LINKEDDRILLITEM_FAILED_QUERY_USED');return;}var _v5l=this._mj4( _a6h, _txd.getAttribute("query"), _txd.getAttribute("name") );var _uyk=true;this._tw1(_v5l, _uyk);this._k91();this._d0n._1da._wfn();this._d0n._1da._onh(_a6h);this._d0n._1da._gqh(_v5l);this._7k6();};_5qc._x4g=function(){this._c23();};_5qc._mj4=function(_a6h,_uwm,_79k,_u1h){var _zac=null;if(_u1h){_zac=_a6h.insertBefore(this._d0n._led.ownerDocument.createElement("treeNode"), _u1h);}else{_zac=_a6h.appendChild(this._d0n._led.ownerDocument.createElement("treeNode"));}var _gmc=_frh._c6j("IDS_DRILLBEHAVIOR_QUERY_DATA_ITEM_NAME", _uwm, _79k);_zac.setAttribute("label", _gmc);_zac.setAttribute("name", _79k);_zac.setAttribute("query", _uwm);_zac.setAttribute("nodeName", "linkedDrillItem");var _qxj=_agm._rg8(_erh._vtc(), _uwm, _79k);var _cdn=_nlk._g3g(_qxj);_zac.setAttribute("smallSvgIcon", _cdn);return _zac;};_5qc._eg4=function(_h7k,_t2k){switch(_t2k.getAttribute("nodeName")){case "queryRef":var nl=_t2k.selectNodes("./treeNode");_8qn._433( nl, "checked", ( _t2k.getAttribute( "checked" )=="true" )?"false":"true" );for(var i=0;i0){n.setAttribute( "checked", this._qy9( nl )?"true":"false" );}else{n.setAttribute( "staticCheckbox", "true" );}if(_h7k){_h7k._3rh(n);}};_5qc._qy9=function(nl){var _hs6=true;for(var i=0;i