/* *+------------------------------------------------------------------------+ *| 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. *| *+------------------------------------------------------------------------+ */ function CViewerHelper(){ this.m_oCV=null; }; CViewerHelper.prototype.getCVObjectRef=function(){ return this.getCV().getObjectId(); }; CViewerHelper.prototype.getCV=function(){ if(this.m_oCV){ return this.m_oCV; } return window; }; CViewerHelper.prototype.getCVId=function(){ var _1=""; if(this.m_oCV){ _1=this.m_oCV.getId(); } return _1; }; CViewerHelper.prototype.setCV=function(_2){ this.m_oCV=_2; }; function CObserver(_3){ this.m_subject=_3; this.m_observers=[]; }; function CObserver_attach(_4,_5,_6){ if(_4==null||typeof _4.update!="function"){ alert("Notification Frame Work Error : attach failed"); return false; } var _7=new CState(this.m_subject,_4,_5?_5:null,_6?_6:null); this.m_observers[this.m_observers.length]=_7; return true; }; function CObserver_detach(_8){ }; function CObserver_hasObserver(_9){ var _a=false; for(var _b=0;_b","gi"); if(!_ac.test(s)){ alert("invalid XML "+_ab.getName()+"\n"+s); return null; } return XMLParser(s.replace(RegExp.lastMatch,""),_ab.parentNode); }else{ var _ad=/^\s*<([\w:\-_\.]+)/; if(_ad.test(s)){ var _ae=RegExp.$1; var e=new XMLElement(_ae,_ab); var _b0=new RegExp("^<"+_ae+"[^>]*>"); s=s.replace(_b0,""); var _b1=RegExp.lastMatch; var _b2=/([\w:\-_\.]+)="([^"]*)"/gi; var _b3=_b1.match(_b2); if(_b3!=null){ for(var i=0;i<_b3.length;i++){ var _b5=_b3[i]; (/([\w:\-_\.]+)\s*=\s*"(.*)"/).test(_b5); e.setAttribute(RegExp.$1,RegExp.$2); } } if(!(/\/>$/).test(_b1)){ XMLParser(s,e); return e; }else{ XMLParser(s,_ab); return e; } } } }else{ if(s&&_ab){ var _b6=new RegExp("([^<]*)]*>","gi"); _b6.test(s); var _b7=RegExp.$1; _ab.setValue(_b7); return (XMLParser(s.replace(_b7,""),_ab)); } } return null; }; function XMLElement(s,_b9){ this.nodeName=s; this.nodeValue=""; this.attributes=[]; this.childNodes=[]; this.parentNode=_b9; if(this.parentNode){ this.parentNode.appendChild(this); } }; XMLElement.prototype.appendChild=function(e){ this.childNodes[this.childNodes.length]=e; }; XMLElement.prototype.hasChildNodes=function(){ if(this.childNodes.length>0){ return true; }else{ return false; } }; XMLElement.prototype.findChildByName=function(n,_bc){ if(this.getName()==n){ return (this); } for(var i=0;i"; return s; }; function XMLBuilderLoadXMLFromString(_d0,_d1){ var _d2=null; if(typeof DOMParser!="undefined"){ _d2=new DOMParser().parseFromString(_d0,"application/xml"); }else{ if(typeof ActiveXObject!="undefined"){ try{ _d2=new ActiveXObject("Microsoft.XMLDOM"); _d2.loadXML(_d0); } catch(e){ } } } return _d2; }; function XMLBuilderCreateXMLDocument(_d3,_d4,_d5){ var _d6=null; _d4=_d4||""; _d5=_d5||null; if(document.implementation&&document.implementation.createDocument){ if(typeof _d4=="undefined"){ _d4="http://www.w3.org/2000/xmlns/"; } _d6=document.implementation.createDocument(_d4,_d3,_d5); }else{ if(typeof ActiveXObject!="undefined"){ try{ _d6=new ActiveXObject("Microsoft.XMLDOM"); var _d7=_d6.createNode(1,_d3,_d4); _d6.appendChild(_d7); } catch(e){ } } } return _d6; }; function XMLBuilderCreateElementNS(_d8,_d9,_da){ var _db=null; if(typeof _da.createElementNS!="undefined"){ if(typeof _d8=="undefined"){ _d8="http://www.w3.org/2000/xmlns/"; } _db=_da.createElementNS(_d8,_d9); }else{ if(typeof _da.createNode!="undefined"){ _db=_da.createNode(1,_d9,_d8); } } return _db; }; function XMLBuilderSetAttributeNodeNS(_dc,_dd,_de,_df){ if(typeof _dc.setAttributeNS!="undefined"){ if(typeof _df=="undefined"){ _df="http://www.w3.org/2000/xmlns/"; } _dc.setAttributeNS(_df,_dd,_de); }else{ if(typeof _dc.ownerDocument!="undefined"&&typeof _dc.ownerDocument.createNode!="undefined"){ var _e0=_dc.ownerDocument.createNode(2,_dd,_df); _e0.nodeValue=_de; _dc.setAttributeNode(_e0); } } }; function XMLBuilderSerializeNode(_e1){ var _e2=""; if(typeof XMLSerializer!="undefined"){ try{ _e2=new XMLSerializer().serializeToString(_e1); } catch(e){ } }else{ if(typeof _e1=="object"&&typeof _e1.xml!="undefined"){ _e2=_e1.xml; } } return _e2.replace(/^\s+/g,"").replace(/\s+$/g,""); }; function XMLHelper_GetText(_e3,_e4){ var _e5=""; var _e6=_e3.childNodes; for(var i=0;i<_e6.length;++i){ if(_e6[i].nodeType==3){ _e5+=_e6[i].nodeValue; }else{ if(_e6[i].nodeName=="Value"){ _e5+=_e6[i].getAttribute("display"); }else{ if(_e4){ _e5+=XMLHelper_GetText(_e6[i],true); } } } } return _e5; }; function XMLHelper_GetLocalName(_e8){ if(typeof _e8.baseName!="undefined"){ return _e8.baseName; } return _e8.localName; }; function XMLHelper_FindChildByTagName(_e9,_ea,_eb){ if(typeof _eb=="undefined"||(_eb!=true&&_eb!=false)){ _eb=true; } if(XMLHelper_GetLocalName(_e9)==_ea){ return (_e9); } var i; for(i=0;i<_e9.childNodes.length;i++){ if(XMLHelper_GetLocalName(_e9.childNodes[i])==_ea){ return _e9.childNodes[i]; } } if(_eb!=false){ for(i=0;i<_e9.childNodes.length;i++){ var _ed=XMLHelper_FindChildByTagName(_e9.childNodes[i],_ea,_eb); if(_ed){ return _ed; } } } return null; }; function XMLHelper_FindChildrenByTagName(_ee,_ef,_f0){ if(typeof _f0=="undefined"||(_f0!=true&&_f0!=false)){ _f0=true; } var _f1=[]; var _f2=_ee.childNodes; for(var _f3=0;_f3<_f2.length;_f3++){ if(XMLHelper_GetLocalName(_f2[_f3])==_ef){ _f1[_f1.length]=_f2[_f3]; } if(_f0===true){ var _f4=XMLHelper_FindChildrenByTagName(_f2[_f3],_ef,_f0); if(_f4.length>0){ _f1=_f1.concat(_f4); } } } return _f1; }; function XMLHelper_GetFirstChildElement(oEl){ var _f6=null; if(oEl&&oEl.childNodes&&oEl.childNodes.length){ for(var i=0;i0){ if(_fc){ if(_102.length==1){ return _102; }else{ return [_102[0]]; } }else{ _fd=_fd.concat(_102); } } } } } return _fd; }; var DICTIONARY_INVALID_KEY=-1; var DICTIONARY_SUCCESS=1; function CDictionary(){ this.m_aValues={}; }; function CDictionary_add(sKey,_104){ if(typeof sKey!="string"&&typeof sKey!="number"){ return DICTIONARY_INVALID_KEY; } this.m_aValues[sKey]=_104; return DICTIONARY_SUCCESS; }; function CDictionary_exists(sKey){ if(typeof sKey!="string"&&typeof sKey!="number"){ return false; } return (typeof this.m_aValues[sKey]!="undefined"); }; function CDictionary_get(sKey){ if(typeof sKey!="string"&&typeof sKey!="number"){ return null; } if(this.exists(sKey)===true){ return this.m_aValues[sKey]; }else{ return null; } }; function CDictionary_keys(){ var _107=[]; for(var _108 in this.m_aValues){ _107.push(_108); } return _107.sort(); }; function CDictionary_remove(sKey){ if(typeof sKey!="string"&&typeof sKey!="number"){ return DICTIONARY_INVALID_KEY; } var _10a=this.get(sKey); delete this.m_aValues[sKey]; return _10a; }; function CDictionary_removeAll(){ this.m_aValues=[]; return DICTIONARY_SUCCESS; }; function CDictionary_append(_10b){ if(_10b instanceof CDictionary&&_10b.keys().length>0){ var _10c=_10b.keys(); for(var _10d=0;_10d<_10c.length;_10d++){ this.add(_10c[_10d],_10b.get(_10c[_10d])); } } }; CDictionary.prototype.add=CDictionary_add; CDictionary.prototype.exists=CDictionary_exists; CDictionary.prototype.get=CDictionary_get; CDictionary.prototype.keys=CDictionary_keys; CDictionary.prototype.remove=CDictionary_remove; CDictionary.prototype.removeAll=CDictionary_removeAll; CDictionary.prototype.append=CDictionary_append; function CognosTabControl(_10e,_10f){ this._init(); this._outsideContainer=_10e; this._callback=_10f; }; CognosTabControl.prototype._init=function(){ this._tabs=null; this._tabControlNode=null; this._scrollButtonsVisible=false; this._scrollLeftButton=null; this._scrollRightButton=null; this._selectedTab=null; this._wrapperDiv=null; this._topContainer=null; this._seperator=null; this._isSavedOutput=false; this._isHighContrast=false; }; CognosTabControl.prototype.destroy=function(){ if(this._wrapperDiv){ this._wrapperDiv.parentNode.removeChild(this._wrapperDiv); delete this._wrapperDiv; this._wrapperDiv=null; } }; CognosTabControl.prototype.setHighContrast=function(_110){ this._isHighContrast=_110; }; CognosTabControl.prototype.isHighContrast=function(){ return this._isHighContrast; }; CognosTabControl.prototype.setSpaceSaverContainer=function(node){ this._spaceSaverContainer=node; }; CognosTabControl.prototype.useAbsolutePosition=function(_112){ this._useAbsolutePosition=_112; }; CognosTabControl.prototype.setScrollAttachNode=function(node){ this._scrollAttachNode=node; }; CognosTabControl.prototype.setIsSavedOutput=function(_114){ this._isSavedOutput=_114; }; CognosTabControl.prototype.isSavedOutput=function(){ return this._isSavedOutput; }; CognosTabControl.prototype.getSelectedTabId=function(){ if(this._selectedTab){ return this._selectedTab.getId(); } return null; }; CognosTabControl.prototype.getSelectedTab=function(){ return this._selectedTab?this._selectedTab:null; }; CognosTabControl.prototype.isTopAligned=function(){ return this._isTopAligned; }; CognosTabControl.prototype.getWrapperDiv=function(){ return this._wrapperDiv; }; CognosTabControl.prototype.getVisibleWidth=function(){ var _115=this._scrollRightButton?this._scrollRightButton.getWidth()+11:0; return this._wrapperDiv.clientWidth-_115; }; CognosTabControl.prototype.getMaxRightScroll=function(){ var _116=this._scrollRightButton?this._scrollRightButton.getWidth()+11:0; return this._totalWrapperWidth+_116+8-this._wrapperDiv.clientWidth; }; CognosTabControl.prototype.hide=function(){ this._topContainer.style.display="none"; }; CognosTabControl.prototype.resetPosition=function(){ if(this._useAbsolutePosition===true){ this._outsideContainer.srollLeft="0px"; this._outsideContainer.scrollTop="0px"; this._topContainer.style.top=""; this._topContainer.style.bottom=""; this._topContainer.style.left="0px"; if(this._isTopAligned){ this._topContainer.style.top="0px"; }else{ this._topContainer.style.bottom="0px"; } } }; CognosTabControl.prototype.render=function(_117){ this._updateTabInfo(_117); if(!this._tabControlNode){ var _118=this; var _119=this._scrollAttachNode?this._scrollAttachNode:this._outsideContainer; if(window.attachEvent){ window.attachEvent("onresize",function(){ _118.onResize(); }); if(this._useAbsolutePosition===true){ _119.attachEvent("onscroll",function(){ _118.onContainerScroll(); }); } }else{ window.addEventListener("resize",function(){ _118.onResize(); },false); if(this._useAbsolutePosition===true){ _119.addEventListener("scroll",function(){ _118.onContainerScroll(); },false); } } this._outsideContainer.originalClassName=this._outsideContainer.className; this._outsideContainer.className=this._outsideContainer.className+(this._isTopAligned?" ct_controlTop":" ct_controlBottom"); this._topContainer=document.createElement("div"); this._topContainer.className="ct_wrapperDiv"; if(this._useAbsolutePosition===true){ this._topContainer.style.width="100%"; this._topContainer.style.position="absolute"; this._topContainer.style.left="0px"; if(this._isTopAligned){ this._topContainer.style.top="0px"; }else{ this._topContainer.style.bottom="0px"; } } if(this._isTopAligned&&this._outsideContainer.firstChild){ this._outsideContainer.insertBefore(this._topContainer,this._outsideContainer.firstChild); }else{ this._outsideContainer.appendChild(this._topContainer); } this._wrapperDiv=document.createElement("div"); this._wrapperDiv.setAttribute("role","presentation"); this._wrapperDiv.className="ct_wrapperDiv"; this._topContainer.appendChild(this._wrapperDiv); this._tabControlNode=document.createElement("div"); this._tabControlNode.setAttribute("role","tablist"); this._tabControlNode.className="ct_control"; this._wrapperDiv.appendChild(this._tabControlNode); this._totalWrapperWidth=0; for(var i=0;i=this._tabs.length){ _12e=0; } }else{ _12e--; if(_12e<0){ _12e=this._tabs.length-1; } } this._tabs[_12e].focus(); this._tabs[_12e].scrollIntoView(); }else{ if(evt.keyCode=="32"||evt.keyCode=="13"){ var _12f=this._tabs[_12e].getId(); this.selectTab(_12f,true); } } }; function CognosTab(_130,_131,_132){ if(!_130){ return; } this._id=_130.id; this._label=_130.label; this._position=_132; this._contentClassName=_130.className; this._imgURL=_130.img; this._selected=false; this._tabControl=_131; this._outerTabDiv=null; this._focusDiv=null; }; CognosTab.prototype.getWidth=function(){ return this._outerTabDiv.offsetWidth+1; }; CognosTab.prototype.getHeight=function(){ return this._outerTabDiv.clientHeight; }; CognosTab.prototype.getId=function(){ return this._id; }; CognosTab.prototype.select=function(_133){ if(_133!=this._selected){ this._selected=_133; if(_133){ this.scrollIntoView(); } if(this._outerTabDiv){ this._updateSelectedClass(); this._updateAriaSelected(); } } }; CognosTab.prototype.scrollIntoView=function(){ var _134=this._outerTabDiv.offsetLeft+this._outerTabDiv.clientWidth; var _135=this._tabControl.getVisibleWidth(); var _136=this._tabControl.getScrollPos(); var _137=this._outerTabDiv.offsetLeft; if(_137===0){ this._tabControl.scrollTo(0); }else{ if((_137>=_136)&&(_134<=(_136+_135))){ }else{ if(_137<_136){ var _138=_137<3?0:_137-3; this._tabControl.scrollTo(_138); }else{ if(_134-_135>0||_134<_136){ this._tabControl.scrollTo(_134-_135+10); } } } } }; CognosTab.prototype.render=function(_139){ if(!this._outerTabDiv){ var _13a=this._id; var _13b=this._tabControl; var tab=this; this._outerTabDiv=document.createElement("div"); this._outerTabDiv.onmousedown=function(_13d){ _13b.selectTab(_13a,true,_13d); }; this._outerTabDiv.onmouseover=function(){ this.className=this.className+" ct_highlight"; }; this._outerTabDiv.onmouseout=function(){ tab._updateSelectedClass(); }; this._outerTabDiv.setAttribute("style",""); this._outerTabDiv.setAttribute("role","presentation"); this._updateSelectedClass(); _139.appendChild(this._outerTabDiv); var _13e=document.createElement("div"); _13e.className="ct_content"; _13e.setAttribute("role","presentation"); this._outerTabDiv.appendChild(_13e); this._focusDiv=document.createElement("span"); this._focusDiv.innerHTML=this._label?this._label:" "; this._focusDiv.className="ct_text"; this._focusDiv.setAttribute("tabIndex",this._position===0?"0":"-1"); this._focusDiv.setAttribute("role","tab"); this._focusDiv.onkeydown=function(_13f){ _13b.handleKeyDown(_13f,tab._position); }; this._updateAriaSelected(); _13e.appendChild(this._focusDiv); if(this.isIE()&&this.getWidth()<75){ this._outerTabDiv.style.width="75px"; } }else{ this._updateSelectedClass(); this._updateAriaSelected(); } }; CognosTab.prototype.isIE=function(){ return (navigator.userAgent.indexOf("MSIE")!=-1||navigator.userAgent.indexOf("Trident")!=-1); }; CognosTab.prototype.getFocusableDiv=function(){ return this._focusDiv; }; CognosTab.prototype.focus=function(_140){ if(typeof _140==="undefined"){ _140=true; } this._focusDiv.setAttribute("tabIndex",_140?"0":"-1"); if(_140&&this._focusDiv.focus){ this._focusDiv.focus(); } }; CognosTab.prototype._updateSelectedClass=function(){ this._outerTabDiv.className=this._selected?"ct_outerDiv ct_highlight ct_selected":"ct_outerDiv"; }; CognosTab.prototype._updateAriaSelected=function(){ this._focusDiv.setAttribute("aria-selected",this._selected?"true":"false"); }; function CognosScrollButton(_141,_142,_143){ this._direction=_141; this._height=_142; this._tabControl=_143; this._disabled=true; this._scrolling=false; }; CognosScrollButton.prototype.getWidth=function(){ return this._scrollButtonDiv.offsetWidth+1; }; CognosScrollButton.prototype.show=function(){ this._wrapperDiv.style.display="block"; }; CognosScrollButton.prototype.hide=function(){ this._wrapperDiv.style.display="none"; }; CognosScrollButton.prototype.update=function(){ var _144=this._tabControl.getWrapperDiv(); var _145=false; if(this._direction=="left"){ if(_144.scrollLeft===0){ _145=true; } }else{ if(_144.scrollLeft>=(this._tabControl.getMaxRightScroll()-2)){ _145=true; } } if(_145){ this._disable(); }else{ this._enable(); } }; CognosScrollButton.prototype.isDisabled=function(){ return this._disabled; }; CognosScrollButton.prototype._disable=function(){ this._disabled=true; this._outerDiv.className="ct_outerDiv ct_scrollDisabled"; }; CognosScrollButton.prototype._enable=function(){ this._disabled=false; this._outerDiv.className="ct_outerDiv ct_scrollEnabled"; }; CognosScrollButton.prototype.scroll=function(){ if(!this._scrolling){ this._scrolling=true; var _146=this._tabControl.getWrapperDiv().clientWidth; this._doAnimateScroll(_146,this._tabControl.getMaxRightScroll()); } }; CognosScrollButton.prototype._doAnimateScroll=function(_147,_148){ if(_147>0){ var _149=10; var _14a=this._tabControl.getWrapperDiv(); if(this._direction=="left"){ if(_14a.scrollLeft>_149){ this._tabControl.scrollTo(_14a.scrollLeft-_149); }else{ this._tabControl.scrollTo(0); this._scrolling=false; return; } }else{ if(_14a.scrollLeft+_149<_148){ this._tabControl.scrollTo(_14a.scrollLeft+_149); }else{ this._scrolling=false; this._tabControl.scrollTo(_148); this._tabControl.updateScrollButtons(); return; } } _147-=_149; var _14b=this; setTimeout(function(){ _14b._doAnimateScroll(_147,_148); },3); }else{ this._scrolling=false; this._tabControl.updateScrollButtons(); } }; CognosScrollButton.prototype.isIE=function(){ return (navigator.userAgent.indexOf("MSIE")!=-1||navigator.userAgent.indexOf("Trident")!=-1); }; CognosScrollButton.prototype.render=function(_14c){ this._scrollButtonDiv=document.createElement("div"); this._scrollButtonDiv.className="ct_scrollButton"; var _14d=-1; if(this.isIE()&&document.compatMode!="CSS1Compat"){ _14d=1; } this._scrollButtonDiv.style.height=this._height+_14d+"px"; if(this._tabControl.isHighContrast()){ this._scrollButtonDiv.innerHTML=this._direction=="left"?"«":"»"; } this._outerDiv=document.createElement("div"); this._outerDiv.className="ct_scrollDisabled"; this._outerDiv.appendChild(this._scrollButtonDiv); this._outerDiv.style.height=this._height+"px"; var _14e=this; this._outerDiv.onclick=function(){ _14e.scroll(); }; this._wrapperDiv=document.createElement("div"); this._wrapperDiv.style.height=this._height+"px"; this._wrapperDiv.className="ct_scroll "+(this._direction=="left"?"ct_left":"ct_right")+(this._tabControl.isHighContrast()?" a11y":""); this._wrapperDiv.appendChild(this._outerDiv); if(this._direction=="left"){ _14c.insertBefore(this._wrapperDiv,_14c.firstChild); this._wrapperDiv.style.left="0px"; }else{ _14c.appendChild(this._wrapperDiv); this._wrapperDiv.style.right="0px"; } }; function ActionFactory(_14f){ this.m_cognosViewer=_14f; }; ActionFactory.prototype.load=function(_150){ this.m_cognosViewer.loadExtra(); var _151=null; try{ var _152=_150+"Action"; _151=eval("(typeof "+_152+"=='function'? new "+_152+"():null);"); if(_151){ _151.setCognosViewer(this.m_cognosViewer); } } catch(exception){ _151=null; } return _151; }; function ActionFactory_loadActionHandler(evt,_154){ var _155=getCtxNodeFromEvent(evt); var _156=_154.getSelectionController(); var _157=null; if(_155!==null){ var _158=_155.getAttribute("ctx"); _158=_158.split("::")[0].split(":")[0]; var _159=_155.getAttribute("type")!=null?_155:_155.parentNode; var type=_159.getAttribute("type"); switch(type){ case "columnTitle": var _15b=(_155.getAttribute("dttargets")!=null); var _15c=(_159.getAttribute("CTNM")!=null&&_156.getMun(_158)!=""&&_156.getUsageInfo(_158)!="2"); if(_15b||_15c){ _157=_154.getAction("DrillUpDownOrThrough"); _157.init(_15b,_15c); _157.updateDrillabilityInfo(_154,_155); }else{ _157=_154.getAction("RenameDataItem"); } break; case "datavalue": case "chartElement": case "ordinalAxisLabel": case "legendLabel": case "legendTitle": case "ordinalAxisTitle": var _15b=(_155.getAttribute("dttargets")!=null); var _15c=(_156.getHun(_158)!=""); if(_15b||_15c){ _157=_154.getAction("DrillUpDownOrThrough"); _157.init(_15b,_15c); _157.updateDrillabilityInfo(_154,_155); } break; } } if(_157===null){ _157=_154.getAction("Selection"); } _157.setCognosViewer(_154); return _157; }; ActionFactory.prototype.destroy=function(){ delete this.m_cognosViewer; }; function CognosViewerAction(){ this.m_oCV=null; }; CognosViewerAction.prototype.setRequestParms=function(_15d){ }; CognosViewerAction.prototype.onMouseOver=function(evt){ return false; }; CognosViewerAction.prototype.onMouseOut=function(evt){ return false; }; CognosViewerAction.prototype.onMouseDown=function(evt){ return false; }; CognosViewerAction.prototype.onClick=function(evt){ return false; }; CognosViewerAction.prototype.onDoubleClick=function(evt){ return false; }; CognosViewerAction.prototype.updateMenu=function(_163){ return _163; }; CognosViewerAction.prototype.addAdditionalOptions=function(_164){ }; CognosViewerAction.prototype.genSelectionContextWithUniqueCTXIDs=function(){ return false; }; CognosViewerAction.prototype.doUndo=function(){ if(typeof console!="undefined"){ console.log("Required method doUndo not implemented."); } }; CognosViewerAction.prototype.doRedo=function(){ if(typeof console!="undefined"){ console.log("Required method doRedo not implemented."); } }; CognosViewerAction.prototype.forceRunSpecRequest=function(){ return false; }; CognosViewerAction.prototype.preProcess=function(){ }; CognosViewerAction.prototype.setCognosViewer=function(oCV){ this.m_oCV=oCV; }; CognosViewerAction.prototype.getCognosViewer=function(){ return this.m_oCV; }; CognosViewerAction.prototype.getUndoRedoQueue=function(){ if(this.getCognosViewer().getViewerWidget()){ return this.getCognosViewer().getViewerWidget().getUndoRedoQueue(); } return null; }; CognosViewerAction.prototype.getViewerWidget=function(){ return this.m_oCV.getViewerWidget(); }; CognosViewerAction.prototype.getObjectDisplayName=function(){ var _166=""; if(this.m_oCV!=null){ if(typeof this.m_oCV.envParams["reportpart_id"]!="undefined"){ _166=this.m_oCV.envParams["reportpart_id"]; }else{ if(typeof this.m_oCV.envParams["ui.name"]!="undefined"){ _166=this.m_oCV.envParams["ui.name"]; } } } return _166; }; CognosViewerAction.prototype.getContainerId=function(_167){ var _168=""; if(_167&&_167.getAllSelectedObjects){ var _169=_167.getAllSelectedObjects(); if(_169){ var _16a=_169[0]; if(_16a&&_16a.getLayoutElementId){ _168=this.removeNamespace(_16a.getLayoutElementId()); } } } return _168; }; CognosViewerAction.prototype.removeNamespace=function(_16b){ var _16c=_16b; try{ if(_16b!=""){ var _16d=_16b.indexOf(this.m_oCV.getId()); if(_16d!=-1){ _16b=_16b.replace(this.m_oCV.getId(),""); } } return _16b; } catch(e){ return _16c; } }; CognosViewerAction.prototype.doAddActionContext=function(){ return true; }; CognosViewerAction.prototype.getSelectionContext=function(){ return getViewerSelectionContext(this.m_oCV.getSelectionController(),new CSelectionContext(this.m_oCV.envParams["ui.object"]),this.genSelectionContextWithUniqueCTXIDs()); }; CognosViewerAction.prototype.getNumberOfSelections=function(){ var _16e=-1; if(this.m_oCV!=null&&this.m_oCV.getSelectionController()!=null){ _16e=this.m_oCV.getSelectionController().getSelections().length; } return _16e; }; CognosViewerAction.prototype.buildDynamicMenuItem=function(_16f,_170){ _16f.action={name:"LoadMenu",payload:{action:_170}}; _16f.items=[{"name":"loading","label":RV_RES.GOTO_LOADING,iconClass:"loading"}]; return _16f; }; CognosViewerAction.prototype.createCognosViewerDispatcherEntry=function(_171){ var oReq=new ViewerDispatcherEntry(this.getCognosViewer()); oReq.addFormField("ui.action",_171); this.preProcess(); if(this.doAddActionContext()===true){ var _173=this.addActionContext(); oReq.addFormField("cv.actionContext",_173); if(window.gViewerLogger){ window.gViewerLogger.log("Action context",_173,"xml"); } } oReq.addFormField("ui.object",this.m_oCV.envParams["ui.object"]); if(typeof this.m_oCV.envParams["ui.spec"]!="undefined"){ oReq.addFormField("ui.spec",this.m_oCV.envParams["ui.spec"]); } if(this.m_oCV.getModelPath()!==""){ oReq.addFormField("modelPath",this.m_oCV.getModelPath()); } if(typeof this.m_oCV.envParams["packageBase"]!="undefined"){ oReq.addFormField("packageBase",this.m_oCV.envParams["packageBase"]); } if(typeof this.m_oCV.envParams["rap.state"]!="undefined"){ oReq.addFormField("rap.state",this.m_oCV.envParams["rap.state"]); } if(typeof this.m_oCV.envParams["rapReportInfo"]!="undefined"){ oReq.addFormField("rap.reportInfo",this.m_oCV.envParams["rapReportInfo"]); } this.addAdditionalOptions(oReq); return oReq; }; CognosViewerAction.prototype.fireModifiedReportEvent=function(){ try{ var _174=this.getCognosViewer().getViewerWidget(); if(_174){ var _175={"modified":true}; _174.fireEvent("com.ibm.bux.widget.modified",null,_175); } } catch(e){ } }; CognosViewerAction.prototype.showCustomCursor=function(evt,id,_178){ var _179=document.getElementById(id); if(_179==null){ _179=document.createElement("span"); _179.className="customCursor"; _179.setAttribute("id",id); document.body.appendChild(_179); } var _17a=""; _179.innerHTML=_17a; _179.style.position="absolute"; _179.style.left=(evt.clientX+15)+"px"; _179.style.top=(evt.clientY+15)+"px"; _179.style.display="inline"; }; CognosViewerAction.prototype.hideCustomCursor=function(id){ var _17c=document.getElementById(id); if(_17c!=null){ _17c.style.display="none"; } }; CognosViewerAction.prototype.selectionHasContext=function(){ var _17d=this.getCognosViewer().getSelectionController().getAllSelectedObjects(); var _17e=false; if(_17d!=null&&_17d.length>0){ for(var i=0;i<_17d.length;i++){ if(_17d[i].hasContextInformation()){ _17e=true; break; } } } return _17e; }; CognosViewerAction.prototype.isInteractiveDataContainer=function(_180){ var _181=false; if(typeof _180!="undefined"&&_180!=null){ var id=_180.toLowerCase(); _181=id=="crosstab"||id=="list"||this.getCognosViewer().getRAPReportInfo().isChart(id); } return _181; }; CognosViewerAction.prototype.getSelectedContainerId=function(){ var _183=this.getCognosViewer(); var _184=_183.getSelectionController(); var _185=null; if(_184!=null&&typeof _184!="undefined"){ _185=this.getContainerId(_184); } return _185; }; CognosViewerAction.prototype.getSelectedReportInfo=function(){ var _186=this.getCognosViewer(); var _187=this.getSelectedContainerId(); var _188=this.getReportInfo(_187); if(_188==null){ var _189=_186.getRAPReportInfo(); if(_189.getContainerCount()==1){ _188=_189.getContainerFromPos(0); } } return _188; }; CognosViewerAction.prototype.getReportInfo=function(_18a){ var _18b=null; if(_18a!=null&&_18a.length>0){ var _18c=this.getCognosViewer(); var _18d=_18c.getRAPReportInfo(); _18b=_18d.getContainer(_18a); } return _18b; }; CognosViewerAction.prototype.isSelectionOnChart=function(){ var _18e=this.getCognosViewer(); if(_18e.getSelectionController().hasSelectedChartNodes()){ return true; } var _18f=this.getContainerId(_18e.getSelectionController()); if(typeof _18f!="undefined"){ var _190=this.getReportInfo(_18f); if(_190!=null&&_190.displayTypeId){ var _191=_190.displayTypeId.toLowerCase(); return _18e.getRAPReportInfo().isChart(_191); } } return false; }; CognosViewerAction.prototype.ifContainsInteractiveDataContainer=function(){ var _192=this.getCognosViewer().getRAPReportInfo(); if(_192){ return _192.containsInteractiveDataContainer(); } return false; }; CognosViewerAction.prototype.isPromptWidget=function(){ var oCV=this.getCognosViewer(); if(oCV.getRAPReportInfo()&&oCV.getRAPReportInfo().isPromptPart()){ return true; } return false; }; CognosViewerAction.prototype.getLayoutComponents=function(){ var _194=[]; var _195=document.getElementById("rt"+this.m_oCV.getId()); if(_195!=null){ _194=getElementsByAttribute(_195,"*","lid"); } return _194; }; CognosViewerAction.prototype.addClientContextData=function(_196){ var _197=this.m_oCV.getSelectionController(); if(typeof _197!="undefined"&&_197!=null&&typeof _197.getCCDManager!="undefined"&&_197.getCCDManager()!=null){ var _198=_197.getCCDManager(); return (""+xml_encode(_198.MetadataToJSON())+""+""+xml_encode(_198.ContextDataSubsetToJSON(_196))+""); } return ""; }; CognosViewerAction.prototype.getDataItemInfoMap=function(){ var _199=this.m_oCV.getSelectionController(); if(typeof _199!="undefined"&&_199!=null&&typeof _199.getCCDManager!="undefined"&&_199.getCCDManager()!=null){ var _19a=_199.getCCDManager(); return (""+xml_encode(_19a.DataItemInfoToJSON())+""); } return ""; }; CognosViewerAction.prototype.getRAPLayoutTag=function(_19b){ var _19c=null; if(typeof _19b=="object"&&_19b!=null){ _19c=_19b.getAttribute("rap_layout_tag"); } return _19c; }; CognosViewerAction.prototype.addMenuItemChecked=function(_19d,_19e,_19f){ if(_19d){ if(this.getCognosViewer().isHighContrast()){ _19e["class"]="menuItemSelected"; } _19e.iconClass="menuItemChecked"; }else{ if(_19f&&_19f.length>0){ _19e.iconClass=_19f; } } }; CognosViewerAction.prototype.gatherFilterInfoBeforeAction=function(_1a0){ var _1a1=this.getCognosViewer().getViewerWidget(); _1a1.filterRequiredAction=_1a0; _1a1.clearRAPCache(); _1a1.fireEvent("com.ibm.bux.widget.action",null,{action:"canvas.filters"}); }; CognosViewerAction.prototype.addClientSideUndo=function(_1a2,_1a3){ var _1a4=GUtil.generateCallback(_1a2.doUndo,_1a3,_1a2); var _1a5=GUtil.generateCallback(_1a2.doRedo,_1a3,_1a2); this.getUndoRedoQueue().addClientSideUndo({"tooltip":_1a2.getUndoHint(),"undoCallback":_1a4,"redoCallback":_1a5}); this.getCognosViewer().getViewerWidget().updateToolbar(); }; CognosViewerAction.prototype.isValidMenuItem=function(){ var _1a6=this.getCognosViewer(); var _1a7=_1a6.getViewerWidget(); if(this.isPromptWidget()){ return false; } return true; }; CognosViewerAction.prototype.isPositiveInt=function(_1a8){ if(typeof _1a8==="undefined"||_1a8===null){ return false; } var _1a9=parseInt(_1a8,10); return _1a8&&_1a9===+_1a8&&_1a9>0&&_1a8.indexOf(".")==-1; }; CognosViewerAction.prototype.buildActionResponseObject=function(_1aa,code,msg){ return {"status":_1aa,"message":msg?msg:null,"code":code?code:null,getStatus:function(){ return this.status; },getMessage:function(){ return this.message; },getCode:function(){ return this.code; }}; }; function LineageAction(){ }; LineageAction.prototype=new CognosViewerAction(); LineageAction.prototype.getCommonOptions=function(_1ad){ _1ad.addFormField("cv.responseFormat","asynchDetailMIMEAttachment"); _1ad.addFormField("bux",this.m_oCV.getViewerWidget()?"true":"false"); _1ad.addFormField("cv.id",this.m_oCV.envParams["cv.id"]); }; LineageAction.prototype.getSelectionOptions=function(_1ae){ var _1af=this.m_oCV.getSelectionController(); var _1b0=getSelectionContextIds(_1af); _1ae.addFormField("context.format","initializer"); _1ae.addFormField("context.type","reportService"); _1ae.addFormField("context.selection","metadata,"+_1b0.toString()); }; LineageAction.prototype.getPrimaryRequestOptions=function(_1b1){ _1b1.addFormField("specificationType","metadataServiceLineageSpecification"); _1b1.addFormField("ui.action","runLineageSpecification"); _1b1.addFormField("ui.object",this.m_oCV.envParams["ui.object"]); }; LineageAction.prototype.getSecondaryRequestOptions=function(_1b2){ _1b2.addFormField("ui.conversation",this.m_oCV.getConversation()); _1b2.addFormField("m_tracking",this.m_oCV.getTracking()); _1b2.addFormField("ui.action","lineage"); }; LineageAction.prototype.updateMenu=function(_1b3){ if(!this.getCognosViewer().bCanUseLineage){ return ""; } _1b3.disabled=!this.selectionHasContext(); return _1b3; }; LineageAction.prototype.execute=function(){ var oCV=this.getCognosViewer(); var _1b5=new AsynchDataDispatcherEntry(oCV); this.getCommonOptions(_1b5); this.getSelectionOptions(_1b5); if(oCV.getConversation()==""){ this.getPrimaryRequestOptions(_1b5); }else{ this.getSecondaryRequestOptions(_1b5); } _1b5.setCallbacks({"complete":{"object":this,"method":this.handleLineageResponse}}); if(!oCV.m_viewerFragment){ _1b5.setRequestIndicator(oCV.getRequestIndicator()); var _1b6=new WorkingDialog(oCV); _1b6.setSimpleWorkingDialogFlag(true); _1b5.setWorkingDialog(_1b6); } oCV.dispatchRequest(_1b5); }; LineageAction.prototype.handleLineageResponse=function(_1b7){ var oCV=this.getCognosViewer(); oCV.loadExtra(); oCV.setStatus(_1b7.getAsynchStatus()); oCV.setConversation(_1b7.getConversation()); oCV.setTracking(_1b7.getTracking()); var _1b9=null; if(typeof MDSRV_CognosConfiguration!="undefined"){ _1b9=new MDSRV_CognosConfiguration(); var _1ba=""; if(this.m_oCV.envParams["metadataInformationURI"]){ _1ba=this.m_oCV.envParams["metadataInformationURI"]; } _1b9.addProperty("lineageURI",_1ba); _1b9.addProperty("gatewayURI",this.m_oCV.getGateway()); } var _1bb=this.m_oCV.envParams["ui.object"]; var _1bc=getViewerSelectionContext(this.m_oCV.getSelectionController(),new CSelectionContext(_1bb)); var _1bd=new MDSRV_LineageFragmentContext(_1b9,_1bc); _1bd.setExecutionParameters(this.m_oCV.getExecutionParameters()); if(typeof _1bb=="string"){ _1bd.setReportPath(_1bb); } _1bd.setReportLineage(_1b7.getResult()); _1bd.open(); }; function CSelectionDefaultStyles(_1be){ this.m_primarySelectionColor=null; this.m_highContrastBorderStyle="solid"; this.m_secondarySelectionIsDisabled=false; if(_1be){ this.m_selectionController=_1be; this.m_oCognosViewer=_1be.m_oCognosViewer; if(this.m_oCognosViewer){ var _1bf=this.m_oCognosViewer.getUIConfig(); if(_1bf){ if(_1bf.getPrimarySelectionColor()){ this.m_primarySelectionColor=_1bf.getPrimarySelectionColor(); } if(!_1bf.getShowSecondarySelection()){ this.m_secondarySelectionIsDisabledConfig=true; }else{ if(_1bf.getSeondarySelectionColor()){ this.m_secondarySelectionColor=_1bf.getSeondarySelectionColor(); } } } } } }; CSelectionDefaultStyles.prototype.getPrimarySelectionColor=function(_1c0){ return this.m_primarySelectionColor; }; CSelectionDefaultStyles.prototype.getSecondarySelectionColor=function(){ return this.m_secondarySelectionColor; }; CSelectionDefaultStyles.prototype.getHighContrastBorderStyle=function(){ return this.m_highContrastBorderStyle; }; CSelectionDefaultStyles.prototype.canApplyToSelection=function(_1c1){ return true; }; CSelectionDefaultStyles.prototype.secondarySelectionIsDisabled=function(){ return this.m_secondarySelectionIsDisabled; }; CSelectionDefaultStyles.prototype.setStyleForSelection=function(){ }; function CSelectionFilterStyles(_1c2){ this.m_selectionController=_1c2; this.m_primarySelectionColor=this.m_primarySelectionFilterColor="#44BFDD"; this.m_primarySelectionFilterColorForMeasure=null; this.m_secondarySelectionColor=null; this.m_highContrastBorderStyle="dotted"; this.m_secondarySelectionIsDisabled=true; }; CSelectionFilterStyles.prototype=new CSelectionDefaultStyles(); CSelectionFilterStyles.prototype.getPrimarySelectionColor=function(_1c3){ return this.m_primarySelectionColor; }; CSelectionFilterStyles.prototype.getSecondarySelectionColor=function(){ return this.m_secondarySelectionColor; }; CSelectionFilterStyles.prototype.getHighContrastBorderStyle=function(){ return this.m_highContrastBorderStyle; }; CSelectionFilterStyles.prototype.secondarySelectionIsDisabled=function(){ return this.m_secondarySelectionIsDisabled; }; CSelectionFilterStyles.prototype.canApplyToSelection=function(_1c4){ return !this.selectionHasOnlyMeasure(_1c4); }; CSelectionFilterStyles.prototype.selectionHasOnlyMeasure=function(_1c5){ return (_1c5.length===1&&_1c5[0].length===1&&this.m_selectionController.isMeasure(_1c5[0][0])); }; CSelectionFilterStyles.prototype.setStyleForSelection=function(_1c6){ this.m_primarySelectionColor=(this.selectionHasOnlyMeasure(_1c6))?null:this.m_primarySelectionFilterColor; }; function CSelectionFilterContextMenuStyles(_1c7){ CSelectionDefaultStyles.call(this,_1c7); this.m_secondarySelectionIsDisabled=true; }; CSelectionFilterContextMenuStyles.prototype=new CSelectionDefaultStyles(); function CSelectionObject(){ this.initialize(); }; CSelectionObject.prototype.initialize=function(){ this.m_oCellRef={}; this.m_sColumnRef=""; this.m_sColumnName=""; this.m_aDataItems=[]; this.m_aUseValues=[]; this.m_aDisplayValues=[]; this.m_sCellTypeId=""; this.m_sLayoutType=""; this.m_sTag=""; this.m_aMuns=[]; this.m_aRefQueries=[]; this.m_aMetadataItems=[]; this.m_aDrillOptions=[]; this.m_selectionController={}; this.m_contextIds=[]; this.m_ctxAttributeString=""; this.m_fetchedContextIds=false; this.m_selectedClass=[]; this.m_cutClass=[]; this.m_dataContainerType=""; this.m_oJsonContext=null; }; CSelectionObject.prototype.isSelectionOnVizChart=function(){ return false; }; CSelectionObject.prototype.getCellRef=function(){ return this.m_oCellRef; }; CSelectionObject.prototype.getColumnRP_Name=function(){ if(this.m_oCellRef!=null){ return this.m_oCellRef.getAttribute("rp_name"); } }; CSelectionObject.prototype.getColumnRef=function(){ return this.m_sColumnRef; }; CSelectionObject.prototype.getColumnName=function(){ if(this.m_sColumnName==""){ if(this.m_selectionController.hasContextData()&&this.m_contextIds.length){ this.m_sColumnName=this.m_selectionController.getRefDataItem(this.m_contextIds[0][0]); } } return this.m_sColumnName; }; CSelectionObject.prototype.getDataItemDisplayValue=function(_1c8){ var _1c9=this.getDataItems(); var item=""; if(_1c9&&_1c9[0]&&_1c9[0][0]){ item=this.getDataItems()[0][0]; if(_1c8&&_1c8.itemInfo&&_1c8.itemInfo.length){ var _1cb=_1c8.itemInfo; for(var i=0;i<_1cb.length;i++){ if(_1cb[i].item===item&&_1cb[i].itemLabel){ return _1cb[i].itemLabel; } } } } return item; }; CSelectionObject.prototype.getDataItems=function(){ if(!this.m_aDataItems.length){ this.fetchContextIds(); for(var i=0;i0){ return true; } } } return false; }; CSelectionObject.prototype.isHomeCell=function(){ var _1ee=this.getCellRef().className; if(_1ee&&(_1ee=="xm"||_1ee.indexOf("xm ")!=-1||_1ee.indexOf(" xm")!=-1)){ return true; } return false; }; CSelectionObject.prototype.getDataContainerType=function(){ return this.m_dataContainerType; }; CSelectionObject.prototype.getContextJsonObject=function(_1ef,_1f0){ if(this.m_oJsonContext===null){ var _1f1={}; var _1f2=[]; var _1f3=null; this.getDataItems(); this.getUseValues(); if(this.m_contextIds.length==0){ return null; } var i=0,j=0; var _1f6=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_1ef); _1f3=_1f6; this._populateJsonContextObj(_1f6,this.m_aUseValues[i][j],_1ef.getDisplayValue(this.m_contextIds[i][j]),_1ef.getMun(this.m_contextIds[i][j]),_1f1,_1f2); j++; for(;i0){ _222=true; break; } } if(!_222){ j=0; i++; } }while(!_222); } var _223=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_21b); var _224=_21b.isMeasure(this.m_contextIds[i][j]); var _225=this._getBestPossibleItemReference(this.m_contextIds[i][j],_224,_21b.getCCDManager()); var _226=_21b.getCCDManager().GetQuery(this.m_contextIds[i][j]); var _227=this.isDataValueOrChartElement(); var _228=this._populateJsonForMarshal(_223,_225,_224,this.m_aUseValues[i][j],_21b.getDisplayValue(this.m_contextIds[i][j]),_21b.getMun(this.m_contextIds[i][j]),_227); j++; var _229=[]; for(;i0){ lid=lid.substring(0,lid.indexOf(_21c)-1); } this.m_oJsonForMarshal={"lid":lid,"query":_226,"selectedItem":_228,"context":_229}; } return this.m_oJsonForMarshal; }; CSelectionObject.prototype._populateJsonForMarshal=function(_22c,_22d,_22e,_22f,_230,mun,_232){ if(_22c){ var _233={}; _233["itemName"]=_22c; _233["isMeasure"]=_22e?"true":"false"; _233["mdProperty"]=_22d.mdProperty; _233["mdValue"]=_22d.mdValue; _233["isDataValueOrChartElement"]=_232?"true":"false"; if(mun){ _233["mun"]=mun; } if(_22f){ _233["use"]=_22f; } return _233; } return null; }; CSelectionObject.prototype._getBestPossibleItemReference=function(_234,_235,_236){ var _237=null; var _238=null; if(_235){ _238="i"; _237=_236.GetQMID(_234); if(_237==null){ _238="m"; _237=_236.GetMUN(_234); } if(_237==null){ _238="r"; _237=_236.GetRDIValue(_234); } }else{ _238="l"; _237=_236.GetLUN(_234); if(_237==null){ _238="h"; _237=_236.GetHUN(_234); } if(_237==null){ _238="i"; _237=_236.GetQMID(_234); } if(_237==null){ _238="r"; _237=_236.GetRDIValue(_234); } } return {"mdProperty":_238,"mdValue":_237}; }; CSelectionChartObject.prototype=new CSelectionObject(); CSelectionChartObject.prototype.constructor=CSelectionChartObject; CSelectionChartObject.baseclass=CSelectionObject.prototype; function CSelectionChartObject(){ CSelectionChartObject.baseclass.initialize.call(this); this.m_chartArea=null; this.m_context=""; this.m_chartCtxAreas=[]; this.m_selectedVizChart=false; }; CSelectionChartObject.prototype.isSelectionOnVizChart=function(){ return this.m_selectedVizChart; }; CSelectionChartObject.prototype.setSelectionOnVizChart=function(_239){ var _23a=this.m_selectionController.getSelectedChartImageFromChartArea(_239); if(_23a){ this.m_selectedVizChart=_23a.parentNode.getAttribute("vizchart")=="true"?true:false; } }; CSelectionChartObject.prototype.getArea=function(){ return this.m_chartArea; }; CSelectionChartObject.prototype.getContext=function(){ return this.m_context; }; CSelectionChartObject.prototype.getCtxAreas=function(){ return this.m_chartCtxAreas; }; CSelectionChartObject.prototype.setCtxAreas=function(_23b){ this.m_chartCtxAreas=_23b; }; CSelectionChartObject.prototype.getCtxAttributeString=function(){ return this.m_context; }; function CChartHelper(_23c,_23d,_23e){ var _23f=_23c.parentNode; this.m_selectionObjectFactory=_23d; this.m_map=_23f; _23e.loadExtra(); this.imageMapHighlighter=new CImageMapHighlight(_23f,_23e.sWebContentRoot); this.initialize(); }; CChartHelper.prototype.initialize=function(){ this.buildMapCtxAreas(); this.m_chartCtxNodes={}; }; CChartHelper.prototype.buildMapCtxAreas=function(){ var _240={}; var _241=this.m_map.childNodes; var _242=_241.length; var _243=null; for(var i=0;i<_242;i++){ var a=_241[i]; _243=a.getAttribute("ctx"); if(_243){ if(_240[_243]){ _240[_243].push(a); }else{ _240[_243]=[a]; } } } this.m_ctxAreas=_240; }; CChartHelper.prototype.getChartNode=function(_246){ if(!this.isAreaInitialized(_246)){ var _247=_246.parentNode; this.m_map=_247; this.initialize(); this.imageMapHighlighter.initialize(_247); } var _248=_246.getAttribute("ctx"); if(!this.m_chartCtxNodes[_248]){ this.m_chartCtxNodes[_248]=this.m_selectionObjectFactory.getSelectionChartObject(_246); this.m_chartCtxNodes[_248].setCtxAreas(this.m_ctxAreas[_248]); } return this.m_chartCtxNodes[_248]; }; CChartHelper.prototype.isAreaInitialized=function(_249){ return this.imageMapHighlighter.isAreaInitialized(_249); }; CChartHelper.prototype.getImageMapHighlighter=function(){ return this.imageMapHighlighter; }; function CSelectionObjectFactory(_24a){ this.m_selectionController=_24a; }; CSelectionObjectFactory.prototype.getSelectionController=function(){ return this.m_selectionController; }; CSelectionObjectFactory.prototype.getChildSpans=function(_24b){ var _24c=[]; for(var i=0;i<_24b.childNodes.length;i++){ var _24e=_24b.childNodes[i]; if(!_24e.getAttribute||_24e.getAttribute("skipSelection")!="true"){ _24c.push(_24b.childNodes[i]); } } var _24f=_24b; var _250=""; while(!_250&&_24f){ _250=_24f.attributes?_24f.attributes["LID"]:""; _24f=_24f.parentNode; } _250=_250?_250.value:""; var _251=[]; while(_24c.length>0){ var _24e=_24c.pop(); var lid=_24e.attributes?_24e.attributes["LID"]:""; lid=lid?lid.value:""; if(!lid||lid==_250){ if(_24e.nodeName.toLowerCase()=="span"){ _251.push(_24e); }else{ for(i=0;i<_24e.childNodes.length;i++){ _24c.push(_24e.childNodes[i]); } } } } return _251; }; CSelectionObjectFactory.prototype.getSelectionObject=function(_253,_254){ var _255=new CSelectionObject(); try{ _255.setSelectionController(this.getSelectionController()); _255.m_oCellRef=_253; _255.m_sColumnRef=_253.getAttribute("cid"); _255.m_sCellTypeId=_253.getAttribute("uid"); _255.m_sLayoutType=_253.getAttribute("type"); _255.m_sTag=_253.getAttribute("tag"); _255.m_layoutElementId=this.getLayoutElementId(_253); _255.m_dataContainerType=this.getContainerType(_253); if(typeof cf!="undefined"){ var _256=cf.cfgGet("MiniQueryObj"); if(_256){ var _257=_256.findChildWithAttribute("tag",_255.m_sTag); if(_257&&_257.getAttribute("id")!=null){ _255.m_sColumnName=_257.getAttribute("id"); } } } var _258=this.getChildSpans(_253); if(_258.length>0){ for(var i=0;i<_258.length;i++){ var _25a=_258[i]; if(_25a.nodeType==1&&_25a.nodeName.toLowerCase()=="span"&&_25a.style.visibility!="hidden"){ var _25b=null; if(_253.getAttribute("ctx")!=null&&_253.getAttribute("ctx")!=""){ _25b=_253; }else{ if(_25a.getAttribute("ctx")!=null&&_25a.getAttribute("ctx")!=""){ _25b=_25a; }else{ if(_25a.getAttribute("dtTargets")&&_25a.childNodes&&_25a.childNodes.length){ for(var _25c=0;_25c<_25a.childNodes.length;_25c++){ if(_25a.childNodes[_25c].nodeType==1&&_25a.childNodes[_25c].style.visibility!="hidden"){ _25b=_25a.childNodes[_25c]; } } }else{ for(var _25d=0;_25d<_25a.childNodes.length;_25d++){ var _25e=_25a.childNodes[_25d]; if(typeof _25e.getAttribute!="undefined"&&_25e.getAttribute("ctx")!=null&&_25e.getAttribute("ctx")!=""){ _25b=_25e; break; } } } } } var _25f=""; if(_25b&&_25b.getAttribute("ctx")){ _25f=_25b.getAttribute("ctx"); } _255.m_aDisplayValues[_255.m_aDisplayValues.length]=this.getSelectionController().getDisplayValue(_25f,_253.parentNode); if(typeof _254!="undefined"&&_254!=_25f){ continue; } _255=this.processCTX(_255,_25f); } } }else{ if(_253.getAttribute("ctx")!=null&&_253.getAttribute("ctx")!=""&&_255.m_sLayoutType=="datavalue"){ _255=this.processCTX(_255,_253.getAttribute("ctx")); } } this.getSelectionController().processColumnTitleNode(_255); } catch(ex){ } return _255; }; CSelectionObjectFactory.prototype.processCTX=function(_260,_261){ if(typeof _261!="string"||_261.length==0){ return _260; } var ctx; if(typeof _260.m_contextIds=="object"&&_260.m_contextIds!==null&&_260.m_contextIds.length>0){ var _263=_261.split("::"); for(ctx=0;ctx<_260.m_contextIds.length;++ctx){ try{ if(_263[ctx]){ _260.m_contextIds[ctx]=_260.m_contextIds[ctx].concat(_263[ctx].split(":")); } } catch(e){ } } }else{ _260.m_contextIds=this.m_selectionController.m_oCognosViewer.getReportContextHelper().processCtx(_261); } _260.m_ctxAttributeString=_261; return _260; }; CSelectionObjectFactory.prototype.getSecondarySelectionObject=function(tag,_265,_266){ if(!_266){ _266=document; } var _267=new CSelectionObject(); _267.setSelectionController(this.getSelectionController()); _267.m_oCellRef=null; _267.m_sColumnRef=null; _267.m_sCellTypeId=null; _267.refQuery=""; var _268=_266.getElementsByTagName("td"); for(var i=0;i<_268.length;i++){ var _26a=_268[i].getAttribute("tag"); if(_26a!=null&&_26a!=""){ if(tag==_26a){ var _26b=_268[i].className; if(_26b!=null&&_26a!=""){ if((_265=="columnTitle"&&_26b=="lt")||(_265=="datavalue"&&_26b=="lc")){ _267.m_sColumnRef=_268[i].getAttribute("cid"); _267.m_sCellTypeId=_268[i].getAttribute("uid"); break; } } } } } if(_267.m_sCellTypeId==null){ return null; } return _267; }; CSelectionObjectFactory.prototype.getSelectionChartObject=function(_26c){ var _26d=""; if(_26c.getAttribute("flashChart")!=null){ if(typeof _26c.getCtx!="undefined"){ try{ _26d=_26c.getCtx(); } catch(e){ _26d=""; } } }else{ _26d=_26c.getAttribute("ctx"); } var _26e=new CSelectionChartObject(); _26e.setSelectionController(this.getSelectionController()); if(_26d!=null){ _26e.m_contextIds=_26d.split("::"); for(var ctx=0;ctx<_26e.m_contextIds.length;++ctx){ _26e.m_contextIds[ctx]=_26e.m_contextIds[ctx].split(":"); } } _26e.m_layoutElementId=this.getLayoutElementId(_26c); _26e.m_sLayoutType=_26c.getAttribute("type"); _26e.m_chartArea=_26c; _26e.m_context=_26d; _26e.setSelectionOnVizChart(_26c); return _26e; }; CSelectionObjectFactory.prototype.getContainerTypeFromClass=function(_270){ var _271=""; switch(_270){ case "ls": _271="list"; break; case "xt": _271="crosstab"; break; case "rt": _271="repeaterTable"; break; } return _271; }; CSelectionObjectFactory.prototype.getContainerType=function(el){ var type=""; if(el){ if(el.className){ type=this.getContainerTypeFromClass(el.className); } if(!type){ var _274=el.parentNode; if(_274){ type=this.getContainerType(_274); } } } return type; }; CSelectionObjectFactory.prototype.getLayoutElementId=function(el){ var id=""; var _277=this.getSelectionController().getNamespace(); if(el){ if(el.getAttribute&&el.getAttribute("chartcontainer")=="true"){ for(var _278=0;_2780){ id=_27c[0].getAttribute("LID"); } } } } return id; }; function CSelectionController(_27d,_27e){ this.m_bSelectionBasedFeaturesEnabled=false; this.m_bDrillUpDownEnabled=false; this.m_bModelDrillThroughEnabled=false; this.m_oCognosViewer=null; this.m_bSavedSelections=false; if(_27e){ this.m_oCognosViewer=_27e; } this.initialize(_27d); this.FILTER_SELECTION_STYLE=0; this.FILTER_SELECTION_CONTEXT_MENU_STYLE=1; }; CSelectionController.prototype.initialize=function(_27f){ this.m_sNamespace=_27f; this.m_aCutColumns=[]; this.m_aSelectedObjects=[]; this.m_selectedClass=[]; this.m_cutClass=[]; this.m_oObserver=new CObserver(this); this.m_bSelectionArraysSetup=false; this.m_aSelectionHoverNodes=[]; this.m_bUsingCCDManager=false; this.m_aReportMetadataArray=[]; this.m_aReportContextDataArray=[]; this.m_oCDManager=new CCDManager(); this.m_oSelectionObjectFactory=new CSelectionObjectFactory(this); this.m_selectedChartArea=null; this.m_selectedChartNodes=[]; this.m_selectionContainerMap=null; this.m_chartHelpers={}; if(this.m_oCognosViewer!=null){ this.m_oCDManager.SetCognosViewer(this.m_oCognosViewer); } this.m_maxSecondarySelection=-1; this.c_usageMeasure="2"; this.m_ccl_dateTypes={59:"dateTime",60:"interval"}; this.m_selectionStyles=new CSelectionDefaultStyles(this); this.m_originalSelectionStyles=this.m_selectionStyles; this.m_bAllowHorizontalDataValueSelection=false; }; CSelectionController.prototype.secondarySelectionIsDisabled=function(){ return this.m_selectionStyles.secondarySelectionIsDisabled(); }; CSelectionController.prototype.getPrimarySelectionColor=function(){ return this.m_selectionStyles.getPrimarySelectionColor(); }; CSelectionController.prototype.getHighContrastBorderStyle=function(){ return this.m_selectionStyles.getHighContrastBorderStyle(); }; CSelectionController.prototype.getSecondarySelectionColor=function(){ return this.m_selectionStyles.getSecondarySelectionColor(); }; CSelectionController.prototype.resetSelectionStyles=function(){ this.setSelectionStyles(); }; CSelectionController.prototype.setSelectionStyles=function(_280){ switch(_280){ case this.FILTER_SELECTION_STYLE: if(!this.m_selectionFilterStyles){ this.m_selectionFilterStyles=new CSelectionFilterStyles(this); } this.m_selectionStyles=this.m_selectionFilterStyles; break; case this.FILTER_SELECTION_CONTEXT_MENU_STYLE: if(!this.m_selectionFilterContextMenuStyles){ this.m_selectionFilterContextMenuStyles=new CSelectionFilterContextMenuStyles(this); } this.m_selectionStyles=this.m_selectionFilterContextMenuStyles; break; default: this.m_selectionStyles=this.m_originalSelectionStyles; } }; CSelectionController.prototype.resetAllowHorizontalDataValueSelection=function(){ this.m_bAllowHorizontalDataValueSelection=false; }; CSelectionController.prototype.setAllowHorizontalDataValueSelection=function(_281){ this.m_bAllowHorizontalDataValueSelection=_281; }; CSelectionController.prototype.allowHorizontalDataValueSelection=function(){ return this.m_bAllowHorizontalDataValueSelection; }; CSelectionController.prototype.clearSelectionData=function(){ this.m_aSelectedObjects=[]; this.m_selectedChartNodes=[]; this.m_oSelectedDrillThroughImage=null; this.m_oSelectedDrillThroughSingleton=null; }; CSelectionController.prototype.getCCDManager=function(){ return this.m_oCDManager; }; CSelectionController.prototype.getCtxIdFromDisplayValue=function(_282){ if(!this.m_bUsingCCDManager){ var _283=this.getReportContextDataArray(); var _284=1; for(var _285 in _283){ var _286=_283[_285]; if(_286[_284]==_282){ return _285; } } return ""; }else{ var sId=this.m_oCDManager.GetContextIdForDisplayValue(_282); return (sId==null)?"":sId; } }; CSelectionController.prototype.getCtxIdFromMetaData=function(sLun,sHun,_28a){ return this.m_oCDManager.getContextIdForMetaData(sLun,sHun,_28a); }; CSelectionController.prototype.replaceNamespaceForSharedTM1DimensionOnly=function(lun,hun,mun){ var sLun=lun; var sHun=hun; if(mun&&mun.indexOf("->:[TM].")>0){ sLun=this.m_oCDManager._replaceNamespaceForSharedTM1DimensionOnly(lun); sHun=this.m_oCDManager._replaceNamespaceForSharedTM1DimensionOnly(hun); } return {"lun":sLun,"hun":sHun}; }; CSelectionController.prototype.getCtxIdFromMun=function(sMun){ if(!this.m_bUsingCCDManager){ var _291=this.getReportMetadataArray(); var _292=0; for(var sKey in _291){ var _294=_291[sKey]; if(_294[_292]==sMun){ var _295=2; var _296=this.getReportContextDataArray(); for(var _297 in _296){ var _298=_296[_297]; if(_298[_295]==sKey){ return _297; } } } } return ""; }else{ var sId=this.m_oCDManager.GetContextIdForMUN(sMun); return (sId==null)?"":sId; } }; CSelectionController.prototype.canDrillDown=function(_29a){ var _29b=this.getDrillFlagForMember(_29a); return (_29b==3||_29b==2); }; CSelectionController.prototype.canDrillUp=function(_29c){ var _29d=this.getDrillFlagForMember(_29c); return (_29d==3||_29d==1); }; CSelectionController.prototype.getQueryModelId=function(_29e){ var qmid=""; if(!this.m_bUsingCCDManager){ var _2a0=this.m_aReportContextDataArray[_29e]; if(_2a0&&typeof _2a0[3]!="undefined"){ var _2a1=_2a0[3]; var _2a2=this.m_aReportMetadataArray[_2a1]; if(typeof _2a2!="undefined"&&typeof _2a2[1]!="undefined"&&_2a2[1]=="I"){ qmid=_2a2[0]; } } }else{ qmid=this.m_oCDManager.GetQMID(_29e); } return qmid; }; CSelectionController.prototype.getRefQuery=function(_2a3){ if(!this.m_bUsingCCDManager){ return this.getMetaDataItemUseValue(4,_2a3); }else{ var _2a4=this.m_oCDManager.GetQuery(_2a3); return (_2a4==null)?"":_2a4; } }; CSelectionController.prototype.getRefDataItem=function(_2a5){ return this.m_oCognosViewer.getReportContextHelper().getRefDataItem(_2a5); }; CSelectionController.prototype.getMun=function(_2a6){ return this.m_oCognosViewer.getReportContextHelper().getMun(_2a6); }; CSelectionController.prototype.getHun=function(_2a7){ if(!this.m_bUsingCCDManager){ var sHun=null; var _2a9=this.getRDI(_2a7); if(_2a9&&_2a9.length>4&&_2a9[1]=="R"){ var _2aa=_2a9[4]; var _2ab=this.getReportMetadataArray(); _2a9=_2ab[_2aa]; } if(_2a9&&_2a9.length>1&&_2a9[1]=="H"){ sHun=_2a9[0]; } return sHun; }else{ return this.m_oCDManager.GetHUN(_2a7); } }; CSelectionController.prototype.fetchContextData=function(_2ac,_2ad){ var _2ae=0; if(this.m_bUsingCCDManager){ _2ae=this.m_oCDManager.FetchContextData(_2ac,_2ad); } return _2ae; }; CSelectionController.prototype.getMetaDataItem=function(sKey){ var _2b0=this.getReportMetadataArray(); if(typeof _2b0[sKey]!="undefined"){ return _2b0[sKey]; } return null; }; CSelectionController.prototype.getContextDataItem=function(_2b1){ var _2b2=this.getReportContextDataArray(); if(typeof _2b2[_2b1]!="undefined"){ return _2b2[_2b1]; } return null; }; CSelectionController.prototype.getMetaDataItemUseValue=function(_2b3,_2b4){ var _2b5=this.getContextDataItem(_2b4); if(_2b5!=null){ var _2b6=_2b5[_2b3]; if(_2b6!=""){ var _2b7=this.getMetaDataItem(_2b6); if(_2b7!=null){ return _2b7[0]; } } } return ""; }; CSelectionController.prototype.getRDI=function(_2b8){ var _2b9=this.getContextDataItem(_2b8); if(_2b9!=null){ var _2ba=_2b9[0]; if(_2ba!=""){ var _2bb=this.getMetaDataItem(_2ba); if(_2bb!=null){ return _2bb; } } } }; CSelectionController.prototype.getNamespace=function(){ return this.m_sNamespace; }; CSelectionController.prototype.setSelectionBasedFeaturesEnabled=function(_2bc){ this.m_bSelectionBasedFeaturesEnabled=_2bc; }; CSelectionController.prototype.getSelectionBasedFeaturesEnabled=function(){ return this.m_bSelectionBasedFeaturesEnabled; }; CSelectionController.prototype.setDrillUpDownEnabled=function(_2bd){ this.m_bDrillUpDownEnabled=_2bd; }; CSelectionController.prototype.getDrillUpDownEnabled=function(){ return this.m_bDrillUpDownEnabled; }; CSelectionController.prototype.setModelDrillThroughEnabled=function(_2be){ this.m_bModelDrillThroughEnabled=_2be; }; CSelectionController.prototype.getBookletItemForCurrentSelection=function(){ var _2bf=this.getAllSelectedObjects(); if(_2bf&&_2bf.length>0){ var _2c0=_2bf[0]; if(_2c0.hasContextInformation()){ var _2c1=this.m_oCDManager.GetBIValue(_2c0.m_contextIds[0][0]); if(!_2c1){ return null; } return _2c1; } } return null; }; CSelectionController.prototype.getModelPathForCurrentSelection=function(){ var _2c2=null; var _2c3=this.getBookletItemForCurrentSelection(); if(_2c3){ var _2c2=this.m_oCDManager.getModelPathFromBookletItem(_2c3); } return _2c2; }; CSelectionController.prototype.getModelDrillThroughEnabled=function(){ var _2c4=this.getBookletItemForCurrentSelection(); if(_2c4){ var _2c5=this.m_oCDManager.GetBookletModelBasedDrillThru(_2c4); return _2c5==1?true:false; }else{ return this.m_bModelDrillThroughEnabled; } }; CSelectionController.prototype.clearSelectedObjects=function(_2c6){ try{ if(!_2c6){ _2c6=document; } this.updateUI(_2c6,this.getSelections(),true,false); this.m_aSelectedObjects=[]; if(typeof this.onSelectionChange=="function"){ this.onSelectionChange(); } return true; } catch(e){ return false; } }; CSelectionController.prototype.resetSelections=function(_2c7){ try{ if(!_2c7){ _2c7=document; } if(this.hasSelectedChartNodes()){ this.resetChartSelections(_2c7); } this.m_oSelectedDrillThroughImage=null; this.m_oSelectedDrillThroughSingleton=null; if(this.getSelections()){ this.updateUI(_2c7,this.getSelections(),true,false); this.updateUI(_2c7,this.getCutColumns(),true,false); this.m_aCutColumns=[]; this.m_aSelectedObjects=[]; this.m_selectedClass=[]; this.m_cutClass=[]; if(typeof this.onSelectionChange=="function"){ this.onSelectionChange(); } } return true; } catch(e){ return false; } }; CSelectionController.prototype.resetChartSelections=function(_2c8){ var _2c9=this.m_chartHelpers; for(var _2ca in _2c9){ if(_2c9[_2ca]){ var _2cb=_2c9[_2ca].getImageMapHighlighter(); if(_2cb.hideAllAreas){ _2cb.hideAllAreas(); } } } this.m_selectedChartNodes=[]; this.m_selectionContainerMap=null; }; CSelectionController.prototype.addSelectionObject=function(_2cc,_2cd){ try{ if(!_2cd){ _2cd=document; } var _2ce=_2cc.getCellRef(); if(this.isCellSelected(_2ce)!==true||(typeof _2ce!="object"||_2ce===null)){ if(this.isColumnCut(_2cc.getTag())!==true){ this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_2cc; if(typeof this.onSelectionChange=="function"){ this.onSelectionChange(); } this.updateUI(_2cd,this.getSelections(),false,false); } } return true; } catch(e){ return false; } }; CSelectionController.prototype.removeSelectionObject=function(_2cf,_2d0){ try{ if(!_2d0){ _2d0=document; } var _2d1=[]; var _2d2; for(_2d2=0;_2d20){ this.updateUI(_2d0,this.getSelections(),true,false); var _2d5=[]; for(_2d2=0;_2d20){ return true; } return false; }; function getStyleFromClass(c){ for(var i=0;i0){ var _315,_316,_317; if(_314==1||_314==2){ if(_313){ this.deselecting(this.m_cutClass); }else{ var _318=getStyleFromClass("cutSelection").style.color; var _319=getStyleFromClass("cutSelection").style.backgroundColor; _315=_312.length; for(_316=0;_316<_315;_316++){ _317=_312[_316].getCellRef(); var _31a="cutQS"+_317.getAttribute("cid"); this.selecting(_31a,"\n{ background-color: "+_319+"; color: "+_318+";}\n"); this.m_cutClass.push(_31a); } } }else{ if(this.m_oCognosViewer){ this.findSelectionURLs(); _317=""; _315=_312.length; for(_316=0;_316<_315;_316++){ _317=_312[_316].getCellRef(); if(_317.getAttribute("oldClassName")!=null){ _317.className=_317.getAttribute("oldClassName"); _317.removeAttribute("oldClassName"); } this.setStyleForSelection(_312[_316].m_contextIds); if(!this.secondarySelectionIsDisabled()||_313){ var _31b=document.getElementById("CVReport"+this.getNamespace()); var _31c=getElementsByAttribute(_31b,["td","th"],"name",_317.getAttribute("name"),this.m_maxSecondarySelection); for(var _31d=0;_31d<_31c.length;_31d++){ var cell=_31c[_31d]; if(_313){ this.restoreOldBackgroundImage(cell); }else{ if(cell.getAttribute("oldBackgroundImageStyle")==null){ this.saveOldCellStyles(cell); this.setSecondarySelectionStyles(cell); } } } } this.saveOldCellStyles(_317); if(_313){ this.restoreOldBackgroundImage(_317); if(this.m_oCognosViewer.isHighContrast()){ this.restoreOldBorder(_317); this.restoreOldPadding(_317); } }else{ this.setPrimarySelectionStyles(_317); if(this.m_oCognosViewer.isHighContrast()){ var size=getBoxInfo(_317,true); this.saveOldBorder(_317); this.saveOldPadding(_317,size); var _320=3; var _321=size.borderTopWidth+size.paddingTop-_320; var _322=size.borderBottomWidth+size.paddingBottom-_320; var _323=size.borderLeftWidth+size.paddingLeft-_320; var _324=size.borderRightWidth+size.paddingRight-_320; _317.style.border=_320+"px "+this.getHighContrastBorderStyle()+" black"; _317.style.padding=_321+"px "+_324+"px "+_322+"px "+_323+"px"; } } } } } } return true; } catch(e){ return false; } }; CSelectionController.prototype.findSelectionURLs=function(){ if(!(this.sS_backgroundImageURL&&this.pS_backgroundImageURL)){ if(this.m_oCognosViewer.isBux||isSafari()||this.m_oCognosViewer.isMobile()){ this.pS_backgroundImageURL="url(../common/images/selection_primary.png)"; this.sS_backgroundImageURL="url(../common/images/selection_secondary.png)"; }else{ this.pS_backgroundImageURL=this.getBackgroundImage(getStyleFromClass("primarySelection")); this.sS_backgroundImageURL=this.getBackgroundImage(getStyleFromClass("secondarySelection")); } } }; CSelectionController.prototype.setSelectedChartImgArea=function(_325){ var _326=true; var _327=_325.getAttribute("rsvpChart"); var _328=_325.parentNode.getAttribute("chartContainer"); if(_327!="true"&&_328!="true"){ this.m_selectedChartNodes=[]; _326=false; }else{ var _329=this.getSelectionObjectFactory().getSelectionChartObject(_325); this.m_selectedChartNodes=[_329]; } return _326; }; CSelectionController.prototype.setSelectedChartArea=function(_32a,e){ var _32c=typeof this.m_oCognosViewer.isBux!=="undefined"; var _32d=false; if(_32a!==null){ if(_32a.tagName=="IMG"){ _32d=this.setSelectedChartImgArea(_32a); }else{ if(_32a.nodeName=="AREA"&&_32a.attributes["ctx"]){ _32d=true; if(_32c){ this.setBuxSelectedChartArea(_32a,e); }else{ this.m_selectedChartNodes=[this.getSelectionObjectFactory().getSelectionChartObject(_32a)]; } } } if(_32d){ this.getObservers().notify(); } } return _32d; }; CSelectionController.prototype.setBuxSelectedChartArea=function(_32e,e){ var _330=this.getChartHelper(_32e); var _331=_330.getChartNode(_32e); this.setStyleForSelection(_331.m_contextIds); var _332=_330.getImageMapHighlighter(); _332.setFillColour(this.getPrimarySelectionColor()); _332.setStrokeColour(this.getPrimarySelectionColor()); if(typeof e=="undefined"){ e={}; } if(this.ctrlKeyPressed(e)||this.shiftKeyPressed(e)){ if(_332.isAreaHighlighted(_32e)){ _332.hideAreas(_331.getCtxAreas()); var _333=_32e.getAttribute("ctx"); var _334=this.m_selectedChartNodes.length; for(var i=0;i<_334;i++){ var _336=this.m_selectedChartNodes[i]; if(_333==_336.getContext()){ this.m_selectedChartNodes.splice(i,1); break; } } }else{ this.updateSelectionContainer(_32e); _332.highlightAreas(_331.getCtxAreas(),true); this.m_selectedChartNodes.push(_331); } }else{ if(this.hasSavedSelectedChartNodes()){ var _337=this.m_savedSelectedChartNodes.length; var _338=this.m_savedSelectedChartNodes; for(var i=0;i<_337;i++){ var area=_338[i].getArea(); var _33a=this.getSavedChartHelper(area); var _33b=_33a.getImageMapHighlighter(); var _33c=_33b.getAreaId(area); if(_332.getAreaId(_32e)===_33c){ _33b.hideAreaById(_33c+this.m_savedPrimarySelectionColor); break; } } } this.updateSelectionContainer(_32e); _332.highlightAreas(_331.getCtxAreas()); this.m_selectedChartNodes=[_331]; } }; CSelectionController.prototype.updateSelectionContainer=function(_33d){ var _33e=_33d.parentNode; if(this.m_selectionContainerMap&&this.m_selectionContainerMap.name!=_33e.name){ var _33f=this.getChartHelper(_33d).getImageMapHighlighter(); _33f.hideAllAreas(); } this.m_selectionContainerMap=_33e; }; CSelectionController.prototype.getChartHelper=function(_340){ var _341=_340.parentNode; var _342=_341.name; if(!this.m_chartHelpers[_342]){ this.m_chartHelpers[_342]=new CChartHelper(_340,this.getSelectionObjectFactory(),this.m_oCognosViewer); } return this.m_chartHelpers[_342]; }; CSelectionController.prototype.getSavedChartHelper=function(_343){ var _344=_343.parentNode; var _345=_344.name; return this.m_savedChartHelpers[_345]; }; CSelectionController.prototype.getSelectedChartArea=function(){ return this.m_selectedChartArea; }; CSelectionController.prototype.getSelectedChartNodes=function(){ return this.m_selectedChartNodes; }; CSelectionController.prototype.hasSelectedChartNodes=function(){ return this.m_selectedChartNodes&&this.m_selectedChartNodes.length&&this.m_selectedChartNodes.length>0; }; CSelectionController.prototype.getSelectedChartImage=function(){ var _346=null; if(this.hasSelectedChartNodes()){ var _347=this.m_selectedChartNodes[0]; _346=_347.getArea(); } if(_346===null){ return null; } if(_346.tagName=="IMG"){ return _346; } return this.getSelectedChartImageFromChartArea(_346); }; CSelectionController.prototype.getSelectedChartImageFromChartArea=function(_348){ var _349=_348.parentNode; var _34a="#"+_349.getAttribute("name"); return this.checkChildrenForChart(_349.parentNode,_34a); }; CSelectionController.prototype.checkChildrenForChart=function(_34b,_34c){ var _34d=_34b.firstChild; while(_34d!==null){ if(!_34d.tagName){ return null; }else{ if(_34d.tagName=="IMG"&&_34d.getAttribute("usemap")==_34c){ return _34d; }else{ if(_34d.tagName==="DIV"||_34d.tagName==="SPAN"){ var _34e=this.checkChildrenForChart(_34d,_34c); if(_34e){ return _34e; } } } } _34d=_34d.nextSibling; } return null; }; CSelectionController.prototype.downloadSelectedChartImage=function(_34f){ var _350=this.getSelectedChartImage(); if(_350!==null){ var _351=this.getDocumentFromImage(_350); var _352=_350.name.replace(".","_"); var _353=_352.substr(5); var _354="?m_name="; _354+=_353; _354+="&format=png&b_action=xts.run&m=portal/download.xts&m_obj="; if(isIE()){ _352=_351.parentWindow.eval("graphicSrc"+_353); }else{ _352=_351.defaultView.eval("graphicSrc"+_353); } var _355=""; if(typeof _352!="undefined"&&_352!==null){ var _356=_352.split("&"); if(_356.length===0){ return; } if(_352.indexOf("/repository/")<0){ for(var i=0;i<_356.length;++i){ var _358=_356[i]; var _359=_358.indexOf("="); if(_359!=-1){ var _35a=_358.substr(0,_359); var _35b=_358.slice(_359+1); if(_35a=="search"){ _355+=_35b; break; } } } } if(_355==""){ _354=_350.getAttribute("src"); if(_354.indexOf("?")!=-1){ _354+="&download=true"; }else{ _354+="?download=true"; } } if(typeof getConfigFrame=="function"){ _354+=_355; _354=getConfigFrame().constructGETRequestParamsString(_354); window.open(_354,"_blank","width=0,height=0"); }else{ _354=constructGETRequestParamsString(_354); _354+=_355; var _35c=this.m_oCognosViewer.getGateway(); var _35d=document.getElementById("CVIFrame"+this.m_sNamespace); if(_35d){ var _35e=_35d.src; if(_35e.indexOf("repository")>=0&&_354.indexOf("repository")<0){ var _35f=_35e.indexOf("content"); _354=_35e.substring(0,_35f)+_354; } } if(_354.indexOf(_35c)==-1){ var _360=document.forms["formWarpRequest"+_34f]; _354=_360.action+_354; } if(typeof window.detachLeavingRV=="function"){ window.detachLeavingRV(); } location.href=_354; if(typeof window.attachLeavingRV=="function"){ setTimeout(window.attachLeavingRV,100); } } } } }; CSelectionController.prototype.getDocumentFromImage=function(_361){ var _362=null; if(_361.ownerDocument){ _362=_361.ownerDocument; }else{ _362=_361.document; } return _362; }; CSelectionController.prototype.shouldExecutePageClickedOnMouseDown=function(e){ var _364=this.getSelections(); if(_364.length>1){ if(this.m_oCognosViewer.envParams["ui.action"]!=="view"){ var node=getNodeFromEvent(e); try{ while(node&&(node.nodeType==3||(node.getAttribute&&node.getAttribute("uid")===null))){ node=node.parentNode; } } catch(ex){ } var _366=this.getSelectionObjectFactory().getContainerType(node); if(_366==="list"){ for(var i=0;i<_364.length;i++){ if(_364[i].m_oCellRef==node){ return false; } } } } } return true; }; CSelectionController.prototype.getContainerType=function(){ var _368=""; if(this.hasSelectedChartNodes()){ _368="chart"; }else{ if(this.getDataContainerType()==="list"){ _368="list"; }else{ _368="crosstab"; } } return _368; }; CSelectionController.prototype.getDisplayValues=function(){ var _369={}; var _36a=this.getAllSelectedObjects()[0]; if(_36a){ var _36b=_36a.getSelectedContextIds(); if(_36b){ for(var axis=0;axis<_36b.length;axis++){ var _36d=[]; var _36e=_36b[axis]; for(var _36f=0;_36f<_36e.length;_36f++){ var _370=_36e[_36f]; var _371=this.getDisplayValue(_370); _36d.push(_371); if(axis===0){ break; } } var _372=""; switch(axis){ case 0: _372="selected"; break; case 1: _372="rows"; break; default: _372="columns"; } _369[_372]=_36d; } } } return _369; }; CSelectionController.prototype.getChartTooltip=function(){ var _373=this.getAllSelectedObjects()[0]; if(_373){ var area=_373.getArea(); if(area){ var _375=area.getAttribute("title"); if(_375&&_375.length>0){ return area.getAttribute("title"); } } } return ""; }; CSelectionController.prototype.pageClickedForMobile=function(e){ this.pageClicked(e); var _377=this.getAllSelectedObjects().length; if(_377==0){ var node=getNodeFromEvent(e,true); if(!node){ return false; } if(node.nodeName.toLowerCase()=="img"&&node.getAttribute("dttargets")){ this.selectDrillThroughImage(node); return true; }else{ if(node.getAttribute("dttargets")){ this.selectDrillThroughSingleton(node); return true; }else{ if(node.parentNode&&node.parentNode.getAttribute("dttargets")){ this.selectDrillThroughSingleton(node.parentNode); return true; } } } return false; } return true; }; CSelectionController.prototype.clearSavedSelections=function(){ this.m_bSavedSelections=false; if(this.hasSavedSelectedObjects()){ this.updateUI(null,this.getSavedSelectedObjects(),true,false); delete (this.m_aSavedSelectedObjects); } if(this.hasSavedSelectedChartNodes()){ var _379=this.m_savedChartHelpers; for(var _37a in _379){ if(_379[_37a]){ var _37b=_379[_37a].getImageMapHighlighter(); if(_37b.hideAllAreas){ _37b.hideAllAreas(); } } } delete this.m_savedChartHelpers; delete this.m_savedSelectedChartNodes; } }; CSelectionController.prototype.hasSavedSelectedChartNodes=function(){ return (this.m_savedSelectedChartNodes&&this.m_savedSelectedChartNodes.length>0); }; CSelectionController.prototype.getSavedSelectedChartNodes=function(){ return this.m_savedSelectedChartNodes; }; CSelectionController.prototype.saveSelections=function(){ this.m_savedSelectionStyles=this.m_selectionStyles; if(this.m_aSelectedObjects.length>0){ this.m_aSavedSelectedObjects=[]; var _37c=this.m_aSelectedObjects.length; var temp=[]; for(var i=0;i<_37c;i++){ if(this.isMeasure(this.m_aSelectedObjects[i].m_contextIds[0][0])){ temp.push(this.m_aSelectedObjects[i]); }else{ this.m_aSavedSelectedObjects.push(this.m_aSelectedObjects[i]); } } this.m_aSelectedObjects=temp; } if(this.hasSelectedChartNodes()){ this.m_savedChartHelpers=this.m_chartHelpers; this.m_chartHelpers={}; this.m_savedSelectedChartNodes=[]; var _37f=this.m_selectedChartNodes.length; var temp=[]; for(var i=0;i<_37f;i++){ if(this.isMeasure(this.m_selectedChartNodes[i].m_contextIds[0][0])){ var _380=this.m_selectedChartNodes[i].getArea(); var _381=this.getImageMapName(_380); this.m_chartHelpers[_381]=this.m_savedChartHelpers[_381]; delete this.m_savedChartHelpers[_381]; temp.push(this.m_selectedChartNodes[i]); }else{ this.m_savedSelectedChartNodes.push(this.m_selectedChartNodes[i]); } } this.m_selectedChartNodes=temp; } this.m_bSavedSelections=true; }; CSelectionController.prototype.hasSavedSelections=function(){ return this.m_bSavedSelections; }; CSelectionController.prototype.hasSavedSelectedObjects=function(){ return (this.m_aSavedSelectedObjects&&this.m_aSavedSelectedObjects.length>0)||this.hasSavedSelectedChartNodes(); }; CSelectionController.prototype.getSavedSelectedObjects=function(){ return this.m_aSavedSelectedObjects; }; CSelectionController.prototype.getImageMapName=function(_382){ var _383=_382.parentNode; return _383.name; }; CSelectionController.prototype.repaintBUXSelectedChartArea=function(_384,_385,_386){ var _387={}; var _388=_384.length; for(var i=0;i<_388;i++){ var _38a=_384[i].getArea(); var _38b=this.getImageMapName(_38a); var _38c; if(!_387[_38b]){ _38c=(_385)?this.getSavedChartHelper(_38a):this.getChartHelper(_38a); _387[_38b]=_38c; var _38d=_38c.getImageMapHighlighter(); _38d.hideAllAreas(); _38d.setFillColour(this.getPrimarySelectionColor()); _38d.setStrokeColour(this.getPrimarySelectionColor()); }else{ _38c=_387[_38b]; } var _38e=_384[i].m_contextIds; if(_386&&_38e.length===1&&_38e[0].length===1&&this.isMeasure(_38e[0][0])){ continue; } _38d.highlightAreas(_384[i].getCtxAreas(),1); } }; CSelectionController.prototype.repaintSavedSelections=function(){ var _38f=this.m_selectionStyles; this.m_selectionStyles=this.m_savedSelectionStyles; var _390=this.getSavedSelectedChartNodes(); var _391=false; if(_390&&_390.length>0){ bIsChart=true; }else{ _390=this.getSavedSelectedObjects(); } this.repaintSelectionsHelper(_390,true,_391); this.resetSelectionStyles(); this.m_selectionStyles=_38f; }; CSelectionController.prototype.repaintSelections=function(){ var _392=this.getSelectedChartNodes(); var _393=false; if(_392&&_392.length>0){ _393=true; }else{ _392=this.getSelections(); } this.repaintSelectionsHelper(_392,false,_393); }; CSelectionController.prototype.repaintSelectionsHelper=function(_394,_395,_396){ try{ if(_396){ this.repaintBUXSelectedChartArea(_394,_395); }else{ this.updateUI(document,_394,true,false); this.updateUI(document,_394,false,false); } } catch(e){ return false; } }; CSelectionController.prototype.resetAll=function(){ this.resetSelectionStyles(); this.clearSavedSelections(); this.resetSelections(); this.resetAllowHorizontalDataValueSelection(); }; CSelectionController.prototype.pageClicked=function(e){ try{ var node=getNodeFromEvent(e); if(this.m_aSelectedObjects.length>0&&!this.shiftKeyPressed(e)&&!this.ctrlKeyPressed(e)){ var _399=node; if(!_399.getAttribute("uid")){ var _39a=_399.parentNode; if(_39a&&_39a.nodeType==1&&typeof _39a.getAttribute!="undefined"&&_39a.getAttribute("uid")!=null){ _399=_39a; } } if(this.isCellSelected(_399)){ if(typeof this.m_oCognosViewer.isBux!=="undefined"){ this.repaintSelections(); } if(e.button!==0){ return false; } } } if(node.tagName&&node.tagName.toUpperCase()=="INPUT"){ return true; } if((e.keyCode!=null)&&(e.keyCode!=13)&&(e.keyCode!=32)&&(e.keyCode!=27)&&(e.keyCode!=0)&&(e.keyCode!=121)&&(e.keyCode!=93)){ return false; } var _39b=getDocumentFromEvent(e); if(!this.hasContextData()||!this.hasMetadata()){ if(node.nodeName=="AREA"||node.nodeName=="IMG"||(typeof node.getAttribute=="function"&&node.getAttribute("flashChart")!=null)){ this.setSelectedChartArea(node,e); } this.getObservers().notify(); return false; } if(typeof node.selectedCell!="undefined"){ var _39c=node; node=node.selectedCell; _39c.removeAttribute("selectedCell"); } if(typeof cf!="undefined"&&typeof cf.hidePickers=="function"){ cf.hidePickers(); } if(e.keyCode==27){ if(typeof g_reportSelectionController!="undefined"){ g_reportSelectionController.clearSelections(); } this.resetSelections(_39b); }else{ if(node.nodeName=="AREA"||node.nodeName=="IMG"||(typeof node.getAttribute!="undefined"&&node.getAttribute("flashChart")!=null)){ if(e.button!==2||this.getAllSelectedObjects().length<=1||typeof this.m_oCognosViewer.isBux==="undefined"){ this.selectNode(node,e); this.setSelectedChartArea(node,e); } }else{ if(!(node.firstChild==null&&node.cellIndex==0&&node.parentNode.rowIndex==0&&node.getAttribute("cid")==null)){ var _39d=this.m_oCognosViewer.getViewerWidget(); this.selectNode(node,e); } } } if(window.gViewerLogger){ window.gViewerLogger.addContextInfo(this); } } catch(e){ } }; CSelectionController.prototype.getSelectionObjectFactory=function(){ return this.m_oSelectionObjectFactory; }; CSelectionController.prototype.isDrillLinkOnCrosstabCell=function(node){ return (node.getAttribute("ctx")==null&&node.parentNode.getAttribute("dtTargets")!=null); }; CSelectionController.prototype.selectObject=function(sMun,sLun,sHun,_3a2){ var _3a3=this.getCtxIdFromMun(sMun); if(_3a3==""){ _3a3=this.getCtxIdFromMetaData(sLun,sHun,_3a2); } if(_3a3!=null&&this.m_oCDManager.GetUsage(_3a3)!="2"){ var _3a4=document.getElementById("rt"+this.getNamespace()); if(_3a4!=null){ var _3a5=getElementsByAttribute(_3a4,"*","ctx",_3a3); if(_3a5&&_3a5.length===0){ var _3a6=new RegExp("(^|:)"+_3a3+"(:|$)","i"); _3a5=getElementsByAttribute(_3a4,"*","ctx",_3a3,-1,_3a6); } var _3a7=null; if(_3a5!=null&&_3a5.length>0){ _3a7=new CSelectionObject(); _3a7.setSelectionController(this); _3a7.m_sColumnRef=_3a5[0].getAttribute("cid"); _3a7.m_sCellTypeId=_3a5[0].getAttribute("uid"); _3a7.m_sLayoutType=_3a5[0].getAttribute("type"); _3a7.m_sTag=_3a5[0].getAttribute("tag"); _3a7.m_layoutElementId=this.m_oSelectionObjectFactory.getLayoutElementId(_3a5[0]); _3a7.m_dataContainerType=this.m_oSelectionObjectFactory.getContainerType(_3a5[0]); _3a7.m_contextIds=[[_3a3]]; this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_3a7; }else{ var _3a8=getElementsByAttribute(_3a4,"*","flashChart","true"); if(_3a8!=null){ for(var _3a9=0;_3a9<_3a8.length;++_3a9){ var ldx=_3a8[_3a9].getLDX(); if(ldx.indexOf(""+_3a3+"")!=-1){ _3a7=new CSelectionObject(); _3a7.setSelectionController(this); var lid=_3a8[_3a9].getAttribute("lid"); _3a7.m_layoutElementId=lid.replace(this.m_oCognosViewer.getId(),""); _3a7.m_dataContainerType="chart"; _3a7.m_contextIds=[[_3a3]]; this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_3a7; } } } } } } }; CSelectionController.prototype.buildSelectionObject=function(node,e){ var _3ae=null; try{ while(node.nodeType==3){ node=node.parentNode; } if(this.isDrillLinkOnCrosstabCell(node)){ node=node.parentNode; } var ctx=node.getAttribute("ctx"); var uid=node.getAttribute("uid"); if((uid==null)&&((ctx!=null)||(node.parentNode&&node.parentNode.nodeType==1&&typeof node.parentNode.getAttribute!="undefined"&&node.parentNode.getAttribute("uid")!=null))){ if(node.nodeName=="IMG"&&(node.src.indexOf("SM=")>-1||(isIE()>-1&&node.src.indexOf("space.gif")>-1))){ return null; } node=node.parentNode; if((node.className.toUpperCase()=="BLOCK"&&node.nodeName.toUpperCase()=="DIV")||(node.getAttribute("dtTargets")!=null)){ node=node.parentNode; } uid=node.getAttribute("uid"); } if(uid!=null){ var _3b1=node.childNodes; for(var i=0;i<_3b1.length;i++){ if(_3b1[i].nodeName.toUpperCase()=="TABLE"&&(_3b1[i].className=="ls"||_3b1[i].className=="xt")){ var trs=_3b1[i].rows; for(var j=0;j0){ _3c1=true; } if(this.hasCutColumns()==true){ this.clearSelectedObjects(_3be); }else{ this.resetSelections(_3be); this.repaintSavedSelections(); if(typeof cf!="undefined"&&typeof cf.removeAllSelectionsFromCfgVariables=="function"){ cf.removeAllSelectionsFromCfgVariables(); } this.m_oCognosViewer.setCurrentNodeFocus(null); } if(this.ctrlKeyPressed(e)||this.shiftKeyPressed(e)){ clearTextSelection(_3be); } if(typeof g_reportSelectionController!="undefined"&&_3c2==false){ if(g_reportSelectionController.getSelections().length>0){ _3c1=true; } g_reportSelectionController.clearSelections(); } } var _3c3=node.getAttribute("dtTargets")?node:null; var _3c4=(node.nodeName.toLowerCase()==="area"); if((uid==null)&&((ctx!=null)||(node.parentNode&&node.parentNode.nodeType==1&&typeof node.parentNode.getAttribute!="undefined"))){ if(node.nodeName=="IMG"&&(node.src.indexOf("SM=")>-1||(isIE()>-1&&node.src.indexOf("space.gif")>-1))){ return false; } var _3c5; var _3c6=3; do{ node=node.parentNode; if(node){ _3c3=(!_3c3&&typeof node.getAttribute!="undefined"&&node.getAttribute("dtTargets"))?node:_3c3; uid=(typeof node.getAttribute!="undefined")?node.getAttribute("uid"):null; _3c5=node.nodeName.toLowerCase(); } }while((uid==null)&&node&&(--_3c6>0)&&(_3c5=="span"||_3c5=="div")); } if(uid!=null){ var _3c7=node.childNodes; for(var i=0;i<_3c7.length;i++){ if(_3c7[i].nodeName.toUpperCase()=="TABLE"&&(_3c7[i].className=="ls"||_3c7[i].className=="xt")){ var trs=_3c7[i].rows; for(var j=0;j0){ var _3cf=_3ce[_3ce.length-1]; if(_3cf.getLayoutType()==_3cd.getLayoutType()&&(_3cf.getCellRef().parentNode.parentNode==_3cd.getCellRef().parentNode.parentNode)){ if(this.cellsAreInSameColumn(_3cf.getCellRef(),_3cd.getCellRef())){ this.selectVertical(_3cf,_3cd,_3be); }else{ if(_3cf.getCellRef().parentNode.rowIndex==_3cd.getCellRef().parentNode.rowIndex){ this.selectHorizontal(_3cf,_3cd,_3be); } } } } clearTextSelection(_3be); }else{ if(this.ctrlKeyPressed(e)){ clearTextSelection(_3be); } } this.addSelectionObject(_3cd,_3be); if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){ cf.addSelectionToCfgVariables(_3cd.getColumnName()); } this.m_oCognosViewer.setCurrentNodeFocus(node); }else{ if(this.ctrlKeyPressed(e)){ this.removeSelectionObject(_3cd,_3be); if(typeof cf!="undefined"&&typeof cf.removeSelectionFromCfgVariables=="function"){ if(!this.isColumnSelected(_3cd.getTag())){ cf.removeSelectionFromCfgVariables(_3cd.getTag()); } } clearTextSelection(_3be); }else{ if(this.shiftKeyPressed(e)){ clearTextSelection(_3be); } } } _3c1=true; }else{ if(_3c2){ var _3d0=null; while((typeof node.id=="undefined"||node.id==null||node.id=="")&&node.parentNode!=null){ node=node.parentNode; } if(node.id=="reportTitle"){ _3d0="TitleStyle"; }else{ if(node.id=="reportSubtitle"){ _3d0="SubtitleStyle"; }else{ if(node.id.indexOf("reportFilter")==0){ _3d0="FilterStyle"; } } } if(_3d0!=null){ selectReportElement(e,node.id,_3d0); _3c1=true; } }else{ if(_3c3!=null&&this.m_oCognosViewer&&this.m_oCognosViewer.isMobile()&&!_3c4){ var _3cd=this.getSelectionObjectFactory().getSelectionObject(_3c3); this.addSelectionObject(_3cd,_3be); } } } if(_3c1==true&&(typeof cf!="undefined"&&typeof cf.refreshDialog=="function")){ cf.refreshDialog(); } } catch(ex){ } }; CSelectionController.prototype.selectDrillThroughImage=function(node){ this.m_oSelectedDrillThroughImage=node; }; CSelectionController.prototype.getSelectedDrillThroughImage=function(){ return this.m_oSelectedDrillThroughImage?this.m_oSelectedDrillThroughImage:null; }; CSelectionController.prototype.selectDrillThroughSingleton=function(node){ this.m_oSelectedDrillThroughSingleton=node; }; CSelectionController.prototype.getSelectDrillThroughSingleton=function(){ return this.m_oSelectedDrillThroughSingleton?this.m_oSelectedDrillThroughSingleton:null; }; CSelectionController.prototype.getReportContextDataArray=function(){ return this.m_aReportContextDataArray; }; CSelectionController.prototype.getReportMetadataArray=function(){ return this.m_aReportMetadataArray; }; CSelectionController.prototype.setupContextDataArray=function(_3d3){ this.m_aReportContextDataArray=_3d3; }; CSelectionController.prototype.setupMetaDataArray=function(_3d4){ this.m_aReportMetadataArray=_3d4; }; CSelectionController.prototype.addContextData=function(_3d5){ this.m_aSelectedObjects=[]; this.m_oCDManager.SetContextData(_3d5); if(!this.m_bUsingCCDManager){ this.m_bUsingCCDManager=true; } for(var i=0;i2){ _3e4=parseInt(_3e5[2],10); } }else{ _3e4=parseInt(this.m_oCDManager.GetDataType(_3e3),10); } return _3e4; }; CSelectionController.prototype.getUsageInfo=function(_3e6){ if(this.m_bUsingCCDManager){ return this.m_oCDManager.GetUsage(_3e6); } }; CSelectionController.prototype.isMeasure=function(_3e7){ return (this.getUsageInfo(_3e7)==this.c_usageMeasure); }; CSelectionController.prototype.getDepth=function(_3e8){ var _3e9=null; if(!this.m_bUsingCCDManager){ var _3ea=this.getRDI(_3e8); if(_3ea&&_3ea.length>5&&_3ea[1]=="R"){ _3e9=_3ea[5]; } }else{ _3e9=this.m_oCDManager.GetDepth(_3e8); } return _3e9; }; CSelectionController.prototype.getUseValue=function(_3eb){ var _3ec=""; if(!this.m_bUsingCCDManager){ var _3ed=this.m_aReportContextDataArray[_3eb]; if(typeof _3ed[1]!="undefined"){ _3ec=_3ed[1]; } }else{ _3ec=this.m_oCDManager.GetDisplayValue(_3eb); } return _3ec; }; CSelectionController.prototype.getTextValue=function(_3ee){ var _3ef=null; for(var _3f0=0;_3f0<_3ee.length;_3f0++){ if(_3ee[_3f0].style.visisbility!="hidden"){ if(isIE()){ _3ef=_3ee[_3f0].innerText; }else{ _3ef=_3ee[_3f0].textContent; } var _3f1=_3ee[_3f0].nextSibling; while(_3f1!=null){ if(_3f1.nodeName.toUpperCase()=="SPAN"&&_3f1.style.visibility!="hidden"){ if(isIE()){ _3ef+=_3f1.innerText; }else{ _3ef+=_3f1.textContent; } } _3f1=_3f1.nextSibling; } break; } } return _3ef; }; CSelectionController.prototype.getDisplayValueFromDOM=function(_3f2,_3f3){ var _3f4=null; var _3f5; var _3f6=new RegExp("(^|\\s)"+_3f2+"(\\s|$|:)","i"); if(typeof _3f3!="undefined"){ _3f5=getElementsByAttribute(_3f3,["span","td","th"],"ctx",_3f2,1,_3f6); }else{ var _3f7=document.getElementById("CVIFrame"+this.m_sNamespace); if(typeof _3f7=="undefined"||_3f7==null){ var _3f8=document.getElementById("RVContent"+this.m_sNamespace); if(typeof _3f8=="undefined"||_3f8==null){ _3f5=getElementsByAttribute(document.body,["span","td","th"],"ctx",_3f2,1,_3f6); }else{ _3f5=getElementsByAttribute(_3f8,["span","td","th"],"ctx",_3f2,1,_3f6); } }else{ _3f5=getElementsByAttribute(_3f7.contentWindow.document.body,["span","td","th"],"ctx",_3f2,1,_3f6); } } var _3f9; if(_3f5.length>0&&(_3f5[0].nodeName.toUpperCase()=="TD"||_3f5[0].nodeName.toUpperCase()=="TH")){ _3f9=_3f5[0].childNodes; }else{ _3f9=_3f5; } if(_3f9.length==0||(_3f9[0].className.indexOf("chart_area")==-1&&_3f9[0].className.indexOf("bux-comment")==-1)){ _3f4=this.getTextValue(_3f9); } return _3f4; }; CSelectionController.prototype.getDisplayValue=function(_3fa,_3fb){ var _3fc=this.getDisplayValueFromDOM(_3fa,_3fb); if(_3fc==null){ _3fc=this.getUseValue(_3fa); } return _3fc; }; CSelectionController.prototype.getDun=function(_3fd){ if(this.m_bUsingCCDManager){ return this.m_oCDManager.GetDUN(_3fd); }else{ var _3fe=this.m_aReportContextDataArray[_3fd]; if(_3fe&&typeof _3fe[5]!="undefined"){ var _3ff=_3fe[5]; var _400=this.m_aReportMetadataArray[_3ff]; if(typeof _400!="undefined"&&typeof _400[1]!="undefined"&&_400[1]=="D"){ return _400[0]; } } } }; CSelectionController.prototype.getPun=function(_401){ if(this.m_bUsingCCDManager){ return this.m_oCDManager.GetPUN(_401); } }; CSelectionController.prototype.getLun=function(_402){ var lun=""; if(!this.m_bUsingCCDManager){ var _404=this.m_aReportContextDataArray[_402]; if(_404&&typeof _404[3]!="undefined"){ var _405=_404[3]; var _406=this.m_aReportMetadataArray[_405]; if(typeof _406!="undefined"&&typeof _406[1]!="undefined"&&_406[1]=="L"){ lun=_406[0]; } } }else{ lun=this.m_oCDManager.GetLUN(_402); } return lun; }; CSelectionController.prototype.isContextId=function(_407){ var _408=false; if(!this.m_bUsingCCDManager){ var _409=this.m_aReportContextDataArray[_407]; _408=(typeof _409=="object"); }else{ this.m_oCDManager.FetchContextData([_407]); _408=this.m_oCDManager.ContextIdExists(_407); } return _408; }; CSelectionController.prototype.hasContextData=function(){ var _40a=false; if(!this.m_bUsingCCDManager){ if(this.m_aReportContextDataArray&&this.m_aReportContextDataArray.length&&this.m_aReportContextDataArray.length()>0){ return true; } }else{ _40a=this.m_oCDManager.HasContextData(); } return _40a; }; CSelectionController.prototype.hasMetadata=function(){ var _40b=false; if(!this.m_bUsingCCDManager){ if(this.m_aReportMetadataArray&&this.m_aReportMetadataArray.length&&this.m_aReportMetadataArray.length()>0){ return true; } }else{ _40b=this.m_oCDManager.HasMetadata(); } return _40b; }; CSelectionController.prototype.getDifferentCellIndex=function(_40c,_40d,_40e){ for(var i=0;i<_40c.cells.length;i++){ if(this.getSelectionObjectFactory().getSelectionObject(_40c.cells[i]).getLayoutType()=="datavalue"){ break; } } if(_40e=="relative"){ return (_40d-i); }else{ if(_40e=="actual"){ return (_40d+i); } } }; CSelectionController.prototype.cellsAreInSameColumn=function(_410,_411){ if(_410.parentNode.rowIndex==_411.parentNode.rowIndex){ return false; } if(_410.getAttribute("cid")===null){ if(_410.getAttribute("uid")===_411.getAttribute("uid")){ if(_410.getAttribute("type")!="datavalue"){ return true; }else{ if(this.getDifferentCellIndex(_410.parentNode,_410.cellIndex,"relative")==this.getDifferentCellIndex(_411.parentNode,_411.cellIndex,"relative")){ return true; } } }else{ return false; } }else{ if(_410.getAttribute("cid")===_411.getAttribute("cid")){ return true; }else{ return false; } } }; CSelectionController.prototype.selectVertical=function(_412,_413,_414){ if(!_414){ _414=document; } var _415=_412.getCellRef().parentNode; var _416,i; var _418=(_412.getCellRef().parentNode.rowIndex<_413.getCellRef().parentNode.rowIndex); var _419=(_412.getCellRef().parentNode.cells.length-_412.getCellRef().cellIndex); while(_415.rowIndex!=_413.getCellRef().parentNode.rowIndex){ if(_418){ _415=_415.nextSibling; }else{ _415=_415.previousSibling; } if(_415==null){ break; } if(_415.cells.length>=_419){ for(i=0;i<_415.cells.length;i++){ if((_415.cells[i].getAttribute("type")==_412.getLayoutType())&&this.cellsAreInSameColumn(_412.getCellRef(),_415.cells[i])){ _416=this.getSelectionObjectFactory().getSelectionObject(_415.cells[i]); if(this.addSelectionObject(_416,_414)){ if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){ cf.addSelectionToCfgVariables(_416.getColumnName()); } } break; } } } } }; CSelectionController.prototype.selectHorizontal=function(_41a,_41b,_41c){ var _41d=""; if(_41a.getColumnRef()==null){ if(_41a.getCellRef().getAttribute("uid")==_41b.getCellRef().getAttribute("uid")){ _41d=_41a.getCellRef().getAttribute("uid"); }else{ return; } } var _41e,_41f; var _420=_41b.getCellRef().parentNode; var _421; if(_41b.getCellRef().cellIndex<_41a.getCellRef().cellIndex){ _41e=_41b.getCellRef().cellIndex; _41f=_41a.getCellRef().cellIndex; }else{ _41f=_41b.getCellRef().cellIndex; _41e=_41a.getCellRef().cellIndex; } for(var i=_41e+1;i<_41f;i++){ if(((_41a.getColumnRef()!=null)&&(_41a.getLayoutType()==_41b.getLayoutType())&&(_41a.getLayoutType()!="datavalue")||this.allowHorizontalDataValueSelection())||((_41a.getColumnRef()==null)&&(_420.cells[i].getAttribute("uid")==_41d))){ _421=this.getSelectionObjectFactory().getSelectionObject(_420.cells[i]); if(this.addSelectionObject(_421,_41c)){ if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){ cf.addSelectionToCfgVariables(_421.getColumnName()); } } } } }; CSelectionController.prototype.pageDoubleClicked=function(e){ try{ var node=getNodeFromEvent(e); if(typeof node.selectedCell!="undefined"){ var _425=node; node=node.selectedCell; _425.removeAttribute("selectedCell"); } while(node.nodeType==3){ node=node.parentNode; } var ctx=node.getAttribute("ctx"); var uid=node.getAttribute("uid"); if((ctx!=null)||(node.parentNode.nodeType==1&&node.parentNode.getAttribute("uid")!=null)){ node=node.parentNode; if(node.className.toUpperCase()=="BLOCK"&&node.nodeName.toUpperCase()=="DIV"){ node=node.parentNode; } uid=node.getAttribute("uid"); } if(uid!=null&&node.firstChild!=null&&(node.getAttribute("type")=="columnTitle"||node.getAttribute("type")=="section")){ if(typeof goWindowManager!="undefined"&&goWindowManager&&typeof goWindowManager.getApplicationFrame=="function"){ goWindowManager.getFeatureManager().launchFeature("Rename"); } } if(typeof g_reportSelectionController!="undefined"){ g_reportSelectionController.clearSelections(); } } catch(ex){ } }; CSelectionController.prototype.getSelectionHoverNodes=function(){ return this.m_aSelectionHoverNodes; }; CSelectionController.prototype.setSelectionHoverNodes=function(_428){ this.m_aSelectionHoverNodes=_428; }; CSelectionController.prototype.addSelectionHoverNode=function(node){ this.m_aSelectionHoverNodes[this.m_aSelectionHoverNodes.length]=node; }; CSelectionController.prototype.pageHover=function(e){ try{ var node=getNodeFromEvent(e); while(node.nodeType==3){ node=node.parentNode; } if((node.getAttribute("ctx")!=null)||(node.parentNode.nodeType==1&&node.parentNode.getAttribute("uid")!=null)){ if(node.parentNode.nodeName.toLowerCase()!="tr"){ node=node.parentNode; } } var _42c=this.getSelectionHoverNodes(); var _42d=this.getAllSelectedObjects().length; if(!(_42c.length==1&&_42c[0]==node)){ for(var i=0;i<_42c.length;i++){ this.sortIconHover(_42c[i],true); if(_42d==0){ this.pageChangeHover(_42c[i],true); } } this.setSelectionHoverNodes([]); if(_42d==0){ this.sortIconHover(node,false); if(this.pageChangeHover(node,false)){ this.addSelectionHoverNode(node); } }else{ if(this.sortIconHover(node,false)){ this.addSelectionHoverNode(node); } } } } catch(ex){ } }; CSelectionController.prototype.sortIconHover=function(node,_430){ if(!this.isValidColumnTitle(node)){ return false; } var _431=this.getSortImgNode(node); if(_431!=null&&_431!="undefined"){ if(_431.getAttribute("sortOrder")==="nosort"){ if(_430){ _431.style.visibility="hidden"; }else{ _431.style.visibility="visible"; } } return true; } return false; }; CSelectionController.prototype.isValidColumnTitle=function(node){ if(node&&node.parentNode){ var uid=node.getAttribute("uid"); if(uid!=null&&(!(node.firstChild==null&&node.cellIndex==0&&node.parentNode.rowIndex==0&&node.getAttribute("cid")==null))&&(node.getAttribute("type")=="columnTitle"||node.getAttribute("type")=="section")){ return true; } } return false; }; CSelectionController.prototype.pageChangeHover=function(node,_435){ try{ if((node.getAttribute("ctx")!=null)||(node.parentNode&&node.parentNode.nodeType==1&&node.parentNode.getAttribute("uid")!=null)){ if(node.parentNode.nodeName.toLowerCase()!="tr"){ node=node.parentNode; } } if(this.isValidColumnTitle(node)){ var _436=this.isColumnSelected(node.getAttribute("tag")); if(!_436){ _436=this.isColumnCut(node.getAttribute("tag")); } if(!_436){ if(_435){ if(node.getAttribute("oldClassName")!=null){ node.className=node.getAttribute("oldClassName"); node.removeAttribute("oldClassName"); } this.restoreOldBackgroundImage(node); }else{ if(node.getAttribute("oldClassName")!=null){ node.className=node.getAttribute("oldClassName"); }else{ node.setAttribute("oldClassName",node.className); } if(node.getAttribute("oldBackgroundImageStyle")!=null){ node.style.backgroundImage=node.getAttribute("oldBackgroundImageStyle"); }else{ this.saveOldCellStyles(node); } node.className+=" hoverSelection"; return true; } } } } catch(ex){ } return false; }; CSelectionController.prototype.getSortImgNode=function(node){ var _438=node.getElementsByTagName("img"); for(var i=0;i<_438.length;i++){ var sId=_438[i].id.toString(); if(sId!=null&&sId.length>0&&sId.indexOf("sortimg")>=0){ node=_438[i]; return node; } } return null; }; CSelectionController.prototype.restoreOldPadding=function(node){ if(node&&node.style&&node.getAttribute("oldPaddingStyle")!=null){ if(node.getAttribute("oldPaddingStyle").length>0){ node.style.padding=node.getAttribute("oldPaddingStyle"); } node.removeAttribute("oldPaddingStyle"); } }; CSelectionController.prototype.saveOldPadding=function(node,size){ if(node&&node.getAttribute("oldPaddingStyle")==null){ node.setAttribute("oldPaddingStyle",size.paddingTop+"px "+size.paddingRight+"px "+size.paddingBottom+"px "+size.paddingLeft+"px"); } }; CSelectionController.prototype.saveOldBorder=function(node){ if(node&&node.getAttribute("oldBorderStyle")==null){ node.setAttribute("oldBorderStyle",node.style.border); } }; CSelectionController.prototype.restoreOldBorder=function(node){ if(node&&node.style&&node.getAttribute("oldBorderStyle")!=null){ if(node.getAttribute("oldBorderStyle").length>0){ node.style.border=node.getAttribute("oldBorderStyle"); }else{ node.style.borderColor=node.style.borderWidth=node.style.borderStyle=""; } node.removeAttribute("oldBorderStyle"); } }; CSelectionController.prototype.setPrimarySelectionStyles=function(cell){ if(this.getPrimarySelectionColor()){ cell.style.backgroundColor=this.getPrimarySelectionColor(); }else{ cell.style.backgroundImage=this.pS_backgroundImageURL; cell.style.backgroundRepeat="repeat"; } }; CSelectionController.prototype.setSecondarySelectionStyles=function(cell){ if(this.getSecondarySelectionColor()){ cell.style.backgroundColor=this.getSecondarySelectionColor(); }else{ cell.style.backgroundImage=this.sS_backgroundImageURL; cell.style.backgroundRepeat="repeat"; } }; CSelectionController.prototype.saveOldCellStyles=function(node){ if(node&&node.getAttribute("oldBackgroundImageStyle")==null){ node.setAttribute("oldBackgroundColor",this.getStyleProperty(node,"backgroundColor")); node.setAttribute("oldBackgroundImageStyle",this.getBackgroundImage(node)); node.setAttribute("oldBackgroundRepeat",this.getStyleProperty(node,"backgroundRepeat")); node.style.backgroundImage=""; node.style.backgroundRepeat=""; } }; CSelectionController.prototype.restoreOldBackgroundImage=function(node){ if(node&&node.style&&node.getAttribute("oldBackgroundImageStyle")!=null){ node.style.backgroundImage=node.getAttribute("oldBackgroundImageStyle"); node.removeAttribute("oldBackgroundImageStyle"); node.style.backgroundRepeat=node.getAttribute("oldBackgroundRepeat"); node.removeAttribute("oldBackgroundRepeat"); node.style.backgroundColor=node.getAttribute("oldBackgroundColor"); node.removeAttribute("oldBackgroundColor"); } }; CSelectionController.prototype.getStyleProperty=function(node,_445){ if(node&&node.style&&node.style[_445]){ return node.style[_445]; } return ""; }; CSelectionController.prototype.getBackgroundImage=function(node){ if(node&&node.style){ return node.style.backgroundImage; } return ""; }; CSelectionController.prototype.pageContextClicked=function(e){ var node=getNodeFromEvent(e); if(typeof node.selectedCell!="undefined"){ var _449=node; node=node.selectedCell; _449.removeAttribute("selectedCell"); } while(node!=null&&node.tagName!="TD"){ node=node.parentNode; } if(node!=null){ var _44a=this.getBackgroundImage(node); this.findSelectionURLs(); if(this.getSelections().length==0||_44a!=this.pS_backgroundImageURL){ this.pageClicked(e); } } if(typeof populateContextMenu!="undefined"){ populateContextMenu(); moveContextMenu(e); } var _44b=false; if(this.showViewerContextMenu()){ if(typeof e.preventDefault=="function"){ e.preventDefault(); } _44b=true; } return _44b; }; CSelectionController.prototype.chartContextMenu=function(e){ if(!this.hasSelectedChartNodes()){ return; } if(typeof populateContextMenu!="undefined"){ populateContextMenu(); moveContextMenu(e); } if(typeof e.preventDefault=="function"){ e.preventDefault(); } return false; }; CSelectionController.prototype.titleAreaContextMenu=function(e,_44e,sId){ if(typeof populateContextMenu!="undefined"){ goWindowManager.getApplicationFrame().cfgSet("contextMenuType",_44e); goWindowManager.getApplicationFrame().cfgSet("contextMenuId",sId); populateContextMenu(_44e.toUpperCase()); moveContextMenu(e,_44e.toUpperCase()); } if(typeof e.preventDefault=="function"){ e.preventDefault(); } return false; }; CSelectionController.prototype.selectionsAreAllSameType=function(){ var _450=this.getSelections(); if(_450.length>0){ var _451=_450[0].getLayoutType(); for(var i=1;i<_450.length;i++){ if(_451!=_450[i].getLayoutType()){ return 0; } } return 1; } return -1; }; CSelectionController.prototype.selectionsAreAllOnSameColumn=function(){ var _453=this.getSelections(); var i=0; if(_453.length>0){ var _455=_453[0].getColumnRef(); if(_455!=null&&_455!=""){ for(i=1;i<_453.length;i++){ if(_455!=_453[i].getColumnRef()){ return false; } } }else{ var _456=_453[0].getCellTypeId(); for(i=1;i<_453.length;i++){ if(_456!=_453[i].getCellTypeId()){ return false; } } } return true; } return false; }; CSelectionController.prototype.checkForReportElementNode=function(node){ if(typeof node!="undefined"&&node!=null&&typeof node.className!="undefined"&&node.className!=null){ if(node.className=="tt"){ if(typeof node.parentNode!="undefined"&&node.parentNode!=null&&typeof node.parentNode.parentNode!="undefined"&&node.parentNode.parentNode!=null&&(node.parentNode.className=="reportSubtitleStyle"||node.parentNode.id=="reportTitleLink")){ node=node.parentNode.parentNode; }else{ return false; } }else{ if(typeof node.parentNode!="undefined"&&node.parentNode!=null){ var _458=node.parentNode; while(typeof _458!="undefined"&&_458!=null){ if(typeof _458.className!="undefined"&&_458.className!=null&&_458.className.substr(0,2)=="ft"){ node=_458; break; }else{ _458=_458.parentNode; } } }else{ return false; } } var _459=node.className.substr(0,2); if(_459=="ta"||_459=="ts"||_459=="ft"){ return true; } } return false; }; CSelectionController.prototype.chartClicked=function(_45a){ this.setSelectedChartArea(_45a); }; CSelectionController.prototype.processColumnTitleNode=function(_45b){ if(!_45b||!this.m_oCognosViewer.isBux){ return; } var _45c=_45b.getCellRef(); if(_45c.getAttribute("contextAugmented")=="true"||"list"!=_45b.getDataContainerType()||"columnTitle"!=_45b.getLayoutType()){ return; } var _45d=_45b.getSelectedContextIds(); var _45e=false; if(typeof _45d=="object"&&_45d!=null&&_45d.length>0){ if(this.isRelational(_45d)&&this.getQueryModelId(_45d[0][0])==null){ _45e=true; }else{ return; } } var lid=_45c.parentNode.parentNode.parentNode.getAttribute("lid"); var _460=_45c.parentNode.nextSibling; var _461=getChildElementsByAttribute(_460,"td","cid",_45c.getAttribute("cid")); var _462=null; var _463=true; var _464; if(_461.length>0){ var _465=_461[0]; var _466=_465.childNodes.length; for(var _467=0;_467<_466;_467++){ var _468=_465.childNodes[_467]; if(_468.getAttribute&&((_468.nodeName.toLowerCase()=="table"&&typeof _468.getAttribute("lid")=="string")||_468.nodeName.toLowerCase()=="map"||_468.nodeName.toLowerCase()=="img"||_468.getAttribute("chartcontainer")=="true")){ if(_467==0){ _463=false; } }else{ _464=[]; if(_468.nodeName.toLowerCase()=="span"){ _464.push(_468); } var _469=_468.getElementsByTagName?_468.getElementsByTagName("span"):[]; for(var _46a=0;_46a<_469.length;++_46a){ if(lid==getImmediateLayoutContainerId(_469[_46a])){ _464.push(_469[_46a]); } } for(var _46b=0;_46b<_464.length;++_46b){ var _46c=_464[_46b]; if(_46c.nodeType==1&&_46c.nodeName.toLowerCase()=="span"&&_46c.style.visibility!="hidden"){ if(_46c.getAttribute("ctx")!=null&&_46c.getAttribute("ctx")!=""){ _462=_46c.getAttribute("ctx"); break; } } } } } } if(_462!=null){ var _46d=_462.split("::")[0].split(":")[0]; if(!_45e){ _464=_45c.getElementsByTagName("span"); if(_464.length!=0){ var _46e=this.m_oCDManager.m_cd[_46d]; var _46f=this.getTextValue(_464); var _470={"u":_46f===null?"":_46f}; if(typeof _46e!="undefined"){ if(typeof _46e["r"]!="undefined"){ _470.r=_46e["r"]; } if(typeof _46e["q"]!="undefined"){ _470.q=_46e["q"]; } if(typeof _46e["i"]!="undefined"){ _470.i=_46e["i"]; } } var _471="cloned"+_46d; this.m_oCDManager.m_cd[_471]=_470; _464[0].setAttribute("ctx",_471); _45b=this.getSelectionObjectFactory().processCTX(_45b,_471); } }else{ var qmid=this.getQueryModelId(_46d); if(qmid==null){ } if(qmid!=null){ var _473=_45d[0][0]; this.m_oCDManager.m_cd[_473].i=this.m_oCDManager.m_cd[_46d].i; return false; } } }else{ _463=false; } if(!_463){ _45c.setAttribute("canSort","false"); } _45c.setAttribute("contextAugmented","true"); }; CSelectionController.prototype.selectionsInSameDataContainer=function(){ try{ var _474=this.getAllSelectedObjects(); var _475=_474[0].getLayoutElementId(); for(var _476=1;_476<_474.length;_476++){ if(_475!=_474[_476].getLayoutElementId()){ return false; } } } catch(e){ return false; } return true; }; CSelectionController.prototype.selectionsFromSameDataItem=function(){ try{ var _477=this.getAllSelectedObjects(); var _478=_477[0].getDataItems()[0][0]; for(var _479=1;_479<_477.length;_479++){ if(_478!=_477[_479].getDataItems()[0][0]){ return false; } } } catch(e){ return false; } return true; }; CSelectionController.prototype.isRelational=function(_47a){ try{ if(!_47a){ var _47b=this.getAllSelectedObjects()[0]; _47a=_47b.getSelectedContextIds(); } for(var _47c=0;_47c<_47a.length;_47c++){ for(var _47d=0;_47d<_47a[_47c].length;_47d++){ var ctx=_47a[_47c][_47d]; var mun=this.getMun(ctx); var lun=this.getLun(ctx); var hun=this.getHun(ctx); if(mun!=null&&typeof mun!="undefined"&&mun.length>0){ return false; } if(lun!=null&&typeof lun!="undefined"&&lun.length>0){ return false; } if(hun!=null&&typeof hun!="undefined"&&hun.length>0){ return false; } } } return true; } catch(e){ return true; } return true; }; CSelectionController.prototype.getDataContainerType=function(){ try{ if(!this.getAllSelectedObjects()[0]){ return ""; } return this.getAllSelectedObjects()[0].m_dataContainerType; } catch(e){ return ""; } }; CSelectionController.prototype.areSelectionsColumnRowTitles=function(){ try{ var _482=this.getAllSelectedObjects(); for(var _483=0;_483<_482.length;_483++){ var _484=_482[_483]; if(_484.getLayoutType()!="columnTitle"||_484.isHomeCell()){ return false; } } } catch(e){ return false; } return true; }; CSelectionController.prototype.selectionsAreMeasures=function(){ try{ var _485=this.getAllSelectedObjects(); for(var _486=0;_486<_485.length;_486++){ var _487=_485[_486]; if(this.getUsageInfo(_487.getSelectedContextIds()[0][0])!=this.c_usageMeasure){ return false; } } } catch(e){ return false; } return true; }; CSelectionController.prototype.selectionsNonMeasureWithMUN=function(){ var _488=this.getAllSelectedObjects(); if(_488.length==0){ return false; } for(var _489=0;_489<_488.length;_489++){ var _48a=_488[0]; if(_48a.getSelectedContextIds().length==0){ return false; } var _48b=_48a.getSelectedContextIds()[0][0]; var mun=this.getMun(_48b); var _48d=this.getUsageInfo(_48b); if(mun==null||typeof mun=="undefined"||mun.length==0||_48d==this.c_usageMeasure){ return false; } } return true; }; CSelectionController.prototype.areSelectionsMeasureOrCalculation=function(){ var _48e=this.getAllSelectedObjects(); if(_48e.length==0){ return false; } var _48f=this.selectionsHaveCalculationMetadata(); for(var _490=0;_490<_48e.length;_490++){ var _491=_48e[_490]; var _492=_491.getSelectedContextIds()[0][0]; if(!this.isCalculationOrMeasure(_492,_48f)){ return false; } } return true; }; CSelectionController.prototype.selectionsHaveCalculationMetadata=function(){ try{ var _493=this.getDataContainerType(); var _494=this.getAllSelectedObjects(); for(var _495=0;_495<_494.length;_495++){ var _496=_494[_495]; var _497=_496.getSelectedContextIds(); var _498=_497[0][0]; var sHun=this.getHun(_498); if(!this.hasCalculationMetadata(_498,_497,_493)){ return false; } } } catch(e){ return false; } return true; }; CSelectionController.prototype.isCalculationOrMeasure=function(_49a,_49b){ var mun=this.getMun(_49a); var _49d=this.getUsageInfo(_49a); if(!(((mun==null||typeof mun=="undefined"||mun.length==0)&&_49b)||_49d==this.c_usageMeasure)){ return false; } return true; }; CSelectionController.prototype.hasCalculationMetadata=function(_49e,_49f,_4a0){ var sHun=this.getHun(_49e); if(this.getUsageInfo(_49e)!=this.c_usageMeasure){ if((this.isRelational(_49f)&&this.getQueryModelId(_49e)!=null)||(!this.isRelational(_49f)&&_4a0=="list"&&(sHun&&sHun!=""))){ return false; } } return true; }; CSelectionController.prototype.selectionsAreDateTime=function(){ try{ var _4a2=this.getAllSelectedObjects(); for(var _4a3=0;_4a3<_4a2.length;_4a3++){ var _4a4=_4a2[_4a3]; var _4a5=_4a4.getSelectedContextIds(); var _4a6=_4a5[0][0]; var _4a7=this.getDataType(_4a6); if(_4a7&&typeof this.m_ccl_dateTypes[_4a7]!=="undefined"){ return true; } } } catch(e){ return false; } return false; }; CSelectionController.prototype.getSelectedObjectsJsonContext=function(){ try{ var _4a8=this.getAllSelectedObjects(); if(_4a8===null||_4a8.length<=0){ return null; } var _4a9=this.m_oCognosViewer.getModelPath(); var _4aa=[]; for(var i=0;i<_4a8.length;i++){ var obj=_4a8[i].getContextJsonObject(this,_4a9); _4aa.push(obj); } return _4aa; } catch(e){ } }; CSelectionController.prototype.destroy=function(){ delete this.m_oCognosViewer; delete this.m_aCutColumns; delete this.m_aSelectedObjects; delete this.m_selectedClass; delete this.m_cutClass; if(this.m_oObserver&&this.m_oObserver.destroy){ this.m_oObserver.destroy(); } delete this.m_oObserver; delete this.m_aReportMetadataArray; delete this.m_aReportContextDataArray; if(this.m_oCDManager&&this.m_oCDManager.destroy){ this.m_oCDManager.destroy(); } delete this.m_oCDManager; if(this.m_oSelectionObjectFactory&&this.m_oSelectionObjectFactory.destroy){ this.m_oSelectionObjectFactory.destroy(); } delete this.m_oSelectionObjectFactory; delete this.m_selectedChartArea; delete this.m_selectedChartNodes; delete this.m_selectionContainerMap; delete this.m_chartHelpers; delete this.m_oJsonForMarshal; if(this.hasSavedSelections()){ this.clearSavedSelections(); } }; function clearTextSelection(_4ad){ if(!_4ad){ _4ad=document; } try{ if(typeof _4ad.selection=="object"&&_4ad.selection!==null){ _4ad.selection.empty(); }else{ if(typeof window.getSelection=="function"&&typeof window.getSelection()=="object"&&window.getSelection()!==null){ window.getSelection().removeAllRanges(); } } } catch(e){ } }; function CtxArrayPlaceHolder(){ }; var self=window; function CDrillManager(oCV){ this.m_drawDrillTargets=false; this.setCV(oCV); }; CDrillManager.prototype=new CViewerHelper(); CDrillManager.prototype.getSelectionController=function(){ var _4af; try{ _4af=getCognosViewerSCObjectRef(this.getCV().getId()); } catch(e){ _4af=null; } return _4af; }; CDrillManager.prototype.getSelectedObject=function(){ var _4b0=this.getSelectionController(); if(_4b0==null){ return null; } var _4b1=null; var _4b2=null; if(_4b0.hasSelectedChartNodes()){ _4b2=_4b0.getSelectedChartNodes(); }else{ _4b2=_4b0.getSelections(); } if(_4b2&&_4b2.length==1){ _4b1=_4b2[0]; } return _4b1; }; CDrillManager.prototype.canDrillUp=function(){ if(this.getDrillOption("drillUp")==true&&this.hasMuns()){ return true; } return false; }; CDrillManager.prototype.canDrillDown=function(){ if(this.getDrillOption("drillDown")==true){ return true; } return false; }; CDrillManager.prototype.hasMuns=function(_4b3){ if(typeof _4b3=="undefined"){ _4b3=this.getSelectedObject(); } if(_4b3==null){ return false; } var _4b4=_4b3.getMuns(); var muns=""; for(var _4b6=0;_4b6<_4b4.length&&muns=="";++_4b6){ if(typeof _4b4[_4b6][0]!="undefined"){ muns+=_4b4[_4b6][0]; } } return (muns!=""); }; CDrillManager.prototype.getRefQuery=function(){ var _4b7=""; var _4b8=this.getSelectedObject(); if(_4b8==null){ return ""; } var _4b9=_4b8.getRefQueries(); for(var i=0;i<_4b9.length;i++){ if(_4b9[i]!=null){ for(var j=0;j<_4b9[i].length;j++){ if(_4b9[i][j]!=null&&_4b9[i][j]!=""){ return _4b9[i][j]; } } } } return _4b7; }; CDrillManager.prototype.isIsolated=function(){ var _4bc=this.getSelectionController(); if(_4bc==null||_4bc.getDrillUpDownEnabled()==false){ return false; } var _4bd=this.getSelectedObject(); if(_4bd==null){ return false; } if(_4bd instanceof CSelectionChartObject&&_4bc!=null){ var _4be=_4bd.getArea(); if(_4be!=null){ var _4bf=_4be.getAttribute("isolated"); if(typeof _4bf!="undefined"&&_4bf!=null&&_4bf=="true"){ return true; } } }else{ var _4c0=_4bd.getCellRef(); if(typeof _4c0=="object"&&_4c0!=null){ var _4c1=_4c0.getElementsByTagName("span"); if(_4c1!=null&&typeof _4c1!="undefined"&&_4c1.length>0){ var _4c2=_4c1[0].getAttribute("isolated"); if(_4c2!=null&&_4c2!="undefined"&&_4c2=="true"){ return true; } } } } return false; }; CDrillManager.prototype.getDrillOption=function(_4c3){ var _4c4=this.getSelectionController(); if(_4c4==null||_4c4.getDrillUpDownEnabled()==false||typeof _4c3=="undefined"){ return false; } var _4c5=this.getSelectedObject(); if(_4c5==null){ return false; } if(this.isIsolated()){ if(_4c3=="drillDown"){ return false; }else{ if(_4c3=="drillUp"){ return true; } } } if(_4c3=="drillDown"){ if(_4c5 instanceof CSelectionChartObject&&_4c4!=null){ var _4c6=_4c5.getArea(); if(_4c6!=null){ var _4c7=_4c6.getAttribute("isChartTitle"); if(typeof _4c7!="undefined"&&_4c7!=null&&_4c7=="true"){ return false; } } } } var _4c8=_4c5.getDrillOptions(); var _4c9=(typeof DrillContextMenuHelper!=="undefined"&&DrillContextMenuHelper.needsDrillSubMenu(this.m_oCV)); for(var idx=0;idx<_4c8.length;++idx){ var _4cb=(_4c9)?_4c8[idx].length:1; for(var _4cc=0;_4cc<_4cb;++_4cc){ var _4cd=_4c8[idx][_4cc]; if(_4cd=="3"){ return true; }else{ if(_4c3=="drillUp"&&_4cd=="1"){ return true; }else{ if(_4c3=="drillDown"&&_4cd=="2"){ return true; } } } } } return false; }; CDrillManager.prototype.canDrillThrough=function(){ var _4ce=this.getSelectionController(); if(_4ce==null||_4ce.getModelDrillThroughEnabled()==false){ return false; } return true; }; CDrillManager.prototype.singleClickDrillEvent=function(evt,app){ var _4d1=this.getSelectionController(); if(_4d1!=null){ if(this.getCV().bCanUseCognosViewerSelection==true){ _4d1.pageClicked(evt); } } var node=getCrossBrowserNode(evt); try{ if(node.className&&node.className.indexOf("dl")==0){ if(this.canDrillDown()){ this.singleClickDrillDown(evt,app); return true; }else{ if(this.canDrillUp()){ this.singleClickDrillUp(evt,app); return true; } } } } catch(e){ } if(app=="RV"){ return this.getDrillThroughParameters("execute",evt); } return false; }; CDrillManager.prototype.singleClickDrillDown=function(evt,app){ if(app=="QS"){ this.qsDrillDown(); }else{ this.rvDrillDown(); } }; CDrillManager.prototype.singleClickDrillUp=function(evt,app){ if(app=="QS"){ this.qsDrillUp(); }else{ this.rvDrillUp(); } }; CDrillManager.prototype.getDrillParameters=function(_4d7,_4d8,_4d9,_4da){ var _4db=[]; var _4dc=this.getSelectedObject(); if(_4dc==null){ return _4db; } if(typeof _4d8=="undefined"){ _4d8=true; } var _4dd=_4dc.getDataItems(); var _4de=_4dc.getMuns(); var _4df=_4dc.getDimensionalItems("lun"); var _4e0=_4dc.getDimensionalItems("hun"); var _4e1=_4dc.getDrillOptions(); if(typeof _4dd=="undefined"||typeof _4de=="undefined"||typeof _4e1=="undefined"||_4de==null||_4dd==null||_4e1==null){ return _4db; } if(_4de.length!=_4dd.length){ return _4db; } var _4e2=_4de.length; for(var _4e3=0;_4e3<_4e2;++_4e3){ if(_4dd[_4e3].length!=0){ var _4e4=(_4da)?this.findUserSelectedDrillItem(_4da,_4dd[_4e3]):0; if(_4e4<0){ continue; } if((_4d9===true)||this.getDrillOption(_4d7)){ if(_4de[_4e3][_4e4]==""||_4db.toString().indexOf(_4de[_4e3][_4e4],0)==-1){ _4db[_4db.length]=_4dd[_4e3][_4e4]; _4db[_4db.length]=_4de[_4e3][_4e4]; if(_4d8===true){ _4db[_4db.length]=_4df[_4e3][_4e4]; _4db[_4db.length]=_4e0[_4e3][_4e4]; } } } } } return _4db; }; CDrillManager.prototype.findUserSelectedDrillItem=function(_4e5,_4e6){ for(var _4e7=0;_4e7<_4e6.length;++_4e7){ if(_4e5==_4e6[_4e7]){ return _4e7; } } return -1; }; CDrillManager.prototype.getModelDrillThroughContext=function(_4e8){ var _4e9=""; if(this.canDrillThrough()===true){ if(typeof gUseNewSelectionContext=="undefined"){ var _4ea=""; if(typeof getConfigFrame!="undefined"){ _4ea=decodeURIComponent(getConfigFrame().cfgGet("PackageBase")); }else{ if(this.getCV().getModelPath()!==""){ _4ea=this.getCV().getModelPath(); } } _4e9=getViewerSelectionContext(this.getSelectionController(),new CSelectionContext(_4ea)); }else{ var _4eb=new CParameterValues(); var _4ec=this.getSelectionController(); if(_4ec){ var _4ed=_4ec.getAllSelectedObjects(); for(var _4ee=0;_4ee<_4ed.length;++_4ee){ var _4ef=_4ed[_4ee]; var _4f0=_4ef.getMuns(); var _4f1=_4ef.getMetadataItems(); var _4f2=_4ef.getUseValues(); for(var _4f3=0;_4f3<_4f1.length;++_4f3){ for(var idx=0;idx<_4f1[_4f3].length;++idx){ if(_4f1[_4f3][idx]==null||_4f1[_4f3][idx]==""){ continue; } var name=_4f1[_4f3][idx]; var _4f6; if(_4f0[_4f3][idx]!=null&&_4f0[_4f3][idx]!=""){ _4f6=_4f0[_4f3][idx]; }else{ _4f6=_4f2[_4f3][idx]; } var _4f7=_4f2[_4f3][idx]; _4eb.addSimpleParmValueItem(name,_4f6,_4f7,"true"); } } } } var _4f8=_4e8.XMLBuilderCreateXMLDocument("context"); _4e9=_4eb.generateXML(_4e8,_4f8); } } return _4e9; }; CDrillManager.prototype.rvDrillUp=function(_4f9){ this.getCV().executeAction("DrillUp",_4f9); }; CDrillManager.prototype.rvDrillDown=function(_4fa){ this.getCV().executeAction("DrillDown",_4fa); }; CDrillManager.prototype.rvBuildXMLDrillParameters=function(_4fb,_4fc){ var _4fd=this.getDrillParameters(_4fb,true,false,_4fc); if(_4fd.length==0){ return drillParams; } return this.buildDrillParametersSpecification(_4fd); }; CDrillManager.prototype.buildDrillParametersSpecification=function(_4fe){ var _4ff=""; var idx=0; while(idx<_4fe.length){ _4ff+=""; _4ff+=""; _4ff+=sXmlEncode(_4fe[idx++]); _4ff+=""; _4ff+=""; _4ff+=sXmlEncode(_4fe[idx++]); _4ff+=""; _4ff+=""; _4ff+=sXmlEncode(_4fe[idx++]); _4ff+=""; _4ff+=""; _4ff+=sXmlEncode(_4fe[idx++]); _4ff+=""; _4ff+=""; } _4ff+=""; return _4ff; }; CDrillManager.prototype.getAuthoredDrillsForCurrentSelection=function(){ var _501=null; var _502=this.getAuthoredDrillThroughTargets(); if(_502.length>0){ var _503=""; for(var _504=0;_504<_502.length;++_504){ _503+=eval("\""+_502[_504]+"\""); } _503+=""; var cv=this.getCV(); var _506=cv.getAction("AuthoredDrill"); var _507=cv.getDrillTargets(); if(_507.length>0){ _501=_506.getAuthoredDrillThroughContext(_503,_507); } } return _501; }; CDrillManager.prototype.getAuthoredDrillsForGotoPage=function(){ var _508=""; var _509=this.getAuthoredDrillsForCurrentSelection(); if(_509){ _508=XMLBuilderSerializeNode(_509); } return _508; }; CDrillManager.prototype.launchGoToPage=function(_50a,_50b){ var _50c=this.getSelectionController(); if((_50c!=null&&_50c.getModelDrillThroughEnabled()==true)||(typeof _50a!="undefined"&&_50a!=null&&_50a!="")){ var _50d=this.getAuthoredDrillsForGotoPage(); var _50e=this.getModelDrillThroughContext(self); var form=document.getElementById("drillForm"); if(form!=null){ document.body.removeChild(form); } form=document.createElement("form"); var cvid=this.getCVId(); var _511=document.forms["formWarpRequest"+cvid]; form.setAttribute("id","drillForm"); form.setAttribute("name","drillForm"); form.setAttribute("target",_511.getAttribute("target")); form.setAttribute("method","post"); form.setAttribute("action",_511.getAttribute("action")); form.style.display="none"; document.body.appendChild(form); if(this.getCV().getModelPath()!==""){ form.appendChild(createHiddenFormField("modelPath",this.getCV().getModelPath())); } if(typeof _511["ui.object"]!="undefined"&&_511["ui.object"].value!=""){ form.appendChild(createFormField("drillSource",_511["ui.object"].value)); }else{ if(typeof this.getCV().envParams["ui.spec"]!="undefined"){ form.appendChild(createFormField("sourceSpecification",this.getCV().envParams["ui.spec"])); } } if(_50d!=""){ form.appendChild(createHiddenFormField("m","portal/drillthrough.xts")); form.appendChild(createFormField("invokeGotoPage","true")); form.appendChild(createFormField("m","portal/drillthrough.xts")); form.appendChild(createFormField("modelDrillEnabled",_50c.getModelDrillThroughEnabled())); if(typeof gUseNewSelectionContext=="undefined"){ form.appendChild(createFormField("newSelectionContext","true")); } }else{ if(typeof gUseNewSelectionContext=="undefined"){ form.appendChild(createHiddenFormField("m","portal/goto2.xts")); }else{ form.appendChild(createHiddenFormField("m","portal/goto.xts")); } } form.appendChild(createHiddenFormField("b_action","xts.run")); form.appendChild(createHiddenFormField("drillTargets",_50d)); if(typeof gUseNewSelectionContext=="undefined"){ form.appendChild(createHiddenFormField("drillContext",_50e)); }else{ form.appendChild(createHiddenFormField("modeledDrillthru",_50e)); } form.appendChild(createHiddenFormField("errURL","javascript:window.close();")); if(typeof _50b!="undefined"&&_50b==true){ form.appendChild(this.createFormField("directLaunch","true")); } var _512=""; if(this.getCV().envParams["ui.routingServerGroup"]){ _512=this.getCV().envParams["ui.routingServerGroup"]; } form.appendChild(createHiddenFormField("ui.routingServerGroup",_512)); if(this.getCV().getExecutionParameters()!=""){ form.appendChild(createHiddenFormField("encExecutionParameters",this.getCV().getExecutionParameters())); } if(_511.lang&&_511.lang.value!=""){ form.appendChild(createHiddenFormField("lang",_511.lang.value)); } if(!this.getCV()||!this.getCV().launchGotoPageForIWidgetMobile(drillForm)){ if(typeof this.getCV().launchGotoPage==="function"){ this.getCV().launchGotoPage(form); }else{ var _513="winNAT_"+(new Date()).getTime(); var _514=this.getCV().getWebContentRoot()+"/rv/blankDrillWin.html?cv.id="+cvid; window.open(_514,_513,"toolbar,location,status,menubar,resizable,scrollbars=1"); form.target=_513; } } } }; CDrillManager.prototype.buildSearchPageXML=function(_515,pkg,_517,_518,_519,_51a,_51b){ var _51c=null; if(typeof _515.XMLElement=="function"){ _51c=_515.XMLBuilderCreateXMLDocument("cognosSearch"); _515.XMLBuilderSetAttributeNodeNS(_51c.documentElement,"xmlns:cs","http://developer.cognos.com/schemas/cs/1/"); var _51d=_51c.createElement("package"); if(typeof pkg=="string"&&pkg!==""){ _51d.appendChild(_51c.createTextNode(pkg)); } _51c.documentElement.appendChild(_51d); var _51e=_51c.createElement("model"); if(typeof _517=="string"&&_517!==""){ _51e.appendChild(_51c.createTextNode(_517)); } _51c.documentElement.appendChild(_51e); var _51f=_51c.createElement("selectedContext"); _515.XMLBuilderSetAttributeNodeNS(_51f,"xmlns:xs","http://www.w3.org/2001/XMLSchema"); _515.XMLBuilderSetAttributeNodeNS(_51f,"xmlns:bus","http://developer.cognos.com/schemas/bibus/3/"); _515.XMLBuilderSetAttributeNodeNS(_51f,"SOAP-ENC:arrayType","bus:parameterValue[]","http://schemas.xmlsoap.org/soap/encoding/"); _515.XMLBuilderSetAttributeNodeNS(_51f,"xmlns:xsd","http://www.w3.org/2001/XMLSchema"); _515.XMLBuilderSetAttributeNodeNS(_51f,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance"); _51c.documentElement.appendChild(_51f); for(var _520 in _518){ var _521=_51c.createElement("item"); _515.XMLBuilderSetAttributeNodeNS(_521,"xsi:type","bus:parameterValue","http://www.w3.org/2001/XMLSchema-instance"); var _522=_515.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:name",_51c); _515.XMLBuilderSetAttributeNodeNS(_522,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance"); _522.appendChild(_51c.createTextNode(_518[_520].name)); var _523=_515.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:value",_51c); _515.XMLBuilderSetAttributeNodeNS(_523,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance"); _515.XMLBuilderSetAttributeNodeNS(_523,"SOAP-ENC:arrayType","bus:parmValueItem[]","http://schemas.xmlsoap.org/soap/encoding/"); for(var j=0;j<_518[_520].values.length;j++){ var _525=_51c.createElement("item"); _515.XMLBuilderSetAttributeNodeNS(_525,"xsi:type","bus:simpleParmValueItem","http://www.w3.org/2001/XMLSchema-instance"); var _526=_515.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:use",_51c); _515.XMLBuilderSetAttributeNodeNS(_526,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance"); _526.appendChild(_51c.createTextNode(_518[_520].values[j][0])); var _527=_515.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:display",_51c); _515.XMLBuilderSetAttributeNodeNS(_527,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance"); var _528=_518[_520].values[j][1]==null?"":_518[_520].values[j][1]; _527.appendChild(_51c.createTextNode(_528)); _525.appendChild(_526); _525.appendChild(_527); _523.appendChild(_525); } _521.appendChild(_522); _521.appendChild(_523); _51f.appendChild(_521); } var _529=_51c.createElement("defaultMeasure"); _51c.documentElement.appendChild(_529); _51a.buildXML(_515,_51c,"data"); var _52a=_51c.createElement("filter"); _51c.documentElement.appendChild(_52a); } return _51c; }; CDrillManager.prototype.openSearchPage=function(_52b,_52c){ this.getModelDrillThroughContext(self); var _52d=document.getElementById("searchPage"); if(_52d!=null){ document.body.removeChild(_52d); } _52d=document.createElement("form"); _52d.setAttribute("id","searchPage"); _52d.setAttribute("name","searchPage"); _52d.setAttribute("method","post"); _52d.setAttribute("target",_52d.name); _52d.setAttribute("action",this.getCV().getGateway()+"/gosearch"); _52d.style.display="none"; document.body.appendChild(_52d); _52d.appendChild(createHiddenFormField("csn.action","search")); _52d.appendChild(createHiddenFormField("csn.drill",_52c)); var _52e=window.open("",_52d.name,"directories=no,location=no,status=no,toolbar=no,resizable=yes,scrollbars=yes,top=100,left=100,height=480,width=640"); _52e.focus(); _52d.submit(); }; CDrillManager.prototype.launchSearchPage=function(){ var _52f=this.getSelectionController(); var _530=document.forms["formWarpRequest"+this.getCVId()]; var _531=this.determineSelectionsForSearchPage(_52f); var _532=this.getSearchContextDataSpecfication(_52f); var _533=this.buildSearchPageXML(self,_530.packageBase.value,this.getCV().getModelPath(),_531,[],_532,[]); this.openSearchPage(_530.packageBase.value,XMLBuilderSerializeNode(_533)); }; CDrillManager.prototype.qsDrillDown=function(){ if(!this.canDrillDown()){ getConfigFrame().dlgGenericSelectionMessage(false); return; } var _534="DD:"; this.qsSendDrillCommand(_534); }; CDrillManager.prototype.qsDrillUp=function(){ if(!this.canDrillUp()){ getConfigFrame().dlgGenericSelectionMessage(false); return; } var _535="DU:"; this.qsSendDrillCommand(_535); }; CDrillManager.prototype.qsSendDrillCommand=function(_536){ var _537; if(_536=="DU:"){ _537="drillUp"; }else{ _537="drillDown"; } var _538=this.getDrillParameters(_537,false,false); if(_538.length==0){ getConfigFrame().dlgGenericSelectionMessage(false); return; } for(var idx=0;idx<_538.length;++idx){ _536+=getConfigFrame().escapeParam(_538[idx]); if(idx+1<_538.length){ _536+=","; } } getConfigFrame().sendCmd(_536,"",true); }; CDrillManager.prototype.qsLaunchGoToPage=function(_53a){ var _53b=this.getSelectionController(); if(_53b!=null&&_53b.getModelDrillThroughEnabled()==true){ var _53c=this.getModelDrillThroughContext(cf); if(_53c==""){ getConfigFrame().dlgGenericSelectionMessage(false); return; } var _53d=document.getElementById("gotoPage"); if(_53d!=null){ document.body.removeChild(_53d); } _53d=document.createElement("form"); _53d.setAttribute("id","gotoPage"); _53d.setAttribute("name","gotoPage"); _53d.setAttribute("method","post"); _53d.style.display="none"; document.body.appendChild(_53d); var _53e=getConfigFrame(); _53d.appendChild(this.createFormField("objpath",decodeURIComponent(_53e.cfgGet("PackageBase")))); if(typeof gUseNewSelectionContext=="undefined"){ _53d.appendChild(this.createFormField("m","portal/goto2.xts")); }else{ _53d.appendChild(this.createFormField("m","portal/goto.xts")); } _53d.appendChild(this.createFormField("b_action","xts.run")); if(typeof gUseNewSelectionContext=="undefined"){ _53d.appendChild(this.createFormField("drillContext",_53c)); }else{ _53d.appendChild(this.createFormField("modeledDrillthru",_53c)); } if(typeof getConfigFrame().routingServerGroup!="undefined"){ _53d.appendChild(this.createFormField("ui.routingServerGroup",getConfigFrame().routingServerGroup)); } if(typeof _53a!="undefined"&&_53a==true){ _53d.appendChild(this.createFormField("directLaunch","true")); } var _53f=_53e.goApplicationManager.getReportManager().getParameterManager().getExecutionParameters(); if(_53f){ _53d.appendChild(this.createFormField("encExecutionParameters",_53f)); } var _540="winNAT_"+(new Date()).getTime(); var _541=this.getCV().getWebContentRoot()+"/rv/blankDrillWin.html?cv.id="+this.getCVId(); window.open(_541,_540,"toolbar,location,status,menubar,resizable,scrollbars=1"); _53d.target=_540; } }; CDrillManager.prototype.qsLaunchSearchPage=function(){ var cf=getConfigFrame(); var _543=goWindowManager.getSelectionController(); var _544=this.determineSelectionsForSearchPage(_543); var _545=this.getSearchContextDataSpecfication(_543); var _546=decodeURIComponent(cf.cfgGet("PackageBase")); var _547=this.buildSearchPageXML(cf,_546,decodeURIComponent(cf.cfgGet("cmLastModel")),_544,[],_545,[]); this.openSearchPage(_546,cf.XMLBuilderSerializeNode(_547)); }; CDrillManager.prototype.determineSelectionsForSearchPage=function(_548){ var _549=new CtxArrayPlaceHolder(); var _54a=_548.getAllSelectedObjects(); for(var i=0;i<_54a.length;i++){ var _54c=_54a[i].getColumnName(); if(!this.containsByIndiceInArray(_549,_54c)){ _549[_54c]={}; _549[_54c].name=_54c; _549[_54c].values=[]; } var idx0=""; var muns=_54a[i].getMuns(); if(muns!=null&&muns.length>0){ idx0=muns[0][0]; } var idx1=_54a[i].getDisplayValues()[0]; if(!(this.containsInArray(_549[_54c].values,0,idx0)&&this.containsInArray(_549[_54c].values,1,idx1))){ _549[_54c].values[_549[_54c].values.length]=[idx0,idx1]; } } return _549; }; CDrillManager.prototype.getSearchContextDataSpecfication=function(_550){ var _551=new CParameterValues(); var _552=_550.getCCDManager(); var _553=_552.m_cd; for(var _554 in _553){ var _555=_552.GetUsage(_554); if(_555!="2"){ var _556=_552.GetRDIValue(_554); var _557=_552.GetDisplayValue(_554); _551.addSimpleParmValueItem(_556,_556,_557,"true"); } } return _551; }; CDrillManager.prototype.containsByIndiceInArray=function(a,v){ for(var i in a){ if(i==v){ return true; } } return false; }; CDrillManager.prototype.containsInArray=function(a,idx,v){ for(var i in a){ if(a[i][idx]==v){ return true; } } return false; }; CDrillManager.prototype.createFormField=function(name,_560){ var _561=document.createElement("input"); _561.setAttribute("type","hidden"); _561.setAttribute("name",name); _561.setAttribute("value",_560); return (_561); }; CDrillManager.prototype.getAuthoredDrillThroughTargets=function(){ var _562=[]; var _563=this.getSelectionController(); var _564=null; if(_563!=null){ if(_563.getSelectedColumnIds().length==1){ var _565=_563.getSelections(); for(var _566=0;_566<_565.length;++_566){ var _567=_565[_566]; _564=_567.getCellRef(); while(_564){ if(_564.getAttribute("dtTargets")!=null){ _562.push(""+_564.getAttribute("dtTargets")+""); break; }else{ if(_564.getAttribute("onclick")!=null){ var _568=_564.getAttribute("onclick"); var _569=null; if(_568.indexOf("doSingleDrillThrough")!=-1){ _569=_568.replace("doSingleDrillThrough","this.buildRvTargetsForSingleDrillThrough"); }else{ if(_568.indexOf("doMultipleDrillThrough")!=-1){ _569=_568.replace("doMultipleDrillThrough","this.buildRvTargetsForMultipleDrillThrough"); } } if(_569!=null){ var _56a=eval(_569); if(_56a!=null){ _562.push(_56a); break; } } } } _564=XMLHelper_GetFirstChildElement(_564); } } }else{ if(_563.hasSelectedChartNodes()){ var _56b=_563.getSelectedChartNodes(); var _56c=_56b[0]; _564=_56c.getArea(); if(_564.getAttribute("dtTargets")!=null){ _562.push(""+_564.getAttribute("dtTargets")+""); } }else{ if(_563.getSelectedDrillThroughImage()!=null){ var _56d=_563.getSelectedDrillThroughImage(); if(_56d&&_56d.getAttribute("dtTargets")!=null){ _562.push(""+_56d.getAttribute("dtTargets")+""); } }else{ if(_563.getSelectDrillThroughSingleton()!=null){ var _56e=_563.getSelectDrillThroughSingleton(); if(_56e&&_56e.getAttribute("dtTargets")!=null){ _562.push(""+_56e.getAttribute("dtTargets")+""); } } } } } } return _562; }; CDrillManager.prototype.getDrillThroughParameters=function(_56f,evt){ if(typeof _56f=="undefined"){ _56f="query"; } var _571=[]; if(typeof evt!="undefined"){ var _572=getCrossBrowserNode(evt,true); try{ while(_572){ if(typeof _572.getAttribute!="undefined"&&_572.getAttribute("dtTargets")){ _571.push(""+_572.getAttribute("dtTargets")+""); break; } _572=_572.parentNode; } } catch(e){ return false; } }else{ var oCV=this.getCV(); var _574=oCV.getDrillMgr(); var _575=_574.getSelectionController(); if(_575!=null){ var _576=null; if(_575.hasSelectedChartNodes()){ var _577=_575.getSelectedChartNodes(); var _578=_577[0]; _576=_578.getArea(); } if(_576!=null){ _571.push(""+_576.getAttribute("dtTargets")+""); }else{ _571=this.getAuthoredDrillThroughTargets(); } } } if(_571.length>0){ var _579=""; for(var _57a=0;_57a<_571.length;++_57a){ _579+=eval("\""+_571[_57a]+"\""); } _579+=""; var _57b=this.getCV().getAction("AuthoredDrill"); if(_56f=="query"){ _57b.populateContextMenu(_579); this.showOtherMenuItems(); }else{ if(this.getCV().envParams["cv.id"]=="AA"){ this.getCV().m_viewerFragment.raiseAuthoredDrillClickEvent(); }else{ _57b.execute(_579); } } return true; }else{ if(_56f=="query"){ this.showOtherMenuItems(); return true; }else{ return false; } } }; CDrillManager.prototype.executeAuthoredDrill=function(_57c){ var _57d=decodeURIComponent(_57c); var _57e=this.getCV().getAction("AuthoredDrill"); _57e.executeDrillTarget(_57d); }; CDrillManager.prototype.doesMoreExist=function(_57f){ for(var i=0;i<_57f.getNumItems();i++){ var _581=_57f.get(i); if(_581!=null){ if((_581 instanceof CMenuItem)&&(_581.getLabel()==RV_RES.RV_MORE)&&(_581.getAction()==this.getCVObjectRef()+".getDrillMgr().launchGoToPage();")){ return true; } } } return false; }; CDrillManager.prototype.showOtherMenuItems=function(){ var cv=this.getCV(); var _583=cv.rvMainWnd; var _584=_583.getToolbarControl(); var _585=null; var _586=null; if(typeof _584!="undefined"&&_584!=null){ _585=_584.getItem("goto"); if(_585){ _586=_585.getMenu(); } } var _587=_583.getContextMenu(); var _588=_583.getUIHide(); var _589=null; if(typeof _587!="undefined"&&_587!=null&&_587.getGoToMenuItem()){ _589=_587.getGoToMenuItem().getMenu(); } var _58a=null; var _58b=this.getSelectionController(); if(_586!=null){ if(this.doesMoreExist(_586)==false){ if(typeof gMenuSeperator!="undefined"&&_586.getNumItems()>0&&(cv.bCanUseCognosViewerIndexSearch||_588.indexOf(" RV_TOOLBAR_BUTTONS_GOTO_RELATED_LINKS ")==-1)){ _586.add(gMenuSeperator); } var _58c=new CMenuItem(_586,RV_RES.RV_MORE,this.getCVObjectRef()+".getDrillMgr().launchGoToPage();","",gMenuItemStyle,cv.getWebContentRoot(),cv.getSkin()); if(_588.indexOf(" RV_TOOLBAR_BUTTONS_GOTO_RELATED_LINKS ")!=-1){ _58c.hide(); }else{ if(_58b==null||_58b.getModelDrillThroughEnabled()==false){ _58c.disable(); } } } } if(_589!=null){ if(typeof gMenuSeperator!="undefined"&&_589.getNumItems()>0&&(cv.bCanUseCognosViewerIndexSearch||_588.indexOf(" RV_CONTEXT_MENU_GOTO_RELATED_LINKS ")==-1)){ _589.add(gMenuSeperator); } var _58d=new CMenuItem(_589,RV_RES.RV_MORE,this.getCVObjectRef()+".getDrillMgr().launchGoToPage();","",gMenuItemStyle,cv.getWebContentRoot(),cv.getSkin()); if(_588.indexOf(" RV_CONTEXT_MENU_GOTO_RELATED_LINKS ")!=-1){ _58d.hide(); }else{ if(_58b==null||_58b.getModelDrillThroughEnabled()==false){ _58d.disable(); } } } if(_58a!=null&&_58b!=null){ var _58e=_58b.getAllSelectedObjects(); if(_58e==null||_58e.length===0){ _58a.disable(); } } if(_586!=null){ _586.draw(); if(_586.isVisible()){ _586.show(); } } if(_589!=null){ _589.draw(); if(_589.isVisible()){ _589.show(); } } }; CDrillManager.prototype.ddc=function(evt){ var node=getNodeFromEvent(evt); if(node!=null&&node.getAttribute("ddc")!=="1"){ node.setAttribute("ddc","1"); if(node.getAttribute("dtTargets")){ node.className="dl "+node.className; node.setAttribute("href","#"); return; } var _591=this.getSelectionController(); if(_591!=null){ var _592=_591.getSelectionObjectFactory().getSelectionChartObject(node); if(_592!=null){ var _593=_592.getDrillOptions(); for(var idx=0;idx<_593.length;++idx){ var _595=_593[idx][0]; if((node.getAttribute("isChartTitle")==="true"&&_595=="1")||_595=="3"||_595=="2"){ node.className="dl "+node.className; node.setAttribute("href","#"); break; } } } } } }; CDrillManager.prototype.buildRvTargetsForSingleDrillThrough=function(_596){ if(typeof _596=="undefined"||_596==null){ return null; } var _597=this.getCV().getDrillTargets(); if(!_597||_597.length==0){ return null; } var _598=_596[0][0]; if(typeof _598=="undefined"||_598==null){ return null; } var _599=_597[_598]; if(typeof _599=="undefined"||_599==null){ return null; } var _59a=""; return ""+_59a+""; }; CDrillManager.prototype.buildRvTargetsForMultipleDrillThrough=function(_59b){ if(typeof _59b=="undefined"||_59b==null){ return null; } var _59c=this.getCV().getDrillTargets(); if(!_59c||_59c.length==0){ return null; } var _59d=""; for(var _59e=0;_59e<_59b.length;++_59e){ var _59f=_59b[_59e]; if(_59f.length<2){ continue; } var _5a0=_59f[0]; if(typeof _5a0=="undefined"||_5a0==null){ continue; } var _5a1=_59f[1]; if(typeof _5a1=="undefined"||_5a1==null){ continue; } var _5a2=_59c[_5a0]; if(typeof _5a2=="undefined"||_5a2==null){ continue; } if(_5a1===null||_5a1===""){ _5a1=_5a2.getLabel(); } _59d+=""; } if(_59d.length>0){ return ""+_59d+""; } return null; }; function CDrillThroughTarget(_5a3,_5a4,_5a5,_5a6,_5a7,path,_5a9,_5aa,_5ab,_5ac,_5ad,_5ae){ this.m_label=_5a3; this.m_outputFormat=_5a4; this.m_outputLocale=_5a5; this.m_showInNewWindow=_5a6; this.m_method=_5a7; this.m_path=path; this.m_bookmark=_5a9; this.m_parameters=_5aa; this.m_objectPaths=_5ab; this.m_prompt="false"; this.m_dynamicDrillThrough=false; this.m_parameterProperties=_5ae; if(typeof _5ac!="undefined"&&_5ac!=null){ if(_5ac=="yes"){ this.m_prompt="true"; }else{ if(_5ac=="target"){ this.m_prompt=""; } } } if(typeof _5ad!="undefined"&&_5ad!=null){ if(typeof _5ad=="string"){ _5ad=_5ad=="true"?true:false; } this.m_dynamicDrillThrough=_5ad; } }; function CDrillThroughTarget_getParameterProperties(){ return this.m_parameterProperties; }; function CDrillThroughTarget_getLabel(){ return this.m_label; }; function CDrillThroughTarget_getOutputFormat(){ return this.m_outputFormat; }; function CDrillThroughTarget_getOutputLocale(){ return this.m_outputLocale; }; function CDrillThroughTarget_getShowInNewWindow(){ return this.m_showInNewWindow; }; function CDrillThroughTarget_getMethod(){ return this.m_method; }; function CDrillThroughTarget_getPath(){ return this.m_path; }; function CDrillThroughTarget_getBookmark(){ return this.m_bookmark; }; function CDrillThroughTarget_getParameters(){ return this.m_parameters; }; function CDrillThroughTarget_getObjectPaths(){ return this.m_objectPaths; }; function CDrillThroughTarget_getPrompt(){ return this.m_prompt; }; function CDrillThroughTarget_isDynamicDrillThrough(){ return this.m_dynamicDrillThrough; }; CDrillThroughTarget.prototype.getLabel=CDrillThroughTarget_getLabel; CDrillThroughTarget.prototype.getOutputFormat=CDrillThroughTarget_getOutputFormat; CDrillThroughTarget.prototype.getOutputLocale=CDrillThroughTarget_getOutputLocale; CDrillThroughTarget.prototype.getShowInNewWindow=CDrillThroughTarget_getShowInNewWindow; CDrillThroughTarget.prototype.getMethod=CDrillThroughTarget_getMethod; CDrillThroughTarget.prototype.getPath=CDrillThroughTarget_getPath; CDrillThroughTarget.prototype.getBookmark=CDrillThroughTarget_getBookmark; CDrillThroughTarget.prototype.getParameters=CDrillThroughTarget_getParameters; CDrillThroughTarget.prototype.getObjectPaths=CDrillThroughTarget_getObjectPaths; CDrillThroughTarget.prototype.getPrompt=CDrillThroughTarget_getPrompt; CDrillThroughTarget.prototype.isDynamicDrillThrough=CDrillThroughTarget_isDynamicDrillThrough; CDrillThroughTarget.prototype.getParameterProperties=CDrillThroughTarget_getParameterProperties; function sXmlEncode(_5af){ var _5b0=""+_5af; if((_5b0=="0")||((_5af!=null)&&(_5af!=false))){ _5b0=_5b0.replace(/&/g,"&"); _5b0=_5b0.replace(//g,">"); _5b0=_5b0.replace(/"/g,"""); _5b0=_5b0.replace(/'/g,"'"); }else{ if(_5af==null){ _5b0=""; } } return _5b0; }; function createFormField(name,_5b2){ var _5b3=document.createElement("input"); _5b3.setAttribute("type","hidden"); _5b3.setAttribute("name",name); _5b3.setAttribute("value",_5b2); return (_5b3); }; function setBackURLToCloseWindow(_5b4){ var _5b5=_5b4.childNodes; if(_5b5){ for(var _5b6=0;_5b6<_5b5.length;++_5b6){ var _5b7=_5b5[_5b6]; var _5b8=_5b7.getAttribute("name"); if(_5b8&&_5b8=="ui.backURL"){ _5b4.removeChild(_5b7); } } } _5b4.appendChild(createFormField("ui.backURL","javascript:window.close();")); }; function doMultipleDrills(_5b9,cvId){ if(parent!=this&&parent.doMultipleDrills){ if(getCVId()!=""&&getCVId()!=cvId){ cvId=getCVId(); } return parent.doMultipleDrills(_5b9,cvId); }else{ if(window.gViewerLogger){ window.gViewerLogger.log("Drill Targets",_5b9,"text"); } var oCV=null; try{ oCV=getCognosViewerObjectRef(cvId); } catch(exception){ } var _5bc=buildDrillForm(oCV); addDrillEnvironmentFormFields(_5bc,oCV); if(typeof oCV!="undefined"&&oCV!=null){ var _5bd=oCV.getModelPath(); _5bc.appendChild(createFormField("modelPath",_5bd)); var _5be=oCV.getSelectionController(); var _5bf=""; if(typeof getViewerSelectionContext!="undefined"&&typeof CSelectionContext!="undefined"){ _5bf=getViewerSelectionContext(_5be,new CSelectionContext(_5bd)); } _5bc.appendChild(createFormField("drillContext",_5bf)); _5bc.appendChild(createFormField("modelDrillEnabled",_5be.getModelDrillThroughEnabled())); if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"&&document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value!=""){ _5bc.appendChild(createFormField("drillSource",document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value)); }else{ if(typeof oCV.envParams["ui.spec"]!="undefined"){ _5bc.appendChild(createFormField("sourceSpecification",oCV.envParams["ui.spec"])); } } } _5bc.setAttribute("launchGotoPage","true"); _5bc.appendChild(createFormField("drillTargets",_5b9)); _5bc.appendChild(createFormField("invokeGotoPage","true")); _5bc.appendChild(createFormField("m","portal/drillthrough.xts")); _5bc.appendChild(createFormField("b_action","xts.run")); var _5c0="winNAT_"+(new Date()).getTime(); var _5c1=".."; if(oCV!=null){ _5c1=oCV.getWebContentRoot(); var _5c2=oCV.getExecutionParameters(); if(_5c2!=""){ _5bc.appendChild(createFormField("encExecutionParameters",_5c2)); } } if(!oCV||!oCV.launchGotoPageForIWidgetMobile(_5bc)){ if(oCV&&typeof oCV.launchGotoPage==="function"){ oCV.launchGotoPage(_5bc); }else{ var _5c3=_5c1+"/rv/blankDrillWin.html"; _5bc.target=_5c0; window.open(_5c3,_5c0); } } } }; function buildDrillForm(oCV){ var _5c5=document.getElementById("drillForm"); if(_5c5){ document.body.removeChild(_5c5); } _5c5=document.createElement("form"); if(typeof oCV!="undefined"&&oCV!=null){ var _5c6=document.getElementById("formWarpRequest"+oCV.getId()); _5c5.setAttribute("target",_5c6.getAttribute("target")); _5c5.setAttribute("action",_5c6.getAttribute("action")); }else{ _5c5.setAttribute("action",location.pathname); } _5c5.setAttribute("id","drillForm"); _5c5.setAttribute("name","drillForm"); _5c5.setAttribute("method","post"); _5c5.style.display="none"; document.body.appendChild(_5c5); return _5c5; }; function addDrillEnvironmentFormFields(_5c7,oCV){ if(window.g_dfEmail){ _5c7.appendChild(createFormField("dfemail",window.g_dfEmail)); } if(oCV!=null){ _5c7.appendChild(createFormField("cv.id",oCV.getId())); if(typeof oCV.envParams["ui.sh"]!="undefined"){ _5c7.appendChild(createFormField("ui.sh",oCV.envParams["ui.sh"])); } if(oCV.getViewerWidget()==null){ if(typeof oCV.envParams["cv.header"]!="undefined"){ _5c7.appendChild(createFormField("cv.header",oCV.envParams["cv.header"])); } if(typeof oCV.envParams["cv.toolbar"]!="undefined"){ _5c7.appendChild(createFormField("cv.toolbar",oCV.envParams["cv.toolbar"])); }else{ var _5c9=oCV.getAdvancedServerProperty("VIEWER_PASS_PORTLET_TOOLBAR_STATE_ON_DRILLTHROUGH"); if(oCV.m_viewerFragment&&_5c9!=null&&_5c9===true){ var _5ca=oCV.m_viewerFragment.canShowToolbar()?"true":"false"; _5c7.appendChild(createFormField("cv.toolbar",_5ca)); } } } if(typeof oCV.envParams["ui.backURL"]!="undefined"){ _5c7.appendChild(createFormField("ui.backURL",oCV.envParams["ui.backURL"])); } if(typeof oCV.envParams["ui.postBack"]!="undefined"){ _5c7.appendChild(createFormField("ui.postBack",oCV.envParams["ui.postBack"])); } if(typeof oCV.envParams["savedEnv"]!="undefined"){ _5c7.appendChild(createFormField("savedEnv",oCV.envParams["savedEnv"])); } if(typeof oCV.envParams["ui.navlinks"]!="undefined"){ _5c7.appendChild(createFormField("ui.navlinks",oCV.envParams["ui.navlinks"])); } if(typeof oCV.envParams["lang"]!="undefined"){ _5c7.appendChild(createFormField("lang",oCV.envParams["lang"])); } if(typeof oCV.envParams["ui.errURL"]!="undefined"){ _5c7.appendChild(createFormField("ui.errURL",oCV.envParams["ui.errURL"])); } var _5cb=""; if(oCV.envParams["ui.routingServerGroup"]){ _5cb=oCV.envParams["ui.routingServerGroup"]; } _5c7.appendChild(createHiddenFormField("ui.routingServerGroup",_5cb)); }else{ _5c7.appendChild(createFormField("cv.header","false")); _5c7.appendChild(createFormField("cv.toolbar","false")); } }; function appendReportHistoryObjects(oCV,_5cd){ if(oCV!=null&&typeof oCV.rvMainWnd!="undefined"&&_5cd!=null){ oCV.rvMainWnd.addCurrentReportToReportHistory(); var _5ce=oCV.rvMainWnd.saveReportHistoryAsXML(); _5cd.appendChild(createFormField("cv.previousReports",_5ce)); } }; function doSingleDrill(_5cf,args,_5d1,_5d2,_5d3,_5d4,_5d5,_5d6,cvId,_5d8,_5d9){ var _5da=""; if(typeof cvId=="string"){ _5da=cvId; } var oCV=null; try{ oCV=getCognosViewerObjectRef(cvId); } catch(exception){ } if(!oCV&&parent!=this&&parent.doSingleDrill){ if(getCVId()!=""&&getCVId()!=cvId){ cvId=getCVId(); } return parent.doSingleDrill(_5cf,args,_5d1,_5d2,_5d3,_5d4,_5d5,_5d6,cvId,_5d8,_5d9); }else{ if(typeof _5d1=="undefined"){ _5d1="default"; }else{ if(_5d1=="execute"){ _5d1="run"; } } if(_5d1=="edit"&&oCV!=null&&typeof oCV.m_viewerFragment){ _5cf="_blank"; } var _5dc=buildDrillForm(oCV); var _5dd=""; _5dd+=""+sXmlEncode(_5d1)+""; _5dd+=""+sXmlEncode(args[0][1])+""; _5dd+=""+sXmlEncode(_5d2)+""; _5dd+=""+sXmlEncode(_5d3)+""; _5dd+=""+sXmlEncode(_5d8)+""; _5dd+=""+sXmlEncode(_5d9)+""; if(typeof oCV!="undefined"&&oCV!=null){ _5dd+=""+oCV.getTracking()+""; if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"){ _5dd+=""+sXmlEncode(document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value)+""; } var _5de=oCV.getModelPath(); _5dd+=""+sXmlEncode(_5de)+""; _5dd+=""+sXmlEncode(getViewerSelectionContext(oCV.getSelectionController(),new CSelectionContext(_5de)))+""; if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"&&document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value!=""){ _5dd+=""+sXmlEncode(document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value)+""; }else{ if(typeof oCV.envParams["ui.spec"]!="undefined"){ _5dd+=""+sXmlEncode(oCV.envParams["ui.spec"])+""; } } } if(_5d4!=""){ _5dd+=""+_5d4+""; } if(_5d1!="view"){ if(typeof _5d5!="undefined"){ _5dd+=""+sXmlEncode(_5d5)+""; } if(typeof _5d6!="undefined"){ _5dd+=""+sXmlEncode(_5d6)+""; } } var _5df=0; _5dd+=""; var _5e0=[]; for(_5df=1;_5df"; } } } var _5e4=args[_5df][0]; var _5e5=false; for(var i=0;i<_5e0.length;i++){ var _5e7=_5e0[i]; if(_5e7.name===_5e4&&_5e7.value===sSel){ _5e5=true; break; } } if(!_5e5){ _5e0.push({"name":_5e4,"value":sSel}); _5dd+=""+sXmlEncode(sSel)+""; } } _5dd+=""; _5dd+=getExecutionParamNode(oCV); _5dd+=""; _5dc.appendChild(createFormField("authoredDrill.request",_5dd)); _5dc.appendChild(createFormField("ui.action","authoredDrillThrough2")); _5dc.appendChild(createFormField("b_action","cognosViewer")); addDrillEnvironmentFormFields(_5dc,oCV); if(!oCV||!oCV.executeDrillThroughForIWidgetMobile(_5dc)){ if(oCV&&typeof oCV.sendDrillThroughRequest==="function"){ oCV.sendDrillThroughRequest(_5dc); }else{ if(_5cf==""&&oCV!=null&&typeof oCV.m_viewerFragment!="undefined"){ oCV.m_viewerFragment.raiseAuthoredDrillEvent(_5dd); }else{ if((oCV!=null&&oCV.getViewerWidget()!=null)||_5cf!=""){ setBackURLToCloseWindow(_5dc); var _5e8="winNAT_"+(new Date()).getTime(); var _5e9=".."; if(oCV!=null){ _5e9=oCV.getWebContentRoot(); } var _5ea=_5e9+"/rv/blankDrillWin.html"; if(_5da){ _5ea+="?cv.id="+_5da; } if(oCV==null){ _5ea=window.location.href.substring(0,window.location.href.indexOf("/v1")); _5ea+="/?perspective=classicviewer"; _5ea+="&altDrillFlag=true"; _5ea+="&format="+sXmlEncode(_5d2); var _5eb=_5dc.getAttribute("name")+Date.now().toString(); _5dc.setAttribute("name",_5eb); if(typeof (Storage)!=="undefined"){ localStorage.setItem(_5eb,_5dc.outerHTML); _5ea+="&drillFormLabel="+_5eb; }else{ console.log("Sorry! No Web Storage support..."); } } if(window.gViewerLogger){ window.gViewerLogger.log("Drill Specification",_5dd,"xml"); } _5dc.target=_5e8; newWindow=window.open(_5ea,_5e8); }else{ appendReportHistoryObjects(oCV,_5dc); if(window.gViewerLogger){ window.gViewerLogger.log("Drill Specification",_5dd,"xml"); } _5dc.target=(oCV&&oCV.getDrillFormTarget)?oCV.getDrillFormTarget():"_self"; _5dc.submit(); if(oCV!=null&&!oCV.getDrillFormTarget){ setTimeout(getCognosViewerObjectRefAsString(oCV.getId())+".getRequestIndicator().show()",10); } } } } } } }; function getExecutionParamNode(oCV){ var _5ed=""; if(typeof oCV!="undefined"&&oCV!=null){ var _5ee=oCV.getExecutionParameters(); if(_5ee!=""){ _5ed+=""; _5ed+=sXmlEncode(_5ee); _5ed+=""; } } return _5ed; }; function doSingleDrillThrough(_5ef,_5f0,cvId){ var _5f2=_5ef[0][0]; if(typeof _5f2=="undefined"||_5f2==null){ return; } var _5f3=cvId&&window[cvId+"drillTargets"]?window[cvId+"drillTargets"][_5f2]:drillTargets[_5f2]; if(typeof _5f3=="undefined"){ return; } if(_5f0!=""&&_5f3.getPath()==""){ document.location="#"+_5f0; }else{ var args=[]; args[args.length]=["ui.object",_5f3.getPath()]; for(var _5f5=1;_5f5<_5ef.length;++_5f5){ args[args.length]=_5ef[_5f5]; } var _5f6=""; if(_5f3.getShowInNewWindow()=="true"){ _5f6="_blank"; } var _5f7=_5f3.getParameters(); var _5f8=_5f3.getObjectPaths(); var _5f9=cvId; if(!cvId){ _5f9=getCVId(); } doSingleDrill(_5f6,args,_5f3.getMethod(),_5f3.getOutputFormat(),_5f3.getOutputLocale(),_5f0,_5f7,_5f8,_5f9,_5f3.getPrompt(),false); } }; function getCVId(){ var _5fa=""; try{ _5fa=this.frameElement.id.substring("CVIFrame".length); } catch(exception){ } return _5fa; }; function doMultipleDrillThrough(_5fb,cvId){ var _5fd=""; for(var _5fe=0;_5fe<_5fb.length;++_5fe){ var _5ff=_5fb[_5fe]; if(_5ff.length<3){ continue; } var _600=_5ff[0]; if(typeof _600=="undefined"||_600==null){ continue; } var _601=_5ff[1]; if(typeof _601=="undefined"||_601==null){ continue; } var _602=cvId&&window[cvId+"drillTargets"]?window[cvId+"drillTargets"][_600]:drillTargets[_600]; if(typeof _602=="undefined"||_602==null){ continue; } if(_601===null||_601===""){ _601=_602.getLabel(); } _5fd+=""; for(var _603=2;_603<_5ff.length;++_603){ _5fd+=_5ff[_603]; } _5fd+=_602.getParameters(); _5fd+=_602.getObjectPaths(); _5fd+=""; } _5fd+=""; if(!cvId){ cvId=getCVId(); } doMultipleDrills(_5fd,cvId); }; function CScriptLoader(_604){ this.m_oFiles={}; this.m_aScripts=[]; this.m_aDocumentWriters=[]; this.m_ajaxWarnings=[]; this.m_bIgnoreAjaxWarnings=false; this.m_bHandleStylesheetLimit=false; this.m_iInterval=20; this.m_reFindCssPath=new RegExp("]*href=\"([^\"]*)\"","i"); this.m_reFindInlineStyle=//gi; this.m_reHasCss=//gi; this.m_reIsCss=/\.css$/i; this.m_reIsJavascript=/\.js$/i; this.m_reIsPromptingLocaleJavascript=/prompting.res.[promptingStrings|promptLocale].*\.js$/i; this.m_reScriptTagClose=/\s*<\/script>.*?$/i; this.m_reScriptTagOpen=/^.*?]*>\s*/i; this.m_reStyleTagClose=/(-|>|\s)*<\/style>\s*$/gi; this.m_reStyleTagOpen=/^\s*]*>(\s|<|!|-)*/gi; this.m_reEscapedCharacters=/\\[\\"']/g; this.m_reStringLiterals=/("|')[\s\S]*?\1/g; this.m_sWebContentRoot=_604; this.m_bHasCompletedExecution=false; this.m_aScriptLoadQueue=[]; this.m_bBlockScriptLoading=false; this.m_bUseScriptBlocking=false; this.m_bBlockPromptingLocaleScripts=false; this.m_aBlockedPromptingLocaleFileQueue=[]; }; CScriptLoader.prototype.hasCompletedExecution=function(){ return this.m_bHasCompletedExecution; }; CScriptLoader.prototype.setHandlerStylesheetLimit=function(_605){ this.m_bHandleStylesheetLimit=_605; }; CScriptLoader.prototype.executeScripts=function(_606,_607){ if(this.isReadyToExecute()){ for(var _608=0;_6080){ return false; } return true; }; CScriptLoader.prototype.loadCSS=function(_60d,_60e,_60f,_610){ var aM=_60d.match(this.m_reHasCss); if(aM){ for(var i=0;i0){ var _625=window.gScriptLoader.m_aBlockedPromptingLocaleFileQueue.shift(); window.gScriptLoader.loadObject(_625.sName,_625.sNamespaceId); } } if(window.gScriptLoader.m_aScriptLoadQueue.length>0){ window.gScriptLoader.loadObject(); } } }; CScriptLoader.prototype.moveLinks=function(node){ if(!node){ return; } var _627=node.getAttribute("href"); if(!_627||this.m_oFiles[_627]){ return; } this.m_oFiles[_627]="complete"; document.getElementsByTagName("head").item(0).appendChild(node); }; CScriptLoader.prototype.loadObject=function(_628,_629){ var _62a=null; if(typeof _628==="undefined"){ if(this.m_aScriptLoadQueue.length>0){ var _62b=this.m_aScriptLoadQueue.shift(); _628=_62b.name; _629=_62b.namespaceId; }else{ return; } } if(this.m_oFiles[_628]){ return; } if(this.m_bBlockScriptLoading){ this.m_aScriptLoadQueue.push({"name":_628,"namespaceId":_629}); }else{ if(_628.match(this.m_reIsCss)){ _62a=document.createElement("link"); _62a.setAttribute("rel","stylesheet"); _62a.setAttribute("type","text/css"); _62a.setAttribute("href",_628); if(window.isIE&&window.isIE()){ _62a.onreadystatechange=CScriptLoader_onReadyStateChange; _62a.onload=CScriptLoader_onReadyStateChange; _62a.onerror=CScriptLoader_onReadyStateChange; this.m_oFiles[_628]="new"; }else{ this.m_oFiles[_628]="complete"; } }else{ if(_628.match(this.m_reIsJavascript)){ if(_628.match(this.m_reIsPromptingLocaleJavascript)){ if(this.m_bBlockPromptingLocaleScripts){ this.m_aBlockedPromptingLocaleFileQueue.push({"sName":_628,"sNamespaceId":_629}); return; } this.m_bBlockPromptingLocaleScripts=true; } this.m_bBlockScriptLoading=this.m_bUseScriptBlocking; _62a=document.createElement("script"); _62a.setAttribute("language","javascript"); _62a.setAttribute("type","text/javascript"); _62a.setAttribute("src",_628); _62a.sFilePath=_628; _62a.onreadystatechange=CScriptLoader_onReadyStateChange; _62a.onload=CScriptLoader_onReadyStateChange; _62a.onerror=CScriptLoader_onReadyStateChange; this.addNamespaceAttribute(_62a,_629); this.m_oFiles[_628]="new"; } } if(_62a){ document.getElementsByTagName("head").item(0).appendChild(_62a); } } }; CScriptLoader.prototype.loadScriptsFromDOM=function(_62c,_62d,_62e){ if(!_62c){ return; } var _62f=_62c.getElementsByTagName("script"); while(_62f.length>0){ var _630=_62f[0]; if(_630.getAttribute("src")!=null&&_630.getAttribute("src").length>0){ this.loadObject(_630.getAttribute("src"),_62d); }else{ var _631=_630.innerHTML; var _632=false; if(_631.indexOf("document.write")!=-1){ var _633=_631.replace(this.m_reEscapedCharacters,"").replace(this.m_reStringLiterals,""); _632=(_633.indexOf("document.write")!=-1); } if(_632){ if(_62e){ var sId="CVScriptFromDOMPlaceHolder"+_62f.length+_62d; var _635=_630.ownerDocument.createElement("span"); _635.setAttribute("id",sId); _630.parentNode.insertBefore(_635,_630); this.m_aDocumentWriters.push(new CDocumentWriter(sId,_631)); } }else{ if(_631.length>0){ this.m_aScripts.push(_631); } } } _630.parentNode.removeChild(_630); } }; CScriptLoader.prototype.loadStyles=function(_636,_637){ if(!_636||!_636.parentNode){ return; } var _638=_636.parentNode.getElementsByTagName("style"); while(_638.length>0){ var _639=_638[0]; if(_637){ this.addNamespaceAttribute(_639,_637); } if(window.isIE&&window.isIE()&&window.getNavVer()<10){ if((document.getElementsByTagName("style").length+document.getElementsByTagName("link").length)>=30){ if(this.m_bHandleStylesheetLimit){ if(typeof window.gaRV_INSTANCES!="undefined"){ for(var i=0;i=30){ if(typeof console!="undefined"&&console&&console.log){ console.log("Stylesheet limit reached."); } this.m_ajaxWarnings.push("Stylesheet limit reached."); return; } } } document.getElementsByTagName("head").item(0).appendChild(_639); } }; CScriptLoader.prototype.loadAll=function(_63b,_63c,_63d,_63e){ this.m_bScriptLoaderCalled=true; this.m_bHasCompletedExecution=false; this.loadScriptsFromDOM(_63b,_63d,_63e); if(this.containsAjaxWarnings()){ return false; } this.loadStyles(_63b,_63d); if(this.containsAjaxWarnings()){ return false; } this.executeScripts(_63c,_63d); return true; }; CScriptLoader.prototype.setFileState=function(_63f,_640){ this.m_oFiles[_63f]=_640; }; CScriptLoader.prototype.containsAjaxWarnings=function(){ if(this.m_bIgnoreAjaxWarnings){ return false; }else{ return (this.m_ajaxWarnings.length>0); } }; CScriptLoader.prototype.addNamespaceAttribute=function(_641,_642){ if(typeof _642==="string"){ _641.setAttribute("namespaceId",_642); } }; if(typeof window.gScriptLoader=="undefined"){ window.gScriptLoader=new CScriptLoader(); } function ViewerA11YHelper(oCV){ this.m_oCV=oCV; }; ViewerA11YHelper.prototype.onFocus=function(evt){ var _645=getCrossBrowserNode(evt); _645=ViewerA11YHelper.findChildOfTableCell(_645); this.updateCellAccessibility(_645,false); }; ViewerA11YHelper.prototype.onKeyDown=function(evt){ evt=(evt)?evt:((event)?event:null); var _647=getCrossBrowserNode(evt); if(ViewerA11YHelper.isTableCell(_647)){ for(var i=0;i<_647.childNodes.length;i++){ if(_647.childNodes[i].nodeName.toLowerCase()=="span"){ _647=_647.childNodes[i]; break; } } } if(!this.isValidNodeToSelect(_647)){ return true; } _647=ViewerA11YHelper.findChildOfTableCell(_647); if(_647){ if(evt.keyCode=="39"){ if(this.m_oCV.getState()&&this.m_oCV.getState().getFindState()&&evt.ctrlKey&&evt.shiftKey){ this.m_oCV.executeAction("FindNext"); }else{ this.moveRight(_647); } return stopEventBubble(evt); }else{ if(evt.keyCode=="37"){ this.moveLeft(_647); return stopEventBubble(evt); }else{ if(evt.keyCode=="38"){ this.moveUp(_647); return stopEventBubble(evt); }else{ if(evt.keyCode=="40"){ this.moveDown(_647); return stopEventBubble(evt); }else{ if(evt.keyCode=="13"){ if(this.m_oCV.isBux){ if(this.m_oCV.getViewerWidget().isSelectionFilterEnabled()){ this.m_oCV.getViewerWidget().preprocessPageClicked(false,evt); if(this.m_oCV.getSelectionController().pageClicked(evt)!==false){ this.m_oCV.JAWSTalk(RV_RES.IDS_JS_SELECTION_FILTER_INFO_JAWS); this.m_oCV.getViewerWidget().updateToolbar(); } }else{ this.m_oCV.getSelectionController().pageClicked(evt); var _649=this.m_oCV.getActionFactory().load("Selection"); _649.onKeyDown(evt); } this.m_oCV.getViewerWidget().onSelectionChange(); }else{ this.m_oCV.de(evt); } }else{ if(evt.keyCode=="32"){ if(this.m_oCV.isBux){ this.m_oCV.getViewerWidget().preprocessPageClicked(false); if(this.m_oCV.getSelectionController().pageClicked(evt)!==false&&this.m_oCV.getViewerWidget().isSelectionFilterEnabled()){ this.m_oCV.JAWSTalk(RV_RES.IDS_JS_SELECTION_FILTER_INFO_JAWS); } this.m_oCV.getViewerWidget().updateToolbar(); this.m_oCV.getViewerWidget().onSelectionChange(); }else{ this.m_oCV.getSelectionController().pageClicked(evt); } return stopEventBubble(evt); }else{ if(evt.keyCode=="46"&&this.m_oCV.isBux){ if(typeof this.m_oCV.envParams!="undefined"&&typeof this.m_oCV.envParams["ui.action"]!="undefined"&&this.m_oCV.envParams["ui.action"]!="view"&&!this.m_oCV.isLimitedInteractiveMode()){ var _64a=this.m_oCV.getActionFactory().load("Delete"); if(!this.m_oCV.isBlacklisted("Delete")&&_64a.canDelete()){ _64a.execute(); return stopEventBubble(evt); } } }else{ if(this.m_oCV.isBux&&evt.ctrlKey==true&&evt.shiftKey==true&&evt.keyCode=="49"){ var lid=this.m_oCV.getSelectionController().getSelectionObjectFactory().getLayoutElementId(_647); if(lid!=""){ lid=lid.split(this.m_oCV.getId())[0]; var _64c=-1; var _64d=this.m_oCV.getRAPReportInfo(); if(_64d){ var _64e=_64d.getContainer(lid); if(typeof _64e.layoutIndex!="undefined"){ _64c=_64e.layoutIndex; } } var _64f=document.getElementById("infoBarHeaderButton"+_64c+this.m_oCV.getId()); if(_64f!==null){ this.m_oCV.setCurrentNodeFocus(getCrossBrowserNode(evt)); _64f.focus(); } } return stopEventBubble(evt); }else{ if(!this.m_oCV.isBux&&evt.shiftKey==true&&evt.keyCode=="121"){ var ocv=this.m_oCV; var _651=function(){ if(typeof evt.clientX=="undefined"||typeof evt.clientY=="undefined"){ var _652=clientToScreenCoords(evt.target,document.body); evt.clientX=_652.leftCoord; evt.clientY=_652.topCoord; } ocv.dcm(evt,true); }; if(isFF()){ setTimeout(_651,0); }else{ _651.call(); } return stopEventBubble(evt); }else{ if(this.m_oCV.isBux&&(evt.keyCode=="93"||(evt.shiftKey==true&&evt.keyCode=="121"))){ var _653=this.m_oCV.getViewerWidget(); var _654=this.m_oCV.getSelectionController(); _653.preprocessPageClicked(true); _654.pageClicked(evt); _653.updateToolbar(); _653.onContextMenu(evt); } } } } } } } } } } } }; ViewerA11YHelper.prototype.isValidNodeToSelect=function(node){ return this.getValidNodeToSelect(node)?true:false; }; ViewerA11YHelper.prototype.getValidNodeToSelect=function(node){ if(node&&node.style&&node.style.visibility!="hidden"&&node.style.display!="none"){ var _657=node.nodeName.toLowerCase(); if((_657=="span"&&(!node.getAttribute("class")||node.getAttribute("class").indexOf("expandButton")===-1))||(_657=="div"&&node.getAttribute("flashchartcontainer")=="true")||(_657=="div"&&node.getAttribute("chartcontainer")=="true")||(_657=="img"&&(!node.id||node.id.indexOf("sortimg")!==0))){ return node; } if(ViewerA11YHelper.isSemanticNode(node)){ var _658=node.childNodes&&node.childNodes.length?node.childNodes[0]:null; if(_658){ return this.getValidNodeToSelect(_658); } } } return null; }; ViewerA11YHelper.isSemanticNode=function(node){ if(!ViewerA11YHelper.isSemanticNode._semanticNodeNames){ ViewerA11YHelper.isSemanticNode._semanticNodeNames=["strong","em","h1","h2","h3","h4","h5","h6"]; } var _65a=node.nodeName.toLowerCase(); for(var i=0;i1){ var _670=_66d.rowSpan; for(var _671=1;_671<_670;_671++){ _66f=_66f.nextSibling; } } var _672=false; while(_66f){ if(_66f.nextSibling){ _66f=_66f.nextSibling; }else{ if(_66d.nextSibling&&!_672){ _66f=_66f.parentNode.firstChild; _672=true; _66e++; }else{ return false; } } if(this.doMoveUpDown(_66f,_66e)){ return true; } } return false; }; ViewerA11YHelper.prototype.moveUp=function(_673){ var _674=ViewerA11YHelper.getTableCell(_673); _674=this.getPfMainOutputCell(_674); var _675=_674.parentNode; var _676=this.getColumnIndex(_674); _676+=this.getColSpanFromRowSpans(_674); var _677=false; while(_675){ if(_675.previousSibling){ _675=_675.previousSibling; }else{ if(_674.previousSibling&&!_677){ _675=_675.parentNode.lastChild; _677=true; _676--; }else{ return false; } } if(this.doMoveUpDown(_675,_676)){ return true; } } return false; }; ViewerA11YHelper.prototype.getNextNonTextSibling=function(node){ while(node.nextSibling){ node=node.nextSibling; if(node.nodeName.toLowerCase()!="#text"){ return node; } } if(ViewerA11YHelper.isSemanticNode(node.parentNode)){ return this.getNextNonTextSibling(node.parentNode); } return null; }; ViewerA11YHelper.prototype.doMoveUpDown=function(_679,_67a){ if(_679!=null){ var _67b=_679.firstChild; var pos=this.getColSpanFromRowSpans(_67b); while(_67b){ if(pos==_67a){ return this.moveToTDFromTheRight(_67b); }else{ if(pos>_67a){ break; } } var _67d=0; if(_67b.colSpan){ _67d=_67b.colSpan; }else{ _67d++; } pos+=_67d; _67b=_67b.nextSibling; } } }; ViewerA11YHelper.prototype.moveToTDFromTheRight=function(td){ td=this.getPfVisibleCell(td); var _67f=td.childNodes; for(var _680=_67f.length-1;_680>=0;_680--){ var node=this.getValidNodeToSelect(_67f[_680]); if(node){ if(node.childNodes&&node.childNodes[0]&&node.childNodes[0].nodeName.toLowerCase()=="span"){ node=node.childNodes[0]; } if(node.tabIndex!=-1&&node.tabIndex!=0){ node.tabIndex=-1; } this.setFocusToNode(node); return true; } } return false; }; ViewerA11YHelper.prototype.moveToTD=function(td){ td=this.getPfVisibleCell(td); var _683=td.childNodes; for(var _684=0;_684<_683.length;_684++){ var node=this.getValidNodeToSelect(_683[_684]); if(node){ if(node.childNodes&&node.childNodes[0]&&node.childNodes[0].nodeName.toLowerCase()=="span"){ node=node.childNodes[0]; } if(node.tabIndex!=-1&&node.tabIndex!=0){ node.tabIndex=-1; } this.setFocusToNode(node); return true; } } return false; }; ViewerA11YHelper.prototype.setFocusToNode=function(node){ this.m_oCV.setCurrentNodeFocus(node); this.updateCellAccessibility(node,false); node.focus(); if(this.m_oCV.m_pinFreezeManager){ var _687=this.m_oCV.m_pinFreezeManager.nodeToContainer(node); if(_687){ _687.updateScroll(node); } } }; ViewerA11YHelper.prototype.getPfMainOutputCell=function(_688){ var main=null; var slid=_688.getAttribute("pfslid"); if(slid){ var lid=PinFreezeContainer.getLidFromSlid(slid); if(lid&&this.m_oCV.m_pinFreezeManager){ lid=this.m_oCV.m_pinFreezeManager.removeNamespace(lid); var _68c=this.m_oCV.m_pinFreezeManager.getContainer(lid); if(_68c){ main=_68c.getMain(_688); } } } return main?main:_688; }; ViewerA11YHelper.prototype.getPreviousNonTextSibling=function(node){ while(node.previousSibling){ node=node.previousSibling; if(node.nodeName.toLowerCase()!="#text"){ return node; } } if(ViewerA11YHelper.isSemanticNode(node.parentNode)){ return this.getPreviousNonTextSibling(node.parentNode); } return null; }; ViewerA11YHelper.prototype.getColumnIndex=function(node){ var _68f=0; while(node.previousSibling){ node=node.previousSibling; if(node.rowSpan==1){ if(node.colSpan){ _68f+=node.colSpan; }else{ _68f++; } } } return _68f; }; ViewerA11YHelper.prototype.getPfVisibleCell=function(_690){ var copy=null; var slid=_690.getAttribute("pfslid"); if(slid){ var lid=PinFreezeContainer.getLidFromSlid(slid); if(lid&&this.m_oCV.m_pinFreezeManager){ lid=this.m_oCV.m_pinFreezeManager.removeNamespace(lid); var _694=this.m_oCV.m_pinFreezeManager.getContainer(lid); if(_694){ copy=_694.getCopy(_690); } } } return copy?copy:_690; }; ViewerA11YHelper.prototype.updateCellAccessibility=function(_695,_696){ if(!_695){ return false; } var _697=false; var _698=false; var _699=false; var _69a=_695.getAttribute("ctx")!=null?_695:_695.parentNode; if(_695.getAttribute("flashChartContainer")!="true"){ if(_69a.getAttribute("ctx")!=null){ if(this.m_oCV.isBux){ var _69b=this.m_oCV.getAction("DrillUpDown"); _69b.updateDrillability(this.m_oCV,_69a); _697=_69b.canDrillDown(); _698=_69b.canDrillUp(); }else{ var _69c=_69a.getAttribute("ctx"); var _69d=_69c.indexOf(":")==-1?_69c:_69c.substring(0,_69c.indexOf(":")); var _69e=this.m_oCV.getSelectionController(); _697=_69e.canDrillDown(_69d); _698=_69e.canDrillUp(_69d); } } _699=_695.parentNode.getAttribute("dtTargets")?true:false; } var _69f=_695.nodeName.toLowerCase()=="img"; var _6a0=_695.parentNode.getAttribute("type")=="columnTitle"; if(!_69f&&(_696||((_695.getAttribute("aria-labelledby")!=null||_6a0||this.m_oCV.isAccessibleMode())))){ var _6a1=""; if(_695.parentNode.getAttribute("cc")=="true"){ _6a1+=" "+RV_RES.IDS_JS_CROSSTAB_CORNER; } if(_695.innerHTML.length===0){ _695.innerHTML=" "; _6a1+=" "+RV_RES.IDS_JS_EMPTY_CELL; } if(_697&&_698){ _6a1+=" "+RV_RES.IDS_JS_DRILL_DOWN_UP_JAWS; }else{ if(_697){ _6a1+=" "+RV_RES.IDS_JS_DRILL_DOWN_JAWS; }else{ if(_698){ _6a1+=" "+RV_RES.IDS_JS_DRILL_UP_JAWS; } } } if(_699){ _6a1+=" "+RV_RES.IDS_JS_DRILL_THROUGH_JAWS; } if(_695.altText&&_695.altText.length>0){ _6a1=_695.altText; }else{ if(_695.getAttribute("flashChartContainer")=="true"){ _6a1=RV_RES.IDS_JS_CHART_IMAGE; } } if(this.m_oCV.isBux){ var _6a2=_695.previousSibling; if(_6a2){ var wid=_6a2.getAttribute("widgetid"); if(wid&&wid.indexOf("comment")){ _6a1+=" "+RV_RES.IDS_JS_ANNOTATION_JAWS; } } if(_695.getAttribute("rp_name")||_695.parentNode.getAttribute("rp_name")){ _6a1+=" "+RV_RES.IDS_JS_LABEL_HAS_BEEN_RENAMED; } if(_695.nextSibling&&_695.nextSibling.getAttribute("class")=="sortIconVisible"){ _6a1+=" "+_695.nextSibling.getAttribute("alt"); } } if(_6a1.length>0){ this.addAriaLabelledByOnCell(_695,_6a1); } } if(_698||_697||_699){ this.addDrillAccessibilityAttributes(_695,_699); } if(_695.attachEvent){ _695.attachEvent("onblur",this.onBlur); }else{ _695.addEventListener("blur",this.onBlur,false); } if((isIE()&&_695.getAttribute("tabIndex")!=0)||_69f){ _695.setAttribute("modifiedTabIndex","true"); _695.setAttribute("oldTabIndex",_695.getAttribute("tabIndex")); _695.setAttribute("tabIndex",0); } }; ViewerA11YHelper.prototype.addAriaLabelledByOnCell=function(_6a4,_6a5){ var _6a6=0; var _6a7=_6a4; while(_6a7.previousSibling){ _6a6++; _6a7=_6a7.previousSibling; } var _6a8=_6a4.getAttribute("ariaHiddenSpanId"); if(_6a8&&document.getElementById(_6a8)){ document.getElementById(_6a8).innerHTML=_6a5; }else{ if(!_6a4.parentNode.id&&!_6a4.id){ _6a4.parentNode.id=Math.random(); } var _6a9=document.createElement("span"); _6a9.style.visibility="hidden"; _6a9.style.display="none"; _6a9.id=(_6a4.id==""?_6a4.parentNode.id:_6a4.id)+"_"+_6a6; _6a9.innerHTML=_6a5; _6a4.parentNode.appendChild(_6a9); var _6aa=""; if(_6a4.getAttribute("aria-labelledby")!=null){ _6aa+=_6a4.getAttribute("aria-labelledby"); }else{ if(_6a4.id==""){ _6a4.id=_6a4.parentNode.id+"_main_"+_6a6; } _6aa+=_6a4.id; } _6aa+=" "+_6a9.id; _6a4.setAttribute("aria-labelledby",_6aa); _6a4.setAttribute("ariaHiddenSpanId",_6a9.id); } }; ViewerA11YHelper.prototype.addDrillAccessibilityAttributes=function(_6ab,_6ac){ if(!_6ab.getAttribute("oldClassName")){ if(!_6ac){ _6ab.setAttribute("oldClassName",_6ab.className); _6ab.className="dl "+_6ab.className; } if(!_6ab.getAttribute("role")){ _6ab.setAttribute("role","link"); } } }; ViewerA11YHelper.prototype.onBlur=function(evt){ var _6ae=null; if(isIE()){ _6ae=getNodeFromEvent(evt,true); }else{ _6ae=this; } _6ae=ViewerA11YHelper.findChildOfTableCell(_6ae); if(_6ae){ if(_6ae.getAttribute("oldClassName")){ _6ae.className=_6ae.getAttribute("oldClassName"); _6ae.removeAttribute("oldClassName"); } if(_6ae.getAttribute("modifiedTabIndex")=="true"){ _6ae.removeAttribute("modifiedTabIndex"); _6ae.removeAttribute("tabIndex"); if(_6ae.getAttribute("oldTabIndex")){ _6ae.setAttribute("tabIndex",_6ae.getAttribute("oldTabIndex")); } _6ae.removeAttribute("oldTabIndex"); } var _6af=_6ae.getAttribute("ariaHiddenSpanId"); if(_6af){ var _6b0=document.getElementById(_6af); if(_6b0){ _6b0.innerHTML=""; } } } }; ViewerA11YHelper.prototype.getColSpanFromRowSpans=function(_6b1){ var _6b2=0; var _6b3=_6b1.parentNode; var _6b4=0; while(_6b3){ var _6b5=_6b3.firstChild; var _6b6=this.getColumnCount(_6b3)-_6b4; while(_6b5&&_6b5.rowSpan>1&&_6b6>0&&_6b5!=_6b1){ _6b2+=_6b5.colSpan; _6b5=_6b5.nextSibling; _6b6--; } if(_6b3.childNodes.length>_6b4){ _6b4=this.getColumnCount(_6b3); } _6b3=_6b3.previousSibling; } return _6b2; }; ViewerA11YHelper.prototype.getColumnCount=function(_6b7){ var _6b8=0; var node=_6b7.firstChild; while(node){ _6b8+=node.colSpan; node=node.nextSibling; } return _6b8; }; ViewerA11YHelper.prototype.addLabelledByForItemsOutsideOfContainers=function(){ if(!this.m_oCV.isAccessibleMode()){ return; } var _6ba=document.getElementById("RVContent"+this.m_oCV.getId()); if(!_6ba){ return; } var _6bb=getElementsByAttribute(_6ba,"span","tabindex","0"); if(!_6bb){ return; } for(var i=0;i<_6bb.length;i++){ var span=_6bb[i]; this.updateCellAccessibility(span,false); } }; var CV_BACKGROUND_LAYER_ID="CV_BACK"; if(typeof window.gaRV_INSTANCES=="undefined"){ window.gaRV_INSTANCES=[]; } if(!window.gViewerLogger){ window.gViewerLogger={log:function(hint,_6bf,type){ },addContextInfo:function(_6c1){ }}; } function CognosViewerSession(oCV){ this.m_sConversation=oCV.getConversation(); this.m_sParameters=oCV.getExecutionParameters(); this.m_envParams={}; applyJSONProperties(this.m_envParams,oCV.envParams); this.m_bRefreshPage=false; }; function CCognosViewer(sId,_6c4){ if(typeof window.gCognosViewer=="undefined"){ window.gCognosViewer=this; } if(typeof ViewerConfig=="function"){ this.m_viewerConfig=new ViewerConfig(); try{ if(typeof window.getViewerConfiguration=="function"){ this.m_viewerConfig.configure(window.getViewerConfiguration()); }else{ if(window.parent&&typeof window.parent.getViewerConfiguration=="function"){ this.m_viewerConfig.configure(window.parent.getViewerConfiguration()); } } } catch(e){ } this.m_viewerUIConfig=this.m_viewerConfig.getUIConfig(); } this.m_sActionState=""; this.m_bKeepSessionAlive=false; this.m_undoStack=[]; this.m_aSecRequests=[]; this.m_bDebug=false; this.m_sCAFContext=""; this.m_sContextInfoXML=""; this.m_sConversation=""; this.m_sStatus=""; this.m_sGateway=_6c4; this.m_sId=sId; this.m_sMetadataInfoXML=""; this.m_sParameters=""; this.m_sReportState=""; this.envParams={}; this.m_sTracking=""; this.m_sSoapFault=""; this.m_sWaitHTML=""; this.m_oDrillMgr=null; this.goDrillManager=null; this.m_oWorkingDialog=null; this.m_oRequestExecutedIndicator=null; this.m_bUseWorkingDialog=true; this.m_oSubscriptionManager=null; this.m_oCVMgr=null; this.m_bUseSafeMode=true; if(typeof CViewerManager=="function"){ this.m_oCVMgr=new CViewerManager(this); } if(window.gaRV_INSTANCES){ var _6c5=false; for(var _6c6=0;_6c6"; var _6f8=new ViewerDispatcherEntry(this); _6f8.addFormField("ui.action","reportAction"); _6f8.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",_6ee); if(this.m_viewerWidget){ this.m_viewerWidget.placeTabControlInView(); } this.dispatchRequest(_6f8); } }; CCognosViewer.prototype._removeTabContent=function(_6f9,_6fa){ var _6fb=this._findChildWithTabId(_6f9,_6fa); while(_6fb){ _6fb.parentNode.removeChild(_6fb); _6fb=this._findChildWithTabId(_6f9,_6fa); } }; CCognosViewer.prototype._findChildWithTabId=function(_6fc,_6fd){ var _6fe=null; for(var i=0;i<_6fc.childNodes.length;i++){ var _700=_6fc.childNodes[i]; if(_700.getAttribute("tabId")==_6fd){ _6fe=_700; break; } } return _6fe; }; CCognosViewer.prototype.clearTabs=function(){ if(!this.m_bHasTabs){ return; } this.m_tabInfo={}; var _701=this.getReportDiv(); var _702=_701.parentNode; for(var i=0;i<_702.childNodes.length;i++){ var node=_702.childNodes[i]; if(node.getAttribute("id")!="CVReport"+this.m_sId){ _702.removeChild(node); i--; } } }; CCognosViewer.prototype.isSavedOutput=function(){ var _705=this.envParams["ui.action"]; return _705==="view"||_705==="buxView"; }; CCognosViewer.prototype.renderSavedOutputIFrame=function(url,_707,_708){ var _709=document.getElementById("CVReport"+this.getId()); var _70a=document.createElement("iframe"); _70a.style.width="100%"; _70a.style.height="99%"; _70a.id="CVIFrame"+this.getId(); _70a.title=_707; _70a.setAttribute("frameBorder","0"); _709.appendChild(_70a); var obj=this; var func=function(){ obj.renderTabs(); }; setTimeout(function(){ if(_708){ if(_70a.attachEvent){ _70a.attachEvent("onload",func); }else{ _70a.addEventListener("load",func,true); } } _70a.src=url; },1); }; CCognosViewer.prototype.updatePageState=function(_70d){ if(_70d&&this.getState()){ this.getState().setPageState(_70d); } }; CCognosViewer.prototype.getPageInfo=function(){ if(this.m_viewerState&&this.m_viewerState.getPageState()){ var _70e=this.m_viewerState.getPageState(); return {"currentPage":_70e.getCurrentPage(),"pageCount":_70e.getPageCount()}; } return {}; }; CCognosViewer.prototype.isIWidgetMobile=function(){ return this.m_viewerWidget&&this.m_viewerWidget.isMobile(); }; CCognosViewer.prototype.isInteractiveViewer=function(){ return false; }; CCognosViewer.prototype.launchGotoPageForIWidgetMobile=function(form){ if(this.isIWidgetMobile()){ this.m_viewerWidget.launchGotoPageForIWidgetMobile(form); return true; } return false; }; CCognosViewer.prototype.executeDrillThroughForIWidgetMobile=function(form){ if(this.isIWidgetMobile()){ this.m_viewerWidget.executeDrillThroughForIWidgetMobile(form); return true; } return false; }; CCognosViewer.prototype.getState=function(){ return this.m_viewerState; }; CCognosViewer.prototype.getConfig=function(){ return this.m_viewerConfig; }; CCognosViewer.prototype.getUIConfig=function(){ return this.m_viewerUIConfig; }; CCognosViewer.prototype.setCurrentNodeFocus=function(node){ this.m_currentNodeFocus=node; }; CCognosViewer.prototype.getCurrentNodeFocus=function(node){ return this.m_currentNodeFocus; }; CCognosViewer.prototype.setCurrentPromptControlFocus=function(node){ this.m_CurrentPromptControlFocus=node; }; CCognosViewer.prototype.getCurrentPromptControlFocus=function(node){ return this.m_CurrentPromptControlFocus; }; CCognosViewer.prototype.loadExtra=function(){ }; CCognosViewer.prototype.setRetryDispatcherEntry=function(_715){ this.m_retryDispatcherEntry=_715; }; CCognosViewer.prototype.getRetryDispatcherEntry=function(){ return this.m_retryDispatcherEntry; }; CCognosViewer.prototype.resetViewerDispatcher=function(){ if(this.m_viewerDispatcher!==null){ delete this.m_viewerDispatcher; this.m_viewerDispatcher=new ViewerDispatcher(); } }; CCognosViewer.prototype.getViewerDispatcher=function(){ return this.m_viewerDispatcher; }; CCognosViewer.prototype.setFaultDispatcherEntry=function(_716){ this.m_faultDispatcherEntry=_716; }; CCognosViewer.prototype.getFaultDispatcherEntry=function(){ return this.m_faultDispatcherEntry; }; CCognosViewer.prototype.dispatchRequest=function(_717){ this.setFaultDispatcherEntry(null); this.getViewerDispatcher().dispatchRequest(_717); }; CCognosViewer.prototype.getActiveRequest=function(){ return this.getViewerDispatcher().getActiveRequest(); }; CCognosViewer.prototype.getProductLocale=function(){ if(this.sProductLocale){ return this.sProductLocale; } return "en"; }; CCognosViewer.prototype.getDirection=function(){ if(this.sDirection){ return this.sDirection; } return "ltr"; }; CCognosViewer.prototype.isBidiEnabled=function(){ if(this.bIsBidiEnabled){ return true; } return false; }; CCognosViewer.prototype.getBaseTextDirection=function(){ if(this.isBidiEnabled()){ if(this.sBaseTextDirection){ return this.sBaseTextDirection; } } return ""; }; CCognosViewer.prototype.getActionFactory=function(){ if(!this.m_actionFactory){ this.m_actionFactory=new ActionFactory(this); } return this.m_actionFactory; }; CCognosViewer.prototype.getAction=function(_718){ var _718=this.getActionFactory().load(_718); _718.setCognosViewer(this); return _718; }; CCognosViewer.prototype.getCalculationCache=function(){ return this.m_calculationCache; }; CCognosViewer.prototype.updateOutputForA11ySupport=function(){ this.updateBorderCollapse(); if(this.getA11YHelper()){ this.getA11YHelper().addLabelledByForItemsOutsideOfContainers(); } var _719=navigator.userAgent.toLowerCase(); var _71a=_719.indexOf("iphone")!=-1; var _71b=_719.indexOf("ipod")!=-1; var _71c=_719.indexOf("ipad")!=-1; var _71d=_71a||_71b||_71c; var _71e=_719.indexOf("android")!=-1; if(_71d||_71e){ document.body.classList.add("clsViewerMobile"); } }; CCognosViewer.prototype.checkForHighContrast=function(){ if(this.isBux){ this.m_bHighContrast=dojo.hasClass(document.body,"dijit_a11y")?true:false; }else{ var _71f=document.createElement("div"); _71f.id=this.m_sId+"hc"; _71f.style.border="1px solid"; _71f.style.borderColor="red green"; _71f.style.height="10px"; _71f.style.top="-999px"; _71f.style.position="absolute"; document.body.appendChild(_71f); var _720=null; if(isIE()){ _720=_71f.currentStyle; }else{ _720=_71f.ownerDocument.defaultView.getComputedStyle(_71f,null); } if(!_720){ return; } this.m_bHighContrast=_720.borderTopColor==_720.borderRightColor; document.body.removeChild(_71f); } }; CCognosViewer.prototype.isHighContrast=function(){ if(typeof this.m_bHighContrast==="undefined"){ this.checkForHighContrast(); } return this.m_bHighContrast; }; CCognosViewer.prototype.isLimitedInteractiveMode=function(){ return this.envParams&&this.envParams.limitedInteractiveMode&&this.envParams.limitedInteractiveMode==="true"; }; CCognosViewer.prototype.updateBorderCollapse=function(){ if(this.isHighContrast()==true){ var _721=null; if(this.envParams["ui.action"]=="view"&&!this.isBux){ var _722=document.getElementById("CVIFrame"+this.getId()); _721=_722.contentWindow.document; }else{ _721=document.getElementById("CVReport"+this.getId()); } var _723=_721.getElementsByTagName("table"); for(var i=0;i<_723.length;i++){ if(_723[i].style.borderCollapse=="collapse"){ _723[i].style.borderCollapse="separate"; } } } }; CCognosViewer.prototype.isAccessibleMode=function(){ if(this.m_bAccessibleMode==true){ return true; } return false; }; CCognosViewer.prototype.isSinglePageReport=function(){ for(var _725 in this.m_aSecRequests){ if(this.m_aSecRequests[_725]=="nextPage"||this.m_aSecRequests[_725]=="previousPage"){ return false; } } return true; }; CCognosViewer.prototype.hasNextPage=function(){ for(var _726 in this.m_aSecRequests){ if(this.m_aSecRequests[_726]=="nextPage"){ return true; } } return false; }; CCognosViewer.prototype.hasPrevPage=function(){ for(var _727 in this.m_aSecRequests){ if(this.m_aSecRequests[_727]=="previousPage"){ return true; } } return false; }; CCognosViewer.prototype.captureHotkeyPageNavigation=function(evt){ evt=(evt)?evt:((event)?event:null); if(evt){ var node=getNodeFromEvent(evt); var _72a=(node&&node.nodeName)?node.nodeName.toLowerCase():null; if((evt.keyCode==8&&_72a!="input"&&_72a!="textarea")||(evt.altKey==true&&(evt.keyCode==37||evt.keyCode==39))){ evt.returnValue=false; evt.cancelBubble=true; if(typeof evt.stopPropagation!="undefined"){ evt.stopPropagation(); } if(typeof evt.preventDefault!="undefined"){ evt.preventDefault(); } return false; } } return true; }; CCognosViewer.prototype.setUseWorkingDialog=function(_72b){ this.m_bUseWorkingDialog=_72b; }; CCognosViewer.prototype.getWorkingDialog=function(){ if(!this.m_oWorkingDialog&&this.m_bUseWorkingDialog&&typeof WorkingDialog!=="undefined"){ if(this.getConfig()&&this.getConfig().getHttpRequestConfig()&&this.getConfig().getHttpRequestConfig().getWorkingDialog()){ this.m_oWorkingDialog=this.getConfig().getHttpRequestConfig().getWorkingDialog(); }else{ this.m_oWorkingDialog=new WorkingDialog(this); } } return this.m_oWorkingDialog; }; CCognosViewer.prototype.getRequestIndicator=function(){ if(this.m_bUseWorkingDialog&&!this.m_oRequestExecutedIndicator&&typeof RequestExecutedIndicator!=="undefined"){ if(this.getConfig()&&this.getConfig().getHttpRequestConfig()&&this.getConfig().getHttpRequestConfig().getRequestIndicator()){ this.m_oRequestExecutedIndicator=this.getConfig().getHttpRequestConfig().getRequestIndicator(); }else{ this.m_oRequestExecutedIndicator=new RequestExecutedIndicator(this); } } return this.m_oRequestExecutedIndicator; }; CCognosViewer.prototype.disableBrowserHotkeyPageNavigation=function(){ if(document.attachEvent){ document.attachEvent("onkeydown",this.captureHotkeyPageNavigation); }else{ if(document.addEventListener){ document.addEventListener("keydown",this.captureHotkeyPageNavigation,false); } } }; CCognosViewer.prototype.setHasPrompts=function(_72c){ if(!_72c){ this.preProcessControlArray=[]; } this.m_bReportHasPrompts=_72c; }; CCognosViewer.prototype.getHasPrompts=function(){ return this.m_bReportHasPrompts; }; CCognosViewer.prototype.setUsePageRequest=function(_72d){ this.m_viewerDispatcher.setUsePageRequest(_72d); }; CCognosViewer.prototype.getUsePageRequest=function(){ return this.m_viewerDispatcher.getUsePageRequest(); }; CCognosViewer.prototype.setKeepSessionAlive=function(_72e){ this.m_bKeepSessionAlive=_72e; }; CCognosViewer.prototype.getKeepSessionAlive=function(){ return this.m_bKeepSessionAlive; }; CCognosViewer.prototype.getWebContentRoot=function(){ if(typeof this.sWebContentRoot!="undefined"){ return this.sWebContentRoot; }else{ return ".."; } }; CCognosViewer.prototype.getSkin=function(){ if(typeof this.sSkin!="undefined"){ return this.sSkin; }else{ return this.getWebContentRoot()+"/skins/corporate"; } }; CCognosViewer.prototype.getSelectionController=function(){ var _72f; try{ _72f=getCognosViewerSCObjectRef(this.m_sId); } catch(e){ _72f=null; } return _72f; }; CCognosViewer.prototype.addCallback=function(_730,oFct,_732){ if(!this.m_aCallback){ this.m_aCallback=[]; } this.m_aCallback=this.m_aCallback.concat({m_sEvent:_730,m_oCallback:oFct,m_bCaptureEvent:(_732===true)}); }; CCognosViewer.prototype.canDrillDown=function(sId){ var sCtx=this.findCtx(sId).split("::")[0]; if(sCtx){ var _735=this.getSelectionController(); if(_735){ return (_735.canDrillDown(sCtx)); } } return false; }; CCognosViewer.prototype.canDrillUp=function(sId){ var sCtx=this.findCtx(sId).split("::")[0]; if(sCtx){ var _738=this.getSelectionController(); if(_738){ return (_738.canDrillUp(sCtx)); } } return false; }; CCognosViewer.prototype.canSubmitPrompt=function(){ var _739=null; if(this.preProcessControlArray&&this.preProcessControlArray instanceof Array){ var _73a=this.preProcessControlArray.length; for(var k=0;k<_73a;k++){ _739=eval(this.preProcessControlArray[k]); if(_739.isValid()===false){ if(!this.m_reportRenderingDone||!_739.getCascadeOnParameter||!_739.getCascadeOnParameter()){ return false; } } } } return true; }; CCognosViewer.prototype.closeContextMenuAndToolbarMenus=function(){ if(this.rvMainWnd){ this.rvMainWnd.closeContextMenuAndToolbarMenus(); } }; CCognosViewer.prototype.dcm=function(_73c,_73d){ if(this.canDisplayContextMenu()){ if(this.preSelectNode==true){ _73d=false; this.preSelectNode=false; } if(this.rvMainWnd.displayContextMenu(_73c,_73d)!=false){ return stopEventBubble(_73c); } } }; CCognosViewer.prototype.canDisplayContextMenu=function(){ if(!this.getUIConfig()||this.getUIConfig().getShowContextMenu()){ return (!this.isWorkingOrPrompting()&&this.rvMainWnd!=null&&typeof this.bCanUseCognosViewerContextMenu!="undefined"&&this.bCanUseCognosViewerContextMenu); } return false; }; CCognosViewer.prototype.de=function(_73e){ var _73f=this.getDrillMgr(); if(_73f){ _73f.singleClickDrillEvent(_73e,"RV"); } }; CCognosViewer.prototype.debug=function(sMsg){ if(this.m_bDebug){ var _741=""; var _742=this.debug.caller; if(typeof _742=="object"&&_742!==null){ _741=_742.toString().match(/function (\w*)/)[1]; } if(!_741){ _741="?"; } alert(_741+": "+sMsg); } }; CCognosViewer.prototype.callbackExists=function(_743){ var _744=false; if(this.m_aCallback&&this.m_aCallback.length){ for(var _745=0;_7451&&_77d<_780.length){ aIds=_780[_77d].split(":"); } } return aIds; }; CCognosViewer.prototype.getRowContextIds=function(sId){ return this.getContextIds(sId,1); }; CCognosViewer.prototype.getPageContextIds=function(sId){ return this.getContextIds(sId,3); }; CCognosViewer.prototype.getString=function(sKey){ if(RV_RES&&RV_RES[sKey]){ return RV_RES[sKey]; } return sKey; }; CCognosViewer.prototype.getRV=function(){ if(typeof this.m_oCVMgr=="object"){ return this.m_oCVMgr; } return window; }; CCognosViewer.prototype.getSecondaryRequests=function(){ return this.m_aSecRequests; }; CCognosViewer.prototype.getTracking=function(){ return this.m_sTracking; }; CCognosViewer.prototype.findCtx=function(sId){ var sCtx=""; if(typeof sId=="string"){ var aCtx=this.getReportContextHelper().processCtx(sId); var _787=aCtx[0][0]; var _788=this.getSelectionController(); if(_788){ if(_788.isContextId(_787)){ sCtx=sId; } } } if(!sCtx){ var _789=this.findElementWithCtx(sId); if(_789){ sCtx=_789.getAttribute("ctx"); } } return sCtx; }; CCognosViewer.prototype.findElementWithCtx=function(sId){ var _78b=sId; if(typeof sId=="string"){ _78b=this.findElementWithCtx(document.getElementById(sId)); } if(_78b){ if(_78b.getAttribute&&_78b.getAttribute("ctx")){ return _78b; } for(var _78c=0;_78c<_78b.childNodes.length;_78c++){ var _78d=this.findElementWithCtx(_78b.childNodes[_78c]); if(_78d){ return _78d; } } } return null; }; CCognosViewer.prototype.getUseValue=function(sId){ var sVal=null; var sCtx=this.findCtx(sId).split("::")[0]; if(sCtx){ var _791=this.getSelectionController(); if(_791){ sVal=_791.getUseValue(sCtx); } } return sVal; }; CCognosViewer.prototype.init=function(_792){ if(_792&&typeof _792=="object"){ for(var _793 in _792){ this[_793]=_792[_793]; } } }; CCognosViewer.prototype.initViewer=function(_794){ var _795=new RequestHandler(this); var _796=document.getElementById("formBackJax"+this.getId()); if(_796&&typeof _796.state!="undefined"&&_796.state.value.length>0){ _795.loadReportHTML(_796.result.value); var _797=eval("("+_796.state.value+")"); _795.updateViewerState(_797); _795.postComplete(); }else{ if(this.getUsePageRequest()){ var _798=_794?_794.m_sStatus:null; if(isIE()){ if(window.location.hash=="#working"){ window.history.go(-2); return; }else{ if(_798==="working"||_798==="stillWorking"){ window.location.hash="#working"; } } }else{ if(_796&&_796.working){ if(_796.working.value=="true"){ window.history.go(-1); return; }else{ if(_798==="working"||_798==="stillWorking"){ _796.working.value="true"; } } } } } _795.processInitialResponse(_794); } }; CCognosViewer.prototype.saveBackJaxInformation=function(_799){ var _79a=document.getElementById("formBackJax"+this.getId()); if(_79a){ if(typeof _79a.state!="undefined"){ _79a.state.value=_799.getResponseStateText(); } if(typeof _79a.result!="undefined"){ _79a.result.value=_799.getResult(); } } }; CCognosViewer.prototype.pcc=function(evt){ if(evt&&typeof evt.button!="undefined"&&evt.button!="1"){ this.preSelectNode=true; var _79c=this.getSelectionController(); if(_79c){ _79c.pageContextClicked(evt); } } }; CCognosViewer.prototype.isValidAjaxResponse=function(_79d){ return (_79d&&_79d.childNodes&&_79d.childNodes.length>0&&_79d.childNodes[0].nodeName!="parsererror"?true:false); }; CCognosViewer.prototype.resubmitInSafeMode=function(_79e){ if(this.m_bUseSafeMode){ this.resetViewerDispatcher(); this.setUsePageRequest(true); this.envParams["cv.useAjax"]="false"; if(_79e){ _79e.retryRequest(); } } }; CCognosViewer.prototype.showLoadedContent=function(_79f){ if(_79f!==null&&typeof _79f!="undefined"){ _79f.style.display="block"; } this.m_resizeReady=true; this.doneLoading(); var obj=this; setTimeout(function(){ obj.renderTabs(); },1); }; CCognosViewer.prototype.doneLoading=function(){ var _7a1=this.getViewerWidget(); if(_7a1){ if(window.IBM&&window.IBM.perf){ window.IBM.perf.log("viewer_doneLoading",this); } var _7a2=this.getStatus(); if(!this.m_reportRenderingDone&&this.m_resizeReady&&this.m_stateSet){ var _7a3=_7a2=="working"||_7a2=="stillWorking"||_7a2=="fault"; _7a1.fireEvent("com.ibm.bux.widget.render.done",null,{noAutoResize:_7a3}); if(_7a2=="complete"){ if(window.IBM&&window.IBM.perf){ window.IBM.perf.log("viewer_doneLoading",this); } if(typeof _7a1.postLoadContent=="function"){ _7a1.postLoadContent(); } this.m_reportRenderingDone=true; if(!_7a3){ var _7a4=this; setTimeout(function(){ _7a4.m_readyToRespondToResizeEvent=true; },20); } } } if(_7a2!="fault"){ _7a1.clearErrorDlg(); } this.doneLoadingUpdateA11Y(_7a2); }else{ var _7a2=this.getStatus(); if(_7a2=="complete"){ this.m_reportRenderingDone=true; this.JAWSTalk(RV_RES.IDS_JS_READY); }else{ if(_7a2=="working"){ this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING); } } } }; CCognosViewer.prototype.doneLoadingUpdateA11Y=function(_7a5){ if(this.getKeepFocus()!==false&&this.getKeepFocus()!=null){ var _7a6=this.getKeepFocus(); if(_7a5=="complete"){ this.setKeepFocus(false); } var _7a7=null; if(this.getVisibleDialog()!==null){ _7a7=this.getVisibleDialog().getDialogDiv(); }else{ if(_7a6===true){ _7a7=document.getElementById("CVReport"+this.getId()); }else{ if(typeof _7a6=="string"){ _7a7=document.getElementById(_7a6); }else{ if(_7a6!==null){ _7a7=_7a6; if(this.isBux){ dojo.window.scrollIntoView(_7a7); } } } } } if(_7a7){ setFocusToFirstTabItem(_7a7); } if(_7a5=="complete"){ this.JAWSTalk(RV_RES.IDS_JS_READY); }else{ if(_7a5=="working"||_7a5=="stillWorking"){ this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING); } } } }; CCognosViewer.prototype.JAWSTalk=function(_7a8){ if(this.isMobile()||this.isIWidgetMobile()){ return; } var id=this.getId(); var div=document.getElementById("JAWS_Alert_"+id); if(div){ div.parentNode.removeChild(div); } div=document.createElement("div"); div.id="JAWS_Alert_"+id; div.style.position="absolute"; div.style.top="-9000px"; div.style.display="none"; div.setAttribute("role","alert"); div.appendChild(document.createTextNode(_7a8)); var _7ab=document.getElementById("RVContent"+id); if(_7ab){ _7ab.appendChild(div); }else{ if(typeof console!="undefined"&&console&&console.log){ console.log("CCognosViewer: Could not find the Viewer div to append the JAWS alert."); } } }; CCognosViewer.prototype.canInsertExpandIconsForAllCrosstabs=function(){ if(this.isLimitedInteractiveMode()||this.isBlacklisted("ExpandMember")||this.isIWidgetMobile()){ return false; } var _7ac=this.getAdvancedServerProperty("VIEWER_JS_EXPAND_COLLAPSE_CONTROLS_DEFAULT"); if(_7ac===null){ return false; } var _7ad=this.getViewerWidget().getProperties().getShowExpandCollapseIconFlag(); return (_7ac.toLowerCase()==="on"&&_7ad!==false)||(_7ac.toLowerCase()==="off"&&_7ad===true); }; CCognosViewer.prototype.setMaxContentSize=function(){ if("10"!=window.getIEVersion()){ return; } if(document.body.className==="viewer"){ var _7ae=document.body.offsetHeight; var _7af=this.getNonReportHeight(document.getElementById("CVReport"+this.getId())); var _7b0=document.getElementById("mainViewerTable"+this.getId()); _7b0.style.maxHeight=_7ae-_7af-2+"px"; var _7b1=GUtil.generateCallback(this.setMaxContentSize,[true],this); if(!this.attachedOnResize){ this.attachedOnResize=true; if(window.attachEvent){ window.attachEvent("onresize",_7b1); }else{ if(window.addEventListener){ window.addEventListener("resize",_7b1,false); } } } } }; CCognosViewer.prototype.getNonReportHeight=function(node){ var _7b3=0; var _7b4=node.parentNode; if(!_7b4){ return _7b3; } if(_7b4.childNodes.length>1){ for(var i=0;i<_7b4.childNodes.length;i++){ var _7b6=_7b4.childNodes[i]; if(_7b6!=node&&!isNaN(_7b6.clientHeight)&&_7b6.style.display!="none"){ _7b3+=_7b6.clientHeight; } } } if(node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){ _7b3+=this.getNonReportHeight(_7b4); } return _7b3; }; CCognosViewer.prototype.addPageAdornments=function(){ this.m_layoutElements=null; this.m_lidToElement=null; this.initFlashCharts(); this.insertSortIconsForAllLists(); var _7b7=this.getViewerWidget().getProperties(); if(this.canInsertExpandIconsForAllCrosstabs()){ this.insertExpandIconsForAllCrosstabs(); } var _7b8=document.getElementById("CVReport"+this.getId()); if(_7b8){ var oCV=this; setTimeout(function(){ if(oCV.getPinFreezeManager()&&oCV.getPinFreezeManager().hasFrozenContainers()){ oCV.getPinFreezeManager().renderReportWithFrozenContainers(_7b8); } oCV.addInfoBar(); },1); } this.getViewerWidget().reselectSelectionFilterObjects(); this.getViewerWidget().addChromeWhitespaceHandler(this.getId()); }; CCognosViewer.prototype.addFlashChart=function(_7ba){ this.m_flashChartsObjectIds.push(_7ba); }; CCognosViewer.prototype.flashChartError=function(_7bb){ var _7bc=this.getViewerWidget(); var _7bd=_7bc.getProperties(); _7bd.setProperty("flashCharts",false); var _7be=this.getAction("Redraw"); _7be.isUndoable=function(){ return false; }; _7be.execute(); }; CCognosViewer.prototype.initFlashCharts=function(){ var _7bf=this.getViewerWidget(); if(this.m_flashChartsObjectIds.length>0){ var _7c0=document.getElementById("rt"+this.getId()); if(window.addEventListener){ _7c0.addEventListener("mousedown",onFlashChartRightClick,true); }else{ var _7c1={}; var _7c2=function(){ this.releaseCapture(); }; var _7c3=function(){ onFlashChartRightClick(event); this.setCapture(); }; for(var i=0;i0){ _7c0.attachEvent("oncontextmenu",function(){ if(_7c1[window.event.srcElement.id]){ return false; } }); } } if(_7bf){ _7bf.fireEvent("com.ibm.bux.widget.setShowBordersWhenInnactive",null,true); } }else{ if(_7bf){ _7bf.fireEvent("com.ibm.bux.widget.setShowBordersWhenInnactive",null,false); } } }; CCognosViewer.prototype.initializeLayoutElements=function(){ var _7c7=document.getElementById("rt"+this.getId()); var _7c8=getElementsByAttribute(_7c7,"*","lid"); this.m_lidToElement={}; this.m_layoutElements=[]; var _7c9=0; var _7ca=this.getPinFreezeManager(); for(var i=0;i<_7c8.length;i++){ var e=_7c8[i]; if(!_7ca||!_7ca.getContainerElement(e)||_7ca.isElementInMainOutput(e)){ this.m_layoutElements[_7c9]=e; this.m_lidToElement[e.getAttribute("lid")]=e; _7c9++; } } }; CCognosViewer.prototype.getLayoutElement=function(_7cd){ if(!this.m_layoutElements){ this.initializeLayoutElements(); } if(this.m_layoutElements){ return this.m_layoutElements[_7cd]; } return null; }; CCognosViewer.prototype.getLayoutElementFromLid=function(lid){ if(!this.m_lidToElement){ this.initializeLayoutElements(); } return this.m_lidToElement[lid]; }; CCognosViewer.prototype.getInfoBars=function(){ return this.m_aInfoBar?this.m_aInfoBar:null; }; CCognosViewer.prototype.addInfoBar=function(){ if(this.getAdvancedServerProperty("VIEWER_JS_HIDE_INFO_BAR")==="true"){ return; } var _7cf=this.getRAPReportInfo(); if(_7cf){ var _7d0=document.getElementById("rt"+this.getId()); this.initializeLayoutElements(); var _7d1=[]; this.m_aInfoBar=[]; for(var _7d2=0;_7d2-1){ lid=lid.substring(8); } lid=lid.substring(0,lid.indexOf(this.getId())); } var _7d5=_7cf.getContainer(lid); if(_7d5&&typeof _7d5.parentContainer=="undefined"){ var _7d6=this.collectChildContainers(_7d5.container); if(this.getPinFreezeManager()){ oPinFreezeContainerElement=this.getPinFreezeManager().getContainerElement(_7d3); _7d3=(oPinFreezeContainerElement)?oPinFreezeContainerElement:_7d3; } var _7d7=new InfoBar(this,_7d3,_7d5,_7d6,_7d2); _7d7.setTimingDetails(_7cf._getEventTimings()); _7d7.render(); if(_7d7.hasSomethingRendered()){ _7d1.push(_7d7.getId()); } this.m_aInfoBar.push(_7d7); } } var _7d8=this.getViewerWidget(); if(_7d8){ _7d8.refreshInfoBarRenderedState(_7d1); } } }; CCognosViewer.prototype.collectChildContainers=function(_7d9){ var _7da=[]; var _7db=this.getRAPReportInfo(); if(_7db){ var _7dc=_7db.getContainerCount(); for(var cidx=0;cidx<_7dc;++cidx){ var _7de=_7db.getContainerFromPos(cidx); if(typeof _7de.parentContainer!="undefined"&&_7de.parentContainer==_7d9){ _7da.push(_7de); } } } return _7da; }; CCognosViewer.prototype.addReportInfo=function(){ var _7df=this.getViewerWidget(); if(typeof _7df==="undefined"||_7df===null){ return; } if(!_7df.getAttributeValue("originalReport")||this.isIWidgetMobile()){ return; } var _7e0=this.envParams["baseReportModificationTime"]; var _7e1=_7df.getAttributeValue("baseReportModificationTime"); if(typeof _7e0!=="undefined"&&typeof _7e1!=="undefined"&&_7e1&&_7e1!=""&&_7e0!==_7e1){ var cvid=this.getId(); var _7e3=document.getElementById("CVReport"+cvid); var _7e4=_7e3.parentNode; var id="ReportInfo"+cvid; var _7e6=document.createElement("div"); _7e6.setAttribute("id",id+"_container"); _7e6.setAttribute("cvid",cvid); _7e6.className="new-info-indicator BUXNoPrint"; var _7e7=document.createElement("img"); var img=null; if(this.getDirection()==="rtl"){ img="/rv/images/action_show_info_rtl.png"; }else{ img="/rv/images/action_show_info.png"; } _7e7.src=this.getWebContentRoot()+img; _7e7.className="reportInfoIcon"; _7e7.setAttribute("tabIndex","0"); _7e7.setAttribute("alt",""); _7e7.setAttribute("title",""); _7e7.setAttribute("role","presentation"); var _7e9=RV_RES.IDS_JS_REPORT_INFO_TITLE; var _7ea=RV_RES.IDS_JS_REPORT_INFO_TEXT; var _7eb=RV_RES.IDS_JS_REPORT_INFO_LINK_TEXT; _7e6.appendChild(_7e7); _7e4.insertBefore(_7e6,_7e3); this.m_reportInfoTooltip=new bux.reportViewer.ReportInfo({connectId:[id+"_container"],focusElement:_7e7,position:["above","below"],title:_7e9,text:_7ea,linkText:_7eb,linkScript:getCognosViewerObjectRefAsString(cvid)+".reportInfoResetReport();",allowMouseOverToolTip:true}); } }; CCognosViewer.prototype.reportInfoResetReport=function(){ this.executeAction("ResetToOriginal"); }; CCognosViewer.prototype.hideReportInfo=function(){ var _7ec=document.getElementById("ReportInfo"+this.getId()+"_container"); if(typeof _7ec!=="undefined"&&_7ec!==null){ _7ec.style.visibility="hidden"; } }; CCognosViewer.prototype.insertSortIcons=function(){ var _7ed=this.envParams?this.envParams.limitedInteractiveMode:true; if(typeof _7ed==="undefined"||_7ed===true){ return; } if(this.envParams["ui.action"]==="run"||this.envParams["ui.primaryAction"]==="run"){ this.insertSortIconsForAllLists(); } }; CCognosViewer.prototype._getContainers=function(_7ee){ var _7ef=[]; var _7f0="",_7f1=""; if(_7ee==="list"){ _7f0="list"; _7f1="ls"; }else{ if(_7ee==="crosstab"){ _7f0="crosstab"; _7f1="xt"; } } var _7f2=document.getElementById("CVReport"+this.getId()); if(this.getRAPReportInfo()){ var _7f3=this.getRAPReportInfo().getContainerIds(_7f0); for(var i=0;i<_7f3.length;++i){ var _7f5=getElementsByAttribute(_7f2,"table","lid",_7f3[i]+this.getId(),1); if(_7f5&&_7f5.length>0){ _7ef.push(_7f5[0]); } } }else{ _7ef=getElementsByClassName(_7f2,"table",_7f1); } return _7ef; }; CCognosViewer.prototype.insertSortIconsForAllLists=function(){ var _7f6=this._getContainers("list"); for(var i=0;i<_7f6.length;++i){ this.insertSortIconsToList(_7f6[i]); } }; CCognosViewer.prototype.insertSortIconsToList=function(_7f8){ var _7f9=getElementsByAttribute(_7f8,"*","type","columnTitle"); for(var i=0;i<_7f9.length;++i){ var _7fb=_7f9[i]; this.getSelectionController().getSelectionObjectFactory().getSelectionObject(_7fb); if(_7fb.getAttribute("canSort")!="false"&&_7fb.getAttribute("CTNM")===null&&_7fb.getAttribute("CC")===null){ var _7fc=false; for(var _7fd=0;_7fd<_7fb.childNodes.length;_7fd++){ var _7fe=_7fb.childNodes[_7fd]; if(_7fe.nodeName.toLowerCase()=="img"){ if(_7fe.id&&_7fe.id.indexOf("sortimg")===0){ _7fc=true; break; } var sLid=_7fe.getAttribute("lid"); if(sLid&&sLid.indexOf("SortIcon")!==-1){ _7fb.removeChild(_7fe); break; } } } if(!_7fc&&this.canInsertSortIcon(_7fb)){ this.insertSortIconToColumnHeader(_7fb); } } } }; CCognosViewer.prototype.isDrillBlackListed=function(){ if(typeof this.m_bDrillBlacklisted=="undefined"){ this.m_bDrillBlacklisted=this.isBlacklisted("DrillDown")||this.isBlacklisted("DrillUp"); } return this.m_bDrillBlacklisted; }; CCognosViewer.prototype.isBlacklisted=function(item){ return this.UIBlacklist&&this.UIBlacklist.indexOf(" "+item+" ")>0; }; CCognosViewer.prototype.canInsertSortIcon=function(_801){ var _802=_801.getAttribute("rp_sort"); return ((!this.isLimitedInteractiveMode()&&!this.isBlacklisted("Sort"))||(_802!==undefined&&_802!==null&&_802.length>0)); }; CCognosViewer.prototype.insertSortIconToColumnHeader=function(_803){ if(!_803.style.whiteSpace){ _803.style.whiteSpace="nowrap"; } var _804=document.createElement("img"); _804.setAttribute("id","sortimg"+Math.random()); if((!this.isLimitedInteractiveMode()&&!this.isBlacklisted("Sort"))){ _804.onmouseover=function(){ this.setAttribute("oldClassName",this.className); this.className+=" sortIconOver"; }; _804.onmouseout=function(){ this.className=this.getAttribute("oldClassName"); this.removeAttribute("oldClassName"); }; } _804.src=this.getImgSrc(_803); var _805=this.getSortInfo(_803); var _806=this.getSortOrder(_805); _804.setAttribute("alt",this.getSortAltText(_806)); _804.setAttribute("title",this.getSortAltText(_806)); _804.className=this.getSortClass(_805); _804.setAttribute("sortOrder",_806); _803.appendChild(_804); }; CCognosViewer.prototype.canInsertShowExpandCollapseIconForNode=function(_807,_808){ var _809=this.getSelectionController(); var _80a=_809.hasCalculationMetadata(_808,[_808],"crosstab"); return ((_809.canDrillDown(_808)||_807.alwaysCanExpandCollapse)&&!_809.isCalculationOrMeasure(_808,_80a)); }; CCognosViewer.prototype.insertExpandIconsForAllCrosstabs=function(){ var _80b=this._getContainers("crosstab"); var _80c=this; var _80d=this.getRAPReportInfo(); var _80e=this.getReportContextHelper(); for(var i=0;i<_80b.length;i++){ var _810=_80b[i]; var _811=_810.getAttribute("lid"); _811=_811.substring(0,_811.length-this.getId().length); var _812=getElementsByAttribute(_810,["td","th"],"ctnm","true"); for(var j=0;j<_812.length;j++){ var _814=_812[j]; var sCtx=this.findCtx(_814); var _816=_80e.getDataItemName(sCtx); if(_816){ var _817=_80d.getItemInfo(_811,_816); var _818=_80e.processCtx(sCtx); if(this.canInsertShowExpandCollapseIconForNode(_817,_818[0][0])){ var sMun=_80e.getMun(sCtx); var _81a=sMun&&_817.expandedMembers&&_817.expandedMembers[sMun]===true; var _81b=document.createElement("div"); _81b.setAttribute("skipSelection","true"); _81b.className="expandButton "+(_81a?"collapse":"expand"); _814.insertBefore(_81b,_814.firstChild); var _81c=document.createElement("span"); _81c.className="expandButtonCaption"; _81c.innerHTML=(_81a?"[-]":"[+]"); _81b.appendChild(_81c); } } } } }; CCognosViewer.prototype.removeExpandIconsForAllCrosstabs=function(){ var _81d=this._getContainers("crosstab"); for(var i=0;i<_81d.length;i++){ var _81f=_81d[i]; var _820=_81f.getAttribute("lid"); _820=_820.substring(0,_820.length-this.getId().length); var _821=getElementsByAttribute(_81f,"td","ctnm","true"); for(var j=0;j<_821.length;j++){ var _823=_821[j]; if(_823.firstChild.className==="expandButton collapse"||_823.firstChild.className==="expandButton expand"){ _823.removeChild(_823.firstChild); } } } }; CCognosViewer.prototype.fillInContextData=function(){ if(!this.isLimitedInteractiveMode()){ var _824=document.getElementById("CVReport"+this.getId()); var _825=getElementsByClassName(_824,"table","ls"); for(var i=0;i<_825.length;++i){ var _827=getElementsByAttribute(_825[i],"*","type","columnTitle"); for(var j=0;j<_827.length;++j){ this.getSelectionController().getSelectionObjectFactory().getSelectionObject(_827[j]); } } } }; CCognosViewer.prototype.getSortAltText=function(_829){ if(_829==="ascending"){ return RV_RES.IDS_JS_SORT_ASCENDING; }else{ if(_829==="descending"){ return RV_RES.IDS_JS_SORT_DESCENDING; }else{ if(_829==="nosort"){ return RV_RES.IDS_JS_NOT_SORTED; } } } }; CCognosViewer.prototype.getSortInfo=function(_82a){ var _82b=_82a.getAttribute("rp_sort"); if(_82b){ _82b=_82b.split("."); } return _82b; }; CCognosViewer.prototype.getSortClass=function(_82c){ var _82d="sortIconHidden"; if(_82c){ if(_82c[0]==="d"||_82c[0]==="a"){ _82d="sortIconVisible"; } } return _82d; }; CCognosViewer.prototype.getSortOrder=function(_82e){ var _82f="nosort"; if(_82e){ if(_82e[0]==="d"){ _82f="descending"; }else{ if(_82e[0]==="a"){ _82f="ascending"; } } } return _82f; }; CCognosViewer.prototype.getImgSrc=function(_830){ var _831=_830.getAttribute("rp_sort"); var src=this.getWebContentRoot()+"/rv/images/"+this.getSortIconName(_831); return src; }; CCognosViewer.prototype.getSortIconName=function(_833){ var _834="sort_no.gif"; if(_833){ _833=_833.split("."); if(_833[0]==="d"){ _834="sort_descending.gif"; }else{ if(_833[0]==="a"){ _834="sort_ascending.gif"; } } } return _834; }; CCognosViewer.prototype.shouldWriteNavLinks=function(){ if(this.envParams["cv.navlinks"]=="false"){ return false; }else{ if(!this.getUIConfig()||this.getUIConfig().getShowPageNavigation()){ if(this.rvMainWnd||(this.isBux&&!this.isActiveReport())){ return true; } } } return false; }; CCognosViewer.prototype.isActiveReport=function(){ if(this.envParams["cv.responseFormat"]==="activeReport"){ return true; } return false; }; CCognosViewer.prototype.resetRaiseSharePromptEventFlag=function(){ this.m_raiseSharePromptEvent=true; }; CCognosViewer.prototype.resetbHasPromptFlag=function(){ this.m_bHasPrompt=null; }; CCognosViewer.prototype.disableRaiseSharePromptEvent=function(){ this.m_raiseSharePromptEvent=false; }; CCognosViewer.prototype.widgetHasPromptParameters=function(){ var _835=this.getViewerWidget(); return (_835&&_835.promptParametersRetrieved==true&&this.envParams&&typeof this.envParams["reportPrompts"]!="undefined"&&this.envParams["reportPrompts"]!=null&&this.envParams["reportPrompts"].length>0); }; CCognosViewer.prototype.getPromptParametersInfo=function(){ var _836=null; if(this.widgetHasPromptParameters()){ _836=""+sXmlEncode(this.getExecutionParameters())+""+this.envParams["reportPrompts"]+""; } return _836; }; CCognosViewer.prototype.raisePromptEvent=function(_837,_838,_839){ try{ var _83a=this.getViewerWidget(); _83a.getWidgetContextManager().raisePromptEvent(_837,_838,_838.get("ui.action"),this.getModelPath(),_839); } catch(e){ } }; CCognosViewer.prototype.getModelPath=function(){ var _83b=this.getSelectionController().getModelPathForCurrentSelection(); if(_83b){ return _83b; }else{ if(this.envParams.modelPath){ return this.envParams.modelPath; }else{ if(typeof document.forms["formWarpRequest"+this.getId()].modelPath!=="undefined"){ return document.forms["formWarpRequest"+this.getId()].modelPath.value; } } } return ""; }; CCognosViewer.prototype.setKeepFocus=function(_83c){ this._keepFocus=_83c; }; CCognosViewer.prototype.getKeepFocus=function(){ if(typeof this._keepFocus!="undefined"){ return this._keepFocus; } return false; }; CCognosViewer.prototype.onFocus=function(evt){ var _83e=this.getA11YHelper(); if(_83e){ _83e.onFocus(evt); } }; CCognosViewer.prototype.getA11YHelper=function(){ if(!this.a11yHelper){ this.loadExtra(); if(typeof ViewerA11YHelper=="function"){ this.a11yHelper=new ViewerA11YHelper(this); }else{ if(typeof console!=="undefined"&&console.log){ console.log("CCognosViewer: Could not create ViewerA11YHelper object."); } return null; } } return this.a11yHelper; }; CCognosViewer.prototype.onKeyDown=function(evt){ if(this.getA11YHelper()){ this.getA11YHelper().onKeyDown(evt); } }; CCognosViewer.prototype.updateSkipToReportLink=function(){ var _840=this.getStatus(); var _841=document.getElementById("cvSkipToReport"+this.getId()); if(_841){ _841.style.display=_840=="prompting"?"none":""; } }; CCognosViewer.prototype.updateSkipToNavigationLink=function(_842){ var _843=document.getElementById("cvSkipToNavigation"+this.getId()); if(_843){ _843.style.display=_842?"none":""; } }; CCognosViewer.prototype.pageAction=function(_844){ this.setKeepFocus("CVNavLinks"+this.getId()); var _845=new ViewerDispatcherEntry(this); _845.addFormField("ui.action",_844); if(this.getCurrentlySelectedTab()){ _845.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",this.getCurrentlySelectedTab()); } this.dispatchRequest(_845); }; CCognosViewer.prototype.writeNavLink=function(_846,_847,_848,_849){ var _84a=""; if(_848){ _84a=""+"\"\""+""+""; if(_849){ _84a+=""; }else{ _84a=""+"\"\""+""+"LINK_TEXT "; } var sImg=this.sSkin+(!_848&&_846.sImgDisabled?_846.sImgDisabled:_846.sImg); return _84a.replace(/LINK_REQUEST/g,_847).replace(/LINK_TEXT/g,_846.sText).replace(/LINK_IMG/g,sImg); }; CCognosViewer.prototype.loadNavLinks=function(){ var _84c=window.gScriptLoader.loadFile(this.getGateway(),"b_action=xts.run&m=portal/report-viewer-navlinks.xts"); if(_84c){ this.init(eval("("+_84c+")")); } }; CCognosViewer.prototype.writeNavLinks=function(sSR,_84e){ var _84f=document.getElementById("CVNavLinks"+this.getId()); if(_84f){ var _850=document.getElementById("CVNavLinks_Container"+this.getId()); if(typeof this.oNavLinks!="object"||typeof sSR!="string"||!sSR.match(/\bfirstPage\b|\bpreviousPage\b|\bnextPage\b|\blastPage\b|\bplayback\b/i)){ _84f.style.display="none"; if(_850){ _850.style.display="none"; } this.updateSkipToNavigationLink(true); return; } this.updateSkipToNavigationLink(false); if(_850){ _850.style.display=""; } _84f.style.display=(isIE()?"block":"table-cell"); var _851=""; _851+=""; _851+=this.writeNavLink(this.oNavLinks.oFirst,"firstPage",sSR.match(/\bfirstPage\b/gi),_84e); _851+=this.writeNavLink(this.oNavLinks.oPrevious,"previousPage",sSR.match(/\bpreviousPage\b/gi),_84e); _851+=this.writeNavLink(this.oNavLinks.oNext,"nextPage",sSR.match(/\bnextPage\b/gi),_84e); _851+=this.writeNavLink(this.oNavLinks.oLast,"lastPage",sSR.match(/\blastPage\b/gi),_84e); _851+="
"; var _852=document.getElementById("CVNavLinks_label"+this.getId()); var _853=""; if(_852){ _853+=""+_852.innerHTML+""; } _84f.innerHTML=_853+_851; }else{ if(this.shouldWriteNavLinks()){ setTimeout(getCognosViewerObjectRefAsString(this.getId())+".writeNavLinks(\""+sSR+"\",\""+_84e+"\");",100); } } }; function CVBackgroundLayer_ignoreMouseClick(e){ if(e.returnValue){ e.returnValue=false; }else{ if(e.preventDefault){ e.preventDefault(); }else{ return false; } } }; CCognosViewer.prototype.createTransparentBackgroundLayer=function(){ this.removeTransparentBackgroundLayer(); var oBL=document.createElement("div"); oBL.id=CV_BACKGROUND_LAYER_ID; oBL.style.display="none"; oBL.style.position="absolute"; oBL.setAttribute("role","region"); oBL.setAttribute("aria-label",RV_RES.IDS_JS_A11Y_BACKGROUND_TINT); oBL.style.top="0px"; oBL.style.left="0px"; oBL.style.zIndex=98; oBL.style.width="100%"; oBL.style.height="100%"; oBL.style.backgroundColor="rgb(238, 238, 238)"; oBL.style.opacity="0"; oBL.style.filter="alpha(opacity:0)"; oBL.innerHTML="
"; oBL.style.display="inline"; document.body.appendChild(oBL); }; CCognosViewer.prototype.removeTransparentBackgroundLayer=function(){ var oBL=document.getElementById(CV_BACKGROUND_LAYER_ID); if(oBL){ oBL.parentNode.removeChild(oBL); } }; CCognosViewer.prototype.closeActiveHTTPConnection=function(){ var _857=this.getActiveRequest(); if(_857){ _857.abortHttpRequest(); } }; CCognosViewer.prototype.canCancel=function(){ var _858=this.getTracking(); var _859=this.getStatus(); return _858!=""&&_859!="complete"; }; CCognosViewer.prototype.cancel=function(_85a){ if(this.getWorkingDialog()&&this.getWorkingDialog().disableCancelButton){ this.getWorkingDialog().disableCancelButton(_85a); } this.removeTransparentBackgroundLayer(); this.clearPrompts(); if(this.m_viewerFragment&&this.envParams["fragment.fireEventWhenComplete"]){ this.envParams["fragment.fireEventWhenComplete"]=""; } var _85b=null; if(this.m_undoStack.length>0){ _85b=this.m_undoStack.pop(); } var _85c=this.getActiveRequest(); if(this.canCancel()===true||_85c){ if(_85c){ _85c.cancelRequest(true); }else{ var _85d=null; var _85e=_85b!=null&&_85b.m_bRefreshPage; if(typeof this.getCancelDispatcherEntry=="function"){ _85d=this.getCancelDispatcherEntry(); }else{ if(_85e||this.m_viewerFragment){ _85d=new ViewerDispatcherEntry(this); }else{ if(this.getId()=="RS"){ _85d=new ViewerDispatcherEntry(this); _85d.addFormField("cv.responseFormat","rs"); }else{ _85d=new DispatcherEntry(this); _85d.addFormField("cv.responseFormat","successfulRequest"); } } } _85d.forceSynchronous(); _85d.addFormField("ui.action","cancel"); _85d.addFormField("m_tracking",this.getTracking()); this.setTracking(""); if(_85e){ var _85f=""; _85f+=_85b.m_sConversation; _85f+=""; _85d.addFormField("cv.previousSession",_85f); } this.dispatchRequest(_85d); if(!this.isBux&&!this.m_viewerFragment&&(this.getUsePageRequest()||!this.isReportRenderingDone())){ this.executeCallback("cancel"); } } this.setStatus("complete"); var _860=this.envParams["ui.action"]; var _861=this.getUsePageRequest(); var _862=this.m_undoStack.length; if(_85b!=null){ this.m_sConversation=_85b.m_sConversation; this.m_sParameters=_85b.m_sParameters; this.envParams={}; applyJSONProperties(this.envParams,_85b.m_envParams); this.m_undoStack.push(_85b); } this.setTracking(""); if(this.previouslySelectedTab){ this.cancelTabSwitch(); }else{ if(_860!="view"&&_862<=0&&this.rvMainWnd){ this.rvMainWnd.executePreviousReport(-1); } } return true; }else{ if(this.rvMainWnd&&typeof this.envParams!="undefined"&&(this.envParams["ui.primaryAction"]=="authoredDrillThrough"||this.envParams["ui.primaryAction"]=="authoredDrillThrough2")){ this.rvMainWnd.executePreviousReport(-1); return true; }else{ if(!this.isBux){ executeBackURL(this.getId()); } return true; } } return false; }; CCognosViewer.prototype.clearPrompts=function(){ if(this.preProcessControlArray){ var _863=this.preProcessControlArray.length; var k=0; for(k=0;k<_863;k++){ var _865=eval(this.preProcessControlArray[k]); if(_865){ if(_865.clearSubmit){ _865.clearSubmit(); } } } } }; CCognosViewer.prototype.wait=function(){ if(this.isWorking()){ this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING); var _866=new ViewerDispatcherEntry(this); _866.addFormField("ui.action","wait"); _866.addFormField("ui.primaryAction",this.envParams["ui.primaryAction"]); _866.addFormField("cv.actionState",this.envParams["cv.actionState"]); _866.addNonEmptyStringFormField("bux",this.envParams["bux"]); _866.addNonEmptyStringFormField("ui.preserveRapTags",this.envParams["ui.preserveRapTags"]); this.dispatchRequest(_866); return true; } return false; }; CCognosViewer.prototype.setCAFContext=function(_867){ this.m_sCAFContext=_867; }; CCognosViewer.prototype.setContextInfo=function(sXML){ this.m_sContextInfoXML=sXML; }; CCognosViewer.prototype.setConversation=function(_869){ this.m_sConversation=_869; }; CCognosViewer.prototype.setActionState=function(_86a){ this.m_sActionState=_86a; }; CCognosViewer.prototype.setStatus=function(_86b){ this.m_sStatus=_86b; }; CCognosViewer.prototype.setDebug=function(_86c){ this.m_bDebug=_86c; }; CCognosViewer.prototype.setExecutionParameters=function(_86d){ this.m_sParameters=_86d; }; CCognosViewer.prototype.setMetadataInfo=function(sXML){ this.m_sMetadataInfoXML=sXML; }; CCognosViewer.prototype.setSecondaryRequests=function(_86f){ if(_86f){ this.m_aSecRequests=_86f; }else{ this.m_aSecRequests=[]; } }; CCognosViewer.prototype.setTracking=function(_870){ this.m_sTracking=_870; }; CCognosViewer.prototype.setSoapFault=function(_871){ this.m_sSoapFault=_871; }; CCognosViewer.prototype.showOutputInNewWindow=function(sURL){ var _873=document.getElementById("formWarpRequest"+this.getId()); var _874=_873.elements["ui.postBack"]; var _875=_873.elements["ui.backURL"]; if(this.isAccessibleMode()&&this.envParams["run.outputFormat"]=="PDF"&&window.detachLeavingRV){ window.detachLeavingRV(); } if(window.opener||_874||(_875&&_875.value!=="javascript:window.close();")){ window.open(sURL,"",""); this.updateNewBrowserWindow(); }else{ window.location=sURL; } }; CCognosViewer.prototype.hideToolbar=function(_876){ this.m_bHideToolbar=_876; }; CCognosViewer.prototype.showExcel=function(sURL){ var _878=true; var _879=document.getElementById("formWarpRequest"+this.getId()); var _87a=_879.elements["ui.backURL"]; if(_87a&&_87a.value.indexOf("javascript:window.close()")!==0&&_87a.value.indexOf("close.html")===-1){ _878=false; } if(window.detachLeavingRV){ window.detachLeavingRV(); } var _87b=window; if(window.opener&&(isIE()||isFF())&&_878){ _87b=window.opener?window.opener:window; }else{ if(!window.opener&&_878){ window.location=sURL; return; } } var _87c=null; var _87d=""; try{ if(this.envParams["cv.excelWindowOpenProperties"]){ _87d=this.envParams["cv.excelWindowOpenProperties"]; } _87c=_87b.open(sURL,"",_87d); } catch(e){ _87b=window; _87c=_87b.open(sURL,"",_87d); } if(!_87c||_87c.closed||typeof _87c.closed=="undefined"){ alert(RV_RES.RV_BROWSER_POPUP_IS_ENABLED); } this.updateNewBrowserWindow(); }; CCognosViewer.prototype.updateNewBrowserWindow=function(){ var id=this.getId(); var _87f=document.forms["formWarpRequest"+id].elements["ui.postBack"]; var _880=document.forms["formWarpRequest"+id].elements["ui.backURL"]; if(_87f&&_87f.value){ setTimeout(getCognosViewerObjectRefAsString(id)+".getRV().doPostBack();",100); }else{ if(_880&&_880.value){ if(_880.value.length<2048){ setTimeout("location.replace(\""+_880.value+"\");",100); }else{ _880=decodeURIComponent(_880.value); var _881=_880.split("?"); var _882=document.createElement("form"); _882.style.display="none"; _882.setAttribute("target","_self"); _882.setAttribute("method","post"); _882.setAttribute("action",_881[0]); var _883=_881[1].split("&"); for(var _884=0;_884<_883.length;_884++){ var _885=_883[_884].indexOf("="); var _886=_883[_884].substr(0,_885); var _887=_883[_884].substr(_885+1); var _888=document.createElement("img"); _888.setAttribute("type","hidden"); _888.setAttribute("name",decodeURIComponent(_886)); _888.setAttribute("value",decodeURIComponent(_887)); _882.appendChild(_888); } document.body.appendChild(_882); _882.submit(); } }else{ window.close(); } } }; CCognosViewer.prototype.showWaitPage=function(){ }; CCognosViewer.prototype.sendRequest=function(_889){ var _88a=new ViewerDispatcherEntry(this); _88a.addFormField("ui.action",_889.getAction()); if(_889.getCallback()!=null){ _88a.setCallbacks({"complete":{"object":null,"method":_889.getCallback()}}); } var _88b=_889.getFormFields().keys(); for(var _88c=0;_88c<_88b.length;_88c++){ _88a.addFormField(_88b[_88c],_889.getFormFields().get(_88b[_88c])); } var _88d=_889.m_oOptions.keys(); for(var _88e=0;_88e<_88d.length;_88e++){ _88a.addFormField(_88d[_88e],_889.getOption(_88d[_88e])); } var _88f=_889.m_oParams.keys(); for(var _890=0;_890<_88f.length;_890++){ _88a.addFormField(_88f[_890],_889.getParameter(_88f[_890])); } this.dispatchRequest(_88a); }; CCognosViewer.prototype.promptAction=function(_891,sUrl){ this.setKeepFocus(true); if(typeof datePickerObserverNotify=="function"){ datePickerObserverNotify(); } var _893=this.getViewerWidget(); if(_891=="cancel"){ this.cancelPrompt(sUrl); if(_893){ if(!this.isReportRenderingDone()){ var _894={action:"deleteWidget"}; _893.fireEvent("com.ibm.bux.widget.action",null,_894); } } }else{ var oReq=new ViewerDispatcherEntry(this); oReq.addFormField("ui.action",_891=="back"?"back":"forward"); if(_891=="finish"){ oReq.addFormField("run.prompt",false); }else{ if(_891=="back"||_891=="next"){ oReq.addFormField("run.prompt",true); } } if(_891=="reprompt"){ if(typeof repromptObserverNotify=="function"){ repromptObserverNotify(this); } oReq.addFormField("_promptControl",_891); }else{ oReq.addFormField("_promptControl","prompt"); } if(_893){ _893.fireEvent("com.ibm.bux.widget.modified",null,{"modified":true}); if(_893.isSelectionFilterEnabled){ _893.clearSelectionFilter(); } } this.submitPromptValues(oReq); } }; CCognosViewer.prototype.cancelPrompt=function(sUrl){ this.cancel(); }; CCognosViewer.prototype.notify=function(_897,_898){ var _899=0,k=0; var _89b=null; if(this.rangeObserverArray&&this.rangeObserverArray instanceof Array){ _899=this.rangeObserverArray.length; for(k=0;k<_899;k++){ _89b=eval(this.rangeObserverArray[k]); if(_89b&&typeof _89b=="object"&&typeof _89b.update=="function"){ _89b.update(); } } } var _89c=true; if(this.preProcessControlArray&&this.preProcessControlArray instanceof Array){ _899=this.preProcessControlArray.length; for(k=0;k<_899;k++){ _89b=eval(this.preProcessControlArray[k]); if((typeof _89b.getValid=="function")&&!_89b.getValid()){ _89c=false; break; } } } this.notifyPageNavEnabled(_89c); if(this.multipleObserverArray&&this.multipleObserverArray instanceof Array){ _899=this.multipleObserverArray.length; for(k=0;k<_899;k++){ _89b=eval(this.multipleObserverArray[k]); if(_89b&&typeof _89b=="object"&&typeof _89b.checkInsertRemove=="function"){ _89b.checkInsertRemove(); } } } for(var _89d=0;_89d0){ portletSharePrompt(_8c6); } } this.dispatchRequest(oReq); }; CCognosViewer.prototype.portletPromptParams=function(oReq){ var _8c8=[]; var _8c9=null; var _8ca=true; var _8cb=oReq.getFormFields().keys(); for(var _8cc=0;_8cc<_8cb.length;_8cc++){ _8c9=_8cb[_8cc]; if(_8c9=="_promptControl"&&oReq.getFormField(_8c9)=="search"){ _8ca=false; break; }else{ if(_8c9.indexOf("p_")===0){ if(_8c9.indexOf("p_credential")===0){ _8ca=false; break; }else{ _8c8.push([_8c9,oReq.getFormField(_8c9)]); } } } } if(_8c8&&!_8ca){ _8c8=[]; } return _8c8; }; CCognosViewer.prototype.preparePromptValues=function(oReq){ var _8ce=[]; if(this.preProcessControlArray){ var _8cf=this.preProcessControlArray.length; var k=0; for(k=0;k<_8cf;k++){ var _8d1=eval(this.preProcessControlArray[k]); var _8d2=(typeof _8d1.isEnabled=="function"?_8d1.isEnabled():true); if(_8d1&&typeof _8d1.preProcess=="function"&&_8d2){ _8d1.preProcess(); if(_8d1.m_oSubmit){ if(oReq.addParameter){ oReq.addParameter(_8d1.m_oSubmit.name,_8d1.m_oSubmit.value); }else{ oReq.addFormField(_8d1.m_oSubmit.name,_8d1.m_oSubmit.value); } _8ce.push(_8d1.m_oSubmit); if(_8d1.m_sPromptId&&_8d1.m_oForm&&_8d1.m_oForm.elements&&typeof _8d1.m_oForm.elements["p_"+_8d1.m_sRef]=="object"){ if(oReq.addParameter){ oReq.addParameter("p_"+_8d1.m_sPromptId,_8d1.m_oForm.elements["p_"+_8d1.m_sRef].value); }else{ oReq.addFormField("p_"+_8d1.m_sPromptId,_8d1.m_oForm.elements["p_"+_8d1.m_sRef].value); } } } } } } var _8d3=document.getElementById("formWarpRequest"+this.getId()); if(_8d3){ var _8d4=_8d3.elements; for(var _8d5=0;_8d5<_8d4.length;_8d5++){ var _8d6=_8d4[_8d5]; if(!_8d6.name||!_8d6.name.match(/^p_/)){ continue; } var _8d7=true; for(var _8d8=0;_8d8<_8ce.length;_8d8++){ if(_8ce[_8d8]==_8d6){ _8d7=false; break; } } if(_8d7){ oReq.addFormField(_8d6.name,_8d6.value); _8ce.push(_8d6); } } } var oRM=this["CognosReport"]; if(oRM){ var _8da=oRM.prompt.getParameters(); for(var i=0;i<_8da.length;i++){ var _8dc="p_"+_8da[i].getName(); if(!oReq.getFormField(_8dc)){ oReq.addFormField(_8dc,_8da[i].getXML()); } } } return oReq; }; CCognosViewer.prototype.setViewerWidget=function(_8dd){ this.m_viewerWidget=_8dd; }; CCognosViewer.prototype.getViewerWidget=function(){ return this.m_viewerWidget; }; CCognosViewer.prototype.getFlashChartOption=function(){ var _8de=this.getViewerWidget(); var _8df=null; if(_8de){ var _8e0=_8de.getProperties(); if(_8e0){ _8df=_8e0.getFlashCharts(); } } return _8df; }; CCognosViewer.prototype.fireWidgetEvent=function(evt,_8e2){ var _8e3=this.getViewerWidget(); if(_8e3!=null){ _8e3.fireEvent(evt,null,_8e2); } }; CCognosViewer.prototype.isMobile=function(){ return false; }; CCognosViewer.prototype.setVisibleDialog=function(_8e4){ this.m_visibleDialog=_8e4; }; CCognosViewer.prototype.getVisibleDialog=function(){ if(typeof this.m_visibleDialog!="undefined"){ return this.m_visibleDialog; } return null; }; CCognosViewer.prototype.getContentLocale=function(){ var _8e5=document.getElementById("formWarpRequest"+this.getId()); if(_8e5&&_8e5["ui.contentLocale"]&&_8e5["reRunObj"]&&_8e5["reRunObj"].value.length>0){ return _8e5["ui.contentLocale"].value; } return null; }; CCognosViewer.prototype.updateLayout=function(_8e6){ var cvid=this.getId(); var _8e8=document.getElementById("CVHeader"+cvid); var _8e9=document.getElementById("CVToolbar"+cvid); if(!_8e8&&!_8e9){ setTimeout(getCognosViewerObjectRefAsString(cvid)+".updateLayout(\""+_8e6+"\");",100); return; } if(_8e8){ var _8ea=this.getUIConfig()&&!this.getUIConfig().getShowBanner(); if((_8e6=="prompting"&&!this.bShowHeaderWithPrompts)||_8ea){ _8e8.parentNode.style.display="none"; }else{ _8e8.parentNode.style.display=""; } } if(_8e9){ if(_8e6=="prompting"||this.m_bHideToolbar==true){ _8e9.parentNode.style.display="none"; }else{ _8e9.parentNode.style.display=""; } } }; CCognosViewer.prototype.updateResponseSpecification=function(_8eb){ this.sResponseSpecification=_8eb; }; CCognosViewer.prototype.getResponseSpecification=function(){ return this.sResponseSpecification; }; CCognosViewer.prototype.release=function(_8ec){ if(this.getStatus()!="fault"){ this._release(_8ec); } }; CCognosViewer.prototype._release=function(_8ed){ var form=document.getElementById("formWarpRequest"+this.getId()); var _8ef=this.getTracking(); if(!_8ef&&form&&form["m_tracking"]&&form["m_tracking"].value){ _8ef=form["m_tracking"].value; form["m_tracking"].value=""; } this.setTracking(""); if(_8ef){ var _8f0=new DispatcherEntry(this); if(this.isWorkingOrPrompting()){ _8f0.addFormField("ui.action","cancel"); }else{ _8f0.addFormField("ui.action","release"); } _8f0.addFormField("cv.responseFormat","successfulRequest"); _8f0.addNonEmptyStringFormField("ui.primaryAction",this.envParams["ui.primaryAction"]); _8f0.addNonEmptyStringFormField("ui.objectClass",this.envParams["ui.objectClass"]); _8f0.addFormField("m_tracking",_8ef); if(_8ed!=true){ _8f0.forceSynchronous(); } var _8f1=this.getActiveRequest()?this.getActiveRequest():this.getFaultDispatcherEntry(); if(_8f1&&_8f1.getFormField("cv.outputKey")){ _8f0.addFormField("b_action","cvx.high"); _8f0.addFormField("cv.outputKey",_8f1.getFormField("cv.outputKey")); _8f0.addFormField("cv.waitForResponse","false"); _8f0.setHeaders(_8f1.getHeaders()); } var _8f2=_8f0.getRequest().getFormFields(); var _8f3=_8f2.keys(); var data=new URLSearchParams(); for(var _8f5=0;_8f5<_8f3.length;_8f5++){ data.append(_8f3[_8f5],_8f2.get(_8f3[_8f5])); } if(!navigator.sendBeacon(this.getGateway(),data)){ if(typeof console!=="undefined"&&console.log){ console.log("CCognosViewer: release sendBeacon failed."); } } return true; } return false; }; CCognosViewer.prototype.cleanupStyles=function(){ if(this.getViewerWidget()){ this.getViewerWidget().cleanupStyles(); } }; CCognosViewer.prototype.destroy=function(_8f6){ this.release(_8f6); if(!this.m_destroyed){ if(typeof window.gaRV_INSTANCES!="undefined"){ for(var _8f7=0;_8f7=this.m_drillTargets.length){ return null; } return this.m_drillTargets[idx]; }; CCognosViewer.prototype.getNumberOfDrillTargets=function(){ return this.m_drillTargets.length; }; CCognosViewer.prototype.isReportRenderingDone=function(){ return this.m_reportRenderingDone; }; CCognosViewer.prototype.setReportRenderingDone=function(flag){ this.m_reportRenderingDone=flag; }; CCognosViewer.prototype.hasAVSChart=function(){ var _91c=this.getRAPReportInfo(); if(_91c){ var _91d=_91c.getDisplayTypes(); return _91d.match("_v2")!=null||_91d.match("v2_")!=null; } return false; }; CCognosViewer.prototype.getPinFreezeManager=function(){ return this.m_pinFreezeManager; }; CCognosViewer.prototype.getReportContextHelper=function(){ if(!this.m_reportContextHelper){ this.m_reportContextHelper=new ReportContextHelper(this.getSelectionController().getCCDManager()); } return this.m_reportContextHelper; }; CCognosViewer.prototype.getRAPReportInfo=function(){ return this.m_RAPReportInfo; }; CCognosViewer.prototype.setRAPReportInfo=function(_91e){ this.m_RAPReportInfo=_91e; }; CCognosViewer.prototype.isNodeVisible=function(node){ if(this.m_pinFreezeManager){ return this.m_pinFreezeManager.isNodeVisible(node); } return true; }; CCognosViewer.prototype.getWarpRequestForm=function(){ return document.getElementById("formWarpRequest"+this.getId()); }; CCognosViewer.prototype.getBrowser=function(){ return this.sBrowser; }; CCognosViewer.prototype.repaintDiv=function(oDiv){ var _921=oDiv.style.display; oDiv.style.display="none"; oDiv.style.display=_921; }; CCognosViewer.prototype.isMetadataEmpty=function(){ var oSC=this.getSelectionController(); if(oSC){ var _923=oSC.getCCDManager(); if(_923){ return _923.isMetadataEmpty(); } } return true; }; CCognosViewer.prototype.setContextMenu=function(_924){ this.m_contextMenu=_924; }; CCognosViewer.prototype.getContextMenu=function(){ return this.m_contextMenu; }; CCognosViewer.prototype.setToolbar=function(_925){ this.m_toolbar=_925; }; CCognosViewer.prototype.getToolbar=function(){ return this.m_toolbar; }; CCognosViewer.prototype.getAdvancedServerProperty=function(_926){ if(this.m_advancedProperties&&this.m_advancedProperties[_926]!==undefined&&this.m_advancedProperties[_926]!==null){ return this.m_advancedProperties[_926]; }else{ return null; } }; CCognosViewer.prototype.hasPrompt=function(){ if(typeof this.m_bHasPrompt==="undefined"||this.m_bHasPrompt===null){ var _927=false; if(this.getAdvancedServerProperty("VIEWER_JS_PROMPT_AGAIN_SHOW_ALWAYS")==="true"||(this.envParams.reportPrompts&&this.envParams.reportPrompts.length>0)){ _927=true; }else{ var _928=new CParameterValues(); var _929=XMLBuilderLoadXMLFromString(this.getExecutionParameters()); if(_929.childNodes.length==1){ _928.loadWithOptions(_929.childNodes[0],true); var _92a=_928.length(); for(var _92b=0;_92b<_92a;++_92b){ var _92c=_928.getAt(_92b); if(_92c!==null&&_92c.length()>0&&_92c.name().indexOf("credential:")!=-1){ _927=true; break; } } } } this.m_bHasPrompt=_927; } return this.m_bHasPrompt; }; CCognosViewer.prototype.getDrillState=function(){ return this.m_sStateData?this.m_sStateData:""; }; CCognosViewer.prototype.isSelectionFilterEnabled=function(){ if(typeof this.m_bSelectionFilterSwitch=="undefined"){ this.m_bSelectionFilterSwitch=false; } return this.m_bSelectionFilterSwitch; }; CCognosViewer.prototype.broadcastContextChange=function(evt,_92e){ if(this.getViewerWidget()){ this.getViewerWidget().broadcastContextChange(_92e); } stopEventBubble(evt); }; CCognosViewer.prototype.broadcastParameterChange=function(evt,_930){ if(this.getViewerWidget()){ this.getViewerWidget().broadcastParameterChange(_930); } stopEventBubble(evt); }; CCognosViewer.prototype.getReportDiv=function(){ if(!this.m_nReportDiv){ this.m_nReportDiv=document.getElementById("CVReport"+this.m_sId); } return this.m_nReportDiv; }; function CDocumentWriter(sId,_932){ this.m_sId=sId; this.m_sText=""; this.m_sScript=_932; }; CDocumentWriter.prototype.isValid=function(){ if(typeof this.m_sScript!="undefined"&&this.m_sScript&&window.gScriptLoader){ return true; } return false; }; CDocumentWriter.prototype.execute=function(){ if(this.isValid()&&window.gScriptLoader){ var _933=/document\.write(ln)?\s*\(/gi; var _934=this.m_sScript.replace(_933,"this.write(").replace(window.gScriptLoader.m_reScriptTagOpen,"").replace(window.gScriptLoader.m_reScriptTagClose,""); try{ eval(_934); var _935=document.getElementById(this.m_sId); if(_935){ _935.innerHTML=this.m_sText; return true; } } catch(e){ } } return false; }; CDocumentWriter.prototype.write=function(_936){ var _937=""; if(typeof _936=="function"){ _937=eval(_936); }else{ if(typeof _936=="string"){ _937=_936; } } this.m_sText+=_937; }; function setFocusToFirstTabItem(_938){ if(!window.dojo){ return; } var _939=dojo.query("*",_938); var _93a=_939.length; for(var i=0;i<_93a;i++){ var node=_939[i]; if(!node.style||(node.style.display!="none"&&node.style.visibility!="hidden")){ if(node.getAttribute("tabIndex")==0){ try{ node.focus(); } catch(e){ } break; } } } }; function ReportContextHelper(_93d){ this.m_oCDManager=_93d; }; ReportContextHelper.prototype.destroy=function(){ if(this.m_oCDManager&&this.m_oCDManager.destroy){ this.m_oCDManager.destroy(); } delete this.m_oCDManager; }; ReportContextHelper.prototype.processCtx=function(sCtx){ var _93f=sCtx.split("::"); var _940=[]; for(var i=0;i<_93f.length;++i){ _940[i]=_93f[i].split(":"); } if(_940&&_940.length&&_940[0].length){ return _940; }else{ return null; } }; ReportContextHelper.prototype.getDataItemName=function(sCtx){ var _943=this.processCtx(sCtx); if(_943){ return this.getRefDataItem(_943[0][0]); } return null; }; ReportContextHelper.prototype.getRefDataItem=function(_944){ var _945=this.m_oCDManager.GetRDIValue(_944); return (_945==null)?"":_945; }; ReportContextHelper.prototype.getMun=function(_946){ var aCtx=null; if(typeof _946==="string"){ aCtx=this.processCtx(_946); }else{ if(typeof _946==="number"){ aCtx=this.processCtx(_946.toString()); }else{ aCtx=_946; } } if(aCtx){ var sMun=this.m_oCDManager.GetMUN(aCtx[0][0]); return (sMun==null)?"":sMun; } return ""; }; function CCDManager(cv){ this.m_cd=null; this.m_md=null; this.m_oCV=null; this.m_dataItemInfo=null; }; CCDManager.prototype.SetContextData=function(CD){ if(this.m_cd){ this.m_cd=null; } this.m_cd=CD; }; CCDManager.prototype.SetMetadata=function(MD){ if(this.m_md){ this.m_md=null; } this.m_md=MD; }; CCDManager.prototype.AddContextData=function(CD){ if(!this.m_cd){ this.m_cd=CD; }else{ for(var i in CD){ this.m_cd[i]=CD[i]; } } }; CCDManager.prototype.AddMetadata=function(MD){ if(!this.m_md){ this.m_md=MD; }else{ for(var j in MD){ this.m_md[j]=MD[j]; } } }; CCDManager.prototype.getClonedMetadataArray=function(){ var _950={}; applyJSONProperties(_950,this.m_md); return _950; }; CCDManager.prototype.getClonedContextdataArray=function(){ var _951={}; applyJSONProperties(_951,this.m_cd); return _951; }; CCDManager.prototype.SetCognosViewer=function(_952){ if(_952){ this.m_oCV=_952; } }; CCDManager.prototype.onComplete_GetCDRequest=function(_953,_954){ if(_953){ var _955=_953.getResult(); var _956=XMLBuilderLoadXMLFromString(_955); if(_956){ var _957=_956.getElementsByTagName("Block"); for(var i=0;i<_957.length;i++){ var _959=""; var _95a=_957[i].firstChild; while(_95a){ _959+=_95a.nodeValue; _95a=_95a.nextSibling; } var cd=eval("("+_959+")"); this.AddContextData(cd); } } } if(_954&&typeof _954=="function"){ _954(); } }; CCDManager.prototype.FetchContextData=function(_95c,_95d){ var _95e=[]; var c=null,_960=_95c.length; for(var i=0;i<_960;++i){ c=_95c[i]; if(c!=""&&!this.ContextIdExists(c)){ _95e.push(c); } } if(_95e.length){ if(this.m_oCV){ this.getContextData(_95e,_95d); } } return _95e.length; }; CCDManager.prototype.getContextData=function(_962,_963){ var oCV=this.m_oCV; var _965=new AsynchDataDispatcherEntry(oCV); _965.setCanBeQueued(false); if(!oCV.isBux){ _965.forceSynchronous(); } var form=document["formWarpRequest"+oCV.getId()]; var _967=oCV.getConversation(); var _968=oCV.getTracking(); if(!_968&&form&&form["m_tracking"]&&form["m_tracking"].value){ _968=form["m_tracking"].value; } if(oCV.m_viewerFragment){ var _969=oCV.getActiveRequest(); if(_969&&_969.getFormField("m_tracking")==_968){ return; } } var _96a={customArguments:[_963],"complete":{"object":this,"method":this.onComplete_GetCDRequest}}; if(oCV.getStatus()=="prompting"){ _96a["prompting"]={"object":this,"method":this.onComplete_GetCDRequest}; } _965.setCallbacks(_96a); if(_967&&oCV.envParams["ui.action"]!="view"){ _965.addFormField("ui.action","getContext"); _965.addFormField("ui.conversation",_967); }else{ var _96b=form["ui.object"]; if(typeof _96b.length!="undefined"&&_96b.length>1){ _965.addFormField("ui.object",form["ui.object"][0].value); }else{ _965.addFormField("ui.object",form["ui.object"].value); } _965.addFormField("ui.action","getObjectContext"); } _965.addFormField("cv.responseFormat","asynchDetailContext"); _965.addFormField("context.format","initializer"); _965.addFormField("context.type","reportService"); _965.addFormField("context.selection",_962.join(",")); _965.addNonEmptyStringFormField("m_tracking",_968); oCV.dispatchRequest(_965); }; CCDManager.prototype.ContextIdExists=function(_96c){ return (this.m_cd&&this.m_cd[_96c]?true:false); }; CCDManager.prototype.HasContextData=function(){ return (this.m_cd?true:false); }; CCDManager.prototype.HasMetadata=function(){ return (this.m_md?true:false); }; CCDManager.prototype._getMDPropertyFromCD=function(_96d,_96e,_96f){ var p=null; this.FetchContextData([_96d]); var cd=this.m_cd&&this.m_cd[_96d]; if(cd){ var md=this.m_md[cd[_96e]]; if(md){ p=md[_96f]; } } return p; }; CCDManager.prototype.GetDrillFlag=function(_973){ return this._getMDPropertyFromCD(_973,"r","drill"); }; CCDManager.prototype.getModelPathFromBookletItem=function(_974){ var mp=null; var md=this.m_md[_974]; if(md){ mp=md.mp; if(mp&&this.m_md[mp]){ mp=this.m_md[mp].mp; } } return mp?mp:null; }; CCDManager.prototype.GetBookletModelBasedDrillThru=function(_977){ var p=null; var md=this.m_md[_977]; if(md){ p=md.modelBasedDrillThru; } return p?p:0; }; CCDManager.prototype.GetDrillFlagForMember=function(_97a){ var _97b=null; var d=this._getMDPropertyFromCD(_97a,"r","drill"); if(d!==null&&this.m_cd[_97a].m){ _97b=d; } return _97b; }; CCDManager.prototype.GetDataType=function(_97d){ return this._getMDPropertyFromCD(_97d,"r","dtype"); }; CCDManager.prototype.GetUsage=function(_97e){ return this._getMDPropertyFromCD(_97e,"r","usage"); }; CCDManager.prototype.GetHUN=function(_97f){ var hun=this._getMDPropertyFromCD(_97f,"h","h"); if(!hun){ var h=this._getMDPropertyFromCD(_97f,"r","h"); if(h){ hun=this.m_md[h].h; } } if(hun!=null&&hun.indexOf("[__ns_")==0){ hun=null; } return hun; }; CCDManager.prototype.GetQuery=function(_982){ var qry=null; var q=this._getMDPropertyFromCD(_982,"r","q"); if(q){ qry=this.m_md[q].q; } return qry; }; CCDManager.prototype.GetDepth=function(_985){ return this._getMDPropertyFromCD(_985,"r","level"); }; CCDManager.prototype.GetDisplayValue=function(_986){ var _987=null; this.FetchContextData([_986]); if(this.ContextIdExists(_986)&&this.m_cd[_986]){ _987=this.m_cd[_986].u; } return _987; }; CCDManager.prototype.GetPUN=function(_988){ return this._getMDPropertyFromCD(_988,"p","p"); }; CCDManager.prototype.GetLUN=function(_989){ return this._getMDPropertyFromCD(_989,"l","l"); }; CCDManager.prototype.GetMUN=function(_98a){ return this._getMDPropertyFromCD(_98a,"m","m"); }; CCDManager.prototype.GetDUN=function(_98b){ return this._getMDPropertyFromCD(_98b,"d","d"); }; CCDManager.prototype.GetQMID=function(_98c){ return this._getMDPropertyFromCD(_98c,"i","i"); }; CCDManager.prototype.GetRDIValue=function(_98d){ return this._getMDPropertyFromCD(_98d,"r","r"); }; CCDManager.prototype.GetBIValue=function(_98e){ return this._getMDPropertyFromCD(_98e,"r","bi"); }; CCDManager.prototype.getContextIdForMetaData=function(lun,hun,_991){ var _992=[{"expression":lun,"type":"l"},{"expression":hun,"type":"h"}]; for(var _993=0;_993<_992.length;++_993){ var _994=_992[_993].expression; var _995=_992[_993].type; if(_994==""){ continue; } for(var _996 in this.m_md){ if(this.m_md[_996][_995]==_994){ for(var _997 in this.m_md){ if(this.m_md[_997].r&&this.m_md[_997][_995]==_996){ if(this.m_md[_997].drill!=0||_991==true){ for(var ctx in this.m_cd){ if(this.m_cd[ctx].r==_997&&this.m_cd[ctx].m){ return ctx; } } } } } } } } return ""; }; CCDManager.prototype.GetContextIdForMUN=function(mun){ var _99a=null; var _99b=null; for(var i in this.m_md){ if(this.m_md[i].m==mun){ _99a=i; break; } } if(_99a!=null){ for(var j in this.m_cd){ if(this.m_cd[j].m==_99a){ _99b=j; break; } } } return _99b; }; CCDManager.prototype.GetContextIdsForRDI=function(rdi){ var _99f=[]; for(var i in this.m_md){ if(this.m_md[i].r==rdi){ _99f.push(i); } } return _99f; }; CCDManager.prototype.getMUNForRDIAndUseValue=function(rdi,_9a2){ var _9a3=this.GetContextIdsForRDI(rdi); for(var i in this.m_cd){ for(var j in _9a3){ if(this.m_cd[i].r==_9a3[j]&&this.m_cd[i].u==_9a2){ var _9a6=this.m_cd[i].m; if(_9a6){ return this.m_md[_9a6].m; } } } } return null; }; CCDManager.prototype.GetPageMinMaxForRDI=function(rdi){ var _9a8=null; var _9a9=null; var _9aa=this.GetContextIdsForRDI(rdi); this.FetchContextData([0]); for(var i in this.m_cd){ for(var j in _9aa){ if(this.m_cd[i].r==_9aa[j]){ var _9ad=parseFloat(this.m_cd[i].u); if(_9ad==this.m_cd[i].u){ if(_9a8==null||_9ad<_9a8){ _9a8=_9ad; } if(_9a9==null||_9ad>_9a9){ _9a9=_9ad; } } } } } if(_9a8!=null&&_9a9!=null){ return eval("({ pageMin: "+_9a8+", pageMax: "+_9a9+"})"); } }; CCDManager.prototype.GetContextIdForDisplayValue=function(_9ae){ var _9af=null; for(var i in this.m_cd){ if(this.m_cd[i].u==_9ae){ _9af=i; break; } } return _9af; }; CCDManager.prototype.GetContextIdForUseValue=function(_9b1){ var _9b2=null; var _9b3=null; var _9b4=null; for(var i in this.m_md){ var md=this.m_md[i]; for(var j in md){ if(md[j]==_9b1){ _9b2=i; _9b3=j; break; } } } if(_9b2!=null){ for(var k in this.m_cd){ if(this.m_cd[k][_9b3]==_9b2){ _9b4=k; break; } } } return _9b4; }; CCDManager.prototype.getDataItemInfo=function(){ if(this.m_cd){ var _9b9={}; this.m_dataItemInfo={}; for(var i in this.m_cd){ var _9bb=this.m_cd[i].r; if(typeof _9bb!="undefined"){ var _9bc=this.m_md[_9bb].r; if(this.m_dataItemInfo[_9bc]==null){ this.m_dataItemInfo[_9bc]=1; }else{ this.m_dataItemInfo[_9bc]++; } } } return CViewerCommon.toJSON(this.m_dataItemInfo); } return ""; }; CCDManager.prototype.DataItemInfoToJSON=function(){ return this.getDataItemInfo(); }; CCDManager.prototype.MetadataToJSON=function(){ if(this.m_md){ return CViewerCommon.toJSON(this.m_md); } return ""; }; CCDManager.prototype.ContextDataToJSON=function(){ if(this.m_cd){ return CViewerCommon.toJSON(this.m_cd); } return ""; }; CCDManager.prototype.ContextDataSubsetToJSON=function(_9bd){ if(_9bd<=0){ return this.ContextDataToJSON(); } if(this.m_cd){ var _9be={}; var _9bf={}; for(var i in this.m_cd){ var _9c1=this.m_cd[i].r; if(typeof _9c1!="undefined"){ if(_9be[_9c1]==null){ _9be[_9c1]=0; }else{ _9be[_9c1]++; } if(_9be[_9c1]<_9bd){ _9bf[i]=this.m_cd[i]; } } } return CViewerCommon.toJSON(_9bf); } return ""; }; CCDManager.prototype.GetHUNForRDI=function(rdi,_9c3){ for(var i in this.m_md){ if(this.m_md[i].r==rdi&&this.m_md[i].q==_9c3){ var _9c5=this.m_md[i].h; if(_9c5){ return this.m_md[_9c5].h; } } } return null; }; CCDManager.prototype.GetMetadataIdForQueryName=function(_9c6){ for(var i in this.m_md){ if(this.m_md[i].q===_9c6){ return i; } } return null; }; CCDManager.prototype._isEmptyObject=function(obj){ for(var _9c9 in obj){ return false; } return true; }; CCDManager.prototype.isMetadataEmpty=function(){ if(this.m_md){ return this._isEmptyObject(this.m_md); } return true; }; CCDManager.prototype.GetBestPossibleItemName=function(_9ca){ var item=this.m_cd[_9ca]; if(!item){ return null; } if(item.l&&this.m_md[item.l].l){ return this._getStringInLastBracket(this.m_md[item.l].l); } if(item.r&&this.m_md[item.r].r){ return this._getStringInLastBracket(this.m_md[item.r].r); } if(item.h&&this.m_md[item.h].h){ return this._getStringInLastBracket(this.m_md[item.h].h); } if(item.i&&this.m_md[item.i].i){ return this._getStringInLastBracket(this.m_md[item.i].i); } return null; }; CCDManager.prototype.GetBestPossibleDimensionMeasureName=function(_9cc){ var item=this.m_cd[_9cc]; if(item&&item.m&&this.m_md[item.m]&&this.m_md[item.m].m){ return this._getStringInLastBracket(this.m_md[item.m].m); } return null; }; CCDManager.prototype._getStringInLastBracket=function(str){ if(str&&str.indexOf("].[")>0){ var _9cf=str.split("].["); var _9d0=_9cf[_9cf.length-1]; return _9d0.substring(0,_9d0.length-1); } return str; }; CCDManager.prototype._replaceNamespaceForSharedTM1DimensionOnly=function(_9d1){ var _9d2=this._getNamespaceAndDimensionFromUniqueName(_9d1); if(_9d2&&this.m_md){ for(var _9d3 in this.m_md){ var sMun=this.m_md[_9d3].m; if(sMun&&sMun.length>0){ if(sMun.indexOf("->:[TM].")>0){ var oObj=this._getNamespaceAndDimensionFromUniqueName(sMun); if(oObj.dimension&&oObj.dimension===_9d2.dimension&&oObj.namespace!==_9d2.namespace){ var _9d6=_9d1.indexOf("."); return oObj.namespace+_9d1.substr(_9d6,_9d1.length); } }else{ var _9d7=sMun.indexOf("->:["); if(_9d7>0){ if(sMun.substr(_9d7+4,4)!=="TM]."){ return _9d1; } } } } } } return _9d1; }; CCDManager.prototype._getNamespaceAndDimensionFromUniqueName=function(_9d8){ if(_9d8&&_9d8.length>0&&_9d8.indexOf("].[")>0){ var _9d9=_9d8.split("].["); if(_9d9.length>1){ return {"namespace":_9d9[0]+"]","dimension":"["+_9d9[1]+"]"}; } } return null; }; CCDManager.prototype.destroy=function(){ delete this.m_cd; delete this.m_md; delete this.m_oCV; delete this.m_dataItemInfo; }; function CSelectionXml(_9da,_9db,_9dc){ this.queries={}; this.burstContext=_9da||""; this.expressionLocale=_9db||""; this.contentLocale=_9dc||""; }; function SC_SingleSelection(){ this.rows=[]; this.cols=[]; this.sections=[]; this.measures=[]; this.layoutElementId=""; }; function SC_SingleQuery(){ this.selections=[]; this.slicers=[]; this.filters=[]; }; function SC_SingleSlicer(){ }; function SC_SingleDetailFilter(){ }; function SC_SingleSummaryFilter(){ }; CSelectionXml.prototype.BuildSelectionFromController=function(sc){ if(sc){ var _9de=sc.getAllSelectedObjects(); for(var s=0;s<_9de.length;++s){ var _9e0=_9de[s]; var _9e1=_9e0.getSelectedContextIds(); var muns=_9e0.getMuns(); var _9e3=muns.length; var _9e4=new SC_SingleSelection(); _9e4.layoutElementId=_9e0.getLayoutElementId(); var _9e5=null; for(var i=0;i<_9e3;++i){ var j,_9e8,_9e9; if(i===0&&_9e3===1){ for(j=0;j0){ _a55[_a5b]=_a5c; } } } } } } cvLoadDialog(oCV,_a55,540,460,null,false); } catch(exception){ } }; function getCVWaitingOnFault(){ var oCV=null; for(var _a5e=0;_a5e0&&_a73.childNodes[0].className=="textItem"){ try{ _a73.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(_a76){ var regX=/\r\n|\r|\n/g; var _a78="
"; return _a76.replace(regX,_a78); }; function xml_encode(_a79){ var _a7a=""+_a79; if((_a7a=="0")||((_a79!=null)&&(_a79!=false))){ _a7a=_a7a.replace(/&/g,"&"); _a7a=_a7a.replace(//g,">"); _a7a=_a7a.replace(/"/g,"""); _a7a=_a7a.replace(/'/g,"'"); }else{ if(_a79==null){ _a7a=""; } } return _a7a; }; function xml_decodeParser(sAll,_a7c){ var _a7d=sAll; switch(_a7c){ case "amp": _a7d="&"; break; case "lt": _a7d="<"; break; case "gt": _a7d=">"; break; case "quot": _a7d="\""; break; case "apos": _a7d="'"; break; } return _a7d; }; function xml_decode(_a7e){ var _a7f=""+_a7e; if((_a7f=="0")||((_a7e!=null)&&(_a7e!=false))){ _a7f=_a7f.replace(/&(amp|lt|gt|quot|apos);/g,xml_decodeParser); }else{ if(_a7e==null){ _a7f=""; } } return _a7f; }; function xpath_attr_encode(_a80){ var _a81=null; if(_a80.indexOf("'")>=0&&_a80.indexOf("\"")>=0){ var _a82=_a80.split("\""); _a81="concat("; for(var i=0;i<_a82.length;++i){ if(i>0){ _a81+=","; } if(_a82[i].length>0){ _a81+=("\""+_a82[i]+"\""); }else{ _a81+="'\"'"; } } _a81+=")"; }else{ if(_a80.indexOf("'")>=0){ _a81="\""+_a80+"\""; }else{ _a81="'"+_a80+"'"; } } return _a81; }; 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(_a8b){ if(typeof window[_a8b]!="undefined"&&window[_a8b]){ if(isIE()){ eval("delete "+_a8b); }else{ delete window[_a8b]; } } }; function loadClass(_a8c){ try{ var _a8d=eval("new "+_a8c+"();"); return _a8d; } catch(e){ return null; } }; function getElementsByClassName(oElm,_a8f,_a90){ var _a91=(_a8f=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(_a8f); var _a92=[]; var _a93=new RegExp("(^|\\s)"+_a90+"(\\s|$)"); var _a94=_a91.length; for(var i=0;i<_a94;i++){ var _a96=_a91[i]; if(_a93.test(_a96.className)){ _a92.push(_a96); } } return _a92; }; function getImmediateLayoutContainerId(node){ var _a98=node; while(_a98!=null){ if(_a98.getAttribute&&_a98.getAttribute("lid")!=null){ return _a98.getAttribute("lid"); } _a98=_a98.parentNode; } return null; }; function getChildElementsByAttribute(oElm,_a9a,_a9b,_a9c){ return getDescendantElementsByAttribute(oElm,_a9a,_a9b,_a9c,true); }; function getElementsByAttribute(oElm,_a9e,_a9f,_aa0,_aa1,_aa2){ return getDescendantElementsByAttribute(oElm,_a9e,_a9f,_aa0,false,_aa1,_aa2); }; function getDescendantElementsByAttribute(oElm,_aa4,_aa5,_aa6,_aa7,_aa8,_aa9){ var _aaa=[]; var _aab=null; if(typeof _aa9==="undefined"){ _aab=(typeof _aa6!="undefined")?new RegExp("(^|\\s)"+_aa6+"(\\s|$)","i"):null; }else{ _aab=_aa9; } if(typeof _aa4=="string"){ _aa4=[_aa4]; } var _aac=(oElm?_aa4.length:0); for(var _aad=0;_aad<_aac;_aad++){ var _aae=null; if(_aa7){ if(_aa4[_aad]=="*"&&oElm.all){ _aae=oElm.childNodes; }else{ _aae=[]; var _aaf=oElm.childNodes; for(var i=0;i<_aaf.length;++i){ if(_aaf[i].nodeName.toLowerCase()==_aa4[_aad].toLowerCase()){ _aae.push(_aaf[i]); } } } }else{ _aae=(_aa4[_aad]=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(_aa4[_aad]); } var _ab1=_aae.length; for(var idx=0;idx<_ab1;idx++){ var _ab3=_aae[idx]; var _ab4=_ab3.getAttribute&&_ab3.getAttribute(_aa5); if(_ab4!==null){ var _ab5=null; if(typeof _ab4==="number"){ _ab5=String(_ab4); }else{ if(typeof _ab4==="string"&&_ab4.length>0){ _ab5=_ab4; } } if(_ab5!==null){ if(typeof _aa6=="undefined"||(_aab&&_aab.test(_ab5))){ _aaa.push(_ab3); if(_aa8!=-1&&_aaa.length>_aa8){ return []; }else{ if(_aa8==1&&_aaa.length==1){ return _aaa; } } } } } } } return _aaa; }; function savedOutputDoneLoading(cvId,_ab7){ var oCV=window["oCV"+cvId]; var _ab9=(oCV&&oCV.getViewerWidget?oCV.getViewerWidget():null); var _aba=(_ab9?_ab9.getSavedOutput():null); if(_aba){ _aba.outputDoneLoading(); }else{ if(_ab7<5){ _ab7++; var _abb=function(){ savedOutputDoneLoading(cvId,_ab7); }; setTimeout(_abb,100); } } }; function getNavVer(){ var temp; if(isIE()){ return getIEVersion(); }else{ temp=navigator.userAgent.split("/"); return parseFloat(temp[temp.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 _abd=navigator.userAgent.match(/(?:MSIE |Trident\/.*; rv:)(\d+)/); return _abd?parseFloat(_abd[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(_abe,_abf,_ac0,_ac1){ if(_abf.length>1){ document.images[_abe].src=_abf; } }; function isFlashChartNode(evt){ var node=getNodeFromEvent(evt); if(node!=null&&typeof node.getAttribute=="function"){ return node.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 node=getNodeFromEvent(evt); var _ac7=node.getAttribute("viewerId"); if(!_ac7){ _ac7=node.parentNode.getAttribute("viewerId"); } if(!_ac7){ return; } var oCV=window["oCV"+_ac7]; var _ac9=oCV.getAction("Selection"); _ac9.pageClicked(evt); return stopEventBubble(evt); }; function clientToScreenCoords(_aca,_acb){ var _acc=_aca; var _acd={topCoord:0,leftCoord:0}; while(_acc!=null&&_acc!=_acb){ _acd.topCoord+=_acc.offsetTop; _acd.leftCoord+=_acc.offsetLeft; _acc=_acc.offsetParent; } return _acd; }; function getCurrentPosistionString(oCV,_acf,_ad0){ var _ad1=RV_RES.IDS_JS_INFOBAR_ITEM_COUNT; var _ad2=/\{0\}/; var _ad3=/\{1\}/; _ad1=_ad1.replace(_ad2,_acf); _ad1=" "+_ad1.replace(_ad3,_ad0)+" "; return _ad1; }; function applyJSONProperties(obj,_ad5){ for(property in _ad5){ if(typeof _ad5[property]=="object"&&!(_ad5[property] instanceof Array)){ if(typeof obj[property]=="undefined"){ obj[property]={}; } applyJSONProperties(obj[property],_ad5[property]); }else{ obj[property]=_ad5[property]; } } }; function CViewerCommon(){ }; CViewerCommon.openNewWindowOrTab=function(sURL,_ad7){ return window.open(sURL,_ad7); }; CViewerCommon.toJSON=function(obj){ var type=typeof (obj); if(type!="object"||type===null){ if(type==="string"){ obj="\""+obj+"\""; } return String(obj); }else{ var _ada; var prop; var json=[]; var _add=(obj&&obj.constructor==Array); for(_ada in obj){ prop=obj[_ada]; type=typeof (prop); if(type==="string"){ prop="\""+prop+"\""; }else{ if(type=="object"&&prop!==null){ prop=CViewerCommon.toJSON(prop); } } json.push((_add?"":"\""+_ada+"\":")+String(prop)); } return (_add?"[":"{")+String(json)+(_add?"]":"}"); } }; function resizePinnedContainers(){ var oCV=window.gaRV_INSTANCES[0]; if(oCV&&!oCV.m_viewerFragment){ var _adf=oCV.getPinFreezeManager(); if(_adf&&_adf.hasFrozenContainers()){ var _ae0=document.getElementById("RVContent"+oCV.getId()); var _ae1=document.getElementById("mainViewerTable"+oCV.getId()); var _ae2=_ae0.clientWidth; var _ae3=_ae1.clientHeight; _adf.resize(_ae2,_ae3); if(isIE()){ oCV.repaintDiv(_ae0); } } } }; function setWindowHref(url){ var _ae5=window.onbeforeunload; window.onbeforeunload=null; window.location.href=url; window.onbeforeunload=_ae5; }; CViewerCommon.getMessage=function(msg,args){ if(typeof args=="undefined"){ return msg; }else{ if(typeof args=="string"){ msg=msg.replace("{0}",args); }else{ if(args.length){ for(var i=0;i0){ for(var _b16=0;_b16<_b15.length;++_b16){ var _b17=_b15[_b16]; var _b18=_b17.getSelectedContextIds(); var _b19=[]; for(var item=0;item<_b18.length;++item){ var _b1b=_b18[item].join(":"); _b19.push(_b1b); } _b14.push(_b19.join("::")); } } return _b14; }; function getViewerSelectionContext(_b1c,_b1d,_b1e){ var _b1f=_b1e==true?_b1c.getAllSelectedObjectsWithUniqueCTXIDs():_b1c.getAllSelectedObjects(); if(_b1f!=null&&_b1f.length>0){ for(var _b20=0;_b20<_b1f.length;++_b20){ var _b21={}; var _b22=new CAxisSelectionIterator(_b1f[_b20]); if(_b22.hasNext()){ var _b23=_b22.next(); if(_b23.hasNext()){ var _b24=_b23.next(); var _b25=_b24.getContextId(); _b21[_b25]=true; var _b26=_b1d.addSelectedCell(_b24.getDataItem(),_b24.getMetadataModelItem(),_b24.getUseValue(),_b24.getUseValueType(),_b24.getDisplayValue(),_b24.getUsage(),{"queryName":_b24.getRefQuery()}); if(_b24.getHun()!=null){ _b26.addProperty("HierarchyUniqueName",_b24.getHun()); } if(_b24.getDun()!=null){ _b26.addProperty("DimensionUniqueName",_b24.getDun()); } while(_b23.hasNext()){ _b24=_b23.next(); _b25=_b24.getContextId(); if(typeof _b21[_b25]=="undefined"||_b25===""){ _b21[_b25]=true; var _b27=_b26.addDefiningCell(_b24.getDataItem(),_b24.getMetadataModelItem(),_b24.getUseValue(),_b24.getUseValueType(),_b24.getDisplayValue(),_b24.getUsage(),{"queryName":_b24.getRefQuery()}); if(_b24.getHun()!=null){ _b27.addProperty("HierarchyUniqueName",_b24.getHun()); } if(_b24.getDun()!=null){ _b27.addProperty("DimensionUniqueName",_b24.getDun()); } } } while(_b22.hasNext()){ _b23=_b22.next(); var _b28=_b26; while(_b23.hasNext()){ _b24=_b23.next(); _b25=_b24.getContextId(); if(typeof _b21[_b25]=="undefined"||_b25===""){ _b21[_b25]=true; _b28=_b28.addDefiningCell(_b24.getDataItem(),_b24.getMetadataModelItem(),_b24.getUseValue(),_b24.getUseValueType(),_b24.getDisplayValue(),_b24.getUsage(),{"queryName":_b24.getRefQuery()}); if(_b24.getHun()!=null){ _b28.addProperty("HierarchyUniqueName",_b24.getHun()); } if(_b24.getDun()!=null){ _b28.addProperty("DimensionUniqueName",_b24.getDun()); } } } } } } } } var _b29=_b1d.toString(); if(window.gViewerLogger){ window.gViewerLogger.log("Selection context",_b29,"xml"); } return _b29; }; function PinFreezeContainer(_b2a,lid,_b2c,_b2d,_b2e,_b2f,_b30){ this.m_pinFreezeManager=_b2a; this.m_lid=lid; this.m_lidNS=lid+_b2c+_b30; this.m_viewerId=_b2c; this.m_freezeTop=_b2d; this.m_freezeSide=_b2e; this.m_cachedReportDiv=null; this.m_cachedPFContainer=null; this.m_cachedBaseContainer=_b2f; this.m_containerMargin={"top":0,"left":0}; if(this.m_cachedBaseContainer&&this.m_cachedBaseContainer.style){ if(this.m_cachedBaseContainer.style.marginTop){ this.m_containerMargin.top=Number(this.m_cachedBaseContainer.style.marginTop.replace("px","")); } if(this.m_cachedBaseContainer.style.marginLeft){ this.m_containerMargin.left=Number(this.m_cachedBaseContainer.style.marginLeft.replace("px","")); } } this.m_cachedContainerIndex=_b30; this.m_sectionCache=null; this.m_homeCellNodes={}; this.m_fixedWidth=null; this.m_clientWidth=700; this.m_scrollableClientWidth=700; this.m_fixedHeight=null; this.m_clientHeight=300; this.m_scrollableClientHeight=300; this.m_wrapFlag=false; this.c_pageMargin=(this.m_freezeTop&&this.m_freezeSide)?50:20; this.touchScrollSections=false; this.touchPreviousX=-1; this.touchPreviousY=-1; }; PinFreezeContainer.prototype.toJSONString=function(){ var _b31="{"; _b31+="\"m_clientWidth\":"+this.m_clientWidth+""; _b31+=",\"m_scrollableClientWidth\":"+this.m_scrollableClientWidth+""; _b31+=",\"m_clientHeight\":"+this.m_clientHeight+""; _b31+=",\"m_scrollableClientHeight\":"+this.m_scrollableClientHeight+""; _b31+="}"; return _b31; }; PinFreezeContainer.prototype.copyProperties=function(_b32){ this.m_clientWidth=_b32.m_clientWidth; this.m_scrollableClientWidth=_b32.m_scrollableClientWidth; this.m_clientHeight=_b32.m_clientHeight; this.m_scrollableClientHeight=_b32.m_scrollableClientHeight; }; PinFreezeContainer.prototype.setViewerId=function(id){ this.m_viewerId=id; }; PinFreezeContainer.prototype.getLid=function(){ return this.m_lid; }; PinFreezeContainer.prototype.createPFContainer=function(_b34,_b35){ var _b36=document.createElement("temp"); if(this.m_cachedBaseContainer){ this.applyAuthoredFixedSizes(this.m_cachedBaseContainer); this.m_cachedReportDiv=_b34; var _b37=this.m_cachedBaseContainer.parentNode; var _b38=this.loadTemplateHTML(); if(_b38){ _b36.innerHTML=_b38; var _b39=this.getContainerByLID(_b36); var _b3a=this.getSectionByLID(_b36.firstChild,"pfMainOutput"); if(_b3a){ var i=this.getChildPosition(_b37,this.m_cachedBaseContainer); if(i!=-1){ var _b3c=this.m_pinFreezeManager.m_oCV; if(_b3c&&_b3c.envParams["freezeDefaultWrap"]){ if(this.m_cachedBaseContainer.style.whiteSpace===""&&_b3c.envParams["freezeDefaultWrap"].toLowerCase()==="true"){ var _b3d=this.m_cachedBaseContainer.getElementsByTagName("span"); if(_b3d){ for(var k=0;k<_b3d.length;k++){ _b3d[k].style.whiteSpace="nowrap"; } } this.m_wrapFlag=true; } } if(!_b35){ if(!this._getFixedWidth()){ this.m_cachedBaseContainer.setAttribute("authoredFixedWidth","false"); this.m_addedFixedWidth=this.m_cachedBaseContainer.clientWidth+1; this.m_cachedBaseContainer.style.width=this.m_addedFixedWidth+"px"; } if(!this._getFixedHeight()){ this.m_cachedBaseContainer.setAttribute("authoredFixedHeight","false"); this.m_addedFixedHeight=this.m_cachedBaseContainer.clientHeight; this.m_cachedBaseContainer.style.height=this.m_addedFixedHeight+"px"; } _b3a.style.width=this.m_cachedBaseContainer.clientWidth+2+"px"; _b3a.style.height=this.m_cachedBaseContainer.clientHeight+2+"px"; } _b3a.appendChild(this.m_cachedBaseContainer); this.insertAt(_b37,_b39,i); } if(this.m_cachedBaseContainer.style.border!==""){ _b39.style.border=this.m_cachedBaseContainer.style.border; this.m_cachedBaseContainer.style.border=""; } } } } }; PinFreezeContainer.prototype._getFixedWidth=function(_b3f){ if(_b3f&&_b3f.style.width&&!_b3f.getAttribute("authoredFixedWidth")){ var _b40=Number(_b3f.style.width.split("px")[0]); return isNaN(_b40)?null:_b40; } return null; }; PinFreezeContainer.prototype._getFixedHeight=function(_b41){ if(_b41&&_b41.style.height&&!_b41.getAttribute("authoredFixedHeight")){ var _b42=Number(_b41.style.height.split("px")[0]); return isNaN(_b42)?null:_b42; } return null; }; PinFreezeContainer.prototype.applyAuthoredFixedSizes=function(_b43){ var _b44=this._getFixedWidth(_b43); if(_b44){ this.m_fixedWidth=_b44; this.m_clientWidth=this.m_fixedWidth; this.m_scrollableClientWidth=this.m_fixedWidth; } var _b45=this._getFixedHeight(_b43); if(_b45){ this.m_fixedHeight=_b45; this.m_clientHeight=this.m_fixedHeight; this.m_scrollableClientHeight=this.m_fixedHeight; } }; PinFreezeContainer.prototype.loadFreezeBothTemplateHTML=function(){ var _b46=""+""+""+""+""+""+""+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
 
"+"
"+"
"; return _b46; }; PinFreezeContainer.prototype.loadFreezeSideTemplateHTML=function(){ var _b47=""+""+""+""+"
"+"
"+"
"+"
 
"+"
"+"
"; return _b47; }; PinFreezeContainer.prototype.loadFreezeTopTemplateHTML=function(){ var _b48=""+""+""+""+"
"+"
"+"
"+"
"+"
"; return _b48; }; PinFreezeContainer.prototype.loadTemplateHTML=function(){ if(this.m_freezeSide&&this.m_freezeTop){ return this.loadFreezeBothTemplateHTML(); }else{ if(this.m_freezeSide){ return this.loadFreezeSideTemplateHTML(); }else{ if(this.m_freezeTop){ return this.loadFreezeTopTemplateHTML(); } } } return null; }; PinFreezeContainer.prototype.createSideHeadings=function(_b49){ var _b4a=this.getSection("pfMainOutput"); var _b4b=_b4a.getAttribute("pfslid"); var _b4c=this.getSection("pfSideHeadings"); var _b4d=_b4c.getAttribute("pfslid"); var _b4e=this.getMainOutputHomeCell(); if(!_b4e){ return; } var _b4f=_b49; var _b50=_b4c; var _b51=this.isA11yEnabled(_b4f); var _b52=this.m_pinFreezeManager.deepCloneNode(_b4f); _b50.appendChild(_b52); var _b53=this.getSectionHomeCell(_b4c); if(!_b53){ return; } var _b54=_b4f.getElementsByTagName("tbody"); var _b55=_b52.getElementsByTagName("tbody"); if(_b54.length>0&&_b55.length>0){ var _b56=_b54[0]; var _b57=_b55[0]; var _b58=_b56.firstChild; var _b59=_b57.firstChild; var _b5a=_b4e.rowSpan; this.markAsCopy(_b4e,_b53,_b4b,_b4d); for(var r=0;r<_b5a;++r){ var _b5c=_b57.rows[r]; this.removeCTX(_b5c); } for(var r=_b5a;r<_b57.rows.length;++r){ var _b5d=_b56.rows[r]; var _b5c=_b57.rows[r]; _b5c.style.visibility="hidden"; for(var c=0;c<_b5c.cells.length;++c){ var _b5f=_b5c.cells[c]; if(_b51){ _b5f=this.m_pinFreezeManager.removeIdAttribute(_b5f); } if(_b5f.getAttribute("type")=="datavalue"){ _b5f.removeAttribute("ctx"); _b5f.removeAttribute("uid"); _b5f.removeAttribute("name"); }else{ var _b60=_b5d.cells[c]; this.markAsCopy(_b60,_b5f,_b4b,_b4d); } } _b5c.style.visibility="visible"; } } }; PinFreezeContainer.prototype.applyNeighbouringBorderStylesToHomeCell=function(_b61,_b62){ if(isFF()||isIE()){ if(_b61&&_b61.length&&_b61[0].cells&&_b61[0].cells.length>1){ if(this.m_freezeSide){ var _b63=this.getBorderInfo(_b61[0].cells[1],"right"); if(_b63){ _b62.style.borderRightWidth=_b63.borderRightWidth; _b62.style.borderRightStyle=_b63.borderRightStyle; _b62.style.borderRightColor=_b63.borderRightColor; } } if(this.m_freezeTop){ var _b63=this.getBorderInfo(_b61[0].cells[1],"bottom"); if(_b63){ _b62.style.borderBottomWidth=_b63.borderBottomWidth; _b62.style.borderBottomStyle=_b63.borderBottomStyle; _b62.style.borderBottomColor=_b63.borderBottomColor; } } } } }; PinFreezeContainer.prototype.createTopHeadings=function(_b64){ var _b65=this.getSection("pfMainOutput"); var _b66=_b65.getAttribute("pfslid"); var _b67=this.getSection("pfTopHeadings"); var _b68=_b67.getAttribute("pfslid"); var _b69=this.getMainOutputHomeCell(); if(!_b69){ return; } var _b6a=_b64; var _b6b=_b67; var _b6c=this.isA11yEnabled(_b6a); var _b6d=this.m_pinFreezeManager.deepCloneNode(_b6a); _b6d.setAttribute("clonednode","true"); _b6b.appendChild(_b6d); var _b6e=_b6a.getElementsByTagName("tbody"); var _b6f=_b6d.getElementsByTagName("tbody"); if(_b6e.length>0&&_b6f.length>0){ var _b70=_b6e[0]; var _b71=_b6f[0]; var _b72=_b69.rowSpan; for(var r=0;r<_b71.rows.length;++r){ var _b74=_b70.rows[r]; var _b75=_b71.rows[r]; if(_b6c){ _b75=this.m_pinFreezeManager.removeIdAttribute(_b75); } _b75.style.visibility="hidden"; for(var c=0;c<_b75.cells.length;++c){ var _b77=_b75.cells[c]; if(r>_b72||_b77.getAttribute("type")=="datavalue"){ _b77.removeAttribute("ctx"); _b77.removeAttribute("uid"); _b77.removeAttribute("name"); }else{ var _b78=_b74.cells[c]; this.markAsCopy(_b78,_b77,_b66,_b68); if(_b78===_b69){ this.initializeHomeCellTabIndex(_b77); this.applyNeighbouringBorderStylesToHomeCell(_b70.rows,_b77); } } } _b75.style.visibility="visible"; } } }; PinFreezeContainer.prototype.createHomeCellHeading=function(){ var _b79=this.getSection("pfMainOutput"); var _b7a=_b79.getAttribute("pfslid"); var _b7b=this.getSection("pfHomeCell"); var _b7c=_b7b.parentNode; var _b7d=_b7b.getAttribute("pfslid"); var _b7e=this.getMainOutputHomeCell(); if(!_b7e){ return; } _b7c.style.height="100%"; var _b7f=this.getTopHeadingSectionHeight(_b7e); _b7b.style.height=_b7f-this.m_containerMargin.top+"px"; _b7b.style.width=this.getSideHeadingSectionWidth(_b7e)-this.m_containerMargin.left+"px"; _b7b.style.marginTop=this.m_containerMargin.top+"px"; _b7b.style.marginLeft=this.m_containerMargin.left+"px"; var _b80=_b7e.parentNode; var _b81=_b80.cloneNode(false); var _b82=this._findBestGuessHomeCell(_b7e); var _b83=document.createElement("div"); _b83.style.width="100%"; _b83.style.height="100%"; while(_b7e.offsetLeft<=_b82.offsetLeft){ oTargetHomeCell=this.m_pinFreezeManager.deepCloneNode(_b7e); if(isFF()||isIE()){ _b7e.appendChild(_b83); oTargetHomeCell.style.width=_b83.clientWidth+"px"; _b7e.removeChild(_b83); }else{ oTargetHomeCell.style.width=_b7e.clientWidth+1+"px"; } oTargetHomeCell.style.borderBottomWidth="0px"; _b81.appendChild(oTargetHomeCell); this.markAsCopy(_b7e,oTargetHomeCell,_b7a,_b7d); if(_b7e.nextSibling){ _b7e=_b7e.nextSibling; }else{ break; } } if(oTargetHomeCell){ oTargetHomeCell.style.borderRightWidth="0px"; } var _b84=_b80.parentNode; var _b85=_b84.cloneNode(false); _b85.appendChild(_b81); var _b86=_b84.parentNode; var _b87=_b86.cloneNode(false); _b87.appendChild(_b85); _b87.style.width="100%"; _b87.style.height="100%"; _b87.style.marginLeft=""; _b87.style.marginTop=""; _b7b.appendChild(_b87); this.initializeHomeCellTabIndex(oTargetHomeCell); this.applyNeighbouringBorderStylesToHomeCell(_b79.firstChild.rows,_b7b); }; PinFreezeContainer.prototype.markAsCopy=function(main,copy,_b8a,_b8b){ if(!main.pfCopy){ main.setAttribute("pfslid",_b8a); main.pfCopy=[]; } main.pfCopy.push(copy); copy.pfMain=main; copy.setAttribute("pfslid",_b8b); }; PinFreezeContainer.prototype.getCopy=function(_b8c){ if(_b8c.pfCopy){ var _b8d={}; for(var i in _b8c.pfCopy){ var copy=_b8c.pfCopy[i]; if(copy.getAttribute){ var _b90=copy.getAttribute("pfslid"); if(_b90){ var _b91=PinFreezeContainer.getSectionNameFromSlid(_b90); var _b92=this.getSection(_b91); if(_b92&&PinFreezeContainer.isSectionVisible(_b92)){ _b8d[_b91]=copy; } } } } if(_b8d["pfHomeCell"]){ return _b8d["pfHomeCell"]; } for(i in _b8d){ return _b8d[i]; } } return null; }; PinFreezeContainer.prototype.getMain=function(_b93){ if(_b93.pfMain){ return _b93.pfMain; } return null; }; PinFreezeContainer.isSectionVisible=function(_b94){ var node=_b94; if(!node){ return false; } while(node.parentNode&&!node.getAttribute("pfclid")){ if(node.style&&node.style.display==="none"){ return false; } node=node.parentNode; } return (!node.style||node.style.display!=="none"); }; PinFreezeContainer.prototype.getSectionStructure=function(){ var _b96={isSideFrozen:false,isTopFrozen:false}; if(this.m_freezeSide){ var side=this.getSection("pfSideHeadings"); if(side){ _b96.isSideFrozen=PinFreezeContainer.isSectionVisible(side); } } if(this.m_freezeTop){ var top=this.getSection("pfTopHeadings"); if(top){ _b96.isTopFrozen=PinFreezeContainer.isSectionVisible(top); } } return _b96; }; PinFreezeContainer.prototype.checkSectionStructureChange=function(_b99,_b9a){ if(_b99.isSideFrozen!==_b9a.isSideFrozen||_b99.isTopFrozen!==_b9a.isTopFrozen){ this.m_pinFreezeManager.sectionStructureChange(); } }; PinFreezeContainer.prototype.freezeContainerInReport=function(_b9b){ this.cacheContainerAndSections(this.getContainerByLID(_b9b)); this.m_homeCellNodes={}; this.updateContainer(); }; PinFreezeContainer.prototype.frozenSectionsRequired=function(){ return (this.frozenSideHeadingsRequired()||this.frozenTopHeadingsRequired()); }; PinFreezeContainer.prototype.frozenSideHeadingsRequired=function(){ var _b9c=this.getSection("pfMainOutput"); if(_b9c){ if(this.m_freezeSide){ var _b9d=_b9c.scrollWidth; return ((this.m_clientWidth<_b9d)||_b9d==0); } } return false; }; PinFreezeContainer.prototype.frozenTopHeadingsRequired=function(){ var _b9e=this.getSection("pfMainOutput"); if(_b9e){ if(this.m_freezeTop){ var _b9f=_b9e.scrollHeight; return ((this.m_clientHeight<_b9f)||_b9f==0); } } return false; }; PinFreezeContainer.prototype.showTemplatePart=function(_ba0,_ba1){ var _ba2=this.getContainer().rows; for(var r=0;r<_ba2.length;++r){ if(_ba2[r].getAttribute("templatePart")===_ba0){ _ba2[r].style.display=((_ba1)?"":"none"); }else{ var _ba4=_ba2[r].cells; for(var c=0;c<_ba4.length;++c){ if(_ba4[c].getAttribute("templatePart")===_ba0){ _ba4[c].style.display=((_ba1)?"":"none"); } } } } }; PinFreezeContainer.prototype.showFreezeTopOnly=function(_ba6){ if(!(this.m_freezeTop&&this.m_freezeSide)){ return; } var _ba7=(_ba6.scrollWidth==0)?_ba6.clientWidth:_ba6.scrollWidth; this.updateMainOutputWidth(_ba7); this.setScrollX(_ba6,0); if(this.getSection("pfTopHeadings")){ this.getSection("pfTopHeadings").style.width=_ba7+"px"; this.setScrollX(this.getSection("pfTopHeadings"),0); } this.showTemplatePart("freezeSide",false); }; PinFreezeContainer.prototype.showFreezeSideOnly=function(_ba8){ if(!(this.m_freezeTop&&this.m_freezeSide)){ return; } var _ba9=(_ba8.scrollHeight==0)?_ba8.clientHeight:_ba8.scrollHeight; this.updateMainOutputHeight(_ba9); this.setScrollY(_ba8,0); if(this.getSection("pfSideHeadings")){ this.getSection("pfSideHeadings").style.height=_ba9+"px"; this.setScrollY(this.getSection("pfSideHeadings"),0); } this.showTemplatePart("freezeTop",false); }; PinFreezeContainer.prototype.showAll=function(){ if(!(this.m_freezeTop&&this.m_freezeSide)){ return; } this.showTemplatePart("freezeTop",true); this.showTemplatePart("freezeSide",true); }; PinFreezeContainer.prototype.showMainOutputOnly=function(_baa){ this.updateMainOutputWidth((_baa.scrollWidth==0)?_baa.clientWidth:_baa.scrollWidth); this.updateMainOutputHeight((_baa.scrollHeight==0)?_baa.clientHeight:_baa.scrollHeight); this.setInitialScrollPosition(_baa,0,0); if(this.m_freezeSide&&this.m_freezeTop){ this.getSection("pfHomeCell").style.display="none"; } if(this.m_freezeSide){ this.getSection("pfSideHeadings").style.display="none"; this.getSection("pfHorizontalScrollBar").style.display="none"; } if(this.m_freezeTop){ this.getSection("pfTopHeadings").style.display="none"; this.getSection("pfVerticalScrollBar").style.display="none"; } }; PinFreezeContainer.prototype.getWrap=function(el){ if(el.currentStyle){ return el.currentStyle.whiteSpace; }else{ if(window.getComputedStyle){ return window.getComputedStyle(el,null).getPropertyValue("white-space"); }else{ return el.style.whiteSpace; } } }; PinFreezeContainer.prototype.getStyleDisplay=function(el){ if(el.currentStyle){ return el.currentStyle.display; }else{ if(window.getComputedStyle){ return window.getComputedStyle(el,null).getPropertyValue("display"); }else{ return el.style.display; } } }; PinFreezeContainer.prototype.headingsCreated=function(_bad){ return _bad.firstChild?true:false; }; PinFreezeContainer.prototype.updateContainer=function(){ var _bae=this.getSection("pfMainOutput"); var _baf=this.getMainOutputHomeCell(); if(_baf){ if(this.m_scrollableClientHeight===this.m_clientHeight||!this.m_scrollableClientHeight){ this.m_scrollableClientHeight-=_baf.offsetHeight; var _bb0=this.calculateMinCrossTabScrollableClientHeight(); if(_bb0>this.m_scrollableClientHeight){ this.m_scrollableClientHeight=_bb0; } } if(this.m_scrollableClientWidth===this.m_clientWidth||!this.m_scrollableClientWidth){ this.m_scrollableClientWidth-=this.getHomeCellOffsetWidth(_baf); } } if(_bae&&_baf){ this.showAll(); if(this.frozenSectionsRequired()){ this.updateMainOutputSize(); this.initializeHomeCellTabIndex(_baf); if(this.m_freezeSide){ var _bb1=this.getSection("pfSideHeadings"); if(!this.headingsCreated(_bb1)){ this.createSideHeadings(this.m_cachedBaseContainer); if(this.m_freezeTop){ this.initializeTouchScrolling(_bb1); } } var _bb2=this.getSection("pfHorizontalScrollBar"); _bb2.scrollLeft="0px"; } if(this.m_freezeTop){ var _bb3=this.getSection("pfTopHeadings"); if(!this.headingsCreated(_bb3)){ this.createTopHeadings(this.m_cachedBaseContainer); if(this.m_freezeSide){ this.initializeTouchScrolling(_bb3); } } var _bb4=this.getSection("pfVerticalScrollBar"); _bb4.scrollTop="0px"; } if(this.m_freezeSide&&this.m_freezeTop){ var _bb5=this.getSection("pfHomeCell"); if(!this.headingsCreated(_bb5)){ this.createHomeCellHeading(); } _bb5.style.display=""; } var _bb6=this.updateSideHeadingSize(_baf); var _bb7=this.updateTopHeadingSize(_baf); if(!this.frozenSectionsRequired()){ this.showMainOutputOnly(_bae); } this.setInitialScrollPosition(_bae,_bb6,_bb7); if(this.m_freezeTop&&this.m_freezeSide){ this.setInitialScrollPosition(this.getSection("pfSideHeadings"),0,_bb7); this.setInitialScrollPosition(this.getSection("pfTopHeadings"),_bb6,0); } this.initializeTouchScrolling(_bae); }else{ this.showMainOutputOnly(_bae); this.removeTouchScrolling(); } this.updateTabIndexValues(); } }; PinFreezeContainer.prototype.calculateMinCrossTabScrollableClientHeight=function(){ var _bb8=0; if(this.m_cachedPFContainer){ var _bb9=this.getElementByLID(this.m_cachedPFContainer,"table",this.m_lid+this.m_viewerId); if(_bb9){ var _bba=0; for(var r=0;r<_bb9.rows.length;r++){ var row=_bb9.rows[r]; for(var c=0;c=2){ break; } } } } return _bb8; }; PinFreezeContainer.prototype.updateSideHeadingSize=function(_bc0){ var _bc1=0; if(this.m_freezeSide){ var _bc2=this.getSection("pfMainOutput"); if(!_bc2){ return 0; } if(!this.frozenSideHeadingsRequired()){ this.showFreezeTopOnly(_bc2); return 0; } var _bc3=this.getSection("pfSideHeadings"); _bc1=this.getSideHeadingSectionWidth(_bc0); var _bc4=this.getSection("pfHorizontalScrollBar"); var _bc5=this.getSectionHomeCell(_bc3); if(_bc3.style.display=="none"){ _bc3.style.display=""; _bc4.style.display=""; } _bc3.style.width=_bc1+"px"; _bc3.style.height=_bc2.clientHeight+"px"; } return _bc1; }; PinFreezeContainer.prototype.updateTopHeadingSize=function(_bc6){ var _bc7=0; if(this.m_freezeTop){ var _bc8=this.getSection("pfMainOutput"); if(!_bc8){ return 0; } if(!this.frozenTopHeadingsRequired()){ this.showFreezeSideOnly(_bc8); return 0; } var _bc9=this.getSection("pfTopHeadings"); _bc7=this.getTopHeadingSectionHeight(_bc6); var _bca=this.getSection("pfVerticalScrollBar"); var _bcb=this.getSectionHomeCell(_bc9); if(_bc9.style.display=="none"){ _bc9.style.display=""; _bca.style.display=""; } _bc9.style.height=_bc7+"px"; _bc9.style.width=_bc8.clientWidth+"px"; } return _bc7; }; PinFreezeContainer.prototype.setScrollX=function(_bcc,_bcd){ if(getElementDirection(_bcc)==="rtl"){ setScrollRight(_bcc,_bcd); }else{ setScrollLeft(_bcc,_bcd); } }; PinFreezeContainer.prototype.setScrollY=function(_bce,_bcf){ _bce.scrollTop=_bcf; }; PinFreezeContainer.prototype.setInitialScrollPosition=function(_bd0,_bd1,_bd2){ if(getElementDirection(_bd0)==="rtl"){ setScrollRight(_bd0,_bd1); }else{ setScrollLeft(_bd0,_bd1); } _bd0.scrollTop=_bd2; }; PinFreezeContainer.prototype.getScrollableClientWidth=function(){ return this.m_scrollableClientWidth; }; PinFreezeContainer.prototype.setScrollableClientWidth=function(_bd3){ this.m_scrollableClientWidth=_bd3; }; PinFreezeContainer.prototype.getContainerWidth=function(){ return this.m_addedFixedWidth?this.m_addedFixedWidth:this.m_clientWidth; }; PinFreezeContainer.prototype.getClientWidth=function(){ return this.m_clientWidth; }; PinFreezeContainer.prototype.getScrollableClientHeight=function(){ return this.m_scrollableClientHeight; }; PinFreezeContainer.prototype.setScrollableClientHeight=function(_bd4){ this.m_scrollableClientHeight=_bd4; }; PinFreezeContainer.prototype.getClientHeight=function(){ return this.m_clientHeight; }; PinFreezeContainer.prototype.clientHeight=function(_bd5){ return _bd5.clientHeight; }; PinFreezeContainer.prototype.findBestContainerHeight=function(_bd6){ if(this.m_freezeTop&&this.m_cachedReportDiv){ var _bd7=this.m_cachedReportDiv.parentNode; if(_bd7){ var _bd8=this._findRestOfPageHeight(this.getContainer()); return _bd6-_bd8-(this.c_pageMargin/2)-this.m_containerMargin.top; } } return _bd6-this.c_pageMargin; }; PinFreezeContainer.prototype.findBestContainerWidth=function(_bd9){ var node=this.getContainer(); while(node&&node.nodeName.toLowerCase()!="td"&&node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){ node=node.parentNode; } if(!node){ return -1; } if(node.nodeName.toLowerCase()=="td"){ var _bdb=0; var _bdc=node.parentNode.childNodes; for(var i=0;i<_bdc.length;i++){ if(_bdc[i]!==node){ _bdb+=_bdc[i].clientWidth; } } return _bd9-_bdb-(this.c_pageMargin/2); } return _bd9; }; PinFreezeContainer.prototype._findRestOfPageHeight=function(node){ var _bdf=0; var _be0=node.parentNode; if(!_be0){ return _bdf; } if(_be0.childNodes.length>1){ for(var i=0;i<_be0.childNodes.length;i++){ var _be2=_be0.childNodes[i]; if(_be2.nodeType==1){ var _be3=this.getStyleDisplay(_be2); if(_be2!=node&&!isNaN(_be2.clientHeight)&&_be3!="none"&&_be3!="table-cell"){ _bdf+=this.clientHeight(_be2); } } } } if(node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){ _bdf+=this._findRestOfPageHeight(_be0); } return _bdf; }; PinFreezeContainer.prototype.resize=function(_be4,_be5,_be6,_be7){ if(this.m_fixedWidth&&this.m_fixedHeight){ return; } _be4=(this.m_fixedWidth)?this.m_fixedWidth:_be4; _be5=(this.m_fixedHeight)?this.m_fixedHeight:_be5; var _be8=this.getSectionStructure(); if(this.m_sectionCache&&this.m_cachedPFContainer){ var _be9=0; if(_be5!==0){ _be9=this.findBestContainerHeight(_be5); if(_be6&&_be9<300){ _be9=300; }else{ if(_be9<100){ _be9=100; } } } this.m_clientHeight=_be9>0?_be9:this.m_clientHeight; var _bea=0; if(_be4!==0){ _bea=this.findBestContainerWidth(_be4); } this.m_clientWidth=(_bea>0)?_bea-5-(this.c_pageMargin/2):this.m_clientWidth; var _beb=this.getSection("pfMainOutput"); var _bec=this.getSectionHomeCell(_beb); if(_bec){ this.m_scrollableClientWidth=this.m_clientWidth-this.getSideHeadingSectionWidth(_bec); this.m_scrollableClientHeight=this.m_clientHeight-_bec.offsetHeight; } if(_be7){ var _bed=getElementsByAttribute(this.m_cachedPFContainer,"div","pflid",_be7.lid); if(_bed){ var node=_bed[0]; while(node.nodeName.toLowerCase()!="table"){ node=node.parentNode; } node.style.width=_be7.width+"px"; } } this.updateContainer(); }else{ this.m_clientWidth=_be4-this.c_pageMargin; this.m_clientHeight=_be5-this.c_pageMargin; } var _bef=this.getSectionStructure(); this.checkSectionStructureChange(_be8,_bef); }; PinFreezeContainer.prototype.updateMainOutputSize=function(){ if(this.m_freezeSide&&this.m_freezeTop){ if(this.frozenSideHeadingsRequired()){ this.updateMainOutputWidth(this.getScrollableClientWidth()); } if(this.frozenTopHeadingsRequired()){ this.updateMainOutputHeight(this.getScrollableClientHeight()); } }else{ if(this.m_freezeSide){ this.updateMainOutputWidth(this.getScrollableClientWidth()); }else{ if(this.m_freezeTop){ this.updateMainOutputHeight(this.getScrollableClientHeight()); } } } }; PinFreezeContainer.prototype.updateMainOutputWidth=function(_bf0){ var _bf1=this.getSection("pfMainOutput"); if(!_bf1){ return; } if(this.m_freezeSide==true){ _bf1.style.width=(_bf0+"px"); if(this.m_freezeTop==false||!this.frozenTopHeadingsRequired()){ _bf1.style.height=_bf1.firstChild.clientHeight+"px"; } var _bf2=this.getSection("pfHorizontalScrollBar"); if(_bf2){ _bf2.style.width=(_bf0+"px"); var _bf3=_bf2.firstChild; if(_bf3){ var _bf4=this.getSectionHomeCell(_bf1); var _bf5=_bf1.scrollWidth-this.getHomeCellOffsetWidth(_bf4); _bf3.style.width=_bf5+"px"; } } } }; PinFreezeContainer.prototype.updateMainOutputHeight=function(_bf6){ var _bf7=this.getSection("pfMainOutput"); if(!_bf7){ return; } _bf7.style.height=(_bf6+"px"); if(!this.m_freezeSide||!this.frozenSideHeadingsRequired()){ _bf7.style.width=_bf7.firstChild.clientWidth+2+"px"; } var _bf8=this.getSection("pfVerticalScrollBar"); if(_bf8){ _bf8.style.height=(_bf6+"px"); var _bf9=_bf8.firstChild; if(_bf9){ var _bfa=this.getSectionHomeCell(_bf7); var _bfb=_bf7.scrollHeight-_bfa.offsetHeight; _bf9.style.height=_bfb+"px"; } } }; PinFreezeContainer.prototype.getElementByLID=function(_bfc,tag,lid){ var _bff=getElementsByAttribute(_bfc,tag,"lid",lid); if(_bff.length>0){ return _bff[0]; } return null; }; PinFreezeContainer.prototype.getContainerByLID=function(_c00){ var _c01=getElementsByAttribute(_c00,"table","pfclid","pfContainer_"+this.m_lidNS); if(_c01.length>0){ return _c01[0]; } return null; }; PinFreezeContainer.prototype.getSectionByLID=function(_c02,_c03){ var _c04=getElementsByAttribute(_c02,"div","pfslid",_c03+"_"+this.m_lidNS); if(_c04.length>0){ return _c04[0]; } return null; }; PinFreezeContainer.getSectionNameFromSlid=function(slid){ return slid?slid.split("_")[0]:null; }; PinFreezeContainer.getLidFromSlid=function(slid){ return slid.split("_")[1]; }; PinFreezeContainer.nodeToSlid=function(_c07){ while(_c07.parentNode&&!_c07.getAttribute("pfslid")){ _c07=_c07.parentNode; } if(_c07.getAttribute){ return _c07.getAttribute("pfslid"); } return null; }; PinFreezeContainer.prototype.cacheContainerAndSections=function(_c08){ if(!_c08){ return _c08; } this.m_cachedPFContainer=_c08; var _c09=getElementsByAttribute(this.m_cachedPFContainer,"div","pflid",this.m_lidNS); this.m_sectionCache={}; for(var i=0;i<_c09.length;++i){ var key=_c09[i].getAttribute("pfslid"); key=key.split("_",1); this.m_sectionCache[key]=_c09[i]; } return _c08; }; PinFreezeContainer.prototype.getContainer=function(){ return this.m_cachedPFContainer; }; PinFreezeContainer.prototype.getSection=function(key){ if(!this.m_sectionCache){ return null; } if(!this.m_sectionCache[key]){ this.m_sectionCache[key]=this.getSectionByLID(this.m_cachedPFContainer,key); } return this.m_sectionCache[key]; }; PinFreezeContainer.prototype.initializeHomeCellTabIndex=function(_c0d){ var slid=PinFreezeContainer.nodeToSlid(_c0d); if(!this.m_homeCellNodes[slid]){ var _c0f=getElementsByAttribute(_c0d,"*","tabIndex","*"); for(var i in _c0f){ if(!_c0f[i].getAttribute("widgetid")){ this.m_homeCellNodes[slid]=_c0f[i]; break; } } } }; PinFreezeContainer.prototype.updateTabIndexValues=function(){ if(this.isContainerFrozen()){ for(var slid in this.m_homeCellNodes){ var _c12=this.m_pinFreezeManager.isNodeVisible(this.m_homeCellNodes[slid])?"0":"-1"; this.m_homeCellNodes[slid].setAttribute("tabIndex",_c12); } }else{ for(var slid in this.m_homeCellNodes){ var _c12=(PinFreezeContainer.getSectionNameFromSlid(slid)==="pfMainOutput")?"0":"-1"; this.m_homeCellNodes[slid].setAttribute("tabIndex",_c12); } } }; PinFreezeContainer.prototype.getSectionHomeCell=function(_c13){ if(_c13){ var _c14=this.getElementByLID(_c13,"table",this.m_lid+this.m_viewerId); if(_c14&&_c14.rows.length&&_c14.rows[0].cells.length){ return _c14.rows[0].cells[0]; } } return null; }; PinFreezeContainer.prototype.getMainOutputHomeCell=function(){ var _c15=this.getSection("pfMainOutput"); if(!_c15){ _c15=this.getSectionByLID(this.m_cachedPFContainer,"pfMainOutput"); } return this.getSectionHomeCell(_c15); }; PinFreezeContainer.prototype.getChildPosition=function(_c16,_c17){ for(var i=0;i<_c16.childNodes.length;++i){ if(_c16.childNodes[i]==_c17){ return i; } } return -1; }; PinFreezeContainer.prototype.insertAt=function(_c19,_c1a,_c1b){ if(_c1b==_c19.childNodes.length){ _c19.appendChild(_c1a); }else{ _c19.insertBefore(_c1a,_c19.childNodes[_c1b]); } }; PinFreezeContainer.prototype.synchScroll=function(){ if(!this.m_cachedPFContainer){ return; } var _c1c=this.getMainOutputHomeCell(); var _c1d=this.getSection("pfMainOutput"); var _c1e=this.getSection("pfSideHeadings"); if(_c1e!=null){ var _c1f=this.getSection("pfHorizontalScrollBar"); if(_c1f){ var _c20=this.getSideHeadingSectionWidth(_c1c); if(getElementDirection(_c1d)==="rtl"){ _c20=0; } setScrollLeft(_c1d,getScrollLeft(_c1f)+_c20); if(this.m_freezeTop){ setScrollLeft(this.getSection("pfTopHeadings"),getScrollLeft(_c1f)+_c20); } } } }; PinFreezeContainer.prototype.updateScroll=function(_c21){ var slid=PinFreezeContainer.nodeToSlid(_c21); if(!slid){ return; } var _c23=PinFreezeContainer.getSectionNameFromSlid(slid); if(!_c23){ return; } var _c24=document.getElementById("CVReport"+this.m_viewerId); if(!_c24){ return; } if(!this.m_cachedPFContainer){ return; } var _c25=_c21.parentNode; if(_c25){ var _c26=_c25.tagName.toLowerCase(); if(_c26==="td"||_c26==="th"){ var _c27=this.getMainOutputHomeCell(); var _c28=this.getSection("pfMainOutput"); if(_c23==="pfMainOutput"||_c23==="pfTopHeadings"){ var _c29=this.getSection("pfHorizontalScrollBar"); if(_c29){ var _c2a=PinFreezeContainer.calculateNewPosition(_c25.offsetLeft,_c25.offsetWidth,getScrollLeft(_c28),_c28.offsetWidth); var _c2b=this.getHomeCellOffsetWidth(_c27); if(getElementDirection(_c28)==="rtl"){ _c2b=0; } setScrollLeft(_c29,_c2a-_c2b); setScrollLeft(_c28,_c2a); } } if(_c23==="pfMainOutput"||_c23==="pfSideHeadings"){ var _c2c=this.getSection("pfVerticalScrollBar"); if(_c2c){ var _c2d=PinFreezeContainer.calculateNewPosition(_c25.offsetTop,_c25.offsetHeight,_c28.scrollTop,_c28.offsetHeight); _c2c.scrollTop=_c2d-_c27.offsetHeight; _c28.scrollTop=_c2d; } } } } }; PinFreezeContainer.calculateNewPosition=function(_c2e,_c2f,_c30,_c31){ var _c32=_c2e+_c2f; var _c33=_c30+_c31; if(_c30>_c2e){ return _c2e; }else{ if(_c33<_c32){ if(_c2f>_c31){ return _c2e; } return _c32-_c31; } } return _c30; }; PinFreezeContainer.prototype.synchVScroll=function(){ if(!this.m_cachedPFContainer){ return; } var _c34=this.getMainOutputHomeCell(); var _c35=this.getSection("pfMainOutput"); var _c36=this.getSection("pfTopHeadings"); if(_c36!=null){ var _c37=this.getSection("pfVerticalScrollBar"); if(_c37){ _c35.scrollTop=_c37.scrollTop+this.getTopHeadingSectionHeight(_c34); if(this.m_freezeSide){ this.getSection("pfSideHeadings").scrollTop=_c37.scrollTop+this.getTopHeadingSectionHeight(_c34); } } } }; PinFreezeContainer.prototype.getTopHeadingSectionHeight=function(_c38){ return _c38.offsetHeight+_c38.offsetTop+this.m_containerMargin.top; }; PinFreezeContainer.prototype._findBestGuessHomeCell=function(_c39){ if(this.m_bestGuessHomeCell){ return this.m_bestGuessHomeCell; } if(_c39){ var _c3a=_c39.parentNode.parentNode; var _c3b=_c39.rowSpan?(_c39.rowSpan):1; var tr=_c3a.childNodes[_c3b]; if(tr){ var _c3d=tr.childNodes.length; var _c3e=null; var td=null; for(var i=0;i<_c3d;i++){ td=tr.childNodes[i]; if(td.getAttribute("type")=="datavalue"){ break; } _c3e=td; } if(_c3e){ this.m_bestGuessHomeCell=_c3e; return this.m_bestGuessHomeCell; } }else{ return _c39; } } return null; }; PinFreezeContainer.prototype.getHomeCellOffsetWidth=function(_c41){ var _c42=this._findBestGuessHomeCell(_c41); return _c42?_c42.offsetWidth:0; }; PinFreezeContainer.prototype.getSideHeadingSectionWidth=function(_c43){ var _c44=this._findBestGuessHomeCell(_c43); if(_c44){ return _c44.offsetWidth+_c44.offsetLeft+this.m_containerMargin.left; }else{ return _c43.offsetWidth+_c43.offsetLeft; } }; PinFreezeContainer.prototype.isContainerFrozen=function(){ return (this.m_freezeTop||this.m_freezeSide); }; PinFreezeContainer.prototype.unfreeze=function(_c45){ var _c46=this.getContainerByLID(_c45); this.m_freezeTop=false; this.m_freezeSide=false; if(_c46){ var _c47=_c46.parentNode; pfMainOutput=this.getSectionByLID(_c46,"pfMainOutput"); if(pfMainOutput&&_c47){ if(_c46.style.border!==""){ pfMainOutput.firstChild.style.border=_c46.style.border; _c46.style.border=""; } if(this.m_wrapFlag){ var _c48=pfMainOutput.firstChild.getElementsByTagName("span"); if(_c48){ for(var k=0;k<_c48.length;k++){ _c48[k].style.whiteSpace=""; } } this.m_wrapFlag=false; } this.updateTabIndexValues(); if(this.m_cachedBaseContainer.getAttribute("authoredFixedWidth")){ this.m_cachedBaseContainer.removeAttribute("authoredFixedWidth"); this.m_cachedBaseContainer.style.width="auto"; this.m_addedFixedWidth=null; } if(this.m_cachedBaseContainer.getAttribute("authoredFixedHeight")){ this.m_cachedBaseContainer.removeAttribute("authoredFixedHeight"); this.m_cachedBaseContainer.style.height="auto"; this.m_addedFixedHeight=null; } _c47.replaceChild(this.m_pinFreezeManager.deepCloneNode(pfMainOutput.firstChild),_c46); } } }; PinFreezeContainer.prototype.getBorderInfo=function(el,_c4b){ var _c4c={}; var _c4d="border-"+_c4b+"-"; var _c4e="border"+_c4b.charAt(0).toUpperCase()+_c4b.substring(1); if(el.currentStyle){ _c4c[_c4e+"Width"]=el.currentStyle[_c4e+"Width"]; _c4c[_c4e+"Style"]=el.currentStyle[_c4e+"Style"]; _c4c[_c4e+"Color"]=el.currentStyle[_c4e+"Color"]; }else{ if(window.getComputedStyle){ _c4c[_c4e+"Width"]=window.getComputedStyle(el,null).getPropertyValue(_c4d+"width"); _c4c[_c4e+"Style"]=window.getComputedStyle(el,null).getPropertyValue(_c4d+"style"); _c4c[_c4e+"Color"]=window.getComputedStyle(el,null).getPropertyValue(_c4d+"color"); }else{ return null; } } return _c4c; }; PinFreezeContainer.prototype.isA11yEnabled=function(_c4f){ return (_c4f.getAttribute("role")==="grid"); }; PinFreezeContainer.isElementInMainOutput=function(_c50){ var _c51=PinFreezeContainer.nodeToSlid(_c50); if(_c51){ return (_c51.indexOf("pfMainOutput_")===0); } return false; }; PinFreezeContainer.prototype.removeCTX=function(_c52){ _c52.removeAttribute("ctx"); var _c53=getElementsByAttribute(_c52,"*","ctx","*"); if(_c53&&_c53.length){ for(var i=0;i<_c53.length;i++){ _c53[i].removeAttribute("ctx"); } } }; PinFreezeContainer.prototype.initializeTouchScrolling=function(_c55){ if(!this.m_pinFreezeManager.isIWidgetMobile()){ return; } if(_c55){ _c55.m_pinFreezeContainer=this; if(document.attachEvent){ _c55.attachEvent("touchstart",this.touchStart); _c55.attachEvent("touchmove",this.touchMove); _c55.attachEvent("touchend",this.touchEnd); }else{ _c55.addEventListener("touchstart",this.touchStart,false); _c55.addEventListener("touchmove",this.touchMove,false); _c55.addEventListener("touchend",this.touchEnd,false); } } }; PinFreezeContainer.prototype.removeTouchScrolling=function(){ if(!this.m_pinFreezeManager.isIWidgetMobile()){ return; } this.removeTouchScrollingEvents(this.getSection("pfMainOutput")); this.removeTouchScrollingEvents(this.getSection("pfSideHeadings")); this.removeTouchScrollingEvents(this.getSection("pfTopHeadings")); }; PinFreezeContainer.prototype.removeTouchScrollingEvents=function(_c56){ if(!this.m_pinFreezeManager.isIWidgetMobile()){ return; } if(_c56){ if(document.detachEvent){ _c56.detachEvent("touchstart",this.touchStart); _c56.detachEvent("touchmove",this.touchMove); _c56.detachEvent("touchend",this.touchEnd); }else{ _c56.removeEventListener("touchstart",this.touchStart,false); _c56.removeEventListener("touchmove",this.touchMove,false); _c56.removeEventListener("touchend",this.touchEnd,false); } } }; PinFreezeContainer.prototype.touchMove=function(e){ if(this.m_pinFreezeContainer&&e&&e.changedTouches&&e.touches&&e.touches.length==1){ var _c58=e.changedTouches[0]; if(_c58&&_c58.clientX&&_c58.clientY){ var _c59=parseInt(_c58.clientX); var _c5a=parseInt(_c58.clientY); if(this.m_pinFreezeContainer.touchMoveHandler(_c59,_c5a)){ return stopEventBubble(e); } } } }; PinFreezeContainer.prototype.touchStart=function(e){ if(this.m_pinFreezeContainer&&e&&e.changedTouches&&e.touches&&e.touches.length==1){ var _c5c=e.changedTouches[0]; if(_c5c&&_c5c.clientX&&_c5c.clientY){ var _c5d=parseInt(_c5c.clientX); var _c5e=parseInt(_c5c.clientY); this.m_pinFreezeContainer.touchStartHandler(_c5d,_c5e); } } }; PinFreezeContainer.prototype.touchStartHandler=function(_c5f,_c60){ this.touchScrollSections=false; this.touchPreviousX=_c5f; this.touchPreviousY=_c60; }; PinFreezeContainer.prototype.touchEnd=function(e){ if(this.m_pinFreezeContainer&&this.m_pinFreezeContainer.touchEndHandler()){ stopEventBubble(e); } }; PinFreezeContainer.prototype.touchEndHandler=function(){ var _c62=this.touchScrollSections; this.touchScrollSections=false; this.touchPreviousX=-1; this.touchPreviousY=-1; return _c62; }; PinFreezeContainer.prototype.touchMoveHandler=function(_c63,_c64){ var _c65=this.getSection("pfMainOutput"); if(!_c65){ return; } var _c66=this.getSectionHomeCell(_c65); var _c67=this.getTopHeadingSectionHeight(_c66); var _c68=this.getSideHeadingSectionWidth(_c66); var _c69=_c64-this.touchPreviousY; var _c6a=_c63-this.touchPreviousX; if(this.touchScrollSections){ if(_c69!=0){ var _c6b=_c65.scrollTop-_c69; _c6b=(_c6b>_c67)?_c6b:_c67; _c65.scrollTop=_c6b; var _c6c=this.getSection("pfSideHeadings"); if(_c6c){ _c6c.scrollTop=_c6b; } } if(_c6a!=0){ var _c6d=_c65.scrollLeft-_c6a; _c6d=(_c6d>_c68)?_c6d:_c68; _c65.scrollLeft=_c6d; var _c6e=this.getSection("pfTopHeadings"); if(_c6e){ _c6e.scrollLeft=_c6d; } } }else{ this.firstTouchMove(_c65,_c6a,_c69,_c68,_c67); } this.touchPreviousX=_c63; this.touchPreviousY=_c64; return this.touchScrollSections; }; PinFreezeContainer.prototype.firstTouchMove=function(_c6f,_c70,_c71,_c72,_c73){ var _c74=this.mostlyVerticalTouchMove(_c70,_c71); var _c75=PinFreezeContainer.isSectionVisible(this.getSection("pfTopHeadings")); var _c76=PinFreezeContainer.isSectionVisible(this.getSection("pfSideHeadings")); if(_c74&&(!_c75||(_c71>0&&_c6f.scrollTop<=_c73)||(_c71<0&&_c6f.scrollTop+_c6f.clientHeight>=_c6f.scrollHeight))){ this.touchScrollSections=false; }else{ if(!_c74&&(!_c76||(_c70>0&&_c6f.scrollLeft<=_c72)||(_c70<0&&_c6f.scrollLeft+_c6f.clientWidth>=_c6f.scrollWidth))){ this.touchScrollSections=false; }else{ this.touchScrollSections=true; } } }; PinFreezeContainer.prototype.mostlyVerticalTouchMove=function(_c77,_c78){ var _c79=(_c77>0)?_c77:0-_c77; var _c7a=(_c78>0)?_c78:0-_c78; return (_c7a>_c79); }; PinFreezeContainer.prototype.destroy=function(){ this.removeTouchScrolling(); GUtil.destroyProperties(this); }; function PinFreezeManager(oCV){ this.m_oCV=oCV; this.m_viewerId=oCV.getId(); this.m_frozenInfo=null; this.m_lastWidthProcessed=0; this.m_lastHeightProcessed=0; this.c_resizeTweekLimit=5; this.m_repaintOnVisible=false; }; PinFreezeManager.prototype.addContainerObject=function(lid,_c7d,_c7e,_c7f,_c80){ if(_c7d||_c7e){ if(!this.m_frozenInfo){ this.m_frozenInfo={}; } if(!this.m_frozenInfo[lid]){ this._createDefaultFrozenInfo(lid); } this.m_frozenInfo[lid].freezeTop=_c7d; this.m_frozenInfo[lid].freezeSide=_c7e; var _c81=this.newContainer(lid,_c7d,_c7e,_c7f,_c80); this.m_frozenInfo[lid].pinFreezeContainers.push(_c81); return _c81; } return null; }; PinFreezeManager.prototype.newContainer=function(lid,_c83,_c84,_c85,_c86){ return new PinFreezeContainer(this,lid,this.m_viewerId,_c83,_c84,_c85,_c86); }; PinFreezeManager.prototype.clearPinInfo=function(lid){ if(!this.m_frozenInfo){ return; } if(lid){ if(this.m_frozenInfo[lid]){ delete this.m_frozenInfo[lid]; } }else{ delete this.m_frozenInfo; this.m_frozenInfo=null; } }; PinFreezeManager.prototype._createDefaultFrozenInfo=function(lid){ this.m_frozenInfo[lid]={"lid":lid,"freezeTop":false,"freezeSide":false,"pinFreezeContainers":[],"childContainers":{}}; }; PinFreezeManager.prototype._resetFrozenInfo=function(lid){ var _c8a=this.m_frozenInfo[lid]; if(_c8a){ delete _c8a.pinFreezeContainers; _c8a.pinFreezeContainers=[]; _c8a.freezeTop=false; _c8a.freezeSide=false; } }; PinFreezeManager.prototype.prepopulateFrozenInfo=function(_c8b){ var _c8c=getDescendantElementsByAttribute(_c8b,"table","lid","",false,-1,new RegExp("[\\s\\S]*")); if(_c8c){ if(!this.m_frozenInfo){ this.m_frozenInfo={}; } for(var i=0;i<_c8c.length;i++){ var _c8e=_c8c[i]; if(_c8e.getAttribute("id")=="rt"+this.m_viewerId){ continue; } var lid=this.removeNamespace(_c8e.getAttribute("lid")); if(this.m_frozenInfo[lid]&&this.m_frozenInfo[lid].childContainers){ continue; } if(!this.m_frozenInfo[lid]){ this._createDefaultFrozenInfo(lid); } if(!this.m_frozenInfo[lid].childContainers){ this.m_frozenInfo[lid].childContainers={}; } var _c90=getDescendantElementsByAttribute(_c8e,"table","lid","",false,-1,new RegExp("[\\s\\S]*")); if(_c90){ for(var _c91=0;_c91<_c90.length;_c91++){ var _c92=_c90[_c91]; var _c93=this.removeNamespace(_c92.getAttribute("lid")); if(!this.m_frozenInfo[lid].childContainers[_c93]){ var _c94=_c92.parentNode; while(_c94&&!_c94.getAttribute("lid")){ _c94=_c94.parentNode; } if(_c94&&this.removeNamespace(_c94.getAttribute("lid"))==lid){ this.m_frozenInfo[lid].childContainers[_c93]=true; } } } } } this._updateParentContainerInfo(); } }; PinFreezeManager.prototype._updateParentContainerInfo=function(){ for(var _c95 in this.m_frozenInfo){ var _c96=this.m_frozenInfo[_c95].childContainers; if(_c96){ for(var _c97 in _c96){ if(this.m_frozenInfo[_c97]){ this.m_frozenInfo[_c97].parentContainer=_c95; break; } } } } }; PinFreezeManager.prototype.getTopLevelContainerLID=function(lid){ if(this.m_frozenInfo[lid]){ while(this.m_frozenInfo[lid].parentContainer){ lid=this.m_frozenInfo[lid].parentContainer; } } return lid; }; PinFreezeManager.prototype.freezeContainer=function(lid,_c9a,_c9b){ var _c9c=document.getElementById("CVReport"+this.m_viewerId); this.prepopulateFrozenInfo(_c9c); var _c9d=this.getTopLevelContainerLID(lid); this.unfreezeAllNestedContainers(_c9d,_c9c); this.m_frozenInfo[lid].freezeTop=_c9a; this.m_frozenInfo[lid].freezeSide=_c9b; var _c9e=this._createPinAndFreezeObject(_c9c,_c9d); this.m_lastWidthProcessed=0; this.m_lastHeightProcessed=0; this._resizePinFreezeObjects(_c9e); this.sectionStructureChange(); if(isIE()){ var obj=this; setTimeout(function(){ obj.refresh(); },1); var _ca0=document.getElementById("RVContent"+this.m_viewerId); this.m_oCV.repaintDiv(_ca0); } return _c9e; }; PinFreezeManager.prototype.getInitialWidthThreshold=function(){ return document.body.clientWidth*3/4; }; PinFreezeManager.prototype.getInitialHeightThreshold=function(){ return document.body.clientWidth*9/10; }; PinFreezeManager.prototype.hasFrozenContainers=function(){ return ((this.m_frozenInfo)?true:false); }; PinFreezeManager.prototype.hasFrozenRowHeadings=function(lid){ if(this.m_frozenInfo&&this.m_frozenInfo[lid]){ return this.m_frozenInfo[lid].freezeSide?this.m_frozenInfo[lid].freezeSide:false; } return false; }; PinFreezeManager.prototype.hasFrozenColumnHeadings=function(lid){ if(this.m_frozenInfo&&this.m_frozenInfo[lid]){ return this.m_frozenInfo[lid].freezeTop?this.m_frozenInfo[lid].freezeTop:false; } return false; }; PinFreezeManager.prototype.removeNamespace=function(idNS){ if(idNS.length>this.m_viewerId.length){ if(idNS.indexOf(this.m_viewerId)>0){ return idNS.substring(0,idNS.indexOf(this.m_viewerId)); } } return idNS; }; PinFreezeManager.prototype.getContainer=function(lid,_ca5){ if(this.m_frozenInfo&&this.m_frozenInfo[lid]&&this.m_frozenInfo[lid].pinFreezeContainers[0]){ _ca5=_ca5?_ca5:0; return this.m_frozenInfo[lid].pinFreezeContainers[_ca5]; } return null; }; PinFreezeManager.prototype.nodeToContainer=function(node){ var slid=PinFreezeContainer.nodeToSlid(node); var _ca8=null; if(slid){ var lid=this.removeNamespace(PinFreezeContainer.getLidFromSlid(slid)); _ca8=this.getContainer(lid); } return _ca8; }; PinFreezeManager.prototype.getContainerElement=function(_caa){ var lid=this.removeNamespace(_caa.getAttribute("lid")); if(lid){ var _cac=this.getContainer(lid); if(_cac){ return _cac.getContainer(); } } return null; }; PinFreezeManager.prototype._createPinAndFreezeObject=function(_cad,lid){ var _caf=null; if(this.m_frozenInfo){ var _cb0=this.m_frozenInfo[lid]; var _cb1=_cb0.initialLoad; if(_cb1){ delete _cb0.initialLoad; } var _cb2=_cb0.freezeTop; var _cb3=_cb0.freezeSide; var _cb4=null; if(_cb1&&_cb0.pinFreezeContainers&&(_cb2||_cb3)){ _cb4=_cb0.pinFreezeContainers.slice(0); } var _cb5=_cad; if(_cb0&&_cb0.parentContainer){ var _cb6=getElementsByAttribute(_cad,"table","lid",_cb0.parentContainer+this.m_viewerId); if(_cb6){ for(parentIndex=0;parentIndex<_cb6.length;parentIndex++){ if(!_cb6[parentIndex].getAttribute("clonednode")){ _cb5=_cb6[parentIndex]; break; } } } } if(_cb0.childContainers){ for(var _cb7 in _cb0.childContainers){ var _cb8=this._createPinAndFreezeObject(_cb5,_cb7); _caf=_caf?_caf:_cb8; } } var _cb9=getElementsByAttribute(_cb5,"table","lid",lid+this.m_viewerId); if(_cb9&&_cb9.length>0){ delete _cb0.pinFreezeContainers; _cb0.pinFreezeContainers=[]; }else{ return null; } if(_cb9&&(_cb2||_cb3)){ var _cba=(_caf!==null); for(var i=0;i<_cb9.length;i++){ var _cbc=_cb9[i]; if(_cbc.getAttribute("clonednode")=="true"){ continue; } _caf=this.addContainerObject(lid,_cb2,_cb3,_cbc,i); if(_caf){ _caf.createPFContainer(_cb5,_cba); if(_cb1){ _caf.copyProperties(_cb4[0]); } _caf.freezeContainerInReport(_cad); } } } } return _caf; }; PinFreezeManager.prototype.renderReportWithFrozenContainers=function(_cbd){ if(this.m_frozenInfo){ var _cbe=false; var _cbf=null; for(var _cc0 in this.m_frozenInfo){ var _cc1=this.m_frozenInfo[_cc0]; if(!_cbe){ _cbe=_cc1.initialLoad; } if(!_cc1.parentContainer){ var temp=this._createPinAndFreezeObject(_cbd,_cc1.lid); _cbf=_cbf?_cbf:temp; } } if(!_cbe&&_cbf){ this._resizePinFreezeObjects(_cbf); } this.refresh(); } }; PinFreezeManager.prototype._resizePinFreezeObjects=function(_cc3){ var _cc4,_cc5; var _cc6=this.m_oCV.getViewerWidget(); if(_cc6){ var size=_cc6.getWidgetSize(); _cc5=(size&&size.w&&(size.w2)?_cca:0; var _ccf=(Math.abs(_ccb-this.m_lastHeightProcessed)>2)?_ccb:0; for(var lid in this.m_frozenInfo){ if(!this.m_frozenInfo[lid].parentContainer){ this.resizeContainer(lid,_cce,_ccf); } } this.m_lastWidthProcessed=_cca; this.m_lastHeightProcessed=_ccb; }; PinFreezeManager.prototype.resizeContainer=function(lid,_cd2,_cd3){ var _cd4=this.m_frozenInfo[lid]; if(_cd4){ var _cd5=null; if(_cd4.childContainers){ var _cd6=_cd2>10?_cd2-10:_cd2; var _cd7=_cd3>10?_cd3-10:_cd3; for(var _cd8 in _cd4.childContainers){ _cd5=this.resizeContainer(_cd8,_cd6,_cd7); } } var _cd9=_cd4.pinFreezeContainers; var _cda=null; var _cdb=null; if(_cd9){ for(var i=0;i<_cd9.length;i++){ _cda=_cd9[i]; _cda.resize(_cd2,_cd3,_cd4.parentContainer,_cd5); var _cdd=_cda.getContainer(); if(_cdd&&(!_cdb||(_cdb.width<_cdd.clientWidth))){ _cdb={"width":_cdd.clientWidth,"lid":_cda.m_lidNS}; } } } return _cdb; } }; PinFreezeManager.prototype.processAutoResize=function(_cde,_cdf){ this.m_lastWidthProcessed=_cde; this.m_lastHeightProcessed=_cdf; }; PinFreezeManager.prototype.onSetVisible=function(){ this.refresh(); if(this.m_repaintOnVisible){ this.rePaint(); this.m_repaintOnVisible=false; } }; PinFreezeManager.prototype.onResizeCanvas=function(_ce0){ if(_ce0){ this.rePaint(); }else{ this.m_repaintOnVisible=true; } }; PinFreezeManager.prototype.rePaint=function(){ for(var lid in this.m_frozenInfo){ if(!this.m_frozenInfo[lid].parentContainer){ this.resizeContainer(lid,this.m_lastWidthProcessed,this.m_lastHeightProcessed); } } }; PinFreezeManager.prototype.refresh=function(){ for(var _ce2 in this.m_frozenInfo){ var _ce3=this.m_frozenInfo[_ce2].pinFreezeContainers; if(_ce3){ for(var i=0;i<_ce3.length;i++){ var _ce5=_ce3[i]; _ce5.synchScroll(); _ce5.synchVScroll(); } } } }; PinFreezeManager.prototype.freezeContainerRowHeadings=function(lid){ return this.freezeContainer(lid,this.hasFrozenColumnHeadings(lid),true); }; PinFreezeManager.prototype.freezeSelectedRowHeadings=function(){ var lid=this.getValidSelectedContainerId(false); if(lid){ this.m_oCV.getSelectionController().resetSelections(); return this.freezeContainerRowHeadings(lid); } return null; }; PinFreezeManager.prototype.canFreezeSelectedRowHeadings=function(){ var lid=this.getValidSelectedContainerId(false); if(lid){ return (!this.hasFrozenRowHeadings(lid)); } return false; }; PinFreezeManager.prototype.unfreezeContainerRowHeadings=function(lid){ this.freezeContainer(lid,this.hasFrozenColumnHeadings(lid),false); }; PinFreezeManager.prototype.unfreezeSelectedRowHeadings=function(){ var lid=this.getValidSelectedContainerId(false); if(lid){ this.m_oCV.getSelectionController().resetSelections(); this.unfreezeContainerRowHeadings(lid); } }; PinFreezeManager.prototype.canUnfreezeSelectedRowHeadings=function(){ var lid=this.getValidSelectedContainerId(false); if(lid){ return (this.hasFrozenRowHeadings(lid)); } return false; }; PinFreezeManager.prototype.freezeContainerColumnHeadings=function(lid){ return this.freezeContainer(lid,true,this.hasFrozenRowHeadings(lid)); }; PinFreezeManager.prototype.freezeSelectedColumnHeadings=function(){ var lid=this.getValidSelectedContainerId(true); if(lid){ this.m_oCV.getSelectionController().resetSelections(); return this.freezeContainerColumnHeadings(lid); } return null; }; PinFreezeManager.prototype.canFreezeSelectedColumnHeadings=function(){ var lid=this.getValidSelectedContainerId(true); if(lid){ return (!this.hasFrozenColumnHeadings(lid)); } return false; }; PinFreezeManager.prototype.unfreezeContainerColumnHeadings=function(lid){ this.freezeContainer(lid,false,this.hasFrozenRowHeadings(lid)); }; PinFreezeManager.prototype.unfreezeSelectedColumnHeadings=function(){ var lid=this.getValidSelectedContainerId(true); if(lid){ this.m_oCV.getSelectionController().resetSelections(); this.unfreezeContainerColumnHeadings(lid); } }; PinFreezeManager.prototype.canUnfreezeSelectedColumnHeadings=function(){ var lid=this.getValidSelectedContainerId(true); if(lid){ return (this.hasFrozenColumnHeadings(lid)); } return false; }; PinFreezeManager.prototype.getValidSelectedContainerId=function(_cf2){ var _cf3=this.m_oCV.getSelectionController().getAllSelectedObjects(); if(_cf3&&_cf3.length&&(_cf3[0].getDataContainerType()==="crosstab"||(_cf2&&_cf3[0].getDataContainerType()==="list"))){ var lid=(_cf3[0].getLayoutElementId()); if(lid){ if(!this.hasPromptControlsInFreezableCells(lid)){ return this.removeNamespace(lid); } } } return null; }; PinFreezeManager.prototype.hasPromptControlsInFreezableCells=function(lid){ var _cf6=this.m_oCV.getLayoutElementFromLid(lid); var _cf7=getElementsByAttribute(_cf6,["td","th"],"type","columnTitle"); var _cf8=new RegExp("(^|[W])clsPromptComponent($|[W])"); var _cf9=isIE()?"className":"class"; for(var j in _cf7){ if(_cf7.hasOwnProperty(j)){ var _cfb=getElementsByAttribute(_cf7[j],"*",_cf9,null,1,_cf8); if(_cfb.length>0){ return true; } } } return false; }; PinFreezeManager.prototype.unfreeze=function(lid,_cfd,_cfe){ if(this.m_frozenInfo&&this.m_frozenInfo[lid]){ var _cff=this.m_frozenInfo[lid].pinFreezeContainers; if(_cff){ for(var i=0;i<_cff.length;i++){ var _d01=_cff[i]; _d01.unfreeze(_cfd); } if(_cfe){ this._resetFrozenInfo(lid); } } } }; PinFreezeManager.prototype.unfreezeAllNestedContainers=function(lid,_d03){ var _d04=this.m_frozenInfo[lid]; if(_d04){ if(_d04.freezeTop||_d04.freezeSide){ this.unfreeze(lid,_d03,false); } if(_d04.childContainers){ for(var _d05 in _d04.childContainers){ this.unfreezeAllNestedContainers(_d05,_d03); } } } }; PinFreezeManager.prototype.isNodeVisible=function(node){ var slid=PinFreezeContainer.nodeToSlid(node); if(!slid){ return true; } var lid=this.removeNamespace(PinFreezeContainer.getLidFromSlid(slid)); var _d09=this.getContainer(lid); if(!_d09){ return true; } var _d0a=PinFreezeContainer.getSectionNameFromSlid(slid); var _d0b=_d09.getSection(_d0a); var _d0c=null,_d0d=null; var _d0e=node; var _d0f=null; while(_d0e&&_d0e!==_d0b&&!_d0c&&!_d0d){ _d0c=_d09.getMain(_d0e); _d0d=_d09.getCopy(_d0e); _d0f=_d0e; _d0e=_d0e.parentNode; } var _d10=_d0c?true:false; var _d11=_d0d?true:false; if(_d10){ return _d09.getCopy(_d0c)===_d0f; }else{ if(_d11){ return _d09.getCopy(_d0f)?false:true; }else{ return true; } } }; PinFreezeManager.prototype.sectionStructureChange=function(){ var _d12=this.m_oCV.getViewerWidget(); if(_d12&&_d12.getAnnotationHelper()){ _d12.getAnnotationHelper().repositionCommentIndicators(); } }; PinFreezeManager.prototype.deepCloneNode=function(_d13){ var copy=_d13.cloneNode(true); var _d15=this.m_oCV.getViewerWidget(); if(_d15){ if(_d15.reportContainsDijits()){ var _d16=getElementsByAttribute(copy,"*","widgetid","*"); if(_d16&&_d16.length){ for(var i=0;i<_d16.length;i++){ _d16[i].parentNode.removeChild(_d16[i]); } } } } return copy; }; PinFreezeManager.prototype.toJSONString=function(){ var _d18=""; var _d19=""; for(var _d1a in this.m_frozenInfo){ if(_d18.length>0){ _d18+=","; } var _d1b=this.m_frozenInfo[_d1a]; _d18+="{"; _d18+="\"lid\":\""+_d1b.lid.replace("\"","\\\"")+"\","; _d18+="\"freezeTop\":"+_d1b.freezeTop+","; _d18+="\"freezeSide\":"+_d1b.freezeSide+","; if(_d1b.parentContainer){ _d18+="\"parentContainer\":\""+_d1b.parentContainer+"\","; } if(_d1b.pinFreezeContainers&&_d1b.pinFreezeContainers.length>0){ _d18+="\"properties\":"+_d1b.pinFreezeContainers[0].toJSONString()+","; } _d18+="\"childContainers\": {"; if(_d1b.childContainers){ var _d1c=true; for(var _d1d in _d1b.childContainers){ if(!_d1c){ _d18+=","; } _d18+="\""+_d1d+"\":true"; _d1c=false; } } _d18+="}}"; } if(_d18.length>0){ _d19="{\"version\":1, \"containers\":["+_d18+"]}"; } return _d19; }; PinFreezeManager.prototype.fromJSONString=function(_d1e){ if(!_d1e||_d1e.length===0){ return; } var _d1f=null; try{ _d1f=eval("("+_d1e+")"); } catch(e){ if(typeof console!="undefined"){ console.log("PinFreezeManager.prototype.fromJSON could not parse JSON - "+_d1e); console.log(e); } } if(!_d1f){ return; } var _d20=_d1f.containers; var _d21=_d1f.version; if(_d20.length>0){ this.m_frozenInfo={}; } for(var _d22=0;_d22<_d20.length;_d22++){ var _d23=_d20[_d22]; var lid=_d23.lid; var _d25=_d23.freezeTop; var _d26=_d23.freezeSide; var _d27=document.getElementById("CVReport"+this.m_viewerId); var _d28=getElementsByAttribute(_d27,"table","lid",lid+this.m_viewerId); var _d29=[]; if(_d28&&(_d25||_d26)){ for(var i=0;i<_d28.length;i++){ var _d2b=_d28[i]; var _d2c=new PinFreezeContainer(this,lid,this.m_viewerId,_d23.freezeTop,_d23.freezeSide,_d2b,i); if(_d23.properties){ applyJSONProperties(_d2c,_d23.properties); } _d29.push(_d2c); } } this.m_frozenInfo[lid]={"lid":lid,"freezeTop":_d25,"freezeSide":_d26,"pinFreezeContainers":_d29,"initialLoad":true}; if(_d21>=1){ if(_d23.childContainers){ this.m_frozenInfo[lid].childContainers=_d23.childContainers; } if(_d23.parentContainer){ this.m_frozenInfo[lid].parentContainer=_d23.parentContainer; } } } }; PinFreezeManager.prototype.removeIdAttribute=function(_d2d){ var _d2e=_d2d.getAttribute("id"); if(_d2e!==null&&_d2e!==""){ _d2d.removeAttribute("id"); } var _d2f=getElementsByAttribute(_d2d,"*","id","*"); if(_d2f&&_d2f.length){ for(var i=0;i<_d2f.length;i++){ _d2f[i].removeAttribute("id"); } } return _d2d; }; PinFreezeManager.prototype.isElementInMainOutput=function(_d31){ return PinFreezeContainer.isElementInMainOutput(_d31); }; PinFreezeManager.prototype.isIWidgetMobile=function(){ return (this.m_oCV&&this.m_oCV.isIWidgetMobile()); }; PinFreezeManager.prototype.destroy=function(){ GUtil.destroyProperties(this); }; function AuthoredDrillAction(){ this.m_drillTargetSpecification=""; }; AuthoredDrillAction.prototype=new CognosViewerAction(); AuthoredDrillAction.prototype.setRequestParms=function(_d32){ this.m_drillTargetSpecification=_d32; }; AuthoredDrillAction.prototype.executeDrillTarget=function(_d33){ var _d34=XMLHelper_GetFirstChildElement(XMLBuilderLoadXMLFromString(_d33)); var _d35=encodeURIComponent(_d34.getAttribute("bookmarkRef")); var _d36=_d34.getAttribute("path"); var _d37=this._shouldShowInNewWindow(_d34); var oCV=this.getCognosViewer(); if((_d35!==null&&_d35!=="")&&(_d36===null||_d36==="")){ var _d39=_d34.getAttribute("bookmarkPage"); if(_d39&&_d39!==""){ oCV.executeAction("GotoPage",{"pageNumber":_d39,"anchorName":_d35}); }else{ document.location="#"+_d35; } }else{ var _d3a=""; if(_d37){ _d3a="_blank"; } var _d3b=[]; var _d3c=[]; _d3c.push("obj"); _d3c.push(_d36); _d3b[_d3b.length]=_d3c; var _d3d=false; var _d3e,_d3f,_d40,_d41,sNil; var _d43=XMLHelper_FindChildrenByTagName(_d34,"drillParameter",false); for(var _d44=0;_d44<_d43.length;++_d44){ _d3e=[]; _d3f=_d43[_d44]; _d40=_d3f.getAttribute("value"); _d41=_d3f.getAttribute("name"); if(_d40!==null&&_d40!==""){ _d3e.push("p_"+_d41); _d3e.push(this.buildSelectionChoicesSpecification(_d3f)); } sNil=_d3f.getAttribute("nil"); if(sNil!==null&&sNil!==""){ _d3e.push("p_"+_d41); _d3e.push(this.buildSelectionChoicesNilSpecification()); } if(_d3e.length>0){ _d3b[_d3b.length]=_d3e; } if(!_d3d){ var _d45=_d3f.getAttribute("propertyToPass"); _d3d=(_d45&&_d45.length>0)?true:false; } } var _d46=_d34.getAttribute("method"); var _d47=_d34.getAttribute("outputFormat"); var _d48=_d34.getAttribute("outputLocale"); var _d49=_d34.getAttribute("prompt"); var _d4a=_d34.getAttribute("dynamicDrill"); var _d4b=this.getXMLNodeAsString(_d34,"parameters"); var _d4c=this.getXMLNodeAsString(_d34,"objectPaths"); var _d4d=oCV.getId(); var _d4e=document.forms["formWarpRequest"+_d4d]; var _d4f=oCV.getAdvancedServerProperty("VIEWER_JS_CALL_FORWARD_DRILLTHROUGH_TO_SELF"); if((!_d4f||_d4f.toLowerCase()!=="false")&&_d49!="true"&&this.isSameReport(_d4e,_d36)&&this.isSameReportFormat(_d47)&&!_d37&&!_d3d){ var _d50=new ViewerDispatcherEntry(oCV); _d50.addFormField("ui.action","forward"); if(oCV!==null&&typeof oCV.rvMainWnd!="undefined"){ oCV.rvMainWnd.addCurrentReportToReportHistory(); var _d51=oCV.rvMainWnd.saveReportHistoryAsXML(); _d50.addFormField("cv.previousReports",_d51); } for(_d44=0;_d44<_d43.length;++_d44){ _d3e=[]; _d3f=_d43[_d44]; _d40=_d3f.getAttribute("value"); _d41=_d3f.getAttribute("name"); sNil=_d3f.getAttribute("nil"); if((sNil===null||sNil==="")&&(_d40===null||_d40==="")){ _d3e.push("p_"+_d41); _d3e.push(this.buildSelectionChoicesNilSpecification()); } if(_d3e.length>0){ _d3b[_d3b.length]=_d3e; } } for(_d44=1;_d44<_d3b.length;_d44++){ _d50.addFormField(_d3b[_d44][0],_d3b[_d44][1]); } _d50.addFormField("_drillThroughToSelf","true"); if(oCV.m_tabsPayload&&oCV.m_tabsPayload.tabs){ _d50.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",oCV.m_tabsPayload.tabs[0].id); } oCV.setUsePageRequest(true); oCV.dispatchRequest(_d50); if(typeof oCV.m_viewerFragment=="undefined"){ var _d52=getCognosViewerObjectRefAsString(_d4d); setTimeout(_d52+".getRequestIndicator().show()",10); } }else{ doSingleDrill(_d3a,_d3b,_d46,_d47,_d48,_d35,_d4b,_d4c,this.getCognosViewer().getId(),_d49,_d4a); } } }; AuthoredDrillAction.prototype._shouldShowInNewWindow=function(_d53){ return _d53.getAttribute("showInNewWindow")=="true"; }; AuthoredDrillAction.prototype.isSameReport=function(_d54,_d55){ if(_d54["ui.object"]&&_d55==_d54["ui.object"].value){ return true; } return false; }; AuthoredDrillAction.prototype.isSameReportFormat=function(_d56){ var _d57=this.getCognosViewer().envParams["run.outputFormat"]; if(_d57){ if(_d56==_d57){ return true; }else{ if(_d57=="HTML"&&_d56=="HTMLFragment"){ return true; } } } return false; }; AuthoredDrillAction.prototype.getXMLNodeAsString=function(_d58,_d59){ var sXML=""; if(_d58!=null){ var node=XMLHelper_FindChildByTagName(_d58,_d59,false); if(node!=null){ sXML=XMLBuilderSerializeNode(node); } } return sXML; }; AuthoredDrillAction.prototype.execute=function(_d5c){ if(this.m_drillTargetSpecification!=""){ this.executeDrillTarget(this.m_drillTargetSpecification); }else{ if(typeof _d5c!="undefined"){ var _d5d=this.getCognosViewer().getDrillTargets(); var _d5e=this.getAuthoredDrillThroughContext(_d5c,_d5d); var _d5f=_d5e.childNodes; if(_d5f.length==1){ this.executeDrillTarget(XMLBuilderSerializeNode(_d5f[0])); }else{ doMultipleDrills(XMLBuilderSerializeNode(_d5e),this.getCognosViewer().getId()); } } } }; AuthoredDrillAction.prototype.showDrillTargets=function(_d60){ var _d61=""; for(var _d62=0;_d62<_d60.length;++_d62){ var _d63=_d60[_d62]; _d61+=""; var _d64=_d63.getAttribute("label"); _d61+=""; _d61+=sXmlEncode(_d64); _d61+=""; var _d65=_d63.getAttribute("path"); _d61+=""; _d61+=sXmlEncode(_d65); _d61+=""; var _d66=_d63.getAttribute("method"); _d61+=""; _d61+=sXmlEncode(_d66); _d61+=""; var _d67=_d63.getAttribute("outputFormat"); _d61+=""; _d61+=sXmlEncode(_d67); _d61+=""; var _d68="parent."+this.getTargetReportRequestString(_d63); _d61+=""; _d61+=sXmlEncode(_d68); _d61+=""; _d61+=""; } _d61+=""; }; AuthoredDrillAction.prototype.populateContextMenu=function(_d69){ var _d6a=this.getCognosViewer(); var _d6b=_d6a.rvMainWnd.getToolbarControl(); var _d6c=null; if(typeof _d6b!="undefined"&&_d6b!=null){ var _d6d=_d6b.getItem("goto"); if(_d6d){ _d6c=_d6d.getMenu(); } } var _d6e=_d6a.rvMainWnd.getContextMenu(); var _d6f=null; if(typeof _d6e!="undefined"&&_d6e!=null){ _d6f=_d6e.getGoToMenuItem().getMenu(); } if(_d6c!=null||_d6f!=null){ var _d70=this.getCognosViewer().getDrillTargets(); var _d71=this.getAuthoredDrillThroughContext(_d69,_d70); var _d72=_d71.childNodes; if(_d72.length>0){ for(var _d73=0;_d73<_d72.length;++_d73){ var _d74=_d72[_d73]; var _d75=getCognosViewerObjectRefAsString(this.getCognosViewer().getId())+".m_oDrillMgr.executeAuthoredDrill(\""+encodeURIComponent(XMLBuilderSerializeNode(_d74))+"\");"; var _d76=this.getTargetReportIconPath(_d74); var _d77=_d74.getAttribute("label"); if(isViewerBidiEnabled()){ var bidi=BidiUtils.getInstance(); _d77=bidi.btdInjectUCCIntoStr(_d77,getViewerBaseTextDirection()); } if(_d6c!=null){ new CMenuItem(_d6c,_d77,_d75,_d76,gMenuItemStyle,_d6a.getWebContentRoot(),_d6a.getSkin()); } if(_d6f!=null){ new CMenuItem(_d6f,_d77,_d75,_d76,gMenuItemStyle,_d6a.getWebContentRoot(),_d6a.getSkin()); } } } } }; AuthoredDrillAction.prototype.buildSelectionChoicesNilSpecification=function(){ return ""; }; AuthoredDrillAction.prototype.buildSelectionChoicesSpecification=function(_d79){ var _d7a=""; var _d7b=_d79.getAttribute("value"); if(_d7b!=null){ var _d7c=_d79.getAttribute("propertyToPass"); _d7a+="")!=-1){ _d7a+=_d7b.substring(_d7b.indexOf("")+15); }else{ if(_d7b!=""){ _d7a+="=_d9f.length){ continue; } var _daa=_d9f[_da9]; if(typeof _daa!="object"){ continue; } _da6.setAttribute("outputFormat",_daa.getOutputFormat()); _da6.setAttribute("outputLocale",_daa.getOutputLocale()); _da6.setAttribute("prompt",_daa.getPrompt()); _da6.setAttribute("dynamicDrill",_daa.isDynamicDrillThrough()?"true":"false"); var _dab=_da3[_da5].getAttribute("label"); if(_dab===null||_dab===""){ _dab=_daa.getLabel(); } _da6.setAttribute("label",_dab); _da6.setAttribute("path",_daa.getPath()); _da6.setAttribute("showInNewWindow",_daa.getShowInNewWindow()); _da6.setAttribute("method",_daa.getMethod()); var _dac=_da2; var _dad=""; var _dae=_daa.getParameterProperties(); if(typeof _dae!="undefined"&&_dae!=null&&_dae!=""){ _dad=XMLHelper_GetFirstChildElement(XMLBuilderLoadXMLFromString(_daa.getParameterProperties())); } while(_dac){ var _daf=_dac.childNodes[_da5].childNodes; for(var _db0=0;_db0<_daf.length;++_db0){ var _db1=_daf[_db0].cloneNode(true); if(_dad){ var _db2=this.getPropertyToPass(_db1.getAttribute("name"),_dad); if(_db2!=null&&_db2!=""){ _db1.setAttribute("propertyToPass",_db2); } } _da6.appendChild(_db1); } _dac=_dac.nextSibling; } var _db3=""; var _db4=""; var _db5=_db3+_daa.getParameters()+_db4; var _db6=XMLBuilderLoadXMLFromString(_db5); var _db7=XMLHelper_GetFirstChildElement(XMLHelper_GetFirstChildElement(_db6)); if(_db7){ _da6.appendChild(_db7.cloneNode(true)); } var _db8=_db3+_daa.getObjectPaths()+_db4; var _db9=XMLBuilderLoadXMLFromString(_db8); _db7=XMLHelper_GetFirstChildElement(XMLHelper_GetFirstChildElement(_db9)); if(_db7){ _da6.appendChild(_db7.cloneNode(true)); } } return XMLHelper_GetFirstChildElement(_da4); }; 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(_dba){ this.m_headers=_dba; }; XmlHttpObject.prototype.getHeaders=function(){ return this.m_headers; }; XmlHttpObject.prototype.newRequest=function(){ var _dbb=new XmlHttpObject(); _dbb.init(this.m_action,this.m_gateway,this.m_url,this.m_asynch); this.executeHttpCallback("newRequest"); return _dbb; }; 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(_dbc){ if(this.m_httpCallbacks&&this.m_httpCallbacks[_dbc]){ var _dbd=this.concatResponseArguments(this.m_httpCallbacks.customArguments); var _dbe=GUtil.generateCallback(this.m_httpCallbacks[_dbc].method,_dbd,this.m_httpCallbacks[_dbc].object); _dbe(); return true; } return false; }; XmlHttpObject.prototype.setCallbacks=function(_dbf){ if(!this.m_httpCallbacks){ this.m_httpCallbacks={}; } for(callback in _dbf){ this.m_httpCallbacks[callback]=_dbf[callback]; } }; XmlHttpObject.prototype.getCallbacks=function(){ return this.m_httpCallbacks; }; XmlHttpObject.createRequestObject=function(){ var _dc0=null; if(window.XMLHttpRequest){ _dc0=new XMLHttpRequest(); }else{ if(window.ActiveXObject){ _dc0=new ActiveXObject("Msxml2.XMLHTTP"); }else{ } } return _dc0; }; XmlHttpObject.prototype.waitForXmlHttpResponse=function(){ var _dc1=this.xmlHttp; if(_dc1&&_dc1.readyState===4){ if(_dc1.status===200){ this.httpSuccess(); }else{ this.httpError(); } }else{ } }; XmlHttpObject.prototype.init=function(_dc2,_dc3,url,_dc5){ this.m_action=_dc2; this.m_gateway=_dc3; this.m_url=url; this.m_asynch=_dc5; }; 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(_dc6,_dc7,url,_dc9){ var _dca=this.xmlHttp; if(_dca){ _dca.open(_dc6,_dc7,_dc9); if(_dc9){ _dca.onreadystatechange=GUtil.generateCallback(this.waitForXmlHttpResponse,[],this); }else{ _dca.onreadystatechange=GUtil.generateCallback(this.waitForXmlHttpResponse,[],this); if(!isIE()){ _dca.onload=GUtil.generateCallback(this.httpSuccess,[],this); _dca.onerror=GUtil.generateCallback(this.httpError,[],this); } } _dca.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); if(this.m_headers){ for(header in this.m_headers){ _dca.setRequestHeader(header,this.m_headers[header]); } } this.executeHttpCallback("preHttpRequest"); var _dcb=this.convertFormFieldsToUrl(); if(url){ _dcb+=url; } _dca.send(_dcb); } }; 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(item){ return (this.xmlHttp)?this.xmlHttp.getResponseHeader(item):null; }; XmlHttpObject.prototype.getStatus=function(){ return this.xmlHttp.status; }; XmlHttpObject.prototype.addFormField=function(name,_dce){ this.m_formFields.add(name,_dce); }; XmlHttpObject.prototype.getFormFields=function(){ return this.m_formFields; }; XmlHttpObject.prototype.getFormField=function(_dcf){ return this.m_formFields.get(_dcf); }; XmlHttpObject.prototype.clearFormFields=function(){ this.m_formFields=new CDictionary(); }; XmlHttpObject.prototype.convertFormFieldsToUrl=function(){ var url=""; var _dd1=this.m_formFields.keys(); for(var _dd2=0;_dd2<_dd1.length;_dd2++){ if(_dd2>0){ url+="&"; } url+=encodeURIComponent(_dd1[_dd2])+"="+encodeURIComponent(this.m_formFields.get(_dd1[_dd2])); } return url; }; XmlHttpObject.prototype.concatResponseArguments=function(_dd3){ var _dd4=[this]; if(_dd3){ _dd4=_dd4.concat(_dd3); } return _dd4; }; function AsynchRequest(_dd5,_dd6){ AsynchRequest.baseConstructor.call(this); this.m_gateway=_dd5; this.m_webContentRoot=_dd6; 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(_dd7){ if(this.m_callbacks[_dd7]){ var _dd8=this.concatResponseArguments(this.m_callbacks.customArguments); var _dd9=GUtil.generateCallback(this.m_callbacks[_dd7].method,_dd8,this.m_callbacks[_dd7].object); _dd9(); return true; } return false; }; AsynchRequest.prototype.setCallbacks=function(_dda){ if(!this.m_callbacks){ this.m_callbacks={}; } for(callback in _dda){ this.m_callbacks[callback]=_dda[callback]; } }; AsynchRequest.prototype.getCallbacks=function(){ return this.m_callbacks; }; AsynchRequest.prototype.newRequest=function(){ var _ddb=this.construct(); _ddb.setHeaders(this.getHeaders()); if(this.getFormFields().exists("b_action")){ _ddb.addFormField("b_action",this.getFormField("b_action")); } if(this.getFormFields().exists("cv.catchLogOnFault")){ _ddb.addFormField("cv.catchLogOnFault",this.getFormField("cv.catchLogOnFault")); } _ddb.setPromptDialog(this.m_promptDialog); _ddb.setFaultDialog(this.m_faultDialog); _ddb.setLogonDialog(this.m_logonDialog); _ddb.m_asynch=this.m_asynch; if(this.m_callbacks.newRequest){ var _ddc=GUtil.generateCallback(this.m_callbacks.newRequest.method,[_ddb],this.m_callbacks.newRequest.object); _ddc(); } return _ddb; }; AsynchRequest.prototype.success=function(){ var _ddd=this.getAsynchStatus(); switch(_ddd){ 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(_dde){ if(_dde instanceof IFaultDialog){ if(typeof console!="undefined"){ console.log("AsynchRequest.prototype.setFaultDialog is deprecated"); } this.m_faultDialog=_dde; }else{ if(_dde&&typeof console!="undefined"){ console.log("The parameter faultDialog must be an instance of IFaultDialog"); } } }; AsynchRequest.prototype.setPromptDialog=function(_ddf){ if(_ddf instanceof IPromptDialog){ if(typeof console!="undefined"){ console.log("AsynchRequest.prototype.setPromptDialog is deprecated"); } this.m_promptDialog=_ddf; }else{ if(_ddf&&typeof console!="undefined"){ console.log("The parameter promptDialog must be an instance of IPromptDialog"); } } }; AsynchRequest.prototype.setLogonDialog=function(_de0){ if(_de0 instanceof ILogOnDialog){ if(typeof console!="undefined"){ console.log("AsynchRequest.prototype.setLogonDialog is deprecated"); } this.m_logonDialog=_de0; }else{ if(_de0&&typeof console!="undefined"){ console.log("The parameter logOnDialog must be an instance of ILogOnDialog"); } } }; AsynchRequest.prototype.resubmitRequest=function(){ var _de1=this.newRequest(); _de1.m_formFields=this.m_formFields; _de1.sendRequest(); return _de1; }; AsynchRequest.prototype.sendRequest=function(){ var _de2=this; var _de3={"complete":{"object":_de2,"method":_de2.successHandler},"fault":{"object":_de2,"method":_de2.errorHandler}}; this.init("POST",this.m_gateway,"",this.m_asynch); this.executeCallback("preHttpRequest"); this.parent.setCallbacks.call(this,_de3); 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 _de4=this.getResponseText(); if(_de4.indexOf("CAM_PASSPORT_ERROR")!=-1){ this.passportTimeout(); }else{ if((_de4.indexOf("http-equiv=\"refresh\"")!=-1)||(_de4.indexOf("http-equiv='refresh'")!=-1)){ this.passportTimeout(); }else{ this.executeCallback("entryFault"); if(!this.executeCallback("fault")){ var _de5=window.open("","","height=400,width=500"); if(_de5!=null){ _de5.document.write(_de4); } } } } }else{ this.m_soapFault=this.constructFaultEnvelope(); if(this.m_soapFault!=null){ var _de6=XMLHelper_FindChildByTagName(this.m_soapFault,"CAM",true); if(_de6!=null&&XMLHelper_FindChildByTagName(_de6,"promptInfo",true)){ this.passportTimeout(); }else{ this.fault(); } }else{ this.success(); } } }; AsynchRequest.prototype.cancel=function(){ this.parent.cancel.call(this); var _de7=this.getFormField("m_tracking"); if(_de7){ var _de8=new XmlHttpObject(); _de8.init("POST",this.m_gateway,"",false); if(this.getFormField("cv.outputKey")){ _de8.addFormField("b_action","cvx.high"); _de8.addFormField("cv.outputKey",this.getFormField("cv.outputKey")); _de8.setHeaders(this.getHeaders()); }else{ _de8.addFormField("b_action","cognosViewer"); } _de8.addFormField("cv.responseFormat","successfulRequest"); _de8.addFormField("ui.action","cancel"); _de8.addFormField("m_tracking",_de7); if(this.getFormField("cv.debugDirectory")){ _de8.addFormField("cv.debugDirectory",this.getFormField("cv.debugDirectory")); } _de8.sendRequest(); this.executeCallback("cancel"); } }; AsynchRequest.prototype.working=function(){ this.executeCallback("working"); var _de9=this.newRequest(); _de9.addFormField("m_tracking",this.getTracking()); if(this.getFormField("cv.outputKey")){ _de9.addFormField("cv.outputKey",this.getFormField("cv.outputKey")); _de9.addFormField("b_action","cvx.high"); } if(this.isRAPWaitTrue()){ _de9.m_formFields=this.m_formFields; _de9.addFormField("m_tracking",this.getTracking()); _de9.addFormField("rapWait","true"); var _dea=this.getRAPRequestCache(); if(_dea!==null&&typeof _dea!="undefined"){ _de9.addFormField("rapRequestCache",_dea); } var _deb=this.getMainConversation(); if(_deb){ _de9.addFormField("mainConversation",_deb); } var _dec=this.getMainTracking(); if(_dec){ _de9.addFormField("mainTracking",_dec); } }else{ _de9.addFormField("ui.action","wait"); _de9.addFormField("ui.primaryAction",this.getPrimaryAction()); _de9.addFormField("cv.actionState",this.getActionState()); if(this.getFormField("ui.preserveRapTags")){ _de9.addFormField("ui.preserveRapTags",this.getFormField("ui.preserveRapTags")); } if(this.getFormField("ui.backURL")){ _de9.addFormField("ui.backURL",this.getFormField("ui.backURL")); } if(this.getFormField("errURL")){ _de9.addFormField("errURL",this.getFormField("errURL")); } if(this.getFormField("cv.showFaultPage")){ _de9.addFormField("cv.showFaultPage",this.getFormField("cv.showFaultPage")); } if(this.getFormField("cv.catchLogOnFault")){ _de9.addFormField("cv.catchLogOnFault",this.getFormField("cv.catchLogOnFault")); } } if(this.getFormField("bux")){ _de9.addFormField("bux",this.getFormField("bux")); } if(this.getFormField("cv.debugDirectory")){ _de9.addFormField("cv.debugDirectory",this.getFormField("cv.debugDirectory")); } _de9.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(_ded){ var _dee=this.newRequest(); _dee.addFormField("ui.action","forward"); _dee.addFormField("m_tracking",this.getTracking()); _dee.addFormField("ui.conversation",this.getConversation()); _dee.addFormField("ui.primaryAction",this.getPrimaryAction()); _dee.addFormField("cv.actionState",this.getActionState()); for(var _def in _ded){ _dee.addFormField(_def,_ded[_def]); } _dee.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 _df0=this.m_promptDialog.getViewerId()==null?"":"?cv.id="+this.m_promptDialog.getViewerId(); window["AsynchRequestPromptDialog"].initialize(this.m_webContentRoot+"/rv/showStandalonePrompts.html"+_df0,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 _df1=this.constructFaultEnvelope(); if(_df1){ var _df2=XMLHelper_FindChildByTagName(_df1,"faultcode",true); if(_df2!=null){ return XMLHelper_GetText(_df2); } } return null; }; AsynchRequest.prototype.getSoapFaultDetailMessageString=function(){ var _df3=this.constructFaultEnvelope(); if(_df3){ var _df4=XMLHelper_FindChildByTagName(_df3,"messageString",true); if(_df4!=null){ return XMLHelper_GetText(_df4); } } return null; }; function AsynchDATARequest(_df5,_df6){ AsynchDATARequest.baseConstructor.call(this,_df5,_df6); 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 _df7=this.getResponseText().substring(0,12); if(_df7==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 _df8=this.getResponseState(); if(_df8!=null){ if(_df8.m_sSoapFault){ var _df9=_df8.m_sSoapFault; this.m_soapFault=XMLBuilderLoadXMLFromString(_df9); } } } return this.m_soapFault; }; AsynchDATARequest.prototype.construct=function(){ var _dfa=new AsynchDATARequest(this.m_gateway,this.m_webContentRoot); _dfa.setCallbacks(this.m_callbacks); if(this.getFormFields().exists("cv.responseFormat")){ _dfa.addFormField("cv.responseFormat",this.getFormField("cv.responseFormat")); }else{ _dfa.addFormField("cv.responseFormat","data"); } return _dfa; }; AsynchDATARequest.prototype.getEnvParam=function(_dfb){ var _dfc=this.getResponseState(); if(_dfc&&typeof _dfc.envParams!="undefined"&&typeof _dfc.envParams[_dfb]!="undefined"){ return _dfc.envParams[_dfb]; } return null; }; AsynchDATARequest.prototype.isRAPWaitTrue=function(){ var _dfd=this.getEnvParam("rapWait"); if(_dfd!=null){ return _dfd=="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(_dfe,_dff){ AsynchJSONRequest.baseConstructor.call(this,_dfe,_dff); 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 _e01=this.removeInvalidCharacters(text); this.m_jsonResponse=eval("("+_e01+")"); } } } return this.m_jsonResponse; }; AsynchJSONRequest.prototype.getTracking=function(){ var _e02=this.getJSONResponseObject(); if(_e02){ return _e02.tracking; } return ""; }; AsynchJSONRequest.prototype.getConversation=function(){ var _e03=this.getJSONResponseObject(); if(_e03){ return _e03.conversation; } return ""; }; AsynchJSONRequest.prototype.getAsynchStatus=function(){ var _e04=this.getJSONResponseObject(); if(_e04){ return _e04.status; } return "unknown"; }; AsynchJSONRequest.prototype.getPrimaryAction=function(){ var _e05=this.getJSONResponseObject(); if(_e05){ return _e05.primaryAction; } return ""; }; AsynchJSONRequest.prototype.getActionState=function(){ var _e06=this.getJSONResponseObject(); if(_e06){ return _e06.actionState; } return ""; }; AsynchJSONRequest.prototype.getDebugLogs=function(){ var _e07=this.getJSONResponseObject(); if(_e07){ return _e07.debugLogs; } return ""; }; AsynchJSONRequest.prototype.isRAPWaitTrue=function(){ var _e08=this.getJSONResponseObject(); if(_e08){ return (_e08.rapWait==="true"); } return false; }; AsynchJSONRequest.prototype.getRAPRequestCache=function(){ var _e09=this.getJSONResponseObject(); if(_e09){ var _e0a=_e09.rapRequestCache; if(_e0a!==null&&typeof _e0a!="undefined"){ return _e0a; } } return null; }; AsynchJSONRequest.prototype.getMainConversation=function(){ var _e0b=this.getJSONResponseObject(); if(_e0b){ return _e0b.mainConversation; } return null; }; AsynchJSONRequest.prototype.getMainTracking=function(){ var _e0c=this.getJSONResponseObject(); if(_e0c){ return _e0c.mainTracking; } return null; }; AsynchJSONRequest.prototype.getResult=function(){ var _e0d=this.getJSONResponseObject(); if(_e0d&&_e0d.json){ var _e0e=this.removeInvalidCharacters(_e0d.json); return eval("("+_e0e+")"); } return null; }; AsynchJSONRequest.prototype.removeInvalidCharacters=function(text){ if(text){ text=text.replace(/(\n|\r|\t)+/g,""); } return text; }; AsynchJSONRequest.prototype.getPromptHTMLFragment=function(){ var _e10=this.getJSONResponseObject(); if(_e10&&_e10.promptHTMLFragment){ return _e10.promptHTMLFragment; } return ""; }; AsynchJSONRequest.prototype.constructFaultEnvelope=function(){ if(this.m_soapFault==null){ var _e11=this.getJSONResponseObject(); if(_e11.status=="fault"){ this.m_soapFault=XMLBuilderLoadXMLFromString(_e11.fault); } } return this.m_soapFault; }; AsynchJSONRequest.prototype.construct=function(){ var _e12=new AsynchJSONRequest(this.m_gateway,this.m_webContentRoot); _e12.setCallbacks(this.m_callbacks); if(this.getFormFields().exists("cv.responseFormat")){ _e12.addFormField("cv.responseFormat",this.getFormField("cv.responseFormat")); }else{ _e12.addFormField("cv.responseFormat","asynchJSON"); } return _e12; }; 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(_e13){ if(typeof console!="undefined"){ console.log("Required method ILogOnDialog:show not implemented."); } }; ILogOnDialog.prototype.handleUnknownHTMLResponse=function(_e14){ if(typeof console!="undefined"){ console.log("Required method ILogOnDialog:handleUnknownHTMLResponse not implemented."); } }; function IPromptDialog(){ }; IPromptDialog.prototype.initialize=function(url,_e16,_e17){ 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(_e18){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:preHttpRequest not implemented."); } }; IRequestHandler.prototype.postHttpRequest=function(_e19){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:postHttpRequest not implemented."); } }; IRequestHandler.prototype.postComplete=function(_e1a){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:postComplete not implemented."); } }; IRequestHandler.prototype.onComplete=function(_e1b){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:onComplete not implemented."); } }; IRequestHandler.prototype.onPostEntryComplete=function(_e1c){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:onPostEntryComplete not implemented."); } }; IRequestHandler.prototype.onFault=function(_e1d){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:onFault not implemented."); } }; IRequestHandler.prototype.onPrompting=function(_e1e){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:onPrompting not implemented."); } }; IRequestHandler.prototype.onWorking=function(_e1f){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:onWorking not implemented."); } }; IRequestHandler.prototype.setWorkingDialog=function(_e20){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:setWorkingDialog not implemented."); } }; IRequestHandler.prototype.setRequestIndicator=function(_e21){ 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(_e23){ }; 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(_e24){ this.m_oDispatcherEntry=_e24; }; BaseRequestHandler.prototype.getDispatcherEntry=function(){ return this.m_oDispatcherEntry; }; BaseRequestHandler.prototype.processInitialResponse=function(_e25){ this.updateViewerState(_e25); }; BaseRequestHandler.prototype.setLogOnDialog=function(_e26){ if(_e26==null){ this.m_logOnDialog=null; }else{ if(_e26 instanceof ILogOnDialog){ this.m_logOnDialog=_e26; }else{ if(_e26&&typeof console!="undefined"){ console.log("The parameter logOnDialog must be an instance of ILogOnDialog"); } } } }; BaseRequestHandler.prototype.setWorkingDialog=function(_e27){ if(_e27==null){ this.m_workingDialog=null; }else{ if(this.m_httpRequestConfig&&this.m_httpRequestConfig.getWorkingDialog()){ this.m_workingDialog=this.m_httpRequestConfig.getWorkingDialog(); }else{ if(_e27 instanceof IRequestIndicator){ this.m_workingDialog=_e27; }else{ if(_e27&&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(_e28){ if(_e28==null){ this.m_requestIndicator=null; }else{ if(this.m_httpRequestConfig&&this.m_httpRequestConfig.getRequestIndicator()){ this.m_requestIndicator=this.m_httpRequestConfig.getRequestIndicator(); }else{ if(_e28 instanceof IRequestIndicator){ this.m_requestIndicator=_e28; }else{ if(_e28&&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(_e29){ if(_e29==null){ this.m_faultDialog=null; }else{ if(_e29 instanceof IFaultDialog){ this.m_faultDialog=_e29; }else{ if(_e29&&typeof console!="undefined"){ console.log("The parameter faultDialog must be an instance of IFaultDialog"); } } } }; BaseRequestHandler.prototype.setPromptDialog=function(_e2a){ if(_e2a==null){ this.m_promptDialog=null; }else{ if(_e2a instanceof IPromptDialog){ this.m_promptDialog=_e2a; }else{ if(_e2a&&typeof console!="undefined"){ console.log("The parameter promptDialog must be an instance of IPromptDialog"); } } } }; BaseRequestHandler.prototype.preHttpRequest=function(_e2b){ if(_e2b&&typeof _e2b.getFormField=="function"){ if(_e2b.getFormField("ui.action")!="wait"&&_e2b.getFormField("rapWait")!="true"){ if(this.m_requestIndicator){ this.m_requestIndicator.show(); } } } }; BaseRequestHandler.prototype.postHttpRequest=function(_e2c){ if(_e2c&&typeof _e2c.getAsynchStatus=="function"){ var _e2d=_e2c.getAsynchStatus(); if(_e2d!="working"&&_e2d!="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(_e2e){ 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",_e2e); } return; } if(!this.m_faultDialog){ this.m_faultDialog=new FaultDialog(this.getViewer()); } if(_e2e&&_e2e.getResponseHeader&&_e2e.getResponseHeader("Content-type").indexOf("text/html")!=-1){ this.m_faultDialog.handleUnknownHTMLResponse(_e2e.getResponseText()); }else{ if(_e2e&&_e2e.getSoapFault){ this.m_faultDialog.show(_e2e.getSoapFault()); }else{ if(oCV.getSoapFault()){ var _e30=XMLBuilderLoadXMLFromString(oCV.getSoapFault()); this.m_faultDialog.show(_e30); oCV.setSoapFault(""); }else{ if(typeof console!="undefined"){ console.log("An unhandled fault was returned: %o",_e2e); } } } } }; BaseRequestHandler.prototype.isAuthenticationFault=function(_e31){ var oCV=this.getViewer(); var _e33=null; if(_e31&&_e31.getSoapFault){ _e33=_e31.getSoapFault(); }else{ if(oCV.getSoapFault()){ _e33=XMLBuilderLoadXMLFromString(oCV.getSoapFault()); } } if(_e33!=null){ var _e34=XMLHelper_FindChildByTagName(_e33,"CAM",true); return (_e34!=null&&XMLHelper_FindChildByTagName(_e34,"promptInfo",true)!=null); } return false; }; BaseRequestHandler.prototype.onPassportTimeout=function(_e35){ 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(_e35&&_e35.getResponseHeader&&_e35.getResponseHeader("Content-type").indexOf("text/html")!=-1){ var _e37=""; if(_e35.getResponseText){ _e37=_e35.getResponseText(); } if((_e37.indexOf("http-equiv=\"refresh\"")!=-1)||(_e37.indexOf("http-equiv='refresh'")!=-1)){ this.m_logOnDialog.show(null); }else{ this.m_logOnDialog.handleUnknownHTMLResponse(_e37); } }else{ if(_e35&&_e35.getSoapFault){ this.m_logOnDialog.show(_e35.getSoapFault()); }else{ if(oCV.getSoapFault()){ var _e38=XMLBuilderLoadXMLFromString(oCV.getSoapFault()); this.m_logOnDialog.show(_e38); oCV.setSoapFault(""); }else{ if(typeof console!="undefined"){ console.log("BaseRequestHandler.prototype.onPassportTimeout: An unhandled authentication fault was returned: %o",_e35); } } } } }; BaseRequestHandler.prototype.onWorking=function(_e39){ if(this.m_workingDialog){ var _e3a=_e39&&typeof _e39.getAsynchStatus=="function"&&_e39.getAsynchStatus()=="stillWorking"?true:false; if(!_e3a){ 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 _e3d=oCV.getViewerWidget(); if(_e3d.getLoadManager()){ _e3d.getLoadManager().processQueue(); } } }; BaseRequestHandler.prototype.onPrompting=function(_e3e){ 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"]=_e3e; window["AsynchRequestPromptDialog"]=this.m_promptDialog; var _e40="?cv.id="+oCV.getId(); window["AsynchRequestPromptDialog"].initialize(oCV.getWebContentRoot()+"/rv/showStandalonePrompts.html"+_e40,400,400); window["AsynchRequestPromptDialog"].show(); }; BaseRequestHandler.prototype.processDATAReportResponse=function(_e41){ 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 _e43=_e41.getResponseState(); if(!_e43){ this.resubmitInSafeMode(); } if(this.loadReportHTML(_e41.getResult())===false){ this.resubmitInSafeMode(); } this.updateViewerState(_e43); }; BaseRequestHandler.prototype.updateViewerState=function(_e44){ var oCV=this.getViewer(); applyJSONProperties(oCV,_e44); var _e46=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(_e46!="fault"){ if(oCV.envParams["rapReportInfo"]){ this._processRapReportInfo(oCV); } if(typeof _e44.clientunencodedexecutionparameters!="undefined"){ var _e47=document.getElementById("formWarpRequest"+oCV.getId()); if(_e47!=null&&typeof _e47["clientunencodedexecutionparameters"]!="undefined"){ _e47["clientunencodedexecutionparameters"].value=_e44.clientunencodedexecutionparameters; } if(typeof document.forms["formWarpRequest"]!="undefined"&&typeof document.forms["formWarpRequest"]["clientunencodedexecutionparameters"]!="undefined"){ document.forms["formWarpRequest"]["clientunencodedexecutionparameters"].value=_e44.clientunencodedexecutionparameters; } } }else{ oCV.setTracking(""); } }; BaseRequestHandler.prototype._processRapReportInfo=function(oCV){ if(oCV.envParams["rapReportInfo"]){ var _e49=eval("("+oCV.envParams["rapReportInfo"]+")"); if(typeof RAPReportInfo!="undefined"){ var _e4a=new RAPReportInfo(_e49,oCV); oCV.setRAPReportInfo(_e4a); } } }; BaseRequestHandler.prototype.loadReportHTML=function(_e4b){ if(!_e4b){ 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 _e4d=_e4b.replace(/]*>/gi,"").replace(/<\/form[^>]*>/gi,""); oCV.m_sHTML=_e4d; oCV.setHasPrompts(false); var id=oCV.getId(); var _e4f=document.getElementById("RVContent"+id); var _e50=document.getElementById("CVReport"+id); if(window.gScriptLoader){ var _e51=oCV.getViewerWidget()?true:false; var _e52=oCV.getViewerWidget()?document.getElementById("_"+oCV.getViewerWidget().iContext.widgetId+"_cv"):_e50; _e4d=window.gScriptLoader.loadCSS(_e4d,_e52,_e51,id); } if(oCV.sBrowser=="ie"){ _e4d=" "+_e4d; } _e50.innerHTML=_e4d; this.massageHtmlBeforeDisplayed(); if(window.gScriptLoader){ var _e53=GUtil.generateCallback(oCV.showLoadedContent,[_e4f],oCV); oCV.m_resizeReady=false; if(!window.gScriptLoader.loadAll(_e50,_e53,id,true)){ if(window.gScriptLoader.containsAjaxWarnings()){ return false; } } }else{ _e4f.style.display="block"; } var _e54=document.querySelectorAll("button"); var _e55=_e54.length; for(var k=0;k<_e55;k++){ var _e57=_e54[k]; var id=_e57.id; var _e58=id.match(/reprompt/); if(_e58){ var _e59=_e57.outerHTML; var _e5a=_e59.match(/layoutname="\w+"/); if(_e5a!==null){ var _e5b=_e5a[0]; var _e5c=/".*"/; var _e5d=_e5c.exec(_e5b); if(oCV.getCurrentPromptControlFocus()==_e5d){ _e57.focus(); oCV.setCurrentPromptControlFocus(null); _e57=null; } }else{ oCV.setCurrentPromptControlFocus(null); _e57=null; } } } oCV.updateOutputForA11ySupport(); this._clearFindState(); return true; }; BaseRequestHandler.prototype._clearFindState=function(){ var oCV=this.getViewer(); var _e5f=oCV.getState()&&oCV.getState().getFindState()?oCV.getState().getFindState():null; if(_e5f&&!_e5f.findOnServerInProgress()){ oCV.getState().clearFindState(); } }; BaseRequestHandler.prototype.showReport=function(){ var oCV=this.getViewer(); var _e61=document.getElementById("CVReport"+oCV.getId()); if(_e61){ _e61.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(_e63){ if(this.m_httpRequestConfig){ var _e64=this.m_httpRequestConfig.getReportStatusCallback(_e63); if(_e64){ _e64(); } } }; 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(_e65,_e66){ var _e67=_e65; var _e68=this[_e66]; this[_e66]=function(_e69){ _e68.apply(this,arguments); var _e6a=null; if(_e69&&typeof _e69.getAsynchStatus=="function"){ _e6a=_e69.getAsynchStatus(); }else{ _e6a=_e67=="complete"?this.getViewer().getStatus():_e67; } if(_e6a=="stillWorking"){ return; } var _e6b=this.m_httpRequestConfig.getReportStatusCallback(_e6a); if(typeof _e6b=="function"){ setTimeout(_e6b,10); } }; }; function ViewerBaseWorkingDialog(_e6c){ if(!_e6c){ return; } this.setCognosViewer(_e6c); this.m_oCV=_e6c; this.m_sNamespace=_e6c.getId(); this.m_sGateway=_e6c.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(_e6e){ this.m_bCancelSubmitted=_e6e; }; ViewerBaseWorkingDialog.prototype.show=function(){ var _e6f=document.getElementById(this.getContainerId()); if(_e6f){ _e6f.style.display="block"; this.enableCancelButton(); }else{ this.create(); } var _e70=document.getElementById("reportBlocker"+this.m_oCV.getId()); if(_e70){ _e70.style.display="block"; } }; ViewerBaseWorkingDialog.prototype.create=function(){ if(typeof document.body!="undefined"){ if(this.isModal()){ this.createModalWaitDialog(); }else{ this.createInlineWaitDialog(); } } }; ViewerBaseWorkingDialog.prototype.createContainer=function(_e71){ var _e72=document.createElement("div"); _e72.setAttribute("id",this.getContainerId()); _e72.className=_e71?"modalWaitPage":"inlineWaitPage"; return _e72; }; ViewerBaseWorkingDialog.prototype.createModalWaitDialog=function(){ this._createBlocker(); var _e73=this.createContainer(true); _e73.innerHTML=this.renderHTML(); _e73.style.zIndex="7002"; _e73.setAttribute("role","region"); _e73.setAttribute("aria-label",RV_RES.GOTO_WORKING); document.body.appendChild(_e73); var _e74=this.createModalIframeBackground(); document.body.appendChild(_e74); var _e75=0; var _e76=0; if(typeof window.innerHeight!="undefined"){ _e75=Math.round((window.innerHeight/2)-(_e73.offsetHeight/2)); _e76=Math.round((window.innerWidth/2)-(_e73.offsetWidth/2)); }else{ _e75=Math.round((document.body.clientHeight/2)-(_e73.offsetHeight/2)); _e76=Math.round((document.body.clientWidth/2)-(_e73.offsetWidth/2)); } _e73.style.bottom=_e75+"px"; _e73.style.left=_e76+"px"; _e74.style.left=_e76-1+"px"; _e74.style.bottom=_e75-1+"px"; _e74.style.width=_e73.offsetWidth+2+"px"; _e74.style.height=_e73.offsetHeight+2+"px"; }; ViewerBaseWorkingDialog.prototype._createBlocker=function(){ var _e77=document.getElementById("reportBlocker"+this.m_oCV.getId()); if(_e77){ return; } var _e78=document.getElementById("mainViewerTable"+this.m_oCV.getId()); if(_e78){ _e77=document.createElement("div"); _e78.parentNode.appendChild(_e77); _e77.id="reportBlocker"+this.m_oCV.getId(); _e77.style.zIndex="6001"; _e77.style.position="absolute"; _e77.style.top="0px"; _e77.style.left="0px"; _e77.style.width="100%"; _e77.style.height="100%"; _e77.style.display="none"; _e77.style.opacity="0"; _e77.style.backgroundColor="#FFFFFF"; _e77.style.filter="alpha(opacity:0)"; } }; ViewerBaseWorkingDialog.prototype.createInlineWaitDialog=function(){ var _e79=this.m_oCV.getId(); var _e7a=document.getElementById("CVReport"+_e79); if(_e7a){ var _e7b=this.createContainer(false); _e7b.innerHTML="
"+this.renderHTML()+"
"; _e7a.appendChild(_e7b); } }; ViewerBaseWorkingDialog.prototype.createModalIframeBackground=function(){ var _e7c=document.createElement("iframe"); var _e7d=".."; var oCV=this.getCognosViewer(); if(oCV!==null){ _e7d=oCV.getWebContentRoot(); } _e7c.setAttribute("id",this.getContainerId()+"Iframe"); _e7c.setAttribute("title","Empty iframe"); _e7c.setAttribute("src",_e7d+"/common/images/spacer.gif"); _e7c.setAttribute("scrolling","no"); _e7c.setAttribute("frameborder","0"); _e7c.style.position="absolute"; _e7c.style.zIndex="6002"; _e7c.style.display="block"; return _e7c; }; ViewerBaseWorkingDialog.prototype.updateCoords=function(_e7f,_e80){ if(this.m_container!==null&&m_iframeBackground!==null){ var _e81=0; var _e82=0; if(typeof window.innerHeight!="undefined"){ _e81=Math.round((window.innerHeight/2)-(_e7f.offsetHeight/2)); _e82=Math.round((window.innerWidth/2)-(_e7f.offsetWidth/2)); }else{ _e81=Math.round((document.body.clientHeight/2)-(_e7f.offsetHeight/2)); _e82=Math.round((document.body.clientWidth/2)-(_e7f.offsetWidth/2)); } _e7f.style.bottom=_e81+"px"; _e7f.style.left=_e82+"px"; _e80.style.left=_e7f.style.left; _e80.style.bottom=_e7f.style.bottom; _e80.style.width=_e7f.offsetWidth+"px"; _e80.style.height=_e7f.offsetHeight+"px"; } }; ViewerBaseWorkingDialog.prototype.hide=function(){ var _e83=document.getElementById(this.getContainerId()); if(_e83){ _e83.parentNode.removeChild(_e83); } var _e84=document.getElementById(this.getContainerId()+"Iframe"); if(_e84){ _e84.parentNode.removeChild(_e84); } var _e85=document.getElementById("reportBlocker"+this.m_oCV.getId()); if(_e85){ _e85.parentNode.removeChild(_e85); } }; ViewerBaseWorkingDialog.prototype.isModal=function(){ var _e86=this.m_oCV.getId(); var _e87=document.getElementById("CVReport"+_e86); var _e88=true; if(_e87&&_e87.innerHTML===""){ _e88=false; } return _e88; }; ViewerBaseWorkingDialog.prototype.disableCancelButton=function(_e89){ }; ViewerBaseWorkingDialog.prototype.enableCancelButton=function(){ }; function FaultDialog(oCV){ this.m_oCV=oCV; }; FaultDialog.prototype=new IFaultDialog(); FaultDialog.prototype.show=function(_e8b){ if(typeof console!="undefined"){ console.log("FaultDialog - an unhandled soap fault was returned: %o",_e8b); } }; FaultDialog.prototype.handleUnknownHTMLResponse=function(_e8c){ this.m_oCV.setTracking(""); this.m_oCV.setConversation(""); if(_e8c){ if(this.m_oCV.envParams["useAlternateErrorCodeRendering"]){ var _e8d=document.getElementsByTagName("head")[0]; var _e8e=_e8c.match(/]*>([\s\S]*)<\/body>/im)[1]; var _e8f=/]*>([\s\S]*?)<\/script>/igm; var _e90=_e8f.exec(_e8c); while(_e90!=null){ var _e91=document.createElement("script"); _e91.type="text/javascript"; var _e92=_e90[0].match(/src="([\s\S]*?)"/i); if(_e92==null){ _e91.text=_e90[1]; }else{ _e91.src=_e92[1]; } _e8d.appendChild(_e91); _e90=_e8f.exec(_e8c); } document.body.innerHTML=_e8e; }else{ document.write(_e8c); } } }; function LogOnDialog(oCV){ this.m_oCV=oCV; }; LogOnDialog.prototype=new ILogOnDialog(); LogOnDialog.prototype.handleUnknownHTMLResponse=function(_e94){ if(_e94){ document.write(_e94); } }; LogOnDialog.prototype.show=function(_e95){ launchLogOnDialog(this.m_oCV.getId(),_e95); }; LogOnDialog.prototype.hide=function(){ }; function PromptDialog(oCV){ this.m_oCV=oCV; this.m_dialogImpl=null; }; PromptDialog.prototype=new IPromptDialog(); PromptDialog.prototype.initialize=function(url,_e98,_e99){ this.m_dialogImpl=new CModal("","",document.body,null,null,_e98,_e99,true,true,false,true,this.m_oCV.getWebContentRoot()); var _e9a=document.getElementById(CMODAL_CONTENT_ID); _e9a.src=url; }; PromptDialog.prototype.show=function(){ this.m_dialogImpl.show(); }; PromptDialog.prototype.hide=function(){ this.m_dialogImpl.hide(); destroyCModal(); }; function WorkingDialog(_e9b){ if(_e9b){ this.m_bSimpleWorkingDialog=false; this.m_bShowCancelButton=(_e9b.getAdvancedServerProperty("VIEWER_JS_HIDE_CANCEL_BUTTON")=="true")?false:true; WorkingDialog.baseConstructor.call(this,_e9b); this.m_secondaryRequests=_e9b.getSecondaryRequests(); } }; WorkingDialog.prototype=new ViewerBaseWorkingDialog(); WorkingDialog.baseConstructor=ViewerBaseWorkingDialog; WorkingDialog.prototype.setSecondaryRequests=function(_e9c){ this.m_secondaryRequests=_e9c; }; 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(_e9e){ var _e9f=this.getNamespace(); var _ea0=document.getElementById("DeliveryOptionsVisible"+_e9f); if(_ea0){ _ea0.style.display=(_e9e===false?"none":"block"); if(_e9e){ var _ea1=_ea0.getElementsByTagName("a"); for(var i=_ea1.length;i>0;i--){ if(_ea1[i]&&_ea1[i].getAttribute("tabIndex")=="0"){ _ea1[i].focus(); } } } } _ea0=document.getElementById("OptionsLinkSelected"+_e9f); if(_ea0){ _ea0.style.display=(_e9e===false?"none":"block"); } _ea0=document.getElementById("OptionsLinkUnselected"+_e9f); if(_ea0){ _ea0.style.display=(_e9e===false?"block":"none"); } }; WorkingDialog.prototype.renderHTML=function(){ var _ea3=this.getNamespace(); var _ea4=_ea3+"_workingMsg "+_ea3+"_workingMsg2"; var html=""; html+=(""+""+""+"
"+"
"); html+=this.renderFirstInnerTable(); html+=this.renderSecondInnerTable(); html+=("
"+"
"); return html; }; WorkingDialog.prototype.renderFirstInnerTable=function(){ var _ea6=this.getSimpleWorkingDialogFlag(); var _ea7=_ea6?RV_RES.GOTO_WORKING:RV_RES.RV_RUNNING; var _ea8=this.m_sNamespace; var _ea9=""+""+""; _ea9+=""; _ea9+="
"; var _eaa=this.getCognosViewer().getSkin()+"/branding/"; _ea9+=" "; _ea9+=""; _ea9+=_ea7; _ea9+=""; _ea9+="

"; var _eab=this.getCognosViewer().envParams["cv.responseFormat"]; if(_ea6||this.isUIBlacklisted("RV_TOOLBAR_BUTTONS")||!this.deliverySectionIsNeeded()||(_eab&&("qs"===_eab||"fragment"===_eab))){ _ea9+=RV_RES.RV_PLEASE_WAIT; }else{ var _eac=this.canShowDeliveryOptions(); if(_eac){ _ea9+=this.optionLinkSelectedDiv(); _ea9+=this.optionLinkUnselectedDiv(); }else{ _ea9+=RV_RES.RV_PLEASE_WAIT; } } _ea9+="
 
"; return _ea9; }; WorkingDialog.prototype.optionLinkSelectedDiv=function(){ var _ead=""; _ead+="
"; _ead+=RV_RES.RV_BUSY_OPTIONS_SELECTED; _ead+="
"; return _ead; }; WorkingDialog.prototype.optionLinkUnselectedDiv=function(){ var _eae=""; var _eaf=this.getNamespace(); var _eb0="window.oCV"+_eaf+".getWorkingDialog()"; _eae+="
"; return _eae; }; WorkingDialog.prototype.canShowDeliveryOptions=function(){ var _eb1=this.getCognosViewer().envParams["ui.primaryAction"]; if("saveAs"!==_eb1&&"email"!==_eb1&&this.getIsSavedReport()){ return true; } return false; }; WorkingDialog.prototype.isUIBlacklisted=function(item){ var _eb3=this.getUIBlacklist(); for(var _eb4 in _eb3){ if(_eb3[_eb4]===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(_eb5){ var _eb6=this._getSecondaryRequests(); if(_eb6){ var _eb7=_eb6.length; for(var i=0;i<_eb7;i++){ if(_eb6[i]==_eb5){ return true; } } } return false; }; WorkingDialog.prototype.renderSecondInnerTable=function(){ var _eb9=""; var _eba=this.getCognosViewer().getWebContentRoot(); _eb9+=""; _eb9+=""; _eb9+=" "; _eb9+=" "; _eb9+=" "; _eb9+="
"; _eb9+=""; var _ebb=this.canShowDeliveryOptions(); if(_ebb&&this.deliverySectionIsNeeded()){ if(!this._isSaveBlackListed()){ _eb9+=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()){ _eb9+=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()){ _eb9+=this.addDeliverOption("/rv/images/action_send_report.gif",RV_RES.RV_EMAIL_REPORT,"SendReport(true);"); } } _eb9+="
"; if(this.showCancelButton()){ _eb9+=this.addCancelButton(); } _eb9+="
"; return _eb9; }; WorkingDialog.prototype.addDeliverOption=function(_ebc,_ebd,_ebe){ var _ebf=""; var _ec0=this.getCognosViewer().getWebContentRoot(); var _ec1="javascript: window.oCV"+this.getNamespace()+".getRV()."; var _ec2=_ec1+_ebe; _ebf+=" "; _ebf+=" "; _ebf+="\" "; _ebf+=" "; _ebf+=" "; _ebf+=(_ebd+""); return _ebf; }; WorkingDialog.prototype.addCancelButton=function(){ var _ec3=""; var _ec4=this.getCognosViewer().getWebContentRoot(); _ec3+=" "; _ec3+=" "; _ec3+="
"; _ec3+=" "; _ec3+=" "; _ec3+="
"; _ec3+=RV_RES.CANCEL; _ec3+=" "; _ec3+="
\"\"
"; return _ec3; }; WorkingDialog.prototype.disableCancelButton=function(_ec6){ this.cancelButtonDisabled=true; var _ec7=document.getElementById("cvWorkingDialog"+this.getNamespace()); if(_ec7){ _ec7.style.cursor="default"; _ec7.className="commandButtonOver"; _ec7.removeAttribute("onmouseover"); _ec7.removeAttribute("onmouseout"); } if(_ec6){ _ec6.removeAttribute("href"); _ec6.removeAttribute("onclick"); _ec6.style.cursor="default"; } }; WorkingDialog.prototype.enableCancelButton=function(){ if(this.cancelButtonDisabled){ var _ec8=document.getElementById("cancelButtonContainer"+this.getNamespace()); if(_ec8){ _ec8.innerHTML=this.addCancelButton(); } this.cancelButtonDisabled=false; } }; WorkingDialog.prototype.getContainerId=function(){ return "CVWait"+this.getNamespace(); }; function RequestExecutedIndicator(_ec9){ if(_ec9){ RequestExecutedIndicator.baseConstructor.call(this,_ec9); } }; RequestExecutedIndicator.baseConstructor=WorkingDialog; RequestExecutedIndicator.prototype=new WorkingDialog(); RequestExecutedIndicator.prototype.renderHTML=function(){ var _eca=""; _eca+="
"; _eca+="
"; _eca+=""; _eca+="
"; _eca+="\""+RV_RES.GOTO_WORKING+"\""; _eca+=""; _eca+=RV_RES.GOTO_WORKING; _eca+="
"; _eca+=RV_RES.RV_PLEASE_WAIT; _eca+="
"; return _eca; }; 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(_ecc){ this.parent.onComplete.call(this,_ecc); this.processDATAReportResponse(_ecc); this.postComplete(); }; RequestHandler.prototype.processInitialResponse=function(_ecd){ this.parent.processInitialResponse.call(this,_ecd); var oCV=this.getViewer(); var _ecf=oCV.getStatus(); oCV.setMaxContentSize(); var _ed0=(oCV.isWorking(_ecf)||_ecf=="default"); if(_ed0){ if(oCV.getWorkingDialog()){ oCV.getWorkingDialog().show(); } setTimeout(getCognosViewerObjectRefAsString(oCV.getId())+".executeCallback(\"wait\");",10); }else{ if(_ecf=="fault"){ oCV.setSoapFault(_ecd.m_sSoapFault); oCV.executeCallback("fault"); }else{ if(_ecd.status=="cancel"){ oCV.executeCallback("cancel"); }else{ oCV.updateSkipToReportLink(); if(oCV.envParams&&oCV.envParams["pinFreezeInfo"]){ var _ed1=oCV.getPinFreezeManager(); _ed1.fromJSONString(oCV.envParams["pinFreezeInfo"]); delete oCV.envParams["pinFreezeInfo"]; } if(_ecf!="prompting"||!oCV.executeCallback("prompt")){ this.postComplete(); }else{ oCV.updateSkipToNavigationLink(true); } } } } this.showReport(); this.getViewer().renderTabs(); this.onAsynchStatusUpdate(_ecf); }; RequestHandler.prototype.postComplete=function(){ this.parent.postComplete.call(this); var oCV=this.getViewer(); var _ed3=document.getElementById("RVContent"+oCV.getId()); if(_ed3){ _ed3.scrollTop=0; } oCV.updateSkipToReportLink(); if(oCV.rvMainWnd){ oCV.updateLayout(oCV.getStatus()); if(!oCV.getUIConfig()||oCV.getUIConfig().getShowToolbar()){ var _ed4=oCV.rvMainWnd.getToolbar(); if(_ed4){ oCV.rvMainWnd.updateToolbar(oCV.outputFormat); _ed4.draw(); } } if(!oCV.getUIConfig()||oCV.getUIConfig().getShowBanner()){ var _ed5=oCV.rvMainWnd.getBannerToolbar(); if(_ed5){ _ed5.draw(); } } } if(oCV.getBrowser()=="moz"){ if(_ed3){ if(oCV.outputFormat=="XML"&&oCV.getStatus()!="prompting"){ _ed3.style.overflow="hidden"; }else{ _ed3.style.overflow="auto"; } } } oCV.gbPromptRequestSubmitted=false; this.showReport(); if(oCV.getPinFreezeManager()&&oCV.getPinFreezeManager().hasFrozenContainers()){ var _ed6=document.getElementById("CVReport"+oCV.getId()); if(_ed6){ setTimeout(function(){ oCV.getPinFreezeManager().renderReportWithFrozenContainers(_ed6); if(isIE()){ oCV.repaintDiv(_ed3); } },1); } } oCV.setMaxContentSize(); oCV.executeCallback("done"); oCV.doneLoading(); }; function ActionFormFields(_ed7){ this.m_dispatcherEntry=_ed7; this.m_oCV=_ed7.getViewer(); }; ActionFormFields.prototype.addFormFields=function(){ var _ed8=this.m_dispatcherEntry; var _ed9=_ed8.getAction(); _ed9.preProcess(); _ed8.addFormField("ui.action","modifyReport"); if(this.m_oCV.getModelPath()!==""){ _ed8.addFormField("modelPath",this.m_oCV.getModelPath()); if(typeof this.m_oCV.envParams["metaDataModelModificationTime"]!="undefined"){ _ed8.addFormField("metaDataModelModificationTime",this.m_oCV.envParams["metaDataModelModificationTime"]); } } if(_ed9.doAddActionContext()===true){ var _eda=_ed9.addActionContext(); _ed8.addFormField("cv.actionContext",_eda); if(window.gViewerLogger){ window.gViewerLogger.log("Action context",_eda,"xml"); } } var _edb=this.m_oCV.envParams["bux"]=="true"; if(_edb){ _ed8.addFormField("cv.showFaultPage","false"); }else{ _ed8.addFormField("cv.showFaultPage","true"); } _ed8.addFormField("ui.object",this.m_oCV.envParams["ui.object"]); _ed8.addDefinedFormField("ui.spec",this.m_oCV.envParams["ui.spec"]); _ed8.addDefinedFormField("modelPath",this.m_oCV.envParams["modelPath"]); _ed8.addDefinedFormField("packageBase",this.m_oCV.envParams["packageBase"]); _ed8.addDefinedFormField("rap.state",this.m_oCV.envParams["rap.state"]); _ed8.addDefinedFormField("rap.reportInfo",this.m_oCV.envParams["rapReportInfo"]); _ed8.addDefinedFormField("ui.primaryAction",this.m_oCV.envParams["ui.primaryAction"]); _ed8.addNonNullFormField("cv.debugDirectory",this.m_oCV.envParams["cv.debugDirectory"]); _ed8.addNonNullFormField("ui.objectClass",this.m_oCV.envParams["ui.objectClass"]); _ed8.addNonNullFormField("bux",this.m_oCV.envParams["bux"]); _ed8.addNonNullFormField("baseReportModificationTime",this.m_oCV.envParams["baseReportModificationTime"]); _ed8.addNonNullFormField("originalReport",this.m_oCV.envParams["originalReport"]); var _edc=this.m_oCV.getFlashChartOption(); if(_edc!=null){ _ed8.addFormField("savedFlashChartOption",_edc); if(_edc&&_ed9!=null&&typeof (_ed9.m_requestParams)!="undefined"&&typeof (_ed9.m_requestParams.targetType)!="undefined"){ var _edd=false; var _ede=null; if(typeof (_ed9.m_requestParams.targetType.targetType)!="undefined"){ _ede=_ed9.m_requestParams.targetType.targetType; }else{ _ede=_ed9.m_requestParams.targetType; } if(_ede.match("v2_")!=null||_ede.match("_v2")!=null){ _edd=true; }else{ var _edf=this.m_oCV.getRAPReportInfo(); var _ee0=_ed9.getSelectedReportInfo(); if(_edf&&_ee0){ var _ee1=_edf.getDisplayTypes(_ee0.container); if(_ee1.match("v2_")!=null||_ee1.match("_v2")!=null){ _edd=true; } } } _ed8.addFormField("hasAVSChart",_edd); }else{ _ed8.addFormField("hasAVSChart",this.m_oCV.hasAVSChart()); } } var sEP=this.m_oCV.getExecutionParameters(); if(sEP){ _ed8.addFormField("executionParameters",encodeURIComponent(sEP)); } _ed8.addFormField("ui.conversation",encodeURIComponent(this.m_oCV.getConversation())); _ed8.addFormField("m_tracking",encodeURIComponent(this.m_oCV.getTracking())); var sCAF=this.m_oCV.getCAFContext(); if(sCAF){ _ed8.addFormField("ui.cafcontextid",sCAF); } if(_ed9.forceRunSpecRequest()){ _ed8.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(_ee4){ this.m_bUsePageRequest=_ee4; }; ViewerDispatcher.prototype.getUsePageRequest=function(){ return this.m_bUsePageRequest; }; ViewerDispatcher.prototype.dispatchRequest=function(_ee5){ if(this.m_activeRequest==null){ this.startRequest(_ee5); }else{ if(_ee5.canBeQueued()==true){ this.m_requestQueue.push(_ee5); }else{ if(window.cognosViewerDebug&&console&&console.warn){ console.warn("Warning! Dropped a dispatcher entry!"); } } } }; ViewerDispatcher.prototype.startRequest=function(_ee6){ this.m_activeRequest=_ee6; if(_ee6!=null){ _ee6.setUsePageRequest(this.m_bUsePageRequest); _ee6.sendRequest(); } }; ViewerDispatcher.prototype.cancelRequest=function(key){ for(var i=0;i0){ _eeb=this.m_requestQueue.shift(); if(_eeb.getKey()!=null){ while(this.m_requestQueue.length>0&&this.m_requestQueue[0].getKey()==_eeb.getKey()){ _eeb=this.m_requestQueue.shift(); } } } return _eeb; }; 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(_eed){ this.m_request.setHeaders(_eed); }; DispatcherEntry.prototype.getHeaders=function(){ return this.m_request.getHeaders(); }; DispatcherEntry.prototype.setOriginalFormFields=function(_eee){ this.m_originalFormFields=_eee; }; DispatcherEntry.prototype.getOriginalFormFields=function(){ return this.m_originalFormFields; }; DispatcherEntry.prototype.setRequestHandler=function(_eef){ _eef.addCallbackHooks(); this.m_requestHandler=_eef; }; DispatcherEntry.prototype.getRequestHandler=function(){ return this.m_requestHandler; }; DispatcherEntry.prototype.setWorkingDialog=function(_ef0){ if(this.getRequestHandler()){ this.m_requestHandler.setWorkingDialog(_ef0); } }; DispatcherEntry.prototype.setRequestIndicator=function(_ef1){ if(this.getRequestHandler()){ this.getRequestHandler().setRequestIndicator(_ef1); } }; DispatcherEntry.prototype.forceSynchronous=function(){ this.getRequest().forceSynchronous(); }; DispatcherEntry.prototype.setUsePageRequest=function(_ef2){ this.m_bUsePageRequest=_ef2; }; DispatcherEntry.prototype.getUsePageRequest=function(){ return this.m_bUsePageRequest; }; DispatcherEntry.prototype.setDefaultFormFields=function(){ var _ef3=this.getViewer().envParams; this.addFormField("b_action","cognosViewer"); this.addFormField("cv.catchLogOnFault","true"); this.addDefinedNonNullFormField("protectParameters",_ef3["protectParameters"]); this.addDefinedNonNullFormField("ui.routingServerGroup",_ef3["ui.routingServerGroup"]); this.addDefinedNonNullFormField("cv.debugDirectory",_ef3["cv.debugDirectory"]); this.addDefinedNonNullFormField("cv.showFaultPage",_ef3["cv.showFaultPage"]); this.addDefinedNonNullFormField("cv.useRAPDrill",_ef3["cv.useRAPDrill"]); this.addDefinedNonNullFormField("container",_ef3["container"]); this.addNonEmptyStringFormField("cv.objectPermissions",_ef3["cv.objectPermissions"]); }; DispatcherEntry.prototype.getViewer=function(){ return this.m_oCV; }; DispatcherEntry.prototype.prepareRequest=function(){ }; DispatcherEntry.addWidgetInfoToFormFields=function(_ef4,_ef5){ if(_ef4){ var _ef6=_ef4.getBUXRTStateInfoMap(); if(_ef6){ _ef5.addFormField("cv.buxRTStateInfo",_ef6); } var _ef7=_ef4.getDisplayName(); if(_ef7&&_ef7.length>0){ _ef5.addFormField("displayTitle",_ef7); } } }; DispatcherEntry.prototype.canBeQueued=function(){ return this.m_canBeQueued; }; DispatcherEntry.prototype.setCanBeQueued=function(_ef8){ this.m_canBeQueued=_ef8; }; DispatcherEntry.prototype.getKey=function(){ return this.m_requestKey; }; DispatcherEntry.prototype.setKey=function(key){ this.m_requestKey=key; }; DispatcherEntry.prototype.setRequest=function(_efa){ this.m_request=_efa; }; DispatcherEntry.prototype.getRequest=function(){ return this.m_request; }; DispatcherEntry.prototype.setCallbacks=function(_efb){ this.getRequest().setCallbacks(_efb); }; DispatcherEntry.prototype.getCallbacks=function(){ return this.getRequest().getCallbacks(); }; DispatcherEntry.prototype.sendRequest=function(){ this.prepareRequest(); var _efc=this.getRequest().getFormFields(); var _efd=_efc.keys(); if(!this.m_originalFormFields){ this.m_originalFormFields=new CDictionary(); for(var _efe=0;_efe<_efd.length;_efe++){ this.m_originalFormFields.add(_efd[_efe],_efc.get(_efd[_efe])); } } this.getRequest().sendRequest(); }; DispatcherEntry.prototype.onNewRequest=function(_eff){ this.setRequest(_eff); }; DispatcherEntry.prototype.retryRequest=function(){ var oCV=this.getViewer(); oCV.setRetryDispatcherEntry(null); var _f01=this.getRequest().newRequest(); _f01.setHeaders(null); this.setRequest(_f01); var _f02=this.m_originalFormFields.keys(); for(var _f03=0;_f03<_f02.length;_f03++){ var _f04=_f02[_f03]; var _f05=this.m_originalFormFields.get(_f04); if(_f04=="cv.responseFormat"&&_f05=="iWidget"){ this.addFormField("cv.responseFormat","data"); }else{ if(_f04=="ui.action"&&_f05=="wait"){ this.addFormField("ui.action",this.m_originalFormFields.get("ui.primaryAction")); }else{ if(_f04!="m_tracking"&&_f04!="cv.outputKey"){ this.addFormField(_f04,_f05); } } } } 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(_f06){ if(!this.m_bCancelCalled){ this.m_bCancelCalled=true; if(this.getRequestHandler()){ this.getRequestHandler().onCancel(); } if(_f06){ 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,_f0b){ this.m_request.addFormField(name,_f0b); }; DispatcherEntry.prototype.addDefinedNonNullFormField=function(name,_f0d){ if(typeof _f0d!="undefined"&&_f0d!=null){ this.addFormField(name,_f0d); } }; DispatcherEntry.prototype.addDefinedFormField=function(name,_f0f){ if(typeof _f0f!="undefined"){ this.addFormField(name,_f0f); } }; DispatcherEntry.prototype.addNonNullFormField=function(name,_f11){ if(_f11!=null){ this.addFormField(name,_f11); } }; DispatcherEntry.prototype.addNonEmptyStringFormField=function(name,_f13){ if(typeof _f13!="undefined"&&_f13!=null&&_f13!=""){ this.addFormField(name,_f13); } }; DispatcherEntry.prototype.onWorking=function(_f14,arg1){ if(this.getRequestHandler()){ this.getRequestHandler().onWorking(_f14); } }; DispatcherEntry.prototype.onFault=function(_f16){ if(this.getRequestHandler()){ this.getRequestHandler().onFault(_f16); } }; DispatcherEntry.prototype.onError=function(_f17){ if(this.m_bCancelCalled){ return; } if(this.getRequestHandler()){ this.getRequestHandler().onError(_f17); } }; DispatcherEntry.prototype.possibleUnloadEvent=function(){ this.setCallbacks({"error":{}}); }; DispatcherEntry.prototype.onPreHttpRequest=function(_f18){ if(this.getRequestHandler()){ this.getRequestHandler().preHttpRequest(_f18); } }; DispatcherEntry.prototype.onPostHttpRequest=function(_f19){ if(this.getRequestHandler()){ this.getRequestHandler().postHttpRequest(_f19); } }; DispatcherEntry.prototype.onPassportTimeout=function(_f1a){ if(this.getRequestHandler()){ this.getRequestHandler().onPassportTimeout(_f1a); } }; DispatcherEntry.prototype.onPrompting=function(_f1b){ if(this.getRequestHandler()){ this.getRequestHandler().onPrompting(_f1b); } }; DispatcherEntry.prototype.onEntryComplete=function(_f1c){ if(!this.m_oCV._beingDestroyed){ this.m_oCV.getViewerDispatcher().requestComplete(this); } }; DispatcherEntry.prototype.onEntryFault=function(_f1d){ this.m_oCV.setFaultDispatcherEntry(this); this.m_oCV.resetViewerDispatcher(); if(!this.m_bCancelCalled){ this.m_oCV.setRetryDispatcherEntry(this); } }; DispatcherEntry.prototype.onCloseErrorDlg=function(){ var _f1e=this.getCallbacks(); if(_f1e["closeErrorDlg"]){ var _f1f=GUtil.generateCallback(_f1e["closeErrorDlg"].method,[],_f1e["closeErrorDlg"].object); _f1f(); } }; DispatcherEntry.prototype.onPostEntryComplete=function(){ if(this.getRequestHandler()){ this.getRequestHandler().onPostEntryComplete(); } this.executeCallback("postComplete"); }; DispatcherEntry.prototype.executeCallback=function(_f20){ var _f21=this.getCallbacks(); if(_f21[_f20]){ var _f22=(_f21.customArguments)?[this,_f21.customArguments]:[this]; var _f23=GUtil.generateCallback(_f21[_f20].method,_f22,_f21[_f20].object); _f23(); 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 _f27=new AsynchDATARequest(oCV.getGateway(),oCV.getWebContentRoot()); this.setRequest(_f27); 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 _f29=new AsynchJSONRequest(oCV.getGateway(),oCV.getWebContentRoot()); this.setRequest(_f29); 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 _f2b=this.getFormField("ui.action"); var _f2c=this.getViewer().getActionState(); if(_f2c!==""&&(_f2b=="wait"||_f2b=="forward"||_f2b=="back")){ this.addFormField("cv.actionState",_f2c); } var _f2d=["nextPage","previousPage","firstPage","lastPage","reportAction","cancel","wait"]; var _f2e=true; for(var i=0;i<_f2d.length;i++){ if(_f2d[i]==_f2b){ _f2e=false; break; } } if(_f2e){ 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 _f31=oCV.envParams; this.addFormField("cv.id",oCV.getId()); if(_f31["cv.showFaultPage"]){ this.addFormField("cv.showFaultPage",_f31["cv.showFaultPage"]); }else{ this.addFormField("cv.showFaultPage","false"); } this.addDefinedNonNullFormField("ui.object",_f31["ui.object"]); this.addDefinedNonNullFormField("ui.primaryAction",_f31["ui.primaryAction"]); this.addDefinedNonNullFormField("ui.objectClass",_f31["ui.objectClass"]); this.addNonEmptyStringFormField("specificationType",_f31["specificationType"]); this.addNonEmptyStringFormField("cv.promptForDownload",_f31["cv.promptForDownload"]); this.addNonEmptyStringFormField("ui.conversation",oCV.getConversation()); this.addNonEmptyStringFormField("m_tracking",oCV.getTracking()); var _f32=oCV.getExecutionParameters(); this.addNonEmptyStringFormField("executionParameters",_f32); var sCAF=oCV.getCAFContext(); this.addDefinedNonNullFormField("ui.cafcontextid",sCAF); }; ReportDispatcherEntry.prototype.onWorking=function(_f34,arg1){ var _f36=_f34.getResponseState(); var _f37=this.getRequestHandler(); if(_f37){ var _f38=_f37.getWorkingDialog(); if(_f38&&_f38.setSecondaryRequests&&_f36.m_aSecRequests){ _f38.setSecondaryRequests(_f36.m_aSecRequests); } } DispatcherEntry.prototype.onWorking.call(this,_f34,arg1); if(_f37){ this.getRequestHandler().updateViewerState(_f36); } }; ReportDispatcherEntry.prototype.onComplete=function(_f39,arg1){ if(this.getRequestHandler()){ this.getRequestHandler().onComplete(_f39); } }; 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 _f3d=oCV.envParams; this.addFormField("cv.showFaultPage","true"); this.addDefinedNonNullFormField("cv.header",_f3d["cv.header"]); this.addDefinedNonNullFormField("cv.toolbar",_f3d["cv.toolbar"]); this.addDefinedNonNullFormField("ui.backURL",_f3d["ui.backURL"]); this.addDefinedNonNullFormField("errURL",_f3d["ui.backURL"]); this.addDefinedNonNullFormField("errURL",_f3d["ui.errURL"]); this.addDefinedNonNullFormField("cv.catchLogOnFault","true"); this.addDefinedNonNullFormField("m_sessionConv",_f3d["m_sessionConv"]); if(_f3d["m_session"]){ this.addFormField("m_session",_f3d["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 _f3e=this.m_oCV.getPinFreezeManager(); if(_f3e&&_f3e.hasFrozenContainers()){ this.addFormField("pinFreezeInfo",_f3e.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 _f3f=this.buildRequestForm(); if(typeof document.progress!="undefined"){ setTimeout("document.progress.src=\""+this.m_oCV.getSkin()+"/branding/progress.gif"+"\";",1); } _f3f.submit(); }else{ this.getViewer().closeContextMenuAndToolbarMenus(); this.parent.sendRequest.call(this); } }; ViewerDispatcherEntry.prototype.buildRequestForm=function(){ var oCV=this.getViewer(); var _f41=document.createElement("form"); _f41.setAttribute("id","requestForm"); _f41.setAttribute("name","requestForm"); _f41.setAttribute("method","post"); _f41.setAttribute("target","_self"); _f41.setAttribute("action",oCV.getGateway()); _f41.style.display="none"; document.body.appendChild(_f41); var _f42=this.getRequest().getFormFields(); var _f43=_f42.keys(); for(var _f44=0;_f44<_f43.length;_f44++){ _f41.appendChild(this.createHiddenFormField(_f43[_f44],_f42.get(_f43[_f44]))); } for(param in oCV.envParams){ if(!_f42.exists(param)&¶m!="cv.actionState"){ _f41.appendChild(this.createHiddenFormField(param,oCV.envParams[param])); } } return _f41; }; ViewerDispatcherEntry.prototype.createHiddenFormField=function(name,_f46){ var _f47=document.createElement("input"); _f47.setAttribute("type","hidden"); _f47.setAttribute("name",name); _f47.setAttribute("id",name); _f47.setAttribute("value",_f46); return (_f47); }; ViewerDispatcherEntry.prototype.onCancel=function(){ var oCV=this.getViewer(); oCV.setStatus("complete"); if(this.getUsePageRequest()||!oCV.isReportRenderingDone()){ oCV.executeCallback("cancel"); } }; ViewerDispatcherEntry.prototype.onFault=function(_f49){ if(this.getViewer().callbackExists("fault")){ this.getViewer().setSoapFault(_f49.getSoapFault()); this.getViewer().executeCallback("fault"); }else{ this.parent.onFault.call(this,_f49); } }; ViewerDispatcherEntry.prototype.onComplete=function(_f4a){ var oCV=this.getViewer(); oCV.saveBackJaxInformation(_f4a); if(oCV.isReportRenderingDone()){ this.getViewer().getSelectionController().resetSelections(); } this.parent.onComplete.call(this,_f4a); }; ViewerDispatcherEntry.prototype.onPrompting=function(_f4c){ var oCV=this.getViewer(); oCV.updateSkipToNavigationLink(true); if(!oCV.executeCallback("prompt")){ this.onComplete(_f4c); } }; ViewerDispatcherEntry.prototype.onEntryComplete=function(_f4e){ if(this.getRequestHandler()){ this.getRequestHandler().setDispatcherEntry(this); } this.parent.onEntryComplete.call(this,_f4e); };