/* *+------------------------------------------------------------------------+ *| 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 CUIStyle(_15d,_15e,_15f,_160,_161){ this.m_active=_15d; this.m_normal=_15d; this.m_rollover=_15e; this.m_activeRollover=_15e; this.m_depressed=_15f; this.m_depressed_rollover=_160; this.m_disabled=_161; }; function CUIStyle_getActiveState(){ return this.m_active; }; function CUIStyle_setActiveState(_162){ switch(_162){ case "normal": this.m_active=this.m_normal; break; case "depressed": this.m_active=this.m_depressed; break; case "disabled": this.m_active=this.m_disabled; break; default: this.m_active=this.m_normal; } }; function CUIStyle_getActiveRolloverState(){ return this.m_activeRollover; }; function CUIStyle_setActiveRolloverState(_163){ switch(_163){ case "normal": this.m_activeRollover=this.m_rollover; break; case "depressed": this.m_activeRollover=this.m_depressed_rollover; break; case "disabled": this.m_activeRollover=this.m_disabled; break; default: this.m_activeRollover=this.m_rollover; } }; function CUIStyle_getNormalState(){ return this.m_normal; }; function CUIStyle_getRolloverState(){ return this.m_rollover; }; function CUIStyle_getDepressedState(){ return this.m_depressed; }; function CUIStyle_getDepressedRolloverState(){ return this.m_depressed_rollover; }; function CUIStyle_getDisabledState(){ return this.m_disabled; }; function CUIStyle_setNormalState(_164){ this.m_normal=_164; }; function CUIStyle_setRolloverState(_165){ this.m_rollover=_165; }; function CUIStyle_setDepressedState(_166){ this.m_depressed=_166; }; function CUIStyle_setDepressedRolloverState(_167){ this.m_depressed_rollover=_167; }; function CUIStyle_setDisabledState(_168){ this.m_disabled=_168; }; CUIStyle.prototype.getNormalState=CUIStyle_getNormalState; CUIStyle.prototype.getRolloverState=CUIStyle_getRolloverState; CUIStyle.prototype.getDepressedState=CUIStyle_getDepressedState; CUIStyle.prototype.getDepressedRolloverState=CUIStyle_getDepressedRolloverState; CUIStyle.prototype.getDisabledState=CUIStyle_getDisabledState; CUIStyle.prototype.setNormalState=CUIStyle_setNormalState; CUIStyle.prototype.setRolloverState=CUIStyle_setRolloverState; CUIStyle.prototype.setDepressedState=CUIStyle_setDepressedState; CUIStyle.prototype.setDepressedRolloverState=CUIStyle_setDepressedRolloverState; CUIStyle.prototype.setDisabledState=CUIStyle_setDisabledState; CUIStyle.prototype.setActiveState=CUIStyle_setActiveState; CUIStyle.prototype.getActiveState=CUIStyle_getActiveState; CUIStyle.prototype.getActiveRolloverState=CUIStyle_getActiveRolloverState; CUIStyle.prototype.setActiveRolloverState=CUIStyle_setActiveRolloverState; function CToolbarSelect(_169,name,_16b,_16c,_16d){ this.m_parent=_169; this.m_name=name; this.m_command=_16b; this.m_label=_16c; this.m_toolTip=_16d; this.m_items=[]; if(typeof this.m_parent=="object"&&typeof this.m_parent.add=="function"){ this.m_parent.add(this); } if(_16c){ this.add("",_16c); } }; function CToolbarSelect_draw(){ var html=""; }else{ _248+=""; } _248+=this.m_properties[i].name; _248+=" "; _248+=""; }else{ _248+=""; _248+=this.m_properties[i].name; _248+=" "; _248+=this.m_properties[i].value; _248+=""; } _249+=this.m_properties[i].name+" "+this.m_properties[i].value+", "; } } var id=this.getId()?"id=\""+this.getId()+"\" ":""; var _24b=""; html+=_24b+_248+"
"; } html+=""; return html; }; function CInfoPanel_getSize(){ return this.m_size; }; function CInfoPanel_setSize(size){ this.m_size=size; }; function CInfoPanel_hide(){ this.m_bVisible=false; }; function CInfoPanel_show(){ this.m_bVisible=true; }; function CInfoPanel_isVisible(){ return this.m_bVisible; }; function CInfoPanel_isEnabled(){ return true; }; function CInfoPanel_onkeydown(evt){ var _24e=null; if(typeof this.infoPanel!="undefined"){ _24e=this.infoPanel; }else{ if(this instanceof CInfoPanel){ _24e=this; } } if(_24e==null||!(_24e instanceof CInfoPanel)){ return; } return CMenuEntry_onkeydown.call(_24e,evt); }; function CInfoPanel_onkeypress(evt){ evt=(evt)?evt:((event)?event:null); var _250=null; if(typeof this.infoPanel!="undefined"){ _250=this.infoPanel; }else{ if(this instanceof CInfoPanel){ _250=this; } } if(_250!=null&&_250 instanceof CInfoPanel){ return CMenuEntry_onkeypress.call(_250,evt); } }; function CInfoPanel_setFocus(){ if(this.getId()){ document.getElementById(this.getId()).focus(); } }; function CInfoPanel_attachEvents(){ if(typeof this.getParent().getHTMLContainer!="function"){ return; } var _251=this.getParent().getHTMLContainer(); if(_251==null){ return; } var _252=eval(_251.document?_251.document.getElementById(this.getId()):_251.ownerDocument.getElementById(this.getId())); if(_252==null){ return; } _252.onkeypress=this.onkeypress; _252.onkeydown=this.onkeydown; _252.infoPanel=eval(this); }; CInfoPanel.prototype.draw=CInfoPanel_draw; CInfoPanel.prototype.onkeypress=CInfoPanel_onkeypress; CInfoPanel.prototype.onkeydown=CInfoPanel_onkeydown; CInfoPanel.prototype.addProperty=CInfoPanel_addProperty; CInfoPanel.prototype.addCheckedProperty=CInfoPanel_addCheckedProperty; CInfoPanel.prototype.addSpacer=CInfoPanel_addSpacer; CInfoPanel.prototype.setSize=CInfoPanel_setSize; CInfoPanel.prototype.getSize=CInfoPanel_getSize; CInfoPanel.prototype.isVisible=CInfoPanel_isVisible; CInfoPanel.prototype.show=CInfoPanel_show; CInfoPanel.prototype.hide=CInfoPanel_hide; CInfoPanel.prototype.isEnabled=CInfoPanel_isEnabled; CInfoPanel.prototype.setFocus=CInfoPanel_setFocus; CInfoPanel.prototype.attachEvents=CInfoPanel_attachEvents; var g_ownerDocument=null; function CMenu(id,_254,_255){ this.m_htmlContainer=document.body; this.m_bVisible=false; this.m_id=id; this.m_htmlDivElement=null; this.m_parent=null; this.m_menuItems=[]; this.m_style=_254; this.m_callback=null; this.m_observers=new CObserver(this); this.m_bForceCallback=false; this.m_loadingMenuItem=false; this.m_oCV=null; if(typeof _255!="undefined"&&_255!=""){ this.m_webContentRoot=_255; }else{ this.m_webContentRoot=".."; } }; function CMenu_setHTMLContainer(_256){ this.m_htmlContainer=_256; g_ownerDocument=this.m_htmlContainer.document?this.m_htmlContainer.document:this.m_htmlContainer.ownerDocument; }; function CMenu_getHTMLContainer(){ return this.m_htmlContainer; }; function CMenu_setParent(_257){ this.m_parent=_257; }; function CMenu_getParent(){ return this.m_parent; }; function CMenu_getId(){ return this.m_id; }; function CMenu_getHTMLDiv(){ return this.m_htmlDivElement; }; function CMenu_create(){ var _258=this.m_htmlContainer.document?this.m_htmlContainer.document.createElement("div"):this.m_htmlContainer.ownerDocument.createElement("div"); if(typeof this.getStyle()=="object"){ _258.className=this.getStyle().getNormalState(); } _258.style.display="none"; _258.style.visibility="hidden"; _258.style.position="absolute"; _258.style.left="0px"; _258.style.top="0px"; _258.id=this.m_id; _258.setAttribute("role","region"); if(window.RV_RES){ _258.setAttribute("aria-label",RV_RES.IDS_JS_A11Y_DYNAMIC_MENU); } this.m_htmlContainer.appendChild(_258); this.m_htmlDivElement=_258; }; function CMenu_setAltText(_259){ this.m_altText=_259; }; function CMenu_getAltText(){ if(this.m_altText){ return this.m_altText; }else{ return ""; } }; function CMenu_genARIATags(){ var html=" role=\"menu\""; if(this.getAltText()&&this.getAltText().length>0){ html+=" aria-labelledby=\""+this.m_id+"label\" "; }else{ if(window.RV_RES){ html+=" aria-label=\""+RV_RES.IDS_JS_A11Y_DYNAMIC_MENU+"\" "; } } return html; }; function CMenu_genMenuAltText(){ var html=""; if(this.getAltText()&&this.getAltText().length>0){ html+="
"+this.getAltText()+"
"; } return html; }; function CMenu_draw(){ if(this.m_htmlContainer==null){ return; } if(this.m_htmlDivElement==null){ this.create(); } var html=""; if(this.m_menuItems.length==0||this.m_bForceCallback==true){ this.setForceCallback(false); if(this.m_callback!=null){ this.setLoadingMenuItem(true); var menu=this; var _25e=function(){ if(menu&&menu.executeCallback){ menu.executeCallback(); } }; setTimeout(_25e,1000); html=""; html+=""; html+=""; html+=""; html+="
"; html+=_25f; html+="
"; } }else{ this.setLoadingMenuItem(false); var i=0; html="0||typeof document.body.scrollTop=="undefined"||document.body.scrollTop==document.documentElement.scrollTop)){ _265={"x":document.documentElement.scrollLeft,"y":document.documentElement.scrollTop}; }else{ if(typeof document.body.scrollTop!="undefined"){ _265={"x":document.body.scrollLeft,"y":document.body.scrollTop}; } } } return _265; }; function AdjustPortalFont(div){ var _267=fragments; if(_267){ div.className+=" PortalFontFix"; var _268=null; for(var frag in _267){ if(frag.indexOf("rvCanvas")>-1){ _268=$(_267[frag].div); if(_268!=null){ break; } } } if(_268!=null){ div.style.fontSize=xGetComputedStyle(_268,"font-size"); } } }; function CMenu_updateCoords(){ var _26a=this.getParent(); var mnu=this.m_htmlDivElement; if(mnu!=null){ var _26c=this.m_htmlContainer.document?this.m_htmlContainer.document:this.m_htmlContainer.ownerDocument; var _26d=mnu.style.visibility; var _26e=mnu.style.display; mnu.style.visibility="hidden"; mnu.style.display="block"; if(mnu.firstChild!=null){ mnu.style.width=mnu.firstChild.offsetWidth; } var x=0,y=0; var db=mnu.parentNode; var _272=db.clientWidth; var _273=db.clientHeight; var _274=CMenu_getScrollingPosition(); var _275=_274.x; var _276=_274.y; if(_26a==null){ x=mnu.style.left; y=mnu.style.top; if(x.substr(x.length-2,2)=="px"){ x=parseInt(x.substring(0,x.length-2),10); y=parseInt(y.substring(0,y.length-2),10); } if(y+mnu.offsetHeight>=(_273)){ if(y-mnu.offsetHeight>0){ y=y+_276-mnu.offsetHeight; }else{ y=Math.max(_273-mnu.offsetHeight,0); } }else{ y=y+_276; } if(x+mnu.offsetWidth>=(_272)){ if(x-mnu.offsetWidth>0){ x=x+_275-mnu.offsetWidth; }else{ x=Math.max(_272-mnu.offsetWidth,0); } }else{ x=x+_275; } }else{ if(!(_26a instanceof CToolbarButton)&&!(_26a instanceof CMenuItem)){ return; } if(typeof _26a.getMenuType!="function"){ return; } var _277=_26c.getElementById(this.getParent().getId()); var _278=_26c.getElementById("menu"+this.getParent().getId()); if(_277==null){ return; } var _279=_277; if(_26a.getMenuType()=="dropDown"){ x=0; y=_277.offsetHeight; while(_279!=null){ x+=_279.offsetLeft; y+=_279.offsetTop; _279=_279.offsetParent; } if(getViewerDirection()=="rtl"){ var _27a=x-(mnu.offsetWidth-_277.offsetWidth); if(_27a>_275){ x=_27a; } } if((typeof gCognosViewer!="undefined")&&(gCognosViewer.envParams["cv.responseFormat"])&&(gCognosViewer.envParams["cv.responseFormat"]=="fragment")){ var _27b=_277; while((_27b!=document.body)&&(_27b=_27b.parentNode)){ x-=_27b.scrollLeft||0; y-=_27b.scrolltop||0; } } if((x+mnu.offsetWidth)>(_272+_275)){ x=x+_277.offsetWidth-mnu.offsetWidth; if(_278!=null){ x=x+_278.offsetWidth; } } if(((y+mnu.offsetHeight)>(_273+_276))&&(y-(mnu.offsetHeight+_277.clientHeight)>=0)){ y-=(mnu.offsetHeight+_277.clientHeight); } }else{ if(_26a.getMenuType()=="cascaded"){ x=_277.offsetWidth; while(_279!=null){ x+=_279.offsetLeft; y+=_279.offsetTop; _279=_279.offsetParent; } if(getViewerDirection()=="rtl"){ var _27a=x-(mnu.offsetWidth+_277.offsetWidth); if(_27a>_275){ x=_27a; } } if((x+mnu.offsetWidth)>(_272+_275)){ x-=(_277.offsetWidth+mnu.offsetWidth); } if((y+mnu.offsetHeight)>(_273+_276)){ y-=(mnu.offsetHeight-_277.clientHeight); } } } } mnu.style.visibility=_26d; mnu.style.display=_26e; this.setXCoord(x); this.setYCoord(y); this.setZIndex(500); } }; function CMenu_add(_27c){ if(typeof _27c.getObservers=="function"&&typeof _27c.getObservers()=="object"){ _27c.getObservers().attach(this,this.closeSubMenus,_27c.onmouseover); _27c.getObservers().attach(this,this.closeAllMenus,_27c.onmouseup); _27c.getObservers().attach(this,this.closeSubMenus,_27c.onfocus); _27c.getObservers().attach(this,this.closeAllMenus,_27c.onkeypress); } this.m_menuItems[this.m_menuItems.length]=_27c; }; function CMenu_get(_27d){ if(_27d>=0&&_27d0){ html+=this.m_toolTip; } html+="\" alt=\""; if(typeof this.m_toolTip=="string"&&this.m_toolTip.length>0){ html+=this.m_toolTip; } html+="\" width=\""; html+=this.m_width; html+="\" height=\""; html+=this.m_height; html+="\"/>"; }else{ html+=this.m_webContentRoot+"/common/images/spacer.gif"; html+="\" alt=\"\""; if(this.m_iconPath=="blankIcon"){ html+=" width=\""; html+=this.m_width; html+="\" height=\""; html+=this.m_height; html+="\"/>"; }else{ html+=" width=\"1\" height=\"1\"/>"; } } return html; }; function CIcon_getDisabledImagePath(){ var _2b4=this.m_iconPath.split("/"); var _2b5=""; for(var i=0;i<(_2b4.length-1);++i){ _2b5+=_2b4[i]+"/"; } _2b5+="dis_"+_2b4[_2b4.length-1]; return _2b5; }; function CIcon_getPath(){ return this.m_iconPath; }; function CIcon_setPath(path){ this.m_iconPath=path; }; function CIcon_getToolTip(){ return this.m_toolTip; }; function CIcon_setToolTip(_2b8){ this.m_toolTip=_2b8; }; function CIcon_enable(){ this.m_enabled=true; }; function CIcon_disable(){ this.m_enabled=false; }; function CIcon_isEnabled(){ return this.m_enabled; }; function CIcon_setHeight(_2b9){ this.m_height=_2b9; }; function CIcon_getHeight(){ return this.m_height; }; function CIcon_setWidth(_2ba){ this.m_width=_2ba; }; function CIcon_getWidth(){ return this.m_width; }; CIcon.prototype.draw=CIcon_draw; CIcon.prototype.enable=CIcon_enable; CIcon.prototype.disable=CIcon_disable; CIcon.prototype.isEnabled=CIcon_isEnabled; CIcon.prototype.getDisabledImagePath=CIcon_getDisabledImagePath; CIcon.prototype.getPath=CIcon_getPath; CIcon.prototype.setPath=CIcon_setPath; CIcon.prototype.setHeight=CIcon_setHeight; CIcon.prototype.getHeight=CIcon_getHeight; CIcon.prototype.setWidth=CIcon_setWidth; CIcon.prototype.getWidth=CIcon_getWidth; CIcon.prototype.getToolTip=CIcon_getToolTip; CIcon.prototype.setToolTip=CIcon_setToolTip; var cHorizonalBar=0; var cVerticalBar=1; function CBar(_2bb,_2bc,sId,_2be,_2bf,_2c0,_2c1,_2c2){ this.m_align="left"; this.m_items=[]; this.m_htmlContainerId=_2bb; this.m_htmlContainer=null; this.m_id="cbar"+_2bb; this.m_menuType=cVerticalBar; this.m_style=_2bc; this.m_parent=null; this.m_observers=new CObserver(this); this.m_cookieVar=_2c1; this.m_cookieName=_2c2; this.m_sId=(sId)?sId:null; this.m_display=DISPLAY_INLINE; this.m_imagePath=(_2be)?_2be:"../common/images/toolbar/"; this.m_imgCollapseSrc=this.m_imagePath+"toolbar_collapse.gif"; this.m_imgExpandSrc=this.m_imagePath+"toolbar_expand.gif"; this.m_showTooltip=_2bf?_2bf:null; this.m_hideTooltip=_2c0?_2c0:null; }; function CBar_hideBar(){ var bar=document.getElementById("bar"+this.m_id); var _2c4=document.getElementById("barIcon"+this.m_id); if(_2c4){ _2c4.src=this.m_imgExpandSrc; if(this.m_showTooltip!=null){ _2c4.alt=this.m_showTooltip; _2c4.title=this.m_showTooltip; } } if(bar){ bar.style.display=DISPLAY_NONE; if(typeof setQSCookie=="function"){ setQSCookie(this.m_cookieVar,this.m_cookieName,0); } } }; function CBar_showBar(){ var bar=document.getElementById("bar"+this.m_id); var _2c6=document.getElementById("barIcon"+this.m_id); if(_2c6){ _2c6.src=this.m_imgCollapseSrc; if(this.m_hideTooltip!=null){ _2c6.alt=this.m_hideTooltip; _2c6.title=this.m_hideTooltip; } } if(bar){ bar.style.display=this.m_display; if(typeof setQSCookie=="function"){ setQSCookie(this.m_cookieVar,this.m_cookieName,1); } } }; function CBar_toggleBar(){ var bar=document.getElementById("bar"+this.m_id); var _2c8=bar.style.display; if((_2c8==this.m_display)||(_2c8=="")){ this.hideBar(); }else{ this.showBar(); } }; function CBar_getParent(){ return this.m_parent; }; function CBar_setParent(_2c9){ this.m_parent=_2c9; }; function CBar_draw(){ if(this.m_htmlContainer==null){ this.m_htmlContainer=document.getElementById(this.m_htmlContainerId); if(this.m_htmlContainer==null){ return; } } var html=""; html+="
"; html+=""; }else{ var _2cb=""; if(this.m_htmlContainer.style.textAlign=="right"){ _2cb="margin-left:auto; margin-right: 0;"; }else{ if(this.m_htmlContainer.style.textAlign=="left"){ _2cb="margin-left:0; margin-right: auto;"; }else{ if(this.m_htmlContainer.style.textAlign=="center"){ _2cb="margin-left:auto; margin-right: auto;"; } } } if(_2cb!=""){ html+=" style=\""+_2cb+"\""; } html+=">"; } html+=""; html+="
"; html+=""; html+=this.drawItems(); html+="
"; this.m_htmlContainer.innerHTML=html; this.m_htmlContainer.style.textAlign=this.m_align; for(var i=0;i"; } if(this.m_items[i].isVisible()){ html+=this.m_items[i].draw(); } if(this.m_menuType==cHorizonalBar&&!(this.m_items[i] instanceof CSeperator)){ html+=""; } } } return html; }; function CBar_attachEvents(){ for(var i=0;i=0&&_2d10&&_2d20&&_2d30&&_2d40&&_2d50&&_2d6"; html+=this.m_text; html+=""; if(this.m_labelledBy){ html+="
"; html+=this.m_labelledBy; html+="
"; } html+=""; return html; }; CStaticText.prototype.isVisible=function(){ return this.m_bVisible; }; CStaticText.prototype.hide=function(){ this.m_bVisible=false; }; CStaticText.prototype.hide.show=function(){ this.m_bVisible=true; }; var DISPLAY_INLINE="inline"; var DISPLAY_NONE="none"; var DISPLAY_BLOCK="block"; var __excel_win=null; var __pdf_win=null; if(window.attachEvent){ window.attachEvent("onkeydown",viewerMainKeyPress); window.attachEvent("onresize",onResizeViewerEvent); }else{ if(window.addEventListener){ window.addEventListener("keydown",viewerMainKeyPress,false); window.addEventListener("resize",onResizeViewerEvent,false); } } function attachLeavingRV(){ if(window.attachEvent){ window.attachEvent("onbeforeunload",leavingRV); }else{ if(window.addEventListener){ window.addEventListener("beforeunload",leavingRV,false); }else{ try{ var _2e8=window.onunload; if(!(""+_2e8).match(/leavingRV/gi)){ window.oLeavingRV_onunload=window.onunload; window.onunload=function(){ window.oLeavingRV_onunload(); leavingRV(); }; } } catch(e){ } } } }; function detachLeavingRV(){ if(window.detachEvent){ window.detachEvent("onbeforeunload",leavingRV); }else{ window.removeEventListener("beforeunload",leavingRV,false); } }; window.attachLeavingRV(); function CContextMenu(_2e9){ if(_2e9==null){ return; } this.m_mainWnd=_2e9; this.setCV(this.m_mainWnd.getCV()); var _2ea=this.m_mainWnd.getCV().getWebContentRoot(); var _2eb=this.m_mainWnd.getCV().getSkin(); var _2ec=this.m_mainWnd.getUIHide(); this.m_contextMenu=new CMenu("rvContextMenu"+this.getCVId(),gMenuStyle,_2ea); this.m_contextMenu.m_oCV=this.getCV(); this.m_downloadChart=new CMenuItem(this.m_contextMenu,RV_RES.RV_DOWNLOAD_CHART,"if(typeof "+getCognosViewerSCObjectRefAsString(this.getCVId())+" != 'undefined') "+getCognosViewerSCObjectRefAsString(this.getCVId())+".downloadSelectedChartImage('"+this.getCVId()+"');",_2ea+"/rv/images/action_chart.gif",gMenuItemStyle,_2ea,_2eb); this.m_downloadChart.hide(); this.m_downloadChartSeperator=new CSeperator("horizontal_line"+this.getCVId(),"1",gMenuSeperatorStyle,_2ea); this.m_downloadChartSeperator.hide(); this.m_contextMenu.add(this.m_downloadChartSeperator); var _2ed=this.getCV().getDrillMgr(); if(_2ed){ if(typeof RV_RES.RV_DRILL_DOWN!="undefined"){ this.m_drillDown=new CMenuItem(this.m_contextMenu,RV_RES.RV_DRILL_DOWN,this.getCVObjectRef()+".getDrillMgr().rvDrillDown();",_2ea+"/rv/images/action_drill_down.gif",gMenuItemStyle,_2ea,_2eb); this.m_drillDown.disable(); } if(typeof RV_RES.RV_DRILL_UP!="undefined"){ this.m_drillUp=new CMenuItem(this.m_contextMenu,RV_RES.RV_DRILL_UP,this.getCVObjectRef()+".getDrillMgr().rvDrillUp();",_2ea+"/rv/images/action_drill_up.gif",gMenuItemStyle,_2ea,_2eb); this.m_drillUp.disable(); } if(this.getCV().isInteractiveViewer()&&this.getCV().getAdvancedServerProperty("VIEWER_JS_ENABLE_EXPAND_COLLAPSE")=="true"){ this.m_contextMenu.add(gMenuSeperator); if(typeof RV_RES.IDS_JS_EXPAND_MEMBER!="undefined"){ this.m_expand=new CMenuItem(this.m_contextMenu,RV_RES.IDS_JS_EXPAND_MEMBER,this.getCVObjectRef()+".expand();","",gMenuItemStyle,_2ea,_2eb); this.m_expand.disable(); } if(typeof RV_RES.IDS_JS_COLLAPSE_MEMBER!="undefined"){ this.m_collapse=new CMenuItem(this.m_contextMenu,RV_RES.IDS_JS_COLLAPSE_MEMBER,this.getCVObjectRef()+".collapse();","",gMenuItemStyle,_2ea,_2eb); this.m_collapse.disable(); } } if((!this.getCV().m_viewerFragment||this.getCV().envParams["ui.action"]!="view")&&typeof RV_RES.IDS_JS_FREEZECOLUMNHEADINGS!=="undefined"&&typeof RV_RES.IDS_JS_FREEZEROWHEADINGS!=="undefined"){ this.m_freezeRowHeadings=new CMenuItem(this.m_contextMenu,RV_RES.IDS_JS_FREEZEROWHEADINGS,this.getCVObjectRef()+".getPinFreezeManager().freezeSelectedRowHeadings();",_2ea+"/rv/images/action_freeze_row_heading.gif",gMenuItemStyle,_2ea,_2eb); this.m_unfreezeRowHeadings=new CMenuItem(this.m_contextMenu,RV_RES.IDS_JS_UNFREEZEROWHEADINGS,this.getCVObjectRef()+".getPinFreezeManager().unfreezeSelectedRowHeadings();",_2ea+"/rv/images/action_freeze_row_heading.gif",gMenuItemStyle,_2ea,_2eb); this.m_freezeColumnHeadings=new CMenuItem(this.m_contextMenu,RV_RES.IDS_JS_FREEZECOLUMNHEADINGS,this.getCVObjectRef()+".getPinFreezeManager().freezeSelectedColumnHeadings();",_2ea+"/rv/images/action_freeze_column_heading.gif",gMenuItemStyle,_2ea,_2eb); this.m_unfreezeColumnHeadings=new CMenuItem(this.m_contextMenu,RV_RES.IDS_JS_UNFREEZECOLUMNHEADINGS,this.getCVObjectRef()+".getPinFreezeManager().unfreezeSelectedColumnHeadings();",_2ea+"/rv/images/action_freeze_column_heading.gif",gMenuItemStyle,_2ea,_2eb); this.m_freezeColumnHeadings.hide(); this.m_unfreezeColumnHeadings.hide(); this.m_freezeRowHeadings.hide(); this.m_unfreezeRowHeadings.hide(); } if(typeof RV_RES.RV_GO_TO!="undefined"){ if(_2ec.indexOf(" RV_CONTEXT_MENU_GOTO ")==-1){ if(_2ec.indexOf(" RV_CONTEXT_MENU_DRILL_UP ")==-1||!_2ec.indexOf(" RV_CONTEXT_MENU_DRILL_DOWN ")==-1){ this.m_contextMenu.add(gMenuSeperator); } } this.m_goto=new CMenuItem(this.m_contextMenu,RV_RES.RV_GO_TO,this.getCVObjectRef()+".getDrillMgr().launchGoToPage(null,true);",_2ea+"/rv/images/action_go_to.gif",gMenuItemStyle,_2ea,_2eb); var _2ee=this.m_goto.createCascadedMenu(gMenuStyle); _2ee.m_oCV=this.getCV(); if(this.getCV().envParams["cv.containerApp"]=="AA"){ _2ee.registerCallback(this.getCVObjectRef()+".m_viewerFragment.raiseGotoContextMenuEvent()"); }else{ _2ee.registerCallback(this.getCVObjectRef()+".getDrillMgr().getDrillThroughParameters()"); } } } var _2ef=this.getCV().getSubscriptionManager(); if(_2ef&&this.getCV().bCanUseCognosViewerConditionalSubscriptions){ this.m_subscriptionSeperator=new CSeperator("horizontal_line","1",gMenuSeperatorStyle,_2ea); this.m_subscriptionSeperator.hide(); this.m_contextMenu.add(this.m_subscriptionSeperator); if(RV_RES.RV_NEW_WATCH_RULE){ this.m_subscription=new CMenuItem(this.m_contextMenu,RV_RES.RV_NEW_WATCH_RULE,this.getCVObjectRef()+".getSubscriptionManager().NewSubscription();",_2ea+"/rv/images/action_new_subscription.gif",gMenuItemStyle,_2ea,_2eb); this.m_subscription.disable(); } } var _2f0=false; if(this.getCV().bCanUseGlossary&&RV_RES.RV_GLOSSARY&&_2ec.indexOf(" RV_CONTEXT_MENU_GLOSSARY ")==-1){ _2f0=true; this.m_contextMenu.add(gMenuSeperator); this.m_glossaryItem=new CMenuItem(this.m_contextMenu,RV_RES.RV_GLOSSARY,this.getCVObjectRef()+".executeAction('Glossary');",_2ea+"/rv/images/action_glossary.gif",gMenuItemStyle,_2ea,_2eb); this.m_glossaryItem.disable(); } if(this.isLinegaeVisisble(_2ec)){ if(!_2f0){ this.m_contextMenu.add(gMenuSeperator); } this.m_lineageItem=new CMenuItem(this.m_contextMenu,RV_RES.RV_LINEAGE,this.getCVObjectRef()+".executeAction('Lineage');",_2ea+"/rv/images/action_lineage.gif",gMenuItemStyle,_2ea,_2eb); this.m_lineageItem.disable(); } }; CContextMenu.prototype=new CViewerHelper(); CContextMenu.prototype.isLinegaeVisisble=function(_2f1){ if(!isSafari()&&this.getCV().bCanUseLineage&&RV_RES.RV_LINEAGE&&_2f1.indexOf(" RV_CONTEXT_MENU_LINEAGE ")==-1){ if(this.getCV().envParams["ui.object"]||(this.getCV().envParams["metadataInformationURI"]&&this.getCV().envParams["metadataInformationURI"].indexOf("iis=")==-1)){ return true; } } return false; }; CContextMenu.prototype.hideFirstSeperators=function(){ var _2f2=this.m_contextMenu.m_menuItems.length; for(var _2f3=0;_2f3<_2f2;_2f3++){ var _2f4=this.m_contextMenu.m_menuItems[_2f3]; if(_2f4.isVisible()&&typeof _2f4.m_toolbarSeperatorClass!="string"){ break; }else{ if(typeof _2f4.m_toolbarSeperatorClass=="string"){ _2f4.hide(); } } } }; CContextMenu.prototype.updateFreezeHeadings=function(){ if(this.getCV().m_viewerFragment||this.getCV().envParams["ui.action"]=="view"){ return; } if(this.getCV().getPinFreezeManager()){ var _2f5=this.getCV().getPinFreezeManager(); if(this.m_freezeRowHeadings){ if(_2f5.canFreezeSelectedRowHeadings()){ this.m_freezeRowHeadings.show(); }else{ this.m_freezeRowHeadings.hide(); } } if(this.m_unfreezeRowHeadings){ if(_2f5.canUnfreezeSelectedRowHeadings()){ this.m_unfreezeRowHeadings.show(); }else{ this.m_unfreezeRowHeadings.hide(); } } if(this.m_freezeColumnHeadings){ if(_2f5.canFreezeSelectedColumnHeadings()){ this.m_freezeColumnHeadings.show(); }else{ this.m_freezeColumnHeadings.hide(); } } if(this.m_unfreezeColumnHeadings){ if(_2f5.canUnfreezeSelectedColumnHeadings()){ this.m_unfreezeColumnHeadings.show(); }else{ this.m_unfreezeColumnHeadings.hide(); } } } }; function CContextMenu_draw(evt){ this.updateSubscriptionContextMenuItem(); if(this.m_bFaultModalShown){ this.update(this.subject); this.m_bFaultModalShown=false; } this.hideFirstSeperators(); this.m_contextMenu.remove(); this.m_contextMenu.setHTMLContainer(document.body); this.m_contextMenu.draw(); if(isIE()&&evt.keyCode&&evt.keyCode!=0){ var node=getCrossBrowserNode(evt); var _2f8=clientToScreenCoords(node,document.body); this.m_contextMenu.setXCoord(_2f8.leftCoord+node.scrollWidth); this.m_contextMenu.setYCoord(_2f8.topCoord); }else{ this.m_contextMenu.setXCoord(evt.clientX); this.m_contextMenu.setYCoord(evt.clientY); } if(getCVWaitingOnFault()==null){ this.m_contextMenu.show(); this.m_bFaultModalShown=false; }else{ this.m_bFaultModalShown=true; } var _2f9=this.m_contextMenu.get(this.m_contextMenu.getNumItems()-1); if(_2f9&&typeof _2f9.getObservers=="function"&&typeof _2f9.getObservers()=="object"){ _2f9.getObservers().attach(this,this.closeMenuTabEvent,"CMenuItem_closeMenuTabEvent"); } }; function CContextMenu_getDrillUpMenuItem(){ return this.m_drillUp; }; function CContextMenu_getDrillDownMenuItem(){ return this.m_drillDown; }; function CContextMenu_getGoToMenuItem(){ return this.m_goto; }; function CContextMenu_closeMenuTabEvent(){ var oCV=this.m_mainWnd.getCV(); var _2fb=oCV.getSelectionController(); var _2fc=_2fb.getAllSelectedObjects().length; if(_2fc>0){ var _2fd=_2fb.getAllSelectedObjects()[_2fc-1]; var _2fe=_2fd.getCellRef().getElementsByTagName("span"); if(_2fe.length>0){ for(var i=0;i<_2fe.length;i++){ var span=_2fe[i]; if(span.getAttribute("tabindex")!=null&&span.style.visibility!="hidden"){ span.focus(); } } } } }; function CContextMenu_hide(){ this.m_contextMenu.remove(); }; function CContextMenu_hideDownloadChartMenuItem(){ this.m_downloadChart.hide(); this.m_downloadChartSeperator.hide(); }; function CContextMenu_showDownloadChartMenuItem(){ this.m_downloadChart.show(); this.m_downloadChartSeperator.show(); }; function CContextMenu_update(_301){ if(_301 instanceof CSelectionController){ this.subject=_301; var _302=this.m_mainWnd.getUIHide(); var _303=this.getCV().getDrillMgr(); if(_303){ var _304=this.getGoToMenuItem(); var _305=_304.getMenu(); if(_305){ _305.clear(); } if(!_301.getSelectionBasedFeaturesEnabled()||_302.indexOf(" RV_CONTEXT_MENU_GOTO ")!=-1){ _304.hide(); } var _306=this.getDrillDownMenuItem(); if(_302.indexOf(" RV_CONTEXT_MENU_DRILL_DOWN ")!=-1){ _306.hide(); }else{ if(_303.canDrillDown()){ this.updateDrillMenu(_306,"DrillDown"); _306.enable(); }else{ if(!_301.getSelectionBasedFeaturesEnabled()){ _306.hide(); }else{ _306.disable(); } } } var _307=this.getDrillUpMenuItem(); if(_302.indexOf(" RV_CONTEXT_MENU_DRILL_UP ")!=-1){ _307.hide(); } if(_303.canDrillUp()){ this.updateDrillMenu(_307,"DrillUp"); _307.enable(); }else{ if(!_301.getSelectionBasedFeaturesEnabled()){ _307.hide(); gMenuSeperator.hide(); }else{ _307.disable(); } } if(this.m_expand){ this.getCV().canExpand()?this.m_expand.enable():this.m_expand.disable(); } if(this.m_collapse){ this.getCV().canCollapse()?this.m_collapse.enable():this.m_collapse.disable(); } if(_302.indexOf(" RV_CONTEXT_MENU_DOWNLOAD_CHART ")!=-1){ this.hideDownloadChartMenuItem(); }else{ if(!_301.hasSelectedChartNodes()){ if(!_301.getSelectionBasedFeaturesEnabled()){ this.hide(); }else{ this.hideDownloadChartMenuItem(); } }else{ this.showDownloadChartMenuItem(); } } } var _308=false; if(this.m_lineageItem||this.m_glossaryItem){ var _309=_301.getAllSelectedObjects(); if(_309!=null&&_309.length>0){ for(var i=0;i<_309.length;i++){ if(_309[i].hasContextInformation()){ _308=true; break; } } } } this.updateFreezeHeadings(); if(this.m_glossaryItem&&_308&&this.getCV().envParams["glossaryURI"]!=null&&this.getCV().envParams["glossaryURI"]!=""){ this.m_glossaryItem.enable(); }else{ if(this.m_glossaryItem){ this.m_glossaryItem.disable(); } } if(this.m_lineageItem&&_308){ this.m_lineageItem.enable(); }else{ if(this.m_lineageItem){ this.m_lineageItem.disable(); } } } }; CContextMenu.prototype.updateDrillMenu=function(_30b,_30c){ _30b.clearCascadedMenu(); var _30d={}; DrillContextMenuHelper.updateDrillMenuItems(_30d,this.getCV(),_30c); if(_30d.items){ var _30e=_30d.items; var _30f=_30b.createCascadedMenu(gMenuStyle); var _310=this.getCV().getWebContentRoot(); var _311=this.m_mainWnd.getCV().getSkin(); for(var i=0;i<_30e.length;i++){ var _313=_30e[i]; if(_313.separator){ if(i<(_30e.length-1)){ _30f.add(gMenuSeperator); } }else{ var _314=_313.action&&_313.action.payload&&_313.action.payload.userSelectedDrillItem?_313.action.payload.userSelectedDrillItem:""; var _315=_314?"{\"userSelectedDrillItem\" : \""+_314+"\"}":"{}"; if(_30c=="DrillDown"){ new CMenuItem(_30f,_313.label,this.getCVObjectRef()+".getDrillMgr().rvDrillDown("+_315+");","",gMenuItemStyle,_310,_311); }else{ new CMenuItem(_30f,_313.label,this.getCVObjectRef()+".getDrillMgr().rvDrillUp("+_315+");","",gMenuItemStyle,_310,_311); } } } } }; function CContextMenu_updateSubscriptionContextMenuItem(){ var _316=this.m_mainWnd.getUIHide(); var _317=this.getCV().getSubscriptionManager(); if(_316.indexOf(" RV_CONTEXT_MENU_ALERT_USING_NEW_WATCH_RULE ")!=-1&&this.m_subscription){ this.m_subscription.hide(); }else{ if(_317&&this.m_subscription&&_317.CanCreateNewWatchRule()){ this.m_subscriptionSeperator.show(); this.m_subscription.show(); if(_317.IsValidSelectionForNewRule()){ this.m_subscription.enable(); }else{ this.m_subscription.disable(); } }else{ if(this.m_subscription){ this.m_subscriptionSeperator.hide(); this.m_subscription.hide(); } } } }; CContextMenu.prototype.draw=CContextMenu_draw; CContextMenu.prototype.hide=CContextMenu_hide; CContextMenu.prototype.closeMenuTabEvent=CContextMenu_closeMenuTabEvent; CContextMenu.prototype.getDrillUpMenuItem=CContextMenu_getDrillUpMenuItem; CContextMenu.prototype.getDrillDownMenuItem=CContextMenu_getDrillDownMenuItem; CContextMenu.prototype.getGoToMenuItem=CContextMenu_getGoToMenuItem; CContextMenu.prototype.hideDownloadChartMenuItem=CContextMenu_hideDownloadChartMenuItem; CContextMenu.prototype.showDownloadChartMenuItem=CContextMenu_showDownloadChartMenuItem; CContextMenu.prototype.update=CContextMenu_update; CContextMenu.prototype.updateSubscriptionContextMenuItem=CContextMenu_updateSubscriptionContextMenuItem; function CReportHistory(_318,_319,_31a,_31b){ this.m_mainWnd=_318; this.m_stack_idx=_319; this.m_reportName=""; if(typeof _31a=="undefined"||_31a==null||_31a.length==0){ if(typeof _318!="undefined"&&_318!=null){ var _31c=RV_RES.RV_PREVIOUS_REPORT; this.m_reportName=_31c; } }else{ this.m_reportName=_31a; } this.m_params=_31b; }; CReportHistory.prototype.getDropDownMenuIcon=function(){ var _31d="/ps/portal/images/"; if(this.m_params["ui.action"]=="view"){ _31d+="icon_result_"; if(this.m_params["ui.format"]=="PDF"){ _31d+="pdf.gif"; }else{ _31d+="html.gif"; } }else{ _31d+="action_run.gif"; } return _31d; }; CReportHistory.prototype.addParamNode=function(_31e,_31f,_320){ var _321=_31e.ownerDocument.createElement("param"); _31e.appendChild(_321); _321.setAttribute("name",_31f); _321.appendChild(_31e.ownerDocument.createTextNode(_320)); }; CReportHistory.prototype.saveAsXML=function(_322){ var _323=_322.ownerDocument.createElement("previousReport"); _322.appendChild(_323); for(var _324 in this.m_params){ this.addParamNode(_323,_324,this.m_params[_324]); } this.addParamNode(_323,"ui.name",this.getReportName()); }; CReportHistory.prototype.getIdx=function(){ return this.m_stack_idx; }; CReportHistory.prototype.getReportName=function(){ return this.m_reportName; }; CReportHistory.prototype.getParameters=function(){ return this.m_params; }; CReportHistory.prototype.createRequestForm=function(){ var oCV=this.m_mainWnd.getCV(); var _326=document.getElementById("formWarpRequest"+oCV.getId()); var form=document.createElement("form"); form.setAttribute("id","previousReport"); form.setAttribute("name","previousReport"); form.setAttribute("target",_326.getAttribute("target")?_326.getAttribute("target"):""); form.setAttribute("method","post"); form.setAttribute("action",_326.getAttribute("action")); form.style.display="none"; document.body.appendChild(form); for(var _328 in this.m_params){ if(_328!="m_tracking"){ form.appendChild(createHiddenFormField(_328,this.m_params[_328])); } } for(var _329 in oCV.envParams){ if(_329.indexOf("cv.")==0&&_329!="cv.previousReports"&&_329!="m_tracking"&&_329!="cv.actionState"){ form.appendChild(createHiddenFormField(_329,oCV.envParams[_329])); } } if(this.getIdx()>0){ this.m_mainWnd.m_reportHistoryList=this.m_mainWnd.m_reportHistoryList.slice(0,this.getIdx()); form.appendChild(createHiddenFormField("cv.previousReports",this.m_mainWnd.saveReportHistoryAsXML())); } form.appendChild(createHiddenFormField("ui.name",this.getReportName())); form.appendChild(createHiddenFormField("b_action","cognosViewer")); var _32a=_326.getElementsByTagName("INPUT"); for(var _32b=0;_32b<_32a.length;++_32b){ if(typeof form[_32a[_32b].name]=="undefined"&&_32a[_32b].name!="cv.previousReports"&&_32a[_32b].name.length>0){ form.appendChild(createHiddenFormField(_32a[_32b].name,_32a[_32b].value)); } } return form; }; CReportHistory.prototype.execute=function(){ var oCV=this.m_mainWnd.getCV(); if(typeof oCV.m_viewerFragment!="undefined"){ var _32d=new ViewerDispatcherEntry(oCV); _32d.addFormField("ui.action",this.m_params["ui.action"]); for(var _32e in this.m_params){ if(_32e!="ui.action"&&_32e!="m_tracking"&&_32e!="cv.actionState"){ _32d.addFormField(_32e,this.m_params[_32e]); } } if(this.getIdx()>0){ this.m_mainWnd.m_reportHistoryList=this.m_mainWnd.m_reportHistoryList.slice(0,this.getIdx()); _32d.addFormField("cv.previousReports",this.m_mainWnd.saveReportHistoryAsXML()); }else{ _32d.removeFormField("cv.previousReports"); } if(this.m_reportName&&this.m_reportName.length>0){ _32d.addFormField("ui.name",this.m_reportName); } _32d.addFormField("cv.responseFormat","fragment"); _32d.addFormField("cv.ignoreState","true"); _32d.addFormField("cv.id","_THIS_"); _32d.addFormField("m_tracking",""); oCV.dispatchRequest(_32d); }else{ var form=this.createRequestForm(); form.submit(); } }; function CViewerManager(oCV){ this.setCV(oCV); }; CViewerManager.prototype=new CViewerHelper(); CViewerManager.prototype.Print=function(){ var _331=document.getElementById("CVIFrame"+this.getCVId()); if(_331){ if(isIE()){ _331.contentWindow.document.execCommand("print",true,null); }else{ _331.focus(); _331.contentWindow.print(); } } var cv=this.getCV(); var _333=cv.rvMainWnd; var _334=_333.getToolbarControl(); if(typeof _334!="undefined"&&_334!=null){ var _335=_334.getItem("print"); if(_335){ _335.setFocus(); } } }; CViewerManager.prototype.DownloadReport=function(){ var _336=""; var f=document.forms["formWarpRequest"+this.getCVId()]; _336+="b_action=xts.run&m=portal/download.xts&m_obj="; _336+=f["ui.object"].value; _336+="&m_name="; _336+=f["ui.name"].value; if(f["ui.format"]&&f["ui.format"].value){ _336+="&format="; _336+=f["ui.format"].value; } _336=constructGETRequestParamsString(_336); _336=f.action+"?"+_336; location.href=_336; }; CViewerManager.prototype.SaveReport=function(_338){ var oCV=this.getCV(); var oReq=new ViewerDispatcherEntry(oCV); oReq.setWorkingDialog(null); oReq.addFormField("ui.action","save"); if(!_338){ oReq.addFormField("run.continueConversation","true"); }else{ this.getCV().closeActiveHTTPConnection(); if(oCV.getWorkingDialog()){ oCV.getWorkingDialog().hide(); } this.getCV().setKeepSessionAlive(true); oReq.addFormField("run.continueConversation","false"); var _33b=GUtil.generateCallback(executeBackURL,[this.getCV().getId()],null); oReq.setCallbacks({"complete":{"method":_33b}}); } oReq.addFormField("run.saveOutput","true"); this.getCV().dispatchRequest(oReq); }; CViewerManager.prototype.SaveAsReportView=function(_33c){ var _33d=document.getElementById("formWarpRequest"+this.getCVId()); if(_33d){ var _33e=!_33c; var _33f={"m":"portal/viewer-saveAs.xts"}; _33f["run.continueConversation"]=_33e; _33f["initializeSave"]="true"; _33f["ui.object"]=_33d["ui.object"].value; _33f["ui.backURL"]=_33d["ui.backURL"].value; _33f["ui.routingServerGroup"]=this.getRoutingServerGroup(); cvLoadDialog(this.getCV(),_33f,600,425,RV_RES.IDS_JS_SAVE_AS_REPORT_VIEW_IFRAME_TITLE); } }; CViewerManager.prototype.init=function(_340){ if(_340&&typeof _340=="object"){ for(var _341 in _340){ this[_341]=_340[_341]; } } }; CViewerManager.prototype.SendReport=function(_342){ var _343=!_342; var _344={"m":"portal/viewer-email.xts"}; _344["run.continueConversation"]=_343; _344["ui.routingServerGroup"]=this.getRoutingServerGroup(); cvLoadDialog(this.getCV(),_344,800,550,RV_RES.IDS_JS_EMAIL_REPORT_IFRAME_TITLE); }; CViewerManager.prototype.validatePromptControls=function(){ if(typeof this.getCV().preProcessControlArray!="undefined"&&typeof preProcessForm!="undefined"){ preProcessForm(this.getCV().preProcessControlArray); } }; CViewerManager.prototype.RunReport=function(){ this.validatePromptControls(); var oReq=null; var _346=this.getCV().envParams["ui.object"]; var _347=this.getCV().envParams["ui.spec"]; var _348=this.getCV().envParams["ui.action"]; var _349=document.forms["formWarpRequest"+this.getCVId()]; if(_347!=null&&_347!=""){ oReq=new ViewerDispatcherEntry(this.getCV()); oReq.addFormField("ui.action","runSpecification"); oReq.addFormField("ui.spec",_347); var _34a=this.getCV().envParams["specificationType"]; if(_34a!=null){ oReq.addFormField("specificationType",_34a); } }else{ if(_346!=null&&_346!=""){ if(this.getCV().isBux){ oReq=new ViewerDispatcherEntry(this.getCV()); oReq.addFormField("ui.action","bux"); }else{ oReq=new ViewerDispatcherEntry(this.getCV()); oReq.addFormField("ui.action","run"); } if(_348=="view"){ if(this.getCV().envParams["ui.reRunObj"]){ _346=this.getCV().envParams["ui.reRunObj"]; }else{ if(typeof _349["reRunObj"]!="undefined"&&_349["reRunObj"]!=null){ _346=_349["reRunObj"].value; } } } oReq.addFormField("ui.object",_346); } } oReq.addFormField("run.outputFormat",this.getCV().rvMainWnd.getCurrentFormat()); oReq.addFormField("ui.primaryAction",""); var _34b=this.getCV().envParams["promptOnRerun"]; if(_34b!=null){ oReq.addFormField("run.prompt",_34b); }else{ oReq.addFormField("run.prompt","true"); } this.getCV().preparePromptValues(oReq); this.getCV().dispatchRequest(oReq); }; CViewerManager.prototype.viewReport=function(_34c){ if(this.getCV().rvMainWnd.getCurrentFormat()==_34c){ return; } var f=document.forms["formWarpRequest"+this.getCVId()]; if(f["ui.action"].value=="view"){ this.viewOutput(_34c); }else{ var oReq=new ViewerDispatcherEntry(this.getCV()); oReq.addFormField("ui.action","render"); oReq.addFormField("run.outputFormat",_34c); if(this.isExcelFormat(_34c)){ this.viewInExcel(oReq); }else{ if(this.getCV().isAccessibleMode()&&_34c=="PDF"){ this.viewPDFInNewWindow(oReq); }else{ if(isSafari()&&_34c=="PDF"){ oReq.addFormField("ui.reuseWindow","true"); this.viewPDFInNewWindow(oReq); }else{ this.getCV().deleteTabs(); this.getCV().dispatchRequest(oReq); } } } } }; CViewerManager.prototype.isExcelFormat=function(_34f){ if(_34f=="xlsxData"||_34f=="XLS"||_34f=="CSV"||_34f=="XLWA"||_34f=="singleXLS"||_34f=="spreadsheetML"){ return true; } return false; }; CViewerManager.prototype.viewOutput=function(_350){ var oFWR=document.forms["formWarpRequest"+this.getCVId()]; var oReq=new ViewerDispatcherEntry(this.getCV()); oReq.addFormField("ui.action","view"); oReq.addFormField("cv.responseFormat","view"); oReq.addFormField("ui.format",_350); var _353=""; switch(_350){ case "HTML": _353=this.getCV().oOutputFormatPath.HTML; break; case "PDF": _353=this.getCV().oOutputFormatPath.PDF; break; case "singleXLS": _353=this.getCV().oOutputFormatPath.singleXLS; break; case "XLS": _353=this.getCV().oOutputFormatPath.XLS; break; case "XLWA": _353=this.getCV().oOutputFormatPath.XLWA; break; case "CSV": _353=this.getCV().oOutputFormatPath.CSV; break; case "XML": _353=this.getCV().oOutputFormatPath.XML; break; case "spreadsheetML": _353=this.getCV().oOutputFormatPath.spreadsheetML; break; case "xlsxData": _353=this.getCV().oOutputFormatPath.xlsxData; break; } if(_353){ oReq.addFormField("ui.object",_353); } oReq.addFormField("reRunObj",oFWR.reRunObj.value); oReq.addFormField("ui.format",_350); oReq.addFormField("ui.name",oFWR["ui.name"].value); if(this.isExcelFormat(_350)){ this.viewInExcel(oReq); }else{ if(this.getCV().isAccessibleMode()&&_350=="PDF"){ this.viewPDFInNewWindow(oReq); }else{ if(isSafari()&&_350=="PDF"){ oReq.addFormField("ui.reuseWindow","true"); this.viewPDFInNewWindow(oReq); }else{ this.getCV().dispatchRequest(oReq); } } } }; CViewerManager.prototype.viewPDFInNewWindow=function(oReq){ this.viewInNewWindow(oReq,__pdf_win); }; CViewerManager.prototype.viewInExcel=function(oReq){ this.viewInNewWindow(oReq,__excel_win); }; CViewerManager.prototype.viewInNewWindow=function(oReq,_357){ var _358=window.onbeforeunload; window.onbeforeunload=null; if(_357!=null){ _357.close(); } var _359="winNAT_"+(new Date()).getTime(); var _35a=this.getCV().getWebContentRoot()+"/"+"rv/blankNewWin.html?cv.id="+this.getCVId(); var _35b="viewForm"+this.getCVId(); var _35c=document.getElementById(_35b); if(_35c){ _35c.parentNode.removeChild(_35c); } _35c=document.createElement("form"); _35c.setAttribute("method","post"); _35c.setAttribute("id",_35b); _35c.setAttribute("action",this.getCV().getGateway()); _35c.style.display="inline"; var oFWR=document["formWarpRequest"+this.getCVId()]; if(oFWR&&oFWR["run.outputFormat"]){ oReq.addFormField("previousFormat",oFWR["run.outputFormat"].value); } var _35e=oReq.getFormFields().keys(); for(var _35f=0;_35f<_35e.length;_35f++){ var name=_35e[_35f]; if(name!="cv.responseFormat"&&name!="b_action"&&name!="m_tracking"){ _35c.appendChild(createHiddenFormField(name,oReq.getFormField(name))); } } _35c.appendChild(createHiddenFormField("cv.responseFormat","page")); _35c.appendChild(createHiddenFormField("b_action","cognosViewer")); _35c.appendChild(createHiddenFormField("BIline1",RV_RES.RV_RUNNING)); _35c.appendChild(createHiddenFormField("BIline2",RV_RES.RV_PLEASE_WAIT)); if(this.getCV().envParams["ui.name"]){ _35c.appendChild(createHiddenFormField("ui.name",this.getCV().envParams["ui.name"])); } document.body.appendChild(_35c); _35c.target=_359; _357=window.open(_35a,_359,"rv"); window.onbeforeunload=_358; }; CViewerManager.prototype.cancel=function(){ var oCV=this.getCV(); oCV.cancel(); }; CViewerManager.prototype.sXmlEncode=function(_362){ var _363=""+_362; if((_363=="0")||((_362!=null)&&(_362!=false))){ _363=_363.replace(/&/g,"&"); _363=_363.replace(//g,">"); _363=_363.replace(/"/g,"""); _363=_363.replace(/'/g,"'"); }else{ if(_362==null){ _363=""; } } return _363; }; CViewerManager.prototype.exit=function(_364){ var form=document.getElementById("formWarpRequest"+this.getCVId()); var oCV=this.getCV(); if(form&&form["ui.action"]&&form["ui.action"].value=="view"&&_364){ executeBackURL(this.getCVId()); }else{ if(oCV.getKeepSessionAlive()==false){ oCV.exit(_364); } } }; function executeBackURL(_367){ var _368=""; if(_367){ _368=_367; } if(window["oCV"+_368]&&window["oCV"+_368].isBux){ return false; } var form=document.getElementById("formWarpRequest"+_368); if(form["ui.backURL"].value.length<2048){ document.location.href=form["ui.backURL"].value; return; } var _36a=decodeURIComponent(form["ui.backURL"].value); var _36b=_36a.split("?"); var _36c=document.createElement("form"); _36c.style.display="none"; _36c.setAttribute("method","post"); _36c.setAttribute("action",_36b[0]); _36c.setAttribute("target","_self"); var _36d=_36b[1].split("&"); for(var _36e=0;_36e<_36d.length;_36e++){ var _36f=_36d[_36e].indexOf("="); var _370=_36d[_36e].substr(0,_36f); var _371=_36d[_36e].substr(_36f+1); var _372=document.createElement("input"); _372.setAttribute("type","hidden"); _372.setAttribute("name",decodeURIComponent(_370)); _372.setAttribute("value",decodeURIComponent(_371)); _36c.appendChild(_372); } document.body.appendChild(_36c); _36c.submit(); }; CViewerManager.prototype.getRoutingServerGroup=function(){ var oCV=this.getCV(); if(oCV.envParams["ui.routingServerGroup"]){ return oCV.envParams["ui.routingServerGroup"]; } return ""; }; CViewerManager.prototype.launchQS=function(){ var _374=document.forms["formWarpRequest"+this.getCVId()]; var oCV=this.getCV(); if(typeof oCV.m_viewerFragment!="undefined"){ cognosLaunchInWindow("","menubar=no,toolbar=no,status=yes,location=no,resizable=yes,width=650,height=480","ui.gateway",_374.action,"ui.tool","QueryStudio","ui.action","edit","ui.object",_374["ui.object"].value,"ui.routingServerGroup",this.getRoutingServerGroup()); }else{ cognosLaunch("ui.gateway",_374.action,"ui.tool","QueryStudio","ui.action","edit","ui.object",_374["ui.object"].value,"ui.backURL",_374["ui.backURL"].value,"ui.routingServerGroup",this.getRoutingServerGroup()); } }; CViewerManager.prototype.launchAS=function(){ var _376=document.forms["formWarpRequest"+this.getCVId()]; cognosLaunchInWindow("","menubar=no,toolbar=no,status=yes,location=no,resizable=yes,width=650,height=480","ui.gateway",_376.action,"ui.tool","AnalysisStudio","ui.action","edit","ui.object",_376["ui.object"].value,"ui.routingServerGroup",this.getRoutingServerGroup()); }; CViewerManager.prototype.launchRS=function(){ var _377=document.forms["formWarpRequest"+this.getCVId()]; cognosLaunchInWindow("_blank","menubar=no,toolbar=no,status=yes,location=no,resizable=yes,width=650,height=480","ui.gateway",_377.action,"ui.tool","ReportStudio","ui.action","edit","ui.profile","Professional","ui.object",_377["ui.object"].value,"ui.routingServerGroup",this.getRoutingServerGroup()); }; CViewerManager.prototype.returnHome=function(url){ var _379=document.forms["formWarpRequest"+this.getCVId()]; _379["ui.backURL"].value=url; executeBackURL(this.getCVId()); }; CViewerManager.prototype.doPostBack=function(){ var f=document.forms["formWarpRequest"+this.getCVId()]; f.appendChild(createHiddenFormField("b_action","xts.run")); f.appendChild(createHiddenFormField("m",f["ui.postBack"].value)); f.submit(); }; CViewerManager.prototype.hideAbout=function(){ this.getCV().removeTransparentBackgroundLayer(); var cvId=this.getCV().getId(); if(document.getElementById("viewerAboutDiv"+cvId)){ document.getElementById("viewerAboutDiv"+cvId).parentNode.removeChild(document.getElementById("viewerAboutDiv"+cvId)); } if(document.getElementById("viewerAboutIframe"+cvId)){ document.getElementById("viewerAboutIframe"+cvId).parentNode.removeChild(document.getElementById("viewerAboutIframe"+cvId)); } }; function viewerAboutOnKeyDown(evt){ evt=(evt)?evt:((event)?event:null); var _37d=getCrossBrowserNode(evt); if(evt.keyCode=="13"||evt.keyCode=="27"||evt.keyCode=="32"){ var oCV=window["oCV"+_37d.getAttribute("viewerId")]; oCV.m_oCVMgr.hideAbout(); return stopEventBubble(evt); } }; CViewerManager.prototype.fileExist=function(_37f){ var http=null; if(window.XMLHttpRequest){ http=new XMLHttpRequest(); }else{ http=new ActiveXObject("Msxml2.XMLHTTP"); } http.open("HEAD",_37f,false); http.send(); return (http.status==200); }; CViewerManager.prototype.getAboutBoxImageURL=function(){ var _381="about_"+this.getCV().getProductLocale()+".jpg"; var _382=this.getCV().getWebContentRoot()+"/rv/images/"; var _383=_382+_381; if(!this.fileExist(_383)){ _383=_382+"about_en.jpg"; } return _383; }; CViewerManager.prototype.about=function(){ if(document.getElementById("viewerAbout"+this.getCV().getId())){ this.hideAbout(); } this.getCV().createTransparentBackgroundLayer(); var _384=650; var _385=522; var _386=document.createElement("iframe"); _386.id="viewerAboutIframe"+this.getCV().getId(); _386.style.position="absolute"; _386.style.zIndex=99; _386.style.width=_384+"px"; _386.style.height=_385+"px"; _386.setAttribute("src",this.getCV().getWebContentRoot()+"/common/blank.html"); _386.setAttribute("scrolling","no"); _386.setAttribute("frameborder","0"); _386.setAttribute("title",RV_RES.IDS_JS_MODAL_BACK_IFRAME); _386.setAttribute("role","presentation"); document.body.appendChild(_386); var id=this.getCV().getId(); var _388=document.createElement("div"); _388.tabIndex=0; _388.onfocus=function(){ document.getElementById("viewerAboutOK"+id).focus(); }; document.body.appendChild(_388); var div=document.createElement("div"); div.id="viewerAboutDiv"+this.getCV().getId(); div.style.position="absolute"; div.onkeydown=viewerAboutOnKeyDown; div.style.zIndex=100; div.style.width=_384+"px"; div.style.height=_385+"px"; div.style.outline="none"; div.setAttribute("role","dialog"); div.setAttribute("aria-label",RV_RES.RV_ABOUT_DESCRIPTION); var _38a=this.getAboutBoxImageURL(); var _38b=RV_RES.RV_ABOUT_DESCRIPTION.replace(/"/g,""")+RV_RES.IDS_PROP_LEGAL.replace(/"/g,"""); div.innerHTML="\""+_38b+"\""; div.setAttribute("viewerId",this.getCV().getId()); document.body.appendChild(div); this.createOKButton(div); var _38c=document.createElement("div"); _38c.tabIndex=0; _38c.onfocus=function(){ document.getElementById("viewerAbout"+id).focus(); }; document.body.appendChild(_38c); var _38d=0; var _38e=0; if(typeof window.innerHeight!="undefined"){ _38d=Math.round((window.innerHeight/2)-(_385/2)); _38e=Math.round((window.innerWidth/2)-(_384/2)); }else{ _38d=Math.round((document.body.clientHeight/2)-(_385/2)); _38e=Math.round((document.body.clientWidth/2)-(_384/2)); } div.style.bottom=_386.style.bottom=_38d+"px"; div.style.left=_386.style.left=_38e+"px"; setTimeout("document.getElementById('viewerAbout"+id+"').focus();",1); }; CViewerManager.prototype.createOKButton=function(_38f){ var _390=document.createElement("div"); _390.style.backgroundcolor="#FFFFFF"; _390.id="viewerAboutOK"+this.getCV().getId(); _390.setAttribute("role","button"); _390.setAttribute("viewerId",this.getCV().getId()); _390.setAttribute("tabIndex","0"); var _391=this; _390.onclick=function(){ _391.hideAbout(); }; _390.onkeydown=viewerAboutOnKeyDown; _390.className="aboutOkButton"; _38f.appendChild(_390); var span=document.createElement("span"); span.style.padding="7px 30px 7px 30px"; span.appendChild(document.createTextNode(RV_RES.IDS_JS_OK)); _390.appendChild(span); }; CViewerManager.prototype.updateUserName=function(){ var _393=new DataDispatcherEntry(this.getCV()); _393.addFormField("ui.action","CMRequest"); _393.addFormField("CMRequest","~defaultName"); _393.addFormField("cv.responseFormat","CMRequest"); _393.addFormField("cv.catchLogOnFault","true"); _393.addFormField("cv.id",this.getCVId()); _393.setCallbacks({"complete":{"object":this,"method":this.updateUserNameCallback}}); _393.setCanBeQueued(true); this.getCV().dispatchRequest(_393); }; CViewerManager.prototype.updateUserNameCallback=function(_394){ var _395=this.getUserNameFromResponse(_394); if(_395!=null){ var _396="userNameTD"+this.getCVId(); var _397=document.getElementById(_396); if(_397!=null){ _397.innerHTML=html_encode(_395); } var _398=this.getCV().rvMainWnd.getBannerToolbar(); if(_398){ for(var _399=0;_399<_398.getNumItems();_399++){ if(typeof _398.get(_399).getId=="function"&&_398.get(_399).getId()==_396){ _398.get(_399).setText(html_encode(_395)); break; } } } } }; CViewerManager.prototype.getUserNameFromResponse=function(_39a){ if(_39a){ var _39b=XMLBuilderLoadXMLFromString(_39a.getResult()); var _39c=XMLHelper_FindChildByTagName(_39b,"defaultName",true); if(_39c!=null){ var _39d=XMLHelper_FindChildByTagName(_39c,"value",false); if(_39d!=null){ return XMLHelper_GetText(_39d); } } } return null; }; CViewerManager.prototype.getAvailableOutput=function(){ var oCV=this.getCV(); var _39f=document.getElementById("formWarpRequest"+this.getCVId()); var _3a0=new JSONDispatcherEntry(this.getCV()); _3a0.addFormField("ui.action","getAvailableOutputs"); _3a0.addFormField("cv.responseFormat","getAvailableOutputs"); _3a0.addFormField("ui.object",_39f["ui.object"].value); _3a0.addFormField("ui.reportVersion",_39f["ui.reportVersion"].value); _3a0.addFormField("reRunObj",_39f["reRunObj"].value); _3a0.addFormField("ui.outputLocale",_39f["ui.outputLocale"].value); _3a0.addFormField("ui.burstKey",_39f["ui.burstKey"].value); _3a0.addFormField("cv.id",this.getCVId()); _3a0.setCallbacks({"complete":{"object":this,"method":this.getAvailableOutputResponseCallback}}); oCV.dispatchRequest(_3a0); }; CViewerManager.prototype.getAvailableOutputResponseCallback=function(_3a1){ var oCV=this.getCV(); oCV.init(_3a1.getJSONResponseObject()); oCV.rvMainWnd.renderAvailableOutputs(); }; CViewerManager.prototype.authenticate=function(_3a3,url){ this.exit(); this.getCV().setKeepSessionAlive(true); if(window.delCookie){ delCookie("cc_state"); } if(_3a3=="logon"||_3a3=="relogon"){ location.href=url+"&h_CAM_action=logon&m_reload="; } if(_3a3=="logoff"){ location.href=url+"&h_CAM_action=logoff"; } }; CViewerManager.prototype.launchNewGeneral=function(_3a5,_3a6){ var _3a7=document.getElementById("formWarpRequest"+this.getCVId()); if(_3a7){ var _3a8=""; if(_3a7["reRunObj"]){ _3a8=_3a7["reRunObj"].value; }else{ _3a8=_3a7["ui.object"].value; } var _3a9=this.getCV().getGateway()+"?"+constructGETRequestParamsString("b_action=xts.run&m=portal/viewer-closeIframe.xts&cv.id="+this.getCVId()); var _3aa={"m":"portal/new_general.xts","m_new_class":_3a5,"so.searchPath":_3a6,"m_name":this.getCV().envParams["ui.name"],"m_obj_searchPath":_3a8,"m_obj":_3a8}; _3aa["ui.backURL"]=_3a9; cvLoadDialog(this.getCV(),_3aa,500,425,RV_RES.IDS_JS_ADD_TO_MY_FOLDERS_IFRAME_TITLE); } }; CViewerManager.prototype.addToBookmarks=function(){ var _3ab=document.getElementById("formWarpRequest"+this.getCVId()); var _3ac=this.getCV().envParams; var _3ad="b_action=cognosViewer"; for(var _3ae in _3ac){ if(_3ae.indexOf("ui.")==0&&_3ae!="ui.primaryAction"&&_3ae!="ui.backURL"&&_3ac!="ui.spec"&&_3ae!="ui.conversation"&&_3ae!="ui.cafcontextid"){ _3ad+="&"+_3ae+"="; if(_3ae=="ui.action"&&_3ac["ui.primaryAction"]!=""){ _3ad+=encodeURIComponent(_3ac["ui.primaryAction"]); }else{ _3ad+=encodeURIComponent(_3ac[_3ae]); } } if(_3ae.indexOf("run.")==0){ _3ad+="&"+_3ae+"="+encodeURIComponent(_3ac[_3ae]); } } var sURL=this.getCV().sGateway+"?"+constructGETRequestParamsString(_3ad); var _3b0=""; if(_3ab["ui.action"].value=="view"){ if(typeof _3ac["versionName"]!="undefined"&&_3ac["versionName"]!=""){ _3b0=RV_RES.RV_VIEW_REPORT; }else{ _3b0=RV_RES.RV_VIEW_RECENT_REPORT; } } if(_3ab["ui.action"].value=="run"){ _3b0=RV_RES.RV_RUN_REPORT; } if(_3b0!=""){ _3b0+=" - "; } _3b0+=_3ac["ui.name"]; window.external.AddFavorite(sURL,_3b0); }; function leavingRV(){ if(window.gaRV_INSTANCES&&window.gaRV_INSTANCES.length){ for(var _3b1=0;_3b1=0){ var _3bb=_3ba.split("?"); return _3bb[0]+"?"+CAFXSSEncode(_3bb[_3bb.length-1]); } return CAFXSSEncode(_3ba); }else{ return _3ba; } }; function sortReportHistoryStackDescending(a,b){ return (b.getIdx()-a.getIdx()); }; function sortReportHistoryStackAscending(a,b){ return (b.getIdx()-a.getIdx()); }; gToolbarButtonStyle=new CUIStyle("toolbarButton","toolbarButtonOver","toolbarButtonPressed","toolbarButtonOverPressed","toolbarButton"); gToolbarStyle=new CUIStyle("mainViewerHeader3","","","",""); gBannerButtonStyle=new CUIStyle("bannerToolbarButton","bannerToolbarButtonOver","","",""); gBannerToolbarStyle=new CUIStyle("bannerButtonContainer","","","",""); gMenuItemStyle=new CUIStyle("menuItem_normal","menuItem_hover","","","menuItem_disabled"); gMenuStyle=new CUIStyle("clsMenu","","","",""); gMenuSeperatorStyle=new CUIStyle("menuHorizontalSeperator","","","",""); gBannerItemStyle=new CUIStyle("bannerMenuItem","bannerMenuItemOver","","",""); gBannerStaticText=new CUIStyle("bannerText","","","",""); gBannerLink=new CUIStyle("bannerLink","bannerLink","","",""); gMenuSeperator=new CSeperator("horizontal_line","1",gMenuSeperatorStyle); gToolbarSeperator=new CSeperator("horizonal_blank","5"); function CMainWnd(oCV){ this.setCV(oCV); this.m_contextMenu=null; this.m_reportHistoryList=[]; this.m_currentFormat=""; this.m_toolbar=null; this.m_bannerToolbar=null; this.m_browserHistoryIndex=history.length; this.m_showContextMenuOnClick=false; if(oCV.getConfig&&oCV.getConfig()){ var _3c1=oCV.getConfig().getEventsConfig(); this.m_showContextMenuOnClick=_3c1?_3c1.getShowContextMenuOnClick():false; } }; CMainWnd.prototype=new CViewerHelper(); CMainWnd.prototype.setBannerToolbar=function(_3c2){ this.m_bannerToolbar=new CViewerToolbar(); this.m_bannerToolbar.init(_3c2); }; CMainWnd.prototype.getBannerToolbar=function(){ if(this.m_bannerToolbar){ return this.m_bannerToolbar.getCBar(); } return null; }; CMainWnd.prototype.closeContextMenuAndToolbarMenus=function(){ var _3c3=this.getToolbar(); if(_3c3){ _3c3.closeMenus(); } var cm=this.getContextMenu(); if(cm){ cm.m_contextMenu.remove(); } }; CMainWnd.prototype.setToolbar=function(_3c5){ this.m_toolbar=new CViewerToolbar(); this.m_toolbar.init(_3c5); }; CMainWnd.prototype.getToolbar=function(){ if(this.m_toolbar){ return this.m_toolbar.getCBar(); } return null; }; CMainWnd.prototype.getToolbarControl=function(){ return this.m_toolbar; }; CMainWnd.prototype.setCurrentFormat=function(_3c6){ this.m_currentFormat=_3c6; }; CMainWnd.prototype.updateToolbar=function(_3c7){ this.updateCurrentFormat(_3c7,this.getCV().getWebContentRoot()); this.updateKeepThisVersion(); }; CMainWnd.prototype.updateKeepThisVersion=function(){ if(this.getCV().getStatus()=="complete"){ var _3c8=this.getCV().getSecondaryRequests(); var _3c9=false; var _3ca=false; var _3cb=false; if(_3c8){ for(var _3cc=0;_3cc<_3c8.length;_3cc++){ switch(_3c8[_3cc]){ case "save": _3c9=true; break; case "saveAs": _3ca=true; break; case "email": _3cb=true; break; } } } var _3cd=this.getToolbarControl(); if(_3cd){ var _3ce=_3cd.getItem("keepThisVersion"); if(_3ce){ if(!_3c9&&!_3ca&&!_3cb){ _3ce.hide(); }else{ _3ce.show(); } var _3cf=_3ce.getMenu(); if(_3c9||_3ca||_3cb){ if(_3cf){ var _3d0=_3cf.getItem("saveReport"); if(_3d0){ if(_3c9){ _3d0.show(); }else{ _3d0.hide(); } } var _3d1=_3cf.getItem("saveAsReportView"); if(_3d1){ if(_3ca){ _3d1.show(); }else{ _3d1.hide(); } } var _3d2=_3cf.getItem("emailReport"); if(_3d2){ if(_3cb){ _3d2.show(); }else{ _3d2.hide(); } } } } } } } }; function CMainWnd_updateCurrentFormat(_3d3,_3d4){ var _3d5=""; var _3d6=""; switch(_3d3){ case "HTML": case "HTMLFragment": case "XHTMLFRGMT": _3d5=_3d4+"/rv/images/action_view_html.gif"; _3d6=RV_RES.RV_VIEW_HTML; break; case "PDF": _3d5=_3d4+"/rv/images/action_view_pdf.gif"; _3d6=RV_RES.RV_VIEW_PDF; break; case "XML": _3d5=_3d4+"/rv/images/action_view_xml.gif"; _3d6=RV_RES.RV_VIEW_XML; break; } if(_3d5!=""&&_3d6!=""){ var _3d7=this.getToolbarControl(); if(_3d7){ var _3d8=this.getCV().envParams["ui.action"]=="view"; var _3d9=null; if(_3d8){ _3d9=_3d7.getItem("viewIn"); }else{ _3d9=_3d7.getItem("runIn"); } if(_3d9){ _3d9.setIcon(_3d5); _3d9.setToolTip(_3d6); var sRV=this.getCVObjectRef()+".getRV()."; _3d9.setAction("javascript:"+sRV+"viewReport('"+_3d3+"');"); } } } this.setCurrentFormat(_3d3); }; CMainWnd.prototype.getCurrentFormat=function(){ return this.m_currentFormat; }; function CMainWnd_getSelectionController(){ var _3db; try{ _3db=getCognosViewerSCObjectRef(this.getCV().getId()); } catch(e){ _3db=null; } return _3db; }; var g_oPressTimer=null; var g_bLongPressDetected=false; var g_oPreviousValues={}; if(window.attachEvent){ window.attachEvent("onmouseout",f_cancelLongTouch); window.attachEvent("ontouchstart",onTouchStart); window.attachEvent("ontouchend",f_cancelLongTouch); window.attachEvent("ontouchleave",f_cancelLongTouch); window.attachEvent("ontouchcancel",f_cancelLongTouch); }else{ if(window.addEventListener){ window.addEventListener("mouseout",f_cancelLongTouch); window.addEventListener("touchstart",onTouchStart); window.addEventListener("touchend",f_cancelLongTouch); window.addEventListener("touchleave",f_cancelLongTouch); window.addEventListener("touchcancel",f_cancelLongTouch); } } function f_cancelLongTouch(evt){ if(isIOS()){ if(g_oPressTimer!==null){ clearTimeout(g_oPressTimer); g_oPressTimer=null; } } }; function onTouchStart(evt){ if(isIOS()){ g_bLongPressDetected=false; g_oPressTimer=setTimeout(function(){ var node=getNodeFromEvent(evt); g_oPreviousValues.webkitTouchCallout=node.style.getPropertyValue("webkitTouchCallout"); g_oPreviousValues.webkitUserSelect=node.style.getPropertyValue("webkitUserSelect"); node.style.webkitTouchCallout="None"; node.style.webkitUserSelect="None"; g_bLongPressDetected=true; },1500); } return false; }; function CMainWnd_pageClicked(evt){ var oCV=this.getCV(); f_cancelLongTouch(evt); if(this.m_showContextMenuOnClick||(isIOS()&&g_bLongPressDetected)){ var node=getNodeFromEvent(evt); if(node&&typeof node.onclick!="function"&&(node.nodeName.toLowerCase()!="span"||typeof node.parentNode.onclick!="function")){ oCV.dcm(evt,true); if(isIOS()&&g_bLongPressDetected){ node.style.webkitTouchCallout=g_oPreviousValues.webkitTouchCallout; node.style.webkitUserSelect=g_oPreviousValues.webkitUserSelect; } return stopEventBubble(evt); } } this.hideOpenMenus(); if(oCV!=null){ if(typeof oCV.sortColumn=="undefined"||!oCV.sortColumn(evt)){ var _3e2=oCV.getDrillMgr(); if(_3e2){ var _3e3=_3e2.singleClickDrillEvent(evt,"RV"); } } } if(oCV.getViewerWidget()){ oCV.getViewerWidget().updateToolbar(); } setNodeFocus(evt); if(_3e3){ return stopEventBubble(evt); } }; function CMainWnd_hideOpenMenus(){ var cm=this.getContextMenu(); if(typeof cm!="undefined"&&cm!=null){ cm.hide(); } var tb=this.getToolbar(); if(typeof tb!="undefined"&&tb!=null){ tb.closeMenus(); } var _3e6=this.getBannerToolbar(); if(_3e6!="undefined"&&_3e6!=null){ _3e6.closeMenus(); } }; function CMainWnd_draw(){ var _3e7=this.getToolbar(); if(_3e7&&this.m_uiBlackList.indexOf(" RV_TOOLBAR_BUTTONS ")){ var _3e8=""; var f=document.forms["formWarpRequest"+this.getCVId()]; if(f["run.outputFormat"]&&f["run.outputFormat"].value){ _3e8=f["run.outputFormat"].value; }else{ if(f["ui.format"]&&f["ui.format"].value){ _3e8=f["ui.format"].value; } } if(_3e8!=""){ this.updateCurrentFormat(_3e8,this.getCV().getWebContentRoot()); } _3e7.draw(); } var _3ea=this.getBannerToolbar(); if(_3ea){ _3ea.draw(); } }; function CMainWnd_addToReportHistory(_3eb){ this.m_reportHistoryList[this.m_reportHistoryList.length]=_3eb; }; function CMainWnd_getReportHistory(){ return this.m_reportHistoryList; }; function CMainWnd_getContextMenu(){ return this.m_contextMenu; }; function CMainWnd_displayContextMenu(evt,_3ed){ if(!this.getCV().bEnableContextMenu){ return false; } evt=(evt)?evt:((event)?event:null); var _3ee=this.getSelectionController(); if(_3ee!=null){ var cm=this.getContextMenu(); if(_3ed&&this.getCV().bCanUseCognosViewerSelection==true){ if(!_3ee.pageContextClicked(evt)){ if(typeof cm!="undefined"&&cm!=null){ cm.m_contextMenu.remove(); } return false; } } cm=this.getContextMenu(); if(typeof cm!="undefined"&&cm!=null){ cm.draw(evt); if(!isIE()){ cm.m_contextMenu.m_focusCell=getNodeFromEvent(evt); } } var tb=this.getToolbar(); if(typeof tb!="undefined"&&tb!=null){ tb.closeMenus(); } var _3f1=this.getBannerToolbar(); if(_3f1!="undefined"&&_3f1!=null){ _3f1.closeMenus(); } } }; function CMainWnd_getReportHistoryLength(){ return this.m_reportHistoryList.length; }; function CMainWnd_executePreviousReport(_3f2){ if(_3f2==-1){ _3f2=this.getReportHistoryLength()-1; } for(var i=0;i0){ _414.enable(); }else{ _414.disable(); } } } var _416=this.getContextMenu(); if(typeof _416!="undefined"&&_416!=null){ _416.update(_40d); } } }; function CMainWnd_addDrillTargets(_417){ this.m_oCV.addDrillTargets(_417); }; function CMainWnd_getDrillTargets(){ return this.m_oCV.getDrillTargets(); }; function CMainWnd_getDrillTarget(idx){ return this.m_oCV.getDrillTarget(idx); }; function CMainWnd_getNumberOfDrillTargets(){ return this.m_oCV.getNumberOfDrillTargets(); }; CMainWnd.prototype.renderAvailableOutputs=function(){ var _419=this.getCVObjectRef()+".getRV()."; var oCV=this.getCV(); var _41b=this.getToolbarControl(); var _41c=this.getUIHide(); var _41d=oCV.getWebContentRoot(); var _41e=oCV.getSkin(); var _41f=null; var _420=null; if(typeof _41b!="undefined"&&_41b!=null){ _41f=_41b.getItem("viewIn"); if(_41f){ _420=_41f.getMenu(); } } if(_420.getNumItems()==0){ if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_HTML ")==-1){ this.m_viewInHtmlButton=new CMenuItem(_420,RV_RES.RV_VIEW_HTML,"javascript:"+_419+"viewReport('HTML');",_41d+"/rv/images/action_view_html.gif",gMenuItemStyle,_41d,_41e); if(oCV.oOutputFormatPath.HTML==""){ this.m_viewInHtmlButton.disable(); } } if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_PDF ")==-1){ this.m_viewInPDFButton=new CMenuItem(_420,RV_RES.RV_VIEW_PDF,"javascript:"+_419+"viewReport('PDF');",_41d+"/rv/images/action_view_pdf.gif",gMenuItemStyle,_41d,_41e); if(oCV.oOutputFormatPath.PDF==""){ this.m_viewInPDFButton.disable(); } } if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_XML ")==-1){ this.m_viewInXMLButton=new CMenuItem(_420,RV_RES.RV_VIEW_XML,"javascript:"+_419+"viewReport('XML');",_41d+"/rv/images/action_view_xml.gif",gMenuItemStyle,_41d,_41e); if(oCV.oOutputFormatPath.XML==""){ this.m_viewInXMLButton.disable(); } } if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_XLS ")==-1){ this.m_viewInXLSButton=new CMenuItem(_420,RV_RES.RV_VIEW_OPTIONS,"",_41d+"/rv/images/action_view_excel_options.gif",gMenuItemStyle,_41d,_41e); this.excelFormatCascadedMenu=this.m_viewInXLSButton.createCascadedMenu(gMenuStyle,RV_RES.RV_VIEW_OPTIONS); if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_XLS_SPREADSHEETML_DATA ")==-1){ this.viewInSpreadsheetMLDataMenuItem=new CMenuItem(this.excelFormatCascadedMenu,RV_RES.RV_VIEW_SPREADSHEETML_DATA,"javascript:"+_419+"viewReport('xlsxData');",_41d+"/rv/images/action_view_excel_2007.gif",gMenuItemStyle,_41d,_41e); if(oCV.oOutputFormatPath.xlsxData==""){ this.viewInSpreadsheetMLDataMenuItem.disable(); } } if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_XLS_SPREADSHEETML ")==-1){ this.viewInSpreadsheetMLMenuItem=new CMenuItem(this.excelFormatCascadedMenu,RV_RES.RV_VIEW_SPREADSHEETML,"javascript:"+_419+"viewReport('spreadsheetML');",_41d+"/rv/images/action_view_excel_2007.gif",gMenuItemStyle,_41d,_41e); if(oCV.oOutputFormatPath.spreadsheetML==""){ this.viewInSpreadsheetMLMenuItem.disable(); } } if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_XLS_XLWA ")==-1){ this.viewInXLSWebArchiveMenuItem=new CMenuItem(this.excelFormatCascadedMenu,RV_RES.RV_VIEW_XLWA,"javascript:"+_419+"viewReport('XLWA');",_41d+"/rv/images/action_view_excel_2002.gif",gMenuItemStyle,_41d,_41e); if(oCV.oOutputFormatPath.XLWA==""){ this.viewInXLSWebArchiveMenuItem.disable(); } } if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_XLS_SINGLEXLS ")==-1){ this.viewInSingleXLSMenuItem=new CMenuItem(this.excelFormatCascadedMenu,RV_RES.RV_VIEW_SINGLE_EXCEL,"javascript:"+_419+"viewReport('singleXLS');",_41d+"/rv/images/action_view_excel_options.gif",gMenuItemStyle,_41d,_41e); if(oCV.oOutputFormatPath.singleXLS==""){ this.viewInSingleXLSMenuItem.disable(); } } if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_XLS_XLS ")==-1){ this.viewInSingleXLSMenuItem=new CMenuItem(this.excelFormatCascadedMenu,RV_RES.RV_VIEW_EXCEL,"javascript:"+_419+"viewReport('XLS');",_41d+"/rv/images/action_view_excel_2000.gif",gMenuItemStyle,_41d,_41e); if(oCV.oOutputFormatPath.XLS==""){ this.viewInSingleXLSMenuItem.disable(); } } if(_41c.indexOf(" RV_TOOLBAR_BUTTONS_XLS_CSV ")==-1){ var _421=""; if(getViewerDirection()=="rtl"){ _421="/rv/images/action_view_csv_rtl.gif"; }else{ _421="/rv/images/action_view_csv.gif"; } this.viewInCSVMenuItem=new CMenuItem(this.excelFormatCascadedMenu,RV_RES.RV_VIEW_CSV,"javascript:"+_419+"viewReport('CSV');",_41d+_421,gMenuItemStyle,_41d,_41e); if(oCV.oOutputFormatPath.CSV==""){ this.viewInCSVMenuItem.disable(); } } } } _420.draw(); if(_420.isVisible()){ _420.show(); } }; CMainWnd.prototype.saveReportHistoryAsXML=function(){ var _422=""; var _423=this.getReportHistory(); if(_423.length>0){ var _424=self.XMLBuilderCreateXMLDocument("previousReports"); var _425=0; if(_423.length>20){ _425=_423.length-20; } for(var _426=_425;_426<_423.length;++_426){ _423[_426].saveAsXML(_424.documentElement); } _422=XMLBuilderSerializeNode(_424); } return _422; }; CMainWnd.prototype.addCurrentReportToReportHistory=function(){ var oCV=this.getCV(); var _428={}; var _429=oCV.envParams["ui.name"]; var _42a=oCV.envParams["ui.action"]; if(_42a=="view"){ _428["ui.action"]="view"; _428["ui.format"]=oCV.envParams["ui.format"]; }else{ _428["ui.action"]="currentPage"; _428["ui.conversation"]=oCV.getConversation(); _428["m_tracking"]=oCV.getTracking(); _428["run.outputFormat"]=oCV.envParams["run.outputFormat"]; if(oCV.envParams["rapReportInfo"]){ _428["rapReportInfo"]=oCV.envParams["rapReportInfo"]; } if(oCV.envParams.limitedInteractiveMode){ _428.limitedInteractiveMode=oCV.envParams.limitedInteractiveMode; } if(oCV.envParams["ui.spec"]){ _428["ui.spec"]=oCV.envParams["ui.spec"]; } if(oCV.envParams.uiSpecAddedFromRun){ _428.uiSpecAddedFromRun=oCV.envParams.uiSpecAddedFromRun; } } if(typeof oCV.envParams["ui.object"]!="undefined"){ _428["ui.object"]=oCV.envParams["ui.object"]; }else{ _428["ui.spec"]=oCV.envParams["ui.spec"]; _428["ui.object"]=""; } _428["ui.primaryAction"]=oCV.envParams["ui.primaryAction"]; if(oCV.envParams["ui.routingServerGroup"]){ _428["ui.routingServerGroup"]=oCV.envParams["ui.routingServerGroup"]; } this.addToReportHistory(new CReportHistory(this,this.m_reportHistoryList.length,_429,_428)); }; CMainWnd.prototype.draw=CMainWnd_draw; CMainWnd.prototype.addDrillTargets=CMainWnd_addDrillTargets; CMainWnd.prototype.getDrillTarget=CMainWnd_getDrillTarget; CMainWnd.prototype.getDrillTargets=CMainWnd_getDrillTargets; CMainWnd.prototype.getNumberOfDrillTargets=CMainWnd_getNumberOfDrillTargets; CMainWnd.prototype.addToReportHistory=CMainWnd_addToReportHistory; CMainWnd.prototype.getReportHistoryLength=CMainWnd_getReportHistoryLength; CMainWnd.prototype.getReportHistory=CMainWnd_getReportHistory; CMainWnd.prototype.executePreviousReport=CMainWnd_executePreviousReport; CMainWnd.prototype.getContextMenu=CMainWnd_getContextMenu; CMainWnd.prototype.displayContextMenu=CMainWnd_displayContextMenu; CMainWnd.prototype.hideOpenMenus=CMainWnd_hideOpenMenus; CMainWnd.prototype.pageClicked=CMainWnd_pageClicked; CMainWnd.prototype.getUIHide=CMainWnd_getUIHide; CMainWnd.prototype.update=CMainWnd_update; CMainWnd.prototype.getSelectionController=CMainWnd_getSelectionController; CMainWnd.prototype.getReportHistoryConversations=CMainWnd_getReportHistoryConversations; CMainWnd.prototype.updateCurrentFormat=CMainWnd_updateCurrentFormat; function resizeIFrame(evt){ var oCV=window.gaRV_INSTANCES[0]; var _42d=document.getElementById("CVReport"+oCV.getId()); var _42e=document.getElementById("CVIFrame"+oCV.getId()); if(typeof _42d!="undefined"&&_42d!=null&&typeof _42e!="undefined"&&_42e!=null){ oCV.attachedOnResize=true; oCV.setMaxContentSize(); _42e.style.height="99%"; } }; function CognosViewerAction(){ this.m_oCV=null; }; CognosViewerAction.prototype.setRequestParms=function(_42f){ }; 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(_435){ return _435; }; CognosViewerAction.prototype.addAdditionalOptions=function(_436){ }; 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 _438=""; if(this.m_oCV!=null){ if(typeof this.m_oCV.envParams["reportpart_id"]!="undefined"){ _438=this.m_oCV.envParams["reportpart_id"]; }else{ if(typeof this.m_oCV.envParams["ui.name"]!="undefined"){ _438=this.m_oCV.envParams["ui.name"]; } } } return _438; }; CognosViewerAction.prototype.getContainerId=function(_439){ var _43a=""; if(_439&&_439.getAllSelectedObjects){ var _43b=_439.getAllSelectedObjects(); if(_43b){ var _43c=_43b[0]; if(_43c&&_43c.getLayoutElementId){ _43a=this.removeNamespace(_43c.getLayoutElementId()); } } } return _43a; }; CognosViewerAction.prototype.removeNamespace=function(_43d){ var _43e=_43d; try{ if(_43d!=""){ var _43f=_43d.indexOf(this.m_oCV.getId()); if(_43f!=-1){ _43d=_43d.replace(this.m_oCV.getId(),""); } } return _43d; } catch(e){ return _43e; } }; 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 _440=-1; if(this.m_oCV!=null&&this.m_oCV.getSelectionController()!=null){ _440=this.m_oCV.getSelectionController().getSelections().length; } return _440; }; CognosViewerAction.prototype.buildDynamicMenuItem=function(_441,_442){ _441.action={name:"LoadMenu",payload:{action:_442}}; _441.items=[{"name":"loading","label":RV_RES.GOTO_LOADING,iconClass:"loading"}]; return _441; }; CognosViewerAction.prototype.createCognosViewerDispatcherEntry=function(_443){ var oReq=new ViewerDispatcherEntry(this.getCognosViewer()); oReq.addFormField("ui.action",_443); this.preProcess(); if(this.doAddActionContext()===true){ var _445=this.addActionContext(); oReq.addFormField("cv.actionContext",_445); if(window.gViewerLogger){ window.gViewerLogger.log("Action context",_445,"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 _446=this.getCognosViewer().getViewerWidget(); if(_446){ var _447={"modified":true}; _446.fireEvent("com.ibm.bux.widget.modified",null,_447); } } catch(e){ } }; CognosViewerAction.prototype.showCustomCursor=function(evt,id,_44a){ var _44b=document.getElementById(id); if(_44b==null){ _44b=document.createElement("span"); _44b.className="customCursor"; _44b.setAttribute("id",id); document.body.appendChild(_44b); } var _44c=""; _44b.innerHTML=_44c; _44b.style.position="absolute"; _44b.style.left=(evt.clientX+15)+"px"; _44b.style.top=(evt.clientY+15)+"px"; _44b.style.display="inline"; }; CognosViewerAction.prototype.hideCustomCursor=function(id){ var _44e=document.getElementById(id); if(_44e!=null){ _44e.style.display="none"; } }; CognosViewerAction.prototype.selectionHasContext=function(){ var _44f=this.getCognosViewer().getSelectionController().getAllSelectedObjects(); var _450=false; if(_44f!=null&&_44f.length>0){ for(var i=0;i<_44f.length;i++){ if(_44f[i].hasContextInformation()){ _450=true; break; } } } return _450; }; CognosViewerAction.prototype.isInteractiveDataContainer=function(_452){ var _453=false; if(typeof _452!="undefined"&&_452!=null){ var id=_452.toLowerCase(); _453=id=="crosstab"||id=="list"||this.getCognosViewer().getRAPReportInfo().isChart(id); } return _453; }; CognosViewerAction.prototype.getSelectedContainerId=function(){ var _455=this.getCognosViewer(); var _456=_455.getSelectionController(); var _457=null; if(_456!=null&&typeof _456!="undefined"){ _457=this.getContainerId(_456); } return _457; }; CognosViewerAction.prototype.getSelectedReportInfo=function(){ var _458=this.getCognosViewer(); var _459=this.getSelectedContainerId(); var _45a=this.getReportInfo(_459); if(_45a==null){ var _45b=_458.getRAPReportInfo(); if(_45b.getContainerCount()==1){ _45a=_45b.getContainerFromPos(0); } } return _45a; }; CognosViewerAction.prototype.getReportInfo=function(_45c){ var _45d=null; if(_45c!=null&&_45c.length>0){ var _45e=this.getCognosViewer(); var _45f=_45e.getRAPReportInfo(); _45d=_45f.getContainer(_45c); } return _45d; }; CognosViewerAction.prototype.isSelectionOnChart=function(){ var _460=this.getCognosViewer(); if(_460.getSelectionController().hasSelectedChartNodes()){ return true; } var _461=this.getContainerId(_460.getSelectionController()); if(typeof _461!="undefined"){ var _462=this.getReportInfo(_461); if(_462!=null&&_462.displayTypeId){ var _463=_462.displayTypeId.toLowerCase(); return _460.getRAPReportInfo().isChart(_463); } } return false; }; CognosViewerAction.prototype.ifContainsInteractiveDataContainer=function(){ var _464=this.getCognosViewer().getRAPReportInfo(); if(_464){ return _464.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 _466=[]; var _467=document.getElementById("rt"+this.m_oCV.getId()); if(_467!=null){ _466=getElementsByAttribute(_467,"*","lid"); } return _466; }; CognosViewerAction.prototype.addClientContextData=function(_468){ var _469=this.m_oCV.getSelectionController(); if(typeof _469!="undefined"&&_469!=null&&typeof _469.getCCDManager!="undefined"&&_469.getCCDManager()!=null){ var _46a=_469.getCCDManager(); return (""+xml_encode(_46a.MetadataToJSON())+""+""+xml_encode(_46a.ContextDataSubsetToJSON(_468))+""); } return ""; }; CognosViewerAction.prototype.getDataItemInfoMap=function(){ var _46b=this.m_oCV.getSelectionController(); if(typeof _46b!="undefined"&&_46b!=null&&typeof _46b.getCCDManager!="undefined"&&_46b.getCCDManager()!=null){ var _46c=_46b.getCCDManager(); return (""+xml_encode(_46c.DataItemInfoToJSON())+""); } return ""; }; CognosViewerAction.prototype.getRAPLayoutTag=function(_46d){ var _46e=null; if(typeof _46d=="object"&&_46d!=null){ _46e=_46d.getAttribute("rap_layout_tag"); } return _46e; }; CognosViewerAction.prototype.addMenuItemChecked=function(_46f,_470,_471){ if(_46f){ if(this.getCognosViewer().isHighContrast()){ _470["class"]="menuItemSelected"; } _470.iconClass="menuItemChecked"; }else{ if(_471&&_471.length>0){ _470.iconClass=_471; } } }; CognosViewerAction.prototype.gatherFilterInfoBeforeAction=function(_472){ var _473=this.getCognosViewer().getViewerWidget(); _473.filterRequiredAction=_472; _473.clearRAPCache(); _473.fireEvent("com.ibm.bux.widget.action",null,{action:"canvas.filters"}); }; CognosViewerAction.prototype.addClientSideUndo=function(_474,_475){ var _476=GUtil.generateCallback(_474.doUndo,_475,_474); var _477=GUtil.generateCallback(_474.doRedo,_475,_474); this.getUndoRedoQueue().addClientSideUndo({"tooltip":_474.getUndoHint(),"undoCallback":_476,"redoCallback":_477}); this.getCognosViewer().getViewerWidget().updateToolbar(); }; CognosViewerAction.prototype.isValidMenuItem=function(){ var _478=this.getCognosViewer(); var _479=_478.getViewerWidget(); if(this.isPromptWidget()){ return false; } return true; }; CognosViewerAction.prototype.isPositiveInt=function(_47a){ if(typeof _47a==="undefined"||_47a===null){ return false; } var _47b=parseInt(_47a,10); return _47a&&_47b===+_47a&&_47b>0&&_47a.indexOf(".")==-1; }; CognosViewerAction.prototype.buildActionResponseObject=function(_47c,code,msg){ return {"status":_47c,"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(_47f){ _47f.addFormField("cv.responseFormat","asynchDetailMIMEAttachment"); _47f.addFormField("bux",this.m_oCV.getViewerWidget()?"true":"false"); _47f.addFormField("cv.id",this.m_oCV.envParams["cv.id"]); }; LineageAction.prototype.getSelectionOptions=function(_480){ var _481=this.m_oCV.getSelectionController(); var _482=getSelectionContextIds(_481); _480.addFormField("context.format","initializer"); _480.addFormField("context.type","reportService"); _480.addFormField("context.selection","metadata,"+_482.toString()); }; LineageAction.prototype.getPrimaryRequestOptions=function(_483){ _483.addFormField("specificationType","metadataServiceLineageSpecification"); _483.addFormField("ui.action","runLineageSpecification"); _483.addFormField("ui.object",this.m_oCV.envParams["ui.object"]); }; LineageAction.prototype.getSecondaryRequestOptions=function(_484){ _484.addFormField("ui.conversation",this.m_oCV.getConversation()); _484.addFormField("m_tracking",this.m_oCV.getTracking()); _484.addFormField("ui.action","lineage"); }; LineageAction.prototype.updateMenu=function(_485){ if(!this.getCognosViewer().bCanUseLineage){ return ""; } _485.disabled=!this.selectionHasContext(); return _485; }; LineageAction.prototype.execute=function(){ var oCV=this.getCognosViewer(); var _487=new AsynchDataDispatcherEntry(oCV); this.getCommonOptions(_487); this.getSelectionOptions(_487); if(oCV.getConversation()==""){ this.getPrimaryRequestOptions(_487); }else{ this.getSecondaryRequestOptions(_487); } _487.setCallbacks({"complete":{"object":this,"method":this.handleLineageResponse}}); if(!oCV.m_viewerFragment){ _487.setRequestIndicator(oCV.getRequestIndicator()); var _488=new WorkingDialog(oCV); _488.setSimpleWorkingDialogFlag(true); _487.setWorkingDialog(_488); } oCV.dispatchRequest(_487); }; LineageAction.prototype.handleLineageResponse=function(_489){ var oCV=this.getCognosViewer(); oCV.loadExtra(); oCV.setStatus(_489.getAsynchStatus()); oCV.setConversation(_489.getConversation()); oCV.setTracking(_489.getTracking()); var _48b=null; if(typeof MDSRV_CognosConfiguration!="undefined"){ _48b=new MDSRV_CognosConfiguration(); var _48c=""; if(this.m_oCV.envParams["metadataInformationURI"]){ _48c=this.m_oCV.envParams["metadataInformationURI"]; } _48b.addProperty("lineageURI",_48c); _48b.addProperty("gatewayURI",this.m_oCV.getGateway()); } var _48d=this.m_oCV.envParams["ui.object"]; var _48e=getViewerSelectionContext(this.m_oCV.getSelectionController(),new CSelectionContext(_48d)); var _48f=new MDSRV_LineageFragmentContext(_48b,_48e); _48f.setExecutionParameters(this.m_oCV.getExecutionParameters()); if(typeof _48d=="string"){ _48f.setReportPath(_48d); } _48f.setReportLineage(_489.getResult()); _48f.open(); }; function CSelectionDefaultStyles(_490){ this.m_primarySelectionColor=null; this.m_highContrastBorderStyle="solid"; this.m_secondarySelectionIsDisabled=false; if(_490){ this.m_selectionController=_490; this.m_oCognosViewer=_490.m_oCognosViewer; if(this.m_oCognosViewer){ var _491=this.m_oCognosViewer.getUIConfig(); if(_491){ if(_491.getPrimarySelectionColor()){ this.m_primarySelectionColor=_491.getPrimarySelectionColor(); } if(!_491.getShowSecondarySelection()){ this.m_secondarySelectionIsDisabledConfig=true; }else{ if(_491.getSeondarySelectionColor()){ this.m_secondarySelectionColor=_491.getSeondarySelectionColor(); } } } } } }; CSelectionDefaultStyles.prototype.getPrimarySelectionColor=function(_492){ return this.m_primarySelectionColor; }; CSelectionDefaultStyles.prototype.getSecondarySelectionColor=function(){ return this.m_secondarySelectionColor; }; CSelectionDefaultStyles.prototype.getHighContrastBorderStyle=function(){ return this.m_highContrastBorderStyle; }; CSelectionDefaultStyles.prototype.canApplyToSelection=function(_493){ return true; }; CSelectionDefaultStyles.prototype.secondarySelectionIsDisabled=function(){ return this.m_secondarySelectionIsDisabled; }; CSelectionDefaultStyles.prototype.setStyleForSelection=function(){ }; function CSelectionFilterStyles(_494){ this.m_selectionController=_494; 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(_495){ 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(_496){ return !this.selectionHasOnlyMeasure(_496); }; CSelectionFilterStyles.prototype.selectionHasOnlyMeasure=function(_497){ return (_497.length===1&&_497[0].length===1&&this.m_selectionController.isMeasure(_497[0][0])); }; CSelectionFilterStyles.prototype.setStyleForSelection=function(_498){ this.m_primarySelectionColor=(this.selectionHasOnlyMeasure(_498))?null:this.m_primarySelectionFilterColor; }; function CSelectionFilterContextMenuStyles(_499){ CSelectionDefaultStyles.call(this,_499); 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(_49a){ var _49b=this.getDataItems(); var item=""; if(_49b&&_49b[0]&&_49b[0][0]){ item=this.getDataItems()[0][0]; if(_49a&&_49a.itemInfo&&_49a.itemInfo.length){ var _49d=_49a.itemInfo; for(var i=0;i<_49d.length;i++){ if(_49d[i].item===item&&_49d[i].itemLabel){ return _49d[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 _4c0=this.getCellRef().className; if(_4c0&&(_4c0=="xm"||_4c0.indexOf("xm ")!=-1||_4c0.indexOf(" xm")!=-1)){ return true; } return false; }; CSelectionObject.prototype.getDataContainerType=function(){ return this.m_dataContainerType; }; CSelectionObject.prototype.getContextJsonObject=function(_4c1,_4c2){ if(this.m_oJsonContext===null){ var _4c3={}; var _4c4=[]; var _4c5=null; this.getDataItems(); this.getUseValues(); if(this.m_contextIds.length==0){ return null; } var i=0,j=0; var _4c8=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_4c1); _4c5=_4c8; this._populateJsonContextObj(_4c8,this.m_aUseValues[i][j],_4c1.getDisplayValue(this.m_contextIds[i][j]),_4c1.getMun(this.m_contextIds[i][j]),_4c3,_4c4); j++; for(;i0){ _4f4=true; break; } } if(!_4f4){ j=0; i++; } }while(!_4f4); } var _4f5=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_4ed); var _4f6=_4ed.isMeasure(this.m_contextIds[i][j]); var _4f7=this._getBestPossibleItemReference(this.m_contextIds[i][j],_4f6,_4ed.getCCDManager()); var _4f8=_4ed.getCCDManager().GetQuery(this.m_contextIds[i][j]); var _4f9=this.isDataValueOrChartElement(); var _4fa=this._populateJsonForMarshal(_4f5,_4f7,_4f6,this.m_aUseValues[i][j],_4ed.getDisplayValue(this.m_contextIds[i][j]),_4ed.getMun(this.m_contextIds[i][j]),_4f9); j++; var _4fb=[]; for(;i0){ lid=lid.substring(0,lid.indexOf(_4ee)-1); } this.m_oJsonForMarshal={"lid":lid,"query":_4f8,"selectedItem":_4fa,"context":_4fb}; } return this.m_oJsonForMarshal; }; CSelectionObject.prototype._populateJsonForMarshal=function(_4fe,_4ff,_500,_501,_502,mun,_504){ if(_4fe){ var _505={}; _505["itemName"]=_4fe; _505["isMeasure"]=_500?"true":"false"; _505["mdProperty"]=_4ff.mdProperty; _505["mdValue"]=_4ff.mdValue; _505["isDataValueOrChartElement"]=_504?"true":"false"; if(mun){ _505["mun"]=mun; } if(_501){ _505["use"]=_501; } return _505; } return null; }; CSelectionObject.prototype._getBestPossibleItemReference=function(_506,_507,_508){ var _509=null; var _50a=null; if(_507){ _50a="i"; _509=_508.GetQMID(_506); if(_509==null){ _50a="m"; _509=_508.GetMUN(_506); } if(_509==null){ _50a="r"; _509=_508.GetRDIValue(_506); } }else{ _50a="l"; _509=_508.GetLUN(_506); if(_509==null){ _50a="h"; _509=_508.GetHUN(_506); } if(_509==null){ _50a="i"; _509=_508.GetQMID(_506); } if(_509==null){ _50a="r"; _509=_508.GetRDIValue(_506); } } return {"mdProperty":_50a,"mdValue":_509}; }; 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(_50b){ var _50c=this.m_selectionController.getSelectedChartImageFromChartArea(_50b); if(_50c){ this.m_selectedVizChart=_50c.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(_50d){ this.m_chartCtxAreas=_50d; }; CSelectionChartObject.prototype.getCtxAttributeString=function(){ return this.m_context; }; function CChartHelper(_50e,_50f,_510){ var _511=_50e.parentNode; this.m_selectionObjectFactory=_50f; this.m_map=_511; _510.loadExtra(); this.imageMapHighlighter=new CImageMapHighlight(_511,_510.sWebContentRoot); this.initialize(); }; CChartHelper.prototype.initialize=function(){ this.buildMapCtxAreas(); this.m_chartCtxNodes={}; }; CChartHelper.prototype.buildMapCtxAreas=function(){ var _512={}; var _513=this.m_map.childNodes; var _514=_513.length; var _515=null; for(var i=0;i<_514;i++){ var a=_513[i]; _515=a.getAttribute("ctx"); if(_515){ if(_512[_515]){ _512[_515].push(a); }else{ _512[_515]=[a]; } } } this.m_ctxAreas=_512; }; CChartHelper.prototype.getChartNode=function(_518){ if(!this.isAreaInitialized(_518)){ var _519=_518.parentNode; this.m_map=_519; this.initialize(); this.imageMapHighlighter.initialize(_519); } var _51a=_518.getAttribute("ctx"); if(!this.m_chartCtxNodes[_51a]){ this.m_chartCtxNodes[_51a]=this.m_selectionObjectFactory.getSelectionChartObject(_518); this.m_chartCtxNodes[_51a].setCtxAreas(this.m_ctxAreas[_51a]); } return this.m_chartCtxNodes[_51a]; }; CChartHelper.prototype.isAreaInitialized=function(_51b){ return this.imageMapHighlighter.isAreaInitialized(_51b); }; CChartHelper.prototype.getImageMapHighlighter=function(){ return this.imageMapHighlighter; }; function CSelectionObjectFactory(_51c){ this.m_selectionController=_51c; }; CSelectionObjectFactory.prototype.getSelectionController=function(){ return this.m_selectionController; }; CSelectionObjectFactory.prototype.getChildSpans=function(_51d){ var _51e=[]; for(var i=0;i<_51d.childNodes.length;i++){ var _520=_51d.childNodes[i]; if(!_520.getAttribute||_520.getAttribute("skipSelection")!="true"){ _51e.push(_51d.childNodes[i]); } } var _521=_51d; var _522=""; while(!_522&&_521){ _522=_521.attributes?_521.attributes["LID"]:""; _521=_521.parentNode; } _522=_522?_522.value:""; var _523=[]; while(_51e.length>0){ var _520=_51e.pop(); var lid=_520.attributes?_520.attributes["LID"]:""; lid=lid?lid.value:""; if(!lid||lid==_522){ if(_520.nodeName.toLowerCase()=="span"){ _523.push(_520); }else{ for(i=0;i<_520.childNodes.length;i++){ _51e.push(_520.childNodes[i]); } } } } return _523; }; CSelectionObjectFactory.prototype.getSelectionObject=function(_525,_526){ var _527=new CSelectionObject(); try{ _527.setSelectionController(this.getSelectionController()); _527.m_oCellRef=_525; _527.m_sColumnRef=_525.getAttribute("cid"); _527.m_sCellTypeId=_525.getAttribute("uid"); _527.m_sLayoutType=_525.getAttribute("type"); _527.m_sTag=_525.getAttribute("tag"); _527.m_layoutElementId=this.getLayoutElementId(_525); _527.m_dataContainerType=this.getContainerType(_525); if(typeof cf!="undefined"){ var _528=cf.cfgGet("MiniQueryObj"); if(_528){ var _529=_528.findChildWithAttribute("tag",_527.m_sTag); if(_529&&_529.getAttribute("id")!=null){ _527.m_sColumnName=_529.getAttribute("id"); } } } var _52a=this.getChildSpans(_525); if(_52a.length>0){ for(var i=0;i<_52a.length;i++){ var _52c=_52a[i]; if(_52c.nodeType==1&&_52c.nodeName.toLowerCase()=="span"&&_52c.style.visibility!="hidden"){ var _52d=null; if(_525.getAttribute("ctx")!=null&&_525.getAttribute("ctx")!=""){ _52d=_525; }else{ if(_52c.getAttribute("ctx")!=null&&_52c.getAttribute("ctx")!=""){ _52d=_52c; }else{ if(_52c.getAttribute("dtTargets")&&_52c.childNodes&&_52c.childNodes.length){ for(var _52e=0;_52e<_52c.childNodes.length;_52e++){ if(_52c.childNodes[_52e].nodeType==1&&_52c.childNodes[_52e].style.visibility!="hidden"){ _52d=_52c.childNodes[_52e]; } } }else{ for(var _52f=0;_52f<_52c.childNodes.length;_52f++){ var _530=_52c.childNodes[_52f]; if(typeof _530.getAttribute!="undefined"&&_530.getAttribute("ctx")!=null&&_530.getAttribute("ctx")!=""){ _52d=_530; break; } } } } } var _531=""; if(_52d&&_52d.getAttribute("ctx")){ _531=_52d.getAttribute("ctx"); } _527.m_aDisplayValues[_527.m_aDisplayValues.length]=this.getSelectionController().getDisplayValue(_531,_525.parentNode); if(typeof _526!="undefined"&&_526!=_531){ continue; } _527=this.processCTX(_527,_531); } } }else{ if(_525.getAttribute("ctx")!=null&&_525.getAttribute("ctx")!=""&&_527.m_sLayoutType=="datavalue"){ _527=this.processCTX(_527,_525.getAttribute("ctx")); } } this.getSelectionController().processColumnTitleNode(_527); } catch(ex){ } return _527; }; CSelectionObjectFactory.prototype.processCTX=function(_532,_533){ if(typeof _533!="string"||_533.length==0){ return _532; } var ctx; if(typeof _532.m_contextIds=="object"&&_532.m_contextIds!==null&&_532.m_contextIds.length>0){ var _535=_533.split("::"); for(ctx=0;ctx<_532.m_contextIds.length;++ctx){ try{ if(_535[ctx]){ _532.m_contextIds[ctx]=_532.m_contextIds[ctx].concat(_535[ctx].split(":")); } } catch(e){ } } }else{ _532.m_contextIds=this.m_selectionController.m_oCognosViewer.getReportContextHelper().processCtx(_533); } _532.m_ctxAttributeString=_533; return _532; }; CSelectionObjectFactory.prototype.getSecondarySelectionObject=function(tag,_537,_538){ if(!_538){ _538=document; } var _539=new CSelectionObject(); _539.setSelectionController(this.getSelectionController()); _539.m_oCellRef=null; _539.m_sColumnRef=null; _539.m_sCellTypeId=null; _539.refQuery=""; var _53a=_538.getElementsByTagName("td"); for(var i=0;i<_53a.length;i++){ var _53c=_53a[i].getAttribute("tag"); if(_53c!=null&&_53c!=""){ if(tag==_53c){ var _53d=_53a[i].className; if(_53d!=null&&_53c!=""){ if((_537=="columnTitle"&&_53d=="lt")||(_537=="datavalue"&&_53d=="lc")){ _539.m_sColumnRef=_53a[i].getAttribute("cid"); _539.m_sCellTypeId=_53a[i].getAttribute("uid"); break; } } } } } if(_539.m_sCellTypeId==null){ return null; } return _539; }; CSelectionObjectFactory.prototype.getSelectionChartObject=function(_53e){ var _53f=""; if(_53e.getAttribute("flashChart")!=null){ if(typeof _53e.getCtx!="undefined"){ try{ _53f=_53e.getCtx(); } catch(e){ _53f=""; } } }else{ _53f=_53e.getAttribute("ctx"); } var _540=new CSelectionChartObject(); _540.setSelectionController(this.getSelectionController()); if(_53f!=null){ _540.m_contextIds=_53f.split("::"); for(var ctx=0;ctx<_540.m_contextIds.length;++ctx){ _540.m_contextIds[ctx]=_540.m_contextIds[ctx].split(":"); } } _540.m_layoutElementId=this.getLayoutElementId(_53e); _540.m_sLayoutType=_53e.getAttribute("type"); _540.m_chartArea=_53e; _540.m_context=_53f; _540.setSelectionOnVizChart(_53e); return _540; }; CSelectionObjectFactory.prototype.getContainerTypeFromClass=function(_542){ var _543=""; switch(_542){ case "ls": _543="list"; break; case "xt": _543="crosstab"; break; case "rt": _543="repeaterTable"; break; } return _543; }; CSelectionObjectFactory.prototype.getContainerType=function(el){ var type=""; if(el){ if(el.className){ type=this.getContainerTypeFromClass(el.className); } if(!type){ var _546=el.parentNode; if(_546){ type=this.getContainerType(_546); } } } return type; }; CSelectionObjectFactory.prototype.getLayoutElementId=function(el){ var id=""; var _549=this.getSelectionController().getNamespace(); if(el){ if(el.getAttribute&&el.getAttribute("chartcontainer")=="true"){ for(var _54a=0;_54a0){ id=_54e[0].getAttribute("LID"); } } } } return id; }; function CSelectionController(_54f,_550){ this.m_bSelectionBasedFeaturesEnabled=false; this.m_bDrillUpDownEnabled=false; this.m_bModelDrillThroughEnabled=false; this.m_oCognosViewer=null; this.m_bSavedSelections=false; if(_550){ this.m_oCognosViewer=_550; } this.initialize(_54f); this.FILTER_SELECTION_STYLE=0; this.FILTER_SELECTION_CONTEXT_MENU_STYLE=1; }; CSelectionController.prototype.initialize=function(_551){ this.m_sNamespace=_551; 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(_552){ switch(_552){ 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(_553){ this.m_bAllowHorizontalDataValueSelection=_553; }; 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(_554){ if(!this.m_bUsingCCDManager){ var _555=this.getReportContextDataArray(); var _556=1; for(var _557 in _555){ var _558=_555[_557]; if(_558[_556]==_554){ return _557; } } return ""; }else{ var sId=this.m_oCDManager.GetContextIdForDisplayValue(_554); return (sId==null)?"":sId; } }; CSelectionController.prototype.getCtxIdFromMetaData=function(sLun,sHun,_55c){ return this.m_oCDManager.getContextIdForMetaData(sLun,sHun,_55c); }; 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 _563=this.getReportMetadataArray(); var _564=0; for(var sKey in _563){ var _566=_563[sKey]; if(_566[_564]==sMun){ var _567=2; var _568=this.getReportContextDataArray(); for(var _569 in _568){ var _56a=_568[_569]; if(_56a[_567]==sKey){ return _569; } } } } return ""; }else{ var sId=this.m_oCDManager.GetContextIdForMUN(sMun); return (sId==null)?"":sId; } }; CSelectionController.prototype.canDrillDown=function(_56c){ var _56d=this.getDrillFlagForMember(_56c); return (_56d==3||_56d==2); }; CSelectionController.prototype.canDrillUp=function(_56e){ var _56f=this.getDrillFlagForMember(_56e); return (_56f==3||_56f==1); }; CSelectionController.prototype.getQueryModelId=function(_570){ var qmid=""; if(!this.m_bUsingCCDManager){ var _572=this.m_aReportContextDataArray[_570]; if(_572&&typeof _572[3]!="undefined"){ var _573=_572[3]; var _574=this.m_aReportMetadataArray[_573]; if(typeof _574!="undefined"&&typeof _574[1]!="undefined"&&_574[1]=="I"){ qmid=_574[0]; } } }else{ qmid=this.m_oCDManager.GetQMID(_570); } return qmid; }; CSelectionController.prototype.getRefQuery=function(_575){ if(!this.m_bUsingCCDManager){ return this.getMetaDataItemUseValue(4,_575); }else{ var _576=this.m_oCDManager.GetQuery(_575); return (_576==null)?"":_576; } }; CSelectionController.prototype.getRefDataItem=function(_577){ return this.m_oCognosViewer.getReportContextHelper().getRefDataItem(_577); }; CSelectionController.prototype.getMun=function(_578){ return this.m_oCognosViewer.getReportContextHelper().getMun(_578); }; CSelectionController.prototype.getHun=function(_579){ if(!this.m_bUsingCCDManager){ var sHun=null; var _57b=this.getRDI(_579); if(_57b&&_57b.length>4&&_57b[1]=="R"){ var _57c=_57b[4]; var _57d=this.getReportMetadataArray(); _57b=_57d[_57c]; } if(_57b&&_57b.length>1&&_57b[1]=="H"){ sHun=_57b[0]; } return sHun; }else{ return this.m_oCDManager.GetHUN(_579); } }; CSelectionController.prototype.fetchContextData=function(_57e,_57f){ var _580=0; if(this.m_bUsingCCDManager){ _580=this.m_oCDManager.FetchContextData(_57e,_57f); } return _580; }; CSelectionController.prototype.getMetaDataItem=function(sKey){ var _582=this.getReportMetadataArray(); if(typeof _582[sKey]!="undefined"){ return _582[sKey]; } return null; }; CSelectionController.prototype.getContextDataItem=function(_583){ var _584=this.getReportContextDataArray(); if(typeof _584[_583]!="undefined"){ return _584[_583]; } return null; }; CSelectionController.prototype.getMetaDataItemUseValue=function(_585,_586){ var _587=this.getContextDataItem(_586); if(_587!=null){ var _588=_587[_585]; if(_588!=""){ var _589=this.getMetaDataItem(_588); if(_589!=null){ return _589[0]; } } } return ""; }; CSelectionController.prototype.getRDI=function(_58a){ var _58b=this.getContextDataItem(_58a); if(_58b!=null){ var _58c=_58b[0]; if(_58c!=""){ var _58d=this.getMetaDataItem(_58c); if(_58d!=null){ return _58d; } } } }; CSelectionController.prototype.getNamespace=function(){ return this.m_sNamespace; }; CSelectionController.prototype.setSelectionBasedFeaturesEnabled=function(_58e){ this.m_bSelectionBasedFeaturesEnabled=_58e; }; CSelectionController.prototype.getSelectionBasedFeaturesEnabled=function(){ return this.m_bSelectionBasedFeaturesEnabled; }; CSelectionController.prototype.setDrillUpDownEnabled=function(_58f){ this.m_bDrillUpDownEnabled=_58f; }; CSelectionController.prototype.getDrillUpDownEnabled=function(){ return this.m_bDrillUpDownEnabled; }; CSelectionController.prototype.setModelDrillThroughEnabled=function(_590){ this.m_bModelDrillThroughEnabled=_590; }; CSelectionController.prototype.getBookletItemForCurrentSelection=function(){ var _591=this.getAllSelectedObjects(); if(_591&&_591.length>0){ var _592=_591[0]; if(_592.hasContextInformation()){ var _593=this.m_oCDManager.GetBIValue(_592.m_contextIds[0][0]); if(!_593){ return null; } return _593; } } return null; }; CSelectionController.prototype.getModelPathForCurrentSelection=function(){ var _594=null; var _595=this.getBookletItemForCurrentSelection(); if(_595){ var _594=this.m_oCDManager.getModelPathFromBookletItem(_595); } return _594; }; CSelectionController.prototype.getModelDrillThroughEnabled=function(){ var _596=this.getBookletItemForCurrentSelection(); if(_596){ var _597=this.m_oCDManager.GetBookletModelBasedDrillThru(_596); return _597==1?true:false; }else{ return this.m_bModelDrillThroughEnabled; } }; CSelectionController.prototype.clearSelectedObjects=function(_598){ try{ if(!_598){ _598=document; } this.updateUI(_598,this.getSelections(),true,false); this.m_aSelectedObjects=[]; if(typeof this.onSelectionChange=="function"){ this.onSelectionChange(); } return true; } catch(e){ return false; } }; CSelectionController.prototype.resetSelections=function(_599){ try{ if(!_599){ _599=document; } if(this.hasSelectedChartNodes()){ this.resetChartSelections(_599); } this.m_oSelectedDrillThroughImage=null; this.m_oSelectedDrillThroughSingleton=null; if(this.getSelections()){ this.updateUI(_599,this.getSelections(),true,false); this.updateUI(_599,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(_59a){ var _59b=this.m_chartHelpers; for(var _59c in _59b){ if(_59b[_59c]){ var _59d=_59b[_59c].getImageMapHighlighter(); if(_59d.hideAllAreas){ _59d.hideAllAreas(); } } } this.m_selectedChartNodes=[]; this.m_selectionContainerMap=null; }; CSelectionController.prototype.addSelectionObject=function(_59e,_59f){ try{ if(!_59f){ _59f=document; } var _5a0=_59e.getCellRef(); if(this.isCellSelected(_5a0)!==true||(typeof _5a0!="object"||_5a0===null)){ if(this.isColumnCut(_59e.getTag())!==true){ this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_59e; if(typeof this.onSelectionChange=="function"){ this.onSelectionChange(); } this.updateUI(_59f,this.getSelections(),false,false); } } return true; } catch(e){ return false; } }; CSelectionController.prototype.removeSelectionObject=function(_5a1,_5a2){ try{ if(!_5a2){ _5a2=document; } var _5a3=[]; var _5a4; for(_5a4=0;_5a40){ this.updateUI(_5a2,this.getSelections(),true,false); var _5a7=[]; for(_5a4=0;_5a40){ return true; } return false; }; function getStyleFromClass(c){ for(var i=0;i0){ var _5e7,_5e8,_5e9; if(_5e6==1||_5e6==2){ if(_5e5){ this.deselecting(this.m_cutClass); }else{ var _5ea=getStyleFromClass("cutSelection").style.color; var _5eb=getStyleFromClass("cutSelection").style.backgroundColor; _5e7=_5e4.length; for(_5e8=0;_5e8<_5e7;_5e8++){ _5e9=_5e4[_5e8].getCellRef(); var _5ec="cutQS"+_5e9.getAttribute("cid"); this.selecting(_5ec,"\n{ background-color: "+_5eb+"; color: "+_5ea+";}\n"); this.m_cutClass.push(_5ec); } } }else{ if(this.m_oCognosViewer){ this.findSelectionURLs(); _5e9=""; _5e7=_5e4.length; for(_5e8=0;_5e8<_5e7;_5e8++){ _5e9=_5e4[_5e8].getCellRef(); if(_5e9.getAttribute("oldClassName")!=null){ _5e9.className=_5e9.getAttribute("oldClassName"); _5e9.removeAttribute("oldClassName"); } this.setStyleForSelection(_5e4[_5e8].m_contextIds); if(!this.secondarySelectionIsDisabled()||_5e5){ var _5ed=document.getElementById("CVReport"+this.getNamespace()); var _5ee=getElementsByAttribute(_5ed,["td","th"],"name",_5e9.getAttribute("name"),this.m_maxSecondarySelection); for(var _5ef=0;_5ef<_5ee.length;_5ef++){ var cell=_5ee[_5ef]; if(_5e5){ this.restoreOldBackgroundImage(cell); }else{ if(cell.getAttribute("oldBackgroundImageStyle")==null){ this.saveOldCellStyles(cell); this.setSecondarySelectionStyles(cell); } } } } this.saveOldCellStyles(_5e9); if(_5e5){ this.restoreOldBackgroundImage(_5e9); if(this.m_oCognosViewer.isHighContrast()){ this.restoreOldBorder(_5e9); this.restoreOldPadding(_5e9); } }else{ this.setPrimarySelectionStyles(_5e9); if(this.m_oCognosViewer.isHighContrast()){ var size=getBoxInfo(_5e9,true); this.saveOldBorder(_5e9); this.saveOldPadding(_5e9,size); var _5f2=3; var _5f3=size.borderTopWidth+size.paddingTop-_5f2; var _5f4=size.borderBottomWidth+size.paddingBottom-_5f2; var _5f5=size.borderLeftWidth+size.paddingLeft-_5f2; var _5f6=size.borderRightWidth+size.paddingRight-_5f2; _5e9.style.border=_5f2+"px "+this.getHighContrastBorderStyle()+" black"; _5e9.style.padding=_5f3+"px "+_5f6+"px "+_5f4+"px "+_5f5+"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(_5f7){ var _5f8=true; var _5f9=_5f7.getAttribute("rsvpChart"); var _5fa=_5f7.parentNode.getAttribute("chartContainer"); if(_5f9!="true"&&_5fa!="true"){ this.m_selectedChartNodes=[]; _5f8=false; }else{ var _5fb=this.getSelectionObjectFactory().getSelectionChartObject(_5f7); this.m_selectedChartNodes=[_5fb]; } return _5f8; }; CSelectionController.prototype.setSelectedChartArea=function(_5fc,e){ var _5fe=typeof this.m_oCognosViewer.isBux!=="undefined"; var _5ff=false; if(_5fc!==null){ if(_5fc.tagName=="IMG"){ _5ff=this.setSelectedChartImgArea(_5fc); }else{ if(_5fc.nodeName=="AREA"&&_5fc.attributes["ctx"]){ _5ff=true; if(_5fe){ this.setBuxSelectedChartArea(_5fc,e); }else{ this.m_selectedChartNodes=[this.getSelectionObjectFactory().getSelectionChartObject(_5fc)]; } } } if(_5ff){ this.getObservers().notify(); } } return _5ff; }; CSelectionController.prototype.setBuxSelectedChartArea=function(_600,e){ var _602=this.getChartHelper(_600); var _603=_602.getChartNode(_600); this.setStyleForSelection(_603.m_contextIds); var _604=_602.getImageMapHighlighter(); _604.setFillColour(this.getPrimarySelectionColor()); _604.setStrokeColour(this.getPrimarySelectionColor()); if(typeof e=="undefined"){ e={}; } if(this.ctrlKeyPressed(e)||this.shiftKeyPressed(e)){ if(_604.isAreaHighlighted(_600)){ _604.hideAreas(_603.getCtxAreas()); var _605=_600.getAttribute("ctx"); var _606=this.m_selectedChartNodes.length; for(var i=0;i<_606;i++){ var _608=this.m_selectedChartNodes[i]; if(_605==_608.getContext()){ this.m_selectedChartNodes.splice(i,1); break; } } }else{ this.updateSelectionContainer(_600); _604.highlightAreas(_603.getCtxAreas(),true); this.m_selectedChartNodes.push(_603); } }else{ if(this.hasSavedSelectedChartNodes()){ var _609=this.m_savedSelectedChartNodes.length; var _60a=this.m_savedSelectedChartNodes; for(var i=0;i<_609;i++){ var area=_60a[i].getArea(); var _60c=this.getSavedChartHelper(area); var _60d=_60c.getImageMapHighlighter(); var _60e=_60d.getAreaId(area); if(_604.getAreaId(_600)===_60e){ _60d.hideAreaById(_60e+this.m_savedPrimarySelectionColor); break; } } } this.updateSelectionContainer(_600); _604.highlightAreas(_603.getCtxAreas()); this.m_selectedChartNodes=[_603]; } }; CSelectionController.prototype.updateSelectionContainer=function(_60f){ var _610=_60f.parentNode; if(this.m_selectionContainerMap&&this.m_selectionContainerMap.name!=_610.name){ var _611=this.getChartHelper(_60f).getImageMapHighlighter(); _611.hideAllAreas(); } this.m_selectionContainerMap=_610; }; CSelectionController.prototype.getChartHelper=function(_612){ var _613=_612.parentNode; var _614=_613.name; if(!this.m_chartHelpers[_614]){ this.m_chartHelpers[_614]=new CChartHelper(_612,this.getSelectionObjectFactory(),this.m_oCognosViewer); } return this.m_chartHelpers[_614]; }; CSelectionController.prototype.getSavedChartHelper=function(_615){ var _616=_615.parentNode; var _617=_616.name; return this.m_savedChartHelpers[_617]; }; 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 _618=null; if(this.hasSelectedChartNodes()){ var _619=this.m_selectedChartNodes[0]; _618=_619.getArea(); } if(_618===null){ return null; } if(_618.tagName=="IMG"){ return _618; } return this.getSelectedChartImageFromChartArea(_618); }; CSelectionController.prototype.getSelectedChartImageFromChartArea=function(_61a){ var _61b=_61a.parentNode; var _61c="#"+_61b.getAttribute("name"); return this.checkChildrenForChart(_61b.parentNode,_61c); }; CSelectionController.prototype.checkChildrenForChart=function(_61d,_61e){ var _61f=_61d.firstChild; while(_61f!==null){ if(!_61f.tagName){ return null; }else{ if(_61f.tagName=="IMG"&&_61f.getAttribute("usemap")==_61e){ return _61f; }else{ if(_61f.tagName==="DIV"||_61f.tagName==="SPAN"){ var _620=this.checkChildrenForChart(_61f,_61e); if(_620){ return _620; } } } } _61f=_61f.nextSibling; } return null; }; CSelectionController.prototype.downloadSelectedChartImage=function(_621){ var _622=this.getSelectedChartImage(); if(_622!==null){ var _623=this.getDocumentFromImage(_622); var _624=_622.name.replace(".","_"); var _625=_624.substr(5); var _626="?m_name="; _626+=_625; _626+="&format=png&b_action=xts.run&m=portal/download.xts&m_obj="; if(isIE()){ _624=_623.parentWindow.eval("graphicSrc"+_625); }else{ _624=_623.defaultView.eval("graphicSrc"+_625); } var _627=""; if(typeof _624!="undefined"&&_624!==null){ var _628=_624.split("&"); if(_628.length===0){ return; } if(_624.indexOf("/repository/")<0){ for(var i=0;i<_628.length;++i){ var _62a=_628[i]; var _62b=_62a.indexOf("="); if(_62b!=-1){ var _62c=_62a.substr(0,_62b); var _62d=_62a.slice(_62b+1); if(_62c=="search"){ _627+=_62d; break; } } } } if(_627==""){ _626=_622.getAttribute("src"); if(_626.indexOf("?")!=-1){ _626+="&download=true"; }else{ _626+="?download=true"; } } if(typeof getConfigFrame=="function"){ _626+=_627; _626=getConfigFrame().constructGETRequestParamsString(_626); window.open(_626,"_blank","width=0,height=0"); }else{ _626=constructGETRequestParamsString(_626); _626+=_627; var _62e=this.m_oCognosViewer.getGateway(); var _62f=document.getElementById("CVIFrame"+this.m_sNamespace); if(_62f){ var _630=_62f.src; if(_630.indexOf("repository")>=0&&_626.indexOf("repository")<0){ var _631=_630.indexOf("content"); _626=_630.substring(0,_631)+_626; } } if(_626.indexOf(_62e)==-1){ var _632=document.forms["formWarpRequest"+_621]; _626=_632.action+_626; } if(typeof window.detachLeavingRV=="function"){ window.detachLeavingRV(); } location.href=_626; if(typeof window.attachLeavingRV=="function"){ setTimeout(window.attachLeavingRV,100); } } } } }; CSelectionController.prototype.getDocumentFromImage=function(_633){ var _634=null; if(_633.ownerDocument){ _634=_633.ownerDocument; }else{ _634=_633.document; } return _634; }; CSelectionController.prototype.shouldExecutePageClickedOnMouseDown=function(e){ var _636=this.getSelections(); if(_636.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 _638=this.getSelectionObjectFactory().getContainerType(node); if(_638==="list"){ for(var i=0;i<_636.length;i++){ if(_636[i].m_oCellRef==node){ return false; } } } } } return true; }; CSelectionController.prototype.getContainerType=function(){ var _63a=""; if(this.hasSelectedChartNodes()){ _63a="chart"; }else{ if(this.getDataContainerType()==="list"){ _63a="list"; }else{ _63a="crosstab"; } } return _63a; }; CSelectionController.prototype.getDisplayValues=function(){ var _63b={}; var _63c=this.getAllSelectedObjects()[0]; if(_63c){ var _63d=_63c.getSelectedContextIds(); if(_63d){ for(var axis=0;axis<_63d.length;axis++){ var _63f=[]; var _640=_63d[axis]; for(var _641=0;_641<_640.length;_641++){ var _642=_640[_641]; var _643=this.getDisplayValue(_642); _63f.push(_643); if(axis===0){ break; } } var _644=""; switch(axis){ case 0: _644="selected"; break; case 1: _644="rows"; break; default: _644="columns"; } _63b[_644]=_63f; } } } return _63b; }; CSelectionController.prototype.getChartTooltip=function(){ var _645=this.getAllSelectedObjects()[0]; if(_645){ var area=_645.getArea(); if(area){ var _647=area.getAttribute("title"); if(_647&&_647.length>0){ return area.getAttribute("title"); } } } return ""; }; CSelectionController.prototype.pageClickedForMobile=function(e){ this.pageClicked(e); var _649=this.getAllSelectedObjects().length; if(_649==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 _64b=this.m_savedChartHelpers; for(var _64c in _64b){ if(_64b[_64c]){ var _64d=_64b[_64c].getImageMapHighlighter(); if(_64d.hideAllAreas){ _64d.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 _64e=this.m_aSelectedObjects.length; var temp=[]; for(var i=0;i<_64e;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 _651=this.m_selectedChartNodes.length; var temp=[]; for(var i=0;i<_651;i++){ if(this.isMeasure(this.m_selectedChartNodes[i].m_contextIds[0][0])){ var _652=this.m_selectedChartNodes[i].getArea(); var _653=this.getImageMapName(_652); this.m_chartHelpers[_653]=this.m_savedChartHelpers[_653]; delete this.m_savedChartHelpers[_653]; 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(_654){ var _655=_654.parentNode; return _655.name; }; CSelectionController.prototype.repaintBUXSelectedChartArea=function(_656,_657,_658){ var _659={}; var _65a=_656.length; for(var i=0;i<_65a;i++){ var _65c=_656[i].getArea(); var _65d=this.getImageMapName(_65c); var _65e; if(!_659[_65d]){ _65e=(_657)?this.getSavedChartHelper(_65c):this.getChartHelper(_65c); _659[_65d]=_65e; var _65f=_65e.getImageMapHighlighter(); _65f.hideAllAreas(); _65f.setFillColour(this.getPrimarySelectionColor()); _65f.setStrokeColour(this.getPrimarySelectionColor()); }else{ _65e=_659[_65d]; } var _660=_656[i].m_contextIds; if(_658&&_660.length===1&&_660[0].length===1&&this.isMeasure(_660[0][0])){ continue; } _65f.highlightAreas(_656[i].getCtxAreas(),1); } }; CSelectionController.prototype.repaintSavedSelections=function(){ var _661=this.m_selectionStyles; this.m_selectionStyles=this.m_savedSelectionStyles; var _662=this.getSavedSelectedChartNodes(); var _663=false; if(_662&&_662.length>0){ bIsChart=true; }else{ _662=this.getSavedSelectedObjects(); } this.repaintSelectionsHelper(_662,true,_663); this.resetSelectionStyles(); this.m_selectionStyles=_661; }; CSelectionController.prototype.repaintSelections=function(){ var _664=this.getSelectedChartNodes(); var _665=false; if(_664&&_664.length>0){ _665=true; }else{ _664=this.getSelections(); } this.repaintSelectionsHelper(_664,false,_665); }; CSelectionController.prototype.repaintSelectionsHelper=function(_666,_667,_668){ try{ if(_668){ this.repaintBUXSelectedChartArea(_666,_667); }else{ this.updateUI(document,_666,true,false); this.updateUI(document,_666,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 _66b=node; if(!_66b.getAttribute("uid")){ var _66c=_66b.parentNode; if(_66c&&_66c.nodeType==1&&typeof _66c.getAttribute!="undefined"&&_66c.getAttribute("uid")!=null){ _66b=_66c; } } if(this.isCellSelected(_66b)){ 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 _66d=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 _66e=node; node=node.selectedCell; _66e.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(_66d); }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 _66f=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,_674){ var _675=this.getCtxIdFromMun(sMun); if(_675==""){ _675=this.getCtxIdFromMetaData(sLun,sHun,_674); } if(_675!=null&&this.m_oCDManager.GetUsage(_675)!="2"){ var _676=document.getElementById("rt"+this.getNamespace()); if(_676!=null){ var _677=getElementsByAttribute(_676,"*","ctx",_675); if(_677&&_677.length===0){ var _678=new RegExp("(^|:)"+_675+"(:|$)","i"); _677=getElementsByAttribute(_676,"*","ctx",_675,-1,_678); } var _679=null; if(_677!=null&&_677.length>0){ _679=new CSelectionObject(); _679.setSelectionController(this); _679.m_sColumnRef=_677[0].getAttribute("cid"); _679.m_sCellTypeId=_677[0].getAttribute("uid"); _679.m_sLayoutType=_677[0].getAttribute("type"); _679.m_sTag=_677[0].getAttribute("tag"); _679.m_layoutElementId=this.m_oSelectionObjectFactory.getLayoutElementId(_677[0]); _679.m_dataContainerType=this.m_oSelectionObjectFactory.getContainerType(_677[0]); _679.m_contextIds=[[_675]]; this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_679; }else{ var _67a=getElementsByAttribute(_676,"*","flashChart","true"); if(_67a!=null){ for(var _67b=0;_67b<_67a.length;++_67b){ var ldx=_67a[_67b].getLDX(); if(ldx.indexOf(""+_675+"")!=-1){ _679=new CSelectionObject(); _679.setSelectionController(this); var lid=_67a[_67b].getAttribute("lid"); _679.m_layoutElementId=lid.replace(this.m_oCognosViewer.getId(),""); _679.m_dataContainerType="chart"; _679.m_contextIds=[[_675]]; this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_679; } } } } } } }; CSelectionController.prototype.buildSelectionObject=function(node,e){ var _680=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 _683=node.childNodes; for(var i=0;i<_683.length;i++){ if(_683[i].nodeName.toUpperCase()=="TABLE"&&(_683[i].className=="ls"||_683[i].className=="xt")){ var trs=_683[i].rows; for(var j=0;j0){ _693=true; } if(this.hasCutColumns()==true){ this.clearSelectedObjects(_690); }else{ this.resetSelections(_690); 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(_690); } if(typeof g_reportSelectionController!="undefined"&&_694==false){ if(g_reportSelectionController.getSelections().length>0){ _693=true; } g_reportSelectionController.clearSelections(); } } var _695=node.getAttribute("dtTargets")?node:null; var _696=(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 _697; var _698=3; do{ node=node.parentNode; if(node){ _695=(!_695&&typeof node.getAttribute!="undefined"&&node.getAttribute("dtTargets"))?node:_695; uid=(typeof node.getAttribute!="undefined")?node.getAttribute("uid"):null; _697=node.nodeName.toLowerCase(); } }while((uid==null)&&node&&(--_698>0)&&(_697=="span"||_697=="div")); } if(uid!=null){ var _699=node.childNodes; for(var i=0;i<_699.length;i++){ if(_699[i].nodeName.toUpperCase()=="TABLE"&&(_699[i].className=="ls"||_699[i].className=="xt")){ var trs=_699[i].rows; for(var j=0;j0){ var _6a1=_6a0[_6a0.length-1]; if(_6a1.getLayoutType()==_69f.getLayoutType()&&(_6a1.getCellRef().parentNode.parentNode==_69f.getCellRef().parentNode.parentNode)){ if(this.cellsAreInSameColumn(_6a1.getCellRef(),_69f.getCellRef())){ this.selectVertical(_6a1,_69f,_690); }else{ if(_6a1.getCellRef().parentNode.rowIndex==_69f.getCellRef().parentNode.rowIndex){ this.selectHorizontal(_6a1,_69f,_690); } } } } clearTextSelection(_690); }else{ if(this.ctrlKeyPressed(e)){ clearTextSelection(_690); } } this.addSelectionObject(_69f,_690); if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){ cf.addSelectionToCfgVariables(_69f.getColumnName()); } this.m_oCognosViewer.setCurrentNodeFocus(node); }else{ if(this.ctrlKeyPressed(e)){ this.removeSelectionObject(_69f,_690); if(typeof cf!="undefined"&&typeof cf.removeSelectionFromCfgVariables=="function"){ if(!this.isColumnSelected(_69f.getTag())){ cf.removeSelectionFromCfgVariables(_69f.getTag()); } } clearTextSelection(_690); }else{ if(this.shiftKeyPressed(e)){ clearTextSelection(_690); } } } _693=true; }else{ if(_694){ var _6a2=null; while((typeof node.id=="undefined"||node.id==null||node.id=="")&&node.parentNode!=null){ node=node.parentNode; } if(node.id=="reportTitle"){ _6a2="TitleStyle"; }else{ if(node.id=="reportSubtitle"){ _6a2="SubtitleStyle"; }else{ if(node.id.indexOf("reportFilter")==0){ _6a2="FilterStyle"; } } } if(_6a2!=null){ selectReportElement(e,node.id,_6a2); _693=true; } }else{ if(_695!=null&&this.m_oCognosViewer&&this.m_oCognosViewer.isMobile()&&!_696){ var _69f=this.getSelectionObjectFactory().getSelectionObject(_695); this.addSelectionObject(_69f,_690); } } } if(_693==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(_6a5){ this.m_aReportContextDataArray=_6a5; }; CSelectionController.prototype.setupMetaDataArray=function(_6a6){ this.m_aReportMetadataArray=_6a6; }; CSelectionController.prototype.addContextData=function(_6a7){ this.m_aSelectedObjects=[]; this.m_oCDManager.SetContextData(_6a7); if(!this.m_bUsingCCDManager){ this.m_bUsingCCDManager=true; } for(var i=0;i2){ _6b6=parseInt(_6b7[2],10); } }else{ _6b6=parseInt(this.m_oCDManager.GetDataType(_6b5),10); } return _6b6; }; CSelectionController.prototype.getUsageInfo=function(_6b8){ if(this.m_bUsingCCDManager){ return this.m_oCDManager.GetUsage(_6b8); } }; CSelectionController.prototype.isMeasure=function(_6b9){ return (this.getUsageInfo(_6b9)==this.c_usageMeasure); }; CSelectionController.prototype.getDepth=function(_6ba){ var _6bb=null; if(!this.m_bUsingCCDManager){ var _6bc=this.getRDI(_6ba); if(_6bc&&_6bc.length>5&&_6bc[1]=="R"){ _6bb=_6bc[5]; } }else{ _6bb=this.m_oCDManager.GetDepth(_6ba); } return _6bb; }; CSelectionController.prototype.getUseValue=function(_6bd){ var _6be=""; if(!this.m_bUsingCCDManager){ var _6bf=this.m_aReportContextDataArray[_6bd]; if(typeof _6bf[1]!="undefined"){ _6be=_6bf[1]; } }else{ _6be=this.m_oCDManager.GetDisplayValue(_6bd); } return _6be; }; CSelectionController.prototype.getTextValue=function(_6c0){ var _6c1=null; for(var _6c2=0;_6c2<_6c0.length;_6c2++){ if(_6c0[_6c2].style.visisbility!="hidden"){ if(isIE()){ _6c1=_6c0[_6c2].innerText; }else{ _6c1=_6c0[_6c2].textContent; } var _6c3=_6c0[_6c2].nextSibling; while(_6c3!=null){ if(_6c3.nodeName.toUpperCase()=="SPAN"&&_6c3.style.visibility!="hidden"){ if(isIE()){ _6c1+=_6c3.innerText; }else{ _6c1+=_6c3.textContent; } } _6c3=_6c3.nextSibling; } break; } } return _6c1; }; CSelectionController.prototype.getDisplayValueFromDOM=function(_6c4,_6c5){ var _6c6=null; var _6c7; var _6c8=new RegExp("(^|\\s)"+_6c4+"(\\s|$|:)","i"); if(typeof _6c5!="undefined"){ _6c7=getElementsByAttribute(_6c5,["span","td","th"],"ctx",_6c4,1,_6c8); }else{ var _6c9=document.getElementById("CVIFrame"+this.m_sNamespace); if(typeof _6c9=="undefined"||_6c9==null){ var _6ca=document.getElementById("RVContent"+this.m_sNamespace); if(typeof _6ca=="undefined"||_6ca==null){ _6c7=getElementsByAttribute(document.body,["span","td","th"],"ctx",_6c4,1,_6c8); }else{ _6c7=getElementsByAttribute(_6ca,["span","td","th"],"ctx",_6c4,1,_6c8); } }else{ _6c7=getElementsByAttribute(_6c9.contentWindow.document.body,["span","td","th"],"ctx",_6c4,1,_6c8); } } var _6cb; if(_6c7.length>0&&(_6c7[0].nodeName.toUpperCase()=="TD"||_6c7[0].nodeName.toUpperCase()=="TH")){ _6cb=_6c7[0].childNodes; }else{ _6cb=_6c7; } if(_6cb.length==0||(_6cb[0].className.indexOf("chart_area")==-1&&_6cb[0].className.indexOf("bux-comment")==-1)){ _6c6=this.getTextValue(_6cb); } return _6c6; }; CSelectionController.prototype.getDisplayValue=function(_6cc,_6cd){ var _6ce=this.getDisplayValueFromDOM(_6cc,_6cd); if(_6ce==null){ _6ce=this.getUseValue(_6cc); } return _6ce; }; CSelectionController.prototype.getDun=function(_6cf){ if(this.m_bUsingCCDManager){ return this.m_oCDManager.GetDUN(_6cf); }else{ var _6d0=this.m_aReportContextDataArray[_6cf]; if(_6d0&&typeof _6d0[5]!="undefined"){ var _6d1=_6d0[5]; var _6d2=this.m_aReportMetadataArray[_6d1]; if(typeof _6d2!="undefined"&&typeof _6d2[1]!="undefined"&&_6d2[1]=="D"){ return _6d2[0]; } } } }; CSelectionController.prototype.getPun=function(_6d3){ if(this.m_bUsingCCDManager){ return this.m_oCDManager.GetPUN(_6d3); } }; CSelectionController.prototype.getLun=function(_6d4){ var lun=""; if(!this.m_bUsingCCDManager){ var _6d6=this.m_aReportContextDataArray[_6d4]; if(_6d6&&typeof _6d6[3]!="undefined"){ var _6d7=_6d6[3]; var _6d8=this.m_aReportMetadataArray[_6d7]; if(typeof _6d8!="undefined"&&typeof _6d8[1]!="undefined"&&_6d8[1]=="L"){ lun=_6d8[0]; } } }else{ lun=this.m_oCDManager.GetLUN(_6d4); } return lun; }; CSelectionController.prototype.isContextId=function(_6d9){ var _6da=false; if(!this.m_bUsingCCDManager){ var _6db=this.m_aReportContextDataArray[_6d9]; _6da=(typeof _6db=="object"); }else{ this.m_oCDManager.FetchContextData([_6d9]); _6da=this.m_oCDManager.ContextIdExists(_6d9); } return _6da; }; CSelectionController.prototype.hasContextData=function(){ var _6dc=false; if(!this.m_bUsingCCDManager){ if(this.m_aReportContextDataArray&&this.m_aReportContextDataArray.length&&this.m_aReportContextDataArray.length()>0){ return true; } }else{ _6dc=this.m_oCDManager.HasContextData(); } return _6dc; }; CSelectionController.prototype.hasMetadata=function(){ var _6dd=false; if(!this.m_bUsingCCDManager){ if(this.m_aReportMetadataArray&&this.m_aReportMetadataArray.length&&this.m_aReportMetadataArray.length()>0){ return true; } }else{ _6dd=this.m_oCDManager.HasMetadata(); } return _6dd; }; CSelectionController.prototype.getDifferentCellIndex=function(_6de,_6df,_6e0){ for(var i=0;i<_6de.cells.length;i++){ if(this.getSelectionObjectFactory().getSelectionObject(_6de.cells[i]).getLayoutType()=="datavalue"){ break; } } if(_6e0=="relative"){ return (_6df-i); }else{ if(_6e0=="actual"){ return (_6df+i); } } }; CSelectionController.prototype.cellsAreInSameColumn=function(_6e2,_6e3){ if(_6e2.parentNode.rowIndex==_6e3.parentNode.rowIndex){ return false; } if(_6e2.getAttribute("cid")===null){ if(_6e2.getAttribute("uid")===_6e3.getAttribute("uid")){ if(_6e2.getAttribute("type")!="datavalue"){ return true; }else{ if(this.getDifferentCellIndex(_6e2.parentNode,_6e2.cellIndex,"relative")==this.getDifferentCellIndex(_6e3.parentNode,_6e3.cellIndex,"relative")){ return true; } } }else{ return false; } }else{ if(_6e2.getAttribute("cid")===_6e3.getAttribute("cid")){ return true; }else{ return false; } } }; CSelectionController.prototype.selectVertical=function(_6e4,_6e5,_6e6){ if(!_6e6){ _6e6=document; } var _6e7=_6e4.getCellRef().parentNode; var _6e8,i; var _6ea=(_6e4.getCellRef().parentNode.rowIndex<_6e5.getCellRef().parentNode.rowIndex); var _6eb=(_6e4.getCellRef().parentNode.cells.length-_6e4.getCellRef().cellIndex); while(_6e7.rowIndex!=_6e5.getCellRef().parentNode.rowIndex){ if(_6ea){ _6e7=_6e7.nextSibling; }else{ _6e7=_6e7.previousSibling; } if(_6e7==null){ break; } if(_6e7.cells.length>=_6eb){ for(i=0;i<_6e7.cells.length;i++){ if((_6e7.cells[i].getAttribute("type")==_6e4.getLayoutType())&&this.cellsAreInSameColumn(_6e4.getCellRef(),_6e7.cells[i])){ _6e8=this.getSelectionObjectFactory().getSelectionObject(_6e7.cells[i]); if(this.addSelectionObject(_6e8,_6e6)){ if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){ cf.addSelectionToCfgVariables(_6e8.getColumnName()); } } break; } } } } }; CSelectionController.prototype.selectHorizontal=function(_6ec,_6ed,_6ee){ var _6ef=""; if(_6ec.getColumnRef()==null){ if(_6ec.getCellRef().getAttribute("uid")==_6ed.getCellRef().getAttribute("uid")){ _6ef=_6ec.getCellRef().getAttribute("uid"); }else{ return; } } var _6f0,_6f1; var _6f2=_6ed.getCellRef().parentNode; var _6f3; if(_6ed.getCellRef().cellIndex<_6ec.getCellRef().cellIndex){ _6f0=_6ed.getCellRef().cellIndex; _6f1=_6ec.getCellRef().cellIndex; }else{ _6f1=_6ed.getCellRef().cellIndex; _6f0=_6ec.getCellRef().cellIndex; } for(var i=_6f0+1;i<_6f1;i++){ if(((_6ec.getColumnRef()!=null)&&(_6ec.getLayoutType()==_6ed.getLayoutType())&&(_6ec.getLayoutType()!="datavalue")||this.allowHorizontalDataValueSelection())||((_6ec.getColumnRef()==null)&&(_6f2.cells[i].getAttribute("uid")==_6ef))){ _6f3=this.getSelectionObjectFactory().getSelectionObject(_6f2.cells[i]); if(this.addSelectionObject(_6f3,_6ee)){ if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){ cf.addSelectionToCfgVariables(_6f3.getColumnName()); } } } } }; CSelectionController.prototype.pageDoubleClicked=function(e){ try{ var node=getNodeFromEvent(e); if(typeof node.selectedCell!="undefined"){ var _6f7=node; node=node.selectedCell; _6f7.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(_6fa){ this.m_aSelectionHoverNodes=_6fa; }; 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 _6fe=this.getSelectionHoverNodes(); var _6ff=this.getAllSelectedObjects().length; if(!(_6fe.length==1&&_6fe[0]==node)){ for(var i=0;i<_6fe.length;i++){ this.sortIconHover(_6fe[i],true); if(_6ff==0){ this.pageChangeHover(_6fe[i],true); } } this.setSelectionHoverNodes([]); if(_6ff==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,_702){ if(!this.isValidColumnTitle(node)){ return false; } var _703=this.getSortImgNode(node); if(_703!=null&&_703!="undefined"){ if(_703.getAttribute("sortOrder")==="nosort"){ if(_702){ _703.style.visibility="hidden"; }else{ _703.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,_707){ 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 _708=this.isColumnSelected(node.getAttribute("tag")); if(!_708){ _708=this.isColumnCut(node.getAttribute("tag")); } if(!_708){ if(_707){ 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 _70a=node.getElementsByTagName("img"); for(var i=0;i<_70a.length;i++){ var sId=_70a[i].id.toString(); if(sId!=null&&sId.length>0&&sId.indexOf("sortimg")>=0){ node=_70a[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,_717){ if(node&&node.style&&node.style[_717]){ return node.style[_717]; } 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 _71b=node; node=node.selectedCell; _71b.removeAttribute("selectedCell"); } while(node!=null&&node.tagName!="TD"){ node=node.parentNode; } if(node!=null){ var _71c=this.getBackgroundImage(node); this.findSelectionURLs(); if(this.getSelections().length==0||_71c!=this.pS_backgroundImageURL){ this.pageClicked(e); } } if(typeof populateContextMenu!="undefined"){ populateContextMenu(); moveContextMenu(e); } var _71d=false; if(this.showViewerContextMenu()){ if(typeof e.preventDefault=="function"){ e.preventDefault(); } _71d=true; } return _71d; }; 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,_720,sId){ if(typeof populateContextMenu!="undefined"){ goWindowManager.getApplicationFrame().cfgSet("contextMenuType",_720); goWindowManager.getApplicationFrame().cfgSet("contextMenuId",sId); populateContextMenu(_720.toUpperCase()); moveContextMenu(e,_720.toUpperCase()); } if(typeof e.preventDefault=="function"){ e.preventDefault(); } return false; }; CSelectionController.prototype.selectionsAreAllSameType=function(){ var _722=this.getSelections(); if(_722.length>0){ var _723=_722[0].getLayoutType(); for(var i=1;i<_722.length;i++){ if(_723!=_722[i].getLayoutType()){ return 0; } } return 1; } return -1; }; CSelectionController.prototype.selectionsAreAllOnSameColumn=function(){ var _725=this.getSelections(); var i=0; if(_725.length>0){ var _727=_725[0].getColumnRef(); if(_727!=null&&_727!=""){ for(i=1;i<_725.length;i++){ if(_727!=_725[i].getColumnRef()){ return false; } } }else{ var _728=_725[0].getCellTypeId(); for(i=1;i<_725.length;i++){ if(_728!=_725[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 _72a=node.parentNode; while(typeof _72a!="undefined"&&_72a!=null){ if(typeof _72a.className!="undefined"&&_72a.className!=null&&_72a.className.substr(0,2)=="ft"){ node=_72a; break; }else{ _72a=_72a.parentNode; } } }else{ return false; } } var _72b=node.className.substr(0,2); if(_72b=="ta"||_72b=="ts"||_72b=="ft"){ return true; } } return false; }; CSelectionController.prototype.chartClicked=function(_72c){ this.setSelectedChartArea(_72c); }; CSelectionController.prototype.processColumnTitleNode=function(_72d){ if(!_72d||!this.m_oCognosViewer.isBux){ return; } var _72e=_72d.getCellRef(); if(_72e.getAttribute("contextAugmented")=="true"||"list"!=_72d.getDataContainerType()||"columnTitle"!=_72d.getLayoutType()){ return; } var _72f=_72d.getSelectedContextIds(); var _730=false; if(typeof _72f=="object"&&_72f!=null&&_72f.length>0){ if(this.isRelational(_72f)&&this.getQueryModelId(_72f[0][0])==null){ _730=true; }else{ return; } } var lid=_72e.parentNode.parentNode.parentNode.getAttribute("lid"); var _732=_72e.parentNode.nextSibling; var _733=getChildElementsByAttribute(_732,"td","cid",_72e.getAttribute("cid")); var _734=null; var _735=true; var _736; if(_733.length>0){ var _737=_733[0]; var _738=_737.childNodes.length; for(var _739=0;_739<_738;_739++){ var _73a=_737.childNodes[_739]; if(_73a.getAttribute&&((_73a.nodeName.toLowerCase()=="table"&&typeof _73a.getAttribute("lid")=="string")||_73a.nodeName.toLowerCase()=="map"||_73a.nodeName.toLowerCase()=="img"||_73a.getAttribute("chartcontainer")=="true")){ if(_739==0){ _735=false; } }else{ _736=[]; if(_73a.nodeName.toLowerCase()=="span"){ _736.push(_73a); } var _73b=_73a.getElementsByTagName?_73a.getElementsByTagName("span"):[]; for(var _73c=0;_73c<_73b.length;++_73c){ if(lid==getImmediateLayoutContainerId(_73b[_73c])){ _736.push(_73b[_73c]); } } for(var _73d=0;_73d<_736.length;++_73d){ var _73e=_736[_73d]; if(_73e.nodeType==1&&_73e.nodeName.toLowerCase()=="span"&&_73e.style.visibility!="hidden"){ if(_73e.getAttribute("ctx")!=null&&_73e.getAttribute("ctx")!=""){ _734=_73e.getAttribute("ctx"); break; } } } } } } if(_734!=null){ var _73f=_734.split("::")[0].split(":")[0]; if(!_730){ _736=_72e.getElementsByTagName("span"); if(_736.length!=0){ var _740=this.m_oCDManager.m_cd[_73f]; var _741=this.getTextValue(_736); var _742={"u":_741===null?"":_741}; if(typeof _740!="undefined"){ if(typeof _740["r"]!="undefined"){ _742.r=_740["r"]; } if(typeof _740["q"]!="undefined"){ _742.q=_740["q"]; } if(typeof _740["i"]!="undefined"){ _742.i=_740["i"]; } } var _743="cloned"+_73f; this.m_oCDManager.m_cd[_743]=_742; _736[0].setAttribute("ctx",_743); _72d=this.getSelectionObjectFactory().processCTX(_72d,_743); } }else{ var qmid=this.getQueryModelId(_73f); if(qmid==null){ } if(qmid!=null){ var _745=_72f[0][0]; this.m_oCDManager.m_cd[_745].i=this.m_oCDManager.m_cd[_73f].i; return false; } } }else{ _735=false; } if(!_735){ _72e.setAttribute("canSort","false"); } _72e.setAttribute("contextAugmented","true"); }; CSelectionController.prototype.selectionsInSameDataContainer=function(){ try{ var _746=this.getAllSelectedObjects(); var _747=_746[0].getLayoutElementId(); for(var _748=1;_748<_746.length;_748++){ if(_747!=_746[_748].getLayoutElementId()){ return false; } } } catch(e){ return false; } return true; }; CSelectionController.prototype.selectionsFromSameDataItem=function(){ try{ var _749=this.getAllSelectedObjects(); var _74a=_749[0].getDataItems()[0][0]; for(var _74b=1;_74b<_749.length;_74b++){ if(_74a!=_749[_74b].getDataItems()[0][0]){ return false; } } } catch(e){ return false; } return true; }; CSelectionController.prototype.isRelational=function(_74c){ try{ if(!_74c){ var _74d=this.getAllSelectedObjects()[0]; _74c=_74d.getSelectedContextIds(); } for(var _74e=0;_74e<_74c.length;_74e++){ for(var _74f=0;_74f<_74c[_74e].length;_74f++){ var ctx=_74c[_74e][_74f]; 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 _754=this.getAllSelectedObjects(); for(var _755=0;_755<_754.length;_755++){ var _756=_754[_755]; if(_756.getLayoutType()!="columnTitle"||_756.isHomeCell()){ return false; } } } catch(e){ return false; } return true; }; CSelectionController.prototype.selectionsAreMeasures=function(){ try{ var _757=this.getAllSelectedObjects(); for(var _758=0;_758<_757.length;_758++){ var _759=_757[_758]; if(this.getUsageInfo(_759.getSelectedContextIds()[0][0])!=this.c_usageMeasure){ return false; } } } catch(e){ return false; } return true; }; CSelectionController.prototype.selectionsNonMeasureWithMUN=function(){ var _75a=this.getAllSelectedObjects(); if(_75a.length==0){ return false; } for(var _75b=0;_75b<_75a.length;_75b++){ var _75c=_75a[0]; if(_75c.getSelectedContextIds().length==0){ return false; } var _75d=_75c.getSelectedContextIds()[0][0]; var mun=this.getMun(_75d); var _75f=this.getUsageInfo(_75d); if(mun==null||typeof mun=="undefined"||mun.length==0||_75f==this.c_usageMeasure){ return false; } } return true; }; CSelectionController.prototype.areSelectionsMeasureOrCalculation=function(){ var _760=this.getAllSelectedObjects(); if(_760.length==0){ return false; } var _761=this.selectionsHaveCalculationMetadata(); for(var _762=0;_762<_760.length;_762++){ var _763=_760[_762]; var _764=_763.getSelectedContextIds()[0][0]; if(!this.isCalculationOrMeasure(_764,_761)){ return false; } } return true; }; CSelectionController.prototype.selectionsHaveCalculationMetadata=function(){ try{ var _765=this.getDataContainerType(); var _766=this.getAllSelectedObjects(); for(var _767=0;_767<_766.length;_767++){ var _768=_766[_767]; var _769=_768.getSelectedContextIds(); var _76a=_769[0][0]; var sHun=this.getHun(_76a); if(!this.hasCalculationMetadata(_76a,_769,_765)){ return false; } } } catch(e){ return false; } return true; }; CSelectionController.prototype.isCalculationOrMeasure=function(_76c,_76d){ var mun=this.getMun(_76c); var _76f=this.getUsageInfo(_76c); if(!(((mun==null||typeof mun=="undefined"||mun.length==0)&&_76d)||_76f==this.c_usageMeasure)){ return false; } return true; }; CSelectionController.prototype.hasCalculationMetadata=function(_770,_771,_772){ var sHun=this.getHun(_770); if(this.getUsageInfo(_770)!=this.c_usageMeasure){ if((this.isRelational(_771)&&this.getQueryModelId(_770)!=null)||(!this.isRelational(_771)&&_772=="list"&&(sHun&&sHun!=""))){ return false; } } return true; }; CSelectionController.prototype.selectionsAreDateTime=function(){ try{ var _774=this.getAllSelectedObjects(); for(var _775=0;_775<_774.length;_775++){ var _776=_774[_775]; var _777=_776.getSelectedContextIds(); var _778=_777[0][0]; var _779=this.getDataType(_778); if(_779&&typeof this.m_ccl_dateTypes[_779]!=="undefined"){ return true; } } } catch(e){ return false; } return false; }; CSelectionController.prototype.getSelectedObjectsJsonContext=function(){ try{ var _77a=this.getAllSelectedObjects(); if(_77a===null||_77a.length<=0){ return null; } var _77b=this.m_oCognosViewer.getModelPath(); var _77c=[]; for(var i=0;i<_77a.length;i++){ var obj=_77a[i].getContextJsonObject(this,_77b); _77c.push(obj); } return _77c; } 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(_77f){ if(!_77f){ _77f=document; } try{ if(typeof _77f.selection=="object"&&_77f.selection!==null){ _77f.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 _781; try{ _781=getCognosViewerSCObjectRef(this.getCV().getId()); } catch(e){ _781=null; } return _781; }; CDrillManager.prototype.getSelectedObject=function(){ var _782=this.getSelectionController(); if(_782==null){ return null; } var _783=null; var _784=null; if(_782.hasSelectedChartNodes()){ _784=_782.getSelectedChartNodes(); }else{ _784=_782.getSelections(); } if(_784&&_784.length==1){ _783=_784[0]; } return _783; }; 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(_785){ if(typeof _785=="undefined"){ _785=this.getSelectedObject(); } if(_785==null){ return false; } var _786=_785.getMuns(); var muns=""; for(var _788=0;_788<_786.length&&muns=="";++_788){ if(typeof _786[_788][0]!="undefined"){ muns+=_786[_788][0]; } } return (muns!=""); }; CDrillManager.prototype.getRefQuery=function(){ var _789=""; var _78a=this.getSelectedObject(); if(_78a==null){ return ""; } var _78b=_78a.getRefQueries(); for(var i=0;i<_78b.length;i++){ if(_78b[i]!=null){ for(var j=0;j<_78b[i].length;j++){ if(_78b[i][j]!=null&&_78b[i][j]!=""){ return _78b[i][j]; } } } } return _789; }; CDrillManager.prototype.isIsolated=function(){ var _78e=this.getSelectionController(); if(_78e==null||_78e.getDrillUpDownEnabled()==false){ return false; } var _78f=this.getSelectedObject(); if(_78f==null){ return false; } if(_78f instanceof CSelectionChartObject&&_78e!=null){ var _790=_78f.getArea(); if(_790!=null){ var _791=_790.getAttribute("isolated"); if(typeof _791!="undefined"&&_791!=null&&_791=="true"){ return true; } } }else{ var _792=_78f.getCellRef(); if(typeof _792=="object"&&_792!=null){ var _793=_792.getElementsByTagName("span"); if(_793!=null&&typeof _793!="undefined"&&_793.length>0){ var _794=_793[0].getAttribute("isolated"); if(_794!=null&&_794!="undefined"&&_794=="true"){ return true; } } } } return false; }; CDrillManager.prototype.getDrillOption=function(_795){ var _796=this.getSelectionController(); if(_796==null||_796.getDrillUpDownEnabled()==false||typeof _795=="undefined"){ return false; } var _797=this.getSelectedObject(); if(_797==null){ return false; } if(this.isIsolated()){ if(_795=="drillDown"){ return false; }else{ if(_795=="drillUp"){ return true; } } } if(_795=="drillDown"){ if(_797 instanceof CSelectionChartObject&&_796!=null){ var _798=_797.getArea(); if(_798!=null){ var _799=_798.getAttribute("isChartTitle"); if(typeof _799!="undefined"&&_799!=null&&_799=="true"){ return false; } } } } var _79a=_797.getDrillOptions(); var _79b=(typeof DrillContextMenuHelper!=="undefined"&&DrillContextMenuHelper.needsDrillSubMenu(this.m_oCV)); for(var idx=0;idx<_79a.length;++idx){ var _79d=(_79b)?_79a[idx].length:1; for(var _79e=0;_79e<_79d;++_79e){ var _79f=_79a[idx][_79e]; if(_79f=="3"){ return true; }else{ if(_795=="drillUp"&&_79f=="1"){ return true; }else{ if(_795=="drillDown"&&_79f=="2"){ return true; } } } } } return false; }; CDrillManager.prototype.canDrillThrough=function(){ var _7a0=this.getSelectionController(); if(_7a0==null||_7a0.getModelDrillThroughEnabled()==false){ return false; } return true; }; CDrillManager.prototype.singleClickDrillEvent=function(evt,app){ var _7a3=this.getSelectionController(); if(_7a3!=null){ if(this.getCV().bCanUseCognosViewerSelection==true){ _7a3.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(_7a9,_7aa,_7ab,_7ac){ var _7ad=[]; var _7ae=this.getSelectedObject(); if(_7ae==null){ return _7ad; } if(typeof _7aa=="undefined"){ _7aa=true; } var _7af=_7ae.getDataItems(); var _7b0=_7ae.getMuns(); var _7b1=_7ae.getDimensionalItems("lun"); var _7b2=_7ae.getDimensionalItems("hun"); var _7b3=_7ae.getDrillOptions(); if(typeof _7af=="undefined"||typeof _7b0=="undefined"||typeof _7b3=="undefined"||_7b0==null||_7af==null||_7b3==null){ return _7ad; } if(_7b0.length!=_7af.length){ return _7ad; } var _7b4=_7b0.length; for(var _7b5=0;_7b5<_7b4;++_7b5){ if(_7af[_7b5].length!=0){ var _7b6=(_7ac)?this.findUserSelectedDrillItem(_7ac,_7af[_7b5]):0; if(_7b6<0){ continue; } if((_7ab===true)||this.getDrillOption(_7a9)){ if(_7b0[_7b5][_7b6]==""||_7ad.toString().indexOf(_7b0[_7b5][_7b6],0)==-1){ _7ad[_7ad.length]=_7af[_7b5][_7b6]; _7ad[_7ad.length]=_7b0[_7b5][_7b6]; if(_7aa===true){ _7ad[_7ad.length]=_7b1[_7b5][_7b6]; _7ad[_7ad.length]=_7b2[_7b5][_7b6]; } } } } } return _7ad; }; CDrillManager.prototype.findUserSelectedDrillItem=function(_7b7,_7b8){ for(var _7b9=0;_7b9<_7b8.length;++_7b9){ if(_7b7==_7b8[_7b9]){ return _7b9; } } return -1; }; CDrillManager.prototype.getModelDrillThroughContext=function(_7ba){ var _7bb=""; if(this.canDrillThrough()===true){ if(typeof gUseNewSelectionContext=="undefined"){ var _7bc=""; if(typeof getConfigFrame!="undefined"){ _7bc=decodeURIComponent(getConfigFrame().cfgGet("PackageBase")); }else{ if(this.getCV().getModelPath()!==""){ _7bc=this.getCV().getModelPath(); } } _7bb=getViewerSelectionContext(this.getSelectionController(),new CSelectionContext(_7bc)); }else{ var _7bd=new CParameterValues(); var _7be=this.getSelectionController(); if(_7be){ var _7bf=_7be.getAllSelectedObjects(); for(var _7c0=0;_7c0<_7bf.length;++_7c0){ var _7c1=_7bf[_7c0]; var _7c2=_7c1.getMuns(); var _7c3=_7c1.getMetadataItems(); var _7c4=_7c1.getUseValues(); for(var _7c5=0;_7c5<_7c3.length;++_7c5){ for(var idx=0;idx<_7c3[_7c5].length;++idx){ if(_7c3[_7c5][idx]==null||_7c3[_7c5][idx]==""){ continue; } var name=_7c3[_7c5][idx]; var _7c8; if(_7c2[_7c5][idx]!=null&&_7c2[_7c5][idx]!=""){ _7c8=_7c2[_7c5][idx]; }else{ _7c8=_7c4[_7c5][idx]; } var _7c9=_7c4[_7c5][idx]; _7bd.addSimpleParmValueItem(name,_7c8,_7c9,"true"); } } } } var _7ca=_7ba.XMLBuilderCreateXMLDocument("context"); _7bb=_7bd.generateXML(_7ba,_7ca); } } return _7bb; }; CDrillManager.prototype.rvDrillUp=function(_7cb){ this.getCV().executeAction("DrillUp",_7cb); }; CDrillManager.prototype.rvDrillDown=function(_7cc){ this.getCV().executeAction("DrillDown",_7cc); }; CDrillManager.prototype.rvBuildXMLDrillParameters=function(_7cd,_7ce){ var _7cf=this.getDrillParameters(_7cd,true,false,_7ce); if(_7cf.length==0){ return drillParams; } return this.buildDrillParametersSpecification(_7cf); }; CDrillManager.prototype.buildDrillParametersSpecification=function(_7d0){ var _7d1=""; var idx=0; while(idx<_7d0.length){ _7d1+=""; _7d1+=""; _7d1+=sXmlEncode(_7d0[idx++]); _7d1+=""; _7d1+=""; _7d1+=sXmlEncode(_7d0[idx++]); _7d1+=""; _7d1+=""; _7d1+=sXmlEncode(_7d0[idx++]); _7d1+=""; _7d1+=""; _7d1+=sXmlEncode(_7d0[idx++]); _7d1+=""; _7d1+=""; } _7d1+=""; return _7d1; }; CDrillManager.prototype.getAuthoredDrillsForCurrentSelection=function(){ var _7d3=null; var _7d4=this.getAuthoredDrillThroughTargets(); if(_7d4.length>0){ var _7d5=""; for(var _7d6=0;_7d6<_7d4.length;++_7d6){ _7d5+=eval("\""+_7d4[_7d6]+"\""); } _7d5+=""; var cv=this.getCV(); var _7d8=cv.getAction("AuthoredDrill"); var _7d9=cv.getDrillTargets(); if(_7d9.length>0){ _7d3=_7d8.getAuthoredDrillThroughContext(_7d5,_7d9); } } return _7d3; }; CDrillManager.prototype.getAuthoredDrillsForGotoPage=function(){ var _7da=""; var _7db=this.getAuthoredDrillsForCurrentSelection(); if(_7db){ _7da=XMLBuilderSerializeNode(_7db); } return _7da; }; CDrillManager.prototype.launchGoToPage=function(_7dc,_7dd){ var _7de=this.getSelectionController(); if((_7de!=null&&_7de.getModelDrillThroughEnabled()==true)||(typeof _7dc!="undefined"&&_7dc!=null&&_7dc!="")){ var _7df=this.getAuthoredDrillsForGotoPage(); var _7e0=this.getModelDrillThroughContext(self); var form=document.getElementById("drillForm"); if(form!=null){ document.body.removeChild(form); } form=document.createElement("form"); var cvid=this.getCVId(); var _7e3=document.forms["formWarpRequest"+cvid]; form.setAttribute("id","drillForm"); form.setAttribute("name","drillForm"); form.setAttribute("target",_7e3.getAttribute("target")); form.setAttribute("method","post"); form.setAttribute("action",_7e3.getAttribute("action")); form.style.display="none"; document.body.appendChild(form); if(this.getCV().getModelPath()!==""){ form.appendChild(createHiddenFormField("modelPath",this.getCV().getModelPath())); } if(typeof _7e3["ui.object"]!="undefined"&&_7e3["ui.object"].value!=""){ form.appendChild(createFormField("drillSource",_7e3["ui.object"].value)); }else{ if(typeof this.getCV().envParams["ui.spec"]!="undefined"){ form.appendChild(createFormField("sourceSpecification",this.getCV().envParams["ui.spec"])); } } if(_7df!=""){ form.appendChild(createHiddenFormField("m","portal/drillthrough.xts")); form.appendChild(createFormField("invokeGotoPage","true")); form.appendChild(createFormField("m","portal/drillthrough.xts")); form.appendChild(createFormField("modelDrillEnabled",_7de.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",_7df)); if(typeof gUseNewSelectionContext=="undefined"){ form.appendChild(createHiddenFormField("drillContext",_7e0)); }else{ form.appendChild(createHiddenFormField("modeledDrillthru",_7e0)); } form.appendChild(createHiddenFormField("errURL","javascript:window.close();")); if(typeof _7dd!="undefined"&&_7dd==true){ form.appendChild(this.createFormField("directLaunch","true")); } var _7e4=""; if(this.getCV().envParams["ui.routingServerGroup"]){ _7e4=this.getCV().envParams["ui.routingServerGroup"]; } form.appendChild(createHiddenFormField("ui.routingServerGroup",_7e4)); if(this.getCV().getExecutionParameters()!=""){ form.appendChild(createHiddenFormField("encExecutionParameters",this.getCV().getExecutionParameters())); } if(_7e3.lang&&_7e3.lang.value!=""){ form.appendChild(createHiddenFormField("lang",_7e3.lang.value)); } if(!this.getCV()||!this.getCV().launchGotoPageForIWidgetMobile(drillForm)){ if(typeof this.getCV().launchGotoPage==="function"){ this.getCV().launchGotoPage(form); }else{ var _7e5="winNAT_"+(new Date()).getTime(); var _7e6=this.getCV().getWebContentRoot()+"/rv/blankDrillWin.html?cv.id="+cvid; window.open(_7e6,_7e5,"toolbar,location,status,menubar,resizable,scrollbars=1"); form.target=_7e5; } } } }; CDrillManager.prototype.buildSearchPageXML=function(_7e7,pkg,_7e9,_7ea,_7eb,_7ec,_7ed){ var _7ee=null; if(typeof _7e7.XMLElement=="function"){ _7ee=_7e7.XMLBuilderCreateXMLDocument("cognosSearch"); _7e7.XMLBuilderSetAttributeNodeNS(_7ee.documentElement,"xmlns:cs","http://developer.cognos.com/schemas/cs/1/"); var _7ef=_7ee.createElement("package"); if(typeof pkg=="string"&&pkg!==""){ _7ef.appendChild(_7ee.createTextNode(pkg)); } _7ee.documentElement.appendChild(_7ef); var _7f0=_7ee.createElement("model"); if(typeof _7e9=="string"&&_7e9!==""){ _7f0.appendChild(_7ee.createTextNode(_7e9)); } _7ee.documentElement.appendChild(_7f0); var _7f1=_7ee.createElement("selectedContext"); _7e7.XMLBuilderSetAttributeNodeNS(_7f1,"xmlns:xs","http://www.w3.org/2001/XMLSchema"); _7e7.XMLBuilderSetAttributeNodeNS(_7f1,"xmlns:bus","http://developer.cognos.com/schemas/bibus/3/"); _7e7.XMLBuilderSetAttributeNodeNS(_7f1,"SOAP-ENC:arrayType","bus:parameterValue[]","http://schemas.xmlsoap.org/soap/encoding/"); _7e7.XMLBuilderSetAttributeNodeNS(_7f1,"xmlns:xsd","http://www.w3.org/2001/XMLSchema"); _7e7.XMLBuilderSetAttributeNodeNS(_7f1,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance"); _7ee.documentElement.appendChild(_7f1); for(var _7f2 in _7ea){ var _7f3=_7ee.createElement("item"); _7e7.XMLBuilderSetAttributeNodeNS(_7f3,"xsi:type","bus:parameterValue","http://www.w3.org/2001/XMLSchema-instance"); var _7f4=_7e7.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:name",_7ee); _7e7.XMLBuilderSetAttributeNodeNS(_7f4,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance"); _7f4.appendChild(_7ee.createTextNode(_7ea[_7f2].name)); var _7f5=_7e7.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:value",_7ee); _7e7.XMLBuilderSetAttributeNodeNS(_7f5,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance"); _7e7.XMLBuilderSetAttributeNodeNS(_7f5,"SOAP-ENC:arrayType","bus:parmValueItem[]","http://schemas.xmlsoap.org/soap/encoding/"); for(var j=0;j<_7ea[_7f2].values.length;j++){ var _7f7=_7ee.createElement("item"); _7e7.XMLBuilderSetAttributeNodeNS(_7f7,"xsi:type","bus:simpleParmValueItem","http://www.w3.org/2001/XMLSchema-instance"); var _7f8=_7e7.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:use",_7ee); _7e7.XMLBuilderSetAttributeNodeNS(_7f8,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance"); _7f8.appendChild(_7ee.createTextNode(_7ea[_7f2].values[j][0])); var _7f9=_7e7.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:display",_7ee); _7e7.XMLBuilderSetAttributeNodeNS(_7f9,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance"); var _7fa=_7ea[_7f2].values[j][1]==null?"":_7ea[_7f2].values[j][1]; _7f9.appendChild(_7ee.createTextNode(_7fa)); _7f7.appendChild(_7f8); _7f7.appendChild(_7f9); _7f5.appendChild(_7f7); } _7f3.appendChild(_7f4); _7f3.appendChild(_7f5); _7f1.appendChild(_7f3); } var _7fb=_7ee.createElement("defaultMeasure"); _7ee.documentElement.appendChild(_7fb); _7ec.buildXML(_7e7,_7ee,"data"); var _7fc=_7ee.createElement("filter"); _7ee.documentElement.appendChild(_7fc); } return _7ee; }; CDrillManager.prototype.openSearchPage=function(_7fd,_7fe){ this.getModelDrillThroughContext(self); var _7ff=document.getElementById("searchPage"); if(_7ff!=null){ document.body.removeChild(_7ff); } _7ff=document.createElement("form"); _7ff.setAttribute("id","searchPage"); _7ff.setAttribute("name","searchPage"); _7ff.setAttribute("method","post"); _7ff.setAttribute("target",_7ff.name); _7ff.setAttribute("action",this.getCV().getGateway()+"/gosearch"); _7ff.style.display="none"; document.body.appendChild(_7ff); _7ff.appendChild(createHiddenFormField("csn.action","search")); _7ff.appendChild(createHiddenFormField("csn.drill",_7fe)); var _800=window.open("",_7ff.name,"directories=no,location=no,status=no,toolbar=no,resizable=yes,scrollbars=yes,top=100,left=100,height=480,width=640"); _800.focus(); _7ff.submit(); }; CDrillManager.prototype.launchSearchPage=function(){ var _801=this.getSelectionController(); var _802=document.forms["formWarpRequest"+this.getCVId()]; var _803=this.determineSelectionsForSearchPage(_801); var _804=this.getSearchContextDataSpecfication(_801); var _805=this.buildSearchPageXML(self,_802.packageBase.value,this.getCV().getModelPath(),_803,[],_804,[]); this.openSearchPage(_802.packageBase.value,XMLBuilderSerializeNode(_805)); }; CDrillManager.prototype.qsDrillDown=function(){ if(!this.canDrillDown()){ getConfigFrame().dlgGenericSelectionMessage(false); return; } var _806="DD:"; this.qsSendDrillCommand(_806); }; CDrillManager.prototype.qsDrillUp=function(){ if(!this.canDrillUp()){ getConfigFrame().dlgGenericSelectionMessage(false); return; } var _807="DU:"; this.qsSendDrillCommand(_807); }; CDrillManager.prototype.qsSendDrillCommand=function(_808){ var _809; if(_808=="DU:"){ _809="drillUp"; }else{ _809="drillDown"; } var _80a=this.getDrillParameters(_809,false,false); if(_80a.length==0){ getConfigFrame().dlgGenericSelectionMessage(false); return; } for(var idx=0;idx<_80a.length;++idx){ _808+=getConfigFrame().escapeParam(_80a[idx]); if(idx+1<_80a.length){ _808+=","; } } getConfigFrame().sendCmd(_808,"",true); }; CDrillManager.prototype.qsLaunchGoToPage=function(_80c){ var _80d=this.getSelectionController(); if(_80d!=null&&_80d.getModelDrillThroughEnabled()==true){ var _80e=this.getModelDrillThroughContext(cf); if(_80e==""){ getConfigFrame().dlgGenericSelectionMessage(false); return; } var _80f=document.getElementById("gotoPage"); if(_80f!=null){ document.body.removeChild(_80f); } _80f=document.createElement("form"); _80f.setAttribute("id","gotoPage"); _80f.setAttribute("name","gotoPage"); _80f.setAttribute("method","post"); _80f.style.display="none"; document.body.appendChild(_80f); var _810=getConfigFrame(); _80f.appendChild(this.createFormField("objpath",decodeURIComponent(_810.cfgGet("PackageBase")))); if(typeof gUseNewSelectionContext=="undefined"){ _80f.appendChild(this.createFormField("m","portal/goto2.xts")); }else{ _80f.appendChild(this.createFormField("m","portal/goto.xts")); } _80f.appendChild(this.createFormField("b_action","xts.run")); if(typeof gUseNewSelectionContext=="undefined"){ _80f.appendChild(this.createFormField("drillContext",_80e)); }else{ _80f.appendChild(this.createFormField("modeledDrillthru",_80e)); } if(typeof getConfigFrame().routingServerGroup!="undefined"){ _80f.appendChild(this.createFormField("ui.routingServerGroup",getConfigFrame().routingServerGroup)); } if(typeof _80c!="undefined"&&_80c==true){ _80f.appendChild(this.createFormField("directLaunch","true")); } var _811=_810.goApplicationManager.getReportManager().getParameterManager().getExecutionParameters(); if(_811){ _80f.appendChild(this.createFormField("encExecutionParameters",_811)); } var _812="winNAT_"+(new Date()).getTime(); var _813=this.getCV().getWebContentRoot()+"/rv/blankDrillWin.html?cv.id="+this.getCVId(); window.open(_813,_812,"toolbar,location,status,menubar,resizable,scrollbars=1"); _80f.target=_812; } }; CDrillManager.prototype.qsLaunchSearchPage=function(){ var cf=getConfigFrame(); var _815=goWindowManager.getSelectionController(); var _816=this.determineSelectionsForSearchPage(_815); var _817=this.getSearchContextDataSpecfication(_815); var _818=decodeURIComponent(cf.cfgGet("PackageBase")); var _819=this.buildSearchPageXML(cf,_818,decodeURIComponent(cf.cfgGet("cmLastModel")),_816,[],_817,[]); this.openSearchPage(_818,cf.XMLBuilderSerializeNode(_819)); }; CDrillManager.prototype.determineSelectionsForSearchPage=function(_81a){ var _81b=new CtxArrayPlaceHolder(); var _81c=_81a.getAllSelectedObjects(); for(var i=0;i<_81c.length;i++){ var _81e=_81c[i].getColumnName(); if(!this.containsByIndiceInArray(_81b,_81e)){ _81b[_81e]={}; _81b[_81e].name=_81e; _81b[_81e].values=[]; } var idx0=""; var muns=_81c[i].getMuns(); if(muns!=null&&muns.length>0){ idx0=muns[0][0]; } var idx1=_81c[i].getDisplayValues()[0]; if(!(this.containsInArray(_81b[_81e].values,0,idx0)&&this.containsInArray(_81b[_81e].values,1,idx1))){ _81b[_81e].values[_81b[_81e].values.length]=[idx0,idx1]; } } return _81b; }; CDrillManager.prototype.getSearchContextDataSpecfication=function(_822){ var _823=new CParameterValues(); var _824=_822.getCCDManager(); var _825=_824.m_cd; for(var _826 in _825){ var _827=_824.GetUsage(_826); if(_827!="2"){ var _828=_824.GetRDIValue(_826); var _829=_824.GetDisplayValue(_826); _823.addSimpleParmValueItem(_828,_828,_829,"true"); } } return _823; }; 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,_832){ var _833=document.createElement("input"); _833.setAttribute("type","hidden"); _833.setAttribute("name",name); _833.setAttribute("value",_832); return (_833); }; CDrillManager.prototype.getAuthoredDrillThroughTargets=function(){ var _834=[]; var _835=this.getSelectionController(); var _836=null; if(_835!=null){ if(_835.getSelectedColumnIds().length==1){ var _837=_835.getSelections(); for(var _838=0;_838<_837.length;++_838){ var _839=_837[_838]; _836=_839.getCellRef(); while(_836){ if(_836.getAttribute("dtTargets")!=null){ _834.push(""+_836.getAttribute("dtTargets")+""); break; }else{ if(_836.getAttribute("onclick")!=null){ var _83a=_836.getAttribute("onclick"); var _83b=null; if(_83a.indexOf("doSingleDrillThrough")!=-1){ _83b=_83a.replace("doSingleDrillThrough","this.buildRvTargetsForSingleDrillThrough"); }else{ if(_83a.indexOf("doMultipleDrillThrough")!=-1){ _83b=_83a.replace("doMultipleDrillThrough","this.buildRvTargetsForMultipleDrillThrough"); } } if(_83b!=null){ var _83c=eval(_83b); if(_83c!=null){ _834.push(_83c); break; } } } } _836=XMLHelper_GetFirstChildElement(_836); } } }else{ if(_835.hasSelectedChartNodes()){ var _83d=_835.getSelectedChartNodes(); var _83e=_83d[0]; _836=_83e.getArea(); if(_836.getAttribute("dtTargets")!=null){ _834.push(""+_836.getAttribute("dtTargets")+""); } }else{ if(_835.getSelectedDrillThroughImage()!=null){ var _83f=_835.getSelectedDrillThroughImage(); if(_83f&&_83f.getAttribute("dtTargets")!=null){ _834.push(""+_83f.getAttribute("dtTargets")+""); } }else{ if(_835.getSelectDrillThroughSingleton()!=null){ var _840=_835.getSelectDrillThroughSingleton(); if(_840&&_840.getAttribute("dtTargets")!=null){ _834.push(""+_840.getAttribute("dtTargets")+""); } } } } } } return _834; }; CDrillManager.prototype.getDrillThroughParameters=function(_841,evt){ if(typeof _841=="undefined"){ _841="query"; } var _843=[]; if(typeof evt!="undefined"){ var _844=getCrossBrowserNode(evt,true); try{ while(_844){ if(typeof _844.getAttribute!="undefined"&&_844.getAttribute("dtTargets")){ _843.push(""+_844.getAttribute("dtTargets")+""); break; } _844=_844.parentNode; } } catch(e){ return false; } }else{ var oCV=this.getCV(); var _846=oCV.getDrillMgr(); var _847=_846.getSelectionController(); if(_847!=null){ var _848=null; if(_847.hasSelectedChartNodes()){ var _849=_847.getSelectedChartNodes(); var _84a=_849[0]; _848=_84a.getArea(); } if(_848!=null){ _843.push(""+_848.getAttribute("dtTargets")+""); }else{ _843=this.getAuthoredDrillThroughTargets(); } } } if(_843.length>0){ var _84b=""; for(var _84c=0;_84c<_843.length;++_84c){ _84b+=eval("\""+_843[_84c]+"\""); } _84b+=""; var _84d=this.getCV().getAction("AuthoredDrill"); if(_841=="query"){ _84d.populateContextMenu(_84b); this.showOtherMenuItems(); }else{ if(this.getCV().envParams["cv.id"]=="AA"){ this.getCV().m_viewerFragment.raiseAuthoredDrillClickEvent(); }else{ _84d.execute(_84b); } } return true; }else{ if(_841=="query"){ this.showOtherMenuItems(); return true; }else{ return false; } } }; CDrillManager.prototype.executeAuthoredDrill=function(_84e){ var _84f=decodeURIComponent(_84e); var _850=this.getCV().getAction("AuthoredDrill"); _850.executeDrillTarget(_84f); }; CDrillManager.prototype.doesMoreExist=function(_851){ for(var i=0;i<_851.getNumItems();i++){ var _853=_851.get(i); if(_853!=null){ if((_853 instanceof CMenuItem)&&(_853.getLabel()==RV_RES.RV_MORE)&&(_853.getAction()==this.getCVObjectRef()+".getDrillMgr().launchGoToPage();")){ return true; } } } return false; }; CDrillManager.prototype.showOtherMenuItems=function(){ var cv=this.getCV(); var _855=cv.rvMainWnd; var _856=_855.getToolbarControl(); var _857=null; var _858=null; if(typeof _856!="undefined"&&_856!=null){ _857=_856.getItem("goto"); if(_857){ _858=_857.getMenu(); } } var _859=_855.getContextMenu(); var _85a=_855.getUIHide(); var _85b=null; if(typeof _859!="undefined"&&_859!=null&&_859.getGoToMenuItem()){ _85b=_859.getGoToMenuItem().getMenu(); } var _85c=null; var _85d=this.getSelectionController(); if(_858!=null){ if(this.doesMoreExist(_858)==false){ if(typeof gMenuSeperator!="undefined"&&_858.getNumItems()>0&&(cv.bCanUseCognosViewerIndexSearch||_85a.indexOf(" RV_TOOLBAR_BUTTONS_GOTO_RELATED_LINKS ")==-1)){ _858.add(gMenuSeperator); } var _85e=new CMenuItem(_858,RV_RES.RV_MORE,this.getCVObjectRef()+".getDrillMgr().launchGoToPage();","",gMenuItemStyle,cv.getWebContentRoot(),cv.getSkin()); if(_85a.indexOf(" RV_TOOLBAR_BUTTONS_GOTO_RELATED_LINKS ")!=-1){ _85e.hide(); }else{ if(_85d==null||_85d.getModelDrillThroughEnabled()==false){ _85e.disable(); } } } } if(_85b!=null){ if(typeof gMenuSeperator!="undefined"&&_85b.getNumItems()>0&&(cv.bCanUseCognosViewerIndexSearch||_85a.indexOf(" RV_CONTEXT_MENU_GOTO_RELATED_LINKS ")==-1)){ _85b.add(gMenuSeperator); } var _85f=new CMenuItem(_85b,RV_RES.RV_MORE,this.getCVObjectRef()+".getDrillMgr().launchGoToPage();","",gMenuItemStyle,cv.getWebContentRoot(),cv.getSkin()); if(_85a.indexOf(" RV_CONTEXT_MENU_GOTO_RELATED_LINKS ")!=-1){ _85f.hide(); }else{ if(_85d==null||_85d.getModelDrillThroughEnabled()==false){ _85f.disable(); } } } if(_85c!=null&&_85d!=null){ var _860=_85d.getAllSelectedObjects(); if(_860==null||_860.length===0){ _85c.disable(); } } if(_858!=null){ _858.draw(); if(_858.isVisible()){ _858.show(); } } if(_85b!=null){ _85b.draw(); if(_85b.isVisible()){ _85b.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 _863=this.getSelectionController(); if(_863!=null){ var _864=_863.getSelectionObjectFactory().getSelectionChartObject(node); if(_864!=null){ var _865=_864.getDrillOptions(); for(var idx=0;idx<_865.length;++idx){ var _867=_865[idx][0]; if((node.getAttribute("isChartTitle")==="true"&&_867=="1")||_867=="3"||_867=="2"){ node.className="dl "+node.className; node.setAttribute("href","#"); break; } } } } } }; CDrillManager.prototype.buildRvTargetsForSingleDrillThrough=function(_868){ if(typeof _868=="undefined"||_868==null){ return null; } var _869=this.getCV().getDrillTargets(); if(!_869||_869.length==0){ return null; } var _86a=_868[0][0]; if(typeof _86a=="undefined"||_86a==null){ return null; } var _86b=_869[_86a]; if(typeof _86b=="undefined"||_86b==null){ return null; } var _86c=""; return ""+_86c+""; }; CDrillManager.prototype.buildRvTargetsForMultipleDrillThrough=function(_86d){ if(typeof _86d=="undefined"||_86d==null){ return null; } var _86e=this.getCV().getDrillTargets(); if(!_86e||_86e.length==0){ return null; } var _86f=""; for(var _870=0;_870<_86d.length;++_870){ var _871=_86d[_870]; if(_871.length<2){ continue; } var _872=_871[0]; if(typeof _872=="undefined"||_872==null){ continue; } var _873=_871[1]; if(typeof _873=="undefined"||_873==null){ continue; } var _874=_86e[_872]; if(typeof _874=="undefined"||_874==null){ continue; } if(_873===null||_873===""){ _873=_874.getLabel(); } _86f+=""; } if(_86f.length>0){ return ""+_86f+""; } return null; }; function CDrillThroughTarget(_875,_876,_877,_878,_879,path,_87b,_87c,_87d,_87e,_87f,_880){ this.m_label=_875; this.m_outputFormat=_876; this.m_outputLocale=_877; this.m_showInNewWindow=_878; this.m_method=_879; this.m_path=path; this.m_bookmark=_87b; this.m_parameters=_87c; this.m_objectPaths=_87d; this.m_prompt="false"; this.m_dynamicDrillThrough=false; this.m_parameterProperties=_880; if(typeof _87e!="undefined"&&_87e!=null){ if(_87e=="yes"){ this.m_prompt="true"; }else{ if(_87e=="target"){ this.m_prompt=""; } } } if(typeof _87f!="undefined"&&_87f!=null){ if(typeof _87f=="string"){ _87f=_87f=="true"?true:false; } this.m_dynamicDrillThrough=_87f; } }; 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(_881){ var _882=""+_881; if((_882=="0")||((_881!=null)&&(_881!=false))){ _882=_882.replace(/&/g,"&"); _882=_882.replace(//g,">"); _882=_882.replace(/"/g,"""); _882=_882.replace(/'/g,"'"); }else{ if(_881==null){ _882=""; } } return _882; }; function createFormField(name,_884){ var _885=document.createElement("input"); _885.setAttribute("type","hidden"); _885.setAttribute("name",name); _885.setAttribute("value",_884); return (_885); }; function setBackURLToCloseWindow(_886){ var _887=_886.childNodes; if(_887){ for(var _888=0;_888<_887.length;++_888){ var _889=_887[_888]; var _88a=_889.getAttribute("name"); if(_88a&&_88a=="ui.backURL"){ _886.removeChild(_889); } } } _886.appendChild(createFormField("ui.backURL","javascript:window.close();")); }; function doMultipleDrills(_88b,cvId){ if(parent!=this&&parent.doMultipleDrills){ if(getCVId()!=""&&getCVId()!=cvId){ cvId=getCVId(); } return parent.doMultipleDrills(_88b,cvId); }else{ if(window.gViewerLogger){ window.gViewerLogger.log("Drill Targets",_88b,"text"); } var oCV=null; try{ oCV=getCognosViewerObjectRef(cvId); } catch(exception){ } var _88e=buildDrillForm(oCV); addDrillEnvironmentFormFields(_88e,oCV); if(typeof oCV!="undefined"&&oCV!=null){ var _88f=oCV.getModelPath(); _88e.appendChild(createFormField("modelPath",_88f)); var _890=oCV.getSelectionController(); var _891=""; if(typeof getViewerSelectionContext!="undefined"&&typeof CSelectionContext!="undefined"){ _891=getViewerSelectionContext(_890,new CSelectionContext(_88f)); } _88e.appendChild(createFormField("drillContext",_891)); _88e.appendChild(createFormField("modelDrillEnabled",_890.getModelDrillThroughEnabled())); if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"&&document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value!=""){ _88e.appendChild(createFormField("drillSource",document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value)); }else{ if(typeof oCV.envParams["ui.spec"]!="undefined"){ _88e.appendChild(createFormField("sourceSpecification",oCV.envParams["ui.spec"])); } } } _88e.setAttribute("launchGotoPage","true"); _88e.appendChild(createFormField("drillTargets",_88b)); _88e.appendChild(createFormField("invokeGotoPage","true")); _88e.appendChild(createFormField("m","portal/drillthrough.xts")); _88e.appendChild(createFormField("b_action","xts.run")); var _892="winNAT_"+(new Date()).getTime(); var _893=".."; if(oCV!=null){ _893=oCV.getWebContentRoot(); var _894=oCV.getExecutionParameters(); if(_894!=""){ _88e.appendChild(createFormField("encExecutionParameters",_894)); } } if(!oCV||!oCV.launchGotoPageForIWidgetMobile(_88e)){ if(oCV&&typeof oCV.launchGotoPage==="function"){ oCV.launchGotoPage(_88e); }else{ var _895=_893+"/rv/blankDrillWin.html"; _88e.target=_892; window.open(_895,_892); } } } }; function buildDrillForm(oCV){ var _897=document.getElementById("drillForm"); if(_897){ document.body.removeChild(_897); } _897=document.createElement("form"); if(typeof oCV!="undefined"&&oCV!=null){ var _898=document.getElementById("formWarpRequest"+oCV.getId()); _897.setAttribute("target",_898.getAttribute("target")); _897.setAttribute("action",_898.getAttribute("action")); }else{ _897.setAttribute("action",location.pathname); } _897.setAttribute("id","drillForm"); _897.setAttribute("name","drillForm"); _897.setAttribute("method","post"); _897.style.display="none"; document.body.appendChild(_897); return _897; }; function addDrillEnvironmentFormFields(_899,oCV){ if(window.g_dfEmail){ _899.appendChild(createFormField("dfemail",window.g_dfEmail)); } if(oCV!=null){ _899.appendChild(createFormField("cv.id",oCV.getId())); if(typeof oCV.envParams["ui.sh"]!="undefined"){ _899.appendChild(createFormField("ui.sh",oCV.envParams["ui.sh"])); } if(oCV.getViewerWidget()==null){ if(typeof oCV.envParams["cv.header"]!="undefined"){ _899.appendChild(createFormField("cv.header",oCV.envParams["cv.header"])); } if(typeof oCV.envParams["cv.toolbar"]!="undefined"){ _899.appendChild(createFormField("cv.toolbar",oCV.envParams["cv.toolbar"])); }else{ var _89b=oCV.getAdvancedServerProperty("VIEWER_PASS_PORTLET_TOOLBAR_STATE_ON_DRILLTHROUGH"); if(oCV.m_viewerFragment&&_89b!=null&&_89b===true){ var _89c=oCV.m_viewerFragment.canShowToolbar()?"true":"false"; _899.appendChild(createFormField("cv.toolbar",_89c)); } } } if(typeof oCV.envParams["ui.backURL"]!="undefined"){ _899.appendChild(createFormField("ui.backURL",oCV.envParams["ui.backURL"])); } if(typeof oCV.envParams["ui.postBack"]!="undefined"){ _899.appendChild(createFormField("ui.postBack",oCV.envParams["ui.postBack"])); } if(typeof oCV.envParams["savedEnv"]!="undefined"){ _899.appendChild(createFormField("savedEnv",oCV.envParams["savedEnv"])); } if(typeof oCV.envParams["ui.navlinks"]!="undefined"){ _899.appendChild(createFormField("ui.navlinks",oCV.envParams["ui.navlinks"])); } if(typeof oCV.envParams["lang"]!="undefined"){ _899.appendChild(createFormField("lang",oCV.envParams["lang"])); } if(typeof oCV.envParams["ui.errURL"]!="undefined"){ _899.appendChild(createFormField("ui.errURL",oCV.envParams["ui.errURL"])); } var _89d=""; if(oCV.envParams["ui.routingServerGroup"]){ _89d=oCV.envParams["ui.routingServerGroup"]; } _899.appendChild(createHiddenFormField("ui.routingServerGroup",_89d)); }else{ _899.appendChild(createFormField("cv.header","false")); _899.appendChild(createFormField("cv.toolbar","false")); } }; function appendReportHistoryObjects(oCV,_89f){ if(oCV!=null&&typeof oCV.rvMainWnd!="undefined"&&_89f!=null){ oCV.rvMainWnd.addCurrentReportToReportHistory(); var _8a0=oCV.rvMainWnd.saveReportHistoryAsXML(); _89f.appendChild(createFormField("cv.previousReports",_8a0)); } }; function doSingleDrill(_8a1,args,_8a3,_8a4,_8a5,_8a6,_8a7,_8a8,cvId,_8aa,_8ab){ var _8ac=""; if(typeof cvId=="string"){ _8ac=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(_8a1,args,_8a3,_8a4,_8a5,_8a6,_8a7,_8a8,cvId,_8aa,_8ab); }else{ if(typeof _8a3=="undefined"){ _8a3="default"; }else{ if(_8a3=="execute"){ _8a3="run"; } } if(_8a3=="edit"&&oCV!=null&&typeof oCV.m_viewerFragment){ _8a1="_blank"; } var _8ae=buildDrillForm(oCV); var _8af=""; _8af+=""+sXmlEncode(_8a3)+""; _8af+=""+sXmlEncode(args[0][1])+""; _8af+=""+sXmlEncode(_8a4)+""; _8af+=""+sXmlEncode(_8a5)+""; _8af+=""+sXmlEncode(_8aa)+""; _8af+=""+sXmlEncode(_8ab)+""; if(typeof oCV!="undefined"&&oCV!=null){ _8af+=""+oCV.getTracking()+""; if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"){ _8af+=""+sXmlEncode(document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value)+""; } var _8b0=oCV.getModelPath(); _8af+=""+sXmlEncode(_8b0)+""; _8af+=""+sXmlEncode(getViewerSelectionContext(oCV.getSelectionController(),new CSelectionContext(_8b0)))+""; if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"&&document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value!=""){ _8af+=""+sXmlEncode(document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value)+""; }else{ if(typeof oCV.envParams["ui.spec"]!="undefined"){ _8af+=""+sXmlEncode(oCV.envParams["ui.spec"])+""; } } } if(_8a6!=""){ _8af+=""+_8a6+""; } if(_8a3!="view"){ if(typeof _8a7!="undefined"){ _8af+=""+sXmlEncode(_8a7)+""; } if(typeof _8a8!="undefined"){ _8af+=""+sXmlEncode(_8a8)+""; } } var _8b1=0; _8af+=""; var _8b2=[]; for(_8b1=1;_8b1"; } } } var _8b6=args[_8b1][0]; var _8b7=false; for(var i=0;i<_8b2.length;i++){ var _8b9=_8b2[i]; if(_8b9.name===_8b6&&_8b9.value===sSel){ _8b7=true; break; } } if(!_8b7){ _8b2.push({"name":_8b6,"value":sSel}); _8af+=""+sXmlEncode(sSel)+""; } } _8af+=""; _8af+=getExecutionParamNode(oCV); _8af+=""; _8ae.appendChild(createFormField("authoredDrill.request",_8af)); _8ae.appendChild(createFormField("ui.action","authoredDrillThrough2")); _8ae.appendChild(createFormField("b_action","cognosViewer")); addDrillEnvironmentFormFields(_8ae,oCV); if(!oCV||!oCV.executeDrillThroughForIWidgetMobile(_8ae)){ if(oCV&&typeof oCV.sendDrillThroughRequest==="function"){ oCV.sendDrillThroughRequest(_8ae); }else{ if(_8a1==""&&oCV!=null&&typeof oCV.m_viewerFragment!="undefined"){ oCV.m_viewerFragment.raiseAuthoredDrillEvent(_8af); }else{ if((oCV!=null&&oCV.getViewerWidget()!=null)||_8a1!=""){ setBackURLToCloseWindow(_8ae); var _8ba="winNAT_"+(new Date()).getTime(); var _8bb=".."; if(oCV!=null){ _8bb=oCV.getWebContentRoot(); } var _8bc=_8bb+"/rv/blankDrillWin.html"; if(_8ac){ _8bc+="?cv.id="+_8ac; } if(oCV==null){ _8bc=window.location.href.substring(0,window.location.href.indexOf("/v1")); _8bc+="/?perspective=classicviewer"; _8bc+="&altDrillFlag=true"; _8bc+="&format="+sXmlEncode(_8a4); var _8bd=_8ae.getAttribute("name")+Date.now().toString(); _8ae.setAttribute("name",_8bd); if(typeof (Storage)!=="undefined"){ localStorage.setItem(_8bd,_8ae.outerHTML); _8bc+="&drillFormLabel="+_8bd; }else{ console.log("Sorry! No Web Storage support..."); } } if(window.gViewerLogger){ window.gViewerLogger.log("Drill Specification",_8af,"xml"); } _8ae.target=_8ba; newWindow=window.open(_8bc,_8ba); }else{ appendReportHistoryObjects(oCV,_8ae); if(window.gViewerLogger){ window.gViewerLogger.log("Drill Specification",_8af,"xml"); } _8ae.target=(oCV&&oCV.getDrillFormTarget)?oCV.getDrillFormTarget():"_self"; _8ae.submit(); if(oCV!=null&&!oCV.getDrillFormTarget){ setTimeout(getCognosViewerObjectRefAsString(oCV.getId())+".getRequestIndicator().show()",10); } } } } } } }; function getExecutionParamNode(oCV){ var _8bf=""; if(typeof oCV!="undefined"&&oCV!=null){ var _8c0=oCV.getExecutionParameters(); if(_8c0!=""){ _8bf+=""; _8bf+=sXmlEncode(_8c0); _8bf+=""; } } return _8bf; }; function doSingleDrillThrough(_8c1,_8c2,cvId){ var _8c4=_8c1[0][0]; if(typeof _8c4=="undefined"||_8c4==null){ return; } var _8c5=cvId&&window[cvId+"drillTargets"]?window[cvId+"drillTargets"][_8c4]:drillTargets[_8c4]; if(typeof _8c5=="undefined"){ return; } if(_8c2!=""&&_8c5.getPath()==""){ document.location="#"+_8c2; }else{ var args=[]; args[args.length]=["ui.object",_8c5.getPath()]; for(var _8c7=1;_8c7<_8c1.length;++_8c7){ args[args.length]=_8c1[_8c7]; } var _8c8=""; if(_8c5.getShowInNewWindow()=="true"){ _8c8="_blank"; } var _8c9=_8c5.getParameters(); var _8ca=_8c5.getObjectPaths(); var _8cb=cvId; if(!cvId){ _8cb=getCVId(); } doSingleDrill(_8c8,args,_8c5.getMethod(),_8c5.getOutputFormat(),_8c5.getOutputLocale(),_8c2,_8c9,_8ca,_8cb,_8c5.getPrompt(),false); } }; function getCVId(){ var _8cc=""; try{ _8cc=this.frameElement.id.substring("CVIFrame".length); } catch(exception){ } return _8cc; }; function doMultipleDrillThrough(_8cd,cvId){ var _8cf=""; for(var _8d0=0;_8d0<_8cd.length;++_8d0){ var _8d1=_8cd[_8d0]; if(_8d1.length<3){ continue; } var _8d2=_8d1[0]; if(typeof _8d2=="undefined"||_8d2==null){ continue; } var _8d3=_8d1[1]; if(typeof _8d3=="undefined"||_8d3==null){ continue; } var _8d4=cvId&&window[cvId+"drillTargets"]?window[cvId+"drillTargets"][_8d2]:drillTargets[_8d2]; if(typeof _8d4=="undefined"||_8d4==null){ continue; } if(_8d3===null||_8d3===""){ _8d3=_8d4.getLabel(); } _8cf+=""; for(var _8d5=2;_8d5<_8d1.length;++_8d5){ _8cf+=_8d1[_8d5]; } _8cf+=_8d4.getParameters(); _8cf+=_8d4.getObjectPaths(); _8cf+=""; } _8cf+=""; if(!cvId){ cvId=getCVId(); } doMultipleDrills(_8cf,cvId); }; function CScriptLoader(_8d6){ 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=_8d6; 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(_8d7){ this.m_bHandleStylesheetLimit=_8d7; }; CScriptLoader.prototype.executeScripts=function(_8d8,_8d9){ if(this.isReadyToExecute()){ for(var _8da=0;_8da0){ return false; } return true; }; CScriptLoader.prototype.loadCSS=function(_8df,_8e0,_8e1,_8e2){ var aM=_8df.match(this.m_reHasCss); if(aM){ for(var i=0;i0){ var _8f7=window.gScriptLoader.m_aBlockedPromptingLocaleFileQueue.shift(); window.gScriptLoader.loadObject(_8f7.sName,_8f7.sNamespaceId); } } if(window.gScriptLoader.m_aScriptLoadQueue.length>0){ window.gScriptLoader.loadObject(); } } }; CScriptLoader.prototype.moveLinks=function(node){ if(!node){ return; } var _8f9=node.getAttribute("href"); if(!_8f9||this.m_oFiles[_8f9]){ return; } this.m_oFiles[_8f9]="complete"; document.getElementsByTagName("head").item(0).appendChild(node); }; CScriptLoader.prototype.loadObject=function(_8fa,_8fb){ var _8fc=null; if(typeof _8fa==="undefined"){ if(this.m_aScriptLoadQueue.length>0){ var _8fd=this.m_aScriptLoadQueue.shift(); _8fa=_8fd.name; _8fb=_8fd.namespaceId; }else{ return; } } if(this.m_oFiles[_8fa]){ return; } if(this.m_bBlockScriptLoading){ this.m_aScriptLoadQueue.push({"name":_8fa,"namespaceId":_8fb}); }else{ if(_8fa.match(this.m_reIsCss)){ _8fc=document.createElement("link"); _8fc.setAttribute("rel","stylesheet"); _8fc.setAttribute("type","text/css"); _8fc.setAttribute("href",_8fa); if(window.isIE&&window.isIE()){ _8fc.onreadystatechange=CScriptLoader_onReadyStateChange; _8fc.onload=CScriptLoader_onReadyStateChange; _8fc.onerror=CScriptLoader_onReadyStateChange; this.m_oFiles[_8fa]="new"; }else{ this.m_oFiles[_8fa]="complete"; } }else{ if(_8fa.match(this.m_reIsJavascript)){ if(_8fa.match(this.m_reIsPromptingLocaleJavascript)){ if(this.m_bBlockPromptingLocaleScripts){ this.m_aBlockedPromptingLocaleFileQueue.push({"sName":_8fa,"sNamespaceId":_8fb}); return; } this.m_bBlockPromptingLocaleScripts=true; } this.m_bBlockScriptLoading=this.m_bUseScriptBlocking; _8fc=document.createElement("script"); _8fc.setAttribute("language","javascript"); _8fc.setAttribute("type","text/javascript"); _8fc.setAttribute("src",_8fa); _8fc.sFilePath=_8fa; _8fc.onreadystatechange=CScriptLoader_onReadyStateChange; _8fc.onload=CScriptLoader_onReadyStateChange; _8fc.onerror=CScriptLoader_onReadyStateChange; this.addNamespaceAttribute(_8fc,_8fb); this.m_oFiles[_8fa]="new"; } } if(_8fc){ document.getElementsByTagName("head").item(0).appendChild(_8fc); } } }; CScriptLoader.prototype.loadScriptsFromDOM=function(_8fe,_8ff,_900){ if(!_8fe){ return; } var _901=_8fe.getElementsByTagName("script"); while(_901.length>0){ var _902=_901[0]; if(_902.getAttribute("src")!=null&&_902.getAttribute("src").length>0){ this.loadObject(_902.getAttribute("src"),_8ff); }else{ var _903=_902.innerHTML; var _904=false; if(_903.indexOf("document.write")!=-1){ var _905=_903.replace(this.m_reEscapedCharacters,"").replace(this.m_reStringLiterals,""); _904=(_905.indexOf("document.write")!=-1); } if(_904){ if(_900){ var sId="CVScriptFromDOMPlaceHolder"+_901.length+_8ff; var _907=_902.ownerDocument.createElement("span"); _907.setAttribute("id",sId); _902.parentNode.insertBefore(_907,_902); this.m_aDocumentWriters.push(new CDocumentWriter(sId,_903)); } }else{ if(_903.length>0){ this.m_aScripts.push(_903); } } } _902.parentNode.removeChild(_902); } }; CScriptLoader.prototype.loadStyles=function(_908,_909){ if(!_908||!_908.parentNode){ return; } var _90a=_908.parentNode.getElementsByTagName("style"); while(_90a.length>0){ var _90b=_90a[0]; if(_909){ this.addNamespaceAttribute(_90b,_909); } 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(_90b); } }; CScriptLoader.prototype.loadAll=function(_90d,_90e,_90f,_910){ this.m_bScriptLoaderCalled=true; this.m_bHasCompletedExecution=false; this.loadScriptsFromDOM(_90d,_90f,_910); if(this.containsAjaxWarnings()){ return false; } this.loadStyles(_90d,_90f); if(this.containsAjaxWarnings()){ return false; } this.executeScripts(_90e,_90f); return true; }; CScriptLoader.prototype.setFileState=function(_911,_912){ this.m_oFiles[_911]=_912; }; CScriptLoader.prototype.containsAjaxWarnings=function(){ if(this.m_bIgnoreAjaxWarnings){ return false; }else{ return (this.m_ajaxWarnings.length>0); } }; CScriptLoader.prototype.addNamespaceAttribute=function(_913,_914){ if(typeof _914==="string"){ _913.setAttribute("namespaceId",_914); } }; if(typeof window.gScriptLoader=="undefined"){ window.gScriptLoader=new CScriptLoader(); } function ViewerA11YHelper(oCV){ this.m_oCV=oCV; }; ViewerA11YHelper.prototype.onFocus=function(evt){ var _917=getCrossBrowserNode(evt); _917=ViewerA11YHelper.findChildOfTableCell(_917); this.updateCellAccessibility(_917,false); }; ViewerA11YHelper.prototype.onKeyDown=function(evt){ evt=(evt)?evt:((event)?event:null); var _919=getCrossBrowserNode(evt); if(ViewerA11YHelper.isTableCell(_919)){ for(var i=0;i<_919.childNodes.length;i++){ if(_919.childNodes[i].nodeName.toLowerCase()=="span"){ _919=_919.childNodes[i]; break; } } } if(!this.isValidNodeToSelect(_919)){ return true; } _919=ViewerA11YHelper.findChildOfTableCell(_919); if(_919){ 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(_919); } return stopEventBubble(evt); }else{ if(evt.keyCode=="37"){ this.moveLeft(_919); return stopEventBubble(evt); }else{ if(evt.keyCode=="38"){ this.moveUp(_919); return stopEventBubble(evt); }else{ if(evt.keyCode=="40"){ this.moveDown(_919); 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 _91b=this.m_oCV.getActionFactory().load("Selection"); _91b.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 _91c=this.m_oCV.getActionFactory().load("Delete"); if(!this.m_oCV.isBlacklisted("Delete")&&_91c.canDelete()){ _91c.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(_919); if(lid!=""){ lid=lid.split(this.m_oCV.getId())[0]; var _91e=-1; var _91f=this.m_oCV.getRAPReportInfo(); if(_91f){ var _920=_91f.getContainer(lid); if(typeof _920.layoutIndex!="undefined"){ _91e=_920.layoutIndex; } } var _921=document.getElementById("infoBarHeaderButton"+_91e+this.m_oCV.getId()); if(_921!==null){ this.m_oCV.setCurrentNodeFocus(getCrossBrowserNode(evt)); _921.focus(); } } return stopEventBubble(evt); }else{ if(!this.m_oCV.isBux&&evt.shiftKey==true&&evt.keyCode=="121"){ var ocv=this.m_oCV; var _923=function(){ if(typeof evt.clientX=="undefined"||typeof evt.clientY=="undefined"){ var _924=clientToScreenCoords(evt.target,document.body); evt.clientX=_924.leftCoord; evt.clientY=_924.topCoord; } ocv.dcm(evt,true); }; if(isFF()){ setTimeout(_923,0); }else{ _923.call(); } return stopEventBubble(evt); }else{ if(this.m_oCV.isBux&&(evt.keyCode=="93"||(evt.shiftKey==true&&evt.keyCode=="121"))){ var _925=this.m_oCV.getViewerWidget(); var _926=this.m_oCV.getSelectionController(); _925.preprocessPageClicked(true); _926.pageClicked(evt); _925.updateToolbar(); _925.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 _929=node.nodeName.toLowerCase(); if((_929=="span"&&(!node.getAttribute("class")||node.getAttribute("class").indexOf("expandButton")===-1))||(_929=="div"&&node.getAttribute("flashchartcontainer")=="true")||(_929=="div"&&node.getAttribute("chartcontainer")=="true")||(_929=="img"&&(!node.id||node.id.indexOf("sortimg")!==0))){ return node; } if(ViewerA11YHelper.isSemanticNode(node)){ var _92a=node.childNodes&&node.childNodes.length?node.childNodes[0]:null; if(_92a){ return this.getValidNodeToSelect(_92a); } } } return null; }; ViewerA11YHelper.isSemanticNode=function(node){ if(!ViewerA11YHelper.isSemanticNode._semanticNodeNames){ ViewerA11YHelper.isSemanticNode._semanticNodeNames=["strong","em","h1","h2","h3","h4","h5","h6"]; } var _92c=node.nodeName.toLowerCase(); for(var i=0;i1){ var _942=_93f.rowSpan; for(var _943=1;_943<_942;_943++){ _941=_941.nextSibling; } } var _944=false; while(_941){ if(_941.nextSibling){ _941=_941.nextSibling; }else{ if(_93f.nextSibling&&!_944){ _941=_941.parentNode.firstChild; _944=true; _940++; }else{ return false; } } if(this.doMoveUpDown(_941,_940)){ return true; } } return false; }; ViewerA11YHelper.prototype.moveUp=function(_945){ var _946=ViewerA11YHelper.getTableCell(_945); _946=this.getPfMainOutputCell(_946); var _947=_946.parentNode; var _948=this.getColumnIndex(_946); _948+=this.getColSpanFromRowSpans(_946); var _949=false; while(_947){ if(_947.previousSibling){ _947=_947.previousSibling; }else{ if(_946.previousSibling&&!_949){ _947=_947.parentNode.lastChild; _949=true; _948--; }else{ return false; } } if(this.doMoveUpDown(_947,_948)){ 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(_94b,_94c){ if(_94b!=null){ var _94d=_94b.firstChild; var pos=this.getColSpanFromRowSpans(_94d); while(_94d){ if(pos==_94c){ return this.moveToTDFromTheRight(_94d); }else{ if(pos>_94c){ break; } } var _94f=0; if(_94d.colSpan){ _94f=_94d.colSpan; }else{ _94f++; } pos+=_94f; _94d=_94d.nextSibling; } } }; ViewerA11YHelper.prototype.moveToTDFromTheRight=function(td){ td=this.getPfVisibleCell(td); var _951=td.childNodes; for(var _952=_951.length-1;_952>=0;_952--){ var node=this.getValidNodeToSelect(_951[_952]); 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 _955=td.childNodes; for(var _956=0;_956<_955.length;_956++){ var node=this.getValidNodeToSelect(_955[_956]); 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 _959=this.m_oCV.m_pinFreezeManager.nodeToContainer(node); if(_959){ _959.updateScroll(node); } } }; ViewerA11YHelper.prototype.getPfMainOutputCell=function(_95a){ var main=null; var slid=_95a.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 _95e=this.m_oCV.m_pinFreezeManager.getContainer(lid); if(_95e){ main=_95e.getMain(_95a); } } } return main?main:_95a; }; 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 _961=0; while(node.previousSibling){ node=node.previousSibling; if(node.rowSpan==1){ if(node.colSpan){ _961+=node.colSpan; }else{ _961++; } } } return _961; }; ViewerA11YHelper.prototype.getPfVisibleCell=function(_962){ var copy=null; var slid=_962.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 _966=this.m_oCV.m_pinFreezeManager.getContainer(lid); if(_966){ copy=_966.getCopy(_962); } } } return copy?copy:_962; }; ViewerA11YHelper.prototype.updateCellAccessibility=function(_967,_968){ if(!_967){ return false; } var _969=false; var _96a=false; var _96b=false; var _96c=_967.getAttribute("ctx")!=null?_967:_967.parentNode; if(_967.getAttribute("flashChartContainer")!="true"){ if(_96c.getAttribute("ctx")!=null){ if(this.m_oCV.isBux){ var _96d=this.m_oCV.getAction("DrillUpDown"); _96d.updateDrillability(this.m_oCV,_96c); _969=_96d.canDrillDown(); _96a=_96d.canDrillUp(); }else{ var _96e=_96c.getAttribute("ctx"); var _96f=_96e.indexOf(":")==-1?_96e:_96e.substring(0,_96e.indexOf(":")); var _970=this.m_oCV.getSelectionController(); _969=_970.canDrillDown(_96f); _96a=_970.canDrillUp(_96f); } } _96b=_967.parentNode.getAttribute("dtTargets")?true:false; } var _971=_967.nodeName.toLowerCase()=="img"; var _972=_967.parentNode.getAttribute("type")=="columnTitle"; if(!_971&&(_968||((_967.getAttribute("aria-labelledby")!=null||_972||this.m_oCV.isAccessibleMode())))){ var _973=""; if(_967.parentNode.getAttribute("cc")=="true"){ _973+=" "+RV_RES.IDS_JS_CROSSTAB_CORNER; } if(_967.innerHTML.length===0){ _967.innerHTML=" "; _973+=" "+RV_RES.IDS_JS_EMPTY_CELL; } if(_969&&_96a){ _973+=" "+RV_RES.IDS_JS_DRILL_DOWN_UP_JAWS; }else{ if(_969){ _973+=" "+RV_RES.IDS_JS_DRILL_DOWN_JAWS; }else{ if(_96a){ _973+=" "+RV_RES.IDS_JS_DRILL_UP_JAWS; } } } if(_96b){ _973+=" "+RV_RES.IDS_JS_DRILL_THROUGH_JAWS; } if(_967.altText&&_967.altText.length>0){ _973=_967.altText; }else{ if(_967.getAttribute("flashChartContainer")=="true"){ _973=RV_RES.IDS_JS_CHART_IMAGE; } } if(this.m_oCV.isBux){ var _974=_967.previousSibling; if(_974){ var wid=_974.getAttribute("widgetid"); if(wid&&wid.indexOf("comment")){ _973+=" "+RV_RES.IDS_JS_ANNOTATION_JAWS; } } if(_967.getAttribute("rp_name")||_967.parentNode.getAttribute("rp_name")){ _973+=" "+RV_RES.IDS_JS_LABEL_HAS_BEEN_RENAMED; } if(_967.nextSibling&&_967.nextSibling.getAttribute("class")=="sortIconVisible"){ _973+=" "+_967.nextSibling.getAttribute("alt"); } } if(_973.length>0){ this.addAriaLabelledByOnCell(_967,_973); } } if(_96a||_969||_96b){ this.addDrillAccessibilityAttributes(_967,_96b); } if(_967.attachEvent){ _967.attachEvent("onblur",this.onBlur); }else{ _967.addEventListener("blur",this.onBlur,false); } if((isIE()&&_967.getAttribute("tabIndex")!=0)||_971){ _967.setAttribute("modifiedTabIndex","true"); _967.setAttribute("oldTabIndex",_967.getAttribute("tabIndex")); _967.setAttribute("tabIndex",0); } }; ViewerA11YHelper.prototype.addAriaLabelledByOnCell=function(_976,_977){ var _978=0; var _979=_976; while(_979.previousSibling){ _978++; _979=_979.previousSibling; } var _97a=_976.getAttribute("ariaHiddenSpanId"); if(_97a&&document.getElementById(_97a)){ document.getElementById(_97a).innerHTML=_977; }else{ if(!_976.parentNode.id&&!_976.id){ _976.parentNode.id=Math.random(); } var _97b=document.createElement("span"); _97b.style.visibility="hidden"; _97b.style.display="none"; _97b.id=(_976.id==""?_976.parentNode.id:_976.id)+"_"+_978; _97b.innerHTML=_977; _976.parentNode.appendChild(_97b); var _97c=""; if(_976.getAttribute("aria-labelledby")!=null){ _97c+=_976.getAttribute("aria-labelledby"); }else{ if(_976.id==""){ _976.id=_976.parentNode.id+"_main_"+_978; } _97c+=_976.id; } _97c+=" "+_97b.id; _976.setAttribute("aria-labelledby",_97c); _976.setAttribute("ariaHiddenSpanId",_97b.id); } }; ViewerA11YHelper.prototype.addDrillAccessibilityAttributes=function(_97d,_97e){ if(!_97d.getAttribute("oldClassName")){ if(!_97e){ _97d.setAttribute("oldClassName",_97d.className); _97d.className="dl "+_97d.className; } if(!_97d.getAttribute("role")){ _97d.setAttribute("role","link"); } } }; ViewerA11YHelper.prototype.onBlur=function(evt){ var _980=null; if(isIE()){ _980=getNodeFromEvent(evt,true); }else{ _980=this; } _980=ViewerA11YHelper.findChildOfTableCell(_980); if(_980){ if(_980.getAttribute("oldClassName")){ _980.className=_980.getAttribute("oldClassName"); _980.removeAttribute("oldClassName"); } if(_980.getAttribute("modifiedTabIndex")=="true"){ _980.removeAttribute("modifiedTabIndex"); _980.removeAttribute("tabIndex"); if(_980.getAttribute("oldTabIndex")){ _980.setAttribute("tabIndex",_980.getAttribute("oldTabIndex")); } _980.removeAttribute("oldTabIndex"); } var _981=_980.getAttribute("ariaHiddenSpanId"); if(_981){ var _982=document.getElementById(_981); if(_982){ _982.innerHTML=""; } } } }; ViewerA11YHelper.prototype.getColSpanFromRowSpans=function(_983){ var _984=0; var _985=_983.parentNode; var _986=0; while(_985){ var _987=_985.firstChild; var _988=this.getColumnCount(_985)-_986; while(_987&&_987.rowSpan>1&&_988>0&&_987!=_983){ _984+=_987.colSpan; _987=_987.nextSibling; _988--; } if(_985.childNodes.length>_986){ _986=this.getColumnCount(_985); } _985=_985.previousSibling; } return _984; }; ViewerA11YHelper.prototype.getColumnCount=function(_989){ var _98a=0; var node=_989.firstChild; while(node){ _98a+=node.colSpan; node=node.nextSibling; } return _98a; }; ViewerA11YHelper.prototype.addLabelledByForItemsOutsideOfContainers=function(){ if(!this.m_oCV.isAccessibleMode()){ return; } var _98c=document.getElementById("RVContent"+this.m_oCV.getId()); if(!_98c){ return; } var _98d=getElementsByAttribute(_98c,"span","tabindex","0"); if(!_98d){ return; } for(var i=0;i<_98d.length;i++){ var span=_98d[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,_991,type){ },addContextInfo:function(_993){ }}; } 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,_996){ 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=_996; 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 _997=false; for(var _998=0;_998"; var _9ca=new ViewerDispatcherEntry(this); _9ca.addFormField("ui.action","reportAction"); _9ca.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",_9c0); if(this.m_viewerWidget){ this.m_viewerWidget.placeTabControlInView(); } this.dispatchRequest(_9ca); } }; CCognosViewer.prototype._removeTabContent=function(_9cb,_9cc){ var _9cd=this._findChildWithTabId(_9cb,_9cc); while(_9cd){ _9cd.parentNode.removeChild(_9cd); _9cd=this._findChildWithTabId(_9cb,_9cc); } }; CCognosViewer.prototype._findChildWithTabId=function(_9ce,_9cf){ var _9d0=null; for(var i=0;i<_9ce.childNodes.length;i++){ var _9d2=_9ce.childNodes[i]; if(_9d2.getAttribute("tabId")==_9cf){ _9d0=_9d2; break; } } return _9d0; }; CCognosViewer.prototype.clearTabs=function(){ if(!this.m_bHasTabs){ return; } this.m_tabInfo={}; var _9d3=this.getReportDiv(); var _9d4=_9d3.parentNode; for(var i=0;i<_9d4.childNodes.length;i++){ var node=_9d4.childNodes[i]; if(node.getAttribute("id")!="CVReport"+this.m_sId){ _9d4.removeChild(node); i--; } } }; CCognosViewer.prototype.isSavedOutput=function(){ var _9d7=this.envParams["ui.action"]; return _9d7==="view"||_9d7==="buxView"; }; CCognosViewer.prototype.renderSavedOutputIFrame=function(url,_9d9,_9da){ var _9db=document.getElementById("CVReport"+this.getId()); var _9dc=document.createElement("iframe"); _9dc.style.width="100%"; _9dc.style.height="99%"; _9dc.id="CVIFrame"+this.getId(); _9dc.title=_9d9; _9dc.setAttribute("frameBorder","0"); _9db.appendChild(_9dc); var obj=this; var func=function(){ obj.renderTabs(); }; setTimeout(function(){ if(_9da){ if(_9dc.attachEvent){ _9dc.attachEvent("onload",func); }else{ _9dc.addEventListener("load",func,true); } } _9dc.src=url; },1); }; CCognosViewer.prototype.updatePageState=function(_9df){ if(_9df&&this.getState()){ this.getState().setPageState(_9df); } }; CCognosViewer.prototype.getPageInfo=function(){ if(this.m_viewerState&&this.m_viewerState.getPageState()){ var _9e0=this.m_viewerState.getPageState(); return {"currentPage":_9e0.getCurrentPage(),"pageCount":_9e0.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(_9e7){ this.m_retryDispatcherEntry=_9e7; }; 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(_9e8){ this.m_faultDispatcherEntry=_9e8; }; CCognosViewer.prototype.getFaultDispatcherEntry=function(){ return this.m_faultDispatcherEntry; }; CCognosViewer.prototype.dispatchRequest=function(_9e9){ this.setFaultDispatcherEntry(null); this.getViewerDispatcher().dispatchRequest(_9e9); }; 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(_9ea){ var _9ea=this.getActionFactory().load(_9ea); _9ea.setCognosViewer(this); return _9ea; }; CCognosViewer.prototype.getCalculationCache=function(){ return this.m_calculationCache; }; CCognosViewer.prototype.updateOutputForA11ySupport=function(){ this.updateBorderCollapse(); if(this.getA11YHelper()){ this.getA11YHelper().addLabelledByForItemsOutsideOfContainers(); } var _9eb=navigator.userAgent.toLowerCase(); var _9ec=_9eb.indexOf("iphone")!=-1; var _9ed=_9eb.indexOf("ipod")!=-1; var _9ee=_9eb.indexOf("ipad")!=-1; var _9ef=_9ec||_9ed||_9ee; var _9f0=_9eb.indexOf("android")!=-1; if(_9ef||_9f0){ 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 _9f1=document.createElement("div"); _9f1.id=this.m_sId+"hc"; _9f1.style.border="1px solid"; _9f1.style.borderColor="red green"; _9f1.style.height="10px"; _9f1.style.top="-999px"; _9f1.style.position="absolute"; document.body.appendChild(_9f1); var _9f2=null; if(isIE()){ _9f2=_9f1.currentStyle; }else{ _9f2=_9f1.ownerDocument.defaultView.getComputedStyle(_9f1,null); } if(!_9f2){ return; } this.m_bHighContrast=_9f2.borderTopColor==_9f2.borderRightColor; document.body.removeChild(_9f1); } }; 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 _9f3=null; if(this.envParams["ui.action"]=="view"&&!this.isBux){ var _9f4=document.getElementById("CVIFrame"+this.getId()); _9f3=_9f4.contentWindow.document; }else{ _9f3=document.getElementById("CVReport"+this.getId()); } var _9f5=_9f3.getElementsByTagName("table"); for(var i=0;i<_9f5.length;i++){ if(_9f5[i].style.borderCollapse=="collapse"){ _9f5[i].style.borderCollapse="separate"; } } } }; CCognosViewer.prototype.isAccessibleMode=function(){ if(this.m_bAccessibleMode==true){ return true; } return false; }; CCognosViewer.prototype.isSinglePageReport=function(){ for(var _9f7 in this.m_aSecRequests){ if(this.m_aSecRequests[_9f7]=="nextPage"||this.m_aSecRequests[_9f7]=="previousPage"){ return false; } } return true; }; CCognosViewer.prototype.hasNextPage=function(){ for(var _9f8 in this.m_aSecRequests){ if(this.m_aSecRequests[_9f8]=="nextPage"){ return true; } } return false; }; CCognosViewer.prototype.hasPrevPage=function(){ for(var _9f9 in this.m_aSecRequests){ if(this.m_aSecRequests[_9f9]=="previousPage"){ return true; } } return false; }; CCognosViewer.prototype.captureHotkeyPageNavigation=function(evt){ evt=(evt)?evt:((event)?event:null); if(evt){ var node=getNodeFromEvent(evt); var _9fc=(node&&node.nodeName)?node.nodeName.toLowerCase():null; if((evt.keyCode==8&&_9fc!="input"&&_9fc!="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(_9fd){ this.m_bUseWorkingDialog=_9fd; }; 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(_9fe){ if(!_9fe){ this.preProcessControlArray=[]; } this.m_bReportHasPrompts=_9fe; }; CCognosViewer.prototype.getHasPrompts=function(){ return this.m_bReportHasPrompts; }; CCognosViewer.prototype.setUsePageRequest=function(_9ff){ this.m_viewerDispatcher.setUsePageRequest(_9ff); }; CCognosViewer.prototype.getUsePageRequest=function(){ return this.m_viewerDispatcher.getUsePageRequest(); }; CCognosViewer.prototype.setKeepSessionAlive=function(_a00){ this.m_bKeepSessionAlive=_a00; }; 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 _a01; try{ _a01=getCognosViewerSCObjectRef(this.m_sId); } catch(e){ _a01=null; } return _a01; }; CCognosViewer.prototype.addCallback=function(_a02,oFct,_a04){ if(!this.m_aCallback){ this.m_aCallback=[]; } this.m_aCallback=this.m_aCallback.concat({m_sEvent:_a02,m_oCallback:oFct,m_bCaptureEvent:(_a04===true)}); }; CCognosViewer.prototype.canDrillDown=function(sId){ var sCtx=this.findCtx(sId).split("::")[0]; if(sCtx){ var _a07=this.getSelectionController(); if(_a07){ return (_a07.canDrillDown(sCtx)); } } return false; }; CCognosViewer.prototype.canDrillUp=function(sId){ var sCtx=this.findCtx(sId).split("::")[0]; if(sCtx){ var _a0a=this.getSelectionController(); if(_a0a){ return (_a0a.canDrillUp(sCtx)); } } return false; }; CCognosViewer.prototype.canSubmitPrompt=function(){ var _a0b=null; if(this.preProcessControlArray&&this.preProcessControlArray instanceof Array){ var _a0c=this.preProcessControlArray.length; for(var k=0;k<_a0c;k++){ _a0b=eval(this.preProcessControlArray[k]); if(_a0b.isValid()===false){ if(!this.m_reportRenderingDone||!_a0b.getCascadeOnParameter||!_a0b.getCascadeOnParameter()){ return false; } } } } return true; }; CCognosViewer.prototype.closeContextMenuAndToolbarMenus=function(){ if(this.rvMainWnd){ this.rvMainWnd.closeContextMenuAndToolbarMenus(); } }; CCognosViewer.prototype.dcm=function(_a0e,_a0f){ if(this.canDisplayContextMenu()){ if(this.preSelectNode==true){ _a0f=false; this.preSelectNode=false; } if(this.rvMainWnd.displayContextMenu(_a0e,_a0f)!=false){ return stopEventBubble(_a0e); } } }; 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(_a10){ var _a11=this.getDrillMgr(); if(_a11){ _a11.singleClickDrillEvent(_a10,"RV"); } }; CCognosViewer.prototype.debug=function(sMsg){ if(this.m_bDebug){ var _a13=""; var _a14=this.debug.caller; if(typeof _a14=="object"&&_a14!==null){ _a13=_a14.toString().match(/function (\w*)/)[1]; } if(!_a13){ _a13="?"; } alert(_a13+": "+sMsg); } }; CCognosViewer.prototype.callbackExists=function(_a15){ var _a16=false; if(this.m_aCallback&&this.m_aCallback.length){ for(var _a17=0;_a171&&_a4f<_a52.length){ aIds=_a52[_a4f].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 _a59=aCtx[0][0]; var _a5a=this.getSelectionController(); if(_a5a){ if(_a5a.isContextId(_a59)){ sCtx=sId; } } } if(!sCtx){ var _a5b=this.findElementWithCtx(sId); if(_a5b){ sCtx=_a5b.getAttribute("ctx"); } } return sCtx; }; CCognosViewer.prototype.findElementWithCtx=function(sId){ var _a5d=sId; if(typeof sId=="string"){ _a5d=this.findElementWithCtx(document.getElementById(sId)); } if(_a5d){ if(_a5d.getAttribute&&_a5d.getAttribute("ctx")){ return _a5d; } for(var _a5e=0;_a5e<_a5d.childNodes.length;_a5e++){ var _a5f=this.findElementWithCtx(_a5d.childNodes[_a5e]); if(_a5f){ return _a5f; } } } return null; }; CCognosViewer.prototype.getUseValue=function(sId){ var sVal=null; var sCtx=this.findCtx(sId).split("::")[0]; if(sCtx){ var _a63=this.getSelectionController(); if(_a63){ sVal=_a63.getUseValue(sCtx); } } return sVal; }; CCognosViewer.prototype.init=function(_a64){ if(_a64&&typeof _a64=="object"){ for(var _a65 in _a64){ this[_a65]=_a64[_a65]; } } }; CCognosViewer.prototype.initViewer=function(_a66){ var _a67=new RequestHandler(this); var _a68=document.getElementById("formBackJax"+this.getId()); if(_a68&&typeof _a68.state!="undefined"&&_a68.state.value.length>0){ _a67.loadReportHTML(_a68.result.value); var _a69=eval("("+_a68.state.value+")"); _a67.updateViewerState(_a69); _a67.postComplete(); }else{ if(this.getUsePageRequest()){ var _a6a=_a66?_a66.m_sStatus:null; if(isIE()){ if(window.location.hash=="#working"){ window.history.go(-2); return; }else{ if(_a6a==="working"||_a6a==="stillWorking"){ window.location.hash="#working"; } } }else{ if(_a68&&_a68.working){ if(_a68.working.value=="true"){ window.history.go(-1); return; }else{ if(_a6a==="working"||_a6a==="stillWorking"){ _a68.working.value="true"; } } } } } _a67.processInitialResponse(_a66); } }; CCognosViewer.prototype.saveBackJaxInformation=function(_a6b){ var _a6c=document.getElementById("formBackJax"+this.getId()); if(_a6c){ if(typeof _a6c.state!="undefined"){ _a6c.state.value=_a6b.getResponseStateText(); } if(typeof _a6c.result!="undefined"){ _a6c.result.value=_a6b.getResult(); } } }; CCognosViewer.prototype.pcc=function(evt){ if(evt&&typeof evt.button!="undefined"&&evt.button!="1"){ this.preSelectNode=true; var _a6e=this.getSelectionController(); if(_a6e){ _a6e.pageContextClicked(evt); } } }; CCognosViewer.prototype.isValidAjaxResponse=function(_a6f){ return (_a6f&&_a6f.childNodes&&_a6f.childNodes.length>0&&_a6f.childNodes[0].nodeName!="parsererror"?true:false); }; CCognosViewer.prototype.resubmitInSafeMode=function(_a70){ if(this.m_bUseSafeMode){ this.resetViewerDispatcher(); this.setUsePageRequest(true); this.envParams["cv.useAjax"]="false"; if(_a70){ _a70.retryRequest(); } } }; CCognosViewer.prototype.showLoadedContent=function(_a71){ if(_a71!==null&&typeof _a71!="undefined"){ _a71.style.display="block"; } this.m_resizeReady=true; this.doneLoading(); var obj=this; setTimeout(function(){ obj.renderTabs(); },1); }; CCognosViewer.prototype.doneLoading=function(){ var _a73=this.getViewerWidget(); if(_a73){ if(window.IBM&&window.IBM.perf){ window.IBM.perf.log("viewer_doneLoading",this); } var _a74=this.getStatus(); if(!this.m_reportRenderingDone&&this.m_resizeReady&&this.m_stateSet){ var _a75=_a74=="working"||_a74=="stillWorking"||_a74=="fault"; _a73.fireEvent("com.ibm.bux.widget.render.done",null,{noAutoResize:_a75}); if(_a74=="complete"){ if(window.IBM&&window.IBM.perf){ window.IBM.perf.log("viewer_doneLoading",this); } if(typeof _a73.postLoadContent=="function"){ _a73.postLoadContent(); } this.m_reportRenderingDone=true; if(!_a75){ var _a76=this; setTimeout(function(){ _a76.m_readyToRespondToResizeEvent=true; },20); } } } if(_a74!="fault"){ _a73.clearErrorDlg(); } this.doneLoadingUpdateA11Y(_a74); }else{ var _a74=this.getStatus(); if(_a74=="complete"){ this.m_reportRenderingDone=true; this.JAWSTalk(RV_RES.IDS_JS_READY); }else{ if(_a74=="working"){ this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING); } } } }; CCognosViewer.prototype.doneLoadingUpdateA11Y=function(_a77){ if(this.getKeepFocus()!==false&&this.getKeepFocus()!=null){ var _a78=this.getKeepFocus(); if(_a77=="complete"){ this.setKeepFocus(false); } var _a79=null; if(this.getVisibleDialog()!==null){ _a79=this.getVisibleDialog().getDialogDiv(); }else{ if(_a78===true){ _a79=document.getElementById("CVReport"+this.getId()); }else{ if(typeof _a78=="string"){ _a79=document.getElementById(_a78); }else{ if(_a78!==null){ _a79=_a78; if(this.isBux){ dojo.window.scrollIntoView(_a79); } } } } } if(_a79){ setFocusToFirstTabItem(_a79); } if(_a77=="complete"){ this.JAWSTalk(RV_RES.IDS_JS_READY); }else{ if(_a77=="working"||_a77=="stillWorking"){ this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING); } } } }; CCognosViewer.prototype.JAWSTalk=function(_a7a){ 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(_a7a)); var _a7d=document.getElementById("RVContent"+id); if(_a7d){ _a7d.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 _a7e=this.getAdvancedServerProperty("VIEWER_JS_EXPAND_COLLAPSE_CONTROLS_DEFAULT"); if(_a7e===null){ return false; } var _a7f=this.getViewerWidget().getProperties().getShowExpandCollapseIconFlag(); return (_a7e.toLowerCase()==="on"&&_a7f!==false)||(_a7e.toLowerCase()==="off"&&_a7f===true); }; CCognosViewer.prototype.setMaxContentSize=function(){ if("10"!=window.getIEVersion()){ return; } if(document.body.className==="viewer"){ var _a80=document.body.offsetHeight; var _a81=this.getNonReportHeight(document.getElementById("CVReport"+this.getId())); var _a82=document.getElementById("mainViewerTable"+this.getId()); _a82.style.maxHeight=_a80-_a81-2+"px"; var _a83=GUtil.generateCallback(this.setMaxContentSize,[true],this); if(!this.attachedOnResize){ this.attachedOnResize=true; if(window.attachEvent){ window.attachEvent("onresize",_a83); }else{ if(window.addEventListener){ window.addEventListener("resize",_a83,false); } } } } }; CCognosViewer.prototype.getNonReportHeight=function(node){ var _a85=0; var _a86=node.parentNode; if(!_a86){ return _a85; } if(_a86.childNodes.length>1){ for(var i=0;i<_a86.childNodes.length;i++){ var _a88=_a86.childNodes[i]; if(_a88!=node&&!isNaN(_a88.clientHeight)&&_a88.style.display!="none"){ _a85+=_a88.clientHeight; } } } if(node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){ _a85+=this.getNonReportHeight(_a86); } return _a85; }; CCognosViewer.prototype.addPageAdornments=function(){ this.m_layoutElements=null; this.m_lidToElement=null; this.initFlashCharts(); this.insertSortIconsForAllLists(); var _a89=this.getViewerWidget().getProperties(); if(this.canInsertExpandIconsForAllCrosstabs()){ this.insertExpandIconsForAllCrosstabs(); } var _a8a=document.getElementById("CVReport"+this.getId()); if(_a8a){ var oCV=this; setTimeout(function(){ if(oCV.getPinFreezeManager()&&oCV.getPinFreezeManager().hasFrozenContainers()){ oCV.getPinFreezeManager().renderReportWithFrozenContainers(_a8a); } oCV.addInfoBar(); },1); } this.getViewerWidget().reselectSelectionFilterObjects(); this.getViewerWidget().addChromeWhitespaceHandler(this.getId()); }; CCognosViewer.prototype.addFlashChart=function(_a8c){ this.m_flashChartsObjectIds.push(_a8c); }; CCognosViewer.prototype.flashChartError=function(_a8d){ var _a8e=this.getViewerWidget(); var _a8f=_a8e.getProperties(); _a8f.setProperty("flashCharts",false); var _a90=this.getAction("Redraw"); _a90.isUndoable=function(){ return false; }; _a90.execute(); }; CCognosViewer.prototype.initFlashCharts=function(){ var _a91=this.getViewerWidget(); if(this.m_flashChartsObjectIds.length>0){ var _a92=document.getElementById("rt"+this.getId()); if(window.addEventListener){ _a92.addEventListener("mousedown",onFlashChartRightClick,true); }else{ var _a93={}; var _a94=function(){ this.releaseCapture(); }; var _a95=function(){ onFlashChartRightClick(event); this.setCapture(); }; for(var i=0;i0){ _a92.attachEvent("oncontextmenu",function(){ if(_a93[window.event.srcElement.id]){ return false; } }); } } if(_a91){ _a91.fireEvent("com.ibm.bux.widget.setShowBordersWhenInnactive",null,true); } }else{ if(_a91){ _a91.fireEvent("com.ibm.bux.widget.setShowBordersWhenInnactive",null,false); } } }; CCognosViewer.prototype.initializeLayoutElements=function(){ var _a99=document.getElementById("rt"+this.getId()); var _a9a=getElementsByAttribute(_a99,"*","lid"); this.m_lidToElement={}; this.m_layoutElements=[]; var _a9b=0; var _a9c=this.getPinFreezeManager(); for(var i=0;i<_a9a.length;i++){ var e=_a9a[i]; if(!_a9c||!_a9c.getContainerElement(e)||_a9c.isElementInMainOutput(e)){ this.m_layoutElements[_a9b]=e; this.m_lidToElement[e.getAttribute("lid")]=e; _a9b++; } } }; CCognosViewer.prototype.getLayoutElement=function(_a9f){ if(!this.m_layoutElements){ this.initializeLayoutElements(); } if(this.m_layoutElements){ return this.m_layoutElements[_a9f]; } 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 _aa1=this.getRAPReportInfo(); if(_aa1){ var _aa2=document.getElementById("rt"+this.getId()); this.initializeLayoutElements(); var _aa3=[]; this.m_aInfoBar=[]; for(var _aa4=0;_aa4-1){ lid=lid.substring(8); } lid=lid.substring(0,lid.indexOf(this.getId())); } var _aa7=_aa1.getContainer(lid); if(_aa7&&typeof _aa7.parentContainer=="undefined"){ var _aa8=this.collectChildContainers(_aa7.container); if(this.getPinFreezeManager()){ oPinFreezeContainerElement=this.getPinFreezeManager().getContainerElement(_aa5); _aa5=(oPinFreezeContainerElement)?oPinFreezeContainerElement:_aa5; } var _aa9=new InfoBar(this,_aa5,_aa7,_aa8,_aa4); _aa9.setTimingDetails(_aa1._getEventTimings()); _aa9.render(); if(_aa9.hasSomethingRendered()){ _aa3.push(_aa9.getId()); } this.m_aInfoBar.push(_aa9); } } var _aaa=this.getViewerWidget(); if(_aaa){ _aaa.refreshInfoBarRenderedState(_aa3); } } }; CCognosViewer.prototype.collectChildContainers=function(_aab){ var _aac=[]; var _aad=this.getRAPReportInfo(); if(_aad){ var _aae=_aad.getContainerCount(); for(var cidx=0;cidx<_aae;++cidx){ var _ab0=_aad.getContainerFromPos(cidx); if(typeof _ab0.parentContainer!="undefined"&&_ab0.parentContainer==_aab){ _aac.push(_ab0); } } } return _aac; }; CCognosViewer.prototype.addReportInfo=function(){ var _ab1=this.getViewerWidget(); if(typeof _ab1==="undefined"||_ab1===null){ return; } if(!_ab1.getAttributeValue("originalReport")||this.isIWidgetMobile()){ return; } var _ab2=this.envParams["baseReportModificationTime"]; var _ab3=_ab1.getAttributeValue("baseReportModificationTime"); if(typeof _ab2!=="undefined"&&typeof _ab3!=="undefined"&&_ab3&&_ab3!=""&&_ab2!==_ab3){ var cvid=this.getId(); var _ab5=document.getElementById("CVReport"+cvid); var _ab6=_ab5.parentNode; var id="ReportInfo"+cvid; var _ab8=document.createElement("div"); _ab8.setAttribute("id",id+"_container"); _ab8.setAttribute("cvid",cvid); _ab8.className="new-info-indicator BUXNoPrint"; var _ab9=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"; } _ab9.src=this.getWebContentRoot()+img; _ab9.className="reportInfoIcon"; _ab9.setAttribute("tabIndex","0"); _ab9.setAttribute("alt",""); _ab9.setAttribute("title",""); _ab9.setAttribute("role","presentation"); var _abb=RV_RES.IDS_JS_REPORT_INFO_TITLE; var _abc=RV_RES.IDS_JS_REPORT_INFO_TEXT; var _abd=RV_RES.IDS_JS_REPORT_INFO_LINK_TEXT; _ab8.appendChild(_ab9); _ab6.insertBefore(_ab8,_ab5); this.m_reportInfoTooltip=new bux.reportViewer.ReportInfo({connectId:[id+"_container"],focusElement:_ab9,position:["above","below"],title:_abb,text:_abc,linkText:_abd,linkScript:getCognosViewerObjectRefAsString(cvid)+".reportInfoResetReport();",allowMouseOverToolTip:true}); } }; CCognosViewer.prototype.reportInfoResetReport=function(){ this.executeAction("ResetToOriginal"); }; CCognosViewer.prototype.hideReportInfo=function(){ var _abe=document.getElementById("ReportInfo"+this.getId()+"_container"); if(typeof _abe!=="undefined"&&_abe!==null){ _abe.style.visibility="hidden"; } }; CCognosViewer.prototype.insertSortIcons=function(){ var _abf=this.envParams?this.envParams.limitedInteractiveMode:true; if(typeof _abf==="undefined"||_abf===true){ return; } if(this.envParams["ui.action"]==="run"||this.envParams["ui.primaryAction"]==="run"){ this.insertSortIconsForAllLists(); } }; CCognosViewer.prototype._getContainers=function(_ac0){ var _ac1=[]; var _ac2="",_ac3=""; if(_ac0==="list"){ _ac2="list"; _ac3="ls"; }else{ if(_ac0==="crosstab"){ _ac2="crosstab"; _ac3="xt"; } } var _ac4=document.getElementById("CVReport"+this.getId()); if(this.getRAPReportInfo()){ var _ac5=this.getRAPReportInfo().getContainerIds(_ac2); for(var i=0;i<_ac5.length;++i){ var _ac7=getElementsByAttribute(_ac4,"table","lid",_ac5[i]+this.getId(),1); if(_ac7&&_ac7.length>0){ _ac1.push(_ac7[0]); } } }else{ _ac1=getElementsByClassName(_ac4,"table",_ac3); } return _ac1; }; CCognosViewer.prototype.insertSortIconsForAllLists=function(){ var _ac8=this._getContainers("list"); for(var i=0;i<_ac8.length;++i){ this.insertSortIconsToList(_ac8[i]); } }; CCognosViewer.prototype.insertSortIconsToList=function(_aca){ var _acb=getElementsByAttribute(_aca,"*","type","columnTitle"); for(var i=0;i<_acb.length;++i){ var _acd=_acb[i]; this.getSelectionController().getSelectionObjectFactory().getSelectionObject(_acd); if(_acd.getAttribute("canSort")!="false"&&_acd.getAttribute("CTNM")===null&&_acd.getAttribute("CC")===null){ var _ace=false; for(var _acf=0;_acf<_acd.childNodes.length;_acf++){ var _ad0=_acd.childNodes[_acf]; if(_ad0.nodeName.toLowerCase()=="img"){ if(_ad0.id&&_ad0.id.indexOf("sortimg")===0){ _ace=true; break; } var sLid=_ad0.getAttribute("lid"); if(sLid&&sLid.indexOf("SortIcon")!==-1){ _acd.removeChild(_ad0); break; } } } if(!_ace&&this.canInsertSortIcon(_acd)){ this.insertSortIconToColumnHeader(_acd); } } } }; 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(_ad3){ var _ad4=_ad3.getAttribute("rp_sort"); return ((!this.isLimitedInteractiveMode()&&!this.isBlacklisted("Sort"))||(_ad4!==undefined&&_ad4!==null&&_ad4.length>0)); }; CCognosViewer.prototype.insertSortIconToColumnHeader=function(_ad5){ if(!_ad5.style.whiteSpace){ _ad5.style.whiteSpace="nowrap"; } var _ad6=document.createElement("img"); _ad6.setAttribute("id","sortimg"+Math.random()); if((!this.isLimitedInteractiveMode()&&!this.isBlacklisted("Sort"))){ _ad6.onmouseover=function(){ this.setAttribute("oldClassName",this.className); this.className+=" sortIconOver"; }; _ad6.onmouseout=function(){ this.className=this.getAttribute("oldClassName"); this.removeAttribute("oldClassName"); }; } _ad6.src=this.getImgSrc(_ad5); var _ad7=this.getSortInfo(_ad5); var _ad8=this.getSortOrder(_ad7); _ad6.setAttribute("alt",this.getSortAltText(_ad8)); _ad6.setAttribute("title",this.getSortAltText(_ad8)); _ad6.className=this.getSortClass(_ad7); _ad6.setAttribute("sortOrder",_ad8); _ad5.appendChild(_ad6); }; CCognosViewer.prototype.canInsertShowExpandCollapseIconForNode=function(_ad9,_ada){ var _adb=this.getSelectionController(); var _adc=_adb.hasCalculationMetadata(_ada,[_ada],"crosstab"); return ((_adb.canDrillDown(_ada)||_ad9.alwaysCanExpandCollapse)&&!_adb.isCalculationOrMeasure(_ada,_adc)); }; CCognosViewer.prototype.insertExpandIconsForAllCrosstabs=function(){ var _add=this._getContainers("crosstab"); var _ade=this; var _adf=this.getRAPReportInfo(); var _ae0=this.getReportContextHelper(); for(var i=0;i<_add.length;i++){ var _ae2=_add[i]; var _ae3=_ae2.getAttribute("lid"); _ae3=_ae3.substring(0,_ae3.length-this.getId().length); var _ae4=getElementsByAttribute(_ae2,["td","th"],"ctnm","true"); for(var j=0;j<_ae4.length;j++){ var _ae6=_ae4[j]; var sCtx=this.findCtx(_ae6); var _ae8=_ae0.getDataItemName(sCtx); if(_ae8){ var _ae9=_adf.getItemInfo(_ae3,_ae8); var _aea=_ae0.processCtx(sCtx); if(this.canInsertShowExpandCollapseIconForNode(_ae9,_aea[0][0])){ var sMun=_ae0.getMun(sCtx); var _aec=sMun&&_ae9.expandedMembers&&_ae9.expandedMembers[sMun]===true; var _aed=document.createElement("div"); _aed.setAttribute("skipSelection","true"); _aed.className="expandButton "+(_aec?"collapse":"expand"); _ae6.insertBefore(_aed,_ae6.firstChild); var _aee=document.createElement("span"); _aee.className="expandButtonCaption"; _aee.innerHTML=(_aec?"[-]":"[+]"); _aed.appendChild(_aee); } } } } }; CCognosViewer.prototype.removeExpandIconsForAllCrosstabs=function(){ var _aef=this._getContainers("crosstab"); for(var i=0;i<_aef.length;i++){ var _af1=_aef[i]; var _af2=_af1.getAttribute("lid"); _af2=_af2.substring(0,_af2.length-this.getId().length); var _af3=getElementsByAttribute(_af1,"td","ctnm","true"); for(var j=0;j<_af3.length;j++){ var _af5=_af3[j]; if(_af5.firstChild.className==="expandButton collapse"||_af5.firstChild.className==="expandButton expand"){ _af5.removeChild(_af5.firstChild); } } } }; CCognosViewer.prototype.fillInContextData=function(){ if(!this.isLimitedInteractiveMode()){ var _af6=document.getElementById("CVReport"+this.getId()); var _af7=getElementsByClassName(_af6,"table","ls"); for(var i=0;i<_af7.length;++i){ var _af9=getElementsByAttribute(_af7[i],"*","type","columnTitle"); for(var j=0;j<_af9.length;++j){ this.getSelectionController().getSelectionObjectFactory().getSelectionObject(_af9[j]); } } } }; CCognosViewer.prototype.getSortAltText=function(_afb){ if(_afb==="ascending"){ return RV_RES.IDS_JS_SORT_ASCENDING; }else{ if(_afb==="descending"){ return RV_RES.IDS_JS_SORT_DESCENDING; }else{ if(_afb==="nosort"){ return RV_RES.IDS_JS_NOT_SORTED; } } } }; CCognosViewer.prototype.getSortInfo=function(_afc){ var _afd=_afc.getAttribute("rp_sort"); if(_afd){ _afd=_afd.split("."); } return _afd; }; CCognosViewer.prototype.getSortClass=function(_afe){ var _aff="sortIconHidden"; if(_afe){ if(_afe[0]==="d"||_afe[0]==="a"){ _aff="sortIconVisible"; } } return _aff; }; CCognosViewer.prototype.getSortOrder=function(_b00){ var _b01="nosort"; if(_b00){ if(_b00[0]==="d"){ _b01="descending"; }else{ if(_b00[0]==="a"){ _b01="ascending"; } } } return _b01; }; CCognosViewer.prototype.getImgSrc=function(_b02){ var _b03=_b02.getAttribute("rp_sort"); var src=this.getWebContentRoot()+"/rv/images/"+this.getSortIconName(_b03); return src; }; CCognosViewer.prototype.getSortIconName=function(_b05){ var _b06="sort_no.gif"; if(_b05){ _b05=_b05.split("."); if(_b05[0]==="d"){ _b06="sort_descending.gif"; }else{ if(_b05[0]==="a"){ _b06="sort_ascending.gif"; } } } return _b06; }; 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 _b07=this.getViewerWidget(); return (_b07&&_b07.promptParametersRetrieved==true&&this.envParams&&typeof this.envParams["reportPrompts"]!="undefined"&&this.envParams["reportPrompts"]!=null&&this.envParams["reportPrompts"].length>0); }; CCognosViewer.prototype.getPromptParametersInfo=function(){ var _b08=null; if(this.widgetHasPromptParameters()){ _b08=""+sXmlEncode(this.getExecutionParameters())+""+this.envParams["reportPrompts"]+""; } return _b08; }; CCognosViewer.prototype.raisePromptEvent=function(_b09,_b0a,_b0b){ try{ var _b0c=this.getViewerWidget(); _b0c.getWidgetContextManager().raisePromptEvent(_b09,_b0a,_b0a.get("ui.action"),this.getModelPath(),_b0b); } catch(e){ } }; CCognosViewer.prototype.getModelPath=function(){ var _b0d=this.getSelectionController().getModelPathForCurrentSelection(); if(_b0d){ return _b0d; }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(_b0e){ this._keepFocus=_b0e; }; CCognosViewer.prototype.getKeepFocus=function(){ if(typeof this._keepFocus!="undefined"){ return this._keepFocus; } return false; }; CCognosViewer.prototype.onFocus=function(evt){ var _b10=this.getA11YHelper(); if(_b10){ _b10.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 _b12=this.getStatus(); var _b13=document.getElementById("cvSkipToReport"+this.getId()); if(_b13){ _b13.style.display=_b12=="prompting"?"none":""; } }; CCognosViewer.prototype.updateSkipToNavigationLink=function(_b14){ var _b15=document.getElementById("cvSkipToNavigation"+this.getId()); if(_b15){ _b15.style.display=_b14?"none":""; } }; CCognosViewer.prototype.pageAction=function(_b16){ this.setKeepFocus("CVNavLinks"+this.getId()); var _b17=new ViewerDispatcherEntry(this); _b17.addFormField("ui.action",_b16); if(this.getCurrentlySelectedTab()){ _b17.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",this.getCurrentlySelectedTab()); } this.dispatchRequest(_b17); }; CCognosViewer.prototype.writeNavLink=function(_b18,_b19,_b1a,_b1b){ var _b1c=""; if(_b1a){ _b1c=""+"\"\""+""+""; if(_b1b){ _b1c+=""; }else{ _b1c=""+"\"\""+""+"LINK_TEXT "; } var sImg=this.sSkin+(!_b1a&&_b18.sImgDisabled?_b18.sImgDisabled:_b18.sImg); return _b1c.replace(/LINK_REQUEST/g,_b19).replace(/LINK_TEXT/g,_b18.sText).replace(/LINK_IMG/g,sImg); }; CCognosViewer.prototype.loadNavLinks=function(){ var _b1e=window.gScriptLoader.loadFile(this.getGateway(),"b_action=xts.run&m=portal/report-viewer-navlinks.xts"); if(_b1e){ this.init(eval("("+_b1e+")")); } }; CCognosViewer.prototype.writeNavLinks=function(sSR,_b20){ var _b21=document.getElementById("CVNavLinks"+this.getId()); if(_b21){ var _b22=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)){ _b21.style.display="none"; if(_b22){ _b22.style.display="none"; } this.updateSkipToNavigationLink(true); return; } this.updateSkipToNavigationLink(false); if(_b22){ _b22.style.display=""; } _b21.style.display=(isIE()?"block":"table-cell"); var _b23=""; _b23+=""; _b23+=this.writeNavLink(this.oNavLinks.oFirst,"firstPage",sSR.match(/\bfirstPage\b/gi),_b20); _b23+=this.writeNavLink(this.oNavLinks.oPrevious,"previousPage",sSR.match(/\bpreviousPage\b/gi),_b20); _b23+=this.writeNavLink(this.oNavLinks.oNext,"nextPage",sSR.match(/\bnextPage\b/gi),_b20); _b23+=this.writeNavLink(this.oNavLinks.oLast,"lastPage",sSR.match(/\blastPage\b/gi),_b20); _b23+="
"; var _b24=document.getElementById("CVNavLinks_label"+this.getId()); var _b25=""; if(_b24){ _b25+=""+_b24.innerHTML+""; } _b21.innerHTML=_b25+_b23; }else{ if(this.shouldWriteNavLinks()){ setTimeout(getCognosViewerObjectRefAsString(this.getId())+".writeNavLinks(\""+sSR+"\",\""+_b20+"\");",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 _b29=this.getActiveRequest(); if(_b29){ _b29.abortHttpRequest(); } }; CCognosViewer.prototype.canCancel=function(){ var _b2a=this.getTracking(); var _b2b=this.getStatus(); return _b2a!=""&&_b2b!="complete"; }; CCognosViewer.prototype.cancel=function(_b2c){ if(this.getWorkingDialog()&&this.getWorkingDialog().disableCancelButton){ this.getWorkingDialog().disableCancelButton(_b2c); } this.removeTransparentBackgroundLayer(); this.clearPrompts(); if(this.m_viewerFragment&&this.envParams["fragment.fireEventWhenComplete"]){ this.envParams["fragment.fireEventWhenComplete"]=""; } var _b2d=null; if(this.m_undoStack.length>0){ _b2d=this.m_undoStack.pop(); } var _b2e=this.getActiveRequest(); if(this.canCancel()===true||_b2e){ if(_b2e){ _b2e.cancelRequest(true); }else{ var _b2f=null; var _b30=_b2d!=null&&_b2d.m_bRefreshPage; if(typeof this.getCancelDispatcherEntry=="function"){ _b2f=this.getCancelDispatcherEntry(); }else{ if(_b30||this.m_viewerFragment){ _b2f=new ViewerDispatcherEntry(this); }else{ if(this.getId()=="RS"){ _b2f=new ViewerDispatcherEntry(this); _b2f.addFormField("cv.responseFormat","rs"); }else{ _b2f=new DispatcherEntry(this); _b2f.addFormField("cv.responseFormat","successfulRequest"); } } } _b2f.forceSynchronous(); _b2f.addFormField("ui.action","cancel"); _b2f.addFormField("m_tracking",this.getTracking()); this.setTracking(""); if(_b30){ var _b31=""; _b31+=_b2d.m_sConversation; _b31+=""; _b2f.addFormField("cv.previousSession",_b31); } this.dispatchRequest(_b2f); if(!this.isBux&&!this.m_viewerFragment&&(this.getUsePageRequest()||!this.isReportRenderingDone())){ this.executeCallback("cancel"); } } this.setStatus("complete"); var _b32=this.envParams["ui.action"]; var _b33=this.getUsePageRequest(); var _b34=this.m_undoStack.length; if(_b2d!=null){ this.m_sConversation=_b2d.m_sConversation; this.m_sParameters=_b2d.m_sParameters; this.envParams={}; applyJSONProperties(this.envParams,_b2d.m_envParams); this.m_undoStack.push(_b2d); } this.setTracking(""); if(this.previouslySelectedTab){ this.cancelTabSwitch(); }else{ if(_b32!="view"&&_b34<=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 _b35=this.preProcessControlArray.length; var k=0; for(k=0;k<_b35;k++){ var _b37=eval(this.preProcessControlArray[k]); if(_b37){ if(_b37.clearSubmit){ _b37.clearSubmit(); } } } } }; CCognosViewer.prototype.wait=function(){ if(this.isWorking()){ this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING); var _b38=new ViewerDispatcherEntry(this); _b38.addFormField("ui.action","wait"); _b38.addFormField("ui.primaryAction",this.envParams["ui.primaryAction"]); _b38.addFormField("cv.actionState",this.envParams["cv.actionState"]); _b38.addNonEmptyStringFormField("bux",this.envParams["bux"]); _b38.addNonEmptyStringFormField("ui.preserveRapTags",this.envParams["ui.preserveRapTags"]); this.dispatchRequest(_b38); return true; } return false; }; CCognosViewer.prototype.setCAFContext=function(_b39){ this.m_sCAFContext=_b39; }; CCognosViewer.prototype.setContextInfo=function(sXML){ this.m_sContextInfoXML=sXML; }; CCognosViewer.prototype.setConversation=function(_b3b){ this.m_sConversation=_b3b; }; CCognosViewer.prototype.setActionState=function(_b3c){ this.m_sActionState=_b3c; }; CCognosViewer.prototype.setStatus=function(_b3d){ this.m_sStatus=_b3d; }; CCognosViewer.prototype.setDebug=function(_b3e){ this.m_bDebug=_b3e; }; CCognosViewer.prototype.setExecutionParameters=function(_b3f){ this.m_sParameters=_b3f; }; CCognosViewer.prototype.setMetadataInfo=function(sXML){ this.m_sMetadataInfoXML=sXML; }; CCognosViewer.prototype.setSecondaryRequests=function(_b41){ if(_b41){ this.m_aSecRequests=_b41; }else{ this.m_aSecRequests=[]; } }; CCognosViewer.prototype.setTracking=function(_b42){ this.m_sTracking=_b42; }; CCognosViewer.prototype.setSoapFault=function(_b43){ this.m_sSoapFault=_b43; }; CCognosViewer.prototype.showOutputInNewWindow=function(sURL){ var _b45=document.getElementById("formWarpRequest"+this.getId()); var _b46=_b45.elements["ui.postBack"]; var _b47=_b45.elements["ui.backURL"]; if(this.isAccessibleMode()&&this.envParams["run.outputFormat"]=="PDF"&&window.detachLeavingRV){ window.detachLeavingRV(); } if(window.opener||_b46||(_b47&&_b47.value!=="javascript:window.close();")){ window.open(sURL,"",""); this.updateNewBrowserWindow(); }else{ window.location=sURL; } }; CCognosViewer.prototype.hideToolbar=function(_b48){ this.m_bHideToolbar=_b48; }; CCognosViewer.prototype.showExcel=function(sURL){ var _b4a=true; var _b4b=document.getElementById("formWarpRequest"+this.getId()); var _b4c=_b4b.elements["ui.backURL"]; if(_b4c&&_b4c.value.indexOf("javascript:window.close()")!==0&&_b4c.value.indexOf("close.html")===-1){ _b4a=false; } if(window.detachLeavingRV){ window.detachLeavingRV(); } var _b4d=window; if(window.opener&&(isIE()||isFF())&&_b4a){ _b4d=window.opener?window.opener:window; }else{ if(!window.opener&&_b4a){ window.location=sURL; return; } } var _b4e=null; var _b4f=""; try{ if(this.envParams["cv.excelWindowOpenProperties"]){ _b4f=this.envParams["cv.excelWindowOpenProperties"]; } _b4e=_b4d.open(sURL,"",_b4f); } catch(e){ _b4d=window; _b4e=_b4d.open(sURL,"",_b4f); } if(!_b4e||_b4e.closed||typeof _b4e.closed=="undefined"){ alert(RV_RES.RV_BROWSER_POPUP_IS_ENABLED); } this.updateNewBrowserWindow(); }; CCognosViewer.prototype.updateNewBrowserWindow=function(){ var id=this.getId(); var _b51=document.forms["formWarpRequest"+id].elements["ui.postBack"]; var _b52=document.forms["formWarpRequest"+id].elements["ui.backURL"]; if(_b51&&_b51.value){ setTimeout(getCognosViewerObjectRefAsString(id)+".getRV().doPostBack();",100); }else{ if(_b52&&_b52.value){ if(_b52.value.length<2048){ setTimeout("location.replace(\""+_b52.value+"\");",100); }else{ _b52=decodeURIComponent(_b52.value); var _b53=_b52.split("?"); var _b54=document.createElement("form"); _b54.style.display="none"; _b54.setAttribute("target","_self"); _b54.setAttribute("method","post"); _b54.setAttribute("action",_b53[0]); var _b55=_b53[1].split("&"); for(var _b56=0;_b56<_b55.length;_b56++){ var _b57=_b55[_b56].indexOf("="); var _b58=_b55[_b56].substr(0,_b57); var _b59=_b55[_b56].substr(_b57+1); var _b5a=document.createElement("img"); _b5a.setAttribute("type","hidden"); _b5a.setAttribute("name",decodeURIComponent(_b58)); _b5a.setAttribute("value",decodeURIComponent(_b59)); _b54.appendChild(_b5a); } document.body.appendChild(_b54); _b54.submit(); } }else{ window.close(); } } }; CCognosViewer.prototype.showWaitPage=function(){ }; CCognosViewer.prototype.sendRequest=function(_b5b){ var _b5c=new ViewerDispatcherEntry(this); _b5c.addFormField("ui.action",_b5b.getAction()); if(_b5b.getCallback()!=null){ _b5c.setCallbacks({"complete":{"object":null,"method":_b5b.getCallback()}}); } var _b5d=_b5b.getFormFields().keys(); for(var _b5e=0;_b5e<_b5d.length;_b5e++){ _b5c.addFormField(_b5d[_b5e],_b5b.getFormFields().get(_b5d[_b5e])); } var _b5f=_b5b.m_oOptions.keys(); for(var _b60=0;_b60<_b5f.length;_b60++){ _b5c.addFormField(_b5f[_b60],_b5b.getOption(_b5f[_b60])); } var _b61=_b5b.m_oParams.keys(); for(var _b62=0;_b62<_b61.length;_b62++){ _b5c.addFormField(_b61[_b62],_b5b.getParameter(_b61[_b62])); } this.dispatchRequest(_b5c); }; CCognosViewer.prototype.promptAction=function(_b63,sUrl){ this.setKeepFocus(true); if(typeof datePickerObserverNotify=="function"){ datePickerObserverNotify(); } var _b65=this.getViewerWidget(); if(_b63=="cancel"){ this.cancelPrompt(sUrl); if(_b65){ if(!this.isReportRenderingDone()){ var _b66={action:"deleteWidget"}; _b65.fireEvent("com.ibm.bux.widget.action",null,_b66); } } }else{ var oReq=new ViewerDispatcherEntry(this); oReq.addFormField("ui.action",_b63=="back"?"back":"forward"); if(_b63=="finish"){ oReq.addFormField("run.prompt",false); }else{ if(_b63=="back"||_b63=="next"){ oReq.addFormField("run.prompt",true); } } if(_b63=="reprompt"){ if(typeof repromptObserverNotify=="function"){ repromptObserverNotify(this); } oReq.addFormField("_promptControl",_b63); }else{ oReq.addFormField("_promptControl","prompt"); } if(_b65){ _b65.fireEvent("com.ibm.bux.widget.modified",null,{"modified":true}); if(_b65.isSelectionFilterEnabled){ _b65.clearSelectionFilter(); } } this.submitPromptValues(oReq); } }; CCognosViewer.prototype.cancelPrompt=function(sUrl){ this.cancel(); }; CCognosViewer.prototype.notify=function(_b69,_b6a){ var _b6b=0,k=0; var _b6d=null; if(this.rangeObserverArray&&this.rangeObserverArray instanceof Array){ _b6b=this.rangeObserverArray.length; for(k=0;k<_b6b;k++){ _b6d=eval(this.rangeObserverArray[k]); if(_b6d&&typeof _b6d=="object"&&typeof _b6d.update=="function"){ _b6d.update(); } } } var _b6e=true; if(this.preProcessControlArray&&this.preProcessControlArray instanceof Array){ _b6b=this.preProcessControlArray.length; for(k=0;k<_b6b;k++){ _b6d=eval(this.preProcessControlArray[k]); if((typeof _b6d.getValid=="function")&&!_b6d.getValid()){ _b6e=false; break; } } } this.notifyPageNavEnabled(_b6e); if(this.multipleObserverArray&&this.multipleObserverArray instanceof Array){ _b6b=this.multipleObserverArray.length; for(k=0;k<_b6b;k++){ _b6d=eval(this.multipleObserverArray[k]); if(_b6d&&typeof _b6d=="object"&&typeof _b6d.checkInsertRemove=="function"){ _b6d.checkInsertRemove(); } } } for(var _b6f=0;_b6f0){ portletSharePrompt(_b98); } } this.dispatchRequest(oReq); }; CCognosViewer.prototype.portletPromptParams=function(oReq){ var _b9a=[]; var _b9b=null; var _b9c=true; var _b9d=oReq.getFormFields().keys(); for(var _b9e=0;_b9e<_b9d.length;_b9e++){ _b9b=_b9d[_b9e]; if(_b9b=="_promptControl"&&oReq.getFormField(_b9b)=="search"){ _b9c=false; break; }else{ if(_b9b.indexOf("p_")===0){ if(_b9b.indexOf("p_credential")===0){ _b9c=false; break; }else{ _b9a.push([_b9b,oReq.getFormField(_b9b)]); } } } } if(_b9a&&!_b9c){ _b9a=[]; } return _b9a; }; CCognosViewer.prototype.preparePromptValues=function(oReq){ var _ba0=[]; if(this.preProcessControlArray){ var _ba1=this.preProcessControlArray.length; var k=0; for(k=0;k<_ba1;k++){ var _ba3=eval(this.preProcessControlArray[k]); var _ba4=(typeof _ba3.isEnabled=="function"?_ba3.isEnabled():true); if(_ba3&&typeof _ba3.preProcess=="function"&&_ba4){ _ba3.preProcess(); if(_ba3.m_oSubmit){ if(oReq.addParameter){ oReq.addParameter(_ba3.m_oSubmit.name,_ba3.m_oSubmit.value); }else{ oReq.addFormField(_ba3.m_oSubmit.name,_ba3.m_oSubmit.value); } _ba0.push(_ba3.m_oSubmit); if(_ba3.m_sPromptId&&_ba3.m_oForm&&_ba3.m_oForm.elements&&typeof _ba3.m_oForm.elements["p_"+_ba3.m_sRef]=="object"){ if(oReq.addParameter){ oReq.addParameter("p_"+_ba3.m_sPromptId,_ba3.m_oForm.elements["p_"+_ba3.m_sRef].value); }else{ oReq.addFormField("p_"+_ba3.m_sPromptId,_ba3.m_oForm.elements["p_"+_ba3.m_sRef].value); } } } } } } var _ba5=document.getElementById("formWarpRequest"+this.getId()); if(_ba5){ var _ba6=_ba5.elements; for(var _ba7=0;_ba7<_ba6.length;_ba7++){ var _ba8=_ba6[_ba7]; if(!_ba8.name||!_ba8.name.match(/^p_/)){ continue; } var _ba9=true; for(var _baa=0;_baa<_ba0.length;_baa++){ if(_ba0[_baa]==_ba8){ _ba9=false; break; } } if(_ba9){ oReq.addFormField(_ba8.name,_ba8.value); _ba0.push(_ba8); } } } var oRM=this["CognosReport"]; if(oRM){ var _bac=oRM.prompt.getParameters(); for(var i=0;i<_bac.length;i++){ var _bae="p_"+_bac[i].getName(); if(!oReq.getFormField(_bae)){ oReq.addFormField(_bae,_bac[i].getXML()); } } } return oReq; }; CCognosViewer.prototype.setViewerWidget=function(_baf){ this.m_viewerWidget=_baf; }; CCognosViewer.prototype.getViewerWidget=function(){ return this.m_viewerWidget; }; CCognosViewer.prototype.getFlashChartOption=function(){ var _bb0=this.getViewerWidget(); var _bb1=null; if(_bb0){ var _bb2=_bb0.getProperties(); if(_bb2){ _bb1=_bb2.getFlashCharts(); } } return _bb1; }; CCognosViewer.prototype.fireWidgetEvent=function(evt,_bb4){ var _bb5=this.getViewerWidget(); if(_bb5!=null){ _bb5.fireEvent(evt,null,_bb4); } }; CCognosViewer.prototype.isMobile=function(){ return false; }; CCognosViewer.prototype.setVisibleDialog=function(_bb6){ this.m_visibleDialog=_bb6; }; CCognosViewer.prototype.getVisibleDialog=function(){ if(typeof this.m_visibleDialog!="undefined"){ return this.m_visibleDialog; } return null; }; CCognosViewer.prototype.getContentLocale=function(){ var _bb7=document.getElementById("formWarpRequest"+this.getId()); if(_bb7&&_bb7["ui.contentLocale"]&&_bb7["reRunObj"]&&_bb7["reRunObj"].value.length>0){ return _bb7["ui.contentLocale"].value; } return null; }; CCognosViewer.prototype.updateLayout=function(_bb8){ var cvid=this.getId(); var _bba=document.getElementById("CVHeader"+cvid); var _bbb=document.getElementById("CVToolbar"+cvid); if(!_bba&&!_bbb){ setTimeout(getCognosViewerObjectRefAsString(cvid)+".updateLayout(\""+_bb8+"\");",100); return; } if(_bba){ var _bbc=this.getUIConfig()&&!this.getUIConfig().getShowBanner(); if((_bb8=="prompting"&&!this.bShowHeaderWithPrompts)||_bbc){ _bba.parentNode.style.display="none"; }else{ _bba.parentNode.style.display=""; } } if(_bbb){ if(_bb8=="prompting"||this.m_bHideToolbar==true){ _bbb.parentNode.style.display="none"; }else{ _bbb.parentNode.style.display=""; } } }; CCognosViewer.prototype.updateResponseSpecification=function(_bbd){ this.sResponseSpecification=_bbd; }; CCognosViewer.prototype.getResponseSpecification=function(){ return this.sResponseSpecification; }; CCognosViewer.prototype.release=function(_bbe){ if(this.getStatus()!="fault"){ this._release(_bbe); } }; CCognosViewer.prototype._release=function(_bbf){ var form=document.getElementById("formWarpRequest"+this.getId()); var _bc1=this.getTracking(); if(!_bc1&&form&&form["m_tracking"]&&form["m_tracking"].value){ _bc1=form["m_tracking"].value; form["m_tracking"].value=""; } this.setTracking(""); if(_bc1){ var _bc2=new DispatcherEntry(this); if(this.isWorkingOrPrompting()){ _bc2.addFormField("ui.action","cancel"); }else{ _bc2.addFormField("ui.action","release"); } _bc2.addFormField("cv.responseFormat","successfulRequest"); _bc2.addNonEmptyStringFormField("ui.primaryAction",this.envParams["ui.primaryAction"]); _bc2.addNonEmptyStringFormField("ui.objectClass",this.envParams["ui.objectClass"]); _bc2.addFormField("m_tracking",_bc1); if(_bbf!=true){ _bc2.forceSynchronous(); } var _bc3=this.getActiveRequest()?this.getActiveRequest():this.getFaultDispatcherEntry(); if(_bc3&&_bc3.getFormField("cv.outputKey")){ _bc2.addFormField("b_action","cvx.high"); _bc2.addFormField("cv.outputKey",_bc3.getFormField("cv.outputKey")); _bc2.addFormField("cv.waitForResponse","false"); _bc2.setHeaders(_bc3.getHeaders()); } var _bc4=_bc2.getRequest().getFormFields(); var _bc5=_bc4.keys(); var data=new URLSearchParams(); for(var _bc7=0;_bc7<_bc5.length;_bc7++){ data.append(_bc5[_bc7],_bc4.get(_bc5[_bc7])); } 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(_bc8){ this.release(_bc8); if(!this.m_destroyed){ if(typeof window.gaRV_INSTANCES!="undefined"){ for(var _bc9=0;_bc9=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 _bee=this.getRAPReportInfo(); if(_bee){ var _bef=_bee.getDisplayTypes(); return _bef.match("_v2")!=null||_bef.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(_bf0){ this.m_RAPReportInfo=_bf0; }; 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 _bf3=oDiv.style.display; oDiv.style.display="none"; oDiv.style.display=_bf3; }; CCognosViewer.prototype.isMetadataEmpty=function(){ var oSC=this.getSelectionController(); if(oSC){ var _bf5=oSC.getCCDManager(); if(_bf5){ return _bf5.isMetadataEmpty(); } } return true; }; CCognosViewer.prototype.setContextMenu=function(_bf6){ this.m_contextMenu=_bf6; }; CCognosViewer.prototype.getContextMenu=function(){ return this.m_contextMenu; }; CCognosViewer.prototype.setToolbar=function(_bf7){ this.m_toolbar=_bf7; }; CCognosViewer.prototype.getToolbar=function(){ return this.m_toolbar; }; CCognosViewer.prototype.getAdvancedServerProperty=function(_bf8){ if(this.m_advancedProperties&&this.m_advancedProperties[_bf8]!==undefined&&this.m_advancedProperties[_bf8]!==null){ return this.m_advancedProperties[_bf8]; }else{ return null; } }; CCognosViewer.prototype.hasPrompt=function(){ if(typeof this.m_bHasPrompt==="undefined"||this.m_bHasPrompt===null){ var _bf9=false; if(this.getAdvancedServerProperty("VIEWER_JS_PROMPT_AGAIN_SHOW_ALWAYS")==="true"||(this.envParams.reportPrompts&&this.envParams.reportPrompts.length>0)){ _bf9=true; }else{ var _bfa=new CParameterValues(); var _bfb=XMLBuilderLoadXMLFromString(this.getExecutionParameters()); if(_bfb.childNodes.length==1){ _bfa.loadWithOptions(_bfb.childNodes[0],true); var _bfc=_bfa.length(); for(var _bfd=0;_bfd<_bfc;++_bfd){ var _bfe=_bfa.getAt(_bfd); if(_bfe!==null&&_bfe.length()>0&&_bfe.name().indexOf("credential:")!=-1){ _bf9=true; break; } } } } this.m_bHasPrompt=_bf9; } 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,_c00){ if(this.getViewerWidget()){ this.getViewerWidget().broadcastContextChange(_c00); } stopEventBubble(evt); }; CCognosViewer.prototype.broadcastParameterChange=function(evt,_c02){ if(this.getViewerWidget()){ this.getViewerWidget().broadcastParameterChange(_c02); } 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,_c04){ this.m_sId=sId; this.m_sText=""; this.m_sScript=_c04; }; 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 _c05=/document\.write(ln)?\s*\(/gi; var _c06=this.m_sScript.replace(_c05,"this.write(").replace(window.gScriptLoader.m_reScriptTagOpen,"").replace(window.gScriptLoader.m_reScriptTagClose,""); try{ eval(_c06); var _c07=document.getElementById(this.m_sId); if(_c07){ _c07.innerHTML=this.m_sText; return true; } } catch(e){ } } return false; }; CDocumentWriter.prototype.write=function(_c08){ var _c09=""; if(typeof _c08=="function"){ _c09=eval(_c08); }else{ if(typeof _c08=="string"){ _c09=_c08; } } this.m_sText+=_c09; }; function setFocusToFirstTabItem(_c0a){ if(!window.dojo){ return; } var _c0b=dojo.query("*",_c0a); var _c0c=_c0b.length; for(var i=0;i<_c0c;i++){ var node=_c0b[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(_c0f){ this.m_oCDManager=_c0f; }; 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 _c11=sCtx.split("::"); var _c12=[]; for(var i=0;i<_c11.length;++i){ _c12[i]=_c11[i].split(":"); } if(_c12&&_c12.length&&_c12[0].length){ return _c12; }else{ return null; } }; ReportContextHelper.prototype.getDataItemName=function(sCtx){ var _c15=this.processCtx(sCtx); if(_c15){ return this.getRefDataItem(_c15[0][0]); } return null; }; ReportContextHelper.prototype.getRefDataItem=function(_c16){ var _c17=this.m_oCDManager.GetRDIValue(_c16); return (_c17==null)?"":_c17; }; ReportContextHelper.prototype.getMun=function(_c18){ var aCtx=null; if(typeof _c18==="string"){ aCtx=this.processCtx(_c18); }else{ if(typeof _c18==="number"){ aCtx=this.processCtx(_c18.toString()); }else{ aCtx=_c18; } } if(aCtx){ var sMun=this.m_oCDManager.GetMUN(aCtx[0][0]); return (sMun==null)?"":sMun; } return ""; }; function ViewerConfig(){ this.uiConfig=new ViewerUIConfig(); this.findConfig=typeof ViewerFindActionConfig=="function"?new ViewerFindActionConfig():null; this.httpRequestConfig=typeof ViewerHttpRequestConfig=="function"?new ViewerHttpRequestConfig():null; this.eventsConfig=typeof ViewerEventsConfig=="function"?new ViewerEventsConfig():null; }; ViewerConfig.prototype.configure=function(_c1b){ if(!_c1b){ return; } if(_c1b.findAction&&this.findConfig){ this.findConfig.configure(_c1b.findAction); } if(_c1b.UI){ this.uiConfig.configure(_c1b.UI); } if(_c1b.httpRequestCallbacks&&this.httpRequestConfig){ this.httpRequestConfig.configure(_c1b.httpRequestCallbacks); } if(_c1b.events&&this.eventsConfig){ this.eventsConfig.configure(_c1b.events); } }; ViewerConfig.prototype.getUIConfig=function(){ return this.uiConfig; }; ViewerConfig.prototype.getFindActionConfig=function(){ return this.findConfig; }; ViewerConfig.prototype.getHttpRequestConfig=function(){ return this.httpRequestConfig; }; ViewerConfig.prototype.getEventsConfig=function(){ return this.eventsConfig; }; function ViewerUIConfig(){ this.showBanner=true; this.showToolbar=true; this.showContextMenu=true; this.showPageNavigation=true; this.primarySelectionColor=null; this.secondarySelectionColor=null; this.showSecondarySelection=true; }; ViewerUIConfig.prototype.configure=function(_c1c){ applyJSONProperties(this,_c1c); }; ViewerUIConfig.prototype.getShowBanner=function(){ return this.showBanner; }; ViewerUIConfig.prototype.getShowToolbar=function(){ return this.showToolbar; }; ViewerUIConfig.prototype.getShowContextMenu=function(){ return this.showContextMenu; }; ViewerUIConfig.prototype.getShowPageNavigation=function(){ return this.showPageNavigation; }; ViewerUIConfig.prototype.getPrimarySelectionColor=function(){ return this.primarySelectionColor; }; ViewerUIConfig.prototype.getSeondarySelectionColor=function(){ return this.secondarySelectionColor; }; ViewerUIConfig.prototype.getShowSecondarySelection=function(){ return this.showSecondarySelection; }; function ViewerHttpRequestConfig(){ this.reportStatus={}; this.UI={}; }; ViewerHttpRequestConfig.prototype.configure=function(_c1d){ applyJSONProperties(this,_c1d); }; ViewerHttpRequestConfig.prototype.getRequestIndicator=function(){ if(this.UI){ return this.UI.requestIndicator?this.UI.requestIndicator:null; } }; ViewerHttpRequestConfig.prototype.getWorkingDialog=function(){ if(this.UI){ return this.UI.workingDialog?this.UI.workingDialog:null; } }; ViewerHttpRequestConfig.prototype.getReportStatusCallback=function(_c1e){ if(this.reportStatus){ var _c1f=this.reportStatus[_c1e]; if(_c1f){ return _c1f; } if(_c1e=="complete"&&this.reportStatus["initialComplete"]){ var _c20=this.reportStatus["initialComplete"]; this.reportStatus["initialComplete"]=null; return _c20; } } return null; }; function ViewerEventsConfig(){ this.showContextMenuOnClick=false; }; ViewerEventsConfig.prototype.configure=function(_c21){ applyJSONProperties(this,_c21); }; ViewerEventsConfig.prototype.getShowContextMenuOnClick=function(){ return this.showContextMenuOnClick; }; function ViewerState(){ this.findState=null; this.pageState=null; }; ViewerState.prototype.setFindState=function(_c22){ if(typeof ViewerFindState!="function"){ return; } if(!this.findState){ this.findState=new ViewerFindState(); } this.findState.setState(_c22); }; ViewerState.prototype.clearFindState=function(){ this.findState=null; }; ViewerState.prototype.getFindState=function(){ return this.findState; }; ViewerState.prototype.setPageState=function(_c23){ if(typeof ViewerPageState!="function"){ return; } if(!this.pageState){ this.pageState=new ViewerPageState(); } this.pageState.setState(_c23); }; ViewerState.prototype.clearPageState=function(){ this.pageState=null; }; ViewerState.prototype.getPageState=function(){ return this.pageState; }; 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 _c2b={}; applyJSONProperties(_c2b,this.m_md); return _c2b; }; CCDManager.prototype.getClonedContextdataArray=function(){ var _c2c={}; applyJSONProperties(_c2c,this.m_cd); return _c2c; }; CCDManager.prototype.SetCognosViewer=function(_c2d){ if(_c2d){ this.m_oCV=_c2d; } }; CCDManager.prototype.onComplete_GetCDRequest=function(_c2e,_c2f){ if(_c2e){ var _c30=_c2e.getResult(); var _c31=XMLBuilderLoadXMLFromString(_c30); if(_c31){ var _c32=_c31.getElementsByTagName("Block"); for(var i=0;i<_c32.length;i++){ var _c34=""; var _c35=_c32[i].firstChild; while(_c35){ _c34+=_c35.nodeValue; _c35=_c35.nextSibling; } var cd=eval("("+_c34+")"); this.AddContextData(cd); } } } if(_c2f&&typeof _c2f=="function"){ _c2f(); } }; CCDManager.prototype.FetchContextData=function(_c37,_c38){ var _c39=[]; var c=null,_c3b=_c37.length; for(var i=0;i<_c3b;++i){ c=_c37[i]; if(c!=""&&!this.ContextIdExists(c)){ _c39.push(c); } } if(_c39.length){ if(this.m_oCV){ this.getContextData(_c39,_c38); } } return _c39.length; }; CCDManager.prototype.getContextData=function(_c3d,_c3e){ var oCV=this.m_oCV; var _c40=new AsynchDataDispatcherEntry(oCV); _c40.setCanBeQueued(false); if(!oCV.isBux){ _c40.forceSynchronous(); } var form=document["formWarpRequest"+oCV.getId()]; var _c42=oCV.getConversation(); var _c43=oCV.getTracking(); if(!_c43&&form&&form["m_tracking"]&&form["m_tracking"].value){ _c43=form["m_tracking"].value; } if(oCV.m_viewerFragment){ var _c44=oCV.getActiveRequest(); if(_c44&&_c44.getFormField("m_tracking")==_c43){ return; } } var _c45={customArguments:[_c3e],"complete":{"object":this,"method":this.onComplete_GetCDRequest}}; if(oCV.getStatus()=="prompting"){ _c45["prompting"]={"object":this,"method":this.onComplete_GetCDRequest}; } _c40.setCallbacks(_c45); if(_c42&&oCV.envParams["ui.action"]!="view"){ _c40.addFormField("ui.action","getContext"); _c40.addFormField("ui.conversation",_c42); }else{ var _c46=form["ui.object"]; if(typeof _c46.length!="undefined"&&_c46.length>1){ _c40.addFormField("ui.object",form["ui.object"][0].value); }else{ _c40.addFormField("ui.object",form["ui.object"].value); } _c40.addFormField("ui.action","getObjectContext"); } _c40.addFormField("cv.responseFormat","asynchDetailContext"); _c40.addFormField("context.format","initializer"); _c40.addFormField("context.type","reportService"); _c40.addFormField("context.selection",_c3d.join(",")); _c40.addNonEmptyStringFormField("m_tracking",_c43); oCV.dispatchRequest(_c40); }; CCDManager.prototype.ContextIdExists=function(_c47){ return (this.m_cd&&this.m_cd[_c47]?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(_c48,_c49,_c4a){ var p=null; this.FetchContextData([_c48]); var cd=this.m_cd&&this.m_cd[_c48]; if(cd){ var md=this.m_md[cd[_c49]]; if(md){ p=md[_c4a]; } } return p; }; CCDManager.prototype.GetDrillFlag=function(_c4e){ return this._getMDPropertyFromCD(_c4e,"r","drill"); }; CCDManager.prototype.getModelPathFromBookletItem=function(_c4f){ var mp=null; var md=this.m_md[_c4f]; 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(_c52){ var p=null; var md=this.m_md[_c52]; if(md){ p=md.modelBasedDrillThru; } return p?p:0; }; CCDManager.prototype.GetDrillFlagForMember=function(_c55){ var _c56=null; var d=this._getMDPropertyFromCD(_c55,"r","drill"); if(d!==null&&this.m_cd[_c55].m){ _c56=d; } return _c56; }; CCDManager.prototype.GetDataType=function(_c58){ return this._getMDPropertyFromCD(_c58,"r","dtype"); }; CCDManager.prototype.GetUsage=function(_c59){ return this._getMDPropertyFromCD(_c59,"r","usage"); }; CCDManager.prototype.GetHUN=function(_c5a){ var hun=this._getMDPropertyFromCD(_c5a,"h","h"); if(!hun){ var h=this._getMDPropertyFromCD(_c5a,"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(_c5d){ var qry=null; var q=this._getMDPropertyFromCD(_c5d,"r","q"); if(q){ qry=this.m_md[q].q; } return qry; }; CCDManager.prototype.GetDepth=function(_c60){ return this._getMDPropertyFromCD(_c60,"r","level"); }; CCDManager.prototype.GetDisplayValue=function(_c61){ var _c62=null; this.FetchContextData([_c61]); if(this.ContextIdExists(_c61)&&this.m_cd[_c61]){ _c62=this.m_cd[_c61].u; } return _c62; }; CCDManager.prototype.GetPUN=function(_c63){ return this._getMDPropertyFromCD(_c63,"p","p"); }; CCDManager.prototype.GetLUN=function(_c64){ return this._getMDPropertyFromCD(_c64,"l","l"); }; CCDManager.prototype.GetMUN=function(_c65){ return this._getMDPropertyFromCD(_c65,"m","m"); }; CCDManager.prototype.GetDUN=function(_c66){ return this._getMDPropertyFromCD(_c66,"d","d"); }; CCDManager.prototype.GetQMID=function(_c67){ return this._getMDPropertyFromCD(_c67,"i","i"); }; CCDManager.prototype.GetRDIValue=function(_c68){ return this._getMDPropertyFromCD(_c68,"r","r"); }; CCDManager.prototype.GetBIValue=function(_c69){ return this._getMDPropertyFromCD(_c69,"r","bi"); }; CCDManager.prototype.getContextIdForMetaData=function(lun,hun,_c6c){ var _c6d=[{"expression":lun,"type":"l"},{"expression":hun,"type":"h"}]; for(var _c6e=0;_c6e<_c6d.length;++_c6e){ var _c6f=_c6d[_c6e].expression; var _c70=_c6d[_c6e].type; if(_c6f==""){ continue; } for(var _c71 in this.m_md){ if(this.m_md[_c71][_c70]==_c6f){ for(var _c72 in this.m_md){ if(this.m_md[_c72].r&&this.m_md[_c72][_c70]==_c71){ if(this.m_md[_c72].drill!=0||_c6c==true){ for(var ctx in this.m_cd){ if(this.m_cd[ctx].r==_c72&&this.m_cd[ctx].m){ return ctx; } } } } } } } } return ""; }; CCDManager.prototype.GetContextIdForMUN=function(mun){ var _c75=null; var _c76=null; for(var i in this.m_md){ if(this.m_md[i].m==mun){ _c75=i; break; } } if(_c75!=null){ for(var j in this.m_cd){ if(this.m_cd[j].m==_c75){ _c76=j; break; } } } return _c76; }; CCDManager.prototype.GetContextIdsForRDI=function(rdi){ var _c7a=[]; for(var i in this.m_md){ if(this.m_md[i].r==rdi){ _c7a.push(i); } } return _c7a; }; CCDManager.prototype.getMUNForRDIAndUseValue=function(rdi,_c7d){ var _c7e=this.GetContextIdsForRDI(rdi); for(var i in this.m_cd){ for(var j in _c7e){ if(this.m_cd[i].r==_c7e[j]&&this.m_cd[i].u==_c7d){ var _c81=this.m_cd[i].m; if(_c81){ return this.m_md[_c81].m; } } } } return null; }; CCDManager.prototype.GetPageMinMaxForRDI=function(rdi){ var _c83=null; var _c84=null; var _c85=this.GetContextIdsForRDI(rdi); this.FetchContextData([0]); for(var i in this.m_cd){ for(var j in _c85){ if(this.m_cd[i].r==_c85[j]){ var _c88=parseFloat(this.m_cd[i].u); if(_c88==this.m_cd[i].u){ if(_c83==null||_c88<_c83){ _c83=_c88; } if(_c84==null||_c88>_c84){ _c84=_c88; } } } } } if(_c83!=null&&_c84!=null){ return eval("({ pageMin: "+_c83+", pageMax: "+_c84+"})"); } }; CCDManager.prototype.GetContextIdForDisplayValue=function(_c89){ var _c8a=null; for(var i in this.m_cd){ if(this.m_cd[i].u==_c89){ _c8a=i; break; } } return _c8a; }; CCDManager.prototype.GetContextIdForUseValue=function(_c8c){ var _c8d=null; var _c8e=null; var _c8f=null; for(var i in this.m_md){ var md=this.m_md[i]; for(var j in md){ if(md[j]==_c8c){ _c8d=i; _c8e=j; break; } } } if(_c8d!=null){ for(var k in this.m_cd){ if(this.m_cd[k][_c8e]==_c8d){ _c8f=k; break; } } } return _c8f; }; CCDManager.prototype.getDataItemInfo=function(){ if(this.m_cd){ var _c94={}; this.m_dataItemInfo={}; for(var i in this.m_cd){ var _c96=this.m_cd[i].r; if(typeof _c96!="undefined"){ var _c97=this.m_md[_c96].r; if(this.m_dataItemInfo[_c97]==null){ this.m_dataItemInfo[_c97]=1; }else{ this.m_dataItemInfo[_c97]++; } } } 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(_c98){ if(_c98<=0){ return this.ContextDataToJSON(); } if(this.m_cd){ var _c99={}; var _c9a={}; for(var i in this.m_cd){ var _c9c=this.m_cd[i].r; if(typeof _c9c!="undefined"){ if(_c99[_c9c]==null){ _c99[_c9c]=0; }else{ _c99[_c9c]++; } if(_c99[_c9c]<_c98){ _c9a[i]=this.m_cd[i]; } } } return CViewerCommon.toJSON(_c9a); } return ""; }; CCDManager.prototype.GetHUNForRDI=function(rdi,_c9e){ for(var i in this.m_md){ if(this.m_md[i].r==rdi&&this.m_md[i].q==_c9e){ var _ca0=this.m_md[i].h; if(_ca0){ return this.m_md[_ca0].h; } } } return null; }; CCDManager.prototype.GetMetadataIdForQueryName=function(_ca1){ for(var i in this.m_md){ if(this.m_md[i].q===_ca1){ return i; } } return null; }; CCDManager.prototype._isEmptyObject=function(obj){ for(var _ca4 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(_ca5){ var item=this.m_cd[_ca5]; 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(_ca7){ var item=this.m_cd[_ca7]; 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 _caa=str.split("].["); var _cab=_caa[_caa.length-1]; return _cab.substring(0,_cab.length-1); } return str; }; CCDManager.prototype._replaceNamespaceForSharedTM1DimensionOnly=function(_cac){ var _cad=this._getNamespaceAndDimensionFromUniqueName(_cac); if(_cad&&this.m_md){ for(var _cae in this.m_md){ var sMun=this.m_md[_cae].m; if(sMun&&sMun.length>0){ if(sMun.indexOf("->:[TM].")>0){ var oObj=this._getNamespaceAndDimensionFromUniqueName(sMun); if(oObj.dimension&&oObj.dimension===_cad.dimension&&oObj.namespace!==_cad.namespace){ var _cb1=_cac.indexOf("."); return oObj.namespace+_cac.substr(_cb1,_cac.length); } }else{ var _cb2=sMun.indexOf("->:["); if(_cb2>0){ if(sMun.substr(_cb2+4,4)!=="TM]."){ return _cac; } } } } } } return _cac; }; CCDManager.prototype._getNamespaceAndDimensionFromUniqueName=function(_cb3){ if(_cb3&&_cb3.length>0&&_cb3.indexOf("].[")>0){ var _cb4=_cb3.split("].["); if(_cb4.length>1){ return {"namespace":_cb4[0]+"]","dimension":"["+_cb4[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(_cb5,_cb6,_cb7){ this.queries={}; this.burstContext=_cb5||""; this.expressionLocale=_cb6||""; this.contentLocale=_cb7||""; }; 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 _cb9=sc.getAllSelectedObjects(); for(var s=0;s<_cb9.length;++s){ var _cbb=_cb9[s]; var _cbc=_cbb.getSelectedContextIds(); var muns=_cbb.getMuns(); var _cbe=muns.length; var _cbf=new SC_SingleSelection(); _cbf.layoutElementId=_cbb.getLayoutElementId(); var _cc0=null; for(var i=0;i<_cbe;++i){ var j,_cc3,_cc4; if(i===0&&_cbe===1){ for(j=0;j0){ var _d17=this.CanModifyWatchRule(); for(var sub=0;sub0){ _d1f.add(gMenuSeperator); } if(!this.m_bAllowAnnotations||!this.m_bCanCreateAnnotations){ menu.disable(); } var _d22; var bidi=isViewerBidiEnabled()?BidiUtils.getInstance():null; for(var i=0;i<_d21;i++){ var _d25=this.m_annotations[i].defaultName; _d22=_d25.length>60?_d25.substring(0,60)+"...":_d25; if(isViewerBidiEnabled()){ _d22=bidi.btdInjectUCCIntoStr(_d22,getViewerBaseTextDirection()); } var _d26=Boolean(this.m_annotations[i].permissions.read); var _d27=Boolean(this.m_annotations[i].permissions.write); var _d28=Boolean(this.m_annotations[i].permissions.traverse)&&Boolean(this.m_annotations[i].permissions.write); var _d29="javascript:"+this.m_cv.getObjectId()+".getSubscriptionManager().ViewAnnotation("+i+");"; var _d2a="javascript:alert('Permission denied')"; _d29=_d26?_d29:_d2a; if(i>0&&this.m_annotations[i].layoutElementId!=this.m_annotations[i-1].layoutElementId){ _d1f.add(gMenuSeperator); } var _d2b="/rv/images/action_comment.gif"; if(this.m_annotations[i].layoutElementId!=""){ _d2b="/rv/images/action_subscribe.gif"; } menu=new CMenuItem(_d1f,_d22,_d29,_d1d+_d2b,gMenuItemStyle,_d1d,_d1e); var _d2c=menu.createCascadedMenu(gMenuStyle); var _d2d=new CInfoPanel("300px",_d1d,_d2c.getId()+"_comments"); _d2d.setParent(_d2c); _d25=this.m_annotations[i].defaultName; var _d2e=_d25.length>60?_d25.substring(0,60)+"...":_d25; if(isViewerBidiEnabled()){ _d2e=bidi.btdInjectUCCIntoStr(_d2e,getViewerBaseTextDirection()); } _d2d.addProperty(RV_RES.RV_VIEW_COMMENT_NAME,html_encode(_d2e)); _d2d.addSpacer(4); var cmnt=this.m_annotations[i].description; var _d30=cmnt.length>590?cmnt.substring(0,590)+"...":cmnt; if(isViewerBidiEnabled()){ _d30=bidi.btdInjectUCCIntoStr(_d30,getViewerBaseTextDirection()); } _d2d.addProperty(RV_RES.RV_VIEW_COMMENT_CONTENTS,replaceNewLine(html_encode(_d30))); _d2d.addSpacer(4); var _d31=this.m_annotations[i].modificationTime; if(isViewerBidiEnabled()){ _d31=bidi.btdInjectUCCIntoStr(_d31,getViewerBaseTextDirection()); } _d2d.addProperty(RV_RES.RV_VIEW_COMMENT_MODTIME,_d31); var _d32=this.m_annotations[i].owner.defaultName; if(isViewerBidiEnabled()){ _d32=bidi.btdInjectUCCIntoStr(_d32,getViewerBaseTextDirection()); } _d2d.addProperty(RV_RES.RV_VIEW_COMMENT_OWNER,_d32); _d2c.add(_d2d); if(_d27||_d28){ _d2c.add(gMenuSeperator); } new CMenuItem(_d2c,RV_RES.RV_VIEW_COMMENT,this.m_cv.getObjectId()+".getSubscriptionManager().ViewAnnotation("+i+");",_d1d+"/rv/images/action_comment_view.gif",gMenuItemStyle,_d1d,_d1e); if(_d27){ new CMenuItem(_d2c,RV_RES.RV_MODIFY_WATCH_RULE,this.m_cv.getObjectId()+".getSubscriptionManager().ModifyAnnotation("+i+");",_d1d+"/rv/images/action_comment_modify.gif",gMenuItemStyle,_d1d,_d1e); } if(_d28){ new CMenuItem(_d2c,RV_RES.RV_DELETE_WATCH_RULE,this.m_cv.getObjectId()+".getSubscriptionManager().DeleteAnnotation("+i+");",_d1d+"/rv/images/action_comment_delete.gif",gMenuItemStyle,_d1d,_d1e); } } _d1f.setForceCallback(false); _d1f.draw(); if(_d1f.isVisible()){ _d1f.show(); } _d1f.setForceCallback(true); }; CSubscriptionManager.prototype.AddNotification=function(){ alert(this.m_sAlertNewVersionConfirm); var oCV=this.getViewer(); var _d34=new DataDispatcherEntry(oCV); _d34.setKey("subscriptionManager"); _d34.addFormField("ui.action","addNotification"); _d34.addFormField("cv.responseFormat","data"); this.addCommonFormFields(_d34); oCV.dispatchRequest(_d34); }; CSubscriptionManager.prototype.DeleteNotification=function(){ alert(RV_RES.RV_DO_NOT_ALERT_NEW_VERSION_CONFIRM); var oCV=this.getViewer(); var _d36=new DataDispatcherEntry(oCV); _d36.setKey("subscriptionManager"); _d36.addFormField("ui.action","deleteNotification"); _d36.addFormField("cv.responseFormat","data"); this.addCommonFormFields(_d36); oCV.dispatchRequest(_d36); }; CSubscriptionManager.prototype.NewAnnotation=function(){ var oFWR=document.forms["formWarpRequest"+this.m_cv.getId()]; var _d38=oFWR["ui.object"].value; var form=GUtil.createHiddenForm("subscriptionForm","post",this.m_cv.getId(),CSubscriptionManager.k_SubscriptionWizardName); GUtil.createFormField(form,"ui.object",_d38); GUtil.createFormField(form,"b_action","xts.run"); GUtil.createFormField(form,"m","rv/annotation1.xts"); GUtil.createFormField(form,"backURL","javascript:window.close();"); GUtil.createFormField(form,"action_hint","create"); var _d3a=this.m_cv.getWebContentRoot()+"/rv/blankSubscriptionWin.html?cv.id="+this.m_cv.getId(); window.open(_d3a,form.target,this.m_windowOptions); }; CSubscriptionManager.prototype.ViewAnnotation=function(idx){ var sub=this.m_annotations[idx]; var _d3d=sub.searchPath; var form=GUtil.createHiddenForm("subscriptionForm","post",this.m_cv.getId(),CSubscriptionManager.k_SubscriptionWizardName); GUtil.createFormField(form,"ui.object",_d3d); GUtil.createFormField(form,"b_action","xts.run"); GUtil.createFormField(form,"m","rv/annotation1.xts"); GUtil.createFormField(form,"backURL","javascript:window.close();"); var _d3f=this.m_cv.getWebContentRoot()+"/rv/blankSubscriptionWin.html?cv.id="+this.m_cv.getId(); window.open(_d3f,form.target,this.m_windowOptions); }; CSubscriptionManager.prototype.ModifyAnnotation=function(idx){ var sub=this.m_annotations[idx]; var _d42=this.m_annotations[idx].searchPath; if(sub&&_d42){ var form=GUtil.createHiddenForm("subscriptionForm","post",this.m_cv.getId(),CSubscriptionManager.k_SubscriptionWizardName); GUtil.createFormField(form,"ui.object",_d42); GUtil.createFormField(form,"b_action","xts.run"); GUtil.createFormField(form,"m","rv/annotation1.xts"); GUtil.createFormField(form,"backURL","javascript:window.close();"); GUtil.createFormField(form,"action_hint","save"); var _d44=this.m_cv.getWebContentRoot()+"/rv/blankSubscriptionWin.html?cv.id="+this.m_cv.getId(); window.open(_d44,form.target,this.m_windowOptions); } }; CSubscriptionManager.prototype.DeleteAnnotation=function(idx){ var sub=this.m_annotations[idx]; if(sub&&sub.searchPath&&confirm(RV_RES.RV_CONFIRM_DELETE_WATCH_RULE)){ var oCV=this.getViewer(); var _d48=new DataDispatcherEntry(oCV); _d48.setKey("subscriptionManager"); _d48.addFormField("ui.action","deleteAnnotation"); _d48.addFormField("cv.responseFormat","data"); this.addCommonFormFields(_d48,sub.searchPath); oCV.dispatchRequest(_d48); } }; CSubscriptionManager.prototype.NewSubscription=function(){ var sc=this.m_cv.getSelectionController(); var oFWR=document.forms["formWarpRequest"+this.m_cv.getId()]; var _d4b=oFWR.reRunObj.value; if(_d4b&&sc&&sc.getAllSelectedObjects().length===1){ var form=GUtil.createHiddenForm("subscriptionForm","post",this.m_cv.getId(),CSubscriptionManager.k_SubscriptionWizardName); var fWR=document.getElementById("formWarpRequest"+this.m_cv.getId()); var _d4e=new CSelectionXml(fWR["ui.burstID"].value,fWR["ui.contentLocale"].value,fWR["ui.outputLocale"].value); _d4e.BuildSelectionFromController(sc); GUtil.createFormField(form,"rv.selectionSpecXML",_d4e.toXml()); GUtil.createFormField(form,"rv.periodicalProducer",_d4b); GUtil.createFormField(form,"b_action","xts.run"); GUtil.createFormField(form,"m","subscribe/conditional_subscribe1.xts"); GUtil.createFormField(form,"backURL","javascript:window.close();"); var _d4f=this.m_cv.getWebContentRoot()+"/rv/blankSubscriptionWin.html?cv.id="+this.m_cv.getId(); window.open(_d4f,form.target,"toolbar,location,status,menubar,resizable,scrollbars=1"); }else{ } }; CSubscriptionManager.prototype.DeleteSubscription=function(idx){ var sub=this.m_aWatchRules[idx]; if(sub&&sub.searchPath&&confirm(RV_RES.RV_CONFIRM_DELETE_WATCH_RULE)){ var oCV=this.getViewer(); var _d53=new DataDispatcherEntry(oCV); _d53.setKey("subscriptionManager"); _d53.addFormField("ui.action","deleteSubscription"); _d53.addFormField("cv.responseFormat","data"); this.addCommonFormFields(_d53,sub.searchPath); oCV.dispatchRequest(_d53); } }; CSubscriptionManager.prototype.ModifySubscription=function(idx){ var sub=this.m_aWatchRules[idx]; if(sub&&sub.searchPath){ var form=GUtil.createHiddenForm("subscriptionForm","post",this.m_cv.getId(),CSubscriptionManager.k_SubscriptionWizardName); GUtil.createFormField(form,"m_obj",sub.searchPath); GUtil.createFormField(form,"m_name",sub.name); GUtil.createFormField(form,"b_action","xts.run"); GUtil.createFormField(form,"m_class","reportDataServiceAgentDefinition"); GUtil.createFormField(form,"m","portal/properties_subscription.xts"); GUtil.createFormField(form,"backURL","javascript:window.close();"); var _d57=this.m_cv.getWebContentRoot()+"/rv/blankSubscriptionWin.html?cv.id="+this.m_cv.getId(); window.open(_d57,form.target,"toolbar,location,status,menubar,resizable,scrollbars=1"); } }; CSubscriptionManager.prototype.OpenSubscriptionMenu=function(){ var oCV=this.getViewer(); var _d59=new JSONDispatcherEntry(oCV); _d59.setKey("subscriptionManager"); _d59.addFormField("ui.action","getSubscriptionInfo"); _d59.addFormField("cv.responseFormat","subscriptionManager"); this.addCommonFormFields(_d59); _d59.setCallbacks({"complete":{"object":this,"method":this.OpenSubscriptionMenuResponse}}); oCV.dispatchRequest(_d59); }; CSubscriptionManager.prototype.OpenAnnotationMenu=function(){ var oCV=this.getViewer(); var _d5b=new JSONDispatcherEntry(oCV); _d5b.setKey("subscriptionManager"); _d5b.addFormField("ui.action","getAnnotationInfo"); _d5b.addFormField("cv.responseFormat","getAnnotations"); var _d5c=oCV.envParams["ui.object"]; this.addCommonFormFields(_d5b,_d5c?_d5c:""); _d5b.setCallbacks({"complete":{"object":this,"method":this.OpenAnnotationMenuResponse}}); oCV.dispatchRequest(_d5b); }; CSubscriptionManager.prototype.OpenAnnotationMenuResponse=function(_d5d){ if(this.Initialize(_d5d)){ this.UpdateAnnotationMenu(); }else{ this.ClearAnnotationMenu(); } }; CSubscriptionManager.prototype.OpenSubscriptionMenuResponse=function(_d5e){ if(this.Initialize(_d5e)){ this.UpdateSubscribeMenu(); }else{ this.AddEmptySubscriptionMenuItem(); } }; CSubscriptionManager.prototype.addCommonFormFields=function(_d5f,_d60){ if(_d60&&_d60!=""){ _d5f.addFormField("ui.object",_d60); }else{ var _d61=document["formWarpRequest"+this.getViewer().getId()]; if(_d61&&_d61["reRunObj"]){ _d5f.addFormField("ui.object",_d61["reRunObj"].value); } } if(_d5f.getFormField("ui.action")=="getSubscriptionInfo"){ _d5f.addFormField("initialized",this.m_bInitialized?"true":"false"); } _d5f.addFormField("cv.id",this.getViewer().getId()); }; CSubscriptionManager.prototype.AddEmptySubscriptionMenuItem=function(){ var _d62=this.getStandaloneViewerToolbarControl(); if(_d62){ var _d63=_d62.getItem("watchNewVersions"); if(_d63){ _d63.getMenu().clear(); } var _d64=this.m_cv.getWebContentRoot(); var _d65=this.m_cv.getSkin(); var _d66=_d63.getMenu(); var _d67=new CMenuItem(_d66,RV_RES.RV_NO_WATCH_RULES,"","",gMenuItemStyle,_d64,_d65); _d67.disable(); _d66.setForceCallback(false); _d66.draw(); if(_d66.isVisible()){ _d66.show(); } _d66.setForceCallback(true); } }; CSubscriptionManager.prototype.ClearSubscriptionMenu=function(){ var _d68=this.getStandaloneViewerToolbarControl(); if(_d68){ var _d69=_d68.getItem("watchNewVersions"); if(_d69){ _d69.getMenu().clear(); } } }; CSubscriptionManager.prototype.ClearAnnotationMenu=function(){ var _d6a=this.getStandaloneViewerToolbarControl(); if(_d6a){ var _d6b=_d6a.getItem("addAnnotations"); if(_d6b){ _d6b.getMenu().clear(); } } }; CSubscriptionManager.prototype.ClearContextAnnotationMenu=function(){ var _d6c=this.getStandaloneViewerContextMenu(); if(_d6c){ var _d6d=_d6c.getFindCommentMenuItem(); if(_d6d){ _d6d.getMenu().clear(); } } }; CSubscriptionManager.prototype.getStandaloneViewerToolbarControl=function(){ if(typeof this.m_cv.rvMainWnd!="undefined"&&this.m_cv.rvMainWnd!=null&&typeof this.m_cv.rvMainWnd.getToolbarControl=="function"){ return this.m_cv.rvMainWnd.getToolbarControl(); }else{ return null; } }; CSubscriptionManager.prototype.getStandaloneViewerContextMenu=function(){ if(typeof this.m_cv.rvMainWnd!="undefined"&&this.m_cv.rvMainWnd!=null&&typeof this.m_cv.rvMainWnd.getContextMenu=="function"){ return this.m_cv.rvMainWnd.getContextMenu(); }else{ return null; } }; var GUtil={}; GUtil.createHiddenForm=function(name,_d6f,_d70,_d71){ var form=document.getElementById(name); if(form){ document.body.removeChild(form); } form=document.createElement("form"); form.id=name; form.name=name; form.method=_d6f; form.style.display="none"; form.action=document.forms["formWarpRequest"+_d70].action; form.target=_d71+(new Date()).getTime(); document.body.appendChild(form); return form; }; GUtil.createFormField=function(el,name,_d75){ var _d76=document.createElement("input"); _d76.type="hidden"; _d76.name=name; _d76.value=_d75; el.appendChild(_d76); }; GUtil.generateCallback=function(func,_d78,_d79){ if(func){ var _d7a=_d79||this; _d78=(_d78 instanceof Array)?_d78:[]; return (function(_d7b){ if(typeof _d7b!="undefined"&&_d78.length==0){ _d78.push(_d7b); } return func.apply(_d7a,_d78); }); }else{ return (function(){ }); } }; GUtil.destroyProperties=function(_d7c,_d7d){ var _d7e; if(_d7c instanceof Array){ for(var i=0;i<_d7c.length;i++){ _d7e=_d7c[i]; if(_d7e instanceof String){ _d7e=null; }else{ if(_d7e&&_d7e.destroy&&!_d7e._beingDestroyed){ _d7e.destroy(); } GUtil.destroyProperties(_d7e); } } }else{ if(_d7c instanceof Object){ if(_d7c._beingDestroyed){ return; } var obj=_d7c; obj._beingDestroyed=true; for(var _d81 in obj){ _d7e=obj[_d81]; if(_d81==="_beingDestroyed"||_d81==="m_destroyed"||_d81==="_destroyed"||typeof _d7e=="function"){ continue; } if(_d7e instanceof Array){ GUtil.destroyProperties(_d7e); }else{ if(_d7e instanceof Object){ if(typeof _d7e.destroy=="function"&&!_d7e._destroyed&&(_d7e!==CCognosViewer||_d7d)){ _d7e.destroy(); } } } delete obj[_d81]; } } } }; cvLoadDialog=function(_d82,_d83,_d84,_d85,_d86,_d87){ _d87=((_d87===undefined)?true:_d87); var _d88=document.getElementById("formWarpRequest"+_d82.getId()); if(_d88&&_d82){ _d82.getWorkingDialog().hide(); var _d89=""; var _d8a=""; var _d8b=null; if(_d82.isAccessibleMode()){ _d89="winNAT_"+(new Date()).getTime(); _d8a=_d82.getWebContentRoot()+"/"+"rv/blankNewWin.html?cv.id="+this.getCVId(); }else{ var _d8c=document.body; _d8b=new CModal("","",_d8c,null,null,_d85,_d84,true,true,false,true,_d82.getWebContentRoot()); if(typeof _d86=="string"){ document.getElementById(CMODAL_CONTENT_ID).setAttribute("title",_d86); } document.getElementById(CMODAL_BACK_IFRAME_ID).setAttribute("title",RV_RES.IDS_JS_MODAL_BACK_IFRAME); _d89=CMODAL_CONTENT_ID; } var _d8d=document.createElement("FORM"); _d8d.method="POST"; _d8d.action=_d82.getGateway(); _d8d.target=_d89; _d8d.style.margin="0px"; document.body.appendChild(_d8d); for(var _d8e in _d83){ _d8d.appendChild(createHiddenFormField(_d8e,_d83[_d8e])); } if(_d87){ _d8d.appendChild(createHiddenFormField("cv.id",_d82.getId())); _d8d.appendChild(createHiddenFormField("b_action","xts.run")); _d8d.appendChild(createHiddenFormField("ui.action",_d88["ui.action"].value)); _d8d.appendChild(createHiddenFormField("ui.object",_d88["ui.object"].value)); if(typeof _d82.rvMainWnd!="undefined"){ _d8d.appendChild(createHiddenFormField("run.outputFormat",_d82.rvMainWnd.getCurrentFormat())); } if(typeof _d88["run.outputLocale"]!="undefined"){ _d8d.appendChild(createHiddenFormField("run.outputLocale",_d88["run.outputLocale"].value)); } if(typeof _d8d["backURL"]=="undefined"&&typeof _d8d["ui.backURL"]=="undefined"&&typeof _d88["ui.backURL"]!="undefined"){ _d8d.appendChild(createHiddenFormField("ui.backURL",_d88["ui.backURL"].value)); } if(typeof _d82!="undefined"&&typeof _d82.getConversation!="undefined"&&typeof _d82.getTracking!="undefined"){ _d8d.appendChild(createHiddenFormField("ui.conversation",_d82.getConversation())); _d8d.appendChild(createHiddenFormField("m_tracking",_d82.getTracking())); if(_d82.envParams["ui.name"]!="undefined"){ _d8d.appendChild(createHiddenFormField("ui.name",_d82.envParams["ui.name"])); } } } var _d8f=window.onbeforeunload; window.onbeforeunload=null; if(_d82.isAccessibleMode()){ window.open(_d8a,_d89,"rv"); _d8d.submit(); }else{ _d8d.submit(); _d8b.show(); } window.onbeforeunload=_d8f; document.body.removeChild(_d8d); _d82.modalShown=true; } }; function createHiddenFormField(name,_d91){ var _d92=document.createElement("input"); _d92.setAttribute("type","hidden"); _d92.setAttribute("name",name); _d92.setAttribute("id",name); _d92.setAttribute("value",_d91); return (_d92); }; function isAuthenticationFault(_d93){ if(_d93!=null){ var _d94=XMLHelper_FindChildByTagName(_d93,"CAM",true); return (_d94!=null&&XMLHelper_FindChildByTagName(_d94,"promptInfo",true)!=null); } }; function processAuthenticationFault(_d95,_d96){ if(isAuthenticationFault(_d95)){ launchLogOnDialog(_d96,_d95); return true; } return false; }; function isObjectEmpty(_d97){ for(var _d98 in _d97){ if(_d97.hasOwnProperty(_d98)){ return false; } } return true; }; function launchLogOnDialog(cvID,_d9a){ try{ var oCV=getCognosViewerObjectRef(cvID); var _d9c={"b_action":"xts.run","m":"portal/close.xts","h_CAM_action":"logonAs"}; if(_d9a!=null){ var _d9d=XMLHelper_FindChildrenByTagName(_d9a,"namespace",true); if(_d9d!=null){ for(var _d9e=0;_d9e<_d9d.length;++_d9e){ var _d9f=_d9d[_d9e]; if(_d9f!=null){ var _da0=XMLHelper_FindChildByTagName(_d9f,"name",false); var _da1=XMLHelper_FindChildByTagName(_d9f,"value",false); if(_da0!=null&&_da1!=null){ var _da2=XMLHelper_GetText(_da0); var _da3=XMLHelper_GetText(_da1); if(_da2!=null&&_da2.length>0){ _d9c[_da2]=_da3; } } } } } } cvLoadDialog(oCV,_d9c,540,460,null,false); } catch(exception){ } }; function getCVWaitingOnFault(){ var oCV=null; for(var _da5=0;_da50&&_dba.childNodes[0].className=="textItem"){ try{ _dba.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(_dbd){ var regX=/\r\n|\r|\n/g; var _dbf="
"; return _dbd.replace(regX,_dbf); }; function xml_encode(_dc0){ var _dc1=""+_dc0; if((_dc1=="0")||((_dc0!=null)&&(_dc0!=false))){ _dc1=_dc1.replace(/&/g,"&"); _dc1=_dc1.replace(//g,">"); _dc1=_dc1.replace(/"/g,"""); _dc1=_dc1.replace(/'/g,"'"); }else{ if(_dc0==null){ _dc1=""; } } return _dc1; }; function xml_decodeParser(sAll,_dc3){ var _dc4=sAll; switch(_dc3){ case "amp": _dc4="&"; break; case "lt": _dc4="<"; break; case "gt": _dc4=">"; break; case "quot": _dc4="\""; break; case "apos": _dc4="'"; break; } return _dc4; }; function xml_decode(_dc5){ var _dc6=""+_dc5; if((_dc6=="0")||((_dc5!=null)&&(_dc5!=false))){ _dc6=_dc6.replace(/&(amp|lt|gt|quot|apos);/g,xml_decodeParser); }else{ if(_dc5==null){ _dc6=""; } } return _dc6; }; function xpath_attr_encode(_dc7){ var _dc8=null; if(_dc7.indexOf("'")>=0&&_dc7.indexOf("\"")>=0){ var _dc9=_dc7.split("\""); _dc8="concat("; for(var i=0;i<_dc9.length;++i){ if(i>0){ _dc8+=","; } if(_dc9[i].length>0){ _dc8+=("\""+_dc9[i]+"\""); }else{ _dc8+="'\"'"; } } _dc8+=")"; }else{ if(_dc7.indexOf("'")>=0){ _dc8="\""+_dc7+"\""; }else{ _dc8="'"+_dc7+"'"; } } return _dc8; }; 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(_dd2){ if(typeof window[_dd2]!="undefined"&&window[_dd2]){ if(isIE()){ eval("delete "+_dd2); }else{ delete window[_dd2]; } } }; function loadClass(_dd3){ try{ var _dd4=eval("new "+_dd3+"();"); return _dd4; } catch(e){ return null; } }; function getElementsByClassName(oElm,_dd6,_dd7){ var _dd8=(_dd6=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(_dd6); var _dd9=[]; var _dda=new RegExp("(^|\\s)"+_dd7+"(\\s|$)"); var _ddb=_dd8.length; for(var i=0;i<_ddb;i++){ var _ddd=_dd8[i]; if(_dda.test(_ddd.className)){ _dd9.push(_ddd); } } return _dd9; }; function getImmediateLayoutContainerId(node){ var _ddf=node; while(_ddf!=null){ if(_ddf.getAttribute&&_ddf.getAttribute("lid")!=null){ return _ddf.getAttribute("lid"); } _ddf=_ddf.parentNode; } return null; }; function getChildElementsByAttribute(oElm,_de1,_de2,_de3){ return getDescendantElementsByAttribute(oElm,_de1,_de2,_de3,true); }; function getElementsByAttribute(oElm,_de5,_de6,_de7,_de8,_de9){ return getDescendantElementsByAttribute(oElm,_de5,_de6,_de7,false,_de8,_de9); }; function getDescendantElementsByAttribute(oElm,_deb,_dec,_ded,_dee,_def,_df0){ var _df1=[]; var _df2=null; if(typeof _df0==="undefined"){ _df2=(typeof _ded!="undefined")?new RegExp("(^|\\s)"+_ded+"(\\s|$)","i"):null; }else{ _df2=_df0; } if(typeof _deb=="string"){ _deb=[_deb]; } var _df3=(oElm?_deb.length:0); for(var _df4=0;_df4<_df3;_df4++){ var _df5=null; if(_dee){ if(_deb[_df4]=="*"&&oElm.all){ _df5=oElm.childNodes; }else{ _df5=[]; var _df6=oElm.childNodes; for(var i=0;i<_df6.length;++i){ if(_df6[i].nodeName.toLowerCase()==_deb[_df4].toLowerCase()){ _df5.push(_df6[i]); } } } }else{ _df5=(_deb[_df4]=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(_deb[_df4]); } var _df8=_df5.length; for(var idx=0;idx<_df8;idx++){ var _dfa=_df5[idx]; var _dfb=_dfa.getAttribute&&_dfa.getAttribute(_dec); if(_dfb!==null){ var _dfc=null; if(typeof _dfb==="number"){ _dfc=String(_dfb); }else{ if(typeof _dfb==="string"&&_dfb.length>0){ _dfc=_dfb; } } if(_dfc!==null){ if(typeof _ded=="undefined"||(_df2&&_df2.test(_dfc))){ _df1.push(_dfa); if(_def!=-1&&_df1.length>_def){ return []; }else{ if(_def==1&&_df1.length==1){ return _df1; } } } } } } } return _df1; }; function savedOutputDoneLoading(cvId,_dfe){ var oCV=window["oCV"+cvId]; var _e00=(oCV&&oCV.getViewerWidget?oCV.getViewerWidget():null); var _e01=(_e00?_e00.getSavedOutput():null); if(_e01){ _e01.outputDoneLoading(); }else{ if(_dfe<5){ _dfe++; var _e02=function(){ savedOutputDoneLoading(cvId,_dfe); }; setTimeout(_e02,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 _e04=navigator.userAgent.match(/(?:MSIE |Trident\/.*; rv:)(\d+)/); return _e04?parseFloat(_e04[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(_e05,_e06,_e07,_e08){ if(_e06.length>1){ document.images[_e05].src=_e06; } }; 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 _e0e=node.getAttribute("viewerId"); if(!_e0e){ _e0e=node.parentNode.getAttribute("viewerId"); } if(!_e0e){ return; } var oCV=window["oCV"+_e0e]; var _e10=oCV.getAction("Selection"); _e10.pageClicked(evt); return stopEventBubble(evt); }; function clientToScreenCoords(_e11,_e12){ var _e13=_e11; var _e14={topCoord:0,leftCoord:0}; while(_e13!=null&&_e13!=_e12){ _e14.topCoord+=_e13.offsetTop; _e14.leftCoord+=_e13.offsetLeft; _e13=_e13.offsetParent; } return _e14; }; function getCurrentPosistionString(oCV,_e16,_e17){ var _e18=RV_RES.IDS_JS_INFOBAR_ITEM_COUNT; var _e19=/\{0\}/; var _e1a=/\{1\}/; _e18=_e18.replace(_e19,_e16); _e18=" "+_e18.replace(_e1a,_e17)+" "; return _e18; }; function applyJSONProperties(obj,_e1c){ for(property in _e1c){ if(typeof _e1c[property]=="object"&&!(_e1c[property] instanceof Array)){ if(typeof obj[property]=="undefined"){ obj[property]={}; } applyJSONProperties(obj[property],_e1c[property]); }else{ obj[property]=_e1c[property]; } } }; function CViewerCommon(){ }; CViewerCommon.openNewWindowOrTab=function(sURL,_e1e){ return window.open(sURL,_e1e); }; CViewerCommon.toJSON=function(obj){ var type=typeof (obj); if(type!="object"||type===null){ if(type==="string"){ obj="\""+obj+"\""; } return String(obj); }else{ var _e21; var prop; var json=[]; var _e24=(obj&&obj.constructor==Array); for(_e21 in obj){ prop=obj[_e21]; type=typeof (prop); if(type==="string"){ prop="\""+prop+"\""; }else{ if(type=="object"&&prop!==null){ prop=CViewerCommon.toJSON(prop); } } json.push((_e24?"":"\""+_e21+"\":")+String(prop)); } return (_e24?"[":"{")+String(json)+(_e24?"]":"}"); } }; function resizePinnedContainers(){ var oCV=window.gaRV_INSTANCES[0]; if(oCV&&!oCV.m_viewerFragment){ var _e26=oCV.getPinFreezeManager(); if(_e26&&_e26.hasFrozenContainers()){ var _e27=document.getElementById("RVContent"+oCV.getId()); var _e28=document.getElementById("mainViewerTable"+oCV.getId()); var _e29=_e27.clientWidth; var _e2a=_e28.clientHeight; _e26.resize(_e29,_e2a); if(isIE()){ oCV.repaintDiv(_e27); } } } }; function setWindowHref(url){ var _e2c=window.onbeforeunload; window.onbeforeunload=null; window.location.href=url; window.onbeforeunload=_e2c; }; 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 _e5d=0;_e5d<_e5c.length;++_e5d){ var _e5e=_e5c[_e5d]; var _e5f=_e5e.getSelectedContextIds(); var _e60=[]; for(var item=0;item<_e5f.length;++item){ var _e62=_e5f[item].join(":"); _e60.push(_e62); } _e5b.push(_e60.join("::")); } } return _e5b; }; function getViewerSelectionContext(_e63,_e64,_e65){ var _e66=_e65==true?_e63.getAllSelectedObjectsWithUniqueCTXIDs():_e63.getAllSelectedObjects(); if(_e66!=null&&_e66.length>0){ for(var _e67=0;_e67<_e66.length;++_e67){ var _e68={}; var _e69=new CAxisSelectionIterator(_e66[_e67]); if(_e69.hasNext()){ var _e6a=_e69.next(); if(_e6a.hasNext()){ var _e6b=_e6a.next(); var _e6c=_e6b.getContextId(); _e68[_e6c]=true; var _e6d=_e64.addSelectedCell(_e6b.getDataItem(),_e6b.getMetadataModelItem(),_e6b.getUseValue(),_e6b.getUseValueType(),_e6b.getDisplayValue(),_e6b.getUsage(),{"queryName":_e6b.getRefQuery()}); if(_e6b.getHun()!=null){ _e6d.addProperty("HierarchyUniqueName",_e6b.getHun()); } if(_e6b.getDun()!=null){ _e6d.addProperty("DimensionUniqueName",_e6b.getDun()); } while(_e6a.hasNext()){ _e6b=_e6a.next(); _e6c=_e6b.getContextId(); if(typeof _e68[_e6c]=="undefined"||_e6c===""){ _e68[_e6c]=true; var _e6e=_e6d.addDefiningCell(_e6b.getDataItem(),_e6b.getMetadataModelItem(),_e6b.getUseValue(),_e6b.getUseValueType(),_e6b.getDisplayValue(),_e6b.getUsage(),{"queryName":_e6b.getRefQuery()}); if(_e6b.getHun()!=null){ _e6e.addProperty("HierarchyUniqueName",_e6b.getHun()); } if(_e6b.getDun()!=null){ _e6e.addProperty("DimensionUniqueName",_e6b.getDun()); } } } while(_e69.hasNext()){ _e6a=_e69.next(); var _e6f=_e6d; while(_e6a.hasNext()){ _e6b=_e6a.next(); _e6c=_e6b.getContextId(); if(typeof _e68[_e6c]=="undefined"||_e6c===""){ _e68[_e6c]=true; _e6f=_e6f.addDefiningCell(_e6b.getDataItem(),_e6b.getMetadataModelItem(),_e6b.getUseValue(),_e6b.getUseValueType(),_e6b.getDisplayValue(),_e6b.getUsage(),{"queryName":_e6b.getRefQuery()}); if(_e6b.getHun()!=null){ _e6f.addProperty("HierarchyUniqueName",_e6b.getHun()); } if(_e6b.getDun()!=null){ _e6f.addProperty("DimensionUniqueName",_e6b.getDun()); } } } } } } } } var _e70=_e64.toString(); if(window.gViewerLogger){ window.gViewerLogger.log("Selection context",_e70,"xml"); } return _e70; }; function PinFreezeContainer(_e71,lid,_e73,_e74,_e75,_e76,_e77){ this.m_pinFreezeManager=_e71; this.m_lid=lid; this.m_lidNS=lid+_e73+_e77; this.m_viewerId=_e73; this.m_freezeTop=_e74; this.m_freezeSide=_e75; this.m_cachedReportDiv=null; this.m_cachedPFContainer=null; this.m_cachedBaseContainer=_e76; 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=_e77; 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 _e78="{"; _e78+="\"m_clientWidth\":"+this.m_clientWidth+""; _e78+=",\"m_scrollableClientWidth\":"+this.m_scrollableClientWidth+""; _e78+=",\"m_clientHeight\":"+this.m_clientHeight+""; _e78+=",\"m_scrollableClientHeight\":"+this.m_scrollableClientHeight+""; _e78+="}"; return _e78; }; PinFreezeContainer.prototype.copyProperties=function(_e79){ this.m_clientWidth=_e79.m_clientWidth; this.m_scrollableClientWidth=_e79.m_scrollableClientWidth; this.m_clientHeight=_e79.m_clientHeight; this.m_scrollableClientHeight=_e79.m_scrollableClientHeight; }; PinFreezeContainer.prototype.setViewerId=function(id){ this.m_viewerId=id; }; PinFreezeContainer.prototype.getLid=function(){ return this.m_lid; }; PinFreezeContainer.prototype.createPFContainer=function(_e7b,_e7c){ var _e7d=document.createElement("temp"); if(this.m_cachedBaseContainer){ this.applyAuthoredFixedSizes(this.m_cachedBaseContainer); this.m_cachedReportDiv=_e7b; var _e7e=this.m_cachedBaseContainer.parentNode; var _e7f=this.loadTemplateHTML(); if(_e7f){ _e7d.innerHTML=_e7f; var _e80=this.getContainerByLID(_e7d); var _e81=this.getSectionByLID(_e7d.firstChild,"pfMainOutput"); if(_e81){ var i=this.getChildPosition(_e7e,this.m_cachedBaseContainer); if(i!=-1){ var _e83=this.m_pinFreezeManager.m_oCV; if(_e83&&_e83.envParams["freezeDefaultWrap"]){ if(this.m_cachedBaseContainer.style.whiteSpace===""&&_e83.envParams["freezeDefaultWrap"].toLowerCase()==="true"){ var _e84=this.m_cachedBaseContainer.getElementsByTagName("span"); if(_e84){ for(var k=0;k<_e84.length;k++){ _e84[k].style.whiteSpace="nowrap"; } } this.m_wrapFlag=true; } } if(!_e7c){ 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"; } _e81.style.width=this.m_cachedBaseContainer.clientWidth+2+"px"; _e81.style.height=this.m_cachedBaseContainer.clientHeight+2+"px"; } _e81.appendChild(this.m_cachedBaseContainer); this.insertAt(_e7e,_e80,i); } if(this.m_cachedBaseContainer.style.border!==""){ _e80.style.border=this.m_cachedBaseContainer.style.border; this.m_cachedBaseContainer.style.border=""; } } } } }; PinFreezeContainer.prototype._getFixedWidth=function(_e86){ if(_e86&&_e86.style.width&&!_e86.getAttribute("authoredFixedWidth")){ var _e87=Number(_e86.style.width.split("px")[0]); return isNaN(_e87)?null:_e87; } return null; }; PinFreezeContainer.prototype._getFixedHeight=function(_e88){ if(_e88&&_e88.style.height&&!_e88.getAttribute("authoredFixedHeight")){ var _e89=Number(_e88.style.height.split("px")[0]); return isNaN(_e89)?null:_e89; } return null; }; PinFreezeContainer.prototype.applyAuthoredFixedSizes=function(_e8a){ var _e8b=this._getFixedWidth(_e8a); if(_e8b){ this.m_fixedWidth=_e8b; this.m_clientWidth=this.m_fixedWidth; this.m_scrollableClientWidth=this.m_fixedWidth; } var _e8c=this._getFixedHeight(_e8a); if(_e8c){ this.m_fixedHeight=_e8c; this.m_clientHeight=this.m_fixedHeight; this.m_scrollableClientHeight=this.m_fixedHeight; } }; PinFreezeContainer.prototype.loadFreezeBothTemplateHTML=function(){ var _e8d=""+""+""+""+""+""+""+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
 
"+"
"+"
"; return _e8d; }; PinFreezeContainer.prototype.loadFreezeSideTemplateHTML=function(){ var _e8e=""+""+""+""+"
"+"
"+"
"+"
 
"+"
"+"
"; return _e8e; }; PinFreezeContainer.prototype.loadFreezeTopTemplateHTML=function(){ var _e8f=""+""+""+""+"
"+"
"+"
"+"
"+"
"; return _e8f; }; 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(_e90){ var _e91=this.getSection("pfMainOutput"); var _e92=_e91.getAttribute("pfslid"); var _e93=this.getSection("pfSideHeadings"); var _e94=_e93.getAttribute("pfslid"); var _e95=this.getMainOutputHomeCell(); if(!_e95){ return; } var _e96=_e90; var _e97=_e93; var _e98=this.isA11yEnabled(_e96); var _e99=this.m_pinFreezeManager.deepCloneNode(_e96); _e97.appendChild(_e99); var _e9a=this.getSectionHomeCell(_e93); if(!_e9a){ return; } var _e9b=_e96.getElementsByTagName("tbody"); var _e9c=_e99.getElementsByTagName("tbody"); if(_e9b.length>0&&_e9c.length>0){ var _e9d=_e9b[0]; var _e9e=_e9c[0]; var _e9f=_e9d.firstChild; var _ea0=_e9e.firstChild; var _ea1=_e95.rowSpan; this.markAsCopy(_e95,_e9a,_e92,_e94); for(var r=0;r<_ea1;++r){ var _ea3=_e9e.rows[r]; this.removeCTX(_ea3); } for(var r=_ea1;r<_e9e.rows.length;++r){ var _ea4=_e9d.rows[r]; var _ea3=_e9e.rows[r]; _ea3.style.visibility="hidden"; for(var c=0;c<_ea3.cells.length;++c){ var _ea6=_ea3.cells[c]; if(_e98){ _ea6=this.m_pinFreezeManager.removeIdAttribute(_ea6); } if(_ea6.getAttribute("type")=="datavalue"){ _ea6.removeAttribute("ctx"); _ea6.removeAttribute("uid"); _ea6.removeAttribute("name"); }else{ var _ea7=_ea4.cells[c]; this.markAsCopy(_ea7,_ea6,_e92,_e94); } } _ea3.style.visibility="visible"; } } }; PinFreezeContainer.prototype.applyNeighbouringBorderStylesToHomeCell=function(_ea8,_ea9){ if(isFF()||isIE()){ if(_ea8&&_ea8.length&&_ea8[0].cells&&_ea8[0].cells.length>1){ if(this.m_freezeSide){ var _eaa=this.getBorderInfo(_ea8[0].cells[1],"right"); if(_eaa){ _ea9.style.borderRightWidth=_eaa.borderRightWidth; _ea9.style.borderRightStyle=_eaa.borderRightStyle; _ea9.style.borderRightColor=_eaa.borderRightColor; } } if(this.m_freezeTop){ var _eaa=this.getBorderInfo(_ea8[0].cells[1],"bottom"); if(_eaa){ _ea9.style.borderBottomWidth=_eaa.borderBottomWidth; _ea9.style.borderBottomStyle=_eaa.borderBottomStyle; _ea9.style.borderBottomColor=_eaa.borderBottomColor; } } } } }; PinFreezeContainer.prototype.createTopHeadings=function(_eab){ var _eac=this.getSection("pfMainOutput"); var _ead=_eac.getAttribute("pfslid"); var _eae=this.getSection("pfTopHeadings"); var _eaf=_eae.getAttribute("pfslid"); var _eb0=this.getMainOutputHomeCell(); if(!_eb0){ return; } var _eb1=_eab; var _eb2=_eae; var _eb3=this.isA11yEnabled(_eb1); var _eb4=this.m_pinFreezeManager.deepCloneNode(_eb1); _eb4.setAttribute("clonednode","true"); _eb2.appendChild(_eb4); var _eb5=_eb1.getElementsByTagName("tbody"); var _eb6=_eb4.getElementsByTagName("tbody"); if(_eb5.length>0&&_eb6.length>0){ var _eb7=_eb5[0]; var _eb8=_eb6[0]; var _eb9=_eb0.rowSpan; for(var r=0;r<_eb8.rows.length;++r){ var _ebb=_eb7.rows[r]; var _ebc=_eb8.rows[r]; if(_eb3){ _ebc=this.m_pinFreezeManager.removeIdAttribute(_ebc); } _ebc.style.visibility="hidden"; for(var c=0;c<_ebc.cells.length;++c){ var _ebe=_ebc.cells[c]; if(r>_eb9||_ebe.getAttribute("type")=="datavalue"){ _ebe.removeAttribute("ctx"); _ebe.removeAttribute("uid"); _ebe.removeAttribute("name"); }else{ var _ebf=_ebb.cells[c]; this.markAsCopy(_ebf,_ebe,_ead,_eaf); if(_ebf===_eb0){ this.initializeHomeCellTabIndex(_ebe); this.applyNeighbouringBorderStylesToHomeCell(_eb7.rows,_ebe); } } } _ebc.style.visibility="visible"; } } }; PinFreezeContainer.prototype.createHomeCellHeading=function(){ var _ec0=this.getSection("pfMainOutput"); var _ec1=_ec0.getAttribute("pfslid"); var _ec2=this.getSection("pfHomeCell"); var _ec3=_ec2.parentNode; var _ec4=_ec2.getAttribute("pfslid"); var _ec5=this.getMainOutputHomeCell(); if(!_ec5){ return; } _ec3.style.height="100%"; var _ec6=this.getTopHeadingSectionHeight(_ec5); _ec2.style.height=_ec6-this.m_containerMargin.top+"px"; _ec2.style.width=this.getSideHeadingSectionWidth(_ec5)-this.m_containerMargin.left+"px"; _ec2.style.marginTop=this.m_containerMargin.top+"px"; _ec2.style.marginLeft=this.m_containerMargin.left+"px"; var _ec7=_ec5.parentNode; var _ec8=_ec7.cloneNode(false); var _ec9=this._findBestGuessHomeCell(_ec5); var _eca=document.createElement("div"); _eca.style.width="100%"; _eca.style.height="100%"; while(_ec5.offsetLeft<=_ec9.offsetLeft){ oTargetHomeCell=this.m_pinFreezeManager.deepCloneNode(_ec5); if(isFF()||isIE()){ _ec5.appendChild(_eca); oTargetHomeCell.style.width=_eca.clientWidth+"px"; _ec5.removeChild(_eca); }else{ oTargetHomeCell.style.width=_ec5.clientWidth+1+"px"; } oTargetHomeCell.style.borderBottomWidth="0px"; _ec8.appendChild(oTargetHomeCell); this.markAsCopy(_ec5,oTargetHomeCell,_ec1,_ec4); if(_ec5.nextSibling){ _ec5=_ec5.nextSibling; }else{ break; } } if(oTargetHomeCell){ oTargetHomeCell.style.borderRightWidth="0px"; } var _ecb=_ec7.parentNode; var _ecc=_ecb.cloneNode(false); _ecc.appendChild(_ec8); var _ecd=_ecb.parentNode; var _ece=_ecd.cloneNode(false); _ece.appendChild(_ecc); _ece.style.width="100%"; _ece.style.height="100%"; _ece.style.marginLeft=""; _ece.style.marginTop=""; _ec2.appendChild(_ece); this.initializeHomeCellTabIndex(oTargetHomeCell); this.applyNeighbouringBorderStylesToHomeCell(_ec0.firstChild.rows,_ec2); }; PinFreezeContainer.prototype.markAsCopy=function(main,copy,_ed1,_ed2){ if(!main.pfCopy){ main.setAttribute("pfslid",_ed1); main.pfCopy=[]; } main.pfCopy.push(copy); copy.pfMain=main; copy.setAttribute("pfslid",_ed2); }; PinFreezeContainer.prototype.getCopy=function(_ed3){ if(_ed3.pfCopy){ var _ed4={}; for(var i in _ed3.pfCopy){ var copy=_ed3.pfCopy[i]; if(copy.getAttribute){ var _ed7=copy.getAttribute("pfslid"); if(_ed7){ var _ed8=PinFreezeContainer.getSectionNameFromSlid(_ed7); var _ed9=this.getSection(_ed8); if(_ed9&&PinFreezeContainer.isSectionVisible(_ed9)){ _ed4[_ed8]=copy; } } } } if(_ed4["pfHomeCell"]){ return _ed4["pfHomeCell"]; } for(i in _ed4){ return _ed4[i]; } } return null; }; PinFreezeContainer.prototype.getMain=function(_eda){ if(_eda.pfMain){ return _eda.pfMain; } return null; }; PinFreezeContainer.isSectionVisible=function(_edb){ var node=_edb; 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 _edd={isSideFrozen:false,isTopFrozen:false}; if(this.m_freezeSide){ var side=this.getSection("pfSideHeadings"); if(side){ _edd.isSideFrozen=PinFreezeContainer.isSectionVisible(side); } } if(this.m_freezeTop){ var top=this.getSection("pfTopHeadings"); if(top){ _edd.isTopFrozen=PinFreezeContainer.isSectionVisible(top); } } return _edd; }; PinFreezeContainer.prototype.checkSectionStructureChange=function(_ee0,_ee1){ if(_ee0.isSideFrozen!==_ee1.isSideFrozen||_ee0.isTopFrozen!==_ee1.isTopFrozen){ this.m_pinFreezeManager.sectionStructureChange(); } }; PinFreezeContainer.prototype.freezeContainerInReport=function(_ee2){ this.cacheContainerAndSections(this.getContainerByLID(_ee2)); this.m_homeCellNodes={}; this.updateContainer(); }; PinFreezeContainer.prototype.frozenSectionsRequired=function(){ return (this.frozenSideHeadingsRequired()||this.frozenTopHeadingsRequired()); }; PinFreezeContainer.prototype.frozenSideHeadingsRequired=function(){ var _ee3=this.getSection("pfMainOutput"); if(_ee3){ if(this.m_freezeSide){ var _ee4=_ee3.scrollWidth; return ((this.m_clientWidth<_ee4)||_ee4==0); } } return false; }; PinFreezeContainer.prototype.frozenTopHeadingsRequired=function(){ var _ee5=this.getSection("pfMainOutput"); if(_ee5){ if(this.m_freezeTop){ var _ee6=_ee5.scrollHeight; return ((this.m_clientHeight<_ee6)||_ee6==0); } } return false; }; PinFreezeContainer.prototype.showTemplatePart=function(_ee7,_ee8){ var _ee9=this.getContainer().rows; for(var r=0;r<_ee9.length;++r){ if(_ee9[r].getAttribute("templatePart")===_ee7){ _ee9[r].style.display=((_ee8)?"":"none"); }else{ var _eeb=_ee9[r].cells; for(var c=0;c<_eeb.length;++c){ if(_eeb[c].getAttribute("templatePart")===_ee7){ _eeb[c].style.display=((_ee8)?"":"none"); } } } } }; PinFreezeContainer.prototype.showFreezeTopOnly=function(_eed){ if(!(this.m_freezeTop&&this.m_freezeSide)){ return; } var _eee=(_eed.scrollWidth==0)?_eed.clientWidth:_eed.scrollWidth; this.updateMainOutputWidth(_eee); this.setScrollX(_eed,0); if(this.getSection("pfTopHeadings")){ this.getSection("pfTopHeadings").style.width=_eee+"px"; this.setScrollX(this.getSection("pfTopHeadings"),0); } this.showTemplatePart("freezeSide",false); }; PinFreezeContainer.prototype.showFreezeSideOnly=function(_eef){ if(!(this.m_freezeTop&&this.m_freezeSide)){ return; } var _ef0=(_eef.scrollHeight==0)?_eef.clientHeight:_eef.scrollHeight; this.updateMainOutputHeight(_ef0); this.setScrollY(_eef,0); if(this.getSection("pfSideHeadings")){ this.getSection("pfSideHeadings").style.height=_ef0+"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(_ef1){ this.updateMainOutputWidth((_ef1.scrollWidth==0)?_ef1.clientWidth:_ef1.scrollWidth); this.updateMainOutputHeight((_ef1.scrollHeight==0)?_ef1.clientHeight:_ef1.scrollHeight); this.setInitialScrollPosition(_ef1,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(_ef4){ return _ef4.firstChild?true:false; }; PinFreezeContainer.prototype.updateContainer=function(){ var _ef5=this.getSection("pfMainOutput"); var _ef6=this.getMainOutputHomeCell(); if(_ef6){ if(this.m_scrollableClientHeight===this.m_clientHeight||!this.m_scrollableClientHeight){ this.m_scrollableClientHeight-=_ef6.offsetHeight; var _ef7=this.calculateMinCrossTabScrollableClientHeight(); if(_ef7>this.m_scrollableClientHeight){ this.m_scrollableClientHeight=_ef7; } } if(this.m_scrollableClientWidth===this.m_clientWidth||!this.m_scrollableClientWidth){ this.m_scrollableClientWidth-=this.getHomeCellOffsetWidth(_ef6); } } if(_ef5&&_ef6){ this.showAll(); if(this.frozenSectionsRequired()){ this.updateMainOutputSize(); this.initializeHomeCellTabIndex(_ef6); if(this.m_freezeSide){ var _ef8=this.getSection("pfSideHeadings"); if(!this.headingsCreated(_ef8)){ this.createSideHeadings(this.m_cachedBaseContainer); if(this.m_freezeTop){ this.initializeTouchScrolling(_ef8); } } var _ef9=this.getSection("pfHorizontalScrollBar"); _ef9.scrollLeft="0px"; } if(this.m_freezeTop){ var _efa=this.getSection("pfTopHeadings"); if(!this.headingsCreated(_efa)){ this.createTopHeadings(this.m_cachedBaseContainer); if(this.m_freezeSide){ this.initializeTouchScrolling(_efa); } } var _efb=this.getSection("pfVerticalScrollBar"); _efb.scrollTop="0px"; } if(this.m_freezeSide&&this.m_freezeTop){ var _efc=this.getSection("pfHomeCell"); if(!this.headingsCreated(_efc)){ this.createHomeCellHeading(); } _efc.style.display=""; } var _efd=this.updateSideHeadingSize(_ef6); var _efe=this.updateTopHeadingSize(_ef6); if(!this.frozenSectionsRequired()){ this.showMainOutputOnly(_ef5); } this.setInitialScrollPosition(_ef5,_efd,_efe); if(this.m_freezeTop&&this.m_freezeSide){ this.setInitialScrollPosition(this.getSection("pfSideHeadings"),0,_efe); this.setInitialScrollPosition(this.getSection("pfTopHeadings"),_efd,0); } this.initializeTouchScrolling(_ef5); }else{ this.showMainOutputOnly(_ef5); this.removeTouchScrolling(); } this.updateTabIndexValues(); } }; PinFreezeContainer.prototype.calculateMinCrossTabScrollableClientHeight=function(){ var _eff=0; if(this.m_cachedPFContainer){ var _f00=this.getElementByLID(this.m_cachedPFContainer,"table",this.m_lid+this.m_viewerId); if(_f00){ var _f01=0; for(var r=0;r<_f00.rows.length;r++){ var row=_f00.rows[r]; for(var c=0;c=2){ break; } } } } return _eff; }; PinFreezeContainer.prototype.updateSideHeadingSize=function(_f07){ var _f08=0; if(this.m_freezeSide){ var _f09=this.getSection("pfMainOutput"); if(!_f09){ return 0; } if(!this.frozenSideHeadingsRequired()){ this.showFreezeTopOnly(_f09); return 0; } var _f0a=this.getSection("pfSideHeadings"); _f08=this.getSideHeadingSectionWidth(_f07); var _f0b=this.getSection("pfHorizontalScrollBar"); var _f0c=this.getSectionHomeCell(_f0a); if(_f0a.style.display=="none"){ _f0a.style.display=""; _f0b.style.display=""; } _f0a.style.width=_f08+"px"; _f0a.style.height=_f09.clientHeight+"px"; } return _f08; }; PinFreezeContainer.prototype.updateTopHeadingSize=function(_f0d){ var _f0e=0; if(this.m_freezeTop){ var _f0f=this.getSection("pfMainOutput"); if(!_f0f){ return 0; } if(!this.frozenTopHeadingsRequired()){ this.showFreezeSideOnly(_f0f); return 0; } var _f10=this.getSection("pfTopHeadings"); _f0e=this.getTopHeadingSectionHeight(_f0d); var _f11=this.getSection("pfVerticalScrollBar"); var _f12=this.getSectionHomeCell(_f10); if(_f10.style.display=="none"){ _f10.style.display=""; _f11.style.display=""; } _f10.style.height=_f0e+"px"; _f10.style.width=_f0f.clientWidth+"px"; } return _f0e; }; PinFreezeContainer.prototype.setScrollX=function(_f13,_f14){ if(getElementDirection(_f13)==="rtl"){ setScrollRight(_f13,_f14); }else{ setScrollLeft(_f13,_f14); } }; PinFreezeContainer.prototype.setScrollY=function(_f15,_f16){ _f15.scrollTop=_f16; }; PinFreezeContainer.prototype.setInitialScrollPosition=function(_f17,_f18,_f19){ if(getElementDirection(_f17)==="rtl"){ setScrollRight(_f17,_f18); }else{ setScrollLeft(_f17,_f18); } _f17.scrollTop=_f19; }; PinFreezeContainer.prototype.getScrollableClientWidth=function(){ return this.m_scrollableClientWidth; }; PinFreezeContainer.prototype.setScrollableClientWidth=function(_f1a){ this.m_scrollableClientWidth=_f1a; }; 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(_f1b){ this.m_scrollableClientHeight=_f1b; }; PinFreezeContainer.prototype.getClientHeight=function(){ return this.m_clientHeight; }; PinFreezeContainer.prototype.clientHeight=function(_f1c){ return _f1c.clientHeight; }; PinFreezeContainer.prototype.findBestContainerHeight=function(_f1d){ if(this.m_freezeTop&&this.m_cachedReportDiv){ var _f1e=this.m_cachedReportDiv.parentNode; if(_f1e){ var _f1f=this._findRestOfPageHeight(this.getContainer()); return _f1d-_f1f-(this.c_pageMargin/2)-this.m_containerMargin.top; } } return _f1d-this.c_pageMargin; }; PinFreezeContainer.prototype.findBestContainerWidth=function(_f20){ 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 _f22=0; var _f23=node.parentNode.childNodes; for(var i=0;i<_f23.length;i++){ if(_f23[i]!==node){ _f22+=_f23[i].clientWidth; } } return _f20-_f22-(this.c_pageMargin/2); } return _f20; }; PinFreezeContainer.prototype._findRestOfPageHeight=function(node){ var _f26=0; var _f27=node.parentNode; if(!_f27){ return _f26; } if(_f27.childNodes.length>1){ for(var i=0;i<_f27.childNodes.length;i++){ var _f29=_f27.childNodes[i]; if(_f29.nodeType==1){ var _f2a=this.getStyleDisplay(_f29); if(_f29!=node&&!isNaN(_f29.clientHeight)&&_f2a!="none"&&_f2a!="table-cell"){ _f26+=this.clientHeight(_f29); } } } } if(node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){ _f26+=this._findRestOfPageHeight(_f27); } return _f26; }; PinFreezeContainer.prototype.resize=function(_f2b,_f2c,_f2d,_f2e){ if(this.m_fixedWidth&&this.m_fixedHeight){ return; } _f2b=(this.m_fixedWidth)?this.m_fixedWidth:_f2b; _f2c=(this.m_fixedHeight)?this.m_fixedHeight:_f2c; var _f2f=this.getSectionStructure(); if(this.m_sectionCache&&this.m_cachedPFContainer){ var _f30=0; if(_f2c!==0){ _f30=this.findBestContainerHeight(_f2c); if(_f2d&&_f30<300){ _f30=300; }else{ if(_f30<100){ _f30=100; } } } this.m_clientHeight=_f30>0?_f30:this.m_clientHeight; var _f31=0; if(_f2b!==0){ _f31=this.findBestContainerWidth(_f2b); } this.m_clientWidth=(_f31>0)?_f31-5-(this.c_pageMargin/2):this.m_clientWidth; var _f32=this.getSection("pfMainOutput"); var _f33=this.getSectionHomeCell(_f32); if(_f33){ this.m_scrollableClientWidth=this.m_clientWidth-this.getSideHeadingSectionWidth(_f33); this.m_scrollableClientHeight=this.m_clientHeight-_f33.offsetHeight; } if(_f2e){ var _f34=getElementsByAttribute(this.m_cachedPFContainer,"div","pflid",_f2e.lid); if(_f34){ var node=_f34[0]; while(node.nodeName.toLowerCase()!="table"){ node=node.parentNode; } node.style.width=_f2e.width+"px"; } } this.updateContainer(); }else{ this.m_clientWidth=_f2b-this.c_pageMargin; this.m_clientHeight=_f2c-this.c_pageMargin; } var _f36=this.getSectionStructure(); this.checkSectionStructureChange(_f2f,_f36); }; 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(_f37){ var _f38=this.getSection("pfMainOutput"); if(!_f38){ return; } if(this.m_freezeSide==true){ _f38.style.width=(_f37+"px"); if(this.m_freezeTop==false||!this.frozenTopHeadingsRequired()){ _f38.style.height=_f38.firstChild.clientHeight+"px"; } var _f39=this.getSection("pfHorizontalScrollBar"); if(_f39){ _f39.style.width=(_f37+"px"); var _f3a=_f39.firstChild; if(_f3a){ var _f3b=this.getSectionHomeCell(_f38); var _f3c=_f38.scrollWidth-this.getHomeCellOffsetWidth(_f3b); _f3a.style.width=_f3c+"px"; } } } }; PinFreezeContainer.prototype.updateMainOutputHeight=function(_f3d){ var _f3e=this.getSection("pfMainOutput"); if(!_f3e){ return; } _f3e.style.height=(_f3d+"px"); if(!this.m_freezeSide||!this.frozenSideHeadingsRequired()){ _f3e.style.width=_f3e.firstChild.clientWidth+2+"px"; } var _f3f=this.getSection("pfVerticalScrollBar"); if(_f3f){ _f3f.style.height=(_f3d+"px"); var _f40=_f3f.firstChild; if(_f40){ var _f41=this.getSectionHomeCell(_f3e); var _f42=_f3e.scrollHeight-_f41.offsetHeight; _f40.style.height=_f42+"px"; } } }; PinFreezeContainer.prototype.getElementByLID=function(_f43,tag,lid){ var _f46=getElementsByAttribute(_f43,tag,"lid",lid); if(_f46.length>0){ return _f46[0]; } return null; }; PinFreezeContainer.prototype.getContainerByLID=function(_f47){ var _f48=getElementsByAttribute(_f47,"table","pfclid","pfContainer_"+this.m_lidNS); if(_f48.length>0){ return _f48[0]; } return null; }; PinFreezeContainer.prototype.getSectionByLID=function(_f49,_f4a){ var _f4b=getElementsByAttribute(_f49,"div","pfslid",_f4a+"_"+this.m_lidNS); if(_f4b.length>0){ return _f4b[0]; } return null; }; PinFreezeContainer.getSectionNameFromSlid=function(slid){ return slid?slid.split("_")[0]:null; }; PinFreezeContainer.getLidFromSlid=function(slid){ return slid.split("_")[1]; }; PinFreezeContainer.nodeToSlid=function(_f4e){ while(_f4e.parentNode&&!_f4e.getAttribute("pfslid")){ _f4e=_f4e.parentNode; } if(_f4e.getAttribute){ return _f4e.getAttribute("pfslid"); } return null; }; PinFreezeContainer.prototype.cacheContainerAndSections=function(_f4f){ if(!_f4f){ return _f4f; } this.m_cachedPFContainer=_f4f; var _f50=getElementsByAttribute(this.m_cachedPFContainer,"div","pflid",this.m_lidNS); this.m_sectionCache={}; for(var i=0;i<_f50.length;++i){ var key=_f50[i].getAttribute("pfslid"); key=key.split("_",1); this.m_sectionCache[key]=_f50[i]; } return _f4f; }; 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(_f54){ var slid=PinFreezeContainer.nodeToSlid(_f54); if(!this.m_homeCellNodes[slid]){ var _f56=getElementsByAttribute(_f54,"*","tabIndex","*"); for(var i in _f56){ if(!_f56[i].getAttribute("widgetid")){ this.m_homeCellNodes[slid]=_f56[i]; break; } } } }; PinFreezeContainer.prototype.updateTabIndexValues=function(){ if(this.isContainerFrozen()){ for(var slid in this.m_homeCellNodes){ var _f59=this.m_pinFreezeManager.isNodeVisible(this.m_homeCellNodes[slid])?"0":"-1"; this.m_homeCellNodes[slid].setAttribute("tabIndex",_f59); } }else{ for(var slid in this.m_homeCellNodes){ var _f59=(PinFreezeContainer.getSectionNameFromSlid(slid)==="pfMainOutput")?"0":"-1"; this.m_homeCellNodes[slid].setAttribute("tabIndex",_f59); } } }; PinFreezeContainer.prototype.getSectionHomeCell=function(_f5a){ if(_f5a){ var _f5b=this.getElementByLID(_f5a,"table",this.m_lid+this.m_viewerId); if(_f5b&&_f5b.rows.length&&_f5b.rows[0].cells.length){ return _f5b.rows[0].cells[0]; } } return null; }; PinFreezeContainer.prototype.getMainOutputHomeCell=function(){ var _f5c=this.getSection("pfMainOutput"); if(!_f5c){ _f5c=this.getSectionByLID(this.m_cachedPFContainer,"pfMainOutput"); } return this.getSectionHomeCell(_f5c); }; PinFreezeContainer.prototype.getChildPosition=function(_f5d,_f5e){ for(var i=0;i<_f5d.childNodes.length;++i){ if(_f5d.childNodes[i]==_f5e){ return i; } } return -1; }; PinFreezeContainer.prototype.insertAt=function(_f60,_f61,_f62){ if(_f62==_f60.childNodes.length){ _f60.appendChild(_f61); }else{ _f60.insertBefore(_f61,_f60.childNodes[_f62]); } }; PinFreezeContainer.prototype.synchScroll=function(){ if(!this.m_cachedPFContainer){ return; } var _f63=this.getMainOutputHomeCell(); var _f64=this.getSection("pfMainOutput"); var _f65=this.getSection("pfSideHeadings"); if(_f65!=null){ var _f66=this.getSection("pfHorizontalScrollBar"); if(_f66){ var _f67=this.getSideHeadingSectionWidth(_f63); if(getElementDirection(_f64)==="rtl"){ _f67=0; } setScrollLeft(_f64,getScrollLeft(_f66)+_f67); if(this.m_freezeTop){ setScrollLeft(this.getSection("pfTopHeadings"),getScrollLeft(_f66)+_f67); } } } }; PinFreezeContainer.prototype.updateScroll=function(_f68){ var slid=PinFreezeContainer.nodeToSlid(_f68); if(!slid){ return; } var _f6a=PinFreezeContainer.getSectionNameFromSlid(slid); if(!_f6a){ return; } var _f6b=document.getElementById("CVReport"+this.m_viewerId); if(!_f6b){ return; } if(!this.m_cachedPFContainer){ return; } var _f6c=_f68.parentNode; if(_f6c){ var _f6d=_f6c.tagName.toLowerCase(); if(_f6d==="td"||_f6d==="th"){ var _f6e=this.getMainOutputHomeCell(); var _f6f=this.getSection("pfMainOutput"); if(_f6a==="pfMainOutput"||_f6a==="pfTopHeadings"){ var _f70=this.getSection("pfHorizontalScrollBar"); if(_f70){ var _f71=PinFreezeContainer.calculateNewPosition(_f6c.offsetLeft,_f6c.offsetWidth,getScrollLeft(_f6f),_f6f.offsetWidth); var _f72=this.getHomeCellOffsetWidth(_f6e); if(getElementDirection(_f6f)==="rtl"){ _f72=0; } setScrollLeft(_f70,_f71-_f72); setScrollLeft(_f6f,_f71); } } if(_f6a==="pfMainOutput"||_f6a==="pfSideHeadings"){ var _f73=this.getSection("pfVerticalScrollBar"); if(_f73){ var _f74=PinFreezeContainer.calculateNewPosition(_f6c.offsetTop,_f6c.offsetHeight,_f6f.scrollTop,_f6f.offsetHeight); _f73.scrollTop=_f74-_f6e.offsetHeight; _f6f.scrollTop=_f74; } } } } }; PinFreezeContainer.calculateNewPosition=function(_f75,_f76,_f77,_f78){ var _f79=_f75+_f76; var _f7a=_f77+_f78; if(_f77>_f75){ return _f75; }else{ if(_f7a<_f79){ if(_f76>_f78){ return _f75; } return _f79-_f78; } } return _f77; }; PinFreezeContainer.prototype.synchVScroll=function(){ if(!this.m_cachedPFContainer){ return; } var _f7b=this.getMainOutputHomeCell(); var _f7c=this.getSection("pfMainOutput"); var _f7d=this.getSection("pfTopHeadings"); if(_f7d!=null){ var _f7e=this.getSection("pfVerticalScrollBar"); if(_f7e){ _f7c.scrollTop=_f7e.scrollTop+this.getTopHeadingSectionHeight(_f7b); if(this.m_freezeSide){ this.getSection("pfSideHeadings").scrollTop=_f7e.scrollTop+this.getTopHeadingSectionHeight(_f7b); } } } }; PinFreezeContainer.prototype.getTopHeadingSectionHeight=function(_f7f){ return _f7f.offsetHeight+_f7f.offsetTop+this.m_containerMargin.top; }; PinFreezeContainer.prototype._findBestGuessHomeCell=function(_f80){ if(this.m_bestGuessHomeCell){ return this.m_bestGuessHomeCell; } if(_f80){ var _f81=_f80.parentNode.parentNode; var _f82=_f80.rowSpan?(_f80.rowSpan):1; var tr=_f81.childNodes[_f82]; if(tr){ var _f84=tr.childNodes.length; var _f85=null; var td=null; for(var i=0;i<_f84;i++){ td=tr.childNodes[i]; if(td.getAttribute("type")=="datavalue"){ break; } _f85=td; } if(_f85){ this.m_bestGuessHomeCell=_f85; return this.m_bestGuessHomeCell; } }else{ return _f80; } } return null; }; PinFreezeContainer.prototype.getHomeCellOffsetWidth=function(_f88){ var _f89=this._findBestGuessHomeCell(_f88); return _f89?_f89.offsetWidth:0; }; PinFreezeContainer.prototype.getSideHeadingSectionWidth=function(_f8a){ var _f8b=this._findBestGuessHomeCell(_f8a); if(_f8b){ return _f8b.offsetWidth+_f8b.offsetLeft+this.m_containerMargin.left; }else{ return _f8a.offsetWidth+_f8a.offsetLeft; } }; PinFreezeContainer.prototype.isContainerFrozen=function(){ return (this.m_freezeTop||this.m_freezeSide); }; PinFreezeContainer.prototype.unfreeze=function(_f8c){ var _f8d=this.getContainerByLID(_f8c); this.m_freezeTop=false; this.m_freezeSide=false; if(_f8d){ var _f8e=_f8d.parentNode; pfMainOutput=this.getSectionByLID(_f8d,"pfMainOutput"); if(pfMainOutput&&_f8e){ if(_f8d.style.border!==""){ pfMainOutput.firstChild.style.border=_f8d.style.border; _f8d.style.border=""; } if(this.m_wrapFlag){ var _f8f=pfMainOutput.firstChild.getElementsByTagName("span"); if(_f8f){ for(var k=0;k<_f8f.length;k++){ _f8f[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; } _f8e.replaceChild(this.m_pinFreezeManager.deepCloneNode(pfMainOutput.firstChild),_f8d); } } }; PinFreezeContainer.prototype.getBorderInfo=function(el,_f92){ var _f93={}; var _f94="border-"+_f92+"-"; var _f95="border"+_f92.charAt(0).toUpperCase()+_f92.substring(1); if(el.currentStyle){ _f93[_f95+"Width"]=el.currentStyle[_f95+"Width"]; _f93[_f95+"Style"]=el.currentStyle[_f95+"Style"]; _f93[_f95+"Color"]=el.currentStyle[_f95+"Color"]; }else{ if(window.getComputedStyle){ _f93[_f95+"Width"]=window.getComputedStyle(el,null).getPropertyValue(_f94+"width"); _f93[_f95+"Style"]=window.getComputedStyle(el,null).getPropertyValue(_f94+"style"); _f93[_f95+"Color"]=window.getComputedStyle(el,null).getPropertyValue(_f94+"color"); }else{ return null; } } return _f93; }; PinFreezeContainer.prototype.isA11yEnabled=function(_f96){ return (_f96.getAttribute("role")==="grid"); }; PinFreezeContainer.isElementInMainOutput=function(_f97){ var _f98=PinFreezeContainer.nodeToSlid(_f97); if(_f98){ return (_f98.indexOf("pfMainOutput_")===0); } return false; }; PinFreezeContainer.prototype.removeCTX=function(_f99){ _f99.removeAttribute("ctx"); var _f9a=getElementsByAttribute(_f99,"*","ctx","*"); if(_f9a&&_f9a.length){ for(var i=0;i<_f9a.length;i++){ _f9a[i].removeAttribute("ctx"); } } }; PinFreezeContainer.prototype.initializeTouchScrolling=function(_f9c){ if(!this.m_pinFreezeManager.isIWidgetMobile()){ return; } if(_f9c){ _f9c.m_pinFreezeContainer=this; if(document.attachEvent){ _f9c.attachEvent("touchstart",this.touchStart); _f9c.attachEvent("touchmove",this.touchMove); _f9c.attachEvent("touchend",this.touchEnd); }else{ _f9c.addEventListener("touchstart",this.touchStart,false); _f9c.addEventListener("touchmove",this.touchMove,false); _f9c.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(_f9d){ if(!this.m_pinFreezeManager.isIWidgetMobile()){ return; } if(_f9d){ if(document.detachEvent){ _f9d.detachEvent("touchstart",this.touchStart); _f9d.detachEvent("touchmove",this.touchMove); _f9d.detachEvent("touchend",this.touchEnd); }else{ _f9d.removeEventListener("touchstart",this.touchStart,false); _f9d.removeEventListener("touchmove",this.touchMove,false); _f9d.removeEventListener("touchend",this.touchEnd,false); } } }; PinFreezeContainer.prototype.touchMove=function(e){ if(this.m_pinFreezeContainer&&e&&e.changedTouches&&e.touches&&e.touches.length==1){ var _f9f=e.changedTouches[0]; if(_f9f&&_f9f.clientX&&_f9f.clientY){ var _fa0=parseInt(_f9f.clientX); var _fa1=parseInt(_f9f.clientY); if(this.m_pinFreezeContainer.touchMoveHandler(_fa0,_fa1)){ return stopEventBubble(e); } } } }; PinFreezeContainer.prototype.touchStart=function(e){ if(this.m_pinFreezeContainer&&e&&e.changedTouches&&e.touches&&e.touches.length==1){ var _fa3=e.changedTouches[0]; if(_fa3&&_fa3.clientX&&_fa3.clientY){ var _fa4=parseInt(_fa3.clientX); var _fa5=parseInt(_fa3.clientY); this.m_pinFreezeContainer.touchStartHandler(_fa4,_fa5); } } }; PinFreezeContainer.prototype.touchStartHandler=function(_fa6,_fa7){ this.touchScrollSections=false; this.touchPreviousX=_fa6; this.touchPreviousY=_fa7; }; PinFreezeContainer.prototype.touchEnd=function(e){ if(this.m_pinFreezeContainer&&this.m_pinFreezeContainer.touchEndHandler()){ stopEventBubble(e); } }; PinFreezeContainer.prototype.touchEndHandler=function(){ var _fa9=this.touchScrollSections; this.touchScrollSections=false; this.touchPreviousX=-1; this.touchPreviousY=-1; return _fa9; }; PinFreezeContainer.prototype.touchMoveHandler=function(_faa,_fab){ var _fac=this.getSection("pfMainOutput"); if(!_fac){ return; } var _fad=this.getSectionHomeCell(_fac); var _fae=this.getTopHeadingSectionHeight(_fad); var _faf=this.getSideHeadingSectionWidth(_fad); var _fb0=_fab-this.touchPreviousY; var _fb1=_faa-this.touchPreviousX; if(this.touchScrollSections){ if(_fb0!=0){ var _fb2=_fac.scrollTop-_fb0; _fb2=(_fb2>_fae)?_fb2:_fae; _fac.scrollTop=_fb2; var _fb3=this.getSection("pfSideHeadings"); if(_fb3){ _fb3.scrollTop=_fb2; } } if(_fb1!=0){ var _fb4=_fac.scrollLeft-_fb1; _fb4=(_fb4>_faf)?_fb4:_faf; _fac.scrollLeft=_fb4; var _fb5=this.getSection("pfTopHeadings"); if(_fb5){ _fb5.scrollLeft=_fb4; } } }else{ this.firstTouchMove(_fac,_fb1,_fb0,_faf,_fae); } this.touchPreviousX=_faa; this.touchPreviousY=_fab; return this.touchScrollSections; }; PinFreezeContainer.prototype.firstTouchMove=function(_fb6,_fb7,_fb8,_fb9,_fba){ var _fbb=this.mostlyVerticalTouchMove(_fb7,_fb8); var _fbc=PinFreezeContainer.isSectionVisible(this.getSection("pfTopHeadings")); var _fbd=PinFreezeContainer.isSectionVisible(this.getSection("pfSideHeadings")); if(_fbb&&(!_fbc||(_fb8>0&&_fb6.scrollTop<=_fba)||(_fb8<0&&_fb6.scrollTop+_fb6.clientHeight>=_fb6.scrollHeight))){ this.touchScrollSections=false; }else{ if(!_fbb&&(!_fbd||(_fb7>0&&_fb6.scrollLeft<=_fb9)||(_fb7<0&&_fb6.scrollLeft+_fb6.clientWidth>=_fb6.scrollWidth))){ this.touchScrollSections=false; }else{ this.touchScrollSections=true; } } }; PinFreezeContainer.prototype.mostlyVerticalTouchMove=function(_fbe,_fbf){ var _fc0=(_fbe>0)?_fbe:0-_fbe; var _fc1=(_fbf>0)?_fbf:0-_fbf; return (_fc1>_fc0); }; 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,_fc4,_fc5,_fc6,_fc7){ if(_fc4||_fc5){ if(!this.m_frozenInfo){ this.m_frozenInfo={}; } if(!this.m_frozenInfo[lid]){ this._createDefaultFrozenInfo(lid); } this.m_frozenInfo[lid].freezeTop=_fc4; this.m_frozenInfo[lid].freezeSide=_fc5; var _fc8=this.newContainer(lid,_fc4,_fc5,_fc6,_fc7); this.m_frozenInfo[lid].pinFreezeContainers.push(_fc8); return _fc8; } return null; }; PinFreezeManager.prototype.newContainer=function(lid,_fca,_fcb,_fcc,_fcd){ return new PinFreezeContainer(this,lid,this.m_viewerId,_fca,_fcb,_fcc,_fcd); }; 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 _fd1=this.m_frozenInfo[lid]; if(_fd1){ delete _fd1.pinFreezeContainers; _fd1.pinFreezeContainers=[]; _fd1.freezeTop=false; _fd1.freezeSide=false; } }; PinFreezeManager.prototype.prepopulateFrozenInfo=function(_fd2){ var _fd3=getDescendantElementsByAttribute(_fd2,"table","lid","",false,-1,new RegExp("[\\s\\S]*")); if(_fd3){ if(!this.m_frozenInfo){ this.m_frozenInfo={}; } for(var i=0;i<_fd3.length;i++){ var _fd5=_fd3[i]; if(_fd5.getAttribute("id")=="rt"+this.m_viewerId){ continue; } var lid=this.removeNamespace(_fd5.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 _fd7=getDescendantElementsByAttribute(_fd5,"table","lid","",false,-1,new RegExp("[\\s\\S]*")); if(_fd7){ for(var _fd8=0;_fd8<_fd7.length;_fd8++){ var _fd9=_fd7[_fd8]; var _fda=this.removeNamespace(_fd9.getAttribute("lid")); if(!this.m_frozenInfo[lid].childContainers[_fda]){ var _fdb=_fd9.parentNode; while(_fdb&&!_fdb.getAttribute("lid")){ _fdb=_fdb.parentNode; } if(_fdb&&this.removeNamespace(_fdb.getAttribute("lid"))==lid){ this.m_frozenInfo[lid].childContainers[_fda]=true; } } } } } this._updateParentContainerInfo(); } }; PinFreezeManager.prototype._updateParentContainerInfo=function(){ for(var _fdc in this.m_frozenInfo){ var _fdd=this.m_frozenInfo[_fdc].childContainers; if(_fdd){ for(var _fde in _fdd){ if(this.m_frozenInfo[_fde]){ this.m_frozenInfo[_fde].parentContainer=_fdc; 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,_fe1,_fe2){ var _fe3=document.getElementById("CVReport"+this.m_viewerId); this.prepopulateFrozenInfo(_fe3); var _fe4=this.getTopLevelContainerLID(lid); this.unfreezeAllNestedContainers(_fe4,_fe3); this.m_frozenInfo[lid].freezeTop=_fe1; this.m_frozenInfo[lid].freezeSide=_fe2; var _fe5=this._createPinAndFreezeObject(_fe3,_fe4); this.m_lastWidthProcessed=0; this.m_lastHeightProcessed=0; this._resizePinFreezeObjects(_fe5); this.sectionStructureChange(); if(isIE()){ var obj=this; setTimeout(function(){ obj.refresh(); },1); var _fe7=document.getElementById("RVContent"+this.m_viewerId); this.m_oCV.repaintDiv(_fe7); } return _fe5; }; 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,_fec){ if(this.m_frozenInfo&&this.m_frozenInfo[lid]&&this.m_frozenInfo[lid].pinFreezeContainers[0]){ _fec=_fec?_fec:0; return this.m_frozenInfo[lid].pinFreezeContainers[_fec]; } return null; }; PinFreezeManager.prototype.nodeToContainer=function(node){ var slid=PinFreezeContainer.nodeToSlid(node); var _fef=null; if(slid){ var lid=this.removeNamespace(PinFreezeContainer.getLidFromSlid(slid)); _fef=this.getContainer(lid); } return _fef; }; PinFreezeManager.prototype.getContainerElement=function(_ff1){ var lid=this.removeNamespace(_ff1.getAttribute("lid")); if(lid){ var _ff3=this.getContainer(lid); if(_ff3){ return _ff3.getContainer(); } } return null; }; PinFreezeManager.prototype._createPinAndFreezeObject=function(_ff4,lid){ var _ff6=null; if(this.m_frozenInfo){ var _ff7=this.m_frozenInfo[lid]; var _ff8=_ff7.initialLoad; if(_ff8){ delete _ff7.initialLoad; } var _ff9=_ff7.freezeTop; var _ffa=_ff7.freezeSide; var _ffb=null; if(_ff8&&_ff7.pinFreezeContainers&&(_ff9||_ffa)){ _ffb=_ff7.pinFreezeContainers.slice(0); } var _ffc=_ff4; if(_ff7&&_ff7.parentContainer){ var _ffd=getElementsByAttribute(_ff4,"table","lid",_ff7.parentContainer+this.m_viewerId); if(_ffd){ for(parentIndex=0;parentIndex<_ffd.length;parentIndex++){ if(!_ffd[parentIndex].getAttribute("clonednode")){ _ffc=_ffd[parentIndex]; break; } } } } if(_ff7.childContainers){ for(var _ffe in _ff7.childContainers){ var _fff=this._createPinAndFreezeObject(_ffc,_ffe); _ff6=_ff6?_ff6:_fff; } } var _1000=getElementsByAttribute(_ffc,"table","lid",lid+this.m_viewerId); if(_1000&&_1000.length>0){ delete _ff7.pinFreezeContainers; _ff7.pinFreezeContainers=[]; }else{ return null; } if(_1000&&(_ff9||_ffa)){ var _1001=(_ff6!==null); for(var i=0;i<_1000.length;i++){ var _1003=_1000[i]; if(_1003.getAttribute("clonednode")=="true"){ continue; } _ff6=this.addContainerObject(lid,_ff9,_ffa,_1003,i); if(_ff6){ _ff6.createPFContainer(_ffc,_1001); if(_ff8){ _ff6.copyProperties(_ffb[0]); } _ff6.freezeContainerInReport(_ff4); } } } } return _ff6; }; PinFreezeManager.prototype.renderReportWithFrozenContainers=function(_1004){ if(this.m_frozenInfo){ var _1005=false; var _1006=null; for(var _1007 in this.m_frozenInfo){ var _1008=this.m_frozenInfo[_1007]; if(!_1005){ _1005=_1008.initialLoad; } if(!_1008.parentContainer){ var temp=this._createPinAndFreezeObject(_1004,_1008.lid); _1006=_1006?_1006:temp; } } if(!_1005&&_1006){ this._resizePinFreezeObjects(_1006); } this.refresh(); } }; PinFreezeManager.prototype._resizePinFreezeObjects=function(_100a){ var _100b,width; var _100d=this.m_oCV.getViewerWidget(); if(_100d){ var size=_100d.getWidgetSize(); width=(size&&size.w&&(size.w2)?width:0; var _1016=(Math.abs(_1012-this.m_lastHeightProcessed)>2)?_1012:0; for(var lid in this.m_frozenInfo){ if(!this.m_frozenInfo[lid].parentContainer){ this.resizeContainer(lid,_1015,_1016); } } this.m_lastWidthProcessed=width; this.m_lastHeightProcessed=_1012; }; PinFreezeManager.prototype.resizeContainer=function(lid,width,_101a){ var _101b=this.m_frozenInfo[lid]; if(_101b){ var _101c=null; if(_101b.childContainers){ var _101d=width>10?width-10:width; var _101e=_101a>10?_101a-10:_101a; for(var _101f in _101b.childContainers){ _101c=this.resizeContainer(_101f,_101d,_101e); } } var _1020=_101b.pinFreezeContainers; var _1021=null; var _1022=null; if(_1020){ for(var i=0;i<_1020.length;i++){ _1021=_1020[i]; _1021.resize(width,_101a,_101b.parentContainer,_101c); var _1024=_1021.getContainer(); if(_1024&&(!_1022||(_1022.width<_1024.clientWidth))){ _1022={"width":_1024.clientWidth,"lid":_1021.m_lidNS}; } } } return _1022; } }; PinFreezeManager.prototype.processAutoResize=function(width,_1026){ this.m_lastWidthProcessed=width; this.m_lastHeightProcessed=_1026; }; PinFreezeManager.prototype.onSetVisible=function(){ this.refresh(); if(this.m_repaintOnVisible){ this.rePaint(); this.m_repaintOnVisible=false; } }; PinFreezeManager.prototype.onResizeCanvas=function(_1027){ if(_1027){ 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 _1029 in this.m_frozenInfo){ var _102a=this.m_frozenInfo[_1029].pinFreezeContainers; if(_102a){ for(var i=0;i<_102a.length;i++){ var _102c=_102a[i]; _102c.synchScroll(); _102c.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(_1039){ var _103a=this.m_oCV.getSelectionController().getAllSelectedObjects(); if(_103a&&_103a.length&&(_103a[0].getDataContainerType()==="crosstab"||(_1039&&_103a[0].getDataContainerType()==="list"))){ var lid=(_103a[0].getLayoutElementId()); if(lid){ if(!this.hasPromptControlsInFreezableCells(lid)){ return this.removeNamespace(lid); } } } return null; }; PinFreezeManager.prototype.hasPromptControlsInFreezableCells=function(lid){ var _103d=this.m_oCV.getLayoutElementFromLid(lid); var _103e=getElementsByAttribute(_103d,["td","th"],"type","columnTitle"); var _103f=new RegExp("(^|[W])clsPromptComponent($|[W])"); var _1040=isIE()?"className":"class"; for(var j in _103e){ if(_103e.hasOwnProperty(j)){ var _1042=getElementsByAttribute(_103e[j],"*",_1040,null,1,_103f); if(_1042.length>0){ return true; } } } return false; }; PinFreezeManager.prototype.unfreeze=function(lid,_1044,reset){ if(this.m_frozenInfo&&this.m_frozenInfo[lid]){ var _1046=this.m_frozenInfo[lid].pinFreezeContainers; if(_1046){ for(var i=0;i<_1046.length;i++){ var _1048=_1046[i]; _1048.unfreeze(_1044); } if(reset){ this._resetFrozenInfo(lid); } } } }; PinFreezeManager.prototype.unfreezeAllNestedContainers=function(lid,_104a){ var _104b=this.m_frozenInfo[lid]; if(_104b){ if(_104b.freezeTop||_104b.freezeSide){ this.unfreeze(lid,_104a,false); } if(_104b.childContainers){ for(var _104c in _104b.childContainers){ this.unfreezeAllNestedContainers(_104c,_104a); } } } }; PinFreezeManager.prototype.isNodeVisible=function(node){ var slid=PinFreezeContainer.nodeToSlid(node); if(!slid){ return true; } var lid=this.removeNamespace(PinFreezeContainer.getLidFromSlid(slid)); var _1050=this.getContainer(lid); if(!_1050){ return true; } var _1051=PinFreezeContainer.getSectionNameFromSlid(slid); var _1052=_1050.getSection(_1051); var _1053=null,_1054=null; var nodeI=node; var _1056=null; while(nodeI&&nodeI!==_1052&&!_1053&&!_1054){ _1053=_1050.getMain(nodeI); _1054=_1050.getCopy(nodeI); _1056=nodeI; nodeI=nodeI.parentNode; } var _1057=_1053?true:false; var _1058=_1054?true:false; if(_1057){ return _1050.getCopy(_1053)===_1056; }else{ if(_1058){ return _1050.getCopy(_1056)?false:true; }else{ return true; } } }; PinFreezeManager.prototype.sectionStructureChange=function(){ var _1059=this.m_oCV.getViewerWidget(); if(_1059&&_1059.getAnnotationHelper()){ _1059.getAnnotationHelper().repositionCommentIndicators(); } }; PinFreezeManager.prototype.deepCloneNode=function(_105a){ var copy=_105a.cloneNode(true); var _105c=this.m_oCV.getViewerWidget(); if(_105c){ if(_105c.reportContainsDijits()){ var _105d=getElementsByAttribute(copy,"*","widgetid","*"); if(_105d&&_105d.length){ for(var i=0;i<_105d.length;i++){ _105d[i].parentNode.removeChild(_105d[i]); } } } } return copy; }; PinFreezeManager.prototype.toJSONString=function(){ var _105f=""; var _1060=""; for(var _1061 in this.m_frozenInfo){ if(_105f.length>0){ _105f+=","; } var _1062=this.m_frozenInfo[_1061]; _105f+="{"; _105f+="\"lid\":\""+_1062.lid.replace("\"","\\\"")+"\","; _105f+="\"freezeTop\":"+_1062.freezeTop+","; _105f+="\"freezeSide\":"+_1062.freezeSide+","; if(_1062.parentContainer){ _105f+="\"parentContainer\":\""+_1062.parentContainer+"\","; } if(_1062.pinFreezeContainers&&_1062.pinFreezeContainers.length>0){ _105f+="\"properties\":"+_1062.pinFreezeContainers[0].toJSONString()+","; } _105f+="\"childContainers\": {"; if(_1062.childContainers){ var first=true; for(var _1064 in _1062.childContainers){ if(!first){ _105f+=","; } _105f+="\""+_1064+"\":true"; first=false; } } _105f+="}}"; } if(_105f.length>0){ _1060="{\"version\":1, \"containers\":["+_105f+"]}"; } return _1060; }; PinFreezeManager.prototype.fromJSONString=function(sJSON){ if(!sJSON||sJSON.length===0){ return; } var oJSON=null; try{ oJSON=eval("("+sJSON+")"); } catch(e){ if(typeof console!="undefined"){ console.log("PinFreezeManager.prototype.fromJSON could not parse JSON - "+sJSON); console.log(e); } } if(!oJSON){ return; } var _1067=oJSON.containers; var _1068=oJSON.version; if(_1067.length>0){ this.m_frozenInfo={}; } for(var _1069=0;_1069<_1067.length;_1069++){ var _106a=_1067[_1069]; var lid=_106a.lid; var _106c=_106a.freezeTop; var _106d=_106a.freezeSide; var _106e=document.getElementById("CVReport"+this.m_viewerId); var _106f=getElementsByAttribute(_106e,"table","lid",lid+this.m_viewerId); var _1070=[]; if(_106f&&(_106c||_106d)){ for(var i=0;i<_106f.length;i++){ var _1072=_106f[i]; var _1073=new PinFreezeContainer(this,lid,this.m_viewerId,_106a.freezeTop,_106a.freezeSide,_1072,i); if(_106a.properties){ applyJSONProperties(_1073,_106a.properties); } _1070.push(_1073); } } this.m_frozenInfo[lid]={"lid":lid,"freezeTop":_106c,"freezeSide":_106d,"pinFreezeContainers":_1070,"initialLoad":true}; if(_1068>=1){ if(_106a.childContainers){ this.m_frozenInfo[lid].childContainers=_106a.childContainers; } if(_106a.parentContainer){ this.m_frozenInfo[lid].parentContainer=_106a.parentContainer; } } } }; PinFreezeManager.prototype.removeIdAttribute=function(_1074){ var _1075=_1074.getAttribute("id"); if(_1075!==null&&_1075!==""){ _1074.removeAttribute("id"); } var _1076=getElementsByAttribute(_1074,"*","id","*"); if(_1076&&_1076.length){ for(var i=0;i<_1076.length;i++){ _1076[i].removeAttribute("id"); } } return _1074; }; PinFreezeManager.prototype.isElementInMainOutput=function(_1078){ return PinFreezeContainer.isElementInMainOutput(_1078); }; PinFreezeManager.prototype.isIWidgetMobile=function(){ return (this.m_oCV&&this.m_oCV.isIWidgetMobile()); }; PinFreezeManager.prototype.destroy=function(){ GUtil.destroyProperties(this); }; function CViewerToolbar(){ this.m_specification=null; this.m_oCBar=null; this.m_sWebContentRoot=null; this.m_sSkin=null; }; CViewerToolbar.prototype.getNamespace=function(){ if(this.m_specification&&typeof this.m_specification.namespace!="undefined"){ return this.m_specification.namespace; } return ""; }; CViewerToolbar.prototype.getSkin=function(){ if(this.m_sSkin==null){ var oCV=null; try{ oCV=getCognosViewerObjectRef(this.getNamespace()); } catch(exception){ } if(oCV){ this.m_sSkin=oCV.getSkin(); }else{ this.m_sSkin=this.getWebContentRoot()+"/skins/corporate"; } } return this.m_sSkin; }; CViewerToolbar.prototype.getWebContentRoot=function(){ if(this.m_sWebContentRoot==null){ var oCV=null; try{ oCV=getCognosViewerObjectRef(this.getNamespace()); } catch(exception){ } if(oCV){ this.m_sWebContentRoot=oCV.getWebContentRoot(); }else{ this.m_sWebContentRoot=".."; } } return this.m_sWebContentRoot; }; CViewerToolbar.prototype.getDivId=function(){ if(this.m_specification&&typeof this.m_specification.divId!="undefined"){ return this.m_specification.divId; } return ""; }; CViewerToolbar.prototype.getStyle=function(){ if(this.m_specification&&typeof this.m_specification.style!="undefined"){ return this.m_specification.style; } return ""; }; CViewerToolbar.prototype.getToolbarSpecification=function(){ if(this.m_specification&&typeof this.m_specification.S!="undefined"){ return new CViewerToolbarSpecification(this,this.m_specification.S); } return null; }; CViewerToolbar.prototype.getItem=function(sId){ if(this.m_oCBar){ var _107c=this.m_oCBar.getNumItems(); sId=this.getNamespace()+sId; for(var index=0;index<_107c;++index){ var _107e=this.m_oCBar.get(index); if(typeof _107e.getId=="function"&&_107e.getId()==sId){ return _107e; } } } return null; }; CViewerToolbar.prototype.init=function(_107f){ if(typeof _107f!="undefined"&&typeof _107f=="object"&&_107f!=null){ this.m_specification=_107f; } }; CViewerToolbar.prototype.getCBar=function(){ if(!this.m_oCBar&&this.m_specification){ this.load(); } return this.m_oCBar; }; CViewerToolbar.prototype.load=function(){ var _1080=null; if(this.m_specification!=null){ var divId=this.getDivId(); var _1082=document.getElementById(divId); var _1083=this.getToolbarSpecification(); if(_1082&&_1083){ _1080=_1083.draw(); } } this.m_oCBar=_1080; return _1080; }; CViewerToolbar.prototype.draw=function(){ if(this.m_oCBar){ this.m_oCBar.draw(); } }; function CViewerToolbarSpecification(_1084,_1085){ this.m_viewerToolbar=_1084; this.m_toolbarSpecification=_1085; }; CViewerToolbarSpecification.prototype.draw=function(){ if(this.m_toolbarSpecification){ var _1086=gToolbarStyle; if(this.m_viewerToolbar.getStyle()==="banner"){ _1086=gBannerToolbarStyle; } var _1087=new CBar(this.m_viewerToolbar.getDivId(),_1086,null,this.m_viewerToolbar.getWebContentRoot()); _1087.setMenuType(cHorizonalBar); _1087.style=this.m_viewerToolbar.getStyle(); _1087.setAlign("right"); var _1088=false; var _1089=null; var _108a=null; for(var _108b=0;_108b1)||(typeof _109a.H=="undefined"||_109a.H=="false"))){ var menu=new M(); _1099.m_menu=menu.load(_1090,_109a,_1092); _1099.m_menu.setParent(_1099); _1099.m_menuType=_109a.Y; } } return _1099; } return null; }; function I(){ }; I.prototype.isValid=function(_109c){ if(typeof _109c!="undefined"&&_109c!=null){ return true; } return false; }; I.prototype.load=function(_109d,_109e,_109f){ if(this.isValid(_109e)){ var sText=_109e.E; var _10a1=_109e.C; var _10a2=_109e.A; var sName=_109e.N; var _10a4=null; if(typeof _109e.M!="undefined"&&_109e.M.IS!="undefined"){ _10a4=_109e.M.IS; } if(typeof _109e.E=="undefined"){ if(_10a4&&_10a4[0]){ var _10a5=_10a4[0]["I"]; if(_10a5!=null&&this.isValid(_10a5)){ sText=_10a5.E; if(typeof sText=="undefined"||sText==""){ sText=_10a5.O; } _10a2=_10a5.A; } }else{ return null; } }else{ sText=_109e.E; _10a1=_109e.C; _10a2=_109e.A; } var _10a6=null; if(_109d.style&&_109d.style==="banner"){ _10a6=gBannerItemStyle; }else{ _10a6=gMenuItemStyle; } var _10a7=new CMenuItem(_109d,sText,_10a2,_10a1,_10a6,_109f.getWebContentRoot(),_109f.getSkin()); if(typeof _109e.ALT!="undefined"){ _10a7.setAltText(_109e.ALT); } if(_109d.style&&_109d.style==="banner"){ _10a7.setDropDownArrow("dropdown_arrow_banner.gif"); }else{ _10a7.setDropDownArrow("dropdown_arrow_narrow.gif"); } _10a7.setId(_109f.getNamespace()+sName); if(typeof _109e.D!="undefined"&&_109e.D=="true"){ _10a7.disable(); } if(typeof _109e.M!="undefined"){ var _10a8=_109e.M; if(typeof _10a8.Y!="undefined"&&(typeof _10a8.A!="undefined"||(_10a4&&_10a4.length>1)||(typeof _10a8.H=="undefined"||_10a8.H=="false"))){ var menu=new M(); _10a7.m_menu=menu.load(_109d,_10a8,_109f); _10a7.m_menu.setParent(_10a7); _10a7.m_menuType=_109e.M.Y; } } return _10a7; } return null; }; function M(){ }; M.prototype.isValid=function(_10aa){ return (typeof _10aa!="undefined"&&_10aa!=null&&typeof _10aa.id!="undefined"); }; M.prototype.load=function(_10ab,_10ac,_10ad){ if(this.isValid(_10ac)){ var menu=new CMenu(_10ac.id,gMenuStyle,_10ad.getWebContentRoot()); menu.setParent(_10ab); if(typeof _10ac.ALT!="undefined"){ menu.setAltText(_10ac.ALT); } try{ menu.m_oCV=getCognosViewerObjectRef(_10ad.getNamespace()); } catch(e){ } if(typeof _10ac.A!="undefined"){ menu.registerCallback(_10ac.A); } var _10af=_10ac.IS; if(_10af){ for(var _10b0=0;_10b0<_10af.length;_10b0++){ for(var _10b1 in _10af[_10b0]){ try{ var _10b2=new I(); _10b2.load(menu,_10af[_10b0][_10b1],_10ad); } catch(exception){ } } } } return menu; } return null; }; function T(){ }; T.prototype.isValid=function(_10b3){ return (typeof _10b3!="undefined"&&_10b3!=null&&typeof _10b3.E!="undefined"); }; T.prototype.load=function(_10b4,_10b5,_10b6){ if(this.isValid(_10b5)){ var _10b7=null; if(_10b6.getStyle()==="banner"){ _10b7=gBannerStaticText; }else{ } if(_10b5.E&&_10b5.E.length>0){ var _10b8=new CStaticText(_10b5.E,_10b7); if(_10b5.N=="userName"){ _10b8.setId("userNameTD"+_10b6.getNamespace()); } if(_10b5.ALT){ _10b8.setLabelledBy(_10b5.ALT+" "+_10b5.E); } _10b4.add(_10b8); } } return null; }; function L(){ }; L.prototype.isValid=function(_10b9){ return (typeof _10b9!="undefined"&&_10b9!=null&&typeof _10b9.E!="undefined"); }; L.prototype.load=function(_10ba,_10bb,_10bc){ if(this.isValid(_10bb)){ var _10bd=null; if(_10bc.getStyle()==="banner"){ _10bd=gBannerLink; }else{ } var _10be=_10bb.A; var _10bf=new CMenuItem(_10ba,_10bb.E,_10be,"",_10bd,_10bc.getWebContentRoot(),_10bc.getSkin()); _10bf.iconPlaceholder=false; if(_10bb.ALT!="undefined"){ _10bf.setAltText(_10bb.ALT); } return _10bf; } return null; }; function P(){ }; P.prototype.isValid=function(_10c0){ return (typeof _10c0!="undefined"&&_10c0!=null&&typeof _10c0.Y!="undefined"); }; P.prototype.load=function(_10c1,_10c2,_10c3){ if(this.isValid(_10c2)){ var _10c4=new CSeperator(_10c2.Y,"","",_10c3.getWebContentRoot()); if(_10c3.getStyle()==="banner"){ _10c4.setToolbarSeperatorClass("bannerDivider"); }else{ _10c4.setToolbarSeperatorClass("toolbarDivider"); } _10c1.add(_10c4); return _10c4; } return null; }; function GlossaryAction(){ }; GlossaryAction.prototype=new CognosViewerAction(); GlossaryAction.prototype.execute=function(){ var _10c5=this.getCognosViewer(); _10c5.loadExtra(); var _10c6=_10c5.getSelectionController(); var _10c7=_10c6.getAllSelectedObjects(); if(_10c7.length>0){ var _10c8=null; if(typeof MDSRV_CognosConfiguration!="undefined"){ _10c8=new MDSRV_CognosConfiguration(); var _10c9=""; if(_10c5.envParams["glossaryURI"]){ _10c9=_10c5.envParams["glossaryURI"]; } _10c8.addProperty("glossaryURI",_10c9); _10c8.addProperty("gatewayURI",_10c5.getGateway()); } var _10ca=_10c5.envParams["ui.object"]; var _10cb=getViewerSelectionContext(_10c6,new CSelectionContext(_10ca)); var _10cc=new MDSRV_BusinessGlossary(_10c8,_10cb); _10cc.open(); } }; GlossaryAction.prototype.updateMenu=function(_10cd){ if(!this.getCognosViewer().bCanUseGlossary){ return ""; } var _10ce=this.selectionHasContext(); if(!_10ce||this.getCognosViewer().envParams["glossaryURI"]==null||this.getCognosViewer().envParams["glossaryURI"]==""){ _10cd.disabled=true; }else{ _10cd.disabled=false; } return _10cd; }; function AuthoredDrillAction(){ this.m_drillTargetSpecification=""; }; AuthoredDrillAction.prototype=new CognosViewerAction(); AuthoredDrillAction.prototype.setRequestParms=function(_10cf){ this.m_drillTargetSpecification=_10cf; }; AuthoredDrillAction.prototype.executeDrillTarget=function(_10d0){ var _10d1=XMLHelper_GetFirstChildElement(XMLBuilderLoadXMLFromString(_10d0)); var _10d2=encodeURIComponent(_10d1.getAttribute("bookmarkRef")); var _10d3=_10d1.getAttribute("path"); var _10d4=this._shouldShowInNewWindow(_10d1); var oCV=this.getCognosViewer(); if((_10d2!==null&&_10d2!=="")&&(_10d3===null||_10d3==="")){ var _10d6=_10d1.getAttribute("bookmarkPage"); if(_10d6&&_10d6!==""){ oCV.executeAction("GotoPage",{"pageNumber":_10d6,"anchorName":_10d2}); }else{ document.location="#"+_10d2; } }else{ var _10d7=""; if(_10d4){ _10d7="_blank"; } var _10d8=[]; var _10d9=[]; _10d9.push("obj"); _10d9.push(_10d3); _10d8[_10d8.length]=_10d9; var _10da=false; var _10db,_10dc,_10dd,sName,sNil; var _10e0=XMLHelper_FindChildrenByTagName(_10d1,"drillParameter",false); for(var index=0;index<_10e0.length;++index){ _10db=[]; _10dc=_10e0[index]; _10dd=_10dc.getAttribute("value"); sName=_10dc.getAttribute("name"); if(_10dd!==null&&_10dd!==""){ _10db.push("p_"+sName); _10db.push(this.buildSelectionChoicesSpecification(_10dc)); } sNil=_10dc.getAttribute("nil"); if(sNil!==null&&sNil!==""){ _10db.push("p_"+sName); _10db.push(this.buildSelectionChoicesNilSpecification()); } if(_10db.length>0){ _10d8[_10d8.length]=_10db; } if(!_10da){ var _10e2=_10dc.getAttribute("propertyToPass"); _10da=(_10e2&&_10e2.length>0)?true:false; } } var _10e3=_10d1.getAttribute("method"); var _10e4=_10d1.getAttribute("outputFormat"); var _10e5=_10d1.getAttribute("outputLocale"); var _10e6=_10d1.getAttribute("prompt"); var _10e7=_10d1.getAttribute("dynamicDrill"); var _10e8=this.getXMLNodeAsString(_10d1,"parameters"); var _10e9=this.getXMLNodeAsString(_10d1,"objectPaths"); var oCVId=oCV.getId(); var _10eb=document.forms["formWarpRequest"+oCVId]; var _10ec=oCV.getAdvancedServerProperty("VIEWER_JS_CALL_FORWARD_DRILLTHROUGH_TO_SELF"); if((!_10ec||_10ec.toLowerCase()!=="false")&&_10e6!="true"&&this.isSameReport(_10eb,_10d3)&&this.isSameReportFormat(_10e4)&&!_10d4&&!_10da){ var _10ed=new ViewerDispatcherEntry(oCV); _10ed.addFormField("ui.action","forward"); if(oCV!==null&&typeof oCV.rvMainWnd!="undefined"){ oCV.rvMainWnd.addCurrentReportToReportHistory(); var _10ee=oCV.rvMainWnd.saveReportHistoryAsXML(); _10ed.addFormField("cv.previousReports",_10ee); } for(index=0;index<_10e0.length;++index){ _10db=[]; _10dc=_10e0[index]; _10dd=_10dc.getAttribute("value"); sName=_10dc.getAttribute("name"); sNil=_10dc.getAttribute("nil"); if((sNil===null||sNil==="")&&(_10dd===null||_10dd==="")){ _10db.push("p_"+sName); _10db.push(this.buildSelectionChoicesNilSpecification()); } if(_10db.length>0){ _10d8[_10d8.length]=_10db; } } for(index=1;index<_10d8.length;index++){ _10ed.addFormField(_10d8[index][0],_10d8[index][1]); } _10ed.addFormField("_drillThroughToSelf","true"); if(oCV.m_tabsPayload&&oCV.m_tabsPayload.tabs){ _10ed.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",oCV.m_tabsPayload.tabs[0].id); } oCV.setUsePageRequest(true); oCV.dispatchRequest(_10ed); if(typeof oCV.m_viewerFragment=="undefined"){ var _10ef=getCognosViewerObjectRefAsString(oCVId); setTimeout(_10ef+".getRequestIndicator().show()",10); } }else{ doSingleDrill(_10d7,_10d8,_10e3,_10e4,_10e5,_10d2,_10e8,_10e9,this.getCognosViewer().getId(),_10e6,_10e7); } } }; AuthoredDrillAction.prototype._shouldShowInNewWindow=function(_10f0){ return _10f0.getAttribute("showInNewWindow")=="true"; }; AuthoredDrillAction.prototype.isSameReport=function(_10f1,_10f2){ if(_10f1["ui.object"]&&_10f2==_10f1["ui.object"].value){ return true; } return false; }; AuthoredDrillAction.prototype.isSameReportFormat=function(_10f3){ var _10f4=this.getCognosViewer().envParams["run.outputFormat"]; if(_10f4){ if(_10f3==_10f4){ return true; }else{ if(_10f4=="HTML"&&_10f3=="HTMLFragment"){ return true; } } } return false; }; AuthoredDrillAction.prototype.getXMLNodeAsString=function(_10f5,_10f6){ var sXML=""; if(_10f5!=null){ var node=XMLHelper_FindChildByTagName(_10f5,_10f6,false); if(node!=null){ sXML=XMLBuilderSerializeNode(node); } } return sXML; }; AuthoredDrillAction.prototype.execute=function(_10f9){ if(this.m_drillTargetSpecification!=""){ this.executeDrillTarget(this.m_drillTargetSpecification); }else{ if(typeof _10f9!="undefined"){ var _10fa=this.getCognosViewer().getDrillTargets(); var _10fb=this.getAuthoredDrillThroughContext(_10f9,_10fa); var _10fc=_10fb.childNodes; if(_10fc.length==1){ this.executeDrillTarget(XMLBuilderSerializeNode(_10fc[0])); }else{ doMultipleDrills(XMLBuilderSerializeNode(_10fb),this.getCognosViewer().getId()); } } } }; AuthoredDrillAction.prototype.showDrillTargets=function(_10fd){ var _10fe=""; for(var index=0;index<_10fd.length;++index){ var _1100=_10fd[index]; _10fe+=""; var sName=_1100.getAttribute("label"); _10fe+=""; _10fe+=sXmlEncode(sName); _10fe+=""; var _1102=_1100.getAttribute("path"); _10fe+=""; _10fe+=sXmlEncode(_1102); _10fe+=""; var _1103=_1100.getAttribute("method"); _10fe+=""; _10fe+=sXmlEncode(_1103); _10fe+=""; var _1104=_1100.getAttribute("outputFormat"); _10fe+=""; _10fe+=sXmlEncode(_1104); _10fe+=""; var sData="parent."+this.getTargetReportRequestString(_1100); _10fe+=""; _10fe+=sXmlEncode(sData); _10fe+=""; _10fe+=""; } _10fe+=""; }; AuthoredDrillAction.prototype.populateContextMenu=function(_1106){ var _1107=this.getCognosViewer(); var _1108=_1107.rvMainWnd.getToolbarControl(); var _1109=null; if(typeof _1108!="undefined"&&_1108!=null){ var _110a=_1108.getItem("goto"); if(_110a){ _1109=_110a.getMenu(); } } var _110b=_1107.rvMainWnd.getContextMenu(); var _110c=null; if(typeof _110b!="undefined"&&_110b!=null){ _110c=_110b.getGoToMenuItem().getMenu(); } if(_1109!=null||_110c!=null){ var _110d=this.getCognosViewer().getDrillTargets(); var _110e=this.getAuthoredDrillThroughContext(_1106,_110d); var _110f=_110e.childNodes; if(_110f.length>0){ for(var index=0;index<_110f.length;++index){ var _1111=_110f[index]; var _1112=getCognosViewerObjectRefAsString(this.getCognosViewer().getId())+".m_oDrillMgr.executeAuthoredDrill(\""+encodeURIComponent(XMLBuilderSerializeNode(_1111))+"\");"; var _1113=this.getTargetReportIconPath(_1111); var _1114=_1111.getAttribute("label"); if(isViewerBidiEnabled()){ var bidi=BidiUtils.getInstance(); _1114=bidi.btdInjectUCCIntoStr(_1114,getViewerBaseTextDirection()); } if(_1109!=null){ new CMenuItem(_1109,_1114,_1112,_1113,gMenuItemStyle,_1107.getWebContentRoot(),_1107.getSkin()); } if(_110c!=null){ new CMenuItem(_110c,_1114,_1112,_1113,gMenuItemStyle,_1107.getWebContentRoot(),_1107.getSkin()); } } } } }; AuthoredDrillAction.prototype.buildSelectionChoicesNilSpecification=function(){ return ""; }; AuthoredDrillAction.prototype.buildSelectionChoicesSpecification=function(_1116){ var _1117=""; var _1118=_1116.getAttribute("value"); if(_1118!=null){ var _1119=_1116.getAttribute("propertyToPass"); _1117+="")!=-1){ _1117+=_1118.substring(_1118.indexOf("")+15); }else{ if(_1118!=""){ _1117+="=_113c.length){ continue; } var _1147=_113c[_1146]; if(typeof _1147!="object"){ continue; } _1143.setAttribute("outputFormat",_1147.getOutputFormat()); _1143.setAttribute("outputLocale",_1147.getOutputLocale()); _1143.setAttribute("prompt",_1147.getPrompt()); _1143.setAttribute("dynamicDrill",_1147.isDynamicDrillThrough()?"true":"false"); var _1148=_1140[_1142].getAttribute("label"); if(_1148===null||_1148===""){ _1148=_1147.getLabel(); } _1143.setAttribute("label",_1148); _1143.setAttribute("path",_1147.getPath()); _1143.setAttribute("showInNewWindow",_1147.getShowInNewWindow()); _1143.setAttribute("method",_1147.getMethod()); var _1149=_113f; var _114a=""; var _114b=_1147.getParameterProperties(); if(typeof _114b!="undefined"&&_114b!=null&&_114b!=""){ _114a=XMLHelper_GetFirstChildElement(XMLBuilderLoadXMLFromString(_1147.getParameterProperties())); } while(_1149){ var _114c=_1149.childNodes[_1142].childNodes; for(var _114d=0;_114d<_114c.length;++_114d){ var _114e=_114c[_114d].cloneNode(true); if(_114a){ var _114f=this.getPropertyToPass(_114e.getAttribute("name"),_114a); if(_114f!=null&&_114f!=""){ _114e.setAttribute("propertyToPass",_114f); } } _1143.appendChild(_114e); } _1149=_1149.nextSibling; } var _1150=""; var _1151=""; var _1152=_1150+_1147.getParameters()+_1151; var _1153=XMLBuilderLoadXMLFromString(_1152); var _1154=XMLHelper_GetFirstChildElement(XMLHelper_GetFirstChildElement(_1153)); if(_1154){ _1143.appendChild(_1154.cloneNode(true)); } var _1155=_1150+_1147.getObjectPaths()+_1151; var _1156=XMLBuilderLoadXMLFromString(_1155); _1154=XMLHelper_GetFirstChildElement(XMLHelper_GetFirstChildElement(_1156)); if(_1154){ _1143.appendChild(_1154.cloneNode(true)); } } return XMLHelper_GetFirstChildElement(_1141); }; function DrillContextMenuHelper(){ }; DrillContextMenuHelper.updateDrillMenuItems=function(_1157,oCV,_1159){ var _115a=[]; if(DrillContextMenuHelper.needsDrillSubMenu(oCV)){ var _115b=oCV.getSelectionController(); var _115c=_115b.getAllSelectedObjects(); var _115d=_115c[0]; if(_115d.getUseValues().length>1&&typeof RV_RES!="undefined"){ var _115e={name:_1159,label:RV_RES.RV_DRILL_DEFAULT,action:{name:_1159,payload:{}}}; _115a.push(_115e); } var _115f=(_115d.getUseValues().length>1)?1:0; var _1160=_115d.getUseValues().length-1; _1160=(_1160>2)?2:_1160; for(var iDim=_115f;iDim<=_1160;++iDim){ DrillContextMenuHelper.addSubMenuItem(_1159,_115a,_115d,iDim,0); } var _1162=false; for(var iDim=_115f;iDim<=_1160;++iDim){ for(var _1163=1;_1163<_115d.getUseValues()[iDim].length;++_1163){ if(_1162==false){ _115a.push({separator:true}); _1162=true; } DrillContextMenuHelper.addSubMenuItem(_1159,_115a,_115d,iDim,_1163); } } } DrillContextMenuHelper.completeDrillMenu(_1159,_115a,_1157); }; DrillContextMenuHelper.needsDrillSubMenu=function(oCV){ var _1165=(oCV&&oCV.getSelectionController()); if(_1165){ var _1166=_1165.getAllSelectedObjects(); if(_1166.length==1&&_1166[0].isHomeCell&&_1166[0].isHomeCell()==false){ var _1167=_1166[0].isSelectionOnVizChart(); if(!_1167){ var _1168=oCV.getAdvancedServerProperty("VIEWER_JS_ENABLE_DRILL_SUBMENU"); _1167=(_1168=="charts"&&_1165.hasSelectedChartNodes()); } if(_1167){ var _1169=_1166[0]; return (_1167&&_1169.getUseValues()&&(_1169.getUseValues().length>1||_1169.getUseValues()[0].length>1)); } } } return false; }; DrillContextMenuHelper.addSubMenuItem=function(_116a,_116b,_116c,iDim,_116e){ var _116f=_116c.getDrillOptions()[iDim][_116e]; if(DrillContextMenuHelper.isOptionDrillable(_116a,_116f)){ var _1170=DrillContextMenuHelper.getItemValue(_116c,iDim,_116e); if(_1170){ var _1171=_116c.getDataItems()[iDim][_116e]; var _1172={name:_116a,label:_1170,action:{name:_116a,payload:{userSelectedDrillItem:_1171}}}; _116b.push(_1172); } } }; DrillContextMenuHelper.completeDrillMenu=function(_1173,_1174,_1175){ if(_1174.length>0){ _1175.items=_1174; }else{ _1175.items=null; if(_1175.action==null){ _1175.action={name:_1173,action:{name:_1173}}; } } }; DrillContextMenuHelper.isOptionDrillable=function(_1176,_1177){ return (_1177>=3||(_1176=="DrillDown"&&_1177==2)||(_1176=="DrillUp"&&_1177==1)); }; DrillContextMenuHelper.getItemValue=function(_1178,iDim,_117a){ var _117b=(_117a==0)?_1178.getDisplayValues()[iDim]:null; return ((_117b)?_117b:_1178.getUseValues()[iDim][_117a]); }; function DrillAction(){ }; DrillAction.prototype=new CognosViewerAction(); DrillAction.prototype.setRequestParms=function(parms){ if(parms&&parms.userSelectedDrillItem){ this.m_userSelectedDrillItem=parms.userSelectedDrillItem; } }; DrillAction.prototype.submitDrillRequest=function(_117d,_117e,_117f){ var oCV=this.getCognosViewer(); var oReq=new ViewerDispatcherEntry(oCV); oReq.addFormField("ui.action","drill"); oReq.addFormField("rv_drillOption",_117e); oReq.addFormField("rv_drillparams",_117d); oReq.addFormField("rv_drillRefQuery",_117f); oCV.dispatchRequest(oReq); }; function DrillDownAction(){ this.m_sAction="DrillDown"; }; DrillDownAction.prototype=new DrillAction(); DrillDownAction.prototype.updateMenu=function(_1182){ return _1182; }; DrillDownAction.prototype.execute=function(){ var oCV=this.getCognosViewer(); var _1184=oCV.getDrillMgr(); if(_1184.canDrillDown()==false){ return; } var _1185=_1184.rvBuildXMLDrillParameters("drillDown",this.m_userSelectedDrillItem); var _1186=_1184.getRefQuery(); if(oCV.envParams["cv.id"]=="AA"){ oCV.m_viewerFragment.raiseAADrillDownEvent(); } this.submitDrillRequest(_1185,"down",_1186); }; function DrillUpAction(){ this.m_sAction="DrillUp"; }; DrillUpAction.prototype=new DrillAction(); DrillUpAction.prototype.updateMenu=function(_1187){ return _1187; }; DrillUpAction.prototype.execute=function(){ var oCV=this.getCognosViewer(); var _1189=oCV.getDrillMgr(); if(_1189.canDrillUp()==false){ return; } var _118a=_1189.rvBuildXMLDrillParameters("drillUp",this.m_userSelectedDrillItem); var _118b=_1189.getRefQuery(); if(oCV.envParams["cv.containerApp"]=="AA"){ oCV.m_viewerFragment.raiseAADrillUpEvent(); } this.submitDrillRequest(_118a,"up",_118b); }; function ResizeChartAction(){ this.m_width=0; this.m_height=0; this.m_actionContext=null; }; ResizeChartAction.prototype=new CognosViewerAction(); ResizeChartAction.prototype.setRequestParms=function(_118c){ if(_118c&&_118c.resize){ this.m_width=_118c.resize.w; this.m_height=_118c.resize.h; this.m_actionContext=_118c.resize.actionContext; } }; ResizeChartAction.prototype.execute=function(){ var oCV=this.getCognosViewer(); var oReq=new ViewerDispatcherEntry(oCV); oReq.addFormField("ui.action","modifyReport"); if(!this.m_actionContext){ this.m_actionContext=""+this.m_height+""+this.m_width+""; } oReq.addFormField("cv.actionContext",this.m_actionContext); oReq.addFormField("keepIterators","true"); oReq.addFormField("cv.reuseConversation","true"); oReq.addFormField("reuseResults","true"); oReq.addDefinedFormField("ui.spec",oCV.envParams["ui.spec"]); oReq.addDefinedFormField("modelPath",oCV.getModelPath()); oReq.addDefinedFormField("packageBase",oCV.envParams["packageBase"]); oReq.setCanBeQueued(true); oCV.dispatchRequest(oReq); }; function CCognosViewerSaveReport(_118f,_1190){ this.m_cognosViewer=_118f; this.m_params=null; this.dashboardToSaveIn=_1190.cm$storeID; this.m_doSaveAsOnFault=false; }; CCognosViewerSaveReport.prototype.canSave=function(_1191){ return (this.doSaveAs()||_1191&&_1191.indexOf("write")!==-1); }; CCognosViewerSaveReport.prototype.isSavedOutput=function(){ var _1192=this.m_cognosViewer.envParams["ui.action"]; return (typeof _1192!=="undefined"&&_1192==="view"); }; CCognosViewerSaveReport.prototype.doSaveAs=function(){ var _1193=(this.m_doSaveAsOnFault||!this.m_cognosViewer.envParams["savedReportName"]||!this.isSameDashboard()); return _1193; }; CCognosViewerSaveReport.prototype.isSameDashboard=function(){ var _1194=(this.m_cognosViewer.envParams["ui.object"].indexOf(this.dashboardToSaveIn)!==-1); return _1194; }; CCognosViewerSaveReport.prototype.getUIAction=function(){ return (this.doSaveAs()?"saveInDashboard":"updateSavedReport"); }; CCognosViewerSaveReport.prototype.populateRequestParams=function(_1195){ _1195.addFormField("ui.action",this.getUIAction()); _1195.addFormField("cv.ignoreState","true"); _1195.addFormField("dashboard-id",this.dashboardToSaveIn); _1195.addNonEmptyStringFormField("executionParameters",this.m_cognosViewer.m_sParameters); for(var param in this.m_cognosViewer.envParams){ if(param.indexOf("frag-")==0||param=="cv.actionState"||param=="ui.primaryAction"||param=="dashboard"||param=="ui.action"||param=="cv.responseFormat"||param=="b_action"){ continue; } _1195.addFormField(param,this.m_cognosViewer.envParams[param]); } }; CCognosViewerSaveReport.prototype.getCognosViewer=function(){ return this.m_cognosViewer; }; CCognosViewerSaveReport.prototype.getViewerWidget=function(){ return this.getCognosViewer().getViewerWidget(); }; CCognosViewerSaveReport.prototype.dispatchRequest=function(){ var _1197=this.m_cognosViewer; var _1198=this.getViewerWidget(); var _1199={"complete":{"object":_1198,"method":_1198.handleWidgetSaveDone},"fault":{"object":this,"method":this.onFault}}; var _119a=new AsynchJSONDispatcherEntry(_1197); _119a.setCallbacks(_1199); this.populateRequestParams(_119a); _1197.dispatchRequest(_119a); }; CCognosViewerSaveReport.prototype.onFault=function(_119b,arg1){ var _119d=this.m_cognosViewer; var _119e=this.getViewerWidget(); var _119f=_119b.getSoapFault(); var _11a0=XMLHelper_FindChildByTagName(_119f,"Fault",true); if(this.ifIsEmptySelectionFault(_11a0)){ this.handleEmptySelectionFault(); return; } var _11a1=_119f.createElement("allowRetry"); _11a1.appendChild(_119f.createTextNode("false")); _11a0.appendChild(_11a1); var _11a2=XMLBuilderSerializeNode(_11a0); _119d.setSoapFault(_11a2); _119e.handleFault(); var _11a3={"status":false}; _119e.iContext.iEvents.fireEvent("com.ibm.bux.widget.save.done",null,_11a3); }; CCognosViewerSaveReport.prototype.ifIsEmptySelectionFault=function(_11a4){ if(_11a4){ var _11a5=XMLHelper_FindChildByTagName(_11a4,"errorCode",true); if(_11a5){ var _11a6=XMLHelper_GetText(_11a5,false); return (_11a6==="cmEmptySelection"); } } return false; }; CCognosViewerSaveReport.prototype.handleEmptySelectionFault=function(){ delete (this.m_cognosViewer.envParams["savedReportName"]); this.m_doSaveAsOnFault=true; this.dispatchRequest(); }; 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(_11a7){ this.m_headers=_11a7; }; XmlHttpObject.prototype.getHeaders=function(){ return this.m_headers; }; XmlHttpObject.prototype.newRequest=function(){ var _11a8=new XmlHttpObject(); _11a8.init(this.m_action,this.m_gateway,this.m_url,this.m_asynch); this.executeHttpCallback("newRequest"); return _11a8; }; 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(_11a9){ if(this.m_httpCallbacks&&this.m_httpCallbacks[_11a9]){ var _11aa=this.concatResponseArguments(this.m_httpCallbacks.customArguments); var _11ab=GUtil.generateCallback(this.m_httpCallbacks[_11a9].method,_11aa,this.m_httpCallbacks[_11a9].object); _11ab(); return true; } return false; }; XmlHttpObject.prototype.setCallbacks=function(_11ac){ if(!this.m_httpCallbacks){ this.m_httpCallbacks={}; } for(callback in _11ac){ this.m_httpCallbacks[callback]=_11ac[callback]; } }; XmlHttpObject.prototype.getCallbacks=function(){ return this.m_httpCallbacks; }; XmlHttpObject.createRequestObject=function(){ var _11ad=null; if(window.XMLHttpRequest){ _11ad=new XMLHttpRequest(); }else{ if(window.ActiveXObject){ _11ad=new ActiveXObject("Msxml2.XMLHTTP"); }else{ } } return _11ad; }; XmlHttpObject.prototype.waitForXmlHttpResponse=function(){ var _11ae=this.xmlHttp; if(_11ae&&_11ae.readyState===4){ if(_11ae.status===200){ this.httpSuccess(); }else{ this.httpError(); } }else{ } }; XmlHttpObject.prototype.init=function(_11af,_11b0,url,_11b2){ this.m_action=_11af; this.m_gateway=_11b0; this.m_url=url; this.m_asynch=_11b2; }; 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(_11b3,_11b4,url,async){ var _11b7=this.xmlHttp; if(_11b7){ _11b7.open(_11b3,_11b4,async); if(async){ _11b7.onreadystatechange=GUtil.generateCallback(this.waitForXmlHttpResponse,[],this); }else{ _11b7.onreadystatechange=GUtil.generateCallback(this.waitForXmlHttpResponse,[],this); if(!isIE()){ _11b7.onload=GUtil.generateCallback(this.httpSuccess,[],this); _11b7.onerror=GUtil.generateCallback(this.httpError,[],this); } } _11b7.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); if(this.m_headers){ for(header in this.m_headers){ _11b7.setRequestHeader(header,this.m_headers[header]); } } this.executeHttpCallback("preHttpRequest"); var _11b8=this.convertFormFieldsToUrl(); if(url){ _11b8+=url; } _11b7.send(_11b8); } }; 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,value){ this.m_formFields.add(name,value); }; XmlHttpObject.prototype.getFormFields=function(){ return this.m_formFields; }; XmlHttpObject.prototype.getFormField=function(_11bc){ return this.m_formFields.get(_11bc); }; XmlHttpObject.prototype.clearFormFields=function(){ this.m_formFields=new CDictionary(); }; XmlHttpObject.prototype.convertFormFieldsToUrl=function(){ var url=""; var _11be=this.m_formFields.keys(); for(var index=0;index<_11be.length;index++){ if(index>0){ url+="&"; } url+=encodeURIComponent(_11be[index])+"="+encodeURIComponent(this.m_formFields.get(_11be[index])); } return url; }; XmlHttpObject.prototype.concatResponseArguments=function(_11c0){ var _11c1=[this]; if(_11c0){ _11c1=_11c1.concat(_11c0); } return _11c1; }; function AsynchRequest(_11c2,_11c3){ AsynchRequest.baseConstructor.call(this); this.m_gateway=_11c2; this.m_webContentRoot=_11c3; 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(_11c4){ if(this.m_callbacks[_11c4]){ var _11c5=this.concatResponseArguments(this.m_callbacks.customArguments); var _11c6=GUtil.generateCallback(this.m_callbacks[_11c4].method,_11c5,this.m_callbacks[_11c4].object); _11c6(); return true; } return false; }; AsynchRequest.prototype.setCallbacks=function(_11c7){ if(!this.m_callbacks){ this.m_callbacks={}; } for(callback in _11c7){ this.m_callbacks[callback]=_11c7[callback]; } }; AsynchRequest.prototype.getCallbacks=function(){ return this.m_callbacks; }; AsynchRequest.prototype.newRequest=function(){ var _11c8=this.construct(); _11c8.setHeaders(this.getHeaders()); if(this.getFormFields().exists("b_action")){ _11c8.addFormField("b_action",this.getFormField("b_action")); } if(this.getFormFields().exists("cv.catchLogOnFault")){ _11c8.addFormField("cv.catchLogOnFault",this.getFormField("cv.catchLogOnFault")); } _11c8.setPromptDialog(this.m_promptDialog); _11c8.setFaultDialog(this.m_faultDialog); _11c8.setLogonDialog(this.m_logonDialog); _11c8.m_asynch=this.m_asynch; if(this.m_callbacks.newRequest){ var _11c9=GUtil.generateCallback(this.m_callbacks.newRequest.method,[_11c8],this.m_callbacks.newRequest.object); _11c9(); } return _11c8; }; AsynchRequest.prototype.success=function(){ var _11ca=this.getAsynchStatus(); switch(_11ca){ 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(_11cb){ if(_11cb instanceof IFaultDialog){ if(typeof console!="undefined"){ console.log("AsynchRequest.prototype.setFaultDialog is deprecated"); } this.m_faultDialog=_11cb; }else{ if(_11cb&&typeof console!="undefined"){ console.log("The parameter faultDialog must be an instance of IFaultDialog"); } } }; AsynchRequest.prototype.setPromptDialog=function(_11cc){ if(_11cc instanceof IPromptDialog){ if(typeof console!="undefined"){ console.log("AsynchRequest.prototype.setPromptDialog is deprecated"); } this.m_promptDialog=_11cc; }else{ if(_11cc&&typeof console!="undefined"){ console.log("The parameter promptDialog must be an instance of IPromptDialog"); } } }; AsynchRequest.prototype.setLogonDialog=function(_11cd){ if(_11cd instanceof ILogOnDialog){ if(typeof console!="undefined"){ console.log("AsynchRequest.prototype.setLogonDialog is deprecated"); } this.m_logonDialog=_11cd; }else{ if(_11cd&&typeof console!="undefined"){ console.log("The parameter logOnDialog must be an instance of ILogOnDialog"); } } }; AsynchRequest.prototype.resubmitRequest=function(){ var _11ce=this.newRequest(); _11ce.m_formFields=this.m_formFields; _11ce.sendRequest(); return _11ce; }; AsynchRequest.prototype.sendRequest=function(){ var _11cf=this; var _11d0={"complete":{"object":_11cf,"method":_11cf.successHandler},"fault":{"object":_11cf,"method":_11cf.errorHandler}}; this.init("POST",this.m_gateway,"",this.m_asynch); this.executeCallback("preHttpRequest"); this.parent.setCallbacks.call(this,_11d0); 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 _11d1=this.getResponseText(); if(_11d1.indexOf("CAM_PASSPORT_ERROR")!=-1){ this.passportTimeout(); }else{ if((_11d1.indexOf("http-equiv=\"refresh\"")!=-1)||(_11d1.indexOf("http-equiv='refresh'")!=-1)){ this.passportTimeout(); }else{ this.executeCallback("entryFault"); if(!this.executeCallback("fault")){ var _11d2=window.open("","","height=400,width=500"); if(_11d2!=null){ _11d2.document.write(_11d1); } } } } }else{ this.m_soapFault=this.constructFaultEnvelope(); if(this.m_soapFault!=null){ var _11d3=XMLHelper_FindChildByTagName(this.m_soapFault,"CAM",true); if(_11d3!=null&&XMLHelper_FindChildByTagName(_11d3,"promptInfo",true)){ this.passportTimeout(); }else{ this.fault(); } }else{ this.success(); } } }; AsynchRequest.prototype.cancel=function(){ this.parent.cancel.call(this); var _11d4=this.getFormField("m_tracking"); if(_11d4){ var _11d5=new XmlHttpObject(); _11d5.init("POST",this.m_gateway,"",false); if(this.getFormField("cv.outputKey")){ _11d5.addFormField("b_action","cvx.high"); _11d5.addFormField("cv.outputKey",this.getFormField("cv.outputKey")); _11d5.setHeaders(this.getHeaders()); }else{ _11d5.addFormField("b_action","cognosViewer"); } _11d5.addFormField("cv.responseFormat","successfulRequest"); _11d5.addFormField("ui.action","cancel"); _11d5.addFormField("m_tracking",_11d4); if(this.getFormField("cv.debugDirectory")){ _11d5.addFormField("cv.debugDirectory",this.getFormField("cv.debugDirectory")); } _11d5.sendRequest(); this.executeCallback("cancel"); } }; AsynchRequest.prototype.working=function(){ this.executeCallback("working"); var _11d6=this.newRequest(); _11d6.addFormField("m_tracking",this.getTracking()); if(this.getFormField("cv.outputKey")){ _11d6.addFormField("cv.outputKey",this.getFormField("cv.outputKey")); _11d6.addFormField("b_action","cvx.high"); } if(this.isRAPWaitTrue()){ _11d6.m_formFields=this.m_formFields; _11d6.addFormField("m_tracking",this.getTracking()); _11d6.addFormField("rapWait","true"); var _11d7=this.getRAPRequestCache(); if(_11d7!==null&&typeof _11d7!="undefined"){ _11d6.addFormField("rapRequestCache",_11d7); } var _11d8=this.getMainConversation(); if(_11d8){ _11d6.addFormField("mainConversation",_11d8); } var _11d9=this.getMainTracking(); if(_11d9){ _11d6.addFormField("mainTracking",_11d9); } }else{ _11d6.addFormField("ui.action","wait"); _11d6.addFormField("ui.primaryAction",this.getPrimaryAction()); _11d6.addFormField("cv.actionState",this.getActionState()); if(this.getFormField("ui.preserveRapTags")){ _11d6.addFormField("ui.preserveRapTags",this.getFormField("ui.preserveRapTags")); } if(this.getFormField("ui.backURL")){ _11d6.addFormField("ui.backURL",this.getFormField("ui.backURL")); } if(this.getFormField("errURL")){ _11d6.addFormField("errURL",this.getFormField("errURL")); } if(this.getFormField("cv.showFaultPage")){ _11d6.addFormField("cv.showFaultPage",this.getFormField("cv.showFaultPage")); } if(this.getFormField("cv.catchLogOnFault")){ _11d6.addFormField("cv.catchLogOnFault",this.getFormField("cv.catchLogOnFault")); } } if(this.getFormField("bux")){ _11d6.addFormField("bux",this.getFormField("bux")); } if(this.getFormField("cv.debugDirectory")){ _11d6.addFormField("cv.debugDirectory",this.getFormField("cv.debugDirectory")); } _11d6.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(_11da){ var _11db=this.newRequest(); _11db.addFormField("ui.action","forward"); _11db.addFormField("m_tracking",this.getTracking()); _11db.addFormField("ui.conversation",this.getConversation()); _11db.addFormField("ui.primaryAction",this.getPrimaryAction()); _11db.addFormField("cv.actionState",this.getActionState()); for(var _11dc in _11da){ _11db.addFormField(_11dc,_11da[_11dc]); } _11db.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 _11dd=this.m_promptDialog.getViewerId()==null?"":"?cv.id="+this.m_promptDialog.getViewerId(); window["AsynchRequestPromptDialog"].initialize(this.m_webContentRoot+"/rv/showStandalonePrompts.html"+_11dd,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 _11de=this.constructFaultEnvelope(); if(_11de){ var _11df=XMLHelper_FindChildByTagName(_11de,"faultcode",true); if(_11df!=null){ return XMLHelper_GetText(_11df); } } return null; }; AsynchRequest.prototype.getSoapFaultDetailMessageString=function(){ var _11e0=this.constructFaultEnvelope(); if(_11e0){ var entry=XMLHelper_FindChildByTagName(_11e0,"messageString",true); if(entry!=null){ return XMLHelper_GetText(entry); } } return null; }; function AsynchDATARequest(_11e2,_11e3){ AsynchDATARequest.baseConstructor.call(this,_11e2,_11e3); 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 _11e4=this.getResponseText().substring(0,12); if(_11e4==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 state=this.getResponseState(); if(state!=null){ if(state.m_sSoapFault){ var _11e6=state.m_sSoapFault; this.m_soapFault=XMLBuilderLoadXMLFromString(_11e6); } } } return this.m_soapFault; }; AsynchDATARequest.prototype.construct=function(){ var _11e7=new AsynchDATARequest(this.m_gateway,this.m_webContentRoot); _11e7.setCallbacks(this.m_callbacks); if(this.getFormFields().exists("cv.responseFormat")){ _11e7.addFormField("cv.responseFormat",this.getFormField("cv.responseFormat")); }else{ _11e7.addFormField("cv.responseFormat","data"); } return _11e7; }; AsynchDATARequest.prototype.getEnvParam=function(param){ var _11e9=this.getResponseState(); if(_11e9&&typeof _11e9.envParams!="undefined"&&typeof _11e9.envParams[param]!="undefined"){ return _11e9.envParams[param]; } return null; }; AsynchDATARequest.prototype.isRAPWaitTrue=function(){ var _11ea=this.getEnvParam("rapWait"); if(_11ea!=null){ return _11ea=="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(_11eb,_11ec){ AsynchJSONRequest.baseConstructor.call(this,_11eb,_11ec); 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 _11ee=this.removeInvalidCharacters(text); this.m_jsonResponse=eval("("+_11ee+")"); } } } return this.m_jsonResponse; }; AsynchJSONRequest.prototype.getTracking=function(){ var _11ef=this.getJSONResponseObject(); if(_11ef){ return _11ef.tracking; } return ""; }; AsynchJSONRequest.prototype.getConversation=function(){ var _11f0=this.getJSONResponseObject(); if(_11f0){ return _11f0.conversation; } return ""; }; AsynchJSONRequest.prototype.getAsynchStatus=function(){ var _11f1=this.getJSONResponseObject(); if(_11f1){ return _11f1.status; } return "unknown"; }; AsynchJSONRequest.prototype.getPrimaryAction=function(){ var _11f2=this.getJSONResponseObject(); if(_11f2){ return _11f2.primaryAction; } return ""; }; AsynchJSONRequest.prototype.getActionState=function(){ var _11f3=this.getJSONResponseObject(); if(_11f3){ return _11f3.actionState; } return ""; }; AsynchJSONRequest.prototype.getDebugLogs=function(){ var _11f4=this.getJSONResponseObject(); if(_11f4){ return _11f4.debugLogs; } return ""; }; AsynchJSONRequest.prototype.isRAPWaitTrue=function(){ var _11f5=this.getJSONResponseObject(); if(_11f5){ return (_11f5.rapWait==="true"); } return false; }; AsynchJSONRequest.prototype.getRAPRequestCache=function(){ var _11f6=this.getJSONResponseObject(); if(_11f6){ var _11f7=_11f6.rapRequestCache; if(_11f7!==null&&typeof _11f7!="undefined"){ return _11f7; } } return null; }; AsynchJSONRequest.prototype.getMainConversation=function(){ var _11f8=this.getJSONResponseObject(); if(_11f8){ return _11f8.mainConversation; } return null; }; AsynchJSONRequest.prototype.getMainTracking=function(){ var _11f9=this.getJSONResponseObject(); if(_11f9){ return _11f9.mainTracking; } return null; }; AsynchJSONRequest.prototype.getResult=function(){ var _11fa=this.getJSONResponseObject(); if(_11fa&&_11fa.json){ var _11fb=this.removeInvalidCharacters(_11fa.json); return eval("("+_11fb+")"); } return null; }; AsynchJSONRequest.prototype.removeInvalidCharacters=function(text){ if(text){ text=text.replace(/(\n|\r|\t)+/g,""); } return text; }; AsynchJSONRequest.prototype.getPromptHTMLFragment=function(){ var _11fd=this.getJSONResponseObject(); if(_11fd&&_11fd.promptHTMLFragment){ return _11fd.promptHTMLFragment; } return ""; }; AsynchJSONRequest.prototype.constructFaultEnvelope=function(){ if(this.m_soapFault==null){ var _11fe=this.getJSONResponseObject(); if(_11fe.status=="fault"){ this.m_soapFault=XMLBuilderLoadXMLFromString(_11fe.fault); } } return this.m_soapFault; }; AsynchJSONRequest.prototype.construct=function(){ var _11ff=new AsynchJSONRequest(this.m_gateway,this.m_webContentRoot); _11ff.setCallbacks(this.m_callbacks); if(this.getFormFields().exists("cv.responseFormat")){ _11ff.addFormField("cv.responseFormat",this.getFormField("cv.responseFormat")); }else{ _11ff.addFormField("cv.responseFormat","asynchJSON"); } return _11ff; }; 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(_1200){ if(typeof console!="undefined"){ console.log("Required method ILogOnDialog:show not implemented."); } }; ILogOnDialog.prototype.handleUnknownHTMLResponse=function(_1201){ if(typeof console!="undefined"){ console.log("Required method ILogOnDialog:handleUnknownHTMLResponse not implemented."); } }; function IPromptDialog(){ }; IPromptDialog.prototype.initialize=function(url,width,_1204){ 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(_1205){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:preHttpRequest not implemented."); } }; IRequestHandler.prototype.postHttpRequest=function(_1206){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:postHttpRequest not implemented."); } }; IRequestHandler.prototype.postComplete=function(_1207){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:postComplete not implemented."); } }; IRequestHandler.prototype.onComplete=function(_1208){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:onComplete not implemented."); } }; IRequestHandler.prototype.onPostEntryComplete=function(_1209){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:onPostEntryComplete not implemented."); } }; IRequestHandler.prototype.onFault=function(_120a){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:onFault not implemented."); } }; IRequestHandler.prototype.onPrompting=function(_120b){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:onPrompting not implemented."); } }; IRequestHandler.prototype.onWorking=function(_120c){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:onWorking not implemented."); } }; IRequestHandler.prototype.setWorkingDialog=function(_120d){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:setWorkingDialog not implemented."); } }; IRequestHandler.prototype.setRequestIndicator=function(_120e){ 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(_1210){ }; 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(_1211){ this.m_oDispatcherEntry=_1211; }; BaseRequestHandler.prototype.getDispatcherEntry=function(){ return this.m_oDispatcherEntry; }; BaseRequestHandler.prototype.processInitialResponse=function(_1212){ this.updateViewerState(_1212); }; BaseRequestHandler.prototype.setLogOnDialog=function(_1213){ if(_1213==null){ this.m_logOnDialog=null; }else{ if(_1213 instanceof ILogOnDialog){ this.m_logOnDialog=_1213; }else{ if(_1213&&typeof console!="undefined"){ console.log("The parameter logOnDialog must be an instance of ILogOnDialog"); } } } }; BaseRequestHandler.prototype.setWorkingDialog=function(_1214){ if(_1214==null){ this.m_workingDialog=null; }else{ if(this.m_httpRequestConfig&&this.m_httpRequestConfig.getWorkingDialog()){ this.m_workingDialog=this.m_httpRequestConfig.getWorkingDialog(); }else{ if(_1214 instanceof IRequestIndicator){ this.m_workingDialog=_1214; }else{ if(_1214&&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(_1215){ if(_1215==null){ this.m_requestIndicator=null; }else{ if(this.m_httpRequestConfig&&this.m_httpRequestConfig.getRequestIndicator()){ this.m_requestIndicator=this.m_httpRequestConfig.getRequestIndicator(); }else{ if(_1215 instanceof IRequestIndicator){ this.m_requestIndicator=_1215; }else{ if(_1215&&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(_1216){ if(_1216==null){ this.m_faultDialog=null; }else{ if(_1216 instanceof IFaultDialog){ this.m_faultDialog=_1216; }else{ if(_1216&&typeof console!="undefined"){ console.log("The parameter faultDialog must be an instance of IFaultDialog"); } } } }; BaseRequestHandler.prototype.setPromptDialog=function(_1217){ if(_1217==null){ this.m_promptDialog=null; }else{ if(_1217 instanceof IPromptDialog){ this.m_promptDialog=_1217; }else{ if(_1217&&typeof console!="undefined"){ console.log("The parameter promptDialog must be an instance of IPromptDialog"); } } } }; BaseRequestHandler.prototype.preHttpRequest=function(_1218){ if(_1218&&typeof _1218.getFormField=="function"){ if(_1218.getFormField("ui.action")!="wait"&&_1218.getFormField("rapWait")!="true"){ if(this.m_requestIndicator){ this.m_requestIndicator.show(); } } } }; BaseRequestHandler.prototype.postHttpRequest=function(_1219){ if(_1219&&typeof _1219.getAsynchStatus=="function"){ var _121a=_1219.getAsynchStatus(); if(_121a!="working"&&_121a!="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(_121b){ 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",_121b); } return; } if(!this.m_faultDialog){ this.m_faultDialog=new FaultDialog(this.getViewer()); } if(_121b&&_121b.getResponseHeader&&_121b.getResponseHeader("Content-type").indexOf("text/html")!=-1){ this.m_faultDialog.handleUnknownHTMLResponse(_121b.getResponseText()); }else{ if(_121b&&_121b.getSoapFault){ this.m_faultDialog.show(_121b.getSoapFault()); }else{ if(oCV.getSoapFault()){ var _121d=XMLBuilderLoadXMLFromString(oCV.getSoapFault()); this.m_faultDialog.show(_121d); oCV.setSoapFault(""); }else{ if(typeof console!="undefined"){ console.log("An unhandled fault was returned: %o",_121b); } } } } }; BaseRequestHandler.prototype.isAuthenticationFault=function(_121e){ var oCV=this.getViewer(); var _1220=null; if(_121e&&_121e.getSoapFault){ _1220=_121e.getSoapFault(); }else{ if(oCV.getSoapFault()){ _1220=XMLBuilderLoadXMLFromString(oCV.getSoapFault()); } } if(_1220!=null){ var _1221=XMLHelper_FindChildByTagName(_1220,"CAM",true); return (_1221!=null&&XMLHelper_FindChildByTagName(_1221,"promptInfo",true)!=null); } return false; }; BaseRequestHandler.prototype.onPassportTimeout=function(_1222){ 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(_1222&&_1222.getResponseHeader&&_1222.getResponseHeader("Content-type").indexOf("text/html")!=-1){ var _1224=""; if(_1222.getResponseText){ _1224=_1222.getResponseText(); } if((_1224.indexOf("http-equiv=\"refresh\"")!=-1)||(_1224.indexOf("http-equiv='refresh'")!=-1)){ this.m_logOnDialog.show(null); }else{ this.m_logOnDialog.handleUnknownHTMLResponse(_1224); } }else{ if(_1222&&_1222.getSoapFault){ this.m_logOnDialog.show(_1222.getSoapFault()); }else{ if(oCV.getSoapFault()){ var _1225=XMLBuilderLoadXMLFromString(oCV.getSoapFault()); this.m_logOnDialog.show(_1225); oCV.setSoapFault(""); }else{ if(typeof console!="undefined"){ console.log("BaseRequestHandler.prototype.onPassportTimeout: An unhandled authentication fault was returned: %o",_1222); } } } } }; BaseRequestHandler.prototype.onWorking=function(_1226){ if(this.m_workingDialog){ var _1227=_1226&&typeof _1226.getAsynchStatus=="function"&&_1226.getAsynchStatus()=="stillWorking"?true:false; if(!_1227){ 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 _122a=oCV.getViewerWidget(); if(_122a.getLoadManager()){ _122a.getLoadManager().processQueue(); } } }; BaseRequestHandler.prototype.onPrompting=function(_122b){ 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"]=_122b; window["AsynchRequestPromptDialog"]=this.m_promptDialog; var _122d="?cv.id="+oCV.getId(); window["AsynchRequestPromptDialog"].initialize(oCV.getWebContentRoot()+"/rv/showStandalonePrompts.html"+_122d,400,400); window["AsynchRequestPromptDialog"].show(); }; BaseRequestHandler.prototype.processDATAReportResponse=function(_122e){ 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 _1230=_122e.getResponseState(); if(!_1230){ this.resubmitInSafeMode(); } if(this.loadReportHTML(_122e.getResult())===false){ this.resubmitInSafeMode(); } this.updateViewerState(_1230); }; BaseRequestHandler.prototype.updateViewerState=function(_1231){ var oCV=this.getViewer(); applyJSONProperties(oCV,_1231); var _1233=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(_1233!="fault"){ if(oCV.envParams["rapReportInfo"]){ this._processRapReportInfo(oCV); } if(typeof _1231.clientunencodedexecutionparameters!="undefined"){ var _1234=document.getElementById("formWarpRequest"+oCV.getId()); if(_1234!=null&&typeof _1234["clientunencodedexecutionparameters"]!="undefined"){ _1234["clientunencodedexecutionparameters"].value=_1231.clientunencodedexecutionparameters; } if(typeof document.forms["formWarpRequest"]!="undefined"&&typeof document.forms["formWarpRequest"]["clientunencodedexecutionparameters"]!="undefined"){ document.forms["formWarpRequest"]["clientunencodedexecutionparameters"].value=_1231.clientunencodedexecutionparameters; } } }else{ oCV.setTracking(""); } }; BaseRequestHandler.prototype._processRapReportInfo=function(oCV){ if(oCV.envParams["rapReportInfo"]){ var _1236=eval("("+oCV.envParams["rapReportInfo"]+")"); if(typeof RAPReportInfo!="undefined"){ var _1237=new RAPReportInfo(_1236,oCV); oCV.setRAPReportInfo(_1237); } } }; BaseRequestHandler.prototype.loadReportHTML=function(_1238){ if(!_1238){ 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 sHTML=_1238.replace(/]*>/gi,"").replace(/<\/form[^>]*>/gi,""); oCV.m_sHTML=sHTML; oCV.setHasPrompts(false); var id=oCV.getId(); var _123c=document.getElementById("RVContent"+id); var _123d=document.getElementById("CVReport"+id); if(window.gScriptLoader){ var _123e=oCV.getViewerWidget()?true:false; var _123f=oCV.getViewerWidget()?document.getElementById("_"+oCV.getViewerWidget().iContext.widgetId+"_cv"):_123d; sHTML=window.gScriptLoader.loadCSS(sHTML,_123f,_123e,id); } if(oCV.sBrowser=="ie"){ sHTML=" "+sHTML; } _123d.innerHTML=sHTML; this.massageHtmlBeforeDisplayed(); if(window.gScriptLoader){ var _1240=GUtil.generateCallback(oCV.showLoadedContent,[_123c],oCV); oCV.m_resizeReady=false; if(!window.gScriptLoader.loadAll(_123d,_1240,id,true)){ if(window.gScriptLoader.containsAjaxWarnings()){ return false; } } }else{ _123c.style.display="block"; } var _1241=document.querySelectorAll("button"); var _1242=_1241.length; for(var k=0;k<_1242;k++){ var _1244=_1241[k]; var id=_1244.id; var _1245=id.match(/reprompt/); if(_1245){ var _1246=_1244.outerHTML; var _1247=_1246.match(/layoutname="\w+"/); if(_1247!==null){ var _1248=_1247[0]; var _1249=/".*"/; var _124a=_1249.exec(_1248); if(oCV.getCurrentPromptControlFocus()==_124a){ _1244.focus(); oCV.setCurrentPromptControlFocus(null); _1244=null; } }else{ oCV.setCurrentPromptControlFocus(null); _1244=null; } } } oCV.updateOutputForA11ySupport(); this._clearFindState(); return true; }; BaseRequestHandler.prototype._clearFindState=function(){ var oCV=this.getViewer(); var _124c=oCV.getState()&&oCV.getState().getFindState()?oCV.getState().getFindState():null; if(_124c&&!_124c.findOnServerInProgress()){ oCV.getState().clearFindState(); } }; BaseRequestHandler.prototype.showReport=function(){ var oCV=this.getViewer(); var _124e=document.getElementById("CVReport"+oCV.getId()); if(_124e){ _124e.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(_1250){ if(this.m_httpRequestConfig){ var _1251=this.m_httpRequestConfig.getReportStatusCallback(_1250); if(_1251){ _1251(); } } }; 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(_1252,_1253){ var _1254=_1252; var _1255=this[_1253]; this[_1253]=function(_1256){ _1255.apply(this,arguments); var _1257=null; if(_1256&&typeof _1256.getAsynchStatus=="function"){ _1257=_1256.getAsynchStatus(); }else{ _1257=_1254=="complete"?this.getViewer().getStatus():_1254; } if(_1257=="stillWorking"){ return; } var _1258=this.m_httpRequestConfig.getReportStatusCallback(_1257); if(typeof _1258=="function"){ setTimeout(_1258,10); } }; }; function ViewerBaseWorkingDialog(_1259){ if(!_1259){ return; } this.setCognosViewer(_1259); this.m_oCV=_1259; this.m_sNamespace=_1259.getId(); this.m_sGateway=_1259.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(_125b){ this.m_bCancelSubmitted=_125b; }; ViewerBaseWorkingDialog.prototype.show=function(){ var _125c=document.getElementById(this.getContainerId()); if(_125c){ _125c.style.display="block"; this.enableCancelButton(); }else{ this.create(); } var _125d=document.getElementById("reportBlocker"+this.m_oCV.getId()); if(_125d){ _125d.style.display="block"; } }; ViewerBaseWorkingDialog.prototype.create=function(){ if(typeof document.body!="undefined"){ if(this.isModal()){ this.createModalWaitDialog(); }else{ this.createInlineWaitDialog(); } } }; ViewerBaseWorkingDialog.prototype.createContainer=function(_125e){ var _125f=document.createElement("div"); _125f.setAttribute("id",this.getContainerId()); _125f.className=_125e?"modalWaitPage":"inlineWaitPage"; return _125f; }; ViewerBaseWorkingDialog.prototype.createModalWaitDialog=function(){ this._createBlocker(); var _1260=this.createContainer(true); _1260.innerHTML=this.renderHTML(); _1260.style.zIndex="7002"; _1260.setAttribute("role","region"); _1260.setAttribute("aria-label",RV_RES.GOTO_WORKING); document.body.appendChild(_1260); var _1261=this.createModalIframeBackground(); document.body.appendChild(_1261); var _1262=0; var iLeft=0; if(typeof window.innerHeight!="undefined"){ _1262=Math.round((window.innerHeight/2)-(_1260.offsetHeight/2)); iLeft=Math.round((window.innerWidth/2)-(_1260.offsetWidth/2)); }else{ _1262=Math.round((document.body.clientHeight/2)-(_1260.offsetHeight/2)); iLeft=Math.round((document.body.clientWidth/2)-(_1260.offsetWidth/2)); } _1260.style.bottom=_1262+"px"; _1260.style.left=iLeft+"px"; _1261.style.left=iLeft-1+"px"; _1261.style.bottom=_1262-1+"px"; _1261.style.width=_1260.offsetWidth+2+"px"; _1261.style.height=_1260.offsetHeight+2+"px"; }; ViewerBaseWorkingDialog.prototype._createBlocker=function(){ var _1264=document.getElementById("reportBlocker"+this.m_oCV.getId()); if(_1264){ return; } var _1265=document.getElementById("mainViewerTable"+this.m_oCV.getId()); if(_1265){ _1264=document.createElement("div"); _1265.parentNode.appendChild(_1264); _1264.id="reportBlocker"+this.m_oCV.getId(); _1264.style.zIndex="6001"; _1264.style.position="absolute"; _1264.style.top="0px"; _1264.style.left="0px"; _1264.style.width="100%"; _1264.style.height="100%"; _1264.style.display="none"; _1264.style.opacity="0"; _1264.style.backgroundColor="#FFFFFF"; _1264.style.filter="alpha(opacity:0)"; } }; ViewerBaseWorkingDialog.prototype.createInlineWaitDialog=function(){ var _1266=this.m_oCV.getId(); var _1267=document.getElementById("CVReport"+_1266); if(_1267){ var _1268=this.createContainer(false); _1268.innerHTML="
"+this.renderHTML()+"
"; _1267.appendChild(_1268); } }; ViewerBaseWorkingDialog.prototype.createModalIframeBackground=function(){ var _1269=document.createElement("iframe"); var _126a=".."; var oCV=this.getCognosViewer(); if(oCV!==null){ _126a=oCV.getWebContentRoot(); } _1269.setAttribute("id",this.getContainerId()+"Iframe"); _1269.setAttribute("title","Empty iframe"); _1269.setAttribute("src",_126a+"/common/images/spacer.gif"); _1269.setAttribute("scrolling","no"); _1269.setAttribute("frameborder","0"); _1269.style.position="absolute"; _1269.style.zIndex="6002"; _1269.style.display="block"; return _1269; }; ViewerBaseWorkingDialog.prototype.updateCoords=function(_126c,_126d){ if(this.m_container!==null&&m_iframeBackground!==null){ var _126e=0; var iLeft=0; if(typeof window.innerHeight!="undefined"){ _126e=Math.round((window.innerHeight/2)-(_126c.offsetHeight/2)); iLeft=Math.round((window.innerWidth/2)-(_126c.offsetWidth/2)); }else{ _126e=Math.round((document.body.clientHeight/2)-(_126c.offsetHeight/2)); iLeft=Math.round((document.body.clientWidth/2)-(_126c.offsetWidth/2)); } _126c.style.bottom=_126e+"px"; _126c.style.left=iLeft+"px"; _126d.style.left=_126c.style.left; _126d.style.bottom=_126c.style.bottom; _126d.style.width=_126c.offsetWidth+"px"; _126d.style.height=_126c.offsetHeight+"px"; } }; ViewerBaseWorkingDialog.prototype.hide=function(){ var _1270=document.getElementById(this.getContainerId()); if(_1270){ _1270.parentNode.removeChild(_1270); } var _1271=document.getElementById(this.getContainerId()+"Iframe"); if(_1271){ _1271.parentNode.removeChild(_1271); } var _1272=document.getElementById("reportBlocker"+this.m_oCV.getId()); if(_1272){ _1272.parentNode.removeChild(_1272); } }; ViewerBaseWorkingDialog.prototype.isModal=function(){ var _1273=this.m_oCV.getId(); var _1274=document.getElementById("CVReport"+_1273); var _1275=true; if(_1274&&_1274.innerHTML===""){ _1275=false; } return _1275; }; ViewerBaseWorkingDialog.prototype.disableCancelButton=function(_1276){ }; ViewerBaseWorkingDialog.prototype.enableCancelButton=function(){ }; function FaultDialog(oCV){ this.m_oCV=oCV; }; FaultDialog.prototype=new IFaultDialog(); FaultDialog.prototype.show=function(_1278){ if(typeof console!="undefined"){ console.log("FaultDialog - an unhandled soap fault was returned: %o",_1278); } }; FaultDialog.prototype.handleUnknownHTMLResponse=function(_1279){ this.m_oCV.setTracking(""); this.m_oCV.setConversation(""); if(_1279){ if(this.m_oCV.envParams["useAlternateErrorCodeRendering"]){ var _127a=document.getElementsByTagName("head")[0]; var _127b=_1279.match(/]*>([\s\S]*)<\/body>/im)[1]; var _127c=/]*>([\s\S]*?)<\/script>/igm; var _127d=_127c.exec(_1279); while(_127d!=null){ var _127e=document.createElement("script"); _127e.type="text/javascript"; var _127f=_127d[0].match(/src="([\s\S]*?)"/i); if(_127f==null){ _127e.text=_127d[1]; }else{ _127e.src=_127f[1]; } _127a.appendChild(_127e); _127d=_127c.exec(_1279); } document.body.innerHTML=_127b; }else{ document.write(_1279); } } }; function LogOnDialog(oCV){ this.m_oCV=oCV; }; LogOnDialog.prototype=new ILogOnDialog(); LogOnDialog.prototype.handleUnknownHTMLResponse=function(_1281){ if(_1281){ document.write(_1281); } }; LogOnDialog.prototype.show=function(_1282){ launchLogOnDialog(this.m_oCV.getId(),_1282); }; LogOnDialog.prototype.hide=function(){ }; function PromptDialog(oCV){ this.m_oCV=oCV; this.m_dialogImpl=null; }; PromptDialog.prototype=new IPromptDialog(); PromptDialog.prototype.initialize=function(url,width,_1286){ this.m_dialogImpl=new CModal("","",document.body,null,null,width,_1286,true,true,false,true,this.m_oCV.getWebContentRoot()); var _1287=document.getElementById(CMODAL_CONTENT_ID); _1287.src=url; }; PromptDialog.prototype.show=function(){ this.m_dialogImpl.show(); }; PromptDialog.prototype.hide=function(){ this.m_dialogImpl.hide(); destroyCModal(); }; function WorkingDialog(_1288){ if(_1288){ this.m_bSimpleWorkingDialog=false; this.m_bShowCancelButton=(_1288.getAdvancedServerProperty("VIEWER_JS_HIDE_CANCEL_BUTTON")=="true")?false:true; WorkingDialog.baseConstructor.call(this,_1288); this.m_secondaryRequests=_1288.getSecondaryRequests(); } }; WorkingDialog.prototype=new ViewerBaseWorkingDialog(); WorkingDialog.baseConstructor=ViewerBaseWorkingDialog; WorkingDialog.prototype.setSecondaryRequests=function(_1289){ this.m_secondaryRequests=_1289; }; 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(bShow){ var _128c=this.getNamespace(); var _128d=document.getElementById("DeliveryOptionsVisible"+_128c); if(_128d){ _128d.style.display=(bShow===false?"none":"block"); if(bShow){ var links=_128d.getElementsByTagName("a"); for(var i=links.length;i>0;i--){ if(links[i]&&links[i].getAttribute("tabIndex")=="0"){ links[i].focus(); } } } } _128d=document.getElementById("OptionsLinkSelected"+_128c); if(_128d){ _128d.style.display=(bShow===false?"none":"block"); } _128d=document.getElementById("OptionsLinkUnselected"+_128c); if(_128d){ _128d.style.display=(bShow===false?"block":"none"); } }; WorkingDialog.prototype.renderHTML=function(){ var _1290=this.getNamespace(); var _1291=_1290+"_workingMsg "+_1290+"_workingMsg2"; var html=""; html+=(""+""+""+"
"+"
"); html+=this.renderFirstInnerTable(); html+=this.renderSecondInnerTable(); html+=("
"+"
"); return html; }; WorkingDialog.prototype.renderFirstInnerTable=function(){ var _1293=this.getSimpleWorkingDialogFlag(); var _1294=_1293?RV_RES.GOTO_WORKING:RV_RES.RV_RUNNING; var _1295=this.m_sNamespace; var _1296=""+""+""; _1296+=""; _1296+="
"; var _1297=this.getCognosViewer().getSkin()+"/branding/"; _1296+=" "; _1296+=""; _1296+=_1294; _1296+=""; _1296+="

"; var _1298=this.getCognosViewer().envParams["cv.responseFormat"]; if(_1293||this.isUIBlacklisted("RV_TOOLBAR_BUTTONS")||!this.deliverySectionIsNeeded()||(_1298&&("qs"===_1298||"fragment"===_1298))){ _1296+=RV_RES.RV_PLEASE_WAIT; }else{ var _1299=this.canShowDeliveryOptions(); if(_1299){ _1296+=this.optionLinkSelectedDiv(); _1296+=this.optionLinkUnselectedDiv(); }else{ _1296+=RV_RES.RV_PLEASE_WAIT; } } _1296+="
 
"; return _1296; }; WorkingDialog.prototype.optionLinkSelectedDiv=function(){ var _129a=""; _129a+="
"; _129a+=RV_RES.RV_BUSY_OPTIONS_SELECTED; _129a+="
"; return _129a; }; WorkingDialog.prototype.optionLinkUnselectedDiv=function(){ var _129b=""; var _129c=this.getNamespace(); var _129d="window.oCV"+_129c+".getWorkingDialog()"; _129b+="
"; return _129b; }; WorkingDialog.prototype.canShowDeliveryOptions=function(){ var _129e=this.getCognosViewer().envParams["ui.primaryAction"]; if("saveAs"!==_129e&&"email"!==_129e&&this.getIsSavedReport()){ return true; } return false; }; WorkingDialog.prototype.isUIBlacklisted=function(item){ var _12a0=this.getUIBlacklist(); for(var index in _12a0){ if(_12a0[index]===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(_12a2){ var _12a3=this._getSecondaryRequests(); if(_12a3){ var _12a4=_12a3.length; for(var i=0;i<_12a4;i++){ if(_12a3[i]==_12a2){ return true; } } } return false; }; WorkingDialog.prototype.renderSecondInnerTable=function(){ var _12a6=""; var _12a7=this.getCognosViewer().getWebContentRoot(); _12a6+=""; _12a6+=""; _12a6+=" "; _12a6+=" "; _12a6+=" "; _12a6+="
"; _12a6+=""; var _12a8=this.canShowDeliveryOptions(); if(_12a8&&this.deliverySectionIsNeeded()){ if(!this._isSaveBlackListed()){ _12a6+=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()){ _12a6+=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()){ _12a6+=this.addDeliverOption("/rv/images/action_send_report.gif",RV_RES.RV_EMAIL_REPORT,"SendReport(true);"); } } _12a6+="
"; if(this.showCancelButton()){ _12a6+=this.addCancelButton(); } _12a6+="
"; return _12a6; }; WorkingDialog.prototype.addDeliverOption=function(_12a9,sText,_12ab){ var _12ac=""; var _12ad=this.getCognosViewer().getWebContentRoot(); var _12ae="javascript: window.oCV"+this.getNamespace()+".getRV()."; var _12af=_12ae+_12ab; _12ac+=" "; _12ac+=" "; _12ac+="\" "; _12ac+=" "; _12ac+=" "; _12ac+=(sText+""); return _12ac; }; WorkingDialog.prototype.addCancelButton=function(){ var _12b0=""; var _12b1=this.getCognosViewer().getWebContentRoot(); _12b0+=" "; _12b0+=" "; _12b0+="
"; _12b0+=" "; _12b0+=" "; _12b0+="
"; _12b0+=RV_RES.CANCEL; _12b0+=" "; _12b0+="
\"\"
"; return _12b0; }; WorkingDialog.prototype.disableCancelButton=function(_12b3){ this.cancelButtonDisabled=true; var _12b4=document.getElementById("cvWorkingDialog"+this.getNamespace()); if(_12b4){ _12b4.style.cursor="default"; _12b4.className="commandButtonOver"; _12b4.removeAttribute("onmouseover"); _12b4.removeAttribute("onmouseout"); } if(_12b3){ _12b3.removeAttribute("href"); _12b3.removeAttribute("onclick"); _12b3.style.cursor="default"; } }; WorkingDialog.prototype.enableCancelButton=function(){ if(this.cancelButtonDisabled){ var _12b5=document.getElementById("cancelButtonContainer"+this.getNamespace()); if(_12b5){ _12b5.innerHTML=this.addCancelButton(); } this.cancelButtonDisabled=false; } }; WorkingDialog.prototype.getContainerId=function(){ return "CVWait"+this.getNamespace(); }; function RequestExecutedIndicator(_12b6){ if(_12b6){ RequestExecutedIndicator.baseConstructor.call(this,_12b6); } }; RequestExecutedIndicator.baseConstructor=WorkingDialog; RequestExecutedIndicator.prototype=new WorkingDialog(); RequestExecutedIndicator.prototype.renderHTML=function(){ var _12b7=""; _12b7+="
"; _12b7+="
"; _12b7+=""; _12b7+="
"; _12b7+="\""+RV_RES.GOTO_WORKING+"\""; _12b7+=""; _12b7+=RV_RES.GOTO_WORKING; _12b7+="
"; _12b7+=RV_RES.RV_PLEASE_WAIT; _12b7+="
"; return _12b7; }; 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(_12b9){ this.parent.onComplete.call(this,_12b9); this.processDATAReportResponse(_12b9); this.postComplete(); }; RequestHandler.prototype.processInitialResponse=function(_12ba){ this.parent.processInitialResponse.call(this,_12ba); var oCV=this.getViewer(); var _12bc=oCV.getStatus(); oCV.setMaxContentSize(); var _12bd=(oCV.isWorking(_12bc)||_12bc=="default"); if(_12bd){ if(oCV.getWorkingDialog()){ oCV.getWorkingDialog().show(); } setTimeout(getCognosViewerObjectRefAsString(oCV.getId())+".executeCallback(\"wait\");",10); }else{ if(_12bc=="fault"){ oCV.setSoapFault(_12ba.m_sSoapFault); oCV.executeCallback("fault"); }else{ if(_12ba.status=="cancel"){ oCV.executeCallback("cancel"); }else{ oCV.updateSkipToReportLink(); if(oCV.envParams&&oCV.envParams["pinFreezeInfo"]){ var _12be=oCV.getPinFreezeManager(); _12be.fromJSONString(oCV.envParams["pinFreezeInfo"]); delete oCV.envParams["pinFreezeInfo"]; } if(_12bc!="prompting"||!oCV.executeCallback("prompt")){ this.postComplete(); }else{ oCV.updateSkipToNavigationLink(true); } } } } this.showReport(); this.getViewer().renderTabs(); this.onAsynchStatusUpdate(_12bc); }; RequestHandler.prototype.postComplete=function(){ this.parent.postComplete.call(this); var oCV=this.getViewer(); var _12c0=document.getElementById("RVContent"+oCV.getId()); if(_12c0){ _12c0.scrollTop=0; } oCV.updateSkipToReportLink(); if(oCV.rvMainWnd){ oCV.updateLayout(oCV.getStatus()); if(!oCV.getUIConfig()||oCV.getUIConfig().getShowToolbar()){ var _12c1=oCV.rvMainWnd.getToolbar(); if(_12c1){ oCV.rvMainWnd.updateToolbar(oCV.outputFormat); _12c1.draw(); } } if(!oCV.getUIConfig()||oCV.getUIConfig().getShowBanner()){ var _12c2=oCV.rvMainWnd.getBannerToolbar(); if(_12c2){ _12c2.draw(); } } } if(oCV.getBrowser()=="moz"){ if(_12c0){ if(oCV.outputFormat=="XML"&&oCV.getStatus()!="prompting"){ _12c0.style.overflow="hidden"; }else{ _12c0.style.overflow="auto"; } } } oCV.gbPromptRequestSubmitted=false; this.showReport(); if(oCV.getPinFreezeManager()&&oCV.getPinFreezeManager().hasFrozenContainers()){ var _12c3=document.getElementById("CVReport"+oCV.getId()); if(_12c3){ setTimeout(function(){ oCV.getPinFreezeManager().renderReportWithFrozenContainers(_12c3); if(isIE()){ oCV.repaintDiv(_12c0); } },1); } } oCV.setMaxContentSize(); oCV.executeCallback("done"); oCV.doneLoading(); }; function ActionFormFields(_12c4){ this.m_dispatcherEntry=_12c4; this.m_oCV=_12c4.getViewer(); }; ActionFormFields.prototype.addFormFields=function(){ var _12c5=this.m_dispatcherEntry; var _12c6=_12c5.getAction(); _12c6.preProcess(); _12c5.addFormField("ui.action","modifyReport"); if(this.m_oCV.getModelPath()!==""){ _12c5.addFormField("modelPath",this.m_oCV.getModelPath()); if(typeof this.m_oCV.envParams["metaDataModelModificationTime"]!="undefined"){ _12c5.addFormField("metaDataModelModificationTime",this.m_oCV.envParams["metaDataModelModificationTime"]); } } if(_12c6.doAddActionContext()===true){ var _12c7=_12c6.addActionContext(); _12c5.addFormField("cv.actionContext",_12c7); if(window.gViewerLogger){ window.gViewerLogger.log("Action context",_12c7,"xml"); } } var isBux=this.m_oCV.envParams["bux"]=="true"; if(isBux){ _12c5.addFormField("cv.showFaultPage","false"); }else{ _12c5.addFormField("cv.showFaultPage","true"); } _12c5.addFormField("ui.object",this.m_oCV.envParams["ui.object"]); _12c5.addDefinedFormField("ui.spec",this.m_oCV.envParams["ui.spec"]); _12c5.addDefinedFormField("modelPath",this.m_oCV.envParams["modelPath"]); _12c5.addDefinedFormField("packageBase",this.m_oCV.envParams["packageBase"]); _12c5.addDefinedFormField("rap.state",this.m_oCV.envParams["rap.state"]); _12c5.addDefinedFormField("rap.reportInfo",this.m_oCV.envParams["rapReportInfo"]); _12c5.addDefinedFormField("ui.primaryAction",this.m_oCV.envParams["ui.primaryAction"]); _12c5.addNonNullFormField("cv.debugDirectory",this.m_oCV.envParams["cv.debugDirectory"]); _12c5.addNonNullFormField("ui.objectClass",this.m_oCV.envParams["ui.objectClass"]); _12c5.addNonNullFormField("bux",this.m_oCV.envParams["bux"]); _12c5.addNonNullFormField("baseReportModificationTime",this.m_oCV.envParams["baseReportModificationTime"]); _12c5.addNonNullFormField("originalReport",this.m_oCV.envParams["originalReport"]); var _12c9=this.m_oCV.getFlashChartOption(); if(_12c9!=null){ _12c5.addFormField("savedFlashChartOption",_12c9); if(_12c9&&_12c6!=null&&typeof (_12c6.m_requestParams)!="undefined"&&typeof (_12c6.m_requestParams.targetType)!="undefined"){ var _12ca=false; var _12cb=null; if(typeof (_12c6.m_requestParams.targetType.targetType)!="undefined"){ _12cb=_12c6.m_requestParams.targetType.targetType; }else{ _12cb=_12c6.m_requestParams.targetType; } if(_12cb.match("v2_")!=null||_12cb.match("_v2")!=null){ _12ca=true; }else{ var _12cc=this.m_oCV.getRAPReportInfo(); var _12cd=_12c6.getSelectedReportInfo(); if(_12cc&&_12cd){ var _12ce=_12cc.getDisplayTypes(_12cd.container); if(_12ce.match("v2_")!=null||_12ce.match("_v2")!=null){ _12ca=true; } } } _12c5.addFormField("hasAVSChart",_12ca); }else{ _12c5.addFormField("hasAVSChart",this.m_oCV.hasAVSChart()); } } var sEP=this.m_oCV.getExecutionParameters(); if(sEP){ _12c5.addFormField("executionParameters",encodeURIComponent(sEP)); } _12c5.addFormField("ui.conversation",encodeURIComponent(this.m_oCV.getConversation())); _12c5.addFormField("m_tracking",encodeURIComponent(this.m_oCV.getTracking())); var sCAF=this.m_oCV.getCAFContext(); if(sCAF){ _12c5.addFormField("ui.cafcontextid",sCAF); } if(_12c6.forceRunSpecRequest()){ _12c5.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(_12d1){ this.m_bUsePageRequest=_12d1; }; ViewerDispatcher.prototype.getUsePageRequest=function(){ return this.m_bUsePageRequest; }; ViewerDispatcher.prototype.dispatchRequest=function(_12d2){ if(this.m_activeRequest==null){ this.startRequest(_12d2); }else{ if(_12d2.canBeQueued()==true){ this.m_requestQueue.push(_12d2); }else{ if(window.cognosViewerDebug&&console&&console.warn){ console.warn("Warning! Dropped a dispatcher entry!"); } } } }; ViewerDispatcher.prototype.startRequest=function(_12d3){ this.m_activeRequest=_12d3; if(_12d3!=null){ _12d3.setUsePageRequest(this.m_bUsePageRequest); _12d3.sendRequest(); } }; ViewerDispatcher.prototype.cancelRequest=function(key){ for(var i=0;i0){ _12d8=this.m_requestQueue.shift(); if(_12d8.getKey()!=null){ while(this.m_requestQueue.length>0&&this.m_requestQueue[0].getKey()==_12d8.getKey()){ _12d8=this.m_requestQueue.shift(); } } } return _12d8; }; 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(_12da){ this.m_request.setHeaders(_12da); }; DispatcherEntry.prototype.getHeaders=function(){ return this.m_request.getHeaders(); }; DispatcherEntry.prototype.setOriginalFormFields=function(_12db){ this.m_originalFormFields=_12db; }; DispatcherEntry.prototype.getOriginalFormFields=function(){ return this.m_originalFormFields; }; DispatcherEntry.prototype.setRequestHandler=function(_12dc){ _12dc.addCallbackHooks(); this.m_requestHandler=_12dc; }; DispatcherEntry.prototype.getRequestHandler=function(){ return this.m_requestHandler; }; DispatcherEntry.prototype.setWorkingDialog=function(_12dd){ if(this.getRequestHandler()){ this.m_requestHandler.setWorkingDialog(_12dd); } }; DispatcherEntry.prototype.setRequestIndicator=function(_12de){ if(this.getRequestHandler()){ this.getRequestHandler().setRequestIndicator(_12de); } }; DispatcherEntry.prototype.forceSynchronous=function(){ this.getRequest().forceSynchronous(); }; DispatcherEntry.prototype.setUsePageRequest=function(_12df){ this.m_bUsePageRequest=_12df; }; DispatcherEntry.prototype.getUsePageRequest=function(){ return this.m_bUsePageRequest; }; DispatcherEntry.prototype.setDefaultFormFields=function(){ var _12e0=this.getViewer().envParams; this.addFormField("b_action","cognosViewer"); this.addFormField("cv.catchLogOnFault","true"); this.addDefinedNonNullFormField("protectParameters",_12e0["protectParameters"]); this.addDefinedNonNullFormField("ui.routingServerGroup",_12e0["ui.routingServerGroup"]); this.addDefinedNonNullFormField("cv.debugDirectory",_12e0["cv.debugDirectory"]); this.addDefinedNonNullFormField("cv.showFaultPage",_12e0["cv.showFaultPage"]); this.addDefinedNonNullFormField("cv.useRAPDrill",_12e0["cv.useRAPDrill"]); this.addDefinedNonNullFormField("container",_12e0["container"]); this.addNonEmptyStringFormField("cv.objectPermissions",_12e0["cv.objectPermissions"]); }; DispatcherEntry.prototype.getViewer=function(){ return this.m_oCV; }; DispatcherEntry.prototype.prepareRequest=function(){ }; DispatcherEntry.addWidgetInfoToFormFields=function(_12e1,_12e2){ if(_12e1){ var _12e3=_12e1.getBUXRTStateInfoMap(); if(_12e3){ _12e2.addFormField("cv.buxRTStateInfo",_12e3); } var _12e4=_12e1.getDisplayName(); if(_12e4&&_12e4.length>0){ _12e2.addFormField("displayTitle",_12e4); } } }; DispatcherEntry.prototype.canBeQueued=function(){ return this.m_canBeQueued; }; DispatcherEntry.prototype.setCanBeQueued=function(_12e5){ this.m_canBeQueued=_12e5; }; DispatcherEntry.prototype.getKey=function(){ return this.m_requestKey; }; DispatcherEntry.prototype.setKey=function(key){ this.m_requestKey=key; }; DispatcherEntry.prototype.setRequest=function(_12e7){ this.m_request=_12e7; }; DispatcherEntry.prototype.getRequest=function(){ return this.m_request; }; DispatcherEntry.prototype.setCallbacks=function(_12e8){ this.getRequest().setCallbacks(_12e8); }; DispatcherEntry.prototype.getCallbacks=function(){ return this.getRequest().getCallbacks(); }; DispatcherEntry.prototype.sendRequest=function(){ this.prepareRequest(); var _12e9=this.getRequest().getFormFields(); var _12ea=_12e9.keys(); if(!this.m_originalFormFields){ this.m_originalFormFields=new CDictionary(); for(var index=0;index<_12ea.length;index++){ this.m_originalFormFields.add(_12ea[index],_12e9.get(_12ea[index])); } } this.getRequest().sendRequest(); }; DispatcherEntry.prototype.onNewRequest=function(_12ec){ this.setRequest(_12ec); }; DispatcherEntry.prototype.retryRequest=function(){ var oCV=this.getViewer(); oCV.setRetryDispatcherEntry(null); var _12ee=this.getRequest().newRequest(); _12ee.setHeaders(null); this.setRequest(_12ee); var _12ef=this.m_originalFormFields.keys(); for(var index=0;index<_12ef.length;index++){ var _12f1=_12ef[index]; var _12f2=this.m_originalFormFields.get(_12f1); if(_12f1=="cv.responseFormat"&&_12f2=="iWidget"){ this.addFormField("cv.responseFormat","data"); }else{ if(_12f1=="ui.action"&&_12f2=="wait"){ this.addFormField("ui.action",this.m_originalFormFields.get("ui.primaryAction")); }else{ if(_12f1!="m_tracking"&&_12f1!="cv.outputKey"){ this.addFormField(_12f1,_12f2); } } } } 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(_12f3){ if(!this.m_bCancelCalled){ this.m_bCancelCalled=true; if(this.getRequestHandler()){ this.getRequestHandler().onCancel(); } if(_12f3){ 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,value){ this.m_request.addFormField(name,value); }; DispatcherEntry.prototype.addDefinedNonNullFormField=function(name,value){ if(typeof value!="undefined"&&value!=null){ this.addFormField(name,value); } }; DispatcherEntry.prototype.addDefinedFormField=function(name,value){ if(typeof value!="undefined"){ this.addFormField(name,value); } }; DispatcherEntry.prototype.addNonNullFormField=function(name,value){ if(value!=null){ this.addFormField(name,value); } }; DispatcherEntry.prototype.addNonEmptyStringFormField=function(name,value){ if(typeof value!="undefined"&&value!=null&&value!=""){ this.addFormField(name,value); } }; DispatcherEntry.prototype.onWorking=function(_1301,arg1){ if(this.getRequestHandler()){ this.getRequestHandler().onWorking(_1301); } }; DispatcherEntry.prototype.onFault=function(_1303){ if(this.getRequestHandler()){ this.getRequestHandler().onFault(_1303); } }; DispatcherEntry.prototype.onError=function(_1304){ if(this.m_bCancelCalled){ return; } if(this.getRequestHandler()){ this.getRequestHandler().onError(_1304); } }; DispatcherEntry.prototype.possibleUnloadEvent=function(){ this.setCallbacks({"error":{}}); }; DispatcherEntry.prototype.onPreHttpRequest=function(_1305){ if(this.getRequestHandler()){ this.getRequestHandler().preHttpRequest(_1305); } }; DispatcherEntry.prototype.onPostHttpRequest=function(_1306){ if(this.getRequestHandler()){ this.getRequestHandler().postHttpRequest(_1306); } }; DispatcherEntry.prototype.onPassportTimeout=function(_1307){ if(this.getRequestHandler()){ this.getRequestHandler().onPassportTimeout(_1307); } }; DispatcherEntry.prototype.onPrompting=function(_1308){ if(this.getRequestHandler()){ this.getRequestHandler().onPrompting(_1308); } }; DispatcherEntry.prototype.onEntryComplete=function(_1309){ if(!this.m_oCV._beingDestroyed){ this.m_oCV.getViewerDispatcher().requestComplete(this); } }; DispatcherEntry.prototype.onEntryFault=function(_130a){ this.m_oCV.setFaultDispatcherEntry(this); this.m_oCV.resetViewerDispatcher(); if(!this.m_bCancelCalled){ this.m_oCV.setRetryDispatcherEntry(this); } }; DispatcherEntry.prototype.onCloseErrorDlg=function(){ var _130b=this.getCallbacks(); if(_130b["closeErrorDlg"]){ var _130c=GUtil.generateCallback(_130b["closeErrorDlg"].method,[],_130b["closeErrorDlg"].object); _130c(); } }; DispatcherEntry.prototype.onPostEntryComplete=function(){ if(this.getRequestHandler()){ this.getRequestHandler().onPostEntryComplete(); } this.executeCallback("postComplete"); }; DispatcherEntry.prototype.executeCallback=function(_130d){ var _130e=this.getCallbacks(); if(_130e[_130d]){ var _130f=(_130e.customArguments)?[this,_130e.customArguments]:[this]; var _1310=GUtil.generateCallback(_130e[_130d].method,_130f,_130e[_130d].object); _1310(); 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 _1314=new AsynchDATARequest(oCV.getGateway(),oCV.getWebContentRoot()); this.setRequest(_1314); 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 _1316=new AsynchJSONRequest(oCV.getGateway(),oCV.getWebContentRoot()); this.setRequest(_1316); 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 _1318=this.getFormField("ui.action"); var _1319=this.getViewer().getActionState(); if(_1319!==""&&(_1318=="wait"||_1318=="forward"||_1318=="back")){ this.addFormField("cv.actionState",_1319); } var _131a=["nextPage","previousPage","firstPage","lastPage","reportAction","cancel","wait"]; var _131b=true; for(var i=0;i<_131a.length;i++){ if(_131a[i]==_1318){ _131b=false; break; } } if(_131b){ 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 _131e=oCV.envParams; this.addFormField("cv.id",oCV.getId()); if(_131e["cv.showFaultPage"]){ this.addFormField("cv.showFaultPage",_131e["cv.showFaultPage"]); }else{ this.addFormField("cv.showFaultPage","false"); } this.addDefinedNonNullFormField("ui.object",_131e["ui.object"]); this.addDefinedNonNullFormField("ui.primaryAction",_131e["ui.primaryAction"]); this.addDefinedNonNullFormField("ui.objectClass",_131e["ui.objectClass"]); this.addNonEmptyStringFormField("specificationType",_131e["specificationType"]); this.addNonEmptyStringFormField("cv.promptForDownload",_131e["cv.promptForDownload"]); this.addNonEmptyStringFormField("ui.conversation",oCV.getConversation()); this.addNonEmptyStringFormField("m_tracking",oCV.getTracking()); var _131f=oCV.getExecutionParameters(); this.addNonEmptyStringFormField("executionParameters",_131f); var sCAF=oCV.getCAFContext(); this.addDefinedNonNullFormField("ui.cafcontextid",sCAF); }; ReportDispatcherEntry.prototype.onWorking=function(_1321,arg1){ var _1323=_1321.getResponseState(); var _1324=this.getRequestHandler(); if(_1324){ var _1325=_1324.getWorkingDialog(); if(_1325&&_1325.setSecondaryRequests&&_1323.m_aSecRequests){ _1325.setSecondaryRequests(_1323.m_aSecRequests); } } DispatcherEntry.prototype.onWorking.call(this,_1321,arg1); if(_1324){ this.getRequestHandler().updateViewerState(_1323); } }; ReportDispatcherEntry.prototype.onComplete=function(_1326,arg1){ if(this.getRequestHandler()){ this.getRequestHandler().onComplete(_1326); } }; 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 _132a=oCV.envParams; this.addFormField("cv.showFaultPage","true"); this.addDefinedNonNullFormField("cv.header",_132a["cv.header"]); this.addDefinedNonNullFormField("cv.toolbar",_132a["cv.toolbar"]); this.addDefinedNonNullFormField("ui.backURL",_132a["ui.backURL"]); this.addDefinedNonNullFormField("errURL",_132a["ui.backURL"]); this.addDefinedNonNullFormField("errURL",_132a["ui.errURL"]); this.addDefinedNonNullFormField("cv.catchLogOnFault","true"); this.addDefinedNonNullFormField("m_sessionConv",_132a["m_sessionConv"]); if(_132a["m_session"]){ this.addFormField("m_session",_132a["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 _132b=this.m_oCV.getPinFreezeManager(); if(_132b&&_132b.hasFrozenContainers()){ this.addFormField("pinFreezeInfo",_132b.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 _132c=this.buildRequestForm(); if(typeof document.progress!="undefined"){ setTimeout("document.progress.src=\""+this.m_oCV.getSkin()+"/branding/progress.gif"+"\";",1); } _132c.submit(); }else{ this.getViewer().closeContextMenuAndToolbarMenus(); this.parent.sendRequest.call(this); } }; ViewerDispatcherEntry.prototype.buildRequestForm=function(){ var oCV=this.getViewer(); var _132e=document.createElement("form"); _132e.setAttribute("id","requestForm"); _132e.setAttribute("name","requestForm"); _132e.setAttribute("method","post"); _132e.setAttribute("target","_self"); _132e.setAttribute("action",oCV.getGateway()); _132e.style.display="none"; document.body.appendChild(_132e); var _132f=this.getRequest().getFormFields(); var _1330=_132f.keys(); for(var index=0;index<_1330.length;index++){ _132e.appendChild(this.createHiddenFormField(_1330[index],_132f.get(_1330[index]))); } for(param in oCV.envParams){ if(!_132f.exists(param)&¶m!="cv.actionState"){ _132e.appendChild(this.createHiddenFormField(param,oCV.envParams[param])); } } return _132e; }; ViewerDispatcherEntry.prototype.createHiddenFormField=function(name,value){ var _1334=document.createElement("input"); _1334.setAttribute("type","hidden"); _1334.setAttribute("name",name); _1334.setAttribute("id",name); _1334.setAttribute("value",value); return (_1334); }; ViewerDispatcherEntry.prototype.onCancel=function(){ var oCV=this.getViewer(); oCV.setStatus("complete"); if(this.getUsePageRequest()||!oCV.isReportRenderingDone()){ oCV.executeCallback("cancel"); } }; ViewerDispatcherEntry.prototype.onFault=function(_1336){ if(this.getViewer().callbackExists("fault")){ this.getViewer().setSoapFault(_1336.getSoapFault()); this.getViewer().executeCallback("fault"); }else{ this.parent.onFault.call(this,_1336); } }; ViewerDispatcherEntry.prototype.onComplete=function(_1337){ var oCV=this.getViewer(); oCV.saveBackJaxInformation(_1337); if(oCV.isReportRenderingDone()){ this.getViewer().getSelectionController().resetSelections(); } this.parent.onComplete.call(this,_1337); }; ViewerDispatcherEntry.prototype.onPrompting=function(_1339){ var oCV=this.getViewer(); oCV.updateSkipToNavigationLink(true); if(!oCV.executeCallback("prompt")){ this.onComplete(_1339); } }; ViewerDispatcherEntry.prototype.onEntryComplete=function(_133b){ if(this.getRequestHandler()){ this.getRequestHandler().setDispatcherEntry(this); } this.parent.onEntryComplete.call(this,_133b); };