_18g.js 3.4 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. define([],function(){"use strict";var _18g={};_18g._ujl=function(_3en,_9ak,_kyg,_w5n){this._nig=_kyg||null;this._m1n=!!_w5n;this._u6i=_3en;this._twb=_9ak;_hyc._7gn(this);};_18g._cy2=function(_jug){if(_jug){return;}var _s4k={report:true,query:true,reportTemplate:true,analysis:true,interactiveReport:_qkk._qik("CanLoadApplications")};_8fm._vqh( "_a4b", "_9kk", this, _s4k, this._u6i, this._twb );};_18g._g1g=function(){var _3en=_a4b._vg8();if(!_3en){_67j("IDS_SELECT_FOLDER");return false;}var _9ak=_a4b._2r9();if(!_jcb._yje(_9ak)){return false;}var _pen=_a4b._q75(_9ak);if(_pen){this._ikj=_9ak;this._awb=_3en;var _ssf=_jcb._ytc();if(_pen==_ssf){_2dm._jgn(null, _frh._c6j("IDS_REPORT_EXISTS", _9ak), null, _2dm._zkk, _2dm._ffm,function(){ _18g._b6d();}, null);}else{_2dm._jgn(null, _frh._c6j("IDS_OBJECT_EXISTS", _9ak), null, _2dm._zkk, _2dm._jml, null);}return false;}this._2xh(_erh._vtc(),_3en,_9ak,_jcb._ytc());return false;};_18g._fqh=function(_3en, _9ak, _kyg, _tci, _k06, _e5m, _xz7, _apn){this._nig=_kyg||null; this._m1n=!_tci;if(!_xz7){this._2xh(_erh._vtc(),_3en,_9ak,_jcb._ytc(),_k06,_e5m);}else{this._zkb(_erh._vtc(),_3en,_9ak,_apn,_k06,_e5m);}};_18g._b6d=function(){delete this._m1n;this._2xh(_erh._vtc(),this._awb,this._ikj,_jcb._ytc());};_18g._2xh=function(_83m,_aak,_9ak,_axg,_a3e,_e5m){var _a9l=_ylh._brc(this._xf7);_a9l._jkj=_aak;_a9l._ikj=_9ak;_a9l._2gd=_a3e;_a9l._vrl=_e5m;_erh._h56(_83m, "reportName").text=_9ak;var _yal=_jcb._ep1(this,_83m,_aak,_9ak,_axg,true,this._m1n);_yal._lqh(_a9l);_5ml._y5g(_yal, _frh._c6j("IDS_MSG_SAVING_REPORT"));};_18g._zkb=function(_83m,_aak,_9ak,_apn,_a3e,_e5m){var _n8m=Application.SharedState.GetOutputFormatForViewerType(Application.SharedState.Get("viewer"));var _jjh=Application.SharedState.Get("cmSearchPath");var _wqg=Application.GetParameterValues();var _san={"type": "reportView","defaultName": _9ak,"defaultOutputFormat": [_n8m],"parameters": _wqg,"base": [{"searchPath": _jjh,"type": "baseClass"}]};if(_jjh&&_jjh.length>0){var _cpn=_apn+"?updateAction=" + (this._m1n?"fail":"replace");var _yal=new _yzf({_996:function(_yal){var _5um=_yal._8ik();if(_5um){if(_a3e){var _kdk=_yal._0r9();_kdk=JSON.parse(_kdk);if(_kdk.errorCode==='cmDuplicateName'){_a3e.reject({isDuplicate: true});return;}else{_a3e.reject({saveError: _5um});}}_08j(_5um);}else if(_a3e){_a3e.resolve({saved: true});}}.bind(this)},"POST", _cpn, JSON.stringify(_san));_5ml._y5g(_yal, _frh._c6j("IDS_MSG_SAVING_REPORTVIEW"));}};_18g._2c7=function(_yal){var _a9l=_yal._ynh();if(_a9l&&_a9l._2gd){_a9l._2gd.reject({saveAborted: true});}};_18g._996=function(_yal){var _a9l=_yal._ynh(); var _5um=_yal._8ik();if(_5um){if(_a9l&&_a9l._2gd){var _735="CM-REQ-4024";if(_5um._m5i==_735){_a9l._2gd.reject({isDuplicate: true});return;}else{_a9l._2gd.reject({saveError: _5um});}}Application.GlassContext.showToast(_5um._3q9(), {type:"error", preventDuplicates: true});return;}if(_a9l._2gd){_a9l._2gd.resolve({saved: true});}var _7ma=_yal._63g();if(!_7ma){return;}if(_jcb._ig4(_7ma)){var _mun=_eth._14(_yal);_ypn._zvc(_a9l._jkj, _a9l._ikj, _mun._hog, _mun._ktk);if(!_qkk._qik("UseGlassOpenSaveDialog")){_a4b._1gn();}if(this._nig){setTimeout(this._nig, 0, _a9l._jkj, _a9l._ikj, _mun._hog, _mun._ktk);}if(_al8._v6j("canDevelopVisualizations")){_gth._5k2();}}};return _18g;});