/* *+------------------------------------------------------------------------+ *| Licensed Materials - Property of IBM *| IBM Cognos Products: Viewer *| (C) Copyright IBM Corp. 2014 *| *| US Government Users Restricted Rights - Use, duplication or *| disclosure restricted by GSA ADP Schedule Contract with IBM Corp. *| *+------------------------------------------------------------------------+ */ cvLoadDialog=function(_1,_2,_3,_4,_5,_6){ _6=((_6===undefined)?true:_6); var _7=document.getElementById("formWarpRequest"+_1.getId()); if(_7&&_1){ _1.getWorkingDialog().hide(); var _8=""; var _9=""; var _a=null; if(_1.isAccessibleMode()){ _8="winNAT_"+(new Date()).getTime(); _9=_1.getWebContentRoot()+"/"+"rv/blankNewWin.html?cv.id="+this.getCVId(); }else{ var _b=document.body; _a=new CModal("","",_b,null,null,_4,_3,true,true,false,true,_1.getWebContentRoot()); if(typeof _5=="string"){ document.getElementById(CMODAL_CONTENT_ID).setAttribute("title",_5); } document.getElementById(CMODAL_BACK_IFRAME_ID).setAttribute("title",RV_RES.IDS_JS_MODAL_BACK_IFRAME); _8=CMODAL_CONTENT_ID; } var _c=document.createElement("FORM"); _c.method="POST"; _c.action=_1.getGateway(); _c.target=_8; _c.style.margin="0px"; document.body.appendChild(_c); for(var _d in _2){ _c.appendChild(createHiddenFormField(_d,_2[_d])); } if(_6){ _c.appendChild(createHiddenFormField("cv.id",_1.getId())); _c.appendChild(createHiddenFormField("b_action","xts.run")); _c.appendChild(createHiddenFormField("ui.action",_7["ui.action"].value)); _c.appendChild(createHiddenFormField("ui.object",_7["ui.object"].value)); if(typeof _1.rvMainWnd!="undefined"){ _c.appendChild(createHiddenFormField("run.outputFormat",_1.rvMainWnd.getCurrentFormat())); } if(typeof _7["run.outputLocale"]!="undefined"){ _c.appendChild(createHiddenFormField("run.outputLocale",_7["run.outputLocale"].value)); } if(typeof _c["backURL"]=="undefined"&&typeof _c["ui.backURL"]=="undefined"&&typeof _7["ui.backURL"]!="undefined"){ _c.appendChild(createHiddenFormField("ui.backURL",_7["ui.backURL"].value)); } if(typeof _1!="undefined"&&typeof _1.getConversation!="undefined"&&typeof _1.getTracking!="undefined"){ _c.appendChild(createHiddenFormField("ui.conversation",_1.getConversation())); _c.appendChild(createHiddenFormField("m_tracking",_1.getTracking())); if(_1.envParams["ui.name"]!="undefined"){ _c.appendChild(createHiddenFormField("ui.name",_1.envParams["ui.name"])); } } } var _e=window.onbeforeunload; window.onbeforeunload=null; if(_1.isAccessibleMode()){ window.open(_9,_8,"rv"); _c.submit(); }else{ _c.submit(); _a.show(); } window.onbeforeunload=_e; document.body.removeChild(_c); _1.modalShown=true; } }; function createHiddenFormField(_f,_10){ var _11=document.createElement("input"); _11.setAttribute("type","hidden"); _11.setAttribute("name",_f); _11.setAttribute("id",_f); _11.setAttribute("value",_10); return (_11); }; function isAuthenticationFault(_12){ if(_12!=null){ var _13=XMLHelper_FindChildByTagName(_12,"CAM",true); return (_13!=null&&XMLHelper_FindChildByTagName(_13,"promptInfo",true)!=null); } }; function processAuthenticationFault(_14,_15){ if(isAuthenticationFault(_14)){ launchLogOnDialog(_15,_14); return true; } return false; }; function isObjectEmpty(_16){ for(var _17 in _16){ if(_16.hasOwnProperty(_17)){ return false; } } return true; }; function launchLogOnDialog(_18,_19){ try{ var oCV=getCognosViewerObjectRef(_18); var _1b={"b_action":"xts.run","m":"portal/close.xts","h_CAM_action":"logonAs"}; if(_19!=null){ var _1c=XMLHelper_FindChildrenByTagName(_19,"namespace",true); if(_1c!=null){ for(var _1d=0;_1d<_1c.length;++_1d){ var _1e=_1c[_1d]; if(_1e!=null){ var _1f=XMLHelper_FindChildByTagName(_1e,"name",false); var _20=XMLHelper_FindChildByTagName(_1e,"value",false); if(_1f!=null&&_20!=null){ var _21=XMLHelper_GetText(_1f); var _22=XMLHelper_GetText(_20); if(_21!=null&&_21.length>0){ _1b[_21]=_22; } } } } } } cvLoadDialog(oCV,_1b,540,460,null,false); } catch(exception){ } }; function getCVWaitingOnFault(){ var oCV=null; for(var _24=0;_240&&_39.childNodes[0].className=="textItem"){ try{ _39.childNodes[0].focus(); } catch(e){ if(typeof console!=="undefined"&&console.log){ console.log("CCognosViewer: Could not set focus to node. setNodeFocus method common.js"); } } } } }; function html_encode(str){ return str.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""); }; function replaceNewLine(_3c){ var _3d=/\r\n|\r|\n/g; var _3e="
"; return _3c.replace(_3d,_3e); }; function xml_encode(_3f){ var _40=""+_3f; if((_40=="0")||((_3f!=null)&&(_3f!=false))){ _40=_40.replace(/&/g,"&"); _40=_40.replace(//g,">"); _40=_40.replace(/"/g,"""); _40=_40.replace(/'/g,"'"); }else{ if(_3f==null){ _40=""; } } return _40; }; function xml_decodeParser(_41,_42){ var _43=_41; switch(_42){ case "amp": _43="&"; break; case "lt": _43="<"; break; case "gt": _43=">"; break; case "quot": _43="\""; break; case "apos": _43="'"; break; } return _43; }; function xml_decode(_44){ var _45=""+_44; if((_45=="0")||((_44!=null)&&(_44!=false))){ _45=_45.replace(/&(amp|lt|gt|quot|apos);/g,xml_decodeParser); }else{ if(_44==null){ _45=""; } } return _45; }; function xpath_attr_encode(_46){ var _47=null; if(_46.indexOf("'")>=0&&_46.indexOf("\"")>=0){ var _48=_46.split("\""); _47="concat("; for(var i=0;i<_48.length;++i){ if(i>0){ _47+=","; } if(_48[i].length>0){ _47+=("\""+_48[i]+"\""); }else{ _47+="'\"'"; } } _47+=")"; }else{ if(_46.indexOf("'")>=0){ _47="\""+_46+"\""; }else{ _47="'"+_46+"'"; } } return _47; }; function getCognosViewerObjectString(sId){ return "oCV"+sId; }; function getCognosViewerObjectRefAsString(sId){ return "window."+getCognosViewerObjectString(sId); }; function getCognosViewerObjectRef(sId){ return window[getCognosViewerObjectString(sId)]; }; function getCognosViewerSCObjectString(sId){ return "oCVSC"+sId; }; function getCognosViewerSCObjectRefAsString(sId){ return "window."+getCognosViewerSCObjectString(sId); }; function getCognosViewerSCObjectRef(sId){ return window[getCognosViewerSCObjectString(sId)]; }; function cleanupGlobalObjects(sId){ cleanupVariable(getCognosViewerObjectString(sId)); cleanupVariable(getCognosViewerSCObjectString(sId)); }; function cleanupVariable(_51){ if(typeof window[_51]!="undefined"&&window[_51]){ if(isIE()){ eval("delete "+_51); }else{ delete window[_51]; } } }; function loadClass(_52){ try{ var _53=eval("new "+_52+"();"); return _53; } catch(e){ return null; } }; function getElementsByClassName(_54,_55,_56){ var _57=(_55=="*"&&_54.all)?_54.all:_54.getElementsByTagName(_55); var _58=[]; var _59=new RegExp("(^|\\s)"+_56+"(\\s|$)"); var _5a=_57.length; for(var i=0;i<_5a;i++){ var _5c=_57[i]; if(_59.test(_5c.className)){ _58.push(_5c); } } return _58; }; function getImmediateLayoutContainerId(_5d){ var _5e=_5d; while(_5e!=null){ if(_5e.getAttribute&&_5e.getAttribute("lid")!=null){ return _5e.getAttribute("lid"); } _5e=_5e.parentNode; } return null; }; function getChildElementsByAttribute(_5f,_60,_61,_62){ return getDescendantElementsByAttribute(_5f,_60,_61,_62,true); }; function getElementsByAttribute(_63,_64,_65,_66,_67,_68){ return getDescendantElementsByAttribute(_63,_64,_65,_66,false,_67,_68); }; function getDescendantElementsByAttribute(_69,_6a,_6b,_6c,_6d,_6e,_6f){ var _70=[]; var _71=null; if(typeof _6f==="undefined"){ _71=(typeof _6c!="undefined")?new RegExp("(^|\\s)"+_6c+"(\\s|$)","i"):null; }else{ _71=_6f; } if(typeof _6a=="string"){ _6a=[_6a]; } var _72=(_69?_6a.length:0); for(var _73=0;_73<_72;_73++){ var _74=null; if(_6d){ if(_6a[_73]=="*"&&_69.all){ _74=_69.childNodes; }else{ _74=[]; var _75=_69.childNodes; for(var i=0;i<_75.length;++i){ if(_75[i].nodeName.toLowerCase()==_6a[_73].toLowerCase()){ _74.push(_75[i]); } } } }else{ _74=(_6a[_73]=="*"&&_69.all)?_69.all:_69.getElementsByTagName(_6a[_73]); } var _77=_74.length; for(var idx=0;idx<_77;idx++){ var _79=_74[idx]; var _7a=_79.getAttribute&&_79.getAttribute(_6b); if(_7a!==null){ var _7b=null; if(typeof _7a==="number"){ _7b=String(_7a); }else{ if(typeof _7a==="string"&&_7a.length>0){ _7b=_7a; } } if(_7b!==null){ if(typeof _6c=="undefined"||(_71&&_71.test(_7b))){ _70.push(_79); if(_6e!=-1&&_70.length>_6e){ return []; }else{ if(_6e==1&&_70.length==1){ return _70; } } } } } } } return _70; }; function savedOutputDoneLoading(_7c,_7d){ var oCV=window["oCV"+_7c]; var _7f=(oCV&&oCV.getViewerWidget?oCV.getViewerWidget():null); var _80=(_7f?_7f.getSavedOutput():null); if(_80){ _80.outputDoneLoading(); }else{ if(_7d<5){ _7d++; var _81=function(){ savedOutputDoneLoading(_7c,_7d); }; setTimeout(_81,100); } } }; function getNavVer(){ var _82; if(isIE()){ return getIEVersion(); }else{ _82=navigator.userAgent.split("/"); return parseFloat(_82[_82.length-1]); } }; function isSafari(){ return (navigator.userAgent.toLowerCase().indexOf("safari")!=-1&&navigator.userAgent.toLowerCase().indexOf("chrome")==-1); }; function isIE(){ return (navigator.userAgent.indexOf("MSIE")!=-1||navigator.userAgent.indexOf("Trident")!=-1); }; function getIEVersion(){ var _83=navigator.userAgent.match(/(?:MSIE |Trident\/.*; rv:)(\d+)/); return _83?parseFloat(_83[1]):null; }; function isFF(){ return (navigator.userAgent.indexOf("Firefox")!=-1); }; function isIOS(){ return navigator.userAgent.indexOf("iPad")!=-1||navigator.userAgent.indexOf("iPhone")!=-1; }; function displayChart(_84,_85,_86,_87){ if(_85.length>1){ document.images[_84].src=_85; } }; function isFlashChartNode(evt){ var _89=getNodeFromEvent(evt); if(_89!=null&&typeof _89.getAttribute=="function"){ return _89.getAttribute("flashChart")!=null; } return false; }; function onFlashChartRightClick(evt){ if(evt&&evt.button&&evt.button!=0&&isFlashChartNode(evt)){ return onViewerChartFocus(evt); } }; function onViewerChartFocus(evt){ if(evt.stopPropagation){ evt.stopPropagation(); } if(evt.preventDefault){ evt.preventDefault(); } if(evt.preventCapture){ evt.preventCapture(); } if(evt.preventBubble){ evt.preventBubble(); } var _8c=getNodeFromEvent(evt); var _8d=_8c.getAttribute("viewerId"); if(!_8d){ _8d=_8c.parentNode.getAttribute("viewerId"); } if(!_8d){ return; } var oCV=window["oCV"+_8d]; var _8f=oCV.getAction("Selection"); _8f.pageClicked(evt); return stopEventBubble(evt); }; function clientToScreenCoords(_90,_91){ var _92=_90; var _93={topCoord:0,leftCoord:0}; while(_92!=null&&_92!=_91){ _93.topCoord+=_92.offsetTop; _93.leftCoord+=_92.offsetLeft; _92=_92.offsetParent; } return _93; }; function getCurrentPosistionString(oCV,_95,_96){ var _97=RV_RES.IDS_JS_INFOBAR_ITEM_COUNT; var _98=/\{0\}/; var _99=/\{1\}/; _97=_97.replace(_98,_95); _97=" "+_97.replace(_99,_96)+" "; return _97; }; function applyJSONProperties(obj,_9b){ for(property in _9b){ if(typeof _9b[property]=="object"&&!(_9b[property] instanceof Array)){ if(typeof obj[property]=="undefined"){ obj[property]={}; } applyJSONProperties(obj[property],_9b[property]); }else{ obj[property]=_9b[property]; } } }; function CViewerCommon(){ }; CViewerCommon.openNewWindowOrTab=function(_9c,_9d){ return window.open(_9c,_9d); }; CViewerCommon.toJSON=function(obj){ var _9f=typeof (obj); if(_9f!="object"||_9f===null){ if(_9f==="string"){ obj="\""+obj+"\""; } return String(obj); }else{ var _a0; var _a1; var _a2=[]; var _a3=(obj&&obj.constructor==Array); for(_a0 in obj){ _a1=obj[_a0]; _9f=typeof (_a1); if(_9f==="string"){ _a1="\""+_a1+"\""; }else{ if(_9f=="object"&&_a1!==null){ _a1=CViewerCommon.toJSON(_a1); } } _a2.push((_a3?"":"\""+_a0+"\":")+String(_a1)); } return (_a3?"[":"{")+String(_a2)+(_a3?"]":"}"); } }; function resizePinnedContainers(){ var oCV=window.gaRV_INSTANCES[0]; if(oCV&&!oCV.m_viewerFragment){ var _a5=oCV.getPinFreezeManager(); if(_a5&&_a5.hasFrozenContainers()){ var _a6=document.getElementById("RVContent"+oCV.getId()); var _a7=document.getElementById("mainViewerTable"+oCV.getId()); var _a8=_a6.clientWidth; var _a9=_a7.clientHeight; _a5.resize(_a8,_a9); if(isIE()){ oCV.repaintDiv(_a6); } } } }; function setWindowHref(url){ var _ab=window.onbeforeunload; window.onbeforeunload=null; window.location.href=url; window.onbeforeunload=_ab; }; CViewerCommon.getMessage=function(msg,_ad){ if(typeof _ad=="undefined"){ return msg; }else{ if(typeof _ad=="string"){ msg=msg.replace("{0}",_ad); }else{ if(_ad.length){ for(var i=0;i<_ad.length;++i){ msg=msg.replace("{"+i+"}",_ad[i]); } }else{ msg=msg.replace("{0}",_ad); } } } return msg; }; function getViewerDirection(){ if(window.gaRV_INSTANCES&&window.gaRV_INSTANCES.length){ return gaRV_INSTANCES[0].getDirection(); } return "ltr"; }; function isViewerBidiEnabled(){ if(window.gaRV_INSTANCES&&window.gaRV_INSTANCES.length){ var _af=gaRV_INSTANCES[0].isBidiEnabled(); if(_af){ return true; } } return false; }; function getViewerBaseTextDirection(){ if(window.gaRV_INSTANCES&&window.gaRV_INSTANCES.length){ return gaRV_INSTANCES[0].getBaseTextDirection(); } return ""; }; function enforceTextDir(_b0){ if(isViewerBidiEnabled()&&_b0){ var _b1=getViewerBaseTextDirection(); var _b2=BidiUtils.getInstance(); if(_b1=="auto"){ _b1=_b2.resolveStrBtd(_b0); } var _b3=(!dojo._isBodyLtr())?_b2.RLM:_b2.LRM; return _b3+((_b1==="rtl")?_b2.RLE:_b2.LRE)+_b0+_b2.PDF+_b3; } return _b0; }; function getElementDirection(_b4){ var dir=null; if(_b4.currentStyle){ dir=_b4.currentStyle.direction; }else{ if(window.getComputedStyle){ var _b6=window.getComputedStyle(_b4,null); if(_b6){ dir=_b6.getPropertyValue("direction"); } } } if(dir){ dir=dir.toLowerCase(); } return dir; }; function getScrollLeft(_b7){ if(getElementDirection(_b7)==="rtl"&&isFF()){ return _b7.scrollWidth-_b7.offsetWidth+_b7.scrollLeft; } return _b7.scrollLeft; }; function setScrollLeft(_b8,_b9){ if(getElementDirection(_b8)==="rtl"&&isFF()){ _b8.scrollLeft=_b8.offsetWidth+_b9-_b8.scrollWidth; }else{ _b8.scrollLeft=_b9; } }; function setScrollRight(_ba,_bb){ if(getElementDirection(_ba)==="rtl"&&isFF()){ _ba.scrollLeft=-_bb; }else{ _ba.scrollLeft=_ba.scrollWidth-_ba.offsetWidth-_bb; } }; function getBoxInfo(el,_bd){ if(!getBoxInfo.aStyles){ getBoxInfo.aStyles=[{name:"marginLeft",ie:"marginLeft",ff:"margin-left"},{name:"marginRight",ie:"marginRight",ff:"margin-right"},{name:"marginTop",ie:"marginTop",ff:"margin-top"},{name:"marginBottom",ie:"marginBottom",ff:"margin-bottom"},{name:"borderLeftWidth",ie:"borderLeftWidth",ff:"border-left-width"},{name:"borderRightWidth",ie:"borderRightWidth",ff:"border-right-width"},{name:"borderTopWidth",ie:"borderTopWidth",ff:"border-top-width"},{name:"borderBottomWidth",ie:"borderBottomWidth",ff:"border-bottom-width"},{name:"paddingLeft",ie:"paddingLeft",ff:"padding-left"},{name:"paddingRight",ie:"paddingRight",ff:"padding-right"},{name:"paddingTop",ie:"paddingTop",ff:"padding-top"},{name:"paddingBottom",ie:"paddingBottom",ff:"padding-bottom"}]; } var _be={}; var _bf=null; if(el.currentStyle){ _bf=el.currentStyle; }else{ if(window.getComputedStyle){ _bf=window.getComputedStyle(el,null); } } if(!_bf){ return null; } for(i in getBoxInfo.aStyles){ var _c0=getBoxInfo.aStyles[i]; var _c1=null; if(_bf.getPropertyValue){ _c1=_bf.getPropertyValue(_c0.ff); }else{ _c1=_bf[_c0.ie]; } if(_c1&&_bd){ _c1=Number(_c1.replace("px","")); } _be[_c0.name]=_c1; } return _be; }; var GUtil={}; GUtil.createHiddenForm=function(_c2,_c3,_c4,_c5){ var _c6=document.getElementById(_c2); if(_c6){ document.body.removeChild(_c6); } _c6=document.createElement("form"); _c6.id=_c2; _c6.name=_c2; _c6.method=_c3; _c6.style.display="none"; _c6.action=document.forms["formWarpRequest"+_c4].action; _c6.target=_c5+(new Date()).getTime(); document.body.appendChild(_c6); return _c6; }; GUtil.createFormField=function(el,_c8,_c9){ var _ca=document.createElement("input"); _ca.type="hidden"; _ca.name=_c8; _ca.value=_c9; el.appendChild(_ca); }; GUtil.generateCallback=function(_cb,_cc,_cd){ if(_cb){ var _ce=_cd||this; _cc=(_cc instanceof Array)?_cc:[]; return (function(_cf){ if(typeof _cf!="undefined"&&_cc.length==0){ _cc.push(_cf); } return _cb.apply(_ce,_cc); }); }else{ return (function(){ }); } }; GUtil.destroyProperties=function(_d0,_d1){ var _d2; if(_d0 instanceof Array){ for(var i=0;i<_d0.length;i++){ _d2=_d0[i]; if(_d2 instanceof String){ _d2=null; }else{ if(_d2&&_d2.destroy&&!_d2._beingDestroyed){ _d2.destroy(); } GUtil.destroyProperties(_d2); } } }else{ if(_d0 instanceof Object){ if(_d0._beingDestroyed){ return; } var obj=_d0; obj._beingDestroyed=true; for(var _d5 in obj){ _d2=obj[_d5]; if(_d5==="_beingDestroyed"||_d5==="m_destroyed"||_d5==="_destroyed"||typeof _d2=="function"){ continue; } if(_d2 instanceof Array){ GUtil.destroyProperties(_d2); }else{ if(_d2 instanceof Object){ if(typeof _d2.destroy=="function"&&!_d2._destroyed&&(_d2!==CCognosViewer||_d1)){ _d2.destroy(); } } } delete obj[_d5]; } } } }; function CCognosViewerRequest(_d6){ this.m_sAction=""; this.m_oOptions=new CDictionary(); this.m_oParams=new CDictionary(); this.m_oFormFields=new CDictionary(); this.m_sRequestType="ajax"; this.m_callback=null; this.setAction(_d6); }; CCognosViewerRequest.prototype.setCallback=function(_d7){ this.m_callback=_d7; }; CCognosViewerRequest.prototype.getCallback=function(){ return this.m_callback; }; CCognosViewerRequest.prototype.setRequestType=function(_d8){ if(typeof _d8!="undefined"&&typeof _d8=="string"){ if(_d8.match(/\ajax\b|\bpost\b|\bget\b/i)){ this.m_sRequestType=_d8; } } }; CCognosViewerRequest.prototype.getRequestType=function(){ return this.m_sRequestType; }; CCognosViewerRequest.prototype.addOption=function(_d9,_da){ this.m_oOptions.add(_d9,_da); }; CCognosViewerRequest.prototype.removeOption=function(_db){ this.m_oOptions.remove(_db); }; CCognosViewerRequest.prototype.addParameter=function(_dc,_dd){ this.m_oParams.add(_dc,_dd); }; CCognosViewerRequest.prototype.addFormField=function(_de,_df){ this.m_oFormFields.add(_de,_df); }; CCognosViewerRequest.prototype.getFormFields=function(){ return this.m_oFormFields; }; CCognosViewerRequest.prototype.getAction=function(){ return this.m_sAction; }; CCognosViewerRequest.prototype.getOption=function(_e0){ return this.m_oOptions.get(_e0); }; CCognosViewerRequest.prototype.getParameter=function(_e1){ return this.m_oParams.get(_e1); }; CCognosViewerRequest.prototype.hasOption=function(_e2){ return this.m_oOptions.exists(_e2); }; CCognosViewerRequest.prototype.hasParameter=function(_e3){ return this.m_oParams.exists(_e3); }; CCognosViewerRequest.prototype.setAction=function(_e4){ this.m_sAction=_e4; }; function XmlHttpObject(){ this.m_formFields=new CDictionary(); this.xmlHttp=XmlHttpObject.createRequestObject(); this.m_requestIndicator=null; this.m_httpCallbacks={}; this.m_asynch=true; this.m_headers=null; }; XmlHttpObject.prototype.setHeaders=function(_e5){ this.m_headers=_e5; }; XmlHttpObject.prototype.getHeaders=function(){ return this.m_headers; }; XmlHttpObject.prototype.newRequest=function(){ var _e6=new XmlHttpObject(); _e6.init(this.m_action,this.m_gateway,this.m_url,this.m_asynch); this.executeHttpCallback("newRequest"); return _e6; }; XmlHttpObject.prototype.abortHttpRequest=function(){ if(this.xmlHttp!=null){ this.xmlHttp.abort(); this.xmlHttp=null; this.executeHttpCallback("cancel"); this.m_httpCallbacks={}; } }; XmlHttpObject.prototype.cancel=function(){ this.abortHttpRequest(); }; XmlHttpObject.prototype.executeHttpCallback=function(_e7){ if(this.m_httpCallbacks&&this.m_httpCallbacks[_e7]){ var _e8=this.concatResponseArguments(this.m_httpCallbacks.customArguments); var _e9=GUtil.generateCallback(this.m_httpCallbacks[_e7].method,_e8,this.m_httpCallbacks[_e7].object); _e9(); return true; } return false; }; XmlHttpObject.prototype.setCallbacks=function(_ea){ if(!this.m_httpCallbacks){ this.m_httpCallbacks={}; } for(callback in _ea){ this.m_httpCallbacks[callback]=_ea[callback]; } }; XmlHttpObject.prototype.getCallbacks=function(){ return this.m_httpCallbacks; }; XmlHttpObject.createRequestObject=function(){ var _eb=null; if(window.XMLHttpRequest){ _eb=new XMLHttpRequest(); }else{ if(window.ActiveXObject){ _eb=new ActiveXObject("Msxml2.XMLHTTP"); }else{ } } return _eb; }; XmlHttpObject.prototype.waitForXmlHttpResponse=function(){ var _ec=this.xmlHttp; if(_ec&&_ec.readyState===4){ if(_ec.status===200){ this.httpSuccess(); }else{ this.httpError(); } }else{ } }; XmlHttpObject.prototype.init=function(_ed,_ee,url,_f0){ this.m_action=_ed; this.m_gateway=_ee; this.m_url=url; this.m_asynch=_f0; }; XmlHttpObject.prototype.httpSuccess=function(){ this.executeHttpCallback("postHttpRequest"); this.executeHttpCallback("entryComplete"); this.executeHttpCallback("complete"); this.m_httpCallbacks=null; }; XmlHttpObject.prototype.httpError=function(){ this.executeHttpCallback("entryFault"); this.executeHttpCallback("fault"); this.m_httpCallbacks=null; }; XmlHttpObject.prototype.forceSynchronous=function(){ this.m_asynch=false; }; XmlHttpObject.prototype.sendRequest=function(){ this.sendHtmlRequest(this.m_action,this.m_gateway,this.m_url,this.m_asynch); }; XmlHttpObject.prototype.sendHtmlRequest=function(_f1,_f2,url,_f4){ var _f5=this.xmlHttp; if(_f5){ _f5.open(_f1,_f2,_f4); if(_f4){ _f5.onreadystatechange=GUtil.generateCallback(this.waitForXmlHttpResponse,[],this); }else{ _f5.onreadystatechange=GUtil.generateCallback(this.waitForXmlHttpResponse,[],this); if(!isIE()){ _f5.onload=GUtil.generateCallback(this.httpSuccess,[],this); _f5.onerror=GUtil.generateCallback(this.httpError,[],this); } } _f5.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); if(this.m_headers){ for(header in this.m_headers){ _f5.setRequestHeader(header,this.m_headers[header]); } } this.executeHttpCallback("preHttpRequest"); var _f6=this.convertFormFieldsToUrl(); if(url){ _f6+=url; } _f5.send(_f6); } }; XmlHttpObject.prototype.getResponseXml=function(){ return (this.xmlHttp)?this.xmlHttp.responseXML:null; }; XmlHttpObject.prototype.getResponseText=function(){ return (this.xmlHttp)?this.xmlHttp.responseText:""; }; XmlHttpObject.prototype.getResponseHeader=function(_f7){ return (this.xmlHttp)?this.xmlHttp.getResponseHeader(_f7):null; }; XmlHttpObject.prototype.getStatus=function(){ return this.xmlHttp.status; }; XmlHttpObject.prototype.addFormField=function(_f8,_f9){ this.m_formFields.add(_f8,_f9); }; XmlHttpObject.prototype.getFormFields=function(){ return this.m_formFields; }; XmlHttpObject.prototype.getFormField=function(_fa){ return this.m_formFields.get(_fa); }; XmlHttpObject.prototype.clearFormFields=function(){ this.m_formFields=new CDictionary(); }; XmlHttpObject.prototype.convertFormFieldsToUrl=function(){ var url=""; var _fc=this.m_formFields.keys(); for(var _fd=0;_fd<_fc.length;_fd++){ if(_fd>0){ url+="&"; } url+=encodeURIComponent(_fc[_fd])+"="+encodeURIComponent(this.m_formFields.get(_fc[_fd])); } return url; }; XmlHttpObject.prototype.concatResponseArguments=function(_fe){ var _ff=[this]; if(_fe){ _ff=_ff.concat(_fe); } return _ff; }; function AsynchRequest(_100,_101){ AsynchRequest.baseConstructor.call(this); this.m_gateway=_100; this.m_webContentRoot=_101; this.m_callbacks={}; this.m_soapFault=null; this.m_faultDialog=null; this.m_promptDialog=null; this.m_logonDialog=null; }; AsynchRequest.prototype=new XmlHttpObject(); AsynchRequest.baseConstructor=XmlHttpObject; AsynchRequest.prototype.parent=XmlHttpObject.prototype; AsynchRequest.prototype.getTracking=function(){ return ""; }; AsynchRequest.prototype.getConversation=function(){ return ""; }; AsynchRequest.prototype.getPrimaryAction=function(){ return ""; }; AsynchRequest.prototype.getActionState=function(){ return ""; }; AsynchRequest.prototype.getAsynchStatus=function(){ return ""; }; AsynchRequest.prototype.getResult=function(){ return null; }; AsynchRequest.prototype.getSoapFault=function(){ return this.m_soapFault; }; AsynchRequest.prototype.constructFaultEnvelope=function(){ return null; }; AsynchRequest.prototype.getPromptHTMLFragment=function(){ return ""; }; AsynchRequest.prototype.isRAPWaitTrue=function(){ return false; }; AsynchRequest.prototype.getRAPRequestCache=function(){ return null; }; AsynchRequest.prototype.getMainConversation=function(){ return null; }; AsynchRequest.prototype.getMainTracking=function(){ return null; }; AsynchRequest.prototype.construct=function(){ }; AsynchRequest.prototype.executeCallback=function(_102){ if(this.m_callbacks[_102]){ var _103=this.concatResponseArguments(this.m_callbacks.customArguments); var _104=GUtil.generateCallback(this.m_callbacks[_102].method,_103,this.m_callbacks[_102].object); _104(); return true; } return false; }; AsynchRequest.prototype.setCallbacks=function(_105){ if(!this.m_callbacks){ this.m_callbacks={}; } for(callback in _105){ this.m_callbacks[callback]=_105[callback]; } }; AsynchRequest.prototype.getCallbacks=function(){ return this.m_callbacks; }; AsynchRequest.prototype.newRequest=function(){ var _106=this.construct(); _106.setHeaders(this.getHeaders()); if(this.getFormFields().exists("b_action")){ _106.addFormField("b_action",this.getFormField("b_action")); } if(this.getFormFields().exists("cv.catchLogOnFault")){ _106.addFormField("cv.catchLogOnFault",this.getFormField("cv.catchLogOnFault")); } _106.setPromptDialog(this.m_promptDialog); _106.setFaultDialog(this.m_faultDialog); _106.setLogonDialog(this.m_logonDialog); _106.m_asynch=this.m_asynch; if(this.m_callbacks.newRequest){ var _107=GUtil.generateCallback(this.m_callbacks.newRequest.method,[_106],this.m_callbacks.newRequest.object); _107(); } return _106; }; AsynchRequest.prototype.success=function(){ var _108=this.getAsynchStatus(); switch(_108){ case "stillWorking": case "working": this.working(); break; case "prompting": this.prompting(); break; case "fault": case "complete": case "conversationComplete": this.complete(); break; default: this.complete(); break; } }; AsynchRequest.prototype.setFaultDialog=function(_109){ if(_109 instanceof IFaultDialog){ if(typeof console!="undefined"){ console.log("AsynchRequest.prototype.setFaultDialog is deprecated"); } this.m_faultDialog=_109; }else{ if(_109&&typeof console!="undefined"){ console.log("The parameter faultDialog must be an instance of IFaultDialog"); } } }; AsynchRequest.prototype.setPromptDialog=function(_10a){ if(_10a instanceof IPromptDialog){ if(typeof console!="undefined"){ console.log("AsynchRequest.prototype.setPromptDialog is deprecated"); } this.m_promptDialog=_10a; }else{ if(_10a&&typeof console!="undefined"){ console.log("The parameter promptDialog must be an instance of IPromptDialog"); } } }; AsynchRequest.prototype.setLogonDialog=function(_10b){ if(_10b instanceof ILogOnDialog){ if(typeof console!="undefined"){ console.log("AsynchRequest.prototype.setLogonDialog is deprecated"); } this.m_logonDialog=_10b; }else{ if(_10b&&typeof console!="undefined"){ console.log("The parameter logOnDialog must be an instance of ILogOnDialog"); } } }; AsynchRequest.prototype.resubmitRequest=function(){ var _10c=this.newRequest(); _10c.m_formFields=this.m_formFields; _10c.sendRequest(); return _10c; }; AsynchRequest.prototype.sendRequest=function(){ var _10d=this; var _10e={"complete":{"object":_10d,"method":_10d.successHandler},"fault":{"object":_10d,"method":_10d.errorHandler}}; this.init("POST",this.m_gateway,"",this.m_asynch); this.executeCallback("preHttpRequest"); this.parent.setCallbacks.call(this,_10e); this.parent.sendRequest.call(this); }; AsynchRequest.prototype.errorHandler=function(){ this.executeCallback("postHttpRequest"); this.executeCallback("entryFault"); this.executeCallback("error"); }; AsynchRequest.prototype.successHandler=function(){ this.executeCallback("postHttpRequest"); if(typeof window["AsynchRequestPromptDialog"]!="undefined"&&window["AsynchRequestPromptDialog"]!=null){ window["AsynchRequestPromptDialog"].hide(); window["AsynchRequestPromptDialog"]=null; } if(this.getResponseHeader("Content-type").indexOf("text/html")!=-1){ var _10f=this.getResponseText(); if(_10f.indexOf("CAM_PASSPORT_ERROR")!=-1){ this.passportTimeout(); }else{ if((_10f.indexOf("http-equiv=\"refresh\"")!=-1)||(_10f.indexOf("http-equiv='refresh'")!=-1)){ this.passportTimeout(); }else{ this.executeCallback("entryFault"); if(!this.executeCallback("fault")){ var _110=window.open("","","height=400,width=500"); if(_110!=null){ _110.document.write(_10f); } } } } }else{ this.m_soapFault=this.constructFaultEnvelope(); if(this.m_soapFault!=null){ var _111=XMLHelper_FindChildByTagName(this.m_soapFault,"CAM",true); if(_111!=null&&XMLHelper_FindChildByTagName(_111,"promptInfo",true)){ this.passportTimeout(); }else{ this.fault(); } }else{ this.success(); } } }; AsynchRequest.prototype.cancel=function(){ this.parent.cancel.call(this); var _112=this.getFormField("m_tracking"); if(_112){ var _113=new XmlHttpObject(); _113.init("POST",this.m_gateway,"",false); if(this.getFormField("cv.outputKey")){ _113.addFormField("b_action","cvx.high"); _113.addFormField("cv.outputKey",this.getFormField("cv.outputKey")); _113.setHeaders(this.getHeaders()); }else{ _113.addFormField("b_action","cognosViewer"); } _113.addFormField("cv.responseFormat","successfulRequest"); _113.addFormField("ui.action","cancel"); _113.addFormField("m_tracking",_112); if(this.getFormField("cv.debugDirectory")){ _113.addFormField("cv.debugDirectory",this.getFormField("cv.debugDirectory")); } _113.sendRequest(); this.executeCallback("cancel"); } }; AsynchRequest.prototype.working=function(){ this.executeCallback("working"); var _114=this.newRequest(); _114.addFormField("m_tracking",this.getTracking()); if(this.getFormField("cv.outputKey")){ _114.addFormField("cv.outputKey",this.getFormField("cv.outputKey")); _114.addFormField("b_action","cvx.high"); } if(this.isRAPWaitTrue()){ _114.m_formFields=this.m_formFields; _114.addFormField("m_tracking",this.getTracking()); _114.addFormField("rapWait","true"); var _115=this.getRAPRequestCache(); if(_115!==null&&typeof _115!="undefined"){ _114.addFormField("rapRequestCache",_115); } var _116=this.getMainConversation(); if(_116){ _114.addFormField("mainConversation",_116); } var _117=this.getMainTracking(); if(_117){ _114.addFormField("mainTracking",_117); } }else{ _114.addFormField("ui.action","wait"); _114.addFormField("ui.primaryAction",this.getPrimaryAction()); _114.addFormField("cv.actionState",this.getActionState()); if(this.getFormField("ui.preserveRapTags")){ _114.addFormField("ui.preserveRapTags",this.getFormField("ui.preserveRapTags")); } if(this.getFormField("ui.backURL")){ _114.addFormField("ui.backURL",this.getFormField("ui.backURL")); } if(this.getFormField("errURL")){ _114.addFormField("errURL",this.getFormField("errURL")); } if(this.getFormField("cv.showFaultPage")){ _114.addFormField("cv.showFaultPage",this.getFormField("cv.showFaultPage")); } if(this.getFormField("cv.catchLogOnFault")){ _114.addFormField("cv.catchLogOnFault",this.getFormField("cv.catchLogOnFault")); } } if(this.getFormField("bux")){ _114.addFormField("bux",this.getFormField("bux")); } if(this.getFormField("cv.debugDirectory")){ _114.addFormField("cv.debugDirectory",this.getFormField("cv.debugDirectory")); } _114.sendRequest(); }; AsynchRequest.prototype.prompting=function(){ this.executeCallback("entryComplete"); if(!this.executeCallback("prompting")){ if(this.m_promptDialog!=null){ this.showPromptPage(); }else{ if(typeof console!="undefined"){ console.log("An unhandled prompt response was returned: %o",this.xmlHttp); } } } this.executeCallback("postEntryComplete"); }; AsynchRequest.prototype.promptPageOkCallback=function(_118){ var _119=this.newRequest(); _119.addFormField("ui.action","forward"); _119.addFormField("m_tracking",this.getTracking()); _119.addFormField("ui.conversation",this.getConversation()); _119.addFormField("ui.primaryAction",this.getPrimaryAction()); _119.addFormField("cv.actionState",this.getActionState()); for(var _11a in _118){ _119.addFormField(_11a,_118[_11a]); } _119.sendRequest(); window["AsynchRequestObject"]=null; }; AsynchRequest.prototype.promptPageCancelCallback=function(){ window["AsynchRequestPromptDialog"].hide(); this.complete(); }; AsynchRequest.prototype.showPromptPage=function(){ window["AsynchRequestObject"]=this; window["AsynchRequestPromptDialog"]=this.m_promptDialog; var _11b=this.m_promptDialog.getViewerId()==null?"":"?cv.id="+this.m_promptDialog.getViewerId(); window["AsynchRequestPromptDialog"].initialize(this.m_webContentRoot+"/rv/showStandalonePrompts.html"+_11b,400,400); window["AsynchRequestPromptDialog"].show(); }; AsynchRequest.prototype.passportTimeout=function(){ this.executeCallback("entryFault"); if(!this.executeCallback("passportTimeout")){ if(this.m_logonDialog!=null){ this.m_logonDialog.show(response.getSoapFault()); }else{ if(typeof console!="undefined"){ console.log("An unhandled passport timeout fault was returned: %o",this.getSoapFault()); } } } }; AsynchRequest.prototype.fault=function(){ this.executeCallback("entryFault"); if(!this.executeCallback("fault")){ if(this.m_faultDialog!=null){ this.m_faultDialog.show(this.getSoapFault()); }else{ if(typeof console!="undefined"){ console.log("An unhandled soap fault was returned: %o",this.getSoapFault()); } } } }; AsynchRequest.prototype.complete=function(){ this.executeCallback("entryComplete"); this.executeCallback("complete"); this.executeCallback("postEntryComplete"); }; AsynchRequest.prototype.getSoapFaultCode=function(){ var _11c=this.constructFaultEnvelope(); if(_11c){ var _11d=XMLHelper_FindChildByTagName(_11c,"faultcode",true); if(_11d!=null){ return XMLHelper_GetText(_11d); } } return null; }; AsynchRequest.prototype.getSoapFaultDetailMessageString=function(){ var _11e=this.constructFaultEnvelope(); if(_11e){ var _11f=XMLHelper_FindChildByTagName(_11e,"messageString",true); if(_11f!=null){ return XMLHelper_GetText(_11f); } } return null; }; function AsynchDATARequest(_120,_121){ AsynchDATARequest.baseConstructor.call(this,_120,_121); this.m_oResponseState=null; this.m_sResponseState=null; this.m_endOfStateIdx=-1; this.cStatePrefix=""; this.cStateSuffix=""; }; AsynchDATARequest.prototype=new AsynchRequest(); AsynchDATARequest.baseConstructor=AsynchRequest; AsynchDATARequest.prototype.getEndOfStateIdx=function(){ if(this.m_endOfStateIdx==-1){ var _122=this.getResponseText().substring(0,12); if(_122==this.cStatePrefix){ this.m_endOfStateIdx=this.getResponseText().indexOf(this.cStateSuffix); if(this.m_endOfStateIdx!=-1){ this.m_endOfStateIdx+=this.cStateSuffix.length; } } } return this.m_endOfStateIdx; }; AsynchDATARequest.prototype.getResponseStateText=function(){ if(!this.m_sResponseState){ this.getResponseState(); } return this.m_sResponseState; }; AsynchDATARequest.prototype.getResponseState=function(){ if(this.m_oResponseState==null&&this.getEndOfStateIdx()!=-1){ this.m_sResponseState=this.getResponseText().substring(this.cStatePrefix.length,this.getEndOfStateIdx()-this.cStateSuffix.length); if(this.m_sResponseState!=null){ this.m_sResponseState=xml_decode(this.m_sResponseState); this.m_oResponseState=eval("("+this.m_sResponseState+")"); } } return this.m_oResponseState; }; AsynchDATARequest.prototype.getAsynchStatus=function(){ if(this.getResponseState()!=null&&typeof this.getResponseState().m_sStatus!="undefined"){ return this.getResponseState().m_sStatus; } return "unknown"; }; AsynchDATARequest.prototype.getTracking=function(){ if(this.getResponseState()!=null&&typeof this.getResponseState().m_sTracking!="undefined"){ return this.getResponseState().m_sTracking; } return ""; }; AsynchDATARequest.prototype.getConversation=function(){ if(this.getResponseState()!=null&&typeof this.getResponseState().m_sConversation!="undefined"){ return this.getResponseState().m_sConversation; } return ""; }; AsynchDATARequest.prototype.getPrimaryAction=function(){ if(this.getResponseState()!=null&&typeof this.getResponseState().envParams!="undefined"&&this.getResponseState().envParams["ui.primaryAction"]!="undefined"){ return this.getResponseState().envParams["ui.primaryAction"]; } return ""; }; AsynchDATARequest.prototype.getActionState=function(){ if(this.getResponseState()!=null&&typeof this.getResponseState().m_sActionState!="undefined"){ return this.getResponseState().m_sActionState; } return ""; }; AsynchDATARequest.prototype.getResult=function(){ if(this.getEndOfStateIdx()!=-1){ return this.getResponseText().substring(this.getEndOfStateIdx(),this.getResponseText().length); } return ""; }; AsynchDATARequest.prototype.getDebugLogs=function(){ if(this.getResponseState()!=null&&typeof this.getResponseState().debugLogs!="undefined"){ return this.getResponseState().debugLogs; } return ""; }; AsynchDATARequest.prototype.getPromptHTMLFragment=function(){ return this.getResult(); }; AsynchDATARequest.prototype.constructFaultEnvelope=function(){ if(this.m_soapFault==null){ var _123=this.getResponseState(); if(_123!=null){ if(_123.m_sSoapFault){ var _124=_123.m_sSoapFault; this.m_soapFault=XMLBuilderLoadXMLFromString(_124); } } } return this.m_soapFault; }; AsynchDATARequest.prototype.construct=function(){ var _125=new AsynchDATARequest(this.m_gateway,this.m_webContentRoot); _125.setCallbacks(this.m_callbacks); if(this.getFormFields().exists("cv.responseFormat")){ _125.addFormField("cv.responseFormat",this.getFormField("cv.responseFormat")); }else{ _125.addFormField("cv.responseFormat","data"); } return _125; }; AsynchDATARequest.prototype.getEnvParam=function(_126){ var _127=this.getResponseState(); if(_127&&typeof _127.envParams!="undefined"&&typeof _127.envParams[_126]!="undefined"){ return _127.envParams[_126]; } return null; }; AsynchDATARequest.prototype.isRAPWaitTrue=function(){ var _128=this.getEnvParam("rapWait"); if(_128!=null){ return _128=="true"?true:false; } return false; }; AsynchDATARequest.prototype.getRAPRequestCache=function(){ return this.getEnvParam("rapRequestCache"); }; AsynchDATARequest.prototype.getMainConversation=function(){ return this.getEnvParam("mainConversation"); }; AsynchDATARequest.prototype.getMainTracking=function(){ return this.getEnvParam("mainTracking"); }; function AsynchJSONRequest(_129,_12a){ AsynchJSONRequest.baseConstructor.call(this,_129,_12a); this.m_jsonResponse=null; }; AsynchJSONRequest.prototype=new AsynchRequest(); AsynchJSONRequest.baseConstructor=AsynchRequest; AsynchJSONRequest.prototype.getJSONResponseObject=function(){ if(this.m_jsonResponse==null){ if(this.getResponseHeader("Content-type").indexOf("application/json")!=-1){ var text=this.getResponseText(); if(text!=null){ var _12c=this.removeInvalidCharacters(text); this.m_jsonResponse=eval("("+_12c+")"); } } } return this.m_jsonResponse; }; AsynchJSONRequest.prototype.getTracking=function(){ var _12d=this.getJSONResponseObject(); if(_12d){ return _12d.tracking; } return ""; }; AsynchJSONRequest.prototype.getConversation=function(){ var _12e=this.getJSONResponseObject(); if(_12e){ return _12e.conversation; } return ""; }; AsynchJSONRequest.prototype.getAsynchStatus=function(){ var _12f=this.getJSONResponseObject(); if(_12f){ return _12f.status; } return "unknown"; }; AsynchJSONRequest.prototype.getPrimaryAction=function(){ var _130=this.getJSONResponseObject(); if(_130){ return _130.primaryAction; } return ""; }; AsynchJSONRequest.prototype.getActionState=function(){ var _131=this.getJSONResponseObject(); if(_131){ return _131.actionState; } return ""; }; AsynchJSONRequest.prototype.getDebugLogs=function(){ var _132=this.getJSONResponseObject(); if(_132){ return _132.debugLogs; } return ""; }; AsynchJSONRequest.prototype.isRAPWaitTrue=function(){ var _133=this.getJSONResponseObject(); if(_133){ return (_133.rapWait==="true"); } return false; }; AsynchJSONRequest.prototype.getRAPRequestCache=function(){ var _134=this.getJSONResponseObject(); if(_134){ var _135=_134.rapRequestCache; if(_135!==null&&typeof _135!="undefined"){ return _135; } } return null; }; AsynchJSONRequest.prototype.getMainConversation=function(){ var _136=this.getJSONResponseObject(); if(_136){ return _136.mainConversation; } return null; }; AsynchJSONRequest.prototype.getMainTracking=function(){ var _137=this.getJSONResponseObject(); if(_137){ return _137.mainTracking; } return null; }; AsynchJSONRequest.prototype.getResult=function(){ var _138=this.getJSONResponseObject(); if(_138&&_138.json){ var _139=this.removeInvalidCharacters(_138.json); return eval("("+_139+")"); } return null; }; AsynchJSONRequest.prototype.removeInvalidCharacters=function(text){ if(text){ text=text.replace(/(\n|\r|\t)+/g,""); } return text; }; AsynchJSONRequest.prototype.getPromptHTMLFragment=function(){ var _13b=this.getJSONResponseObject(); if(_13b&&_13b.promptHTMLFragment){ return _13b.promptHTMLFragment; } return ""; }; AsynchJSONRequest.prototype.constructFaultEnvelope=function(){ if(this.m_soapFault==null){ var _13c=this.getJSONResponseObject(); if(_13c.status=="fault"){ this.m_soapFault=XMLBuilderLoadXMLFromString(_13c.fault); } } return this.m_soapFault; }; AsynchJSONRequest.prototype.construct=function(){ var _13d=new AsynchJSONRequest(this.m_gateway,this.m_webContentRoot); _13d.setCallbacks(this.m_callbacks); if(this.getFormFields().exists("cv.responseFormat")){ _13d.addFormField("cv.responseFormat",this.getFormField("cv.responseFormat")); }else{ _13d.addFormField("cv.responseFormat","asynchJSON"); } return _13d; }; function IFaultDialog(){ }; IFaultDialog.prototype.show=function(){ if(typeof console!="undefined"){ console.log("Required method IFaultDialog:show not implemented."); } }; IFaultDialog.prototype.handleUnknownHTMLResponse=function(){ if(typeof console!="undefined"){ console.log("Required method IFaultDialog:handlerUnknownHTMLResponse not implemented."); } }; function ILogOnDialog(){ }; ILogOnDialog.prototype.show=function(_13e){ if(typeof console!="undefined"){ console.log("Required method ILogOnDialog:show not implemented."); } }; ILogOnDialog.prototype.handleUnknownHTMLResponse=function(_13f){ if(typeof console!="undefined"){ console.log("Required method ILogOnDialog:handleUnknownHTMLResponse not implemented."); } }; function IPromptDialog(){ }; IPromptDialog.prototype.initialize=function(url,_141,_142){ if(typeof console!="undefined"){ console.log("Required method IModalDialog:initialize not implemented."); } }; IPromptDialog.prototype.show=function(){ if(typeof console!="undefined"){ console.log("Required method IModalDialog:show not implemented."); } }; IPromptDialog.prototype.hide=function(){ if(typeof console!="undefined"){ console.log("Required method IModalDialog:hide not implemented."); } }; function IRequestHandler(){ }; IRequestHandler.prototype.preHttpRequest=function(_143){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:preHttpRequest not implemented."); } }; IRequestHandler.prototype.postHttpRequest=function(_144){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:postHttpRequest not implemented."); } }; IRequestHandler.prototype.postComplete=function(_145){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:postComplete not implemented."); } }; IRequestHandler.prototype.onComplete=function(_146){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:onComplete not implemented."); } }; IRequestHandler.prototype.onPostEntryComplete=function(_147){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:onPostEntryComplete not implemented."); } }; IRequestHandler.prototype.onFault=function(_148){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:onFault not implemented."); } }; IRequestHandler.prototype.onPrompting=function(_149){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:onPrompting not implemented."); } }; IRequestHandler.prototype.onWorking=function(_14a){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:onWorking not implemented."); } }; IRequestHandler.prototype.setWorkingDialog=function(_14b){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:setWorkingDialog not implemented."); } }; IRequestHandler.prototype.setRequestIndicator=function(_14c){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:setExecutionCursor not implemented."); } }; function IRequestIndicator(){ }; IRequestIndicator.prototype.show=function(){ if(typeof console!="undefined"){ console.log("Required method IRequestIndicator:show not implemented."); } }; IRequestIndicator.prototype.hide=function(){ if(typeof console!="undefined"){ console.log("Required method IRequestIndicator:hide not implemented."); } }; function BaseRequestHandler(oCV){ if(oCV){ this.m_oCV=oCV; this.m_workingDialog=null; this.m_requestIndicator=null; this.m_faultDialog=null; this.m_logOnDialog=null; this.m_promptDialog=null; this.m_httpRequestConfig=this.m_oCV.getConfig()&&this.m_oCV.getConfig().getHttpRequestConfig()?this.m_oCV.getConfig().getHttpRequestConfig():null; } }; BaseRequestHandler.prototype=new IRequestHandler(); BaseRequestHandler.prototype.onError=function(_14e){ }; BaseRequestHandler.prototype.onComplete=function(){ }; BaseRequestHandler.prototype.onPrompting=function(){ }; BaseRequestHandler.prototype.resubmitInSafeMode=function(){ }; BaseRequestHandler.prototype.massageHtmlBeforeDisplayed=function(){ }; BaseRequestHandler.prototype.onPostEntryComplete=function(){ this._processDelayedLoadingQueue(); }; BaseRequestHandler.prototype.getViewer=function(){ return this.m_oCV; }; BaseRequestHandler.prototype.setDispatcherEntry=function(_14f){ this.m_oDispatcherEntry=_14f; }; BaseRequestHandler.prototype.getDispatcherEntry=function(){ return this.m_oDispatcherEntry; }; BaseRequestHandler.prototype.processInitialResponse=function(_150){ this.updateViewerState(_150); }; BaseRequestHandler.prototype.setLogOnDialog=function(_151){ if(_151==null){ this.m_logOnDialog=null; }else{ if(_151 instanceof ILogOnDialog){ this.m_logOnDialog=_151; }else{ if(_151&&typeof console!="undefined"){ console.log("The parameter logOnDialog must be an instance of ILogOnDialog"); } } } }; BaseRequestHandler.prototype.setWorkingDialog=function(_152){ if(_152==null){ this.m_workingDialog=null; }else{ if(this.m_httpRequestConfig&&this.m_httpRequestConfig.getWorkingDialog()){ this.m_workingDialog=this.m_httpRequestConfig.getWorkingDialog(); }else{ if(_152 instanceof IRequestIndicator){ this.m_workingDialog=_152; }else{ if(_152&&typeof console!="undefined"){ console.log("The parameter workingDialog must be an instance of IRequestIndicator"); } } } } }; BaseRequestHandler.prototype.getWorkingDialog=function(){ return this.m_workingDialog; }; BaseRequestHandler.prototype.setRequestIndicator=function(_153){ if(_153==null){ this.m_requestIndicator=null; }else{ if(this.m_httpRequestConfig&&this.m_httpRequestConfig.getRequestIndicator()){ this.m_requestIndicator=this.m_httpRequestConfig.getRequestIndicator(); }else{ if(_153 instanceof IRequestIndicator){ this.m_requestIndicator=_153; }else{ if(_153&&typeof console!="undefined"){ console.log("The parameter requestIndicator must be an instance of IRequestIndicator"); } } } } }; BaseRequestHandler.prototype.getRequestIndicator=function(){ return this.m_requestIndicator; }; BaseRequestHandler.prototype.setFaultDialog=function(_154){ if(_154==null){ this.m_faultDialog=null; }else{ if(_154 instanceof IFaultDialog){ this.m_faultDialog=_154; }else{ if(_154&&typeof console!="undefined"){ console.log("The parameter faultDialog must be an instance of IFaultDialog"); } } } }; BaseRequestHandler.prototype.setPromptDialog=function(_155){ if(_155==null){ this.m_promptDialog=null; }else{ if(_155 instanceof IPromptDialog){ this.m_promptDialog=_155; }else{ if(_155&&typeof console!="undefined"){ console.log("The parameter promptDialog must be an instance of IPromptDialog"); } } } }; BaseRequestHandler.prototype.preHttpRequest=function(_156){ if(_156&&typeof _156.getFormField=="function"){ if(_156.getFormField("ui.action")!="wait"&&_156.getFormField("rapWait")!="true"){ if(this.m_requestIndicator){ this.m_requestIndicator.show(); } } } }; BaseRequestHandler.prototype.postHttpRequest=function(_157){ if(_157&&typeof _157.getAsynchStatus=="function"){ var _158=_157.getAsynchStatus(); if(_158!="working"&&_158!="stillWorking"){ if(this.m_workingDialog){ this.m_workingDialog.hide(); } if(this.m_requestIndicator){ this.m_requestIndicator.hide(); } } }else{ if(this.m_workingDialog){ this.m_workingDialog.hide(); } if(this.m_requestIndicator){ this.m_requestIndicator.hide(); } } }; BaseRequestHandler.prototype.onFault=function(_159){ var oCV=this.getViewer(); if(this.m_workingDialog){ this.m_workingDialog.hide(); } if(this.m_requestIndicator){ this.m_requestIndicator.hide(); } if(typeof FaultDialog=="undefined"){ if(typeof console!="undefined"){ console.log("An unhandled fault was returned: %o",_159); } return; } if(!this.m_faultDialog){ this.m_faultDialog=new FaultDialog(this.getViewer()); } if(_159&&_159.getResponseHeader&&_159.getResponseHeader("Content-type").indexOf("text/html")!=-1){ this.m_faultDialog.handleUnknownHTMLResponse(_159.getResponseText()); }else{ if(_159&&_159.getSoapFault){ this.m_faultDialog.show(_159.getSoapFault()); }else{ if(oCV.getSoapFault()){ var _15b=XMLBuilderLoadXMLFromString(oCV.getSoapFault()); this.m_faultDialog.show(_15b); oCV.setSoapFault(""); }else{ if(typeof console!="undefined"){ console.log("An unhandled fault was returned: %o",_159); } } } } }; BaseRequestHandler.prototype.isAuthenticationFault=function(_15c){ var oCV=this.getViewer(); var _15e=null; if(_15c&&_15c.getSoapFault){ _15e=_15c.getSoapFault(); }else{ if(oCV.getSoapFault()){ _15e=XMLBuilderLoadXMLFromString(oCV.getSoapFault()); } } if(_15e!=null){ var _15f=XMLHelper_FindChildByTagName(_15e,"CAM",true); return (_15f!=null&&XMLHelper_FindChildByTagName(_15f,"promptInfo",true)!=null); } return false; }; BaseRequestHandler.prototype.onPassportTimeout=function(_160){ var oCV=this.getViewer(); if(this.m_workingDialog){ this.m_workingDialog.hide(); } if(this.m_requestIndicator){ this.m_requestIndicator.hide(); } if(!this.m_logOnDialog){ this.m_logOnDialog=new LogOnDialog(this.getViewer()); } if(_160&&_160.getResponseHeader&&_160.getResponseHeader("Content-type").indexOf("text/html")!=-1){ var _162=""; if(_160.getResponseText){ _162=_160.getResponseText(); } if((_162.indexOf("http-equiv=\"refresh\"")!=-1)||(_162.indexOf("http-equiv='refresh'")!=-1)){ this.m_logOnDialog.show(null); }else{ this.m_logOnDialog.handleUnknownHTMLResponse(_162); } }else{ if(_160&&_160.getSoapFault){ this.m_logOnDialog.show(_160.getSoapFault()); }else{ if(oCV.getSoapFault()){ var _163=XMLBuilderLoadXMLFromString(oCV.getSoapFault()); this.m_logOnDialog.show(_163); oCV.setSoapFault(""); }else{ if(typeof console!="undefined"){ console.log("BaseRequestHandler.prototype.onPassportTimeout: An unhandled authentication fault was returned: %o",_160); } } } } }; BaseRequestHandler.prototype.onWorking=function(_164){ if(this.m_workingDialog){ var _165=_164&&typeof _164.getAsynchStatus=="function"&&_164.getAsynchStatus()=="stillWorking"?true:false; if(!_165){ if(this.m_requestIndicator){ this.m_requestIndicator.hide(); } this.m_workingDialog.show(); } } }; BaseRequestHandler.prototype.onCancel=function(){ if(this.m_workingDialog){ this.m_workingDialog.hide(); } if(this.m_requestIndicator){ this.m_requestIndicator.hide(); } var oCV=this.getViewer(); oCV.gbPromptRequestSubmitted=false; this._processDelayedLoadingQueue(); }; BaseRequestHandler.prototype._processDelayedLoadingQueue=function(){ var oCV=this.getViewer(); if(oCV&&oCV.getViewerWidget()){ var _168=oCV.getViewerWidget(); if(_168.getLoadManager()){ _168.getLoadManager().processQueue(); } } }; BaseRequestHandler.prototype.onPrompting=function(_169){ var oCV=this.getViewer(); if(this.m_workingDialog){ this.m_workingDialog.hide(); } if(this.m_requestIndicator){ this.m_requestIndicator.hide(); } if(!this.m_promptDialog){ this.m_promptDialog=new PromptDialog(this.getViewer()); } window["AsynchRequestObject"]=_169; window["AsynchRequestPromptDialog"]=this.m_promptDialog; var _16b="?cv.id="+oCV.getId(); window["AsynchRequestPromptDialog"].initialize(oCV.getWebContentRoot()+"/rv/showStandalonePrompts.html"+_16b,400,400); window["AsynchRequestPromptDialog"].show(); }; BaseRequestHandler.prototype.processDATAReportResponse=function(_16c){ var oCV=this.getViewer(); if(!oCV||oCV.m_destroyed){ if(console){ console.warn("Tried to process a data response on an invalid CCognosViewer",oCV); } return; } var _16e=_16c.getResponseState(); if(!_16e){ this.resubmitInSafeMode(); } if(this.loadReportHTML(_16c.getResult())===false){ this.resubmitInSafeMode(); } this.updateViewerState(_16e); }; BaseRequestHandler.prototype.updateViewerState=function(_16f){ var oCV=this.getViewer(); applyJSONProperties(oCV,_16f); var _171=oCV.getStatus(); if(typeof oCV.envParams["ui.spec"]!="undefined"&&oCV.envParams["ui.spec"].indexOf("<")===0){ oCV.envParams["ui.spec"]=xml_decode(oCV.envParams["ui.spec"]); } if(_171!="fault"){ if(oCV.envParams["rapReportInfo"]){ this._processRapReportInfo(oCV); } if(typeof _16f.clientunencodedexecutionparameters!="undefined"){ var _172=document.getElementById("formWarpRequest"+oCV.getId()); if(_172!=null&&typeof _172["clientunencodedexecutionparameters"]!="undefined"){ _172["clientunencodedexecutionparameters"].value=_16f.clientunencodedexecutionparameters; } if(typeof document.forms["formWarpRequest"]!="undefined"&&typeof document.forms["formWarpRequest"]["clientunencodedexecutionparameters"]!="undefined"){ document.forms["formWarpRequest"]["clientunencodedexecutionparameters"].value=_16f.clientunencodedexecutionparameters; } } }else{ oCV.setTracking(""); } }; BaseRequestHandler.prototype._processRapReportInfo=function(oCV){ if(oCV.envParams["rapReportInfo"]){ var _174=eval("("+oCV.envParams["rapReportInfo"]+")"); if(typeof RAPReportInfo!="undefined"){ var _175=new RAPReportInfo(_174,oCV); oCV.setRAPReportInfo(_175); } } }; BaseRequestHandler.prototype.loadReportHTML=function(_176){ if(!_176){ return true; } var oCV=this.getViewer(); if(window.IBM&&window.IBM.perf){ window.IBM.perf.log("viewer_gotHtml",oCV); } if(oCV.m_undoStack.length>0){ oCV.m_undoStack[oCV.m_undoStack.length-1].m_bRefreshPage=true; } oCV.pageNavigationObserverArray=[]; oCV.m_flashChartsObjectIds=[]; var _178=_176.replace(/]*>/gi,"").replace(/<\/form[^>]*>/gi,""); oCV.m_sHTML=_178; oCV.setHasPrompts(false); var id=oCV.getId(); var _17a=document.getElementById("RVContent"+id); var _17b=document.getElementById("CVReport"+id); if(window.gScriptLoader){ var _17c=oCV.getViewerWidget()?true:false; var _17d=oCV.getViewerWidget()?document.getElementById("_"+oCV.getViewerWidget().iContext.widgetId+"_cv"):_17b; _178=window.gScriptLoader.loadCSS(_178,_17d,_17c,id); } if(oCV.sBrowser=="ie"){ _178=" "+_178; } _17b.innerHTML=_178; this.massageHtmlBeforeDisplayed(); if(window.gScriptLoader){ var _17e=GUtil.generateCallback(oCV.showLoadedContent,[_17a],oCV); oCV.m_resizeReady=false; if(!window.gScriptLoader.loadAll(_17b,_17e,id,true)){ if(window.gScriptLoader.containsAjaxWarnings()){ return false; } } }else{ _17a.style.display="block"; } var _17f=document.querySelectorAll("button"); var _180=_17f.length; for(var k=0;k<_180;k++){ var _182=_17f[k]; var id=_182.id; var _183=id.match(/reprompt/); if(_183){ var _184=_182.outerHTML; var _185=_184.match(/layoutname="\w+"/); if(_185!==null){ var _186=_185[0]; var _187=/".*"/; var _188=_187.exec(_186); if(oCV.getCurrentPromptControlFocus()==_188){ _182.focus(); oCV.setCurrentPromptControlFocus(null); _182=null; } }else{ oCV.setCurrentPromptControlFocus(null); _182=null; } } } oCV.updateOutputForA11ySupport(); this._clearFindState(); return true; }; BaseRequestHandler.prototype._clearFindState=function(){ var oCV=this.getViewer(); var _18a=oCV.getState()&&oCV.getState().getFindState()?oCV.getState().getFindState():null; if(_18a&&!_18a.findOnServerInProgress()){ oCV.getState().clearFindState(); } }; BaseRequestHandler.prototype.showReport=function(){ var oCV=this.getViewer(); var _18c=document.getElementById("CVReport"+oCV.getId()); if(_18c){ _18c.style.display=""; } }; BaseRequestHandler.prototype.postComplete=function(){ var oCV=this.getViewer(); if(oCV.shouldWriteNavLinks()){ oCV.writeNavLinks(oCV.getSecondaryRequests().join(" ")); } if(oCV.getStatus()==="complete"){ oCV.m_undoStack=[new CognosViewerSession(oCV)]; } }; BaseRequestHandler.prototype.onAsynchStatusUpdate=function(_18e){ if(this.m_httpRequestConfig){ var _18f=this.m_httpRequestConfig.getReportStatusCallback(_18e); if(_18f){ _18f(); } } }; BaseRequestHandler.prototype.addCallbackHooks=function(){ if(!this.m_httpRequestConfig){ return; } this._addCallback("complete","onComplete"); this._addCallback("working","onWorking"); this._addCallback("prompting","onPrompting"); }; BaseRequestHandler.prototype._addCallback=function(_190,_191){ var _192=_190; var _193=this[_191]; this[_191]=function(_194){ _193.apply(this,arguments); var _195=null; if(_194&&typeof _194.getAsynchStatus=="function"){ _195=_194.getAsynchStatus(); }else{ _195=_192=="complete"?this.getViewer().getStatus():_192; } if(_195=="stillWorking"){ return; } var _196=this.m_httpRequestConfig.getReportStatusCallback(_195); if(typeof _196=="function"){ setTimeout(_196,10); } }; }; function ViewerBaseWorkingDialog(_197){ if(!_197){ return; } this.setCognosViewer(_197); this.m_oCV=_197; this.m_sNamespace=_197.getId(); this.m_sGateway=_197.getGateway(); this.m_UIBlacklist=null; this.m_bUse=true; this.m_bCancelSubmitted=false; }; ViewerBaseWorkingDialog.prototype=new IRequestIndicator(); ViewerBaseWorkingDialog.prototype.setCognosViewer=function(oCV){ this.m_oCV=oCV; }; ViewerBaseWorkingDialog.prototype.getCognosViewer=function(){ return this.m_oCV; }; ViewerBaseWorkingDialog.prototype.getGateway=function(){ return this.m_sGateway; }; ViewerBaseWorkingDialog.prototype.getNamespace=function(){ return this.m_sNamespace; }; ViewerBaseWorkingDialog.prototype.cancelSubmitted=function(){ return this.m_bCancelSubmitted; }; ViewerBaseWorkingDialog.prototype.setCancelSubmitted=function(_199){ this.m_bCancelSubmitted=_199; }; ViewerBaseWorkingDialog.prototype.show=function(){ var _19a=document.getElementById(this.getContainerId()); if(_19a){ _19a.style.display="block"; this.enableCancelButton(); }else{ this.create(); } var _19b=document.getElementById("reportBlocker"+this.m_oCV.getId()); if(_19b){ _19b.style.display="block"; } }; ViewerBaseWorkingDialog.prototype.create=function(){ if(typeof document.body!="undefined"){ if(this.isModal()){ this.createModalWaitDialog(); }else{ this.createInlineWaitDialog(); } } }; ViewerBaseWorkingDialog.prototype.createContainer=function(_19c){ var _19d=document.createElement("div"); _19d.setAttribute("id",this.getContainerId()); _19d.className=_19c?"modalWaitPage":"inlineWaitPage"; return _19d; }; ViewerBaseWorkingDialog.prototype.createModalWaitDialog=function(){ this._createBlocker(); var _19e=this.createContainer(true); _19e.innerHTML=this.renderHTML(); _19e.style.zIndex="7002"; _19e.setAttribute("role","region"); _19e.setAttribute("aria-label",RV_RES.GOTO_WORKING); document.body.appendChild(_19e); var _19f=this.createModalIframeBackground(); document.body.appendChild(_19f); var _1a0=0; var _1a1=0; if(typeof window.innerHeight!="undefined"){ _1a0=Math.round((window.innerHeight/2)-(_19e.offsetHeight/2)); _1a1=Math.round((window.innerWidth/2)-(_19e.offsetWidth/2)); }else{ _1a0=Math.round((document.body.clientHeight/2)-(_19e.offsetHeight/2)); _1a1=Math.round((document.body.clientWidth/2)-(_19e.offsetWidth/2)); } _19e.style.bottom=_1a0+"px"; _19e.style.left=_1a1+"px"; _19f.style.left=_1a1-1+"px"; _19f.style.bottom=_1a0-1+"px"; _19f.style.width=_19e.offsetWidth+2+"px"; _19f.style.height=_19e.offsetHeight+2+"px"; }; ViewerBaseWorkingDialog.prototype._createBlocker=function(){ var _1a2=document.getElementById("reportBlocker"+this.m_oCV.getId()); if(_1a2){ return; } var _1a3=document.getElementById("mainViewerTable"+this.m_oCV.getId()); if(_1a3){ _1a2=document.createElement("div"); _1a3.parentNode.appendChild(_1a2); _1a2.id="reportBlocker"+this.m_oCV.getId(); _1a2.style.zIndex="6001"; _1a2.style.position="absolute"; _1a2.style.top="0px"; _1a2.style.left="0px"; _1a2.style.width="100%"; _1a2.style.height="100%"; _1a2.style.display="none"; _1a2.style.opacity="0"; _1a2.style.backgroundColor="#FFFFFF"; _1a2.style.filter="alpha(opacity:0)"; } }; ViewerBaseWorkingDialog.prototype.createInlineWaitDialog=function(){ var _1a4=this.m_oCV.getId(); var _1a5=document.getElementById("CVReport"+_1a4); if(_1a5){ var _1a6=this.createContainer(false); _1a6.innerHTML="
"+this.renderHTML()+"
"; _1a5.appendChild(_1a6); } }; ViewerBaseWorkingDialog.prototype.createModalIframeBackground=function(){ var _1a7=document.createElement("iframe"); var _1a8=".."; var oCV=this.getCognosViewer(); if(oCV!==null){ _1a8=oCV.getWebContentRoot(); } _1a7.setAttribute("id",this.getContainerId()+"Iframe"); _1a7.setAttribute("title","Empty iframe"); _1a7.setAttribute("src",_1a8+"/common/images/spacer.gif"); _1a7.setAttribute("scrolling","no"); _1a7.setAttribute("frameborder","0"); _1a7.style.position="absolute"; _1a7.style.zIndex="6002"; _1a7.style.display="block"; return _1a7; }; ViewerBaseWorkingDialog.prototype.updateCoords=function(_1aa,_1ab){ if(this.m_container!==null&&m_iframeBackground!==null){ var _1ac=0; var _1ad=0; if(typeof window.innerHeight!="undefined"){ _1ac=Math.round((window.innerHeight/2)-(_1aa.offsetHeight/2)); _1ad=Math.round((window.innerWidth/2)-(_1aa.offsetWidth/2)); }else{ _1ac=Math.round((document.body.clientHeight/2)-(_1aa.offsetHeight/2)); _1ad=Math.round((document.body.clientWidth/2)-(_1aa.offsetWidth/2)); } _1aa.style.bottom=_1ac+"px"; _1aa.style.left=_1ad+"px"; _1ab.style.left=_1aa.style.left; _1ab.style.bottom=_1aa.style.bottom; _1ab.style.width=_1aa.offsetWidth+"px"; _1ab.style.height=_1aa.offsetHeight+"px"; } }; ViewerBaseWorkingDialog.prototype.hide=function(){ var _1ae=document.getElementById(this.getContainerId()); if(_1ae){ _1ae.parentNode.removeChild(_1ae); } var _1af=document.getElementById(this.getContainerId()+"Iframe"); if(_1af){ _1af.parentNode.removeChild(_1af); } var _1b0=document.getElementById("reportBlocker"+this.m_oCV.getId()); if(_1b0){ _1b0.parentNode.removeChild(_1b0); } }; ViewerBaseWorkingDialog.prototype.isModal=function(){ var _1b1=this.m_oCV.getId(); var _1b2=document.getElementById("CVReport"+_1b1); var _1b3=true; if(_1b2&&_1b2.innerHTML===""){ _1b3=false; } return _1b3; }; ViewerBaseWorkingDialog.prototype.disableCancelButton=function(_1b4){ }; ViewerBaseWorkingDialog.prototype.enableCancelButton=function(){ }; function FaultDialog(oCV){ this.m_oCV=oCV; }; FaultDialog.prototype=new IFaultDialog(); FaultDialog.prototype.show=function(_1b6){ if(typeof console!="undefined"){ console.log("FaultDialog - an unhandled soap fault was returned: %o",_1b6); } }; FaultDialog.prototype.handleUnknownHTMLResponse=function(_1b7){ this.m_oCV.setTracking(""); this.m_oCV.setConversation(""); if(_1b7){ if(this.m_oCV.envParams["useAlternateErrorCodeRendering"]){ var _1b8=document.getElementsByTagName("head")[0]; var _1b9=_1b7.match(/]*>([\s\S]*)<\/body>/im)[1]; var _1ba=/]*>([\s\S]*?)<\/script>/igm; var _1bb=_1ba.exec(_1b7); while(_1bb!=null){ var _1bc=document.createElement("script"); _1bc.type="text/javascript"; var _1bd=_1bb[0].match(/src="([\s\S]*?)"/i); if(_1bd==null){ _1bc.text=_1bb[1]; }else{ _1bc.src=_1bd[1]; } _1b8.appendChild(_1bc); _1bb=_1ba.exec(_1b7); } document.body.innerHTML=_1b9; }else{ document.write(_1b7); } } }; function LogOnDialog(oCV){ this.m_oCV=oCV; }; LogOnDialog.prototype=new ILogOnDialog(); LogOnDialog.prototype.handleUnknownHTMLResponse=function(_1bf){ if(_1bf){ document.write(_1bf); } }; LogOnDialog.prototype.show=function(_1c0){ launchLogOnDialog(this.m_oCV.getId(),_1c0); }; LogOnDialog.prototype.hide=function(){ }; function PromptDialog(oCV){ this.m_oCV=oCV; this.m_dialogImpl=null; }; PromptDialog.prototype=new IPromptDialog(); PromptDialog.prototype.initialize=function(url,_1c3,_1c4){ this.m_dialogImpl=new CModal("","",document.body,null,null,_1c3,_1c4,true,true,false,true,this.m_oCV.getWebContentRoot()); var _1c5=document.getElementById(CMODAL_CONTENT_ID); _1c5.src=url; }; PromptDialog.prototype.show=function(){ this.m_dialogImpl.show(); }; PromptDialog.prototype.hide=function(){ this.m_dialogImpl.hide(); destroyCModal(); }; function WorkingDialog(_1c6){ if(_1c6){ this.m_bSimpleWorkingDialog=false; this.m_bShowCancelButton=(_1c6.getAdvancedServerProperty("VIEWER_JS_HIDE_CANCEL_BUTTON")=="true")?false:true; WorkingDialog.baseConstructor.call(this,_1c6); this.m_secondaryRequests=_1c6.getSecondaryRequests(); } }; WorkingDialog.prototype=new ViewerBaseWorkingDialog(); WorkingDialog.baseConstructor=ViewerBaseWorkingDialog; WorkingDialog.prototype.setSecondaryRequests=function(_1c7){ this.m_secondaryRequests=_1c7; }; WorkingDialog.prototype._getSecondaryRequests=function(){ return this.m_secondaryRequests; }; WorkingDialog.prototype.getIsSavedReport=function(){ return this.getCognosViewer().bIsSavedReport; }; WorkingDialog.prototype.setSimpleWorkingDialogFlag=function(flag){ this.m_bSimpleWorkingDialog=flag; }; WorkingDialog.prototype.getSimpleWorkingDialogFlag=function(){ return this.m_bSimpleWorkingDialog; }; WorkingDialog.prototype.showDeliveryOptions=function(_1c9){ var _1ca=this.getNamespace(); var _1cb=document.getElementById("DeliveryOptionsVisible"+_1ca); if(_1cb){ _1cb.style.display=(_1c9===false?"none":"block"); if(_1c9){ var _1cc=_1cb.getElementsByTagName("a"); for(var i=_1cc.length;i>0;i--){ if(_1cc[i]&&_1cc[i].getAttribute("tabIndex")=="0"){ _1cc[i].focus(); } } } } _1cb=document.getElementById("OptionsLinkSelected"+_1ca); if(_1cb){ _1cb.style.display=(_1c9===false?"none":"block"); } _1cb=document.getElementById("OptionsLinkUnselected"+_1ca); if(_1cb){ _1cb.style.display=(_1c9===false?"block":"none"); } }; WorkingDialog.prototype.renderHTML=function(){ var _1ce=this.getNamespace(); var _1cf=_1ce+"_workingMsg "+_1ce+"_workingMsg2"; var html=""; html+=(""+""+""+"
"+"
"); html+=this.renderFirstInnerTable(); html+=this.renderSecondInnerTable(); html+=("
"+"
"); return html; }; WorkingDialog.prototype.renderFirstInnerTable=function(){ var _1d1=this.getSimpleWorkingDialogFlag(); var _1d2=_1d1?RV_RES.GOTO_WORKING:RV_RES.RV_RUNNING; var _1d3=this.m_sNamespace; var _1d4=""+""+""; _1d4+=""; _1d4+="
"; var _1d5=this.getCognosViewer().getSkin()+"/branding/"; _1d4+=" "; _1d4+=""; _1d4+=_1d2; _1d4+=""; _1d4+="

"; var _1d6=this.getCognosViewer().envParams["cv.responseFormat"]; if(_1d1||this.isUIBlacklisted("RV_TOOLBAR_BUTTONS")||!this.deliverySectionIsNeeded()||(_1d6&&("qs"===_1d6||"fragment"===_1d6))){ _1d4+=RV_RES.RV_PLEASE_WAIT; }else{ var _1d7=this.canShowDeliveryOptions(); if(_1d7){ _1d4+=this.optionLinkSelectedDiv(); _1d4+=this.optionLinkUnselectedDiv(); }else{ _1d4+=RV_RES.RV_PLEASE_WAIT; } } _1d4+="
 
"; return _1d4; }; WorkingDialog.prototype.optionLinkSelectedDiv=function(){ var _1d8=""; _1d8+="
"; _1d8+=RV_RES.RV_BUSY_OPTIONS_SELECTED; _1d8+="
"; return _1d8; }; WorkingDialog.prototype.optionLinkUnselectedDiv=function(){ var _1d9=""; var _1da=this.getNamespace(); var _1db="window.oCV"+_1da+".getWorkingDialog()"; _1d9+="
"; _1d9+=""; _1d9+=RV_RES.RV_BUSY_OPTIONS_UNSELECTED; _1d9+="
"; _1d9+=""; _1d9+=RV_RES.RV_BUSY_OPTIONS_LINK; _1d9+="
"; return _1d9; }; WorkingDialog.prototype.canShowDeliveryOptions=function(){ var _1dc=this.getCognosViewer().envParams["ui.primaryAction"]; if("saveAs"!==_1dc&&"email"!==_1dc&&this.getIsSavedReport()){ return true; } return false; }; WorkingDialog.prototype.isUIBlacklisted=function(item){ var _1de=this.getUIBlacklist(); for(var _1df in _1de){ if(_1de[_1df]===item){ return true; } } return false; }; WorkingDialog.prototype.getUIBlacklist=function(){ if(!this.m_UIBlacklist&&this.getCognosViewer().UIBlacklist){ this.m_UIBlacklist=this.getCognosViewer().UIBlacklist.split(" "); } return this.m_UIBlacklist; }; WorkingDialog.prototype.deliverySectionIsNeeded=function(){ return !this._isSaveBlackListed()||!this._isSaveAsBlackListed()||!this._isEmailBlackListed(); }; WorkingDialog.prototype._isSaveBlackListed=function(){ return this.isUIBlacklisted("RV_TOOLBAR_BUTTONS_SAVE")||this.isUIBlacklisted("RV_WORKING_DIALOG_SAVE")||!this._hasSecondaryRequest("save"); }; WorkingDialog.prototype._isSaveAsBlackListed=function(){ return this.isUIBlacklisted("RV_TOOLBAR_BUTTONS_SAVEAS")||this.isUIBlacklisted("RV_WORKING_DIALOG_SAVEAS")||!this._hasSecondaryRequest("saveAs"); }; WorkingDialog.prototype._isEmailBlackListed=function(){ return this.isUIBlacklisted("RV_TOOLBAR_BUTTONS_SEND")||this.isUIBlacklisted("RV_WORKING_DIALOG_SEND")||!this._hasSecondaryRequest("email"); }; WorkingDialog.prototype.showCancelButton=function(){ return this.m_bShowCancelButton; }; WorkingDialog.prototype._hasSecondaryRequest=function(_1e0){ var _1e1=this._getSecondaryRequests(); if(_1e1){ var _1e2=_1e1.length; for(var i=0;i<_1e2;i++){ if(_1e1[i]==_1e0){ return true; } } } return false; }; WorkingDialog.prototype.renderSecondInnerTable=function(){ var _1e4=""; var _1e5=this.getCognosViewer().getWebContentRoot(); _1e4+=""; _1e4+=""; _1e4+=" "; _1e4+=" "; _1e4+=" "; _1e4+="
"; _1e4+=""; var _1e6=this.canShowDeliveryOptions(); if(_1e6&&this.deliverySectionIsNeeded()){ if(!this._isSaveBlackListed()){ _1e4+=this.addDeliverOption("/rv/images/action_save_report_output.gif",RV_RES.RV_SAVE_REPORT,"SaveReport(true);"); } if("reportView"!==this.getCognosViewer().envParams["ui.objectClass"]&&!this._isSaveAsBlackListed()){ _1e4+=this.addDeliverOption("/rv/images/action_save_report_view.gif",RV_RES.RV_SAVE_AS_REPORT_VIEW,"SaveAsReportView(true);"); } if(!this.isUIBlacklisted("CC_RUN_OPTIONS_EMAIL_ATTACHMENT")&&!this._isEmailBlackListed()){ _1e4+=this.addDeliverOption("/rv/images/action_send_report.gif",RV_RES.RV_EMAIL_REPORT,"SendReport(true);"); } } _1e4+="
"; if(this.showCancelButton()){ _1e4+=this.addCancelButton(); } _1e4+="
"; return _1e4; }; WorkingDialog.prototype.addDeliverOption=function(_1e7,_1e8,_1e9){ var _1ea=""; var _1eb=this.getCognosViewer().getWebContentRoot(); var _1ec="javascript: window.oCV"+this.getNamespace()+".getRV()."; var _1ed=_1ec+_1e9; _1ea+=" "; _1ea+=" "; _1ea+="\" "; _1ea+=" "; _1ea+=" "; _1ea+=(_1e8+""); return _1ea; }; WorkingDialog.prototype.addCancelButton=function(){ var _1ee=""; var _1ef=this.getCognosViewer().getWebContentRoot(); _1ee+=" "; _1ee+=" "; _1ee+="
"; _1ee+=" "; _1ee+=" "; _1ee+="
"; _1ee+=RV_RES.CANCEL; _1ee+=" "; _1ee+="
\"\"
"; return _1ee; }; WorkingDialog.prototype.disableCancelButton=function(_1f1){ this.cancelButtonDisabled=true; var _1f2=document.getElementById("cvWorkingDialog"+this.getNamespace()); if(_1f2){ _1f2.style.cursor="default"; _1f2.className="commandButtonOver"; _1f2.removeAttribute("onmouseover"); _1f2.removeAttribute("onmouseout"); } if(_1f1){ _1f1.removeAttribute("href"); _1f1.removeAttribute("onclick"); _1f1.style.cursor="default"; } }; WorkingDialog.prototype.enableCancelButton=function(){ if(this.cancelButtonDisabled){ var _1f3=document.getElementById("cancelButtonContainer"+this.getNamespace()); if(_1f3){ _1f3.innerHTML=this.addCancelButton(); } this.cancelButtonDisabled=false; } }; WorkingDialog.prototype.getContainerId=function(){ return "CVWait"+this.getNamespace(); }; function RequestExecutedIndicator(_1f4){ if(_1f4){ RequestExecutedIndicator.baseConstructor.call(this,_1f4); } }; RequestExecutedIndicator.baseConstructor=WorkingDialog; RequestExecutedIndicator.prototype=new WorkingDialog(); RequestExecutedIndicator.prototype.renderHTML=function(){ var _1f5=""; _1f5+="
"; _1f5+="
"; _1f5+=""; _1f5+="
"; _1f5+="\""+RV_RES.GOTO_WORKING+"\""; _1f5+=""; _1f5+=RV_RES.GOTO_WORKING; _1f5+="
"; _1f5+=RV_RES.RV_PLEASE_WAIT; _1f5+="
"; return _1f5; }; RequestExecutedIndicator.prototype.getContainerId=function(){ return "CVWaitindicator"+this.getNamespace(); }; function RequestHandler(oCV){ if(oCV){ RequestHandler.baseConstructor.call(this,oCV); } }; RequestHandler.prototype=new BaseRequestHandler(); RequestHandler.baseConstructor=BaseRequestHandler; RequestHandler.prototype.parent=BaseRequestHandler.prototype; RequestHandler.prototype.resubmitInSafeMode=function(){ this.getViewer().resubmitInSafeMode(this.getDispatcherEntry()); }; RequestHandler.prototype.onComplete=function(_1f7){ this.parent.onComplete.call(this,_1f7); this.processDATAReportResponse(_1f7); this.postComplete(); }; RequestHandler.prototype.processInitialResponse=function(_1f8){ this.parent.processInitialResponse.call(this,_1f8); var oCV=this.getViewer(); var _1fa=oCV.getStatus(); oCV.setMaxContentSize(); var _1fb=(oCV.isWorking(_1fa)||_1fa=="default"); if(_1fb){ if(oCV.getWorkingDialog()){ oCV.getWorkingDialog().show(); } setTimeout(getCognosViewerObjectRefAsString(oCV.getId())+".executeCallback(\"wait\");",10); }else{ if(_1fa=="fault"){ oCV.setSoapFault(_1f8.m_sSoapFault); oCV.executeCallback("fault"); }else{ if(_1f8.status=="cancel"){ oCV.executeCallback("cancel"); }else{ oCV.updateSkipToReportLink(); if(oCV.envParams&&oCV.envParams["pinFreezeInfo"]){ var _1fc=oCV.getPinFreezeManager(); _1fc.fromJSONString(oCV.envParams["pinFreezeInfo"]); delete oCV.envParams["pinFreezeInfo"]; } if(_1fa!="prompting"||!oCV.executeCallback("prompt")){ this.postComplete(); }else{ oCV.updateSkipToNavigationLink(true); } } } } this.showReport(); this.getViewer().renderTabs(); this.onAsynchStatusUpdate(_1fa); }; RequestHandler.prototype.postComplete=function(){ this.parent.postComplete.call(this); var oCV=this.getViewer(); var _1fe=document.getElementById("RVContent"+oCV.getId()); if(_1fe){ _1fe.scrollTop=0; } oCV.updateSkipToReportLink(); if(oCV.rvMainWnd){ oCV.updateLayout(oCV.getStatus()); if(!oCV.getUIConfig()||oCV.getUIConfig().getShowToolbar()){ var _1ff=oCV.rvMainWnd.getToolbar(); if(_1ff){ oCV.rvMainWnd.updateToolbar(oCV.outputFormat); _1ff.draw(); } } if(!oCV.getUIConfig()||oCV.getUIConfig().getShowBanner()){ var _200=oCV.rvMainWnd.getBannerToolbar(); if(_200){ _200.draw(); } } } if(oCV.getBrowser()=="moz"){ if(_1fe){ if(oCV.outputFormat=="XML"&&oCV.getStatus()!="prompting"){ _1fe.style.overflow="hidden"; }else{ _1fe.style.overflow="auto"; } } } oCV.gbPromptRequestSubmitted=false; this.showReport(); if(oCV.getPinFreezeManager()&&oCV.getPinFreezeManager().hasFrozenContainers()){ var _201=document.getElementById("CVReport"+oCV.getId()); if(_201){ setTimeout(function(){ oCV.getPinFreezeManager().renderReportWithFrozenContainers(_201); if(isIE()){ oCV.repaintDiv(_1fe); } },1); } } oCV.setMaxContentSize(); oCV.executeCallback("done"); oCV.doneLoading(); }; function ActionFormFields(_202){ this.m_dispatcherEntry=_202; this.m_oCV=_202.getViewer(); }; ActionFormFields.prototype.addFormFields=function(){ var _203=this.m_dispatcherEntry; var _204=_203.getAction(); _204.preProcess(); _203.addFormField("ui.action","modifyReport"); if(this.m_oCV.getModelPath()!==""){ _203.addFormField("modelPath",this.m_oCV.getModelPath()); if(typeof this.m_oCV.envParams["metaDataModelModificationTime"]!="undefined"){ _203.addFormField("metaDataModelModificationTime",this.m_oCV.envParams["metaDataModelModificationTime"]); } } if(_204.doAddActionContext()===true){ var _205=_204.addActionContext(); _203.addFormField("cv.actionContext",_205); if(window.gViewerLogger){ window.gViewerLogger.log("Action context",_205,"xml"); } } var _206=this.m_oCV.envParams["bux"]=="true"; if(_206){ _203.addFormField("cv.showFaultPage","false"); }else{ _203.addFormField("cv.showFaultPage","true"); } _203.addFormField("ui.object",this.m_oCV.envParams["ui.object"]); _203.addDefinedFormField("ui.spec",this.m_oCV.envParams["ui.spec"]); _203.addDefinedFormField("modelPath",this.m_oCV.envParams["modelPath"]); _203.addDefinedFormField("packageBase",this.m_oCV.envParams["packageBase"]); _203.addDefinedFormField("rap.state",this.m_oCV.envParams["rap.state"]); _203.addDefinedFormField("rap.reportInfo",this.m_oCV.envParams["rapReportInfo"]); _203.addDefinedFormField("ui.primaryAction",this.m_oCV.envParams["ui.primaryAction"]); _203.addNonNullFormField("cv.debugDirectory",this.m_oCV.envParams["cv.debugDirectory"]); _203.addNonNullFormField("ui.objectClass",this.m_oCV.envParams["ui.objectClass"]); _203.addNonNullFormField("bux",this.m_oCV.envParams["bux"]); _203.addNonNullFormField("baseReportModificationTime",this.m_oCV.envParams["baseReportModificationTime"]); _203.addNonNullFormField("originalReport",this.m_oCV.envParams["originalReport"]); var _207=this.m_oCV.getFlashChartOption(); if(_207!=null){ _203.addFormField("savedFlashChartOption",_207); if(_207&&_204!=null&&typeof (_204.m_requestParams)!="undefined"&&typeof (_204.m_requestParams.targetType)!="undefined"){ var _208=false; var _209=null; if(typeof (_204.m_requestParams.targetType.targetType)!="undefined"){ _209=_204.m_requestParams.targetType.targetType; }else{ _209=_204.m_requestParams.targetType; } if(_209.match("v2_")!=null||_209.match("_v2")!=null){ _208=true; }else{ var _20a=this.m_oCV.getRAPReportInfo(); var _20b=_204.getSelectedReportInfo(); if(_20a&&_20b){ var _20c=_20a.getDisplayTypes(_20b.container); if(_20c.match("v2_")!=null||_20c.match("_v2")!=null){ _208=true; } } } _203.addFormField("hasAVSChart",_208); }else{ _203.addFormField("hasAVSChart",this.m_oCV.hasAVSChart()); } } var sEP=this.m_oCV.getExecutionParameters(); if(sEP){ _203.addFormField("executionParameters",encodeURIComponent(sEP)); } _203.addFormField("ui.conversation",encodeURIComponent(this.m_oCV.getConversation())); _203.addFormField("m_tracking",encodeURIComponent(this.m_oCV.getTracking())); var sCAF=this.m_oCV.getCAFContext(); if(sCAF){ _203.addFormField("ui.cafcontextid",sCAF); } if(_204.forceRunSpecRequest()){ _203.addFormField("widget.forceRunSpec","true"); } }; function ViewerDispatcher(){ this.m_activeRequest=null; this.m_requestQueue=[]; this.m_bUsePageRequest=false; }; ViewerDispatcher.prototype.getActiveRequest=function(){ return this.m_activeRequest; }; ViewerDispatcher.prototype.setUsePageRequest=function(_20f){ this.m_bUsePageRequest=_20f; }; ViewerDispatcher.prototype.getUsePageRequest=function(){ return this.m_bUsePageRequest; }; ViewerDispatcher.prototype.dispatchRequest=function(_210){ if(this.m_activeRequest==null){ this.startRequest(_210); }else{ if(_210.canBeQueued()==true){ this.m_requestQueue.push(_210); }else{ if(window.cognosViewerDebug&&console&&console.warn){ console.warn("Warning! Dropped a dispatcher entry!"); } } } }; ViewerDispatcher.prototype.startRequest=function(_211){ this.m_activeRequest=_211; if(_211!=null){ _211.setUsePageRequest(this.m_bUsePageRequest); _211.sendRequest(); } }; ViewerDispatcher.prototype.cancelRequest=function(key){ for(var i=0;i0){ _216=this.m_requestQueue.shift(); if(_216.getKey()!=null){ while(this.m_requestQueue.length>0&&this.m_requestQueue[0].getKey()==_216.getKey()){ _216=this.m_requestQueue.shift(); } } } return _216; }; ViewerDispatcher.prototype.queueIsEmpty=function(){ return (this.m_requestQueue.length==0); }; function DispatcherEntry(oCV){ this.m_oCV=oCV; this.m_requestKey=null; this.m_canBeQueued=false; this.m_originalFormFields=null; this.m_bUsePageRequest=false; if(oCV){ if(!this.m_request){ this.m_request=new XmlHttpObject(); this.m_request.init("POST",this.m_oCV.getGateway(),"",true); } if(!this.m_requestHandler){ this.setRequestHandler(new BaseRequestHandler(oCV)); } DispatcherEntry.prototype.setDefaultFormFields.call(this); this.setCallbacks({"entryComplete":{"object":this,"method":this.onEntryComplete},"entryFault":{"object":this,"method":this.onEntryFault},"newRequest":{"object":this,"method":this.onNewRequest},"fault":{"object":this,"method":this.onFault},"error":{"object":this,"method":this.onError},"passportTimeout":{"object":this,"method":this.onPassportTimeout},"working":{"object":this,"method":this.onWorking},"prompting":{"object":this,"method":this.onPrompting},"preHttpRequest":{"object":this,"method":this.onPreHttpRequest},"postHttpRequest":{"object":this,"method":this.onPostHttpRequest},"postEntryComplete":{"object":this,"method":this.onPostEntryComplete}}); } }; DispatcherEntry.prototype.setHeaders=function(_218){ this.m_request.setHeaders(_218); }; DispatcherEntry.prototype.getHeaders=function(){ return this.m_request.getHeaders(); }; DispatcherEntry.prototype.setOriginalFormFields=function(_219){ this.m_originalFormFields=_219; }; DispatcherEntry.prototype.getOriginalFormFields=function(){ return this.m_originalFormFields; }; DispatcherEntry.prototype.setRequestHandler=function(_21a){ _21a.addCallbackHooks(); this.m_requestHandler=_21a; }; DispatcherEntry.prototype.getRequestHandler=function(){ return this.m_requestHandler; }; DispatcherEntry.prototype.setWorkingDialog=function(_21b){ if(this.getRequestHandler()){ this.m_requestHandler.setWorkingDialog(_21b); } }; DispatcherEntry.prototype.setRequestIndicator=function(_21c){ if(this.getRequestHandler()){ this.getRequestHandler().setRequestIndicator(_21c); } }; DispatcherEntry.prototype.forceSynchronous=function(){ this.getRequest().forceSynchronous(); }; DispatcherEntry.prototype.setUsePageRequest=function(_21d){ this.m_bUsePageRequest=_21d; }; DispatcherEntry.prototype.getUsePageRequest=function(){ return this.m_bUsePageRequest; }; DispatcherEntry.prototype.setDefaultFormFields=function(){ var _21e=this.getViewer().envParams; this.addFormField("b_action","cognosViewer"); this.addFormField("cv.catchLogOnFault","true"); this.addDefinedNonNullFormField("protectParameters",_21e["protectParameters"]); this.addDefinedNonNullFormField("ui.routingServerGroup",_21e["ui.routingServerGroup"]); this.addDefinedNonNullFormField("cv.debugDirectory",_21e["cv.debugDirectory"]); this.addDefinedNonNullFormField("cv.showFaultPage",_21e["cv.showFaultPage"]); this.addDefinedNonNullFormField("cv.useRAPDrill",_21e["cv.useRAPDrill"]); this.addDefinedNonNullFormField("container",_21e["container"]); this.addNonEmptyStringFormField("cv.objectPermissions",_21e["cv.objectPermissions"]); }; DispatcherEntry.prototype.getViewer=function(){ return this.m_oCV; }; DispatcherEntry.prototype.prepareRequest=function(){ }; DispatcherEntry.addWidgetInfoToFormFields=function(_21f,_220){ if(_21f){ var _221=_21f.getBUXRTStateInfoMap(); if(_221){ _220.addFormField("cv.buxRTStateInfo",_221); } var _222=_21f.getDisplayName(); if(_222&&_222.length>0){ _220.addFormField("displayTitle",_222); } } }; DispatcherEntry.prototype.canBeQueued=function(){ return this.m_canBeQueued; }; DispatcherEntry.prototype.setCanBeQueued=function(_223){ this.m_canBeQueued=_223; }; DispatcherEntry.prototype.getKey=function(){ return this.m_requestKey; }; DispatcherEntry.prototype.setKey=function(key){ this.m_requestKey=key; }; DispatcherEntry.prototype.setRequest=function(_225){ this.m_request=_225; }; DispatcherEntry.prototype.getRequest=function(){ return this.m_request; }; DispatcherEntry.prototype.setCallbacks=function(_226){ this.getRequest().setCallbacks(_226); }; DispatcherEntry.prototype.getCallbacks=function(){ return this.getRequest().getCallbacks(); }; DispatcherEntry.prototype.sendRequest=function(){ this.prepareRequest(); var _227=this.getRequest().getFormFields(); var _228=_227.keys(); if(!this.m_originalFormFields){ this.m_originalFormFields=new CDictionary(); for(var _229=0;_229<_228.length;_229++){ this.m_originalFormFields.add(_228[_229],_227.get(_228[_229])); } } this.getRequest().sendRequest(); }; DispatcherEntry.prototype.onNewRequest=function(_22a){ this.setRequest(_22a); }; DispatcherEntry.prototype.retryRequest=function(){ var oCV=this.getViewer(); oCV.setRetryDispatcherEntry(null); var _22c=this.getRequest().newRequest(); _22c.setHeaders(null); this.setRequest(_22c); var _22d=this.m_originalFormFields.keys(); for(var _22e=0;_22e<_22d.length;_22e++){ var _22f=_22d[_22e]; var _230=this.m_originalFormFields.get(_22f); if(_22f=="cv.responseFormat"&&_230=="iWidget"){ this.addFormField("cv.responseFormat","data"); }else{ if(_22f=="ui.action"&&_230=="wait"){ this.addFormField("ui.action",this.m_originalFormFields.get("ui.primaryAction")); }else{ if(_22f!="m_tracking"&&_22f!="cv.outputKey"){ this.addFormField(_22f,_230); } } } } this.addFormField("widget.reloadToolbar","true"); if(this.m_oCV.getViewerWidget()){ this.addFormField("cv.buxCurrentUserRole",this.m_oCV.getViewerWidget().getUserRole()); } this.addNonEmptyStringFormField("cv.objectPermissions",oCV.envParams["cv.objectPermissions"]); this.addNonEmptyStringFormField("limitedInteractiveMode",oCV.envParams["limitedInteractiveMode"]); this.m_oCV.getViewerDispatcher().dispatchRequest(this); }; DispatcherEntry.prototype.abortHttpRequest=function(){ if(!this.m_bCancelCalled){ if(this.getRequestHandler()){ this.getRequestHandler().onCancel(); } this.m_bCancelCalled=true; this.getRequest().abortHttpRequest(); this.onEntryComplete(); } }; DispatcherEntry.prototype.cancelRequest=function(_231){ if(!this.m_bCancelCalled){ this.m_bCancelCalled=true; if(this.getRequestHandler()){ this.getRequestHandler().onCancel(); } if(_231){ this.getRequest().forceSynchronous(); } this.getRequest().cancel(); this.onEntryComplete(); } }; DispatcherEntry.prototype.getFormFields=function(){ return this.m_request.getFormFields(); }; DispatcherEntry.prototype.getFormField=function(name){ if(this.m_request){ return this.m_request.getFormField(name); }else{ return ""; } }; DispatcherEntry.prototype.clearFormFields=function(){ this.m_request.clearFormFields(); }; DispatcherEntry.prototype.formFieldExists=function(name){ if(this.m_request){ return this.m_request.getFormFields().exists(name); } return false; }; DispatcherEntry.prototype.removeFormField=function(name){ if(this.formFieldExists(name)){ this.m_request.getFormFields().remove(name); } }; DispatcherEntry.prototype.addFormField=function(name,_236){ this.m_request.addFormField(name,_236); }; DispatcherEntry.prototype.addDefinedNonNullFormField=function(name,_238){ if(typeof _238!="undefined"&&_238!=null){ this.addFormField(name,_238); } }; DispatcherEntry.prototype.addDefinedFormField=function(name,_23a){ if(typeof _23a!="undefined"){ this.addFormField(name,_23a); } }; DispatcherEntry.prototype.addNonNullFormField=function(name,_23c){ if(_23c!=null){ this.addFormField(name,_23c); } }; DispatcherEntry.prototype.addNonEmptyStringFormField=function(name,_23e){ if(typeof _23e!="undefined"&&_23e!=null&&_23e!=""){ this.addFormField(name,_23e); } }; DispatcherEntry.prototype.onWorking=function(_23f,arg1){ if(this.getRequestHandler()){ this.getRequestHandler().onWorking(_23f); } }; DispatcherEntry.prototype.onFault=function(_241){ if(this.getRequestHandler()){ this.getRequestHandler().onFault(_241); } }; DispatcherEntry.prototype.onError=function(_242){ if(this.m_bCancelCalled){ return; } if(this.getRequestHandler()){ this.getRequestHandler().onError(_242); } }; DispatcherEntry.prototype.possibleUnloadEvent=function(){ this.setCallbacks({"error":{}}); }; DispatcherEntry.prototype.onPreHttpRequest=function(_243){ if(this.getRequestHandler()){ this.getRequestHandler().preHttpRequest(_243); } }; DispatcherEntry.prototype.onPostHttpRequest=function(_244){ if(this.getRequestHandler()){ this.getRequestHandler().postHttpRequest(_244); } }; DispatcherEntry.prototype.onPassportTimeout=function(_245){ if(this.getRequestHandler()){ this.getRequestHandler().onPassportTimeout(_245); } }; DispatcherEntry.prototype.onPrompting=function(_246){ if(this.getRequestHandler()){ this.getRequestHandler().onPrompting(_246); } }; DispatcherEntry.prototype.onEntryComplete=function(_247){ if(!this.m_oCV._beingDestroyed){ this.m_oCV.getViewerDispatcher().requestComplete(this); } }; DispatcherEntry.prototype.onEntryFault=function(_248){ this.m_oCV.setFaultDispatcherEntry(this); this.m_oCV.resetViewerDispatcher(); if(!this.m_bCancelCalled){ this.m_oCV.setRetryDispatcherEntry(this); } }; DispatcherEntry.prototype.onCloseErrorDlg=function(){ var _249=this.getCallbacks(); if(_249["closeErrorDlg"]){ var _24a=GUtil.generateCallback(_249["closeErrorDlg"].method,[],_249["closeErrorDlg"].object); _24a(); } }; DispatcherEntry.prototype.onPostEntryComplete=function(){ if(this.getRequestHandler()){ this.getRequestHandler().onPostEntryComplete(); } this.executeCallback("postComplete"); }; DispatcherEntry.prototype.executeCallback=function(_24b){ var _24c=this.getCallbacks(); if(_24c[_24b]){ var _24d=(_24c.customArguments)?[this,_24c.customArguments]:[this]; var _24e=GUtil.generateCallback(_24c[_24b].method,_24d,_24c[_24b].object); _24e(); return true; } return false; }; function DataDispatcherEntry(oCV){ if(oCV){ this.setRequest(new AsynchDATARequest(oCV.getGateway(),oCV.getWebContentRoot())); } DataDispatcherEntry.baseConstructor.call(this,oCV); }; DataDispatcherEntry.prototype=new DispatcherEntry(); DataDispatcherEntry.baseConstructor=DispatcherEntry; function JSONDispatcherEntry(oCV){ if(oCV){ this.setRequest(new AsynchJSONRequest(oCV.getGateway(),oCV.getWebContentRoot())); } JSONDispatcherEntry.prototype.setDefaultFormFields.call(this); JSONDispatcherEntry.baseConstructor.call(this,oCV); }; JSONDispatcherEntry.prototype=new DispatcherEntry(); JSONDispatcherEntry.baseConstructor=DispatcherEntry; JSONDispatcherEntry.prototype.setDefaultFormFields=function(){ this.addFormField("cv.responseFormat","JSON"); }; function AsynchDataDispatcherEntry(oCV){ if(oCV){ var _252=new AsynchDATARequest(oCV.getGateway(),oCV.getWebContentRoot()); this.setRequest(_252); AsynchDataDispatcherEntry.baseConstructor.call(this,oCV); AsynchDataDispatcherEntry.prototype.setDefaultFormFields.call(this); } }; AsynchDataDispatcherEntry.prototype=new DispatcherEntry(); AsynchDataDispatcherEntry.baseConstructor=DispatcherEntry; AsynchDataDispatcherEntry.prototype.setDefaultFormFields=function(){ this.addFormField("cv.responseFormat","data"); }; function AsynchJSONDispatcherEntry(oCV){ if(oCV){ var _254=new AsynchJSONRequest(oCV.getGateway(),oCV.getWebContentRoot()); this.setRequest(_254); AsynchJSONDispatcherEntry.baseConstructor.call(this,oCV); AsynchJSONDispatcherEntry.prototype.setDefaultFormFields.call(this); } }; AsynchJSONDispatcherEntry.prototype=new DispatcherEntry(); AsynchJSONDispatcherEntry.baseConstructor=DispatcherEntry; AsynchJSONDispatcherEntry.prototype.setDefaultFormFields=function(){ this.addFormField("cv.responseFormat","asynchJSON"); }; function ReportDispatcherEntry(oCV){ ReportDispatcherEntry.baseConstructor.call(this,oCV); if(oCV){ ReportDispatcherEntry.prototype.setDefaultFormFields.call(this); this.setRequestHandler(new RequestHandler(oCV)); this.setWorkingDialog(oCV.getWorkingDialog()); this.setRequestIndicator(oCV.getRequestIndicator()); this.setCallbacks({"complete":{"object":this,"method":this.onComplete},"prompting":{"object":this,"method":this.onComplete}}); } }; ReportDispatcherEntry.prototype=new AsynchDataDispatcherEntry(); ReportDispatcherEntry.baseConstructor=AsynchDataDispatcherEntry; ReportDispatcherEntry.prototype.parent=AsynchDataDispatcherEntry.prototype; ReportDispatcherEntry.prototype.prepareRequest=function(){ var _256=this.getFormField("ui.action"); var _257=this.getViewer().getActionState(); if(_257!==""&&(_256=="wait"||_256=="forward"||_256=="back")){ this.addFormField("cv.actionState",_257); } var _258=["nextPage","previousPage","firstPage","lastPage","reportAction","cancel","wait"]; var _259=true; for(var i=0;i<_258.length;i++){ if(_258[i]==_256){ _259=false; break; } } if(_259){ this.getViewer().clearTabs(); } if(this.getViewer().getCurrentlySelectedTab()&&!this.formFieldExists("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup")&&this.getViewer().getStatus()!="prompting"){ this.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",this.getViewer().getCurrentlySelectedTab()); } }; ReportDispatcherEntry.prototype.setDefaultFormFields=function(){ var oCV=this.getViewer(); var _25c=oCV.envParams; this.addFormField("cv.id",oCV.getId()); if(_25c["cv.showFaultPage"]){ this.addFormField("cv.showFaultPage",_25c["cv.showFaultPage"]); }else{ this.addFormField("cv.showFaultPage","false"); } this.addDefinedNonNullFormField("ui.object",_25c["ui.object"]); this.addDefinedNonNullFormField("ui.primaryAction",_25c["ui.primaryAction"]); this.addDefinedNonNullFormField("ui.objectClass",_25c["ui.objectClass"]); this.addNonEmptyStringFormField("specificationType",_25c["specificationType"]); this.addNonEmptyStringFormField("cv.promptForDownload",_25c["cv.promptForDownload"]); this.addNonEmptyStringFormField("ui.conversation",oCV.getConversation()); this.addNonEmptyStringFormField("m_tracking",oCV.getTracking()); var _25d=oCV.getExecutionParameters(); this.addNonEmptyStringFormField("executionParameters",_25d); var sCAF=oCV.getCAFContext(); this.addDefinedNonNullFormField("ui.cafcontextid",sCAF); }; ReportDispatcherEntry.prototype.onWorking=function(_25f,arg1){ var _261=_25f.getResponseState(); var _262=this.getRequestHandler(); if(_262){ var _263=_262.getWorkingDialog(); if(_263&&_263.setSecondaryRequests&&_261.m_aSecRequests){ _263.setSecondaryRequests(_261.m_aSecRequests); } } DispatcherEntry.prototype.onWorking.call(this,_25f,arg1); if(_262){ this.getRequestHandler().updateViewerState(_261); } }; ReportDispatcherEntry.prototype.onComplete=function(_264,arg1){ if(this.getRequestHandler()){ this.getRequestHandler().onComplete(_264); } }; function ViewerDispatcherEntry(oCV){ ViewerDispatcherEntry.baseConstructor.call(this,oCV); if(oCV){ ViewerDispatcherEntry.prototype.setDefaultFormFields.call(this); this.setCallbacks({"complete":{"object":this,"method":this.onComplete},"prompting":{"object":this,"method":this.onPrompting},"cancel":{"object":this,"method":this.onCancel}}); } }; ViewerDispatcherEntry.prototype=new ReportDispatcherEntry(); ViewerDispatcherEntry.baseConstructor=ReportDispatcherEntry; ViewerDispatcherEntry.prototype.parent=ReportDispatcherEntry.prototype; ViewerDispatcherEntry.prototype.setDefaultFormFields=function(){ var oCV=this.getViewer(); var _268=oCV.envParams; this.addFormField("cv.showFaultPage","true"); this.addDefinedNonNullFormField("cv.header",_268["cv.header"]); this.addDefinedNonNullFormField("cv.toolbar",_268["cv.toolbar"]); this.addDefinedNonNullFormField("ui.backURL",_268["ui.backURL"]); this.addDefinedNonNullFormField("errURL",_268["ui.backURL"]); this.addDefinedNonNullFormField("errURL",_268["ui.errURL"]); this.addDefinedNonNullFormField("cv.catchLogOnFault","true"); this.addDefinedNonNullFormField("m_sessionConv",_268["m_sessionConv"]); if(_268["m_session"]){ this.addFormField("m_session",_268["m_session"]); this.addFormField("cv.ignoreState","true"); } }; ViewerDispatcherEntry.prototype.prepareRequest=function(){ this.parent.prepareRequest.call(this); if(this.getUsePageRequest()){ this.m_oCV.setKeepSessionAlive(true); if(typeof this.m_oCV.envParams["cv.responseFormat"]!="undefined"&&this.m_oCV.envParams["cv.responseFormat"]!=null&&this.m_oCV.envParams["cv.responseFormat"]!=""){ this.addFormField("cv.responseFormat",this.m_oCV.envParams["cv.responseFormat"]); }else{ if(this.getFormField("cv.responseFormat")!="view"){ this.addFormField("cv.responseFormat","page"); } } var _269=this.m_oCV.getPinFreezeManager(); if(_269&&_269.hasFrozenContainers()){ this.addFormField("pinFreezeInfo",_269.toJSONString()); } if(this.m_oCV.envParams["cv.createCallback"]){ this.addFormField("cv.createCallback",this.m_oCV.envParams["cv.createCallback"]); } } }; ViewerDispatcherEntry.prototype.sendRequest=function(){ if(this.getUsePageRequest()){ this.prepareRequest(); var _26a=this.buildRequestForm(); if(typeof document.progress!="undefined"){ setTimeout("document.progress.src=\""+this.m_oCV.getSkin()+"/branding/progress.gif"+"\";",1); } _26a.submit(); }else{ this.getViewer().closeContextMenuAndToolbarMenus(); this.parent.sendRequest.call(this); } }; ViewerDispatcherEntry.prototype.buildRequestForm=function(){ var oCV=this.getViewer(); var _26c=document.createElement("form"); _26c.setAttribute("id","requestForm"); _26c.setAttribute("name","requestForm"); _26c.setAttribute("method","post"); _26c.setAttribute("target","_self"); _26c.setAttribute("action",oCV.getGateway()); _26c.style.display="none"; document.body.appendChild(_26c); var _26d=this.getRequest().getFormFields(); var _26e=_26d.keys(); for(var _26f=0;_26f<_26e.length;_26f++){ _26c.appendChild(this.createHiddenFormField(_26e[_26f],_26d.get(_26e[_26f]))); } for(param in oCV.envParams){ if(!_26d.exists(param)&¶m!="cv.actionState"){ _26c.appendChild(this.createHiddenFormField(param,oCV.envParams[param])); } } return _26c; }; ViewerDispatcherEntry.prototype.createHiddenFormField=function(name,_271){ var _272=document.createElement("input"); _272.setAttribute("type","hidden"); _272.setAttribute("name",name); _272.setAttribute("id",name); _272.setAttribute("value",_271); return (_272); }; ViewerDispatcherEntry.prototype.onCancel=function(){ var oCV=this.getViewer(); oCV.setStatus("complete"); if(this.getUsePageRequest()||!oCV.isReportRenderingDone()){ oCV.executeCallback("cancel"); } }; ViewerDispatcherEntry.prototype.onFault=function(_274){ if(this.getViewer().callbackExists("fault")){ this.getViewer().setSoapFault(_274.getSoapFault()); this.getViewer().executeCallback("fault"); }else{ this.parent.onFault.call(this,_274); } }; ViewerDispatcherEntry.prototype.onComplete=function(_275){ var oCV=this.getViewer(); oCV.saveBackJaxInformation(_275); if(oCV.isReportRenderingDone()){ this.getViewer().getSelectionController().resetSelections(); } this.parent.onComplete.call(this,_275); }; ViewerDispatcherEntry.prototype.onPrompting=function(_277){ var oCV=this.getViewer(); oCV.updateSkipToNavigationLink(true); if(!oCV.executeCallback("prompt")){ this.onComplete(_277); } }; ViewerDispatcherEntry.prototype.onEntryComplete=function(_279){ if(this.getRequestHandler()){ this.getRequestHandler().setDispatcherEntry(this); } this.parent.onEntryComplete.call(this,_279); };