_xcm.js 14 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 _xcm=new _lcm("_xcm");_xcm._kk8=function(n,_078){this._arl=n.selectSingleNode("layouts/layout");if(!this._arl){return;}this._jt7=_078;this._4le(null, null, _frh._c6j("IDS_TITLE_FORMAT_DEFAULTS"));};_xcm._jgn=function(_u4c,_6wa,_rlm,_078,_tic){this._vhm=_rlm;this._jt7=_078;this._hvb=_tic;this._4le(_u4c, _6wa, _frh._c6j("IDS_TITLE_FORMAT"));};_xcm._ubb=function(_u4c,_6wa,_rlm,_5a8){this._vhm=_rlm;this._jgg=true;this._uv7=_5a8;this._4le(_u4c, _6wa, _frh._c6j("IDS_TITLE_FORMAT"));};_xcm._src=function(){this._bsb=this._53g('PropertySheetFormat');var _d89=this._2oh("divPropertySheet");_d89.onkeydown=function(e){ _xcm._yh6(e); };_d89.onkeypress=function(e){ _xcm._ck5(e); };};_xcm._yh6=function(e){this._l4i._a7j(e);e.stopPropagation();};_xcm._ck5=function(e){this._l4i._wph(e);e.stopPropagation();};_xcm._sq2=function(){if(this._arl){var _ozj=this._6r5._eq9();var _fy7=false;for(var s in this._mze){var _04h=null;if(s.indexOf("currencyFormat")!=-1){if(this._3z9(s, true)){_fy7=true;}}else{_04h=this._3z9(s, true);var _mzj=_ozj.selectSingleNode( "listItems/listItem[@value='" + s + "']" );if(_mzj){_mzj.setAttribute( "smallIcon", _04h?"FormatModified.gif":"hal/images/blank.gif" );}}}var _mzj=_pgk._lee( _ozj, "value", "currencyFormat" );if(_mzj){_mzj.setAttribute( "smallIcon", _fy7?"FormatModified.gif":"hal/images/blank.gif" );}this._6r5._wfn();}};_xcm._23a=function(){this._mze={};var _w4f=[];var _fxj=this._53g('FormatType');_8qn._fde(_w4f, _fxj.selectNodes("listView/listItems/listItem/@value"));var _fxj=this._53g('FormatType_Output');_8qn._fde(_w4f, _fxj.selectNodes("listView/listItems/listItem/@value"));var _tzl=_w4f.length;for(var i=0;i<_tzl;i++){var _uxm=_w4f[i];if(_uxm){this._mze[_uxm]={};}}};_xcm._5z2=function(){if(_qkk._qik("ShowDesignPreviews")){this._gog=null;var _pga=_8l8._e87();var _ffc=null;if(_pga&&_pga.length>0){_ffc=_pga[0];if(_ffc._92g()==56){this._gog="'" + _ffc._v7b() + "'";}else{this._gog=_ffc._v7b();}_vzm._ozm("Raw value: " + _ffc._v7b());_vzm._ozm("Type value: " + _ffc._92g());}}this._xok=false;var _d89=this._2oh("divPropertySheet");this._l4i=new _opc(_d89, this._bsb, this, this._xp9(), "clsDialogPropertySheetInputBlocker");this._23a();var _3pd=this._2oh("divFormatType");var _yod=this._2oh("cboFormatType");_3pd.style.display=this._arl?"":"none";_yod.style.display=this._arl?"none":"";var _bpd=this._2oh("divShowSample");_bpd.style.display=(_qkk._qik("ShowDesignPreviews"))?"":"none";this._agj=this._2oh("divSample");_4qn._1je(this._agj, _frh._c6j("IDS_DATA_FORMAT_TEXT_SAMPLE"));if(this._arl){var _fxj=this._53g('FormatType');var _ozj=_fxj.selectSingleNode("listView").cloneNode(true);var _mzj=_ozj.selectSingleNode("listItems/listItem");_mzj.parentNode.removeChild(_mzj);var _mzj=_ozj.selectSingleNode("listItems/listItem[last()]");_mzj.parentNode.removeChild(_mzj);var nl=this._arl.selectNodes("defaultDataFormats/*");if(nl){for(var i=0;i<nl.length;i++){this._mkb(nl.item(i));}}this._6r5=new _pgk(_3pd, _ozj, this);}else{var _nz7=false;for(var i=0; !_nz7&&(i<this._vhm.length);++i){var n=this._vhm[i];switch(n.nodeName){case "appListSummary":case "appSliderTrackValuesStyle":case "appVariableTextItem":case "appListFact":case "viz":case "vizValue":case "vcSlotDsColumn":case "lcColumnStyle":case "lcColumn":case "lcColumnBody":_nz7=true;break;case "vizCategoryDataItem":_nz7=(this._hvb=="vizValueStyle");break;case "factCell":_nz7=(n.parentNode.nodeName=="appCrosstabSummary");break;case "rowCell":_nz7=n.selectSingleNode("contents/appListSummary")!=null;break;}}var _9kc=_nz7?"_Output":"";this._5r5=new _jgk(_yod, this._53g("FormatType"+_9kc), null, this);var _04h;if(this._jgg){_04h=this._vhm[0].selectSingleNode(this._uv7?(this._uv7+"/dataFormat/*"):"dataFormat/*");}else{var _lun=this._hvb?this._vhm[0].selectSingleNode(this._hvb):this._vhm[0];var _04h=_lun?_7gm._f85(_lun, this._jt7):null;}this._ap4(_04h);if(_04h){this._mkb(_04h, _04h.nodeName+_9kc);}this._5r5._hwc(_04h?(_04h.nodeName+_9kc):"");}this._wlb();};_xcm._ap4=function(_04h){var _559=['memberCaption', 'dataItemLabel', 'staticValue'];var _rb8=_8qn._o5b(null, _559);for(var i=0; i<this._vhm.length;++i){var _54l;var _kxj=this._vhm[i].selectSingleNode("contents"); if(_kxj){var _utn=_kxj.selectNodes("*");if(_utn.length==1){_54l=_utn.item(0);}}else{_54l=this._vhm[i];}if(!_54l||_54l.nodeName=="chartNodeMember"){continue;}var _13h=_7th._tz2(_54l, this._jt7);if(_13h&&_13h.selectSingleNode(_rb8)){var _a6k=this._5r5._o2g();var _m9h=_a6k._tfe();for(var j=0; j<_m9h.length;++j){var _uxm=_m9h.item(j).getAttribute("value");var _e69=_04h&&(_04h.nodeName==_uxm);if(_uxm!==""&&_uxm!=="stringFormat"&&!_e69){_a6k._lj2(_uxm);}}this._5r5._wt9(_a6k._nhj);break;}}return;};_xcm._wl3=function(){this._y7d(null);};_xcm._mkb=function(_04h,_2gh){var _4ch=null;var _ick=_04h.nodeName;if(this._arl&&(_ick=="currencyFormat")){var _a5e=_04h.getAttribute("currencyCode");if(_a5e){this._mze[_ick+"_" + _a5e]={};_4ch=this._mze[_ick+"_" + _a5e];}else{_4ch=this._mze[_ick];}}else if(_2gh){_4ch=this._mze[_2gh];}else{_4ch=this._mze[_ick];}var _749=this._l4i.Groups[0].Properties;var _tzl=_749.length;for(var i=0;i<_tzl;i++){var _vdn=_749[i];var _9ic=this._l4i._ld4(_vdn, "attributeName")||_vdn;switch(_vdn){case "showYearsBoolean":case "showMonthsBoolean":_9ic=_vdn.replace( "Boolean", "" );}var _uxm=_04h.getAttribute(_9ic);if(_uxm){_4ch[_vdn]=_uxm;}}};_xcm._o46=function(){if(this._6r5){this._6r5._fdm();delete this._6r5;}if(this._5r5){this._5r5._fdm();delete this._5r5;}this._l4i._fdm();delete this._l4i;delete this._arl;delete this._vhm;delete this._jt7;delete this._jgg;delete this._uv7;if(this._yda){this._yda._7zm();delete this._yda;}this._gog=null;this._hvb=null;};_xcm._dol=function(){var _2gh=this._pl4();if(_2gh){if(_2gh.indexOf("currencyFormat_")!=-1){var _a5e=this._mze[_2gh]["currencyCode"];this._mze[_2gh]={};this._mze[_2gh]["currencyCode"]=_a5e;}else{this._mze[_2gh]={};}setTimeout('_xcm._wlb(true)', 0);}};_xcm._oph=function(){var a=[];for(var s in this._mze){if(s.indexOf("currencyFormat_")!=-1){a.push(this._mze[s]["currencyCode"]);}}_8fm._jgn("_gmh", this._xp9(), _m0n._je8(a),function(_t78,_8fc){ _xcm._qwc(_t78, _8fc); });};_xcm._qwc=function(_t78,_8fc){for(var s in _t78){if(!_8fc[s]){delete this._mze["currencyFormat_"+s ];}}for(var s in _8fc){var _4ch=this._mze["currencyFormat_"+s];if(!_4ch){this._mze["currencyFormat_"+s]={};this._mze["currencyFormat_" + s]["currencyCode"] = s;}}this._tlb();};_xcm._ovc=function(){var _mzj=this._vq5._885();delete this._mze["currencyFormat_" + _mzj.getAttribute( "value" )];this._tlb();};_xcm._bgn=function(){_erh._ybb();if(this._arl){_8qn._k5g(this._arl, "defaultDataFormats");for(var s in this._mze){var _04h=this._3z9(s, true);if(_04h){var _lx5=_erh._h56(this._arl, "defaultDataFormats");_lx5.appendChild(_04h);}}}else{if(this._jgg){_8qn._jf1(this._vhm, this._uv7?this._uv7:"dataFormat");}else if(this._hvb){for(var i=0;i<this._vhm.length;i++){_8qn._cqh(this._vhm[i], this._hvb);}}else{_7gm._xb7(this._vhm, this._jt7);}var _04h=this._3z9(this._pl4(), false);if(_04h){for(var i=0;i<this._vhm.length;i++){if((_04h.nodeName=="format")&&(_04h.getAttribute("pattern")===null)){_04h.setAttribute( "pattern", "" );}if(this._jgg){var n=this._uv7?_erh._u0g(this._vhm[i], this._uv7):this._vhm[i];_erh._u0g(n, "dataFormat").appendChild(_erh._e5j(_04h, true));}else{var _72m=this._hvb?_erh._u0g(this._vhm[i], this._hvb):this._vhm[i];_7gm._ph8(_72m, _04h, this._jt7);}}}}_erh._iee();this._3le();};_xcm._2c7=function(){this._yda=null;};_xcm._996=function(_yal){_yal._kt9();if(_yal==this._yda){var _pi9=this._yda._t56();if(!_pi9){_pi9=" ";}this._yda=null;this._agj.innerHTML="";_4qn._1je(this._agj, _pi9);}};_xcm._3z9=function(_2gh,_7v5){var _04h=null;if(_2gh){var _8kc;switch(_2gh){case "numberFormat_Output":case "currencyFormat_Output":case "percentFormat_Output":_8kc=_2gh.split("_")[0];break;default:_8kc=_2gh;break;}var _k1c=false;var _9z7=(_2gh.indexOf("currencyFormat_")!=-1);if(_9z7){_04h=_erh._cnh("currencyFormat");}else{_04h=_erh._cnh(_8kc);}var _4ch=this._mze[_2gh];for(var _vdn in _4ch){var _uxm=_4ch[_vdn];if(_uxm){if(!_9z7||(_vdn!="currencyCode")){_k1c=true;}if(!this._l4i._623(_04h.nodeName, _vdn)){continue;}var _9ic=this._l4i._ld4(_vdn, "attributeName")||_vdn;switch(_9ic){case "showYearsBoolean":case "showMonthsBoolean":_9ic=_9ic.replace( "Boolean", "" );}_04h.setAttribute(_9ic, _uxm);}}}return((_7v5&&!_k1c)?null:_04h);};_xcm._wlb=function(_8xl){this._sq2();if(_8xl){this._l4i._w7j(true);}else{this._l4i._bzm();this._l4i._w7j(false);}var _2gh=this._pl4(true);var _ejh=this._k4d(null);if(_2gh){this._pj8("btnClear", true);var _749=this._l4i.Groups[0].Properties;var _tzl=_749.length;for(var i=0;i<_tzl;i++){var _7dk=_749[i];if(this._arl&&(_7dk=="currencyCode")){continue;}if(this._l4i._623(_2gh, _7dk)){var _a1k=this._bsb.selectSingleNode( "properties/group/property[@name='" + _7dk + "']" );this._6se(_a1k);}}_ejh=this._k4d(_2gh);}else{this._pj8("btnClear", false);}this._2k1();this._y7d(_ejh);};_xcm._k4d=function(_2gh){var _ejh;if(this._gog){_ejh=this._gog;}else{var currentdate=new Date();switch(_2gh){case "numberFormat_Output":case "numberFormat":_ejh="1234";break;case "currencyFormat_Output":case "currencyFormat":_ejh="1234.25";break;case "percentFormat_Output":case "percentFormat":_ejh="12";break;case "dateFormat":_ejh=currentdate.getFullYear().toString()+"-" + (currentdate.getMonth() + 1) + "-" + currentdate.getDate();break;case "stringFormat":_ejh=_frh._c6j("IDS_DATA_FORMAT_TEXT_SAMPLE");break;case "timeFormat":_ejh=currentdate.getHours().toString()+":" + currentdate.getMinutes() + ":" + currentdate.getSeconds() + "." + currentdate.getMilliseconds();break;case "dateTimeFormat":_ejh=currentdate.getFullYear().toString()+"-" + (currentdate.getMonth() + 1) + "-" + currentdate.getDate() + " ";_ejh=_ejh + currentdate.getHours()+":" + currentdate.getMinutes() + ":" + currentdate.getSeconds() + "." + currentdate.getMilliseconds();break;case "intervalFormat":_ejh="123 1:45:12.324";break;default:_ejh=_frh._c6j("IDS_DATA_FORMAT_TEXT_SAMPLE");break;}}_vzm._ozm("type: " + _2gh + " sample: " + _ejh);return _ejh;};_xcm._2k1=function(){var _2gh=this._pl4(true);this._2oh( "divCurrencies" ).style.visibility = ( this._arl&&( _2gh=="currencyFormat" ) )?"visible":"hidden";this._zj6();};_xcm._y7d=function(_ejh){if(!_qkk._qik("ShowDesignPreviews")){return;}_u0n._3a6(this._agj);if(!_ejh){return;}var _04h=this._3z9(this._pl4(), true);this._yda=new _kf2(this, _04h, _ejh);this._yda._ign();};_xcm._tlb=function(){var _ozj=this._53g("Currencies");var _j5m={};for(var s in this._mze){if(this._mze[s]["currencyCode"]){_j5m[this._mze[s]["currencyCode"]]=true;}}_r7g._tm(_ozj, null, false, _j5m);this._vq5=new _pgk(this._2oh("divCurrenciesList"), _ozj, this);this._vq5._uab(_pgk._m65(_ozj, 0));this._2k1();};_xcm._6se=function(_a1k){var _2gh=this._pl4();var _7dk=_a1k.getAttribute("name");var _uxm=this._mze[_2gh][_7dk];this._l4i._jje(_7dk, _uxm||"");};_xcm._g67=function(_35k,_mzj){for(var s in this._mze){this._mze[s]={};}if(_o7g._csh&&!this._xok){this._xok=true;setTimeout('_xcm._wlb();_xcm._wlb()', 0);}else{setTimeout('_xcm._wlb();', 0);}};_xcm._pe4=function(_a6k,_mzj,_zdf){switch(_a6k._ezm()){case "_xcm_divFormatType":if(this._arl &&( _mzj.getAttribute( "value" )=="currencyFormat" ) ){this._tlb();}setTimeout('_xcm._wlb()', 0);break;case "_xcm_divCurrenciesList":setTimeout('_xcm._wlb()', 0);break;}this._zj6();if(_zpn._qsh["hal"]["enableAccessibility"]){setTimeout( this._6r5._y86.bind( this._6r5, "value", _mzj.getAttribute( "value" ) ), 0 );}};_xcm._zj6=function(){var _mzj=this._vq5?this._vq5._885():null;this._pj8( "btnDelete", _mzj&&_mzj.getAttribute( "value" ) );};_xcm._pl4=function(_cmd){if(this._arl){var _mzj=this._6r5._885();var _2gh=_mzj?_mzj.getAttribute( "value" ):"";if(!_cmd&&(_2gh=="currencyFormat")){var _mzj=this._vq5._885();var _uxm=_mzj.getAttribute("value");if(_uxm){_2gh+=("_" + _uxm);}}return _2gh;}return this._5r5._qik();};_xcm._ac=function(_xgc,_ahh,_n8e,_dmc){switch(_n8e){case "currencyCode":return this._jn2();}return this._53g(_ahh)||_frh._53g(_ahh);};_xcm._jn2=function(){if(!this._v14){this._v14=_frh._53g("EmptyList");_r7g._tm(this._v14);}return this._v14;};_xcm._0y=function(_xgc,_n8e,_dmc,_ozj,td){if(_u0n._to1(_ozj)){_dmc=null;}var _mzl=parseInt(this._l4i._ld4(_n8e, "listViewHeight"), 10);var _xqm=parseInt(this._l4i._ld4(_n8e, "listViewWidth"), 10);var _7ai=this._l4i._ld4( _n8e, "limitWidth" )=="false";this._l4i._gje(_n8e, _dmc, _ozj, _mzl, _xqm, _7ai);};_xcm._xm=function(_xgc,_vdn,_uxm){this._mze[this._pl4()][_vdn]=_uxm;setTimeout(this._wlb.bind(this, true), 0);};_xcm._ym=function(_xgc,_vdn){var _4ch=this._mze[this._pl4()];setTimeout(this._wlb.bind(this, true), 0);};_xcm._wm=function(_xgc,_vdn,_u4c,_yxk){};_xcm._bc=function(_xgc,_vdn,_uxm,_ozj){var _mzj=_pgk._lee(_ozj, "value", _uxm);if(!_mzj){return;}var _30j="";var _djf=_8qn._dn3(_mzj);if(_djf){_30j=_djf.getAttribute("value");}else{_30j=_ozj.selectSingleNode( "listItems/listItem" ).getAttribute( "value" );}this._xm(this._l4i, _vdn, _30j);};_xcm._h2=function(_xgc,_y08,_5en,_uxm,_npn,_mpn){switch(_y08){case _opc._19j:_m9b('IDS_HAL_ERR_INVALID_NUMBER');break;case _opc._hke:_k4g(_frh._c6j("IDS_HAL_ERR_INVALID_MIN", _8gm._fd7(_npn)));break;case _opc._2w9:_k4g(_frh._c6j("IDS_HAL_ERR_INVALID_MAX", _8gm._fd7(_mpn)));}setTimeout(this._wlb.bind(this, true), 0);};_xcm._cc=function(_xgc,_vdn){this._ck6();};_xcm._j7=function(_xgc,_vdn){};_xcm._ck6=function(){var _vdn=this._l4i._t77();var _jxm=this._l4i._eik(_vdn);var _6tf=_vdn?( _frh._997( _vdn )||"" ):"";_4qn._1je( this._2oh( "divInfoTitle" ), _jxm||"" );_4qn._1je(this._2oh("divInfoDescription"), _6tf);};