_s57.js 3.2 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 _s57=new _lcm( "_s57", "dlgGenericQueryHints" );_s57._jgn=function(_fsm){this._ajm=_fsm;this._4le();};_s57._5z2=function(){this._rhm=[];var nl=_7hn._x5g(this._ajm, "genericHints/genericHint");for(var i=0;i<nl.length;i++){var _99n=nl.item(i);this._rhm.push( { name: _99n.getAttribute( "name" ), value: _99n.getAttribute( "value" ) } );}this._53i=_7hn._ij8( this._53g( "ListView" ), "listItems" );this._fz3();this._uij=new _pgk(this._2oh("divListView"), this._53i.parentNode, this);this._zj6();};_s57._fz3=function(_q0m){_8qn._k5g(this._53i, "*");var d=this._53i.ownerDocument;for(var i=0;i<this._rhm.length;i++){var _1bn=this._rhm[i];var _mzj=this._53i.appendChild(d.createElement("listItem"));_mzj.setAttribute("label", _1bn.name);_mzj.setAttribute("i", i.toString());if(i==_q0m){_mzj.setAttribute( "selected", "true" );}_mzj.appendChild( d.createElement( "subItem" ) ).setAttribute( "label", _1bn.value );}};_s57._o46=function(){if(this._uij){this._uij._fdm();this._uij=null;}this._53i=null;this._ajm=null;};_s57._6hk=function(){_8fm._jgn( "_w4j", this._xp9(), _frh._c6j( "IDS_LBL_NAME" ), _frh._c6j( "IDS_LBL_VALUE" ), _frh._c6j( "IDS_TITLE_ADD" ), "", "", this, this._9qn.bind( this ));};_s57._9qn=function(){if(this._cqn){var _mzj=this._uij._885();var i=_mzj?(+_mzj.getAttribute("i")+ 1):this._rhm.length;this._rhm.splice(i, 0, { name: _w4j._nik().trim(), value: _w4j._oik().trim()});this._hmb(i);}};_s57._9hn=function(i){if(this._cqn){var _1bn=this._rhm[i];_1bn.name=_w4j._nik().trim();_1bn.value=_w4j._oik().trim();this._hmb(i);}};_s57._g1g=function(){delete this._cqn;try {var d=document.implementation.createDocument( "", "", null );d.createElement(_w4j._nik().trim());}catch(e){_2dm._jgn(null, _frh._c6j("IDS_MSG_INVALID_HINT"), null, _2dm._bfm);return false;}this._cqn=true;return true;};_s57._hmb=function(_wvj){this._fz3(_wvj);this._uij._wfn();this._zj6();};_s57._ovc=function(){var i=+this._uij._885().getAttribute("i");this._rhm.splice(i, 1);this._hmb();this._uij._gwc((i<this._rhm.length)?i:_6hn._iem(i-1));};_s57._s4g=function(){var i=+this._uij._885().getAttribute("i");_8fm._jgn( "_w4j", this._xp9(), _frh._c6j( "IDS_LBL_NAME" ), _frh._c6j( "IDS_LBL_VALUE" ), _frh._c6j( "IDS_TITLE_EDIT" ), this._rhm[i].name, this._rhm[i].value, this, this._9hn.bind( this, i ));};_s57._zj6=function(){var _mzj=this._uij._885();this._pj8("btnEdit", !!_mzj);this._pj8("btnDelete", !!_mzj);};_s57._pe4=function(_a6k,_mzj,_zdf){this._zj6();};_s57._oi2=function(_a6k,_mzj){setTimeout(this._s4g.bind(this), 0);};_s57._bgn=function(){_erh._ybb();var _f4m=_8qn._k5g(this._ajm, "genericHints/genericHint");if(this._rhm.length>0){var _vmj=[];for(var i=0;i<_f4m.length;i++){_vmj.push(_f4m.item(i));}var _srm=_erh._h56(this._ajm, "genericHints");for(var i=0;i<this._rhm.length;i++){var _1bn=this._rhm[i];var _99n=_srm.appendChild(_vmj.pop()||_erh._cnh("genericHint"));_99n.setAttribute("name", _1bn.name);_99n.setAttribute("value", _1bn.value);}}else{_8qn._cqh(this._ajm, "genericHints");}_erh._iee(true);this._3le();};