123456 |
- // 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.
- define([],function(){"use strict";function _l47(_20l, _yka){this._iqk=_20l||null;this._f9a=_yka||false;this._usk="save";this._b5i="cancel";this._4kj="reset";this._iok=[];_38g._q0g(this);if(_erh._zik()){this._z2a();}else{_erh._q0g(this);}};_l47.prototype._wfn=function(){var _83m=_erh._vtc();var _g6k=_83m?_agm._t41(_83m):null;if(!_g6k){return;}_5ml._fll(_1ke._avc(_g6k)).then(function(_4ui){var _gum=_1ke._gik(_g6k);return _5ml._fll(_gum._n56());}).done(function(_i9l){if(!this._iqk){return;}var _198=_cgm._qoh(_frh._c6j("IDS_PROP_autoSummary_DATASET"));var _aic=this._iqk.getAttribute("id") + "_autoSummary";var _ub8=_cgm._qoh(_frh._c6j("IDS_PROP_suppression_DATASET"));var _qnc=this._iqk.getAttribute("id") + "_suppression";var _5k9=_cgm._qoh(_frh._c6j("IDS_LBL_queryReset_DATASET"));var _i1b=_cgm._qoh(_frh._c6j("IDS_PROP_queryReset_DATASET"));var _s8e=this._iqk.getAttribute("id") + "_queryReset";var _uek ="<div style='display:inline-block; padding:var(--16S) 0 0 var(--16S); white-space:nowrap;'>" +"<label for='" + _aic + "' class='clsToggle'>" +"<input id='" + _aic + "' type='checkbox' checked='true' tabIndex='0'/><span>" + _198 + "</span>" +"</label>"+"<label for='" + _qnc + "' class='clsToggle' style='margin-top:var(--16S)'>" +"<input id='" + _qnc + "' type='checkbox' checked='true' tabIndex='0'/><span>" + _ub8 + "</span>" +"</label>"+"<button id='" + _s8e + "' class='clsDlgButton' style='margin-top:var(--16S);margin-left:0' aria-label='" + _5k9 + "' _cmd='" + this._4kj + "' tabIndex='0' title='" + _i1b + "'>" + _5k9 + "</button>" +"</div>";if(this._f9a){var _g9e=_frh._c6j("IDS_LBL_DONE");var _rya=_frh._c6j("IDS_DEFAULT_BTN_LABEL_cancel");_uek+= "<div class='clsToolbar' HAL_idsAriaLabel='IDS_AC_DATASET_TOOLBAR' style='height:45px; display:inline-block; padding:var(--16S) var(--16S) 0 0; float:right'>" +"<button style='margin-left:var(--32L)' class='clsDlgButton' aria-label='" + _g9e + "' _cmd='" + this._usk + "' tabIndex='0'>" + _g9e + "</button>" +"<button class='clsDlgButton' aria-label='" + _rya + "' _cmd='" + this._b5i + "' tabIndex='0'>" + _rya + "</button>" +"</div>";}this._iqk.innerHTML=_9l8._cj8(_uek);var _dul=this._iqk.getElementsByTagName("input");for(var i=0; i<_dul.length;++i){var _hyl=_dul[i];switch(_hyl.getAttribute("id")){case _aic:this._kcd=_hyl;this._kcd.checked=_uq3._x65();this._an8(this._kcd, "change", this._x5d.bind(this, 1));break;case _qnc:this._c1i=_hyl;this._c1i.checked=_uq3._3h8();this._an8(this._c1i, "change", this._x5d.bind(this, 2));break;}}var _klm=this._iqk.getElementsByTagName("button");for(var i=0; i<_klm.length; i++){var _rnn=_klm[i].getAttribute("_cmd");if(_rnn==this._usk){this._nwe=_klm[i];}if(_rnn){this._an8(_klm[i], "click", this._2dg.bind(this));}}}.bind(this));};_l47.prototype._3l8=function(){this._wfn();}; _l47.prototype._fdm=function(){_erh._hab(this);while(this._iok.length>0){var _o5m=this._iok.pop();_o5m.remove();}while(this._iqk.hasChildNodes()){this._iqk.removeChild(this._iqk.firstChild);}this._iqk=null;this._kcd=null;this._c1i=null;};_l47.prototype._an8=function(_usj,_yvm,_5gi){_usj.addEventListener(_yvm, _5gi);this._iok.push({remove: function(){ _usj.removeEventListener(_yvm, _5gi); }});};_l47.prototype._x5d=function(_y7n,e){e.stopPropagation();if(_y7n==1){_erh._ybb();_8qn._433( _erh._vtc().selectNodes( "queries/query/selection" ), "autoSummary", e.target.checked?"true":"false" );_erh._iee();}else{var _j9n=_erh._vtc().selectSingleNode("layouts//list");_wm8._5v9(_j9n, e.target.checked?"rows":"none");}};_l47.prototype._z2a=function(){if(this._kcd){this._kcd.checked=_uq3._x65();}if(this._c1i){this._c1i.checked=_uq3._3h8();}};_l47.prototype._1c7=function(){this._z2a();};_l47.prototype._2dg=function(evt){evt.stopPropagation();if(evt.type=="click"||(evt.type=="keyup"&&evt.keyCode==_4qn._x8j)){switch(evt.target.getAttribute("_cmd")){case this._usk:this._ahm();break;case this._b5i:this._fgm();break;case this._4kj:this._41n();break;}}};_l47.prototype._ahm=function(){var _bpm=_ypn._5t9;_ypn._5t9=function(_aak,_9ak,_jjh,_qgl){if(_bpm){_bpm.apply(_ypn, arguments);}Application.SharedState.Fire(null, "onDatasetSaved", {"fileName": _9ak, "storeID": _qgl});_ypn._5t9=_bpm;}.bind(_ypn);_ypn._zhk(_ypn._5t9);};_l47.prototype._fgm=function(){Application.SharedState.Fire(null, "onDatasetCancelled");};_l47.prototype._41n=function(){var _j9n=_erh._vtc().selectSingleNode("layouts//list");if(_j9n){_erh._ybb();_dth._ru9( _j9n, "interimQuery", "true" );_8qn._cqh(_j9n, "listColumns");_erh._iee(true);}};_l47.prototype._5yc=function(_a9l){if(_a9l){_4qn._pf1(this._nwe, !_a9l["disableDoneButton"]);}};return _l47;});
|