_nf2.js 4.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. function _nf2(_rbm, _psm, _ibn){this._mtl=_rbm;this._fjm=_psm;this._03n=_ibn;this._f2n=_erh._9kl(this._fjm.getAttribute("roid"));this._8hn();};_nf2.prototype._fdm=function(){};_nf2.prototype._8hn=function(){if(!_7hn._ij8(this._f2n, "listColumns/listColumn")){return;}var _psm=this._fjm.cloneNode(true);_psm.setAttribute( "class", "clsFixedHeightListBody " + ( _psm.getAttribute( "class" )||"" ) );var d=_psm.ownerDocument;var tbl=this._mtl;if(this._f2n.getAttribute( "cellHeightBehavior" )=="minimal" ){var _1sn=_7hn._ij8(_psm, "tr[last()]");if(_1sn&&!_7hn._ij8(_1sn, "td/*")){_psm.removeChild(_1sn);}}var _loa=_4qn._s97()+(_o7g._60n?2:0);var _dkh="width:" + ( tbl.offsetWidth + _loa ) + "px";_psm.setAttribute( "style", ( _psm.getAttribute( "style" )||"" ) + ( ";" + _dkh ) );var _bl=[];var nl=this._f2n.selectNodes("listColumns/listColumn/listColumnBody");var _tzl=nl.length;for(var i=0;i<nl.length;i++){var _mra=nl.item(i);var _7en=_mra.getAttribute("iid");var _zrn=_7hn._ij8( _psm, "*/*[@roid='" + _7en + "']" );if(_zrn){_bl.push(this._03n._o56(_zrn));}}var _osm=_psm.appendChild(d.createElement("thead"));_osm.setAttribute("style", _dkh);var _hli=_osm.appendChild(d.createElement("tr"));var _mid=[];var _jb=[];var _tzl=_bl.length;var _wzg=(_tzl-1);for(var i=0;i<_tzl;i++){var _xqm=_bl[i].offsetWidth;_mid.push(_xqm+((i==_wzg)?_loa:0));_jb.push(_xqm);_hli.appendChild( d.createElement( "th" ) ).setAttribute( "style", "width:" + _mid[i] + "px; height:0px" );}var _lb8=this._f2n.getAttribute("showColumnTitles");if(_lb8=="startOfList"){this._4j1("listColumns/listColumn/listColumnTitle/@iid", _psm, _osm, true, d);}this._4j1("listPageHeader/listRows/listRow/rowCells/rowCell/@iid", _psm, _osm, true, d);this._4j1("listOverallGroup/listHeader/listRows/listRow/rowCells/rowCell/@iid", _psm, _osm, true, d);if(_lb8=="startOfDetails"){if(!_7hn._ij8(this._f2n, "listColumns/listColumn/listColumnTitle/contents//textItem/dataSource/dataItemValue")){var _ai3=this._f2n.selectNodes("listColumns/listColumn/listColumnTitle/@iid");var _268=_psm.selectNodes( 'tr[*' + _8qn._i67( "@roid", _8qn._fde( null, _ai3 ) ) + ']' );for(var i=_268.length-1;i>=0;i--){var _1sn=_268.item(i);if(i==0){_osm.appendChild(_1sn);}else{_1sn.parentNode.removeChild(_1sn);}}}}else if(_lb8!="startOfList"){this._4j1("listColumns/listColumn/listColumnTitle/@iid", _psm, _osm, true, d);}var _nsm=this._4j1("listOverallGroup/listFooter/listRows/listRow/rowCells/rowCell/@iid", _psm, null, false, d);_nsm=this._4j1("listPageFooter/listRows/listRow/rowCells/rowCell/@iid", _psm, _nsm, false, d);if(_nsm){_nsm.setAttribute("style", _dkh);}var _msm=_psm.appendChild(d.createElement("tbody"));_msm.setAttribute( "class", "clsFixedHeightListBodyTBody" );_msm.setAttribute( "style", _dkh + ";height:" + this._f2n.getAttribute( "scrollableAreaHeight" ) + "px" );_8qn._35b(_msm, _psm.selectNodes("tr"));var _tzl=_jb.length;var _1sn=_7hn._ij8( _psm, "tbody/tr[1][count(*)=" + _tzl + "]" );if(_1sn){var nl=_1sn.selectNodes("*");for(var i=0;i<_tzl;i++){var _2sn=nl.item(i);_2sn.setAttribute( "style", ( _2sn.getAttribute( "style" )||"" ) + ( ";width:" + _jb[i] + "px" ) );}}else{var _qta=_hli.cloneNode(true);var _zrn=_7hn._ij8(_qta, "*[last()]");if(_zrn){_zrn.setAttribute( "style", "width:" + _m0n._xpn( _jb ) + "px; height:0px" );}_msm.insertBefore(_qta, _msm.firstChild);}var _yq4=5;var nl=_psm.selectNodes( "(thead | tfoot)/tr/*[last()]" );var _tzl=nl.length;for(var i=0;i<_tzl;i++){var _2sn=nl.item(i);_2sn.setAttribute( "style", ( _2sn.getAttribute( "style" )||"" ) + ( ";padding-right:" + ( _loa + _yq4 ) + "px" ) );}this._03n._gy2();tbl.outerHTML=_8qn._2u9(_psm);};_nf2.prototype._4j1=function(_zxm,_psm,_ayd,_4wl,d){var nl=this._f2n.selectNodes(_zxm);if(nl.length>0){var _lan=_psm.selectNodes( 'tr[*' + _8qn._i67( "@roid", _8qn._fde( null, nl ) ) + ']' );if(_lan.length>0){_ayd=_ayd||_psm.appendChild(d.createElement(_4wl?"thead":"tfoot"));_8qn._35b(_ayd, _lan);}}return _ayd;};