/* *+------------------------------------------------------------------------+ *| 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 CSelectionDefaultStyles(_15d){ this.m_primarySelectionColor=null; this.m_highContrastBorderStyle="solid"; this.m_secondarySelectionIsDisabled=false; if(_15d){ this.m_selectionController=_15d; this.m_oCognosViewer=_15d.m_oCognosViewer; if(this.m_oCognosViewer){ var _15e=this.m_oCognosViewer.getUIConfig(); if(_15e){ if(_15e.getPrimarySelectionColor()){ this.m_primarySelectionColor=_15e.getPrimarySelectionColor(); } if(!_15e.getShowSecondarySelection()){ this.m_secondarySelectionIsDisabledConfig=true; }else{ if(_15e.getSeondarySelectionColor()){ this.m_secondarySelectionColor=_15e.getSeondarySelectionColor(); } } } } } }; CSelectionDefaultStyles.prototype.getPrimarySelectionColor=function(_15f){ return this.m_primarySelectionColor; }; CSelectionDefaultStyles.prototype.getSecondarySelectionColor=function(){ return this.m_secondarySelectionColor; }; CSelectionDefaultStyles.prototype.getHighContrastBorderStyle=function(){ return this.m_highContrastBorderStyle; }; CSelectionDefaultStyles.prototype.canApplyToSelection=function(_160){ return true; }; CSelectionDefaultStyles.prototype.secondarySelectionIsDisabled=function(){ return this.m_secondarySelectionIsDisabled; }; CSelectionDefaultStyles.prototype.setStyleForSelection=function(){ }; function CSelectionFilterStyles(_161){ this.m_selectionController=_161; 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(_162){ 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(_163){ return !this.selectionHasOnlyMeasure(_163); }; CSelectionFilterStyles.prototype.selectionHasOnlyMeasure=function(_164){ return (_164.length===1&&_164[0].length===1&&this.m_selectionController.isMeasure(_164[0][0])); }; CSelectionFilterStyles.prototype.setStyleForSelection=function(_165){ this.m_primarySelectionColor=(this.selectionHasOnlyMeasure(_165))?null:this.m_primarySelectionFilterColor; }; function CSelectionFilterContextMenuStyles(_166){ CSelectionDefaultStyles.call(this,_166); 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(_167){ var _168=this.getDataItems(); var item=""; if(_168&&_168[0]&&_168[0][0]){ item=this.getDataItems()[0][0]; if(_167&&_167.itemInfo&&_167.itemInfo.length){ var _16a=_167.itemInfo; for(var i=0;i<_16a.length;i++){ if(_16a[i].item===item&&_16a[i].itemLabel){ return _16a[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 _18d=this.getCellRef().className; if(_18d&&(_18d=="xm"||_18d.indexOf("xm ")!=-1||_18d.indexOf(" xm")!=-1)){ return true; } return false; }; CSelectionObject.prototype.getDataContainerType=function(){ return this.m_dataContainerType; }; CSelectionObject.prototype.getContextJsonObject=function(_18e,_18f){ if(this.m_oJsonContext===null){ var _190={}; var _191=[]; var _192=null; this.getDataItems(); this.getUseValues(); if(this.m_contextIds.length==0){ return null; } var i=0,j=0; var _195=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_18e); _192=_195; this._populateJsonContextObj(_195,this.m_aUseValues[i][j],_18e.getDisplayValue(this.m_contextIds[i][j]),_18e.getMun(this.m_contextIds[i][j]),_190,_191); j++; for(;i0){ _1c1=true; break; } } if(!_1c1){ j=0; i++; } }while(!_1c1); } var _1c2=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_1ba); var _1c3=_1ba.isMeasure(this.m_contextIds[i][j]); var _1c4=this._getBestPossibleItemReference(this.m_contextIds[i][j],_1c3,_1ba.getCCDManager()); var _1c5=_1ba.getCCDManager().GetQuery(this.m_contextIds[i][j]); var _1c6=this.isDataValueOrChartElement(); var _1c7=this._populateJsonForMarshal(_1c2,_1c4,_1c3,this.m_aUseValues[i][j],_1ba.getDisplayValue(this.m_contextIds[i][j]),_1ba.getMun(this.m_contextIds[i][j]),_1c6); j++; var _1c8=[]; for(;i0){ lid=lid.substring(0,lid.indexOf(_1bb)-1); } this.m_oJsonForMarshal={"lid":lid,"query":_1c5,"selectedItem":_1c7,"context":_1c8}; } return this.m_oJsonForMarshal; }; CSelectionObject.prototype._populateJsonForMarshal=function(_1cb,_1cc,_1cd,_1ce,_1cf,mun,_1d1){ if(_1cb){ var _1d2={}; _1d2["itemName"]=_1cb; _1d2["isMeasure"]=_1cd?"true":"false"; _1d2["mdProperty"]=_1cc.mdProperty; _1d2["mdValue"]=_1cc.mdValue; _1d2["isDataValueOrChartElement"]=_1d1?"true":"false"; if(mun){ _1d2["mun"]=mun; } if(_1ce){ _1d2["use"]=_1ce; } return _1d2; } return null; }; CSelectionObject.prototype._getBestPossibleItemReference=function(_1d3,_1d4,_1d5){ var _1d6=null; var _1d7=null; if(_1d4){ _1d7="i"; _1d6=_1d5.GetQMID(_1d3); if(_1d6==null){ _1d7="m"; _1d6=_1d5.GetMUN(_1d3); } if(_1d6==null){ _1d7="r"; _1d6=_1d5.GetRDIValue(_1d3); } }else{ _1d7="l"; _1d6=_1d5.GetLUN(_1d3); if(_1d6==null){ _1d7="h"; _1d6=_1d5.GetHUN(_1d3); } if(_1d6==null){ _1d7="i"; _1d6=_1d5.GetQMID(_1d3); } if(_1d6==null){ _1d7="r"; _1d6=_1d5.GetRDIValue(_1d3); } } return {"mdProperty":_1d7,"mdValue":_1d6}; }; 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(_1d8){ var _1d9=this.m_selectionController.getSelectedChartImageFromChartArea(_1d8); if(_1d9){ this.m_selectedVizChart=_1d9.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(_1da){ this.m_chartCtxAreas=_1da; }; CSelectionChartObject.prototype.getCtxAttributeString=function(){ return this.m_context; }; function CChartHelper(_1db,_1dc,_1dd){ var _1de=_1db.parentNode; this.m_selectionObjectFactory=_1dc; this.m_map=_1de; _1dd.loadExtra(); this.imageMapHighlighter=new CImageMapHighlight(_1de,_1dd.sWebContentRoot); this.initialize(); }; CChartHelper.prototype.initialize=function(){ this.buildMapCtxAreas(); this.m_chartCtxNodes={}; }; CChartHelper.prototype.buildMapCtxAreas=function(){ var _1df={}; var _1e0=this.m_map.childNodes; var _1e1=_1e0.length; var _1e2=null; for(var i=0;i<_1e1;i++){ var a=_1e0[i]; _1e2=a.getAttribute("ctx"); if(_1e2){ if(_1df[_1e2]){ _1df[_1e2].push(a); }else{ _1df[_1e2]=[a]; } } } this.m_ctxAreas=_1df; }; CChartHelper.prototype.getChartNode=function(_1e5){ if(!this.isAreaInitialized(_1e5)){ var _1e6=_1e5.parentNode; this.m_map=_1e6; this.initialize(); this.imageMapHighlighter.initialize(_1e6); } var _1e7=_1e5.getAttribute("ctx"); if(!this.m_chartCtxNodes[_1e7]){ this.m_chartCtxNodes[_1e7]=this.m_selectionObjectFactory.getSelectionChartObject(_1e5); this.m_chartCtxNodes[_1e7].setCtxAreas(this.m_ctxAreas[_1e7]); } return this.m_chartCtxNodes[_1e7]; }; CChartHelper.prototype.isAreaInitialized=function(_1e8){ return this.imageMapHighlighter.isAreaInitialized(_1e8); }; CChartHelper.prototype.getImageMapHighlighter=function(){ return this.imageMapHighlighter; }; function CSelectionObjectFactory(_1e9){ this.m_selectionController=_1e9; }; CSelectionObjectFactory.prototype.getSelectionController=function(){ return this.m_selectionController; }; CSelectionObjectFactory.prototype.getChildSpans=function(_1ea){ var _1eb=[]; for(var i=0;i<_1ea.childNodes.length;i++){ var _1ed=_1ea.childNodes[i]; if(!_1ed.getAttribute||_1ed.getAttribute("skipSelection")!="true"){ _1eb.push(_1ea.childNodes[i]); } } var _1ee=_1ea; var _1ef=""; while(!_1ef&&_1ee){ _1ef=_1ee.attributes?_1ee.attributes["LID"]:""; _1ee=_1ee.parentNode; } _1ef=_1ef?_1ef.value:""; var _1f0=[]; while(_1eb.length>0){ var _1ed=_1eb.pop(); var lid=_1ed.attributes?_1ed.attributes["LID"]:""; lid=lid?lid.value:""; if(!lid||lid==_1ef){ if(_1ed.nodeName.toLowerCase()=="span"){ _1f0.push(_1ed); }else{ for(i=0;i<_1ed.childNodes.length;i++){ _1eb.push(_1ed.childNodes[i]); } } } } return _1f0; }; CSelectionObjectFactory.prototype.getSelectionObject=function(_1f2,_1f3){ var _1f4=new CSelectionObject(); try{ _1f4.setSelectionController(this.getSelectionController()); _1f4.m_oCellRef=_1f2; _1f4.m_sColumnRef=_1f2.getAttribute("cid"); _1f4.m_sCellTypeId=_1f2.getAttribute("uid"); _1f4.m_sLayoutType=_1f2.getAttribute("type"); _1f4.m_sTag=_1f2.getAttribute("tag"); _1f4.m_layoutElementId=this.getLayoutElementId(_1f2); _1f4.m_dataContainerType=this.getContainerType(_1f2); if(typeof cf!="undefined"){ var _1f5=cf.cfgGet("MiniQueryObj"); if(_1f5){ var _1f6=_1f5.findChildWithAttribute("tag",_1f4.m_sTag); if(_1f6&&_1f6.getAttribute("id")!=null){ _1f4.m_sColumnName=_1f6.getAttribute("id"); } } } var _1f7=this.getChildSpans(_1f2); if(_1f7.length>0){ for(var i=0;i<_1f7.length;i++){ var _1f9=_1f7[i]; if(_1f9.nodeType==1&&_1f9.nodeName.toLowerCase()=="span"&&_1f9.style.visibility!="hidden"){ var _1fa=null; if(_1f2.getAttribute("ctx")!=null&&_1f2.getAttribute("ctx")!=""){ _1fa=_1f2; }else{ if(_1f9.getAttribute("ctx")!=null&&_1f9.getAttribute("ctx")!=""){ _1fa=_1f9; }else{ if(_1f9.getAttribute("dtTargets")&&_1f9.childNodes&&_1f9.childNodes.length){ for(var _1fb=0;_1fb<_1f9.childNodes.length;_1fb++){ if(_1f9.childNodes[_1fb].nodeType==1&&_1f9.childNodes[_1fb].style.visibility!="hidden"){ _1fa=_1f9.childNodes[_1fb]; } } }else{ for(var _1fc=0;_1fc<_1f9.childNodes.length;_1fc++){ var _1fd=_1f9.childNodes[_1fc]; if(typeof _1fd.getAttribute!="undefined"&&_1fd.getAttribute("ctx")!=null&&_1fd.getAttribute("ctx")!=""){ _1fa=_1fd; break; } } } } } var _1fe=""; if(_1fa&&_1fa.getAttribute("ctx")){ _1fe=_1fa.getAttribute("ctx"); } _1f4.m_aDisplayValues[_1f4.m_aDisplayValues.length]=this.getSelectionController().getDisplayValue(_1fe,_1f2.parentNode); if(typeof _1f3!="undefined"&&_1f3!=_1fe){ continue; } _1f4=this.processCTX(_1f4,_1fe); } } }else{ if(_1f2.getAttribute("ctx")!=null&&_1f2.getAttribute("ctx")!=""&&_1f4.m_sLayoutType=="datavalue"){ _1f4=this.processCTX(_1f4,_1f2.getAttribute("ctx")); } } this.getSelectionController().processColumnTitleNode(_1f4); } catch(ex){ } return _1f4; }; CSelectionObjectFactory.prototype.processCTX=function(_1ff,_200){ if(typeof _200!="string"||_200.length==0){ return _1ff; } var ctx; if(typeof _1ff.m_contextIds=="object"&&_1ff.m_contextIds!==null&&_1ff.m_contextIds.length>0){ var _202=_200.split("::"); for(ctx=0;ctx<_1ff.m_contextIds.length;++ctx){ try{ if(_202[ctx]){ _1ff.m_contextIds[ctx]=_1ff.m_contextIds[ctx].concat(_202[ctx].split(":")); } } catch(e){ } } }else{ _1ff.m_contextIds=this.m_selectionController.m_oCognosViewer.getReportContextHelper().processCtx(_200); } _1ff.m_ctxAttributeString=_200; return _1ff; }; CSelectionObjectFactory.prototype.getSecondarySelectionObject=function(tag,_204,_205){ if(!_205){ _205=document; } var _206=new CSelectionObject(); _206.setSelectionController(this.getSelectionController()); _206.m_oCellRef=null; _206.m_sColumnRef=null; _206.m_sCellTypeId=null; _206.refQuery=""; var _207=_205.getElementsByTagName("td"); for(var i=0;i<_207.length;i++){ var _209=_207[i].getAttribute("tag"); if(_209!=null&&_209!=""){ if(tag==_209){ var _20a=_207[i].className; if(_20a!=null&&_209!=""){ if((_204=="columnTitle"&&_20a=="lt")||(_204=="datavalue"&&_20a=="lc")){ _206.m_sColumnRef=_207[i].getAttribute("cid"); _206.m_sCellTypeId=_207[i].getAttribute("uid"); break; } } } } } if(_206.m_sCellTypeId==null){ return null; } return _206; }; CSelectionObjectFactory.prototype.getSelectionChartObject=function(_20b){ var _20c=""; if(_20b.getAttribute("flashChart")!=null){ if(typeof _20b.getCtx!="undefined"){ try{ _20c=_20b.getCtx(); } catch(e){ _20c=""; } } }else{ _20c=_20b.getAttribute("ctx"); } var _20d=new CSelectionChartObject(); _20d.setSelectionController(this.getSelectionController()); if(_20c!=null){ _20d.m_contextIds=_20c.split("::"); for(var ctx=0;ctx<_20d.m_contextIds.length;++ctx){ _20d.m_contextIds[ctx]=_20d.m_contextIds[ctx].split(":"); } } _20d.m_layoutElementId=this.getLayoutElementId(_20b); _20d.m_sLayoutType=_20b.getAttribute("type"); _20d.m_chartArea=_20b; _20d.m_context=_20c; _20d.setSelectionOnVizChart(_20b); return _20d; }; CSelectionObjectFactory.prototype.getContainerTypeFromClass=function(_20f){ var _210=""; switch(_20f){ case "ls": _210="list"; break; case "xt": _210="crosstab"; break; case "rt": _210="repeaterTable"; break; } return _210; }; CSelectionObjectFactory.prototype.getContainerType=function(el){ var type=""; if(el){ if(el.className){ type=this.getContainerTypeFromClass(el.className); } if(!type){ var _213=el.parentNode; if(_213){ type=this.getContainerType(_213); } } } return type; }; CSelectionObjectFactory.prototype.getLayoutElementId=function(el){ var id=""; var _216=this.getSelectionController().getNamespace(); if(el){ if(el.getAttribute&&el.getAttribute("chartcontainer")=="true"){ for(var _217=0;_2170){ id=_21b[0].getAttribute("LID"); } } } } return id; }; function CSelectionController(_21c,_21d){ this.m_bSelectionBasedFeaturesEnabled=false; this.m_bDrillUpDownEnabled=false; this.m_bModelDrillThroughEnabled=false; this.m_oCognosViewer=null; this.m_bSavedSelections=false; if(_21d){ this.m_oCognosViewer=_21d; } this.initialize(_21c); this.FILTER_SELECTION_STYLE=0; this.FILTER_SELECTION_CONTEXT_MENU_STYLE=1; }; CSelectionController.prototype.initialize=function(_21e){ this.m_sNamespace=_21e; 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(_21f){ switch(_21f){ 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(_220){ this.m_bAllowHorizontalDataValueSelection=_220; }; 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(_221){ if(!this.m_bUsingCCDManager){ var _222=this.getReportContextDataArray(); var _223=1; for(var _224 in _222){ var _225=_222[_224]; if(_225[_223]==_221){ return _224; } } return ""; }else{ var sId=this.m_oCDManager.GetContextIdForDisplayValue(_221); return (sId==null)?"":sId; } }; CSelectionController.prototype.getCtxIdFromMetaData=function(sLun,sHun,_229){ return this.m_oCDManager.getContextIdForMetaData(sLun,sHun,_229); }; 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 _230=this.getReportMetadataArray(); var _231=0; for(var sKey in _230){ var _233=_230[sKey]; if(_233[_231]==sMun){ var _234=2; var _235=this.getReportContextDataArray(); for(var _236 in _235){ var _237=_235[_236]; if(_237[_234]==sKey){ return _236; } } } } return ""; }else{ var sId=this.m_oCDManager.GetContextIdForMUN(sMun); return (sId==null)?"":sId; } }; CSelectionController.prototype.canDrillDown=function(_239){ var _23a=this.getDrillFlagForMember(_239); return (_23a==3||_23a==2); }; CSelectionController.prototype.canDrillUp=function(_23b){ var _23c=this.getDrillFlagForMember(_23b); return (_23c==3||_23c==1); }; CSelectionController.prototype.getQueryModelId=function(_23d){ var qmid=""; if(!this.m_bUsingCCDManager){ var _23f=this.m_aReportContextDataArray[_23d]; if(_23f&&typeof _23f[3]!="undefined"){ var _240=_23f[3]; var _241=this.m_aReportMetadataArray[_240]; if(typeof _241!="undefined"&&typeof _241[1]!="undefined"&&_241[1]=="I"){ qmid=_241[0]; } } }else{ qmid=this.m_oCDManager.GetQMID(_23d); } return qmid; }; CSelectionController.prototype.getRefQuery=function(_242){ if(!this.m_bUsingCCDManager){ return this.getMetaDataItemUseValue(4,_242); }else{ var _243=this.m_oCDManager.GetQuery(_242); return (_243==null)?"":_243; } }; CSelectionController.prototype.getRefDataItem=function(_244){ return this.m_oCognosViewer.getReportContextHelper().getRefDataItem(_244); }; CSelectionController.prototype.getMun=function(_245){ return this.m_oCognosViewer.getReportContextHelper().getMun(_245); }; CSelectionController.prototype.getHun=function(_246){ if(!this.m_bUsingCCDManager){ var sHun=null; var _248=this.getRDI(_246); if(_248&&_248.length>4&&_248[1]=="R"){ var _249=_248[4]; var _24a=this.getReportMetadataArray(); _248=_24a[_249]; } if(_248&&_248.length>1&&_248[1]=="H"){ sHun=_248[0]; } return sHun; }else{ return this.m_oCDManager.GetHUN(_246); } }; CSelectionController.prototype.fetchContextData=function(_24b,_24c){ var _24d=0; if(this.m_bUsingCCDManager){ _24d=this.m_oCDManager.FetchContextData(_24b,_24c); } return _24d; }; CSelectionController.prototype.getMetaDataItem=function(sKey){ var _24f=this.getReportMetadataArray(); if(typeof _24f[sKey]!="undefined"){ return _24f[sKey]; } return null; }; CSelectionController.prototype.getContextDataItem=function(_250){ var _251=this.getReportContextDataArray(); if(typeof _251[_250]!="undefined"){ return _251[_250]; } return null; }; CSelectionController.prototype.getMetaDataItemUseValue=function(_252,_253){ var _254=this.getContextDataItem(_253); if(_254!=null){ var _255=_254[_252]; if(_255!=""){ var _256=this.getMetaDataItem(_255); if(_256!=null){ return _256[0]; } } } return ""; }; CSelectionController.prototype.getRDI=function(_257){ var _258=this.getContextDataItem(_257); if(_258!=null){ var _259=_258[0]; if(_259!=""){ var _25a=this.getMetaDataItem(_259); if(_25a!=null){ return _25a; } } } }; CSelectionController.prototype.getNamespace=function(){ return this.m_sNamespace; }; CSelectionController.prototype.setSelectionBasedFeaturesEnabled=function(_25b){ this.m_bSelectionBasedFeaturesEnabled=_25b; }; CSelectionController.prototype.getSelectionBasedFeaturesEnabled=function(){ return this.m_bSelectionBasedFeaturesEnabled; }; CSelectionController.prototype.setDrillUpDownEnabled=function(_25c){ this.m_bDrillUpDownEnabled=_25c; }; CSelectionController.prototype.getDrillUpDownEnabled=function(){ return this.m_bDrillUpDownEnabled; }; CSelectionController.prototype.setModelDrillThroughEnabled=function(_25d){ this.m_bModelDrillThroughEnabled=_25d; }; CSelectionController.prototype.getBookletItemForCurrentSelection=function(){ var _25e=this.getAllSelectedObjects(); if(_25e&&_25e.length>0){ var _25f=_25e[0]; if(_25f.hasContextInformation()){ var _260=this.m_oCDManager.GetBIValue(_25f.m_contextIds[0][0]); if(!_260){ return null; } return _260; } } return null; }; CSelectionController.prototype.getModelPathForCurrentSelection=function(){ var _261=null; var _262=this.getBookletItemForCurrentSelection(); if(_262){ var _261=this.m_oCDManager.getModelPathFromBookletItem(_262); } return _261; }; CSelectionController.prototype.getModelDrillThroughEnabled=function(){ var _263=this.getBookletItemForCurrentSelection(); if(_263){ var _264=this.m_oCDManager.GetBookletModelBasedDrillThru(_263); return _264==1?true:false; }else{ return this.m_bModelDrillThroughEnabled; } }; CSelectionController.prototype.clearSelectedObjects=function(_265){ try{ if(!_265){ _265=document; } this.updateUI(_265,this.getSelections(),true,false); this.m_aSelectedObjects=[]; if(typeof this.onSelectionChange=="function"){ this.onSelectionChange(); } return true; } catch(e){ return false; } }; CSelectionController.prototype.resetSelections=function(_266){ try{ if(!_266){ _266=document; } if(this.hasSelectedChartNodes()){ this.resetChartSelections(_266); } this.m_oSelectedDrillThroughImage=null; this.m_oSelectedDrillThroughSingleton=null; if(this.getSelections()){ this.updateUI(_266,this.getSelections(),true,false); this.updateUI(_266,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(_267){ var _268=this.m_chartHelpers; for(var _269 in _268){ if(_268[_269]){ var _26a=_268[_269].getImageMapHighlighter(); if(_26a.hideAllAreas){ _26a.hideAllAreas(); } } } this.m_selectedChartNodes=[]; this.m_selectionContainerMap=null; }; CSelectionController.prototype.addSelectionObject=function(_26b,_26c){ try{ if(!_26c){ _26c=document; } var _26d=_26b.getCellRef(); if(this.isCellSelected(_26d)!==true||(typeof _26d!="object"||_26d===null)){ if(this.isColumnCut(_26b.getTag())!==true){ this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_26b; if(typeof this.onSelectionChange=="function"){ this.onSelectionChange(); } this.updateUI(_26c,this.getSelections(),false,false); } } return true; } catch(e){ return false; } }; CSelectionController.prototype.removeSelectionObject=function(_26e,_26f){ try{ if(!_26f){ _26f=document; } var _270=[]; var _271; for(_271=0;_2710){ this.updateUI(_26f,this.getSelections(),true,false); var _274=[]; for(_271=0;_2710){ return true; } return false; }; function getStyleFromClass(c){ for(var i=0;i0){ var _2b4,_2b5,_2b6; if(_2b3==1||_2b3==2){ if(_2b2){ this.deselecting(this.m_cutClass); }else{ var _2b7=getStyleFromClass("cutSelection").style.color; var _2b8=getStyleFromClass("cutSelection").style.backgroundColor; _2b4=_2b1.length; for(_2b5=0;_2b5<_2b4;_2b5++){ _2b6=_2b1[_2b5].getCellRef(); var _2b9="cutQS"+_2b6.getAttribute("cid"); this.selecting(_2b9,"\n{ background-color: "+_2b8+"; color: "+_2b7+";}\n"); this.m_cutClass.push(_2b9); } } }else{ if(this.m_oCognosViewer){ this.findSelectionURLs(); _2b6=""; _2b4=_2b1.length; for(_2b5=0;_2b5<_2b4;_2b5++){ _2b6=_2b1[_2b5].getCellRef(); if(_2b6.getAttribute("oldClassName")!=null){ _2b6.className=_2b6.getAttribute("oldClassName"); _2b6.removeAttribute("oldClassName"); } this.setStyleForSelection(_2b1[_2b5].m_contextIds); if(!this.secondarySelectionIsDisabled()||_2b2){ var _2ba=document.getElementById("CVReport"+this.getNamespace()); var _2bb=getElementsByAttribute(_2ba,["td","th"],"name",_2b6.getAttribute("name"),this.m_maxSecondarySelection); for(var _2bc=0;_2bc<_2bb.length;_2bc++){ var cell=_2bb[_2bc]; if(_2b2){ this.restoreOldBackgroundImage(cell); }else{ if(cell.getAttribute("oldBackgroundImageStyle")==null){ this.saveOldCellStyles(cell); this.setSecondarySelectionStyles(cell); } } } } this.saveOldCellStyles(_2b6); if(_2b2){ this.restoreOldBackgroundImage(_2b6); if(this.m_oCognosViewer.isHighContrast()){ this.restoreOldBorder(_2b6); this.restoreOldPadding(_2b6); } }else{ this.setPrimarySelectionStyles(_2b6); if(this.m_oCognosViewer.isHighContrast()){ var size=getBoxInfo(_2b6,true); this.saveOldBorder(_2b6); this.saveOldPadding(_2b6,size); var _2bf=3; var _2c0=size.borderTopWidth+size.paddingTop-_2bf; var _2c1=size.borderBottomWidth+size.paddingBottom-_2bf; var _2c2=size.borderLeftWidth+size.paddingLeft-_2bf; var _2c3=size.borderRightWidth+size.paddingRight-_2bf; _2b6.style.border=_2bf+"px "+this.getHighContrastBorderStyle()+" black"; _2b6.style.padding=_2c0+"px "+_2c3+"px "+_2c1+"px "+_2c2+"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(_2c4){ var _2c5=true; var _2c6=_2c4.getAttribute("rsvpChart"); var _2c7=_2c4.parentNode.getAttribute("chartContainer"); if(_2c6!="true"&&_2c7!="true"){ this.m_selectedChartNodes=[]; _2c5=false; }else{ var _2c8=this.getSelectionObjectFactory().getSelectionChartObject(_2c4); this.m_selectedChartNodes=[_2c8]; } return _2c5; }; CSelectionController.prototype.setSelectedChartArea=function(_2c9,e){ var _2cb=typeof this.m_oCognosViewer.isBux!=="undefined"; var _2cc=false; if(_2c9!==null){ if(_2c9.tagName=="IMG"){ _2cc=this.setSelectedChartImgArea(_2c9); }else{ if(_2c9.nodeName=="AREA"&&_2c9.attributes["ctx"]){ _2cc=true; if(_2cb){ this.setBuxSelectedChartArea(_2c9,e); }else{ this.m_selectedChartNodes=[this.getSelectionObjectFactory().getSelectionChartObject(_2c9)]; } } } if(_2cc){ this.getObservers().notify(); } } return _2cc; }; CSelectionController.prototype.setBuxSelectedChartArea=function(_2cd,e){ var _2cf=this.getChartHelper(_2cd); var _2d0=_2cf.getChartNode(_2cd); this.setStyleForSelection(_2d0.m_contextIds); var _2d1=_2cf.getImageMapHighlighter(); _2d1.setFillColour(this.getPrimarySelectionColor()); _2d1.setStrokeColour(this.getPrimarySelectionColor()); if(typeof e=="undefined"){ e={}; } if(this.ctrlKeyPressed(e)||this.shiftKeyPressed(e)){ if(_2d1.isAreaHighlighted(_2cd)){ _2d1.hideAreas(_2d0.getCtxAreas()); var _2d2=_2cd.getAttribute("ctx"); var _2d3=this.m_selectedChartNodes.length; for(var i=0;i<_2d3;i++){ var _2d5=this.m_selectedChartNodes[i]; if(_2d2==_2d5.getContext()){ this.m_selectedChartNodes.splice(i,1); break; } } }else{ this.updateSelectionContainer(_2cd); _2d1.highlightAreas(_2d0.getCtxAreas(),true); this.m_selectedChartNodes.push(_2d0); } }else{ if(this.hasSavedSelectedChartNodes()){ var _2d6=this.m_savedSelectedChartNodes.length; var _2d7=this.m_savedSelectedChartNodes; for(var i=0;i<_2d6;i++){ var area=_2d7[i].getArea(); var _2d9=this.getSavedChartHelper(area); var _2da=_2d9.getImageMapHighlighter(); var _2db=_2da.getAreaId(area); if(_2d1.getAreaId(_2cd)===_2db){ _2da.hideAreaById(_2db+this.m_savedPrimarySelectionColor); break; } } } this.updateSelectionContainer(_2cd); _2d1.highlightAreas(_2d0.getCtxAreas()); this.m_selectedChartNodes=[_2d0]; } }; CSelectionController.prototype.updateSelectionContainer=function(_2dc){ var _2dd=_2dc.parentNode; if(this.m_selectionContainerMap&&this.m_selectionContainerMap.name!=_2dd.name){ var _2de=this.getChartHelper(_2dc).getImageMapHighlighter(); _2de.hideAllAreas(); } this.m_selectionContainerMap=_2dd; }; CSelectionController.prototype.getChartHelper=function(_2df){ var _2e0=_2df.parentNode; var _2e1=_2e0.name; if(!this.m_chartHelpers[_2e1]){ this.m_chartHelpers[_2e1]=new CChartHelper(_2df,this.getSelectionObjectFactory(),this.m_oCognosViewer); } return this.m_chartHelpers[_2e1]; }; CSelectionController.prototype.getSavedChartHelper=function(_2e2){ var _2e3=_2e2.parentNode; var _2e4=_2e3.name; return this.m_savedChartHelpers[_2e4]; }; 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 _2e5=null; if(this.hasSelectedChartNodes()){ var _2e6=this.m_selectedChartNodes[0]; _2e5=_2e6.getArea(); } if(_2e5===null){ return null; } if(_2e5.tagName=="IMG"){ return _2e5; } return this.getSelectedChartImageFromChartArea(_2e5); }; CSelectionController.prototype.getSelectedChartImageFromChartArea=function(_2e7){ var _2e8=_2e7.parentNode; var _2e9="#"+_2e8.getAttribute("name"); return this.checkChildrenForChart(_2e8.parentNode,_2e9); }; CSelectionController.prototype.checkChildrenForChart=function(_2ea,_2eb){ var _2ec=_2ea.firstChild; while(_2ec!==null){ if(!_2ec.tagName){ return null; }else{ if(_2ec.tagName=="IMG"&&_2ec.getAttribute("usemap")==_2eb){ return _2ec; }else{ if(_2ec.tagName==="DIV"||_2ec.tagName==="SPAN"){ var _2ed=this.checkChildrenForChart(_2ec,_2eb); if(_2ed){ return _2ed; } } } } _2ec=_2ec.nextSibling; } return null; }; CSelectionController.prototype.downloadSelectedChartImage=function(_2ee){ var _2ef=this.getSelectedChartImage(); if(_2ef!==null){ var _2f0=this.getDocumentFromImage(_2ef); var _2f1=_2ef.name.replace(".","_"); var _2f2=_2f1.substr(5); var _2f3="?m_name="; _2f3+=_2f2; _2f3+="&format=png&b_action=xts.run&m=portal/download.xts&m_obj="; if(isIE()){ _2f1=_2f0.parentWindow.eval("graphicSrc"+_2f2); }else{ _2f1=_2f0.defaultView.eval("graphicSrc"+_2f2); } var _2f4=""; if(typeof _2f1!="undefined"&&_2f1!==null){ var _2f5=_2f1.split("&"); if(_2f5.length===0){ return; } if(_2f1.indexOf("/repository/")<0){ for(var i=0;i<_2f5.length;++i){ var _2f7=_2f5[i]; var _2f8=_2f7.indexOf("="); if(_2f8!=-1){ var _2f9=_2f7.substr(0,_2f8); var _2fa=_2f7.slice(_2f8+1); if(_2f9=="search"){ _2f4+=_2fa; break; } } } } if(_2f4==""){ _2f3=_2ef.getAttribute("src"); if(_2f3.indexOf("?")!=-1){ _2f3+="&download=true"; }else{ _2f3+="?download=true"; } } if(typeof getConfigFrame=="function"){ _2f3+=_2f4; _2f3=getConfigFrame().constructGETRequestParamsString(_2f3); window.open(_2f3,"_blank","width=0,height=0"); }else{ _2f3=constructGETRequestParamsString(_2f3); _2f3+=_2f4; var _2fb=this.m_oCognosViewer.getGateway(); var _2fc=document.getElementById("CVIFrame"+this.m_sNamespace); if(_2fc){ var _2fd=_2fc.src; if(_2fd.indexOf("repository")>=0&&_2f3.indexOf("repository")<0){ var _2fe=_2fd.indexOf("content"); _2f3=_2fd.substring(0,_2fe)+_2f3; } } if(_2f3.indexOf(_2fb)==-1){ var _2ff=document.forms["formWarpRequest"+_2ee]; _2f3=_2ff.action+_2f3; } if(typeof window.detachLeavingRV=="function"){ window.detachLeavingRV(); } location.href=_2f3; if(typeof window.attachLeavingRV=="function"){ setTimeout(window.attachLeavingRV,100); } } } } }; CSelectionController.prototype.getDocumentFromImage=function(_300){ var _301=null; if(_300.ownerDocument){ _301=_300.ownerDocument; }else{ _301=_300.document; } return _301; }; CSelectionController.prototype.shouldExecutePageClickedOnMouseDown=function(e){ var _303=this.getSelections(); if(_303.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 _305=this.getSelectionObjectFactory().getContainerType(node); if(_305==="list"){ for(var i=0;i<_303.length;i++){ if(_303[i].m_oCellRef==node){ return false; } } } } } return true; }; CSelectionController.prototype.getContainerType=function(){ var _307=""; if(this.hasSelectedChartNodes()){ _307="chart"; }else{ if(this.getDataContainerType()==="list"){ _307="list"; }else{ _307="crosstab"; } } return _307; }; CSelectionController.prototype.getDisplayValues=function(){ var _308={}; var _309=this.getAllSelectedObjects()[0]; if(_309){ var _30a=_309.getSelectedContextIds(); if(_30a){ for(var axis=0;axis<_30a.length;axis++){ var _30c=[]; var _30d=_30a[axis]; for(var _30e=0;_30e<_30d.length;_30e++){ var _30f=_30d[_30e]; var _310=this.getDisplayValue(_30f); _30c.push(_310); if(axis===0){ break; } } var _311=""; switch(axis){ case 0: _311="selected"; break; case 1: _311="rows"; break; default: _311="columns"; } _308[_311]=_30c; } } } return _308; }; CSelectionController.prototype.getChartTooltip=function(){ var _312=this.getAllSelectedObjects()[0]; if(_312){ var area=_312.getArea(); if(area){ var _314=area.getAttribute("title"); if(_314&&_314.length>0){ return area.getAttribute("title"); } } } return ""; }; CSelectionController.prototype.pageClickedForMobile=function(e){ this.pageClicked(e); var _316=this.getAllSelectedObjects().length; if(_316==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 _318=this.m_savedChartHelpers; for(var _319 in _318){ if(_318[_319]){ var _31a=_318[_319].getImageMapHighlighter(); if(_31a.hideAllAreas){ _31a.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 _31b=this.m_aSelectedObjects.length; var temp=[]; for(var i=0;i<_31b;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 _31e=this.m_selectedChartNodes.length; var temp=[]; for(var i=0;i<_31e;i++){ if(this.isMeasure(this.m_selectedChartNodes[i].m_contextIds[0][0])){ var _31f=this.m_selectedChartNodes[i].getArea(); var _320=this.getImageMapName(_31f); this.m_chartHelpers[_320]=this.m_savedChartHelpers[_320]; delete this.m_savedChartHelpers[_320]; 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(_321){ var _322=_321.parentNode; return _322.name; }; CSelectionController.prototype.repaintBUXSelectedChartArea=function(_323,_324,_325){ var _326={}; var _327=_323.length; for(var i=0;i<_327;i++){ var _329=_323[i].getArea(); var _32a=this.getImageMapName(_329); var _32b; if(!_326[_32a]){ _32b=(_324)?this.getSavedChartHelper(_329):this.getChartHelper(_329); _326[_32a]=_32b; var _32c=_32b.getImageMapHighlighter(); _32c.hideAllAreas(); _32c.setFillColour(this.getPrimarySelectionColor()); _32c.setStrokeColour(this.getPrimarySelectionColor()); }else{ _32b=_326[_32a]; } var _32d=_323[i].m_contextIds; if(_325&&_32d.length===1&&_32d[0].length===1&&this.isMeasure(_32d[0][0])){ continue; } _32c.highlightAreas(_323[i].getCtxAreas(),1); } }; CSelectionController.prototype.repaintSavedSelections=function(){ var _32e=this.m_selectionStyles; this.m_selectionStyles=this.m_savedSelectionStyles; var _32f=this.getSavedSelectedChartNodes(); var _330=false; if(_32f&&_32f.length>0){ bIsChart=true; }else{ _32f=this.getSavedSelectedObjects(); } this.repaintSelectionsHelper(_32f,true,_330); this.resetSelectionStyles(); this.m_selectionStyles=_32e; }; CSelectionController.prototype.repaintSelections=function(){ var _331=this.getSelectedChartNodes(); var _332=false; if(_331&&_331.length>0){ _332=true; }else{ _331=this.getSelections(); } this.repaintSelectionsHelper(_331,false,_332); }; CSelectionController.prototype.repaintSelectionsHelper=function(_333,_334,_335){ try{ if(_335){ this.repaintBUXSelectedChartArea(_333,_334); }else{ this.updateUI(document,_333,true,false); this.updateUI(document,_333,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 _338=node; if(!_338.getAttribute("uid")){ var _339=_338.parentNode; if(_339&&_339.nodeType==1&&typeof _339.getAttribute!="undefined"&&_339.getAttribute("uid")!=null){ _338=_339; } } if(this.isCellSelected(_338)){ 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 _33a=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 _33b=node; node=node.selectedCell; _33b.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(_33a); }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 _33c=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,_341){ var _342=this.getCtxIdFromMun(sMun); if(_342==""){ _342=this.getCtxIdFromMetaData(sLun,sHun,_341); } if(_342!=null&&this.m_oCDManager.GetUsage(_342)!="2"){ var _343=document.getElementById("rt"+this.getNamespace()); if(_343!=null){ var _344=getElementsByAttribute(_343,"*","ctx",_342); if(_344&&_344.length===0){ var _345=new RegExp("(^|:)"+_342+"(:|$)","i"); _344=getElementsByAttribute(_343,"*","ctx",_342,-1,_345); } var _346=null; if(_344!=null&&_344.length>0){ _346=new CSelectionObject(); _346.setSelectionController(this); _346.m_sColumnRef=_344[0].getAttribute("cid"); _346.m_sCellTypeId=_344[0].getAttribute("uid"); _346.m_sLayoutType=_344[0].getAttribute("type"); _346.m_sTag=_344[0].getAttribute("tag"); _346.m_layoutElementId=this.m_oSelectionObjectFactory.getLayoutElementId(_344[0]); _346.m_dataContainerType=this.m_oSelectionObjectFactory.getContainerType(_344[0]); _346.m_contextIds=[[_342]]; this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_346; }else{ var _347=getElementsByAttribute(_343,"*","flashChart","true"); if(_347!=null){ for(var _348=0;_348<_347.length;++_348){ var ldx=_347[_348].getLDX(); if(ldx.indexOf(""+_342+"")!=-1){ _346=new CSelectionObject(); _346.setSelectionController(this); var lid=_347[_348].getAttribute("lid"); _346.m_layoutElementId=lid.replace(this.m_oCognosViewer.getId(),""); _346.m_dataContainerType="chart"; _346.m_contextIds=[[_342]]; this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_346; } } } } } } }; CSelectionController.prototype.buildSelectionObject=function(node,e){ var _34d=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 _350=node.childNodes; for(var i=0;i<_350.length;i++){ if(_350[i].nodeName.toUpperCase()=="TABLE"&&(_350[i].className=="ls"||_350[i].className=="xt")){ var trs=_350[i].rows; for(var j=0;j0){ _360=true; } if(this.hasCutColumns()==true){ this.clearSelectedObjects(_35d); }else{ this.resetSelections(_35d); 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(_35d); } if(typeof g_reportSelectionController!="undefined"&&_361==false){ if(g_reportSelectionController.getSelections().length>0){ _360=true; } g_reportSelectionController.clearSelections(); } } var _362=node.getAttribute("dtTargets")?node:null; var _363=(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 _364; var _365=3; do{ node=node.parentNode; if(node){ _362=(!_362&&typeof node.getAttribute!="undefined"&&node.getAttribute("dtTargets"))?node:_362; uid=(typeof node.getAttribute!="undefined")?node.getAttribute("uid"):null; _364=node.nodeName.toLowerCase(); } }while((uid==null)&&node&&(--_365>0)&&(_364=="span"||_364=="div")); } if(uid!=null){ var _366=node.childNodes; for(var i=0;i<_366.length;i++){ if(_366[i].nodeName.toUpperCase()=="TABLE"&&(_366[i].className=="ls"||_366[i].className=="xt")){ var trs=_366[i].rows; for(var j=0;j0){ var _36e=_36d[_36d.length-1]; if(_36e.getLayoutType()==_36c.getLayoutType()&&(_36e.getCellRef().parentNode.parentNode==_36c.getCellRef().parentNode.parentNode)){ if(this.cellsAreInSameColumn(_36e.getCellRef(),_36c.getCellRef())){ this.selectVertical(_36e,_36c,_35d); }else{ if(_36e.getCellRef().parentNode.rowIndex==_36c.getCellRef().parentNode.rowIndex){ this.selectHorizontal(_36e,_36c,_35d); } } } } clearTextSelection(_35d); }else{ if(this.ctrlKeyPressed(e)){ clearTextSelection(_35d); } } this.addSelectionObject(_36c,_35d); if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){ cf.addSelectionToCfgVariables(_36c.getColumnName()); } this.m_oCognosViewer.setCurrentNodeFocus(node); }else{ if(this.ctrlKeyPressed(e)){ this.removeSelectionObject(_36c,_35d); if(typeof cf!="undefined"&&typeof cf.removeSelectionFromCfgVariables=="function"){ if(!this.isColumnSelected(_36c.getTag())){ cf.removeSelectionFromCfgVariables(_36c.getTag()); } } clearTextSelection(_35d); }else{ if(this.shiftKeyPressed(e)){ clearTextSelection(_35d); } } } _360=true; }else{ if(_361){ var _36f=null; while((typeof node.id=="undefined"||node.id==null||node.id=="")&&node.parentNode!=null){ node=node.parentNode; } if(node.id=="reportTitle"){ _36f="TitleStyle"; }else{ if(node.id=="reportSubtitle"){ _36f="SubtitleStyle"; }else{ if(node.id.indexOf("reportFilter")==0){ _36f="FilterStyle"; } } } if(_36f!=null){ selectReportElement(e,node.id,_36f); _360=true; } }else{ if(_362!=null&&this.m_oCognosViewer&&this.m_oCognosViewer.isMobile()&&!_363){ var _36c=this.getSelectionObjectFactory().getSelectionObject(_362); this.addSelectionObject(_36c,_35d); } } } if(_360==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(_372){ this.m_aReportContextDataArray=_372; }; CSelectionController.prototype.setupMetaDataArray=function(_373){ this.m_aReportMetadataArray=_373; }; CSelectionController.prototype.addContextData=function(_374){ this.m_aSelectedObjects=[]; this.m_oCDManager.SetContextData(_374); if(!this.m_bUsingCCDManager){ this.m_bUsingCCDManager=true; } for(var i=0;i2){ _383=parseInt(_384[2],10); } }else{ _383=parseInt(this.m_oCDManager.GetDataType(_382),10); } return _383; }; CSelectionController.prototype.getUsageInfo=function(_385){ if(this.m_bUsingCCDManager){ return this.m_oCDManager.GetUsage(_385); } }; CSelectionController.prototype.isMeasure=function(_386){ return (this.getUsageInfo(_386)==this.c_usageMeasure); }; CSelectionController.prototype.getDepth=function(_387){ var _388=null; if(!this.m_bUsingCCDManager){ var _389=this.getRDI(_387); if(_389&&_389.length>5&&_389[1]=="R"){ _388=_389[5]; } }else{ _388=this.m_oCDManager.GetDepth(_387); } return _388; }; CSelectionController.prototype.getUseValue=function(_38a){ var _38b=""; if(!this.m_bUsingCCDManager){ var _38c=this.m_aReportContextDataArray[_38a]; if(typeof _38c[1]!="undefined"){ _38b=_38c[1]; } }else{ _38b=this.m_oCDManager.GetDisplayValue(_38a); } return _38b; }; CSelectionController.prototype.getTextValue=function(_38d){ var _38e=null; for(var _38f=0;_38f<_38d.length;_38f++){ if(_38d[_38f].style.visisbility!="hidden"){ if(isIE()){ _38e=_38d[_38f].innerText; }else{ _38e=_38d[_38f].textContent; } var _390=_38d[_38f].nextSibling; while(_390!=null){ if(_390.nodeName.toUpperCase()=="SPAN"&&_390.style.visibility!="hidden"){ if(isIE()){ _38e+=_390.innerText; }else{ _38e+=_390.textContent; } } _390=_390.nextSibling; } break; } } return _38e; }; CSelectionController.prototype.getDisplayValueFromDOM=function(_391,_392){ var _393=null; var _394; var _395=new RegExp("(^|\\s)"+_391+"(\\s|$|:)","i"); if(typeof _392!="undefined"){ _394=getElementsByAttribute(_392,["span","td","th"],"ctx",_391,1,_395); }else{ var _396=document.getElementById("CVIFrame"+this.m_sNamespace); if(typeof _396=="undefined"||_396==null){ var _397=document.getElementById("RVContent"+this.m_sNamespace); if(typeof _397=="undefined"||_397==null){ _394=getElementsByAttribute(document.body,["span","td","th"],"ctx",_391,1,_395); }else{ _394=getElementsByAttribute(_397,["span","td","th"],"ctx",_391,1,_395); } }else{ _394=getElementsByAttribute(_396.contentWindow.document.body,["span","td","th"],"ctx",_391,1,_395); } } var _398; if(_394.length>0&&(_394[0].nodeName.toUpperCase()=="TD"||_394[0].nodeName.toUpperCase()=="TH")){ _398=_394[0].childNodes; }else{ _398=_394; } if(_398.length==0||(_398[0].className.indexOf("chart_area")==-1&&_398[0].className.indexOf("bux-comment")==-1)){ _393=this.getTextValue(_398); } return _393; }; CSelectionController.prototype.getDisplayValue=function(_399,_39a){ var _39b=this.getDisplayValueFromDOM(_399,_39a); if(_39b==null){ _39b=this.getUseValue(_399); } return _39b; }; CSelectionController.prototype.getDun=function(_39c){ if(this.m_bUsingCCDManager){ return this.m_oCDManager.GetDUN(_39c); }else{ var _39d=this.m_aReportContextDataArray[_39c]; if(_39d&&typeof _39d[5]!="undefined"){ var _39e=_39d[5]; var _39f=this.m_aReportMetadataArray[_39e]; if(typeof _39f!="undefined"&&typeof _39f[1]!="undefined"&&_39f[1]=="D"){ return _39f[0]; } } } }; CSelectionController.prototype.getPun=function(_3a0){ if(this.m_bUsingCCDManager){ return this.m_oCDManager.GetPUN(_3a0); } }; CSelectionController.prototype.getLun=function(_3a1){ var lun=""; if(!this.m_bUsingCCDManager){ var _3a3=this.m_aReportContextDataArray[_3a1]; if(_3a3&&typeof _3a3[3]!="undefined"){ var _3a4=_3a3[3]; var _3a5=this.m_aReportMetadataArray[_3a4]; if(typeof _3a5!="undefined"&&typeof _3a5[1]!="undefined"&&_3a5[1]=="L"){ lun=_3a5[0]; } } }else{ lun=this.m_oCDManager.GetLUN(_3a1); } return lun; }; CSelectionController.prototype.isContextId=function(_3a6){ var _3a7=false; if(!this.m_bUsingCCDManager){ var _3a8=this.m_aReportContextDataArray[_3a6]; _3a7=(typeof _3a8=="object"); }else{ this.m_oCDManager.FetchContextData([_3a6]); _3a7=this.m_oCDManager.ContextIdExists(_3a6); } return _3a7; }; CSelectionController.prototype.hasContextData=function(){ var _3a9=false; if(!this.m_bUsingCCDManager){ if(this.m_aReportContextDataArray&&this.m_aReportContextDataArray.length&&this.m_aReportContextDataArray.length()>0){ return true; } }else{ _3a9=this.m_oCDManager.HasContextData(); } return _3a9; }; CSelectionController.prototype.hasMetadata=function(){ var _3aa=false; if(!this.m_bUsingCCDManager){ if(this.m_aReportMetadataArray&&this.m_aReportMetadataArray.length&&this.m_aReportMetadataArray.length()>0){ return true; } }else{ _3aa=this.m_oCDManager.HasMetadata(); } return _3aa; }; CSelectionController.prototype.getDifferentCellIndex=function(_3ab,_3ac,_3ad){ for(var i=0;i<_3ab.cells.length;i++){ if(this.getSelectionObjectFactory().getSelectionObject(_3ab.cells[i]).getLayoutType()=="datavalue"){ break; } } if(_3ad=="relative"){ return (_3ac-i); }else{ if(_3ad=="actual"){ return (_3ac+i); } } }; CSelectionController.prototype.cellsAreInSameColumn=function(_3af,_3b0){ if(_3af.parentNode.rowIndex==_3b0.parentNode.rowIndex){ return false; } if(_3af.getAttribute("cid")===null){ if(_3af.getAttribute("uid")===_3b0.getAttribute("uid")){ if(_3af.getAttribute("type")!="datavalue"){ return true; }else{ if(this.getDifferentCellIndex(_3af.parentNode,_3af.cellIndex,"relative")==this.getDifferentCellIndex(_3b0.parentNode,_3b0.cellIndex,"relative")){ return true; } } }else{ return false; } }else{ if(_3af.getAttribute("cid")===_3b0.getAttribute("cid")){ return true; }else{ return false; } } }; CSelectionController.prototype.selectVertical=function(_3b1,_3b2,_3b3){ if(!_3b3){ _3b3=document; } var _3b4=_3b1.getCellRef().parentNode; var _3b5,i; var _3b7=(_3b1.getCellRef().parentNode.rowIndex<_3b2.getCellRef().parentNode.rowIndex); var _3b8=(_3b1.getCellRef().parentNode.cells.length-_3b1.getCellRef().cellIndex); while(_3b4.rowIndex!=_3b2.getCellRef().parentNode.rowIndex){ if(_3b7){ _3b4=_3b4.nextSibling; }else{ _3b4=_3b4.previousSibling; } if(_3b4==null){ break; } if(_3b4.cells.length>=_3b8){ for(i=0;i<_3b4.cells.length;i++){ if((_3b4.cells[i].getAttribute("type")==_3b1.getLayoutType())&&this.cellsAreInSameColumn(_3b1.getCellRef(),_3b4.cells[i])){ _3b5=this.getSelectionObjectFactory().getSelectionObject(_3b4.cells[i]); if(this.addSelectionObject(_3b5,_3b3)){ if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){ cf.addSelectionToCfgVariables(_3b5.getColumnName()); } } break; } } } } }; CSelectionController.prototype.selectHorizontal=function(_3b9,_3ba,_3bb){ var _3bc=""; if(_3b9.getColumnRef()==null){ if(_3b9.getCellRef().getAttribute("uid")==_3ba.getCellRef().getAttribute("uid")){ _3bc=_3b9.getCellRef().getAttribute("uid"); }else{ return; } } var _3bd,_3be; var _3bf=_3ba.getCellRef().parentNode; var _3c0; if(_3ba.getCellRef().cellIndex<_3b9.getCellRef().cellIndex){ _3bd=_3ba.getCellRef().cellIndex; _3be=_3b9.getCellRef().cellIndex; }else{ _3be=_3ba.getCellRef().cellIndex; _3bd=_3b9.getCellRef().cellIndex; } for(var i=_3bd+1;i<_3be;i++){ if(((_3b9.getColumnRef()!=null)&&(_3b9.getLayoutType()==_3ba.getLayoutType())&&(_3b9.getLayoutType()!="datavalue")||this.allowHorizontalDataValueSelection())||((_3b9.getColumnRef()==null)&&(_3bf.cells[i].getAttribute("uid")==_3bc))){ _3c0=this.getSelectionObjectFactory().getSelectionObject(_3bf.cells[i]); if(this.addSelectionObject(_3c0,_3bb)){ if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){ cf.addSelectionToCfgVariables(_3c0.getColumnName()); } } } } }; CSelectionController.prototype.pageDoubleClicked=function(e){ try{ var node=getNodeFromEvent(e); if(typeof node.selectedCell!="undefined"){ var _3c4=node; node=node.selectedCell; _3c4.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(_3c7){ this.m_aSelectionHoverNodes=_3c7; }; 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 _3cb=this.getSelectionHoverNodes(); var _3cc=this.getAllSelectedObjects().length; if(!(_3cb.length==1&&_3cb[0]==node)){ for(var i=0;i<_3cb.length;i++){ this.sortIconHover(_3cb[i],true); if(_3cc==0){ this.pageChangeHover(_3cb[i],true); } } this.setSelectionHoverNodes([]); if(_3cc==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,_3cf){ if(!this.isValidColumnTitle(node)){ return false; } var _3d0=this.getSortImgNode(node); if(_3d0!=null&&_3d0!="undefined"){ if(_3d0.getAttribute("sortOrder")==="nosort"){ if(_3cf){ _3d0.style.visibility="hidden"; }else{ _3d0.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,_3d4){ 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 _3d5=this.isColumnSelected(node.getAttribute("tag")); if(!_3d5){ _3d5=this.isColumnCut(node.getAttribute("tag")); } if(!_3d5){ if(_3d4){ 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 _3d7=node.getElementsByTagName("img"); for(var i=0;i<_3d7.length;i++){ var sId=_3d7[i].id.toString(); if(sId!=null&&sId.length>0&&sId.indexOf("sortimg")>=0){ node=_3d7[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,_3e4){ if(node&&node.style&&node.style[_3e4]){ return node.style[_3e4]; } 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 _3e8=node; node=node.selectedCell; _3e8.removeAttribute("selectedCell"); } while(node!=null&&node.tagName!="TD"){ node=node.parentNode; } if(node!=null){ var _3e9=this.getBackgroundImage(node); this.findSelectionURLs(); if(this.getSelections().length==0||_3e9!=this.pS_backgroundImageURL){ this.pageClicked(e); } } if(typeof populateContextMenu!="undefined"){ populateContextMenu(); moveContextMenu(e); } var _3ea=false; if(this.showViewerContextMenu()){ if(typeof e.preventDefault=="function"){ e.preventDefault(); } _3ea=true; } return _3ea; }; 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,_3ed,sId){ if(typeof populateContextMenu!="undefined"){ goWindowManager.getApplicationFrame().cfgSet("contextMenuType",_3ed); goWindowManager.getApplicationFrame().cfgSet("contextMenuId",sId); populateContextMenu(_3ed.toUpperCase()); moveContextMenu(e,_3ed.toUpperCase()); } if(typeof e.preventDefault=="function"){ e.preventDefault(); } return false; }; CSelectionController.prototype.selectionsAreAllSameType=function(){ var _3ef=this.getSelections(); if(_3ef.length>0){ var _3f0=_3ef[0].getLayoutType(); for(var i=1;i<_3ef.length;i++){ if(_3f0!=_3ef[i].getLayoutType()){ return 0; } } return 1; } return -1; }; CSelectionController.prototype.selectionsAreAllOnSameColumn=function(){ var _3f2=this.getSelections(); var i=0; if(_3f2.length>0){ var _3f4=_3f2[0].getColumnRef(); if(_3f4!=null&&_3f4!=""){ for(i=1;i<_3f2.length;i++){ if(_3f4!=_3f2[i].getColumnRef()){ return false; } } }else{ var _3f5=_3f2[0].getCellTypeId(); for(i=1;i<_3f2.length;i++){ if(_3f5!=_3f2[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 _3f7=node.parentNode; while(typeof _3f7!="undefined"&&_3f7!=null){ if(typeof _3f7.className!="undefined"&&_3f7.className!=null&&_3f7.className.substr(0,2)=="ft"){ node=_3f7; break; }else{ _3f7=_3f7.parentNode; } } }else{ return false; } } var _3f8=node.className.substr(0,2); if(_3f8=="ta"||_3f8=="ts"||_3f8=="ft"){ return true; } } return false; }; CSelectionController.prototype.chartClicked=function(_3f9){ this.setSelectedChartArea(_3f9); }; CSelectionController.prototype.processColumnTitleNode=function(_3fa){ if(!_3fa||!this.m_oCognosViewer.isBux){ return; } var _3fb=_3fa.getCellRef(); if(_3fb.getAttribute("contextAugmented")=="true"||"list"!=_3fa.getDataContainerType()||"columnTitle"!=_3fa.getLayoutType()){ return; } var _3fc=_3fa.getSelectedContextIds(); var _3fd=false; if(typeof _3fc=="object"&&_3fc!=null&&_3fc.length>0){ if(this.isRelational(_3fc)&&this.getQueryModelId(_3fc[0][0])==null){ _3fd=true; }else{ return; } } var lid=_3fb.parentNode.parentNode.parentNode.getAttribute("lid"); var _3ff=_3fb.parentNode.nextSibling; var _400=getChildElementsByAttribute(_3ff,"td","cid",_3fb.getAttribute("cid")); var _401=null; var _402=true; var _403; if(_400.length>0){ var _404=_400[0]; var _405=_404.childNodes.length; for(var _406=0;_406<_405;_406++){ var _407=_404.childNodes[_406]; if(_407.getAttribute&&((_407.nodeName.toLowerCase()=="table"&&typeof _407.getAttribute("lid")=="string")||_407.nodeName.toLowerCase()=="map"||_407.nodeName.toLowerCase()=="img"||_407.getAttribute("chartcontainer")=="true")){ if(_406==0){ _402=false; } }else{ _403=[]; if(_407.nodeName.toLowerCase()=="span"){ _403.push(_407); } var _408=_407.getElementsByTagName?_407.getElementsByTagName("span"):[]; for(var _409=0;_409<_408.length;++_409){ if(lid==getImmediateLayoutContainerId(_408[_409])){ _403.push(_408[_409]); } } for(var _40a=0;_40a<_403.length;++_40a){ var _40b=_403[_40a]; if(_40b.nodeType==1&&_40b.nodeName.toLowerCase()=="span"&&_40b.style.visibility!="hidden"){ if(_40b.getAttribute("ctx")!=null&&_40b.getAttribute("ctx")!=""){ _401=_40b.getAttribute("ctx"); break; } } } } } } if(_401!=null){ var _40c=_401.split("::")[0].split(":")[0]; if(!_3fd){ _403=_3fb.getElementsByTagName("span"); if(_403.length!=0){ var _40d=this.m_oCDManager.m_cd[_40c]; var _40e=this.getTextValue(_403); var _40f={"u":_40e===null?"":_40e}; if(typeof _40d!="undefined"){ if(typeof _40d["r"]!="undefined"){ _40f.r=_40d["r"]; } if(typeof _40d["q"]!="undefined"){ _40f.q=_40d["q"]; } if(typeof _40d["i"]!="undefined"){ _40f.i=_40d["i"]; } } var _410="cloned"+_40c; this.m_oCDManager.m_cd[_410]=_40f; _403[0].setAttribute("ctx",_410); _3fa=this.getSelectionObjectFactory().processCTX(_3fa,_410); } }else{ var qmid=this.getQueryModelId(_40c); if(qmid==null){ } if(qmid!=null){ var _412=_3fc[0][0]; this.m_oCDManager.m_cd[_412].i=this.m_oCDManager.m_cd[_40c].i; return false; } } }else{ _402=false; } if(!_402){ _3fb.setAttribute("canSort","false"); } _3fb.setAttribute("contextAugmented","true"); }; CSelectionController.prototype.selectionsInSameDataContainer=function(){ try{ var _413=this.getAllSelectedObjects(); var _414=_413[0].getLayoutElementId(); for(var _415=1;_415<_413.length;_415++){ if(_414!=_413[_415].getLayoutElementId()){ return false; } } } catch(e){ return false; } return true; }; CSelectionController.prototype.selectionsFromSameDataItem=function(){ try{ var _416=this.getAllSelectedObjects(); var _417=_416[0].getDataItems()[0][0]; for(var _418=1;_418<_416.length;_418++){ if(_417!=_416[_418].getDataItems()[0][0]){ return false; } } } catch(e){ return false; } return true; }; CSelectionController.prototype.isRelational=function(_419){ try{ if(!_419){ var _41a=this.getAllSelectedObjects()[0]; _419=_41a.getSelectedContextIds(); } for(var _41b=0;_41b<_419.length;_41b++){ for(var _41c=0;_41c<_419[_41b].length;_41c++){ var ctx=_419[_41b][_41c]; 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 _421=this.getAllSelectedObjects(); for(var _422=0;_422<_421.length;_422++){ var _423=_421[_422]; if(_423.getLayoutType()!="columnTitle"||_423.isHomeCell()){ return false; } } } catch(e){ return false; } return true; }; CSelectionController.prototype.selectionsAreMeasures=function(){ try{ var _424=this.getAllSelectedObjects(); for(var _425=0;_425<_424.length;_425++){ var _426=_424[_425]; if(this.getUsageInfo(_426.getSelectedContextIds()[0][0])!=this.c_usageMeasure){ return false; } } } catch(e){ return false; } return true; }; CSelectionController.prototype.selectionsNonMeasureWithMUN=function(){ var _427=this.getAllSelectedObjects(); if(_427.length==0){ return false; } for(var _428=0;_428<_427.length;_428++){ var _429=_427[0]; if(_429.getSelectedContextIds().length==0){ return false; } var _42a=_429.getSelectedContextIds()[0][0]; var mun=this.getMun(_42a); var _42c=this.getUsageInfo(_42a); if(mun==null||typeof mun=="undefined"||mun.length==0||_42c==this.c_usageMeasure){ return false; } } return true; }; CSelectionController.prototype.areSelectionsMeasureOrCalculation=function(){ var _42d=this.getAllSelectedObjects(); if(_42d.length==0){ return false; } var _42e=this.selectionsHaveCalculationMetadata(); for(var _42f=0;_42f<_42d.length;_42f++){ var _430=_42d[_42f]; var _431=_430.getSelectedContextIds()[0][0]; if(!this.isCalculationOrMeasure(_431,_42e)){ return false; } } return true; }; CSelectionController.prototype.selectionsHaveCalculationMetadata=function(){ try{ var _432=this.getDataContainerType(); var _433=this.getAllSelectedObjects(); for(var _434=0;_434<_433.length;_434++){ var _435=_433[_434]; var _436=_435.getSelectedContextIds(); var _437=_436[0][0]; var sHun=this.getHun(_437); if(!this.hasCalculationMetadata(_437,_436,_432)){ return false; } } } catch(e){ return false; } return true; }; CSelectionController.prototype.isCalculationOrMeasure=function(_439,_43a){ var mun=this.getMun(_439); var _43c=this.getUsageInfo(_439); if(!(((mun==null||typeof mun=="undefined"||mun.length==0)&&_43a)||_43c==this.c_usageMeasure)){ return false; } return true; }; CSelectionController.prototype.hasCalculationMetadata=function(_43d,_43e,_43f){ var sHun=this.getHun(_43d); if(this.getUsageInfo(_43d)!=this.c_usageMeasure){ if((this.isRelational(_43e)&&this.getQueryModelId(_43d)!=null)||(!this.isRelational(_43e)&&_43f=="list"&&(sHun&&sHun!=""))){ return false; } } return true; }; CSelectionController.prototype.selectionsAreDateTime=function(){ try{ var _441=this.getAllSelectedObjects(); for(var _442=0;_442<_441.length;_442++){ var _443=_441[_442]; var _444=_443.getSelectedContextIds(); var _445=_444[0][0]; var _446=this.getDataType(_445); if(_446&&typeof this.m_ccl_dateTypes[_446]!=="undefined"){ return true; } } } catch(e){ return false; } return false; }; CSelectionController.prototype.getSelectedObjectsJsonContext=function(){ try{ var _447=this.getAllSelectedObjects(); if(_447===null||_447.length<=0){ return null; } var _448=this.m_oCognosViewer.getModelPath(); var _449=[]; for(var i=0;i<_447.length;i++){ var obj=_447[i].getContextJsonObject(this,_448); _449.push(obj); } return _449; } 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(_44c){ if(!_44c){ _44c=document; } try{ if(typeof _44c.selection=="object"&&_44c.selection!==null){ _44c.selection.empty(); }else{ if(typeof window.getSelection=="function"&&typeof window.getSelection()=="object"&&window.getSelection()!==null){ window.getSelection().removeAllRanges(); } } } catch(e){ } }; function CDrillThroughTarget(_44d,_44e,_44f,_450,_451,path,_453,_454,_455,_456,_457,_458){ this.m_label=_44d; this.m_outputFormat=_44e; this.m_outputLocale=_44f; this.m_showInNewWindow=_450; this.m_method=_451; this.m_path=path; this.m_bookmark=_453; this.m_parameters=_454; this.m_objectPaths=_455; this.m_prompt="false"; this.m_dynamicDrillThrough=false; this.m_parameterProperties=_458; if(typeof _456!="undefined"&&_456!=null){ if(_456=="yes"){ this.m_prompt="true"; }else{ if(_456=="target"){ this.m_prompt=""; } } } if(typeof _457!="undefined"&&_457!=null){ if(typeof _457=="string"){ _457=_457=="true"?true:false; } this.m_dynamicDrillThrough=_457; } }; 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(_459){ var _45a=""+_459; if((_45a=="0")||((_459!=null)&&(_459!=false))){ _45a=_45a.replace(/&/g,"&"); _45a=_45a.replace(//g,">"); _45a=_45a.replace(/"/g,"""); _45a=_45a.replace(/'/g,"'"); }else{ if(_459==null){ _45a=""; } } return _45a; }; function createFormField(name,_45c){ var _45d=document.createElement("input"); _45d.setAttribute("type","hidden"); _45d.setAttribute("name",name); _45d.setAttribute("value",_45c); return (_45d); }; function setBackURLToCloseWindow(_45e){ var _45f=_45e.childNodes; if(_45f){ for(var _460=0;_460<_45f.length;++_460){ var _461=_45f[_460]; var _462=_461.getAttribute("name"); if(_462&&_462=="ui.backURL"){ _45e.removeChild(_461); } } } _45e.appendChild(createFormField("ui.backURL","javascript:window.close();")); }; function doMultipleDrills(_463,cvId){ if(parent!=this&&parent.doMultipleDrills){ if(getCVId()!=""&&getCVId()!=cvId){ cvId=getCVId(); } return parent.doMultipleDrills(_463,cvId); }else{ if(window.gViewerLogger){ window.gViewerLogger.log("Drill Targets",_463,"text"); } var oCV=null; try{ oCV=getCognosViewerObjectRef(cvId); } catch(exception){ } var _466=buildDrillForm(oCV); addDrillEnvironmentFormFields(_466,oCV); if(typeof oCV!="undefined"&&oCV!=null){ var _467=oCV.getModelPath(); _466.appendChild(createFormField("modelPath",_467)); var _468=oCV.getSelectionController(); var _469=""; if(typeof getViewerSelectionContext!="undefined"&&typeof CSelectionContext!="undefined"){ _469=getViewerSelectionContext(_468,new CSelectionContext(_467)); } _466.appendChild(createFormField("drillContext",_469)); _466.appendChild(createFormField("modelDrillEnabled",_468.getModelDrillThroughEnabled())); if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"&&document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value!=""){ _466.appendChild(createFormField("drillSource",document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value)); }else{ if(typeof oCV.envParams["ui.spec"]!="undefined"){ _466.appendChild(createFormField("sourceSpecification",oCV.envParams["ui.spec"])); } } } _466.setAttribute("launchGotoPage","true"); _466.appendChild(createFormField("drillTargets",_463)); _466.appendChild(createFormField("invokeGotoPage","true")); _466.appendChild(createFormField("m","portal/drillthrough.xts")); _466.appendChild(createFormField("b_action","xts.run")); var _46a="winNAT_"+(new Date()).getTime(); var _46b=".."; if(oCV!=null){ _46b=oCV.getWebContentRoot(); var _46c=oCV.getExecutionParameters(); if(_46c!=""){ _466.appendChild(createFormField("encExecutionParameters",_46c)); } } if(!oCV||!oCV.launchGotoPageForIWidgetMobile(_466)){ if(oCV&&typeof oCV.launchGotoPage==="function"){ oCV.launchGotoPage(_466); }else{ var _46d=_46b+"/rv/blankDrillWin.html"; _466.target=_46a; window.open(_46d,_46a); } } } }; function buildDrillForm(oCV){ var _46f=document.getElementById("drillForm"); if(_46f){ document.body.removeChild(_46f); } _46f=document.createElement("form"); if(typeof oCV!="undefined"&&oCV!=null){ var _470=document.getElementById("formWarpRequest"+oCV.getId()); _46f.setAttribute("target",_470.getAttribute("target")); _46f.setAttribute("action",_470.getAttribute("action")); }else{ _46f.setAttribute("action",location.pathname); } _46f.setAttribute("id","drillForm"); _46f.setAttribute("name","drillForm"); _46f.setAttribute("method","post"); _46f.style.display="none"; document.body.appendChild(_46f); return _46f; }; function addDrillEnvironmentFormFields(_471,oCV){ if(window.g_dfEmail){ _471.appendChild(createFormField("dfemail",window.g_dfEmail)); } if(oCV!=null){ _471.appendChild(createFormField("cv.id",oCV.getId())); if(typeof oCV.envParams["ui.sh"]!="undefined"){ _471.appendChild(createFormField("ui.sh",oCV.envParams["ui.sh"])); } if(oCV.getViewerWidget()==null){ if(typeof oCV.envParams["cv.header"]!="undefined"){ _471.appendChild(createFormField("cv.header",oCV.envParams["cv.header"])); } if(typeof oCV.envParams["cv.toolbar"]!="undefined"){ _471.appendChild(createFormField("cv.toolbar",oCV.envParams["cv.toolbar"])); }else{ var _473=oCV.getAdvancedServerProperty("VIEWER_PASS_PORTLET_TOOLBAR_STATE_ON_DRILLTHROUGH"); if(oCV.m_viewerFragment&&_473!=null&&_473===true){ var _474=oCV.m_viewerFragment.canShowToolbar()?"true":"false"; _471.appendChild(createFormField("cv.toolbar",_474)); } } } if(typeof oCV.envParams["ui.backURL"]!="undefined"){ _471.appendChild(createFormField("ui.backURL",oCV.envParams["ui.backURL"])); } if(typeof oCV.envParams["ui.postBack"]!="undefined"){ _471.appendChild(createFormField("ui.postBack",oCV.envParams["ui.postBack"])); } if(typeof oCV.envParams["savedEnv"]!="undefined"){ _471.appendChild(createFormField("savedEnv",oCV.envParams["savedEnv"])); } if(typeof oCV.envParams["ui.navlinks"]!="undefined"){ _471.appendChild(createFormField("ui.navlinks",oCV.envParams["ui.navlinks"])); } if(typeof oCV.envParams["lang"]!="undefined"){ _471.appendChild(createFormField("lang",oCV.envParams["lang"])); } if(typeof oCV.envParams["ui.errURL"]!="undefined"){ _471.appendChild(createFormField("ui.errURL",oCV.envParams["ui.errURL"])); } var _475=""; if(oCV.envParams["ui.routingServerGroup"]){ _475=oCV.envParams["ui.routingServerGroup"]; } _471.appendChild(createHiddenFormField("ui.routingServerGroup",_475)); }else{ _471.appendChild(createFormField("cv.header","false")); _471.appendChild(createFormField("cv.toolbar","false")); } }; function appendReportHistoryObjects(oCV,_477){ if(oCV!=null&&typeof oCV.rvMainWnd!="undefined"&&_477!=null){ oCV.rvMainWnd.addCurrentReportToReportHistory(); var _478=oCV.rvMainWnd.saveReportHistoryAsXML(); _477.appendChild(createFormField("cv.previousReports",_478)); } }; function doSingleDrill(_479,args,_47b,_47c,_47d,_47e,_47f,_480,cvId,_482,_483){ var _484=""; if(typeof cvId=="string"){ _484=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(_479,args,_47b,_47c,_47d,_47e,_47f,_480,cvId,_482,_483); }else{ if(typeof _47b=="undefined"){ _47b="default"; }else{ if(_47b=="execute"){ _47b="run"; } } if(_47b=="edit"&&oCV!=null&&typeof oCV.m_viewerFragment){ _479="_blank"; } var _486=buildDrillForm(oCV); var _487=""; _487+=""+sXmlEncode(_47b)+""; _487+=""+sXmlEncode(args[0][1])+""; _487+=""+sXmlEncode(_47c)+""; _487+=""+sXmlEncode(_47d)+""; _487+=""+sXmlEncode(_482)+""; _487+=""+sXmlEncode(_483)+""; if(typeof oCV!="undefined"&&oCV!=null){ _487+=""+oCV.getTracking()+""; if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"){ _487+=""+sXmlEncode(document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value)+""; } var _488=oCV.getModelPath(); _487+=""+sXmlEncode(_488)+""; _487+=""+sXmlEncode(getViewerSelectionContext(oCV.getSelectionController(),new CSelectionContext(_488)))+""; if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"&&document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value!=""){ _487+=""+sXmlEncode(document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value)+""; }else{ if(typeof oCV.envParams["ui.spec"]!="undefined"){ _487+=""+sXmlEncode(oCV.envParams["ui.spec"])+""; } } } if(_47e!=""){ _487+=""+_47e+""; } if(_47b!="view"){ if(typeof _47f!="undefined"){ _487+=""+sXmlEncode(_47f)+""; } if(typeof _480!="undefined"){ _487+=""+sXmlEncode(_480)+""; } } var _489=0; _487+=""; var _48a=[]; for(_489=1;_489"; } } } var _48e=args[_489][0]; var _48f=false; for(var i=0;i<_48a.length;i++){ var _491=_48a[i]; if(_491.name===_48e&&_491.value===sSel){ _48f=true; break; } } if(!_48f){ _48a.push({"name":_48e,"value":sSel}); _487+=""+sXmlEncode(sSel)+""; } } _487+=""; _487+=getExecutionParamNode(oCV); _487+=""; _486.appendChild(createFormField("authoredDrill.request",_487)); _486.appendChild(createFormField("ui.action","authoredDrillThrough2")); _486.appendChild(createFormField("b_action","cognosViewer")); addDrillEnvironmentFormFields(_486,oCV); if(!oCV||!oCV.executeDrillThroughForIWidgetMobile(_486)){ if(oCV&&typeof oCV.sendDrillThroughRequest==="function"){ oCV.sendDrillThroughRequest(_486); }else{ if(_479==""&&oCV!=null&&typeof oCV.m_viewerFragment!="undefined"){ oCV.m_viewerFragment.raiseAuthoredDrillEvent(_487); }else{ if((oCV!=null&&oCV.getViewerWidget()!=null)||_479!=""){ setBackURLToCloseWindow(_486); var _492="winNAT_"+(new Date()).getTime(); var _493=".."; if(oCV!=null){ _493=oCV.getWebContentRoot(); } var _494=_493+"/rv/blankDrillWin.html"; if(_484){ _494+="?cv.id="+_484; } if(oCV==null){ _494=window.location.href.substring(0,window.location.href.indexOf("/v1")); _494+="/?perspective=classicviewer"; _494+="&altDrillFlag=true"; _494+="&format="+sXmlEncode(_47c); var _495=_486.getAttribute("name")+Date.now().toString(); _486.setAttribute("name",_495); if(typeof (Storage)!=="undefined"){ localStorage.setItem(_495,_486.outerHTML); _494+="&drillFormLabel="+_495; }else{ console.log("Sorry! No Web Storage support..."); } } if(window.gViewerLogger){ window.gViewerLogger.log("Drill Specification",_487,"xml"); } _486.target=_492; newWindow=window.open(_494,_492); }else{ appendReportHistoryObjects(oCV,_486); if(window.gViewerLogger){ window.gViewerLogger.log("Drill Specification",_487,"xml"); } _486.target=(oCV&&oCV.getDrillFormTarget)?oCV.getDrillFormTarget():"_self"; _486.submit(); if(oCV!=null&&!oCV.getDrillFormTarget){ setTimeout(getCognosViewerObjectRefAsString(oCV.getId())+".getRequestIndicator().show()",10); } } } } } } }; function getExecutionParamNode(oCV){ var _497=""; if(typeof oCV!="undefined"&&oCV!=null){ var _498=oCV.getExecutionParameters(); if(_498!=""){ _497+=""; _497+=sXmlEncode(_498); _497+=""; } } return _497; }; function doSingleDrillThrough(_499,_49a,cvId){ var _49c=_499[0][0]; if(typeof _49c=="undefined"||_49c==null){ return; } var _49d=cvId&&window[cvId+"drillTargets"]?window[cvId+"drillTargets"][_49c]:drillTargets[_49c]; if(typeof _49d=="undefined"){ return; } if(_49a!=""&&_49d.getPath()==""){ document.location="#"+_49a; }else{ var args=[]; args[args.length]=["ui.object",_49d.getPath()]; for(var _49f=1;_49f<_499.length;++_49f){ args[args.length]=_499[_49f]; } var _4a0=""; if(_49d.getShowInNewWindow()=="true"){ _4a0="_blank"; } var _4a1=_49d.getParameters(); var _4a2=_49d.getObjectPaths(); var _4a3=cvId; if(!cvId){ _4a3=getCVId(); } doSingleDrill(_4a0,args,_49d.getMethod(),_49d.getOutputFormat(),_49d.getOutputLocale(),_49a,_4a1,_4a2,_4a3,_49d.getPrompt(),false); } }; function getCVId(){ var _4a4=""; try{ _4a4=this.frameElement.id.substring("CVIFrame".length); } catch(exception){ } return _4a4; }; function doMultipleDrillThrough(_4a5,cvId){ var _4a7=""; for(var _4a8=0;_4a8<_4a5.length;++_4a8){ var _4a9=_4a5[_4a8]; if(_4a9.length<3){ continue; } var _4aa=_4a9[0]; if(typeof _4aa=="undefined"||_4aa==null){ continue; } var _4ab=_4a9[1]; if(typeof _4ab=="undefined"||_4ab==null){ continue; } var _4ac=cvId&&window[cvId+"drillTargets"]?window[cvId+"drillTargets"][_4aa]:drillTargets[_4aa]; if(typeof _4ac=="undefined"||_4ac==null){ continue; } if(_4ab===null||_4ab===""){ _4ab=_4ac.getLabel(); } _4a7+=""; for(var _4ad=2;_4ad<_4a9.length;++_4ad){ _4a7+=_4a9[_4ad]; } _4a7+=_4ac.getParameters(); _4a7+=_4ac.getObjectPaths(); _4a7+=""; } _4a7+=""; if(!cvId){ cvId=getCVId(); } doMultipleDrills(_4a7,cvId); }; function CScriptLoader(_4ae){ 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=_4ae; 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(_4af){ this.m_bHandleStylesheetLimit=_4af; }; CScriptLoader.prototype.executeScripts=function(_4b0,_4b1){ if(this.isReadyToExecute()){ for(var _4b2=0;_4b20){ return false; } return true; }; CScriptLoader.prototype.loadCSS=function(_4b7,_4b8,_4b9,_4ba){ var aM=_4b7.match(this.m_reHasCss); if(aM){ for(var i=0;i0){ var _4cf=window.gScriptLoader.m_aBlockedPromptingLocaleFileQueue.shift(); window.gScriptLoader.loadObject(_4cf.sName,_4cf.sNamespaceId); } } if(window.gScriptLoader.m_aScriptLoadQueue.length>0){ window.gScriptLoader.loadObject(); } } }; CScriptLoader.prototype.moveLinks=function(node){ if(!node){ return; } var _4d1=node.getAttribute("href"); if(!_4d1||this.m_oFiles[_4d1]){ return; } this.m_oFiles[_4d1]="complete"; document.getElementsByTagName("head").item(0).appendChild(node); }; CScriptLoader.prototype.loadObject=function(_4d2,_4d3){ var _4d4=null; if(typeof _4d2==="undefined"){ if(this.m_aScriptLoadQueue.length>0){ var _4d5=this.m_aScriptLoadQueue.shift(); _4d2=_4d5.name; _4d3=_4d5.namespaceId; }else{ return; } } if(this.m_oFiles[_4d2]){ return; } if(this.m_bBlockScriptLoading){ this.m_aScriptLoadQueue.push({"name":_4d2,"namespaceId":_4d3}); }else{ if(_4d2.match(this.m_reIsCss)){ _4d4=document.createElement("link"); _4d4.setAttribute("rel","stylesheet"); _4d4.setAttribute("type","text/css"); _4d4.setAttribute("href",_4d2); if(window.isIE&&window.isIE()){ _4d4.onreadystatechange=CScriptLoader_onReadyStateChange; _4d4.onload=CScriptLoader_onReadyStateChange; _4d4.onerror=CScriptLoader_onReadyStateChange; this.m_oFiles[_4d2]="new"; }else{ this.m_oFiles[_4d2]="complete"; } }else{ if(_4d2.match(this.m_reIsJavascript)){ if(_4d2.match(this.m_reIsPromptingLocaleJavascript)){ if(this.m_bBlockPromptingLocaleScripts){ this.m_aBlockedPromptingLocaleFileQueue.push({"sName":_4d2,"sNamespaceId":_4d3}); return; } this.m_bBlockPromptingLocaleScripts=true; } this.m_bBlockScriptLoading=this.m_bUseScriptBlocking; _4d4=document.createElement("script"); _4d4.setAttribute("language","javascript"); _4d4.setAttribute("type","text/javascript"); _4d4.setAttribute("src",_4d2); _4d4.sFilePath=_4d2; _4d4.onreadystatechange=CScriptLoader_onReadyStateChange; _4d4.onload=CScriptLoader_onReadyStateChange; _4d4.onerror=CScriptLoader_onReadyStateChange; this.addNamespaceAttribute(_4d4,_4d3); this.m_oFiles[_4d2]="new"; } } if(_4d4){ document.getElementsByTagName("head").item(0).appendChild(_4d4); } } }; CScriptLoader.prototype.loadScriptsFromDOM=function(_4d6,_4d7,_4d8){ if(!_4d6){ return; } var _4d9=_4d6.getElementsByTagName("script"); while(_4d9.length>0){ var _4da=_4d9[0]; if(_4da.getAttribute("src")!=null&&_4da.getAttribute("src").length>0){ this.loadObject(_4da.getAttribute("src"),_4d7); }else{ var _4db=_4da.innerHTML; var _4dc=false; if(_4db.indexOf("document.write")!=-1){ var _4dd=_4db.replace(this.m_reEscapedCharacters,"").replace(this.m_reStringLiterals,""); _4dc=(_4dd.indexOf("document.write")!=-1); } if(_4dc){ if(_4d8){ var sId="CVScriptFromDOMPlaceHolder"+_4d9.length+_4d7; var _4df=_4da.ownerDocument.createElement("span"); _4df.setAttribute("id",sId); _4da.parentNode.insertBefore(_4df,_4da); this.m_aDocumentWriters.push(new CDocumentWriter(sId,_4db)); } }else{ if(_4db.length>0){ this.m_aScripts.push(_4db); } } } _4da.parentNode.removeChild(_4da); } }; CScriptLoader.prototype.loadStyles=function(_4e0,_4e1){ if(!_4e0||!_4e0.parentNode){ return; } var _4e2=_4e0.parentNode.getElementsByTagName("style"); while(_4e2.length>0){ var _4e3=_4e2[0]; if(_4e1){ this.addNamespaceAttribute(_4e3,_4e1); } 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(_4e3); } }; CScriptLoader.prototype.loadAll=function(_4e5,_4e6,_4e7,_4e8){ this.m_bScriptLoaderCalled=true; this.m_bHasCompletedExecution=false; this.loadScriptsFromDOM(_4e5,_4e7,_4e8); if(this.containsAjaxWarnings()){ return false; } this.loadStyles(_4e5,_4e7); if(this.containsAjaxWarnings()){ return false; } this.executeScripts(_4e6,_4e7); return true; }; CScriptLoader.prototype.setFileState=function(_4e9,_4ea){ this.m_oFiles[_4e9]=_4ea; }; CScriptLoader.prototype.containsAjaxWarnings=function(){ if(this.m_bIgnoreAjaxWarnings){ return false; }else{ return (this.m_ajaxWarnings.length>0); } }; CScriptLoader.prototype.addNamespaceAttribute=function(_4eb,_4ec){ if(typeof _4ec==="string"){ _4eb.setAttribute("namespaceId",_4ec); } }; if(typeof window.gScriptLoader=="undefined"){ window.gScriptLoader=new CScriptLoader(); } var InfoBarHelper={}; InfoBarHelper.getContainerId=function(oCV,_4ee){ var _4ef=oCV.getLayoutElement(_4ee); var lid=_4ef.getAttribute("lid"); var _4f1=lid===null?"":lid; _4f1=_4f1.replace(oCV.getViewerWidget().getViewerId(),"").replace("RAP_NDH_",""); return _4f1; }; InfoBarHelper.infoBarRemoveFilter=function(_4f2,_4f3,_4f4,_4f5){ var oCV=eval("window.oCV"+_4f2); if(typeof oCV!="undefined"){ var _4f7=this.getContainerId(oCV,_4f3); oCV.executeAction("Filter",{type:"remove",id:_4f7,item:_4f4,details:_4f5}); } }; InfoBarHelper.infoBarRemoveSlider=function(_4f8,_4f9){ var oCV=eval("window.oCV"+_4f8); var _4fb={}; _4fb[_4f9]={blockedEvents:["*"]}; oCV.fireWidgetEvent("com.ibm.bux.widget.updateEventFilter",_4fb); if(typeof oCV!="undefined"){ oCV.executeAction("UpdateDataFilter",{"filterPayload":"{ \"clientId\" :\""+_4f9+"\"}"}); } }; InfoBarHelper.infoBarRemoveSort=function(_4fc,_4fd,_4fe,_4ff){ var oCV=eval("window.oCV"+_4fc); if(typeof oCV!="undefined"){ var _501=this.getContainerId(oCV,_4fd); if(_4ff=="true"){ oCV.executeAction("Sort",{order:"none",id:_501,item:_4fe,type:"label"}); }else{ oCV.executeAction("Sort",{order:"none",id:_501,item:_4fe}); } } }; dojo.provide("InfoBarBase"); dojo.declare("InfoBarBase",null,{constructor:function(_502){ this.m_cognosViewer=_502; this.m_parameterValues=new CParameterValues(); var _503=XMLBuilderLoadXMLFromString(this.m_cognosViewer.getExecutionParameters()); if(_503.childNodes.length==1){ this.m_parameterValues.loadWithOptions(_503.childNodes[0],false); } this.m_parameterStringOperators=new CParameterValueStringOperators(RV_RES.IDS_JS_FILTER_BETWEEN,RV_RES.IDS_JS_FILTER_NOT_BETWEEN,RV_RES.IDS_JS_FILTER_LESS_THAN,RV_RES.IDS_JS_FILTER_GREATER_THAN,RV_RES.IDS_JS_INFOBAR_AND_TEXT,RV_RES.IDS_JS_FILTER_EXCLUDE); this.c_SliderCheckboxParameterPrefix="BusinessInsight."; this.m_containerInfo=null; this.m_editableFilters=null; this.m_editableSorts=null; this.m_editableSliders=null; this.m_id=null; this.m_layoutIndex=null; this.m_timingDetails=null; },setContainerInfo:function(_504){ this.m_containerInfo=_504; },setTimingDetails:function(_505){ this.m_timingDetails=_505; },setEditableFilters:function(_506){ this.m_editableFilters=_506; },setId:function(_507){ this.m_id=_507; },getId:function(){ return this.m_id; },hasPrompts:function(){ var _508=this.m_parameterValues.length(); for(var _509=0;_509<_508;++_509){ var _50a=this.m_parameterValues.getAt(_509); if(_50a!==null&&_50a.length()>0&&_50a.name().indexOf(this.c_SliderCheckboxParameterPrefix)!==0){ return true; } } return false; },addPromptDetails:function(_50b){ var _50c=""; var _50d=(_50b!==true); if(this.hasPrompts()){ var _50e=this.m_id+"instructions "+this.m_id+"_promptString "+this.m_id+"_lockedString "; for(var _50f=0,_510=this.m_parameterValues.length();_50f<_510;++_50f){ var _511=_50e+this.m_id+_50f+"_promptDetail"; var _512=this.m_parameterValues.getAt(_50f); var _513=_512.length(); if(_512!==null&&_513>0&&_512.name().indexOf(this.c_SliderCheckboxParameterPrefix)!==0){ _50c+="
":" tabindex=\"-1\">"); _50c+=""; _50c+=this.addInfoBarIcon("infobar_filter.gif",true); _50c+=""; _50c+=(_50d?this.addInfoBarIcon("infobar_locked.gif",false):""); _50c+="
"; _50c+=""; _50c+=html_encode(_512.name()); _50c+=""; _50c+=" : "; _50c+=_512.toString(this.m_parameterStringOperators); _50c+="
"; } } } return _50c; },getPromptDetailsInJSON:function(){ var _514=[]; if(this.hasPrompts()){ for(var _515=0,_516=this.m_parameterValues.length();_515<_516;++_515){ var _517=this.m_parameterValues.getAt(_515); var _518=_517.length(); if(_517!==null&&_518>0&&_517.name().indexOf(this.c_SliderCheckboxParameterPrefix)!==0){ _514.push({"type":"prompt","label":_517.name(),"description":_517.toString(this.m_parameterStringOperators)}); } } } return _514; },addSliderDetails:function(_519){ var _51a=""; var _51b=(_519!==true); if(this.m_containerInfo!==null&&this.m_editableSliders){ var _51c=this.m_id+"instructions "+this.m_id+"_sliderString "; var _51d=this.m_editableSliders.length; for(var _51e=0;_51e<_51d;++_51e){ var _51f=_51c+this.m_id+_51e+"_sliderDetail"; var _520=this.m_editableSliders[_51e]; if(_520&&_520.name){ _51a+="
":" tabindex=\"-1\">"); _51a+=""; if(typeof _520.controlType!="undefined"&&_520.controlType=="checkbox"){ _51a+=this.addInfoBarIcon("infobar_select.gif",true); }else{ _51a+=this.addInfoBarIcon("infobar_slider.gif",true); } _51a+=""; _51a+=(_51b?this.addRemoveSliderButton(_520.clientId):""); _51a+="
"; _51a+=""; _51a+=(_520.label?_520.label:_520.name); _51a+=(_520.attributeName)?(" - "+_520.attributeName):""; _51a+=""; _51a+=" : "; if(typeof _520.values!="undefined"){ _51a+=this.processFilterOperatorItems(_520.values); }else{ if(_520.min==_520.max){ _51a+=_520.min; }else{ _51a+=this.processFilterOperatorRange(RV_RES.IDS_JS_INFOBAR_BETWEEN_TEXT,_520.min,_520.max); } } _51a+="
"; } } } return _51a; },getSliderDetailsInJSON:function(){ var _521=[]; if(this.m_containerInfo!==null&&this.m_editableSliders){ var _522=this.m_id+"instructions "+this.m_id+"_sliderString "; var _523=this.m_editableSliders.length; for(var _524=0;_524<_523;++_524){ var _525=this.m_editableSliders[_524]; if(_525&&_525.name){ var _526=(_525.label?_525.label:_525.name); if(_525.attributeName){ _526+=(" "+_525.attributeName); } var _527=""; if(typeof _525.values!="undefined"){ _527+=this.processFilterOperatorItems(_525.values); }else{ if(_525.min==_525.max){ _527+=_525.min; }else{ _527+=this.processFilterOperatorRange(RV_RES.IDS_JS_INFOBAR_BETWEEN_TEXT,_525.min,_525.max); } } _521.push({"type":"slider","label":_526,"description":_527}); } } } return _521; },hasLockedFilters:function(){ var _528=false; if(this.m_containerInfo!==null&&typeof this.m_containerInfo.lockedFilters!=="undefined"){ var _529=this.m_containerInfo.lockedFilters.length; for(var _52a=0;_52a<_529;++_52a){ var _52b=this.m_containerInfo.lockedFilters[_52a]; if(typeof _52b.staticText!="undefined"&&_52b.staticText.charAt(0)!==" "){ _528=true; } } } return _528; },addLockedFilterDetails:function(_52c){ var _52d=""; var _52e=(_52c!==true); if(this.m_containerInfo!==null&&typeof this.m_containerInfo.lockedFilters!=="undefined"){ var _52f=this.m_id+"instructions "+this.m_id+"_filterString "+this.m_id+"_lockedString "; var _530=this.m_containerInfo.lockedFilters.length; for(var _531=0;_531<_530;++_531){ var _532=_52f+this.m_id+_531+"_lockedFilterDetail"; var _533=this.m_containerInfo.lockedFilters[_531]; if(typeof _533.staticText!="undefined"&&_533.staticText.charAt(0)!==" "){ _52d+="
":" tabindex=\"-1\">"); _52d+=""; _52d+=this.addInfoBarIcon("infobar_filter.gif",true); _52d+=""; _52d+=""; _52d+=(_52e?this.addInfoBarIcon("infobar_locked.gif",false):""); _52d+="
"; _52d+=""; _52d+=html_encode(_533.staticText); _52d+=""; _52d+="
"; } } } return _52d; },addFilteredItemsDetails:function(_534){ var _535=""; var _536=(_534!==true); if(this.m_editableFilters){ for(var _537=0,_538=this.m_editableFilters.length;_537<_538;++_537){ var _539=this.m_editableFilters[_537]; var _53a=this.m_id+"instructions "+this.m_id+"_filterString "+this.m_id+_537+"_filterDetail"; var _53b=(typeof _539.itemLabel=="string")?_539.itemLabel:_539.item; _535+="
":" tabindex=\"-1\">"); _535+=""; _535+=this.addInfoBarIcon("infobar_filter.gif",true); _535+=""; _535+=(_536?this.addRemoveFilterButton(_539.item,this.processFilterDetails(_539)):""); _535+="
"; _535+=this.createHiddenSpan(this.m_id+_537+"_filterPosition",getCurrentPosistionString(this.m_cognosViewer,_537+1,_538)); _535+=html_encode(enforceTextDir(_53b)); _535+=this.processFilterOperator(_539); _535+="
"; } } return _535; },getFilteredItemsDetailsInJSON:function(){ var _53c=[]; if(this.m_editableFilters){ for(var _53d=0,_53e=this.m_editableFilters.length;_53d<_53e;++_53d){ var _53f=this.m_editableFilters[_53d]; var _540=(typeof _53f.itemLabel=="string")?_53f.itemLabel:_53f.item; _53c.push({"type":"filter","label":enforceTextDir(_540)+this.processFilterOperator(_53f),"description":""}); } } return _53c; },addSortDetails:function(_541){ var _542=""; var _543=(_541!==true); if(this.m_editableSorts){ for(var _544=0,_545=this.m_editableSorts.length;_544<_545;++_544){ var _546=this.m_editableSorts[_544]; var _547=this.m_id+"instructions "+this.m_id+"_sortString "+this.m_id+_544+"_sortDetail"; _542+="
":" tabindex=\"-1\">"); _542+=""; _542+=this.addInfoBarIcon("infobar_sort.gif",true); var _548; if(typeof _546.labels=="string"||typeof _546.valuesOf=="string"){ var _549=(typeof _546.labels=="string")?_546.labels:_546.valuesOf; _548=(typeof _546.itemLabel=="string")?_546.itemLabel:_549; _542+=""; _542+=(_543?this.addRemoveSortButton(_549,"true"):""); }else{ if(_546.valuesOf instanceof Array){ if(_546.valuesOf.length>0&&typeof _546.valuesOf[0].item=="string"){ _542+=""; _542+=(_543?this.addRemoveSortButton(_546.valuesOf[0].item,"false"):""); } } } _542+="
"; _542+=this.createHiddenSpan(this.m_id+_544+"_sortPosition",getCurrentPosistionString(this.m_cognosViewer,_544+1,_545)); _542+=html_encode(_548); _542+=" : "; if(_546.byItems instanceof Array){ for(var _54a=0;_54a<_546.byItems.length;++_54a){ _542+=(_54a>0)?" - ":""; _542+=_546.byItems[_54a].item; _542+=", "; _542+=this.m_sortStrings[_546.byItems[_54a].order]; } }else{ if(typeof _546.valuesOf=="string"){ _542+=this.m_sortStrings["byValue"]; }else{ _542+=this.m_sortStrings["byLabel"]; } _542+=", "; _542+=this.m_sortStrings[_546.order]; } _542+=""; _542+=this.createHiddenSpan(this.m_id+_544+"_sortPosition",getCurrentPosistionString(this.m_cognosViewer,_544+1,_545)); _548=""; if(typeof _546.itemLabel=="string"){ _548=_546.itemLabel; }else{ for(var _54b=0;_54b<_546.valuesOf.length;++_54b){ _548+=" - "; _548+=_546.valuesOf[_54b].item; } _548=_548.substring(3); } _542+=_548; _542+=" : "; _542+=this.m_sortStrings["byValue"]; _542+=", "; _542+=this.m_sortStrings[_546.order]; _542+="
"; } } return _542; },addInfoBarIcon:function(_54c,_54d){ return ""+"\"\""+""; },createHiddenSpan:function(id,text){ return " "+text+" "; },addRemoveFilterButton:function(item,_551){ var _552=""; var _553=this.m_cognosViewer.getViewerWidget(); if(!this.m_cognosViewer.isLimitedInteractiveMode()&&!_553.isConsumeUser()){ var _554=RV_RES.IDS_JS_DELETE; var _555=this.m_id+"_delete"; _552=""+""+""; } return _552; },addRemoveSliderButton:function(_556){ var _557=""; var _558=this.m_cognosViewer.getViewerWidget(); if(!this.m_cognosViewer.isLimitedInteractiveMode()&&!_558.isConsumeUser()){ var _559=RV_RES.IDS_JS_DELETE; var _55a=this.m_id+"_delete"; _557=""+""+""; } return _557; },addRemoveSortButton:function(item,_55c){ var _55d=""; var _55e=this.m_cognosViewer.getViewerWidget(); if(!this.m_cognosViewer.isLimitedInteractiveMode()&&!this.m_cognosViewer.isBlacklisted("Sort")){ var _55f=RV_RES.IDS_JS_DELETE; var _560=this.m_id+"_delete"; _55d=""+""+""; } return _55d; },processFilterOperator:function(_561){ var _562=""; if(typeof _561["in"]!="undefined"){ _562+=" "+CViewerCommon.getMessage(RV_RES.IDS_JS_INFOBAR_INCLUDE_TEXT,this.processFilterOperatorItems(_561["in"])); }else{ if(typeof _561["notIn"]!="undefined"){ _562+=" "+CViewerCommon.getMessage(RV_RES.IDS_JS_INFOBAR_EXCLUDE_TEXT,this.processFilterOperatorItems(_561["notIn"])); }else{ if(typeof _561["range"]!="undefined"||typeof _561["notRange"]!="undefined"){ var _563=typeof _561["range"]!="undefined"?RV_RES.IDS_JS_INFOBAR_BETWEEN_TEXT:RV_RES.IDS_JS_INFOBAR_NOT_BETWEEN_TEXT; var _564=typeof _561["range"]!="undefined"?_561["range"]:_561["notRange"]; for(var _565=0;_565<_564.length;++_565){ var _566=_564[_565]; _562+=" "+CViewerCommon.getMessage(_563,[_566.from,_566.to]); } }else{ if(typeof _561["lessThan"]!="undefined"){ _562+=" "+RV_RES.IDS_JS_FILTER_LESS_THAN+" "+_561["lessThan"]; }else{ if(typeof _561["lessThanEqual"]!="undefined"){ _562+=" "+RV_RES.IDS_JS_FILTER_LESS_THAN_EQUAL+" "+_561["lessThanEqual"]; }else{ if(typeof _561["greaterThan"]!="undefined"){ _562+=" "+RV_RES.IDS_JS_FILTER_GREATER_THAN+" "+_561["greaterThan"]; }else{ if(typeof _561["greaterThanEqual"]!="undefined"){ _562+=" "+RV_RES.IDS_JS_FILTER_GREATER_THAN_EQUAL+" "+_561["greaterThanEqual"]; }else{ if(typeof _561["not"]!="undefined"&&_561["not"]=="true"){ _562+=" "+RV_RES.IDS_JS_FILTER_IS_NOT; } if(typeof _561["endsWith"]!="undefined"){ _562+=" "+RV_RES.IDS_JS_FILTER_ENDS_WITH+" "+_561["endsWith"]; }else{ if(typeof _561["beginsWith"]!="undefined"){ _562+=" "+RV_RES.IDS_JS_FILTER_BEGINS_WITH+" "+_561["beginsWith"]; }else{ if(typeof _561["contains"]!="undefined"){ _562+=" "+RV_RES.IDS_JS_FILTER_CONTAINS+" "+_561["contains"]; }else{ if(typeof _561["isMatchesSQLPatternFilter"]!="undefined"){ _562+=" "+RV_RES.IDS_JS_FILTER_IS_MATCHES_SQLPATTERNFILTER+" "+_561["isMatchesSQLPatternFilter"]; } } } } } } } } } } } return _562; },processFilterDetails:function(_567){ return html_encode("["+dojo.toJson(_567)+"]"); },processFilterOperatorItems:function(_568){ var _569=""; for(var _56a=0;_56a<_568.length;++_56a){ if(_56a!==0){ _569+=(RV_RES.IDS_JS_LIST_SEPARATOR+" "); } _569+=enforceTextDir(_568[_56a]); } return _569; },processFilterOperatorRange:function(_56b,_56c,_56d){ if(typeof _56c=="undefined"){ _56c=" "; } if(typeof _56d=="undefined"){ _56d=" "; } return CViewerCommon.getMessage(_56b,[_56c,_56d]); }}); dojo.declare("InfoBar",InfoBarBase,{constructor:function(_56e,_56f,_570,_571,_572){ this.m_layoutElement=_56f; this.m_containerInfo=_570; this.m_bRendered=false; this.initializeEditableSorts(_571); this.initializeEditableFilters(_571); this.initializeEditableSliders(_571); this.m_id=_572+_56e.getId(); this.m_layoutIndex=_572; this.m_sortStrings={byLabel:RV_RES.IDS_JS_SORTED_BY_LABEL,byValue:RV_RES.IDS_JS_SORTED_BY_VALUE,descending:RV_RES.IDS_JS_SORT_DESCENDING_ORDER,ascending:RV_RES.IDS_JS_SORT_ASCENDING_ORDER}; this.connections=[]; },getLayoutElement:function(){ var _573=this.m_layoutElement; var _574=_573.getAttribute("lid"); if(_574==null){ _574=_573.getAttribute("pflid"); } if(_574!==null){ if(_573.tagName.toUpperCase()=="MAP"){ var _575=_573.parentNode.childNodes; for(var _576=0;_576<_575.length;++_576){ var _577=_575[_576].getAttribute("usemap"); if(_577!==null&&_577==("#"+this.m_cognosViewer.getId()+_574)){ return _575[_576]; } } }else{ if(_573.parentNode.getAttribute("chartcontainer")=="true"){ return _573.parentNode; } } return _573; } return null; },initializeEditableSorts:function(_578){ if(this.m_containerInfo!==null){ if(typeof this.m_containerInfo.sort!=="undefined"){ this.m_editableSorts=this.m_containerInfo.sort; } if(typeof _578!=="undefined"){ for(var i=0;i<_578.length;++i){ this.m_editableSorts=this.mergeChildInfo(this.m_editableSorts,_578[i].sort,"labels"); this.m_editableSorts=this.mergeChildInfo(this.m_editableSorts,_578[i].sort,"valuesOf"); } } } },initializeEditableFilters:function(_57a){ if(typeof this.m_containerInfo!=="undefined"&&this.m_containerInfo!==null){ if(typeof this.m_containerInfo.filter!=="undefined"){ this.m_editableFilters=this.m_containerInfo.filter; } if(typeof _57a!=="undefined"){ for(var i=0;i<_57a.length;++i){ this.m_editableFilters=this.mergeChildInfo(this.m_editableFilters,_57a[i].filter,"item"); } } } },initializeEditableSliders:function(_57c){ if(typeof this.m_containerInfo!=="undefined"&&this.m_containerInfo!==null){ if(typeof this.m_containerInfo.sliders!=="undefined"){ this.m_editableSliders=this.m_containerInfo.sliders; } if(typeof _57c!=="undefined"){ for(var i=0;i<_57c.length;++i){ this.m_editableSliders=this.mergeChildInfo(this.m_editableSliders,_57c[i].sliders,"name"); } } } },mergeChildInfo:function(_57e,_57f,key){ if(typeof _57f!="undefined"){ if(typeof _57e==="undefined"||_57e===null){ _57e=_57f; }else{ var _581=[]; for(var i=0;i<_57e.length;++i){ _581[_57e[i][key]]=_57e[i]; } for(var j=0;j<_57f.length;++j){ var _584=_57f[j]; if(typeof _581[_584[key]]=="undefined"){ _57e.push(_584); _581[_584.item]=_584; } } } } return _57e; },hasSomethingRendered:function(){ return this.m_bRendered; },render:function(){ var _585=document.getElementById("infoBar"+this.m_id); if(_585===null){ var _586=(this.m_containerInfo&&this.m_containerInfo.displayTypeId==="singleton")?true:false; if(_586&&!this.m_editableFilters&&!this.m_editableSliders){ return; } if(this.m_timingDetails||this.m_editableSorts||this.m_editableFilters||this.m_editableSliders||this.hasPrompts()||this.hasLockedFilters()){ var _587=this.getLayoutElement(); var _588=document.createElement("div"); _588.setAttribute("dir",this.m_cognosViewer.getDirection()==="rtl"?"rtl":"ltr"); _585=document.createElement("div"); _585.className="infoBar"; _585.setAttribute("id","infoBar"+this.m_id); _585.setAttribute("cvid",this.m_cognosViewer.getId()); _585.setAttribute("layoutid",this.m_id); _585.setAttribute("containerid",this.m_layoutIndex); _585.setAttribute("role","region"); _585.setAttribute("aria-label",RV_RES.IDS_JS_REPORT_INFO_TITLE); if(_586){ dojo.style(_585,{opacity:"0.6"}); } _585.appendChild(this.renderHeader()); _585.appendChild(this.renderDetails()); _588.appendChild(_585); _587.parentNode.insertBefore(_588,_587); this.connections.push(dojo.connect(_585,"onkeydown",this,this.onKeyDown)); this.connections.push(dojo.query(".infoBarHeader",_585).connect("onmousedown",this,this.toggle)); this.connections.push(dojo.query(".infoBarLeftIcon",_585).connect("onmousedown",this,this.ignoreEvent)); this.connections.push(dojo.query(".infoBarDetailsText",_585).connect("onmousedown",this,this.ignoreEvent)); this.connections.push(dojo.query(".infoBarLockedItems",_585).connect("onmousedown",this,this.ignoreEvent)); this.m_bRendered=true; if(this.wasInfoBarExpanded(this.m_id)){ this.show(); } } } },renderHeader:function(){ var _589=this.isFilterApplied(); var _58a=this.isSortApplied(); var _58b=document.createElement("div"); _58b.id="infoBarHeader"+this.m_id; _58b.className="infoBarHeaderDiv"; var _58c="
"+this.addHeaderCloseButton()+this.addHeaderNavigationButton(_589,_58a)+this.addHeaderText(_589,_58a)+"
"; _58b.innerHTML=_58c; return _58b; },addHeaderNavigationButton:function(_58d,_58e){ var _58f=RV_RES.IDS_JS_INFOBAR_EXPAND; var _590="infoBarIcon"+(_58d?"Filter":"")+(_58e?"Sort":"")+"Applied"; var _591="infoBarHeaderButton"+this.m_id+" infoBarHeaderText"+this.m_id; return ""; },addHeaderText:function(_592,_593){ var _594=[]; if(_592){ _594.push(RV_RES.IDS_JS_FILTER_APPLIED); } if(_593){ _594.push(RV_RES.IDS_JS_SORT_APPLIED); } return ""+_594.join(", ")+""; },addHeaderCloseButton:function(){ var _595=RV_RES.IDS_JS_INFOBAR_COLLAPSE; var _596=this.m_id+"_collapse"; return ""; },isFilterApplied:function(){ if(this.m_editableFilters||this.m_editableSliders||typeof this.m_containerInfo.lockedFilters!=="undefined"||this.hasPrompts()){ return true; } return false; },isSortApplied:function(){ if(this.m_editableSorts){ return true; } return false; },renderDetails:function(){ var _597=document.getElementById("infoBarFlyout"+this.m_id); var _598=document.getElementById(this.m_id+"instructions"); if(_597===null){ this.getLayoutElement(); _597=document.createElement("div"); _597.setAttribute("id","infoBarFlyout"+this.m_id); _597.setAttribute("cvid",this.m_cognosViewer.getId()); _597.setAttribute("layoutid",this.m_id); _597.setAttribute("containerid",this.m_layoutIndex); _597.className="infoBarFlyout"; _597.style.display="none"; _597.innerHTML="
"+this.addLockedInfoBarDetails()+this.addEditableInfoBarDetails()+this.addRAPTimingDetails()+"
"+this.createHiddenSpan(this.m_id+"_filterString",RV_RES.IDS_JS_FILTER)+this.createHiddenSpan(this.m_id+"_sortString",RV_RES.IDS_JS_SORT)+this.createHiddenSpan(this.m_id+"_promptString",RV_RES.IDS_JS_INFOBAR_PROMPT)+this.createHiddenSpan(this.m_id+"_sliderString",RV_RES.IDS_JS_INFOBAR_SLIDER)+this.createHiddenSpan(this.m_id+"_lockedString",RV_RES.IDS_JS_INFOBAR_LOCKED)+this.createHiddenSpan(this.m_id+"_collapse",RV_RES.IDS_JS_INFOBAR_COLLAPSE)+this.createHiddenSpan(this.m_id+"_delete",RV_RES.IDS_JS_DELETE); this.connections.push(dojo.connect(_597,"onkeydown",this,this.onKeyDown)); this.connections.push(dojo.query(".infoBarDetailRow",_597).forEach(function(item,_59a,_59b){ dojo.attr(item,{"aria-setsize":_59b.length,"aria-posinset":_59a+1}); }).connect("onfocus",function(e){ dojo.query(e.currentTarget).addClass("infoBarDetailRowHover"); }).connect("onblur",function(e){ var el=typeof e.explicitOriginalTarget!=="undefined"?e.explicitOriginalTarget:document.activeElement; if(dojo.hasClass(el,"infoBarDeleteButton")){ return true; } dojo.query(e.currentTarget).removeClass("infoBarDetailRowHover"); }).connect("onmouseover",this,function(e){ this.focusDetailRow(e.currentTarget); })); } if(_598===null){ _598=document.createElement("span"); _598.id=this.m_id+"instructions"; _598.setAttribute("role","presentation"); _598.style.visibility="hidden"; _598.style.display="none"; document.body.appendChild(_598); _598.innerHTML=RV_RES.IDS_JS_INFOBAR_EXPLANATION; } return _597; },addRAPTimingDetails:function(){ if(this.m_timingDetails){ var _5a0=this.m_timingDetails.length-1; var _5a1=this.m_timingDetails[_5a0].time-this.m_timingDetails[0].time; return "
"+""+this.addTimingIcon(_5a1,250,500)+""+""+this.addRAPTimingItemDetails()+"
RAP Total Time: ("+_5a1+")
"; } return ""; },addRAPTimingItemDetails:function(){ var _5a2=""; if(this.m_timingDetails){ for(var _5a3=0;_5a3<=this.m_timingDetails.length-1;++_5a3){ var _5a4=this.m_timingDetails[_5a3]; var _5a5=this.getTimeDiff(_5a3); _5a2+=""; if(_5a4.level){ _5a2+=""+_5a5+":"+html_encode(_5a4.event)+""; }else{ _5a2+=this.addTimingIcon(_5a5,100,500); _5a2+=""; _5a2+=html_encode(_5a4.event); _5a2+=""+_5a5+""; } _5a2+=""; } } return _5a2; },getTimeDiff:function(_5a6){ var _5a7=_5a6+1; if(_5a7>=this.m_timingDetails.length){ return 0; } var _5a8=this.m_timingDetails[_5a6].level; if(!(_5a8==this.m_timingDetails[_5a7].level)){ while(_5a7red){ _5ac="icon_poor_traffic.gif"; }else{ if(_5a9>_5aa){ _5ac="icon_average_traffic.gif"; } } return this.addInfoBarIcon(_5ac,true); },addLockedInfoBarDetails:function(){ if(this.hasPrompts()||typeof this.m_containerInfo.lockedFilters!=="undefined"){ return "
"+this.addPromptDetails()+this.addLockedFilterDetails()+"
"; } return ""; },addEditableInfoBarDetails:function(){ if(this.m_editableFilters||this.m_editableSorts||this.m_editableSliders){ return "
"+this.addFilteredItemsDetails()+this.addSliderDetails()+this.addSortDetails()+"
"; } return ""; },onKeyDown:function(evt){ var _5ae=evt.target; var cvId=this.m_cognosViewer.getId(); var _5b0=document.getElementById("infoBarHeaderButton"+this.m_id); var _5b1=document.getElementById(this.m_id+"instructions"); var node; if(evt.keyCode=="13"){ _5b1.innerHTML=RV_RES.IDS_JS_INFOBAR_EXPLANATION; if(_5ae===_5b0){ this.toggle(); return stopEventBubble(evt); } }else{ if(evt.keyCode=="27"){ var _5b3=this.m_cognosViewer.getA11YHelper(); if(this.m_cognosViewer.getCurrentNodeFocus()){ node=this.m_cognosViewer.getCurrentNodeFocus(); if(node.nodeName.toLowerCase()!="span"){ var _5b4=node.getElementsByTagName("span"); for(var _5b5=0;_5b5<_5b4.length;_5b5++){ if(_5b4[_5b5].style.display!="hidden"){ node=_5b4[_5b5]; break; } } } this.hide(false); _5b3.setFocusToNode(node); }else{ this.hide(); } return stopEventBubble(evt); }else{ if(evt.keyCode=="46"){ if(dojo.hasClass(_5ae,"infoBarDetailRow")){ node=dojo.query("td.infoBarRightIcon",_5ae)[0]; if(typeof node!=="undefined"){ if(_5ae.getAttribute("type")=="filter"){ InfoBarHelper.infoBarRemoveFilter(cvId,this.m_layoutIndex,node.getAttribute("filterItem"),node.getAttribute("details")); }else{ if(_5ae.getAttribute("type")=="sort"){ InfoBarHelper.infoBarRemoveSort(cvId,this.m_layoutIndex,node.getAttribute("sortItem"),node.getAttribute("byLabel")); }else{ if(_5ae.getAttribute("type")=="slider"){ InfoBarHelper.infoBarRemoveSlider(cvId,node.getAttribute("slider")); } } } } } }else{ if(evt.keyCode=="38"){ if(dojo.hasClass(_5ae,"infoBarDetailRow")){ this.focusDetailRow(_5ae,"prev"); }else{ this.focusDetailRow(); } _5b1.innerHTML=""; return stopEventBubble(evt); }else{ if(evt.keyCode=="40"){ if(dojo.hasClass(_5ae,"infoBarDetailRow")){ this.focusDetailRow(_5ae,"next"); }else{ this.focusDetailRow(); } _5b1.innerHTML=""; return stopEventBubble(evt); }else{ if(evt.keyCode=="9"){ var _5b6=document.getElementById("infoBar"+this.m_id); if(dojo.hasClass(_5b6,"infoBarExpanded")){ if(dojo.hasClass(_5ae,"infoBarDetailRow")){ dojo.byId("infoBarHeaderCloseButton"+this.m_id).focus(); }else{ this.focusDetailRow(); } return stopEventBubble(evt); } } } } } } } },focusDetailRow:function(_5b7,dir){ var _5b9=document.getElementById("infoBarFlyout"+this.m_id); var _5ba=document.getElementById("infoBar"+this.m_id); if(!dojo.hasClass(_5ba,"infoBarExpanded")){ return; } if(typeof _5b7=="undefined"||_5b7===null){ var _5bb=dojo.query(".infoBarLockedItems .infoBarDetailRow, .infoBarEditableItems .infoBarDetailRow",_5b9); _5b7=_5bb[0]; } if(_5b7&&dojo.hasClass(_5b7,"infoBarDetailRow")){ var _5bc,rows,len,i; if(dir==="prev"){ if(_5b7.parentNode.previousSibling){ _5bc=_5b7.parentNode.previousSibling.childNodes[1]; }else{ rows=dojo.query(".infoBarDetailRow",_5b9); len=rows.length; if(_5b7===rows[0]){ _5bc=rows[len-1]; }else{ for(i=1;i_5ce){ _5cc=_5ce-5; } _5c3.style.width=_5cc+"px"; dojo.removeClass(_5c4,"BUXNoPrint"); } },_getTextWidth:function(text){ var div=document.createElement("div"); div.className="infoBar infoBarHeader"; div.style.fontWeight="bold"; div.style.position="absolute"; div.style.visibility="hidden"; div.style.height="auto"; div.style.width="auto"; document.body.appendChild(div); div.innerHTML=text; var _5d1=div.clientWidth; document.body.removeChild(div); return _5d1; },hide:function(_5d2){ var _5d3=document.getElementById("infoBar"+this.m_id); if(dojo.hasClass(_5d3,"infoBarExpanded")){ this.updateInfoBarRenderedState(this.m_id,"false"); var _5d4=document.getElementById("infoBarHeader"+this.m_id); var _5d5=document.getElementById("infoBarFlyout"+this.m_id); var _5d6=document.getElementById("infoBarHeaderButton"+this.m_id); dojo.addClass(_5d4,"BUXNoPrint"); dojo.fx.wipeOut({node:_5d5,duration:300,onEnd:dojo.hitch(this,function(){ dojo.removeClass(_5d3,"infoBarExpanded"); dojo.style(_5d3,"width","auto"); if(this.m_containerInfo&&this.m_containerInfo.displayTypeId==="singleton"){ dojo.style(_5d3,{opacity:"0.6"}); } _5d6.setAttribute("title",RV_RES.IDS_JS_INFOBAR_EXPAND); _5d6.childNodes[0].setAttribute("title",RV_RES.IDS_JS_INFOBAR_EXPAND); if(!_5d2){ _5d6.focus(); } })}).play(); } },updateInfoBarRenderedState:function(_5d7,_5d8){ var _5d9=this.m_cognosViewer.getViewerWidget(); if(_5d9){ var _5da=_5d9.getInfoBarRenderedState(); _5da[_5d7]=_5d8; } },wasInfoBarExpanded:function(_5db){ var _5dc=this.m_cognosViewer.getViewerWidget(); if(_5dc){ var _5dd=_5dc.getInfoBarRenderedState(); if(_5dd){ if(_5dd[_5db]){ if("true"===_5dd[_5db]){ return true; } } } } return false; },destroy:function(){ for(var i=0;i"+this.renderHeader(false)+""; var _5f9="
"+this.renderHeader(true)+this.renderDetails()+"
"; _5f9=this.updateHideButtonLabelledBy(_5f9); var _5fa=document.getElementById("annotationInfoBarInstructions"); if(_5fa===null){ _5fa=document.createElement("span"); _5fa.id="annotationInfoBarInstructions"; _5fa.setAttribute("role","presentation"); _5fa.style.visibility="hidden"; _5fa.style.display="none"; var _5fb=this.m_AnnotationInfoBar.createHiddenSpan("annoInfoBarButtonInstruction",RV_RES.IDS_JS_ANNO_INFOBAR_BUTTON_EXPLANATION)+this.m_AnnotationInfoBar.createHiddenSpan("annoInfoBar_filterString",RV_RES.IDS_JS_FILTER)+this.m_AnnotationInfoBar.createHiddenSpan("annoInfoBar_promptString",RV_RES.IDS_JS_INFOBAR_PROMPT)+this.m_AnnotationInfoBar.createHiddenSpan("annoInfoBar_sliderString",RV_RES.IDS_JS_INFOBAR_SLIDER); document.body.appendChild(_5fa); _5fa.innerHTML=_5fb; } return _5f8+_5f9; },renderInJSON:function(){ var _5fc=[]; return _5fc.concat(this.m_AnnotationInfoBar.getPromptDetailsInJSON(),this.m_AnnotationInfoBar.getFilteredItemsDetailsInJSON(),this.m_AnnotationInfoBar.getSliderDetailsInJSON()); },renderHeader:function(_5fd){ var mode=(_5fd)?"Hide":"Show"; var _5ff=(_5fd)?RV_RES.IDS_JS_ANNO_INFOBAR_HIDE:RV_RES.IDS_JS_ANNO_INFOBAR_SHOW; var _600=(_5fd)?("XXREPLACEXX"):" annoInfoBarHeaderControlButtonText"+mode+this.m_id; var _601=""+""+""+""+""+"
"+RV_RES.IDS_JS_FILTER_APPLIED+""+""+"
"; return _601; },renderDetails:function(){ var _602=this.m_AnnotationInfoBar.addPromptDetails(true); var _603=this.m_AnnotationInfoBar.addFilteredItemsDetails(true); var _604=this.m_AnnotationInfoBar.addSliderDetails(true); var _605="
"+_602+_603+_604+"
"; this.m_labelledByHideButton=(_602.length===0)?"":(" annoInfoBar_promptString "+this.m_AnnotationInfoBar.getId()+"0_promptDetail "); this.m_labelledByHideButton+=(_603.length===0)?"":(" annoInfoBar_filterString "+this.m_AnnotationInfoBar.getId()+"0_filterDetail "); this.m_labelledByHideButton+=(_604.length===0)?"":(" annoInfoBar_sliderString "+this.m_AnnotationInfoBar.getId()+"0_sliderDetail annoInfoBar_sliderString "+this.m_AnnotationInfoBar.getId()+"1_sliderDetail "); this.m_labelledByHideButton+=" annoInfoBarHeaderControlButtonTextHide"+this.m_id; return _605; },updateHideButtonLabelledBy:function(_606){ return _606.replace("XXREPLACEXX",this.m_labelledByHideButton); }}); function annotationInfoBarToggle(mId,_608){ var _609=document.getElementById("infoBarHeaderExpanded"+mId); var _60a=document.getElementById("infoBarHeaderCollapsed"+mId); var _60b=null; if("Show"===_608){ dojo.style(_609,{display:""}); dojo.style(_60a,{display:"none"}); _60b=document.getElementById("annoInfoBarHeaderControlHide"+mId); }else{ dojo.style(_60a,{display:""}); dojo.style(_609,{display:"none"}); _60b=document.getElementById("annoInfoBarHeaderControlShow"+mId); } if(_60b){ _60b.focus(); } }; var CV_BACKGROUND_LAYER_ID="CV_BACK"; if(typeof window.gaRV_INSTANCES=="undefined"){ window.gaRV_INSTANCES=[]; } if(!window.gViewerLogger){ window.gViewerLogger={log:function(hint,_60d,type){ },addContextInfo:function(_60f){ }}; } 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,_612){ 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=_612; 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 _613=false; for(var _614=0;_614"; var _646=new ViewerDispatcherEntry(this); _646.addFormField("ui.action","reportAction"); _646.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",_63c); if(this.m_viewerWidget){ this.m_viewerWidget.placeTabControlInView(); } this.dispatchRequest(_646); } }; CCognosViewer.prototype._removeTabContent=function(_647,_648){ var _649=this._findChildWithTabId(_647,_648); while(_649){ _649.parentNode.removeChild(_649); _649=this._findChildWithTabId(_647,_648); } }; CCognosViewer.prototype._findChildWithTabId=function(_64a,_64b){ var _64c=null; for(var i=0;i<_64a.childNodes.length;i++){ var _64e=_64a.childNodes[i]; if(_64e.getAttribute("tabId")==_64b){ _64c=_64e; break; } } return _64c; }; CCognosViewer.prototype.clearTabs=function(){ if(!this.m_bHasTabs){ return; } this.m_tabInfo={}; var _64f=this.getReportDiv(); var _650=_64f.parentNode; for(var i=0;i<_650.childNodes.length;i++){ var node=_650.childNodes[i]; if(node.getAttribute("id")!="CVReport"+this.m_sId){ _650.removeChild(node); i--; } } }; CCognosViewer.prototype.isSavedOutput=function(){ var _653=this.envParams["ui.action"]; return _653==="view"||_653==="buxView"; }; CCognosViewer.prototype.renderSavedOutputIFrame=function(url,_655,_656){ var _657=document.getElementById("CVReport"+this.getId()); var _658=document.createElement("iframe"); _658.style.width="100%"; _658.style.height="99%"; _658.id="CVIFrame"+this.getId(); _658.title=_655; _658.setAttribute("frameBorder","0"); _657.appendChild(_658); var obj=this; var func=function(){ obj.renderTabs(); }; setTimeout(function(){ if(_656){ if(_658.attachEvent){ _658.attachEvent("onload",func); }else{ _658.addEventListener("load",func,true); } } _658.src=url; },1); }; CCognosViewer.prototype.updatePageState=function(_65b){ if(_65b&&this.getState()){ this.getState().setPageState(_65b); } }; CCognosViewer.prototype.getPageInfo=function(){ if(this.m_viewerState&&this.m_viewerState.getPageState()){ var _65c=this.m_viewerState.getPageState(); return {"currentPage":_65c.getCurrentPage(),"pageCount":_65c.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(_663){ this.m_retryDispatcherEntry=_663; }; 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(_664){ this.m_faultDispatcherEntry=_664; }; CCognosViewer.prototype.getFaultDispatcherEntry=function(){ return this.m_faultDispatcherEntry; }; CCognosViewer.prototype.dispatchRequest=function(_665){ this.setFaultDispatcherEntry(null); this.getViewerDispatcher().dispatchRequest(_665); }; 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(_666){ var _666=this.getActionFactory().load(_666); _666.setCognosViewer(this); return _666; }; CCognosViewer.prototype.getCalculationCache=function(){ return this.m_calculationCache; }; CCognosViewer.prototype.updateOutputForA11ySupport=function(){ this.updateBorderCollapse(); if(this.getA11YHelper()){ this.getA11YHelper().addLabelledByForItemsOutsideOfContainers(); } var _667=navigator.userAgent.toLowerCase(); var _668=_667.indexOf("iphone")!=-1; var _669=_667.indexOf("ipod")!=-1; var _66a=_667.indexOf("ipad")!=-1; var _66b=_668||_669||_66a; var _66c=_667.indexOf("android")!=-1; if(_66b||_66c){ 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 _66d=document.createElement("div"); _66d.id=this.m_sId+"hc"; _66d.style.border="1px solid"; _66d.style.borderColor="red green"; _66d.style.height="10px"; _66d.style.top="-999px"; _66d.style.position="absolute"; document.body.appendChild(_66d); var _66e=null; if(isIE()){ _66e=_66d.currentStyle; }else{ _66e=_66d.ownerDocument.defaultView.getComputedStyle(_66d,null); } if(!_66e){ return; } this.m_bHighContrast=_66e.borderTopColor==_66e.borderRightColor; document.body.removeChild(_66d); } }; 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 _66f=null; if(this.envParams["ui.action"]=="view"&&!this.isBux){ var _670=document.getElementById("CVIFrame"+this.getId()); _66f=_670.contentWindow.document; }else{ _66f=document.getElementById("CVReport"+this.getId()); } var _671=_66f.getElementsByTagName("table"); for(var i=0;i<_671.length;i++){ if(_671[i].style.borderCollapse=="collapse"){ _671[i].style.borderCollapse="separate"; } } } }; CCognosViewer.prototype.isAccessibleMode=function(){ if(this.m_bAccessibleMode==true){ return true; } return false; }; CCognosViewer.prototype.isSinglePageReport=function(){ for(var _673 in this.m_aSecRequests){ if(this.m_aSecRequests[_673]=="nextPage"||this.m_aSecRequests[_673]=="previousPage"){ return false; } } return true; }; CCognosViewer.prototype.hasNextPage=function(){ for(var _674 in this.m_aSecRequests){ if(this.m_aSecRequests[_674]=="nextPage"){ return true; } } return false; }; CCognosViewer.prototype.hasPrevPage=function(){ for(var _675 in this.m_aSecRequests){ if(this.m_aSecRequests[_675]=="previousPage"){ return true; } } return false; }; CCognosViewer.prototype.captureHotkeyPageNavigation=function(evt){ evt=(evt)?evt:((event)?event:null); if(evt){ var node=getNodeFromEvent(evt); var _678=(node&&node.nodeName)?node.nodeName.toLowerCase():null; if((evt.keyCode==8&&_678!="input"&&_678!="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(_679){ this.m_bUseWorkingDialog=_679; }; 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(_67a){ if(!_67a){ this.preProcessControlArray=[]; } this.m_bReportHasPrompts=_67a; }; CCognosViewer.prototype.getHasPrompts=function(){ return this.m_bReportHasPrompts; }; CCognosViewer.prototype.setUsePageRequest=function(_67b){ this.m_viewerDispatcher.setUsePageRequest(_67b); }; CCognosViewer.prototype.getUsePageRequest=function(){ return this.m_viewerDispatcher.getUsePageRequest(); }; CCognosViewer.prototype.setKeepSessionAlive=function(_67c){ this.m_bKeepSessionAlive=_67c; }; 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 _67d; try{ _67d=getCognosViewerSCObjectRef(this.m_sId); } catch(e){ _67d=null; } return _67d; }; CCognosViewer.prototype.addCallback=function(_67e,oFct,_680){ if(!this.m_aCallback){ this.m_aCallback=[]; } this.m_aCallback=this.m_aCallback.concat({m_sEvent:_67e,m_oCallback:oFct,m_bCaptureEvent:(_680===true)}); }; CCognosViewer.prototype.canDrillDown=function(sId){ var sCtx=this.findCtx(sId).split("::")[0]; if(sCtx){ var _683=this.getSelectionController(); if(_683){ return (_683.canDrillDown(sCtx)); } } return false; }; CCognosViewer.prototype.canDrillUp=function(sId){ var sCtx=this.findCtx(sId).split("::")[0]; if(sCtx){ var _686=this.getSelectionController(); if(_686){ return (_686.canDrillUp(sCtx)); } } return false; }; CCognosViewer.prototype.canSubmitPrompt=function(){ var _687=null; if(this.preProcessControlArray&&this.preProcessControlArray instanceof Array){ var _688=this.preProcessControlArray.length; for(var k=0;k<_688;k++){ _687=eval(this.preProcessControlArray[k]); if(_687.isValid()===false){ if(!this.m_reportRenderingDone||!_687.getCascadeOnParameter||!_687.getCascadeOnParameter()){ return false; } } } } return true; }; CCognosViewer.prototype.closeContextMenuAndToolbarMenus=function(){ if(this.rvMainWnd){ this.rvMainWnd.closeContextMenuAndToolbarMenus(); } }; CCognosViewer.prototype.dcm=function(_68a,_68b){ if(this.canDisplayContextMenu()){ if(this.preSelectNode==true){ _68b=false; this.preSelectNode=false; } if(this.rvMainWnd.displayContextMenu(_68a,_68b)!=false){ return stopEventBubble(_68a); } } }; 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(_68c){ var _68d=this.getDrillMgr(); if(_68d){ _68d.singleClickDrillEvent(_68c,"RV"); } }; CCognosViewer.prototype.debug=function(sMsg){ if(this.m_bDebug){ var _68f=""; var _690=this.debug.caller; if(typeof _690=="object"&&_690!==null){ _68f=_690.toString().match(/function (\w*)/)[1]; } if(!_68f){ _68f="?"; } alert(_68f+": "+sMsg); } }; CCognosViewer.prototype.callbackExists=function(_691){ var _692=false; if(this.m_aCallback&&this.m_aCallback.length){ for(var _693=0;_6931&&_6cb<_6ce.length){ aIds=_6ce[_6cb].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 _6d5=aCtx[0][0]; var _6d6=this.getSelectionController(); if(_6d6){ if(_6d6.isContextId(_6d5)){ sCtx=sId; } } } if(!sCtx){ var _6d7=this.findElementWithCtx(sId); if(_6d7){ sCtx=_6d7.getAttribute("ctx"); } } return sCtx; }; CCognosViewer.prototype.findElementWithCtx=function(sId){ var _6d9=sId; if(typeof sId=="string"){ _6d9=this.findElementWithCtx(document.getElementById(sId)); } if(_6d9){ if(_6d9.getAttribute&&_6d9.getAttribute("ctx")){ return _6d9; } for(var _6da=0;_6da<_6d9.childNodes.length;_6da++){ var _6db=this.findElementWithCtx(_6d9.childNodes[_6da]); if(_6db){ return _6db; } } } return null; }; CCognosViewer.prototype.getUseValue=function(sId){ var sVal=null; var sCtx=this.findCtx(sId).split("::")[0]; if(sCtx){ var _6df=this.getSelectionController(); if(_6df){ sVal=_6df.getUseValue(sCtx); } } return sVal; }; CCognosViewer.prototype.init=function(_6e0){ if(_6e0&&typeof _6e0=="object"){ for(var _6e1 in _6e0){ this[_6e1]=_6e0[_6e1]; } } }; CCognosViewer.prototype.initViewer=function(_6e2){ var _6e3=new RequestHandler(this); var _6e4=document.getElementById("formBackJax"+this.getId()); if(_6e4&&typeof _6e4.state!="undefined"&&_6e4.state.value.length>0){ _6e3.loadReportHTML(_6e4.result.value); var _6e5=eval("("+_6e4.state.value+")"); _6e3.updateViewerState(_6e5); _6e3.postComplete(); }else{ if(this.getUsePageRequest()){ var _6e6=_6e2?_6e2.m_sStatus:null; if(isIE()){ if(window.location.hash=="#working"){ window.history.go(-2); return; }else{ if(_6e6==="working"||_6e6==="stillWorking"){ window.location.hash="#working"; } } }else{ if(_6e4&&_6e4.working){ if(_6e4.working.value=="true"){ window.history.go(-1); return; }else{ if(_6e6==="working"||_6e6==="stillWorking"){ _6e4.working.value="true"; } } } } } _6e3.processInitialResponse(_6e2); } }; CCognosViewer.prototype.saveBackJaxInformation=function(_6e7){ var _6e8=document.getElementById("formBackJax"+this.getId()); if(_6e8){ if(typeof _6e8.state!="undefined"){ _6e8.state.value=_6e7.getResponseStateText(); } if(typeof _6e8.result!="undefined"){ _6e8.result.value=_6e7.getResult(); } } }; CCognosViewer.prototype.pcc=function(evt){ if(evt&&typeof evt.button!="undefined"&&evt.button!="1"){ this.preSelectNode=true; var _6ea=this.getSelectionController(); if(_6ea){ _6ea.pageContextClicked(evt); } } }; CCognosViewer.prototype.isValidAjaxResponse=function(_6eb){ return (_6eb&&_6eb.childNodes&&_6eb.childNodes.length>0&&_6eb.childNodes[0].nodeName!="parsererror"?true:false); }; CCognosViewer.prototype.resubmitInSafeMode=function(_6ec){ if(this.m_bUseSafeMode){ this.resetViewerDispatcher(); this.setUsePageRequest(true); this.envParams["cv.useAjax"]="false"; if(_6ec){ _6ec.retryRequest(); } } }; CCognosViewer.prototype.showLoadedContent=function(_6ed){ if(_6ed!==null&&typeof _6ed!="undefined"){ _6ed.style.display="block"; } this.m_resizeReady=true; this.doneLoading(); var obj=this; setTimeout(function(){ obj.renderTabs(); },1); }; CCognosViewer.prototype.doneLoading=function(){ var _6ef=this.getViewerWidget(); if(_6ef){ if(window.IBM&&window.IBM.perf){ window.IBM.perf.log("viewer_doneLoading",this); } var _6f0=this.getStatus(); if(!this.m_reportRenderingDone&&this.m_resizeReady&&this.m_stateSet){ var _6f1=_6f0=="working"||_6f0=="stillWorking"||_6f0=="fault"; _6ef.fireEvent("com.ibm.bux.widget.render.done",null,{noAutoResize:_6f1}); if(_6f0=="complete"){ if(window.IBM&&window.IBM.perf){ window.IBM.perf.log("viewer_doneLoading",this); } if(typeof _6ef.postLoadContent=="function"){ _6ef.postLoadContent(); } this.m_reportRenderingDone=true; if(!_6f1){ var _6f2=this; setTimeout(function(){ _6f2.m_readyToRespondToResizeEvent=true; },20); } } } if(_6f0!="fault"){ _6ef.clearErrorDlg(); } this.doneLoadingUpdateA11Y(_6f0); }else{ var _6f0=this.getStatus(); if(_6f0=="complete"){ this.m_reportRenderingDone=true; this.JAWSTalk(RV_RES.IDS_JS_READY); }else{ if(_6f0=="working"){ this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING); } } } }; CCognosViewer.prototype.doneLoadingUpdateA11Y=function(_6f3){ if(this.getKeepFocus()!==false&&this.getKeepFocus()!=null){ var _6f4=this.getKeepFocus(); if(_6f3=="complete"){ this.setKeepFocus(false); } var _6f5=null; if(this.getVisibleDialog()!==null){ _6f5=this.getVisibleDialog().getDialogDiv(); }else{ if(_6f4===true){ _6f5=document.getElementById("CVReport"+this.getId()); }else{ if(typeof _6f4=="string"){ _6f5=document.getElementById(_6f4); }else{ if(_6f4!==null){ _6f5=_6f4; if(this.isBux){ dojo.window.scrollIntoView(_6f5); } } } } } if(_6f5){ setFocusToFirstTabItem(_6f5); } if(_6f3=="complete"){ this.JAWSTalk(RV_RES.IDS_JS_READY); }else{ if(_6f3=="working"||_6f3=="stillWorking"){ this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING); } } } }; CCognosViewer.prototype.JAWSTalk=function(_6f6){ 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(_6f6)); var _6f9=document.getElementById("RVContent"+id); if(_6f9){ _6f9.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 _6fa=this.getAdvancedServerProperty("VIEWER_JS_EXPAND_COLLAPSE_CONTROLS_DEFAULT"); if(_6fa===null){ return false; } var _6fb=this.getViewerWidget().getProperties().getShowExpandCollapseIconFlag(); return (_6fa.toLowerCase()==="on"&&_6fb!==false)||(_6fa.toLowerCase()==="off"&&_6fb===true); }; CCognosViewer.prototype.setMaxContentSize=function(){ if("10"!=window.getIEVersion()){ return; } if(document.body.className==="viewer"){ var _6fc=document.body.offsetHeight; var _6fd=this.getNonReportHeight(document.getElementById("CVReport"+this.getId())); var _6fe=document.getElementById("mainViewerTable"+this.getId()); _6fe.style.maxHeight=_6fc-_6fd-2+"px"; var _6ff=GUtil.generateCallback(this.setMaxContentSize,[true],this); if(!this.attachedOnResize){ this.attachedOnResize=true; if(window.attachEvent){ window.attachEvent("onresize",_6ff); }else{ if(window.addEventListener){ window.addEventListener("resize",_6ff,false); } } } } }; CCognosViewer.prototype.getNonReportHeight=function(node){ var _701=0; var _702=node.parentNode; if(!_702){ return _701; } if(_702.childNodes.length>1){ for(var i=0;i<_702.childNodes.length;i++){ var _704=_702.childNodes[i]; if(_704!=node&&!isNaN(_704.clientHeight)&&_704.style.display!="none"){ _701+=_704.clientHeight; } } } if(node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){ _701+=this.getNonReportHeight(_702); } return _701; }; CCognosViewer.prototype.addPageAdornments=function(){ this.m_layoutElements=null; this.m_lidToElement=null; this.initFlashCharts(); this.insertSortIconsForAllLists(); var _705=this.getViewerWidget().getProperties(); if(this.canInsertExpandIconsForAllCrosstabs()){ this.insertExpandIconsForAllCrosstabs(); } var _706=document.getElementById("CVReport"+this.getId()); if(_706){ var oCV=this; setTimeout(function(){ if(oCV.getPinFreezeManager()&&oCV.getPinFreezeManager().hasFrozenContainers()){ oCV.getPinFreezeManager().renderReportWithFrozenContainers(_706); } oCV.addInfoBar(); },1); } this.getViewerWidget().reselectSelectionFilterObjects(); this.getViewerWidget().addChromeWhitespaceHandler(this.getId()); }; CCognosViewer.prototype.addFlashChart=function(_708){ this.m_flashChartsObjectIds.push(_708); }; CCognosViewer.prototype.flashChartError=function(_709){ var _70a=this.getViewerWidget(); var _70b=_70a.getProperties(); _70b.setProperty("flashCharts",false); var _70c=this.getAction("Redraw"); _70c.isUndoable=function(){ return false; }; _70c.execute(); }; CCognosViewer.prototype.initFlashCharts=function(){ var _70d=this.getViewerWidget(); if(this.m_flashChartsObjectIds.length>0){ var _70e=document.getElementById("rt"+this.getId()); if(window.addEventListener){ _70e.addEventListener("mousedown",onFlashChartRightClick,true); }else{ var _70f={}; var _710=function(){ this.releaseCapture(); }; var _711=function(){ onFlashChartRightClick(event); this.setCapture(); }; for(var i=0;i0){ _70e.attachEvent("oncontextmenu",function(){ if(_70f[window.event.srcElement.id]){ return false; } }); } } if(_70d){ _70d.fireEvent("com.ibm.bux.widget.setShowBordersWhenInnactive",null,true); } }else{ if(_70d){ _70d.fireEvent("com.ibm.bux.widget.setShowBordersWhenInnactive",null,false); } } }; CCognosViewer.prototype.initializeLayoutElements=function(){ var _715=document.getElementById("rt"+this.getId()); var _716=getElementsByAttribute(_715,"*","lid"); this.m_lidToElement={}; this.m_layoutElements=[]; var _717=0; var _718=this.getPinFreezeManager(); for(var i=0;i<_716.length;i++){ var e=_716[i]; if(!_718||!_718.getContainerElement(e)||_718.isElementInMainOutput(e)){ this.m_layoutElements[_717]=e; this.m_lidToElement[e.getAttribute("lid")]=e; _717++; } } }; CCognosViewer.prototype.getLayoutElement=function(_71b){ if(!this.m_layoutElements){ this.initializeLayoutElements(); } if(this.m_layoutElements){ return this.m_layoutElements[_71b]; } 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 _71d=this.getRAPReportInfo(); if(_71d){ var _71e=document.getElementById("rt"+this.getId()); this.initializeLayoutElements(); var _71f=[]; this.m_aInfoBar=[]; for(var _720=0;_720-1){ lid=lid.substring(8); } lid=lid.substring(0,lid.indexOf(this.getId())); } var _723=_71d.getContainer(lid); if(_723&&typeof _723.parentContainer=="undefined"){ var _724=this.collectChildContainers(_723.container); if(this.getPinFreezeManager()){ oPinFreezeContainerElement=this.getPinFreezeManager().getContainerElement(_721); _721=(oPinFreezeContainerElement)?oPinFreezeContainerElement:_721; } var _725=new InfoBar(this,_721,_723,_724,_720); _725.setTimingDetails(_71d._getEventTimings()); _725.render(); if(_725.hasSomethingRendered()){ _71f.push(_725.getId()); } this.m_aInfoBar.push(_725); } } var _726=this.getViewerWidget(); if(_726){ _726.refreshInfoBarRenderedState(_71f); } } }; CCognosViewer.prototype.collectChildContainers=function(_727){ var _728=[]; var _729=this.getRAPReportInfo(); if(_729){ var _72a=_729.getContainerCount(); for(var cidx=0;cidx<_72a;++cidx){ var _72c=_729.getContainerFromPos(cidx); if(typeof _72c.parentContainer!="undefined"&&_72c.parentContainer==_727){ _728.push(_72c); } } } return _728; }; CCognosViewer.prototype.addReportInfo=function(){ var _72d=this.getViewerWidget(); if(typeof _72d==="undefined"||_72d===null){ return; } if(!_72d.getAttributeValue("originalReport")||this.isIWidgetMobile()){ return; } var _72e=this.envParams["baseReportModificationTime"]; var _72f=_72d.getAttributeValue("baseReportModificationTime"); if(typeof _72e!=="undefined"&&typeof _72f!=="undefined"&&_72f&&_72f!=""&&_72e!==_72f){ var cvid=this.getId(); var _731=document.getElementById("CVReport"+cvid); var _732=_731.parentNode; var id="ReportInfo"+cvid; var _734=document.createElement("div"); _734.setAttribute("id",id+"_container"); _734.setAttribute("cvid",cvid); _734.className="new-info-indicator BUXNoPrint"; var _735=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"; } _735.src=this.getWebContentRoot()+img; _735.className="reportInfoIcon"; _735.setAttribute("tabIndex","0"); _735.setAttribute("alt",""); _735.setAttribute("title",""); _735.setAttribute("role","presentation"); var _737=RV_RES.IDS_JS_REPORT_INFO_TITLE; var _738=RV_RES.IDS_JS_REPORT_INFO_TEXT; var _739=RV_RES.IDS_JS_REPORT_INFO_LINK_TEXT; _734.appendChild(_735); _732.insertBefore(_734,_731); this.m_reportInfoTooltip=new bux.reportViewer.ReportInfo({connectId:[id+"_container"],focusElement:_735,position:["above","below"],title:_737,text:_738,linkText:_739,linkScript:getCognosViewerObjectRefAsString(cvid)+".reportInfoResetReport();",allowMouseOverToolTip:true}); } }; CCognosViewer.prototype.reportInfoResetReport=function(){ this.executeAction("ResetToOriginal"); }; CCognosViewer.prototype.hideReportInfo=function(){ var _73a=document.getElementById("ReportInfo"+this.getId()+"_container"); if(typeof _73a!=="undefined"&&_73a!==null){ _73a.style.visibility="hidden"; } }; CCognosViewer.prototype.insertSortIcons=function(){ var _73b=this.envParams?this.envParams.limitedInteractiveMode:true; if(typeof _73b==="undefined"||_73b===true){ return; } if(this.envParams["ui.action"]==="run"||this.envParams["ui.primaryAction"]==="run"){ this.insertSortIconsForAllLists(); } }; CCognosViewer.prototype._getContainers=function(_73c){ var _73d=[]; var _73e="",_73f=""; if(_73c==="list"){ _73e="list"; _73f="ls"; }else{ if(_73c==="crosstab"){ _73e="crosstab"; _73f="xt"; } } var _740=document.getElementById("CVReport"+this.getId()); if(this.getRAPReportInfo()){ var _741=this.getRAPReportInfo().getContainerIds(_73e); for(var i=0;i<_741.length;++i){ var _743=getElementsByAttribute(_740,"table","lid",_741[i]+this.getId(),1); if(_743&&_743.length>0){ _73d.push(_743[0]); } } }else{ _73d=getElementsByClassName(_740,"table",_73f); } return _73d; }; CCognosViewer.prototype.insertSortIconsForAllLists=function(){ var _744=this._getContainers("list"); for(var i=0;i<_744.length;++i){ this.insertSortIconsToList(_744[i]); } }; CCognosViewer.prototype.insertSortIconsToList=function(_746){ var _747=getElementsByAttribute(_746,"*","type","columnTitle"); for(var i=0;i<_747.length;++i){ var _749=_747[i]; this.getSelectionController().getSelectionObjectFactory().getSelectionObject(_749); if(_749.getAttribute("canSort")!="false"&&_749.getAttribute("CTNM")===null&&_749.getAttribute("CC")===null){ var _74a=false; for(var _74b=0;_74b<_749.childNodes.length;_74b++){ var _74c=_749.childNodes[_74b]; if(_74c.nodeName.toLowerCase()=="img"){ if(_74c.id&&_74c.id.indexOf("sortimg")===0){ _74a=true; break; } var sLid=_74c.getAttribute("lid"); if(sLid&&sLid.indexOf("SortIcon")!==-1){ _749.removeChild(_74c); break; } } } if(!_74a&&this.canInsertSortIcon(_749)){ this.insertSortIconToColumnHeader(_749); } } } }; 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(_74f){ var _750=_74f.getAttribute("rp_sort"); return ((!this.isLimitedInteractiveMode()&&!this.isBlacklisted("Sort"))||(_750!==undefined&&_750!==null&&_750.length>0)); }; CCognosViewer.prototype.insertSortIconToColumnHeader=function(_751){ if(!_751.style.whiteSpace){ _751.style.whiteSpace="nowrap"; } var _752=document.createElement("img"); _752.setAttribute("id","sortimg"+Math.random()); if((!this.isLimitedInteractiveMode()&&!this.isBlacklisted("Sort"))){ _752.onmouseover=function(){ this.setAttribute("oldClassName",this.className); this.className+=" sortIconOver"; }; _752.onmouseout=function(){ this.className=this.getAttribute("oldClassName"); this.removeAttribute("oldClassName"); }; } _752.src=this.getImgSrc(_751); var _753=this.getSortInfo(_751); var _754=this.getSortOrder(_753); _752.setAttribute("alt",this.getSortAltText(_754)); _752.setAttribute("title",this.getSortAltText(_754)); _752.className=this.getSortClass(_753); _752.setAttribute("sortOrder",_754); _751.appendChild(_752); }; CCognosViewer.prototype.canInsertShowExpandCollapseIconForNode=function(_755,_756){ var _757=this.getSelectionController(); var _758=_757.hasCalculationMetadata(_756,[_756],"crosstab"); return ((_757.canDrillDown(_756)||_755.alwaysCanExpandCollapse)&&!_757.isCalculationOrMeasure(_756,_758)); }; CCognosViewer.prototype.insertExpandIconsForAllCrosstabs=function(){ var _759=this._getContainers("crosstab"); var _75a=this; var _75b=this.getRAPReportInfo(); var _75c=this.getReportContextHelper(); for(var i=0;i<_759.length;i++){ var _75e=_759[i]; var _75f=_75e.getAttribute("lid"); _75f=_75f.substring(0,_75f.length-this.getId().length); var _760=getElementsByAttribute(_75e,["td","th"],"ctnm","true"); for(var j=0;j<_760.length;j++){ var _762=_760[j]; var sCtx=this.findCtx(_762); var _764=_75c.getDataItemName(sCtx); if(_764){ var _765=_75b.getItemInfo(_75f,_764); var _766=_75c.processCtx(sCtx); if(this.canInsertShowExpandCollapseIconForNode(_765,_766[0][0])){ var sMun=_75c.getMun(sCtx); var _768=sMun&&_765.expandedMembers&&_765.expandedMembers[sMun]===true; var _769=document.createElement("div"); _769.setAttribute("skipSelection","true"); _769.className="expandButton "+(_768?"collapse":"expand"); _762.insertBefore(_769,_762.firstChild); var _76a=document.createElement("span"); _76a.className="expandButtonCaption"; _76a.innerHTML=(_768?"[-]":"[+]"); _769.appendChild(_76a); } } } } }; CCognosViewer.prototype.removeExpandIconsForAllCrosstabs=function(){ var _76b=this._getContainers("crosstab"); for(var i=0;i<_76b.length;i++){ var _76d=_76b[i]; var _76e=_76d.getAttribute("lid"); _76e=_76e.substring(0,_76e.length-this.getId().length); var _76f=getElementsByAttribute(_76d,"td","ctnm","true"); for(var j=0;j<_76f.length;j++){ var _771=_76f[j]; if(_771.firstChild.className==="expandButton collapse"||_771.firstChild.className==="expandButton expand"){ _771.removeChild(_771.firstChild); } } } }; CCognosViewer.prototype.fillInContextData=function(){ if(!this.isLimitedInteractiveMode()){ var _772=document.getElementById("CVReport"+this.getId()); var _773=getElementsByClassName(_772,"table","ls"); for(var i=0;i<_773.length;++i){ var _775=getElementsByAttribute(_773[i],"*","type","columnTitle"); for(var j=0;j<_775.length;++j){ this.getSelectionController().getSelectionObjectFactory().getSelectionObject(_775[j]); } } } }; CCognosViewer.prototype.getSortAltText=function(_777){ if(_777==="ascending"){ return RV_RES.IDS_JS_SORT_ASCENDING; }else{ if(_777==="descending"){ return RV_RES.IDS_JS_SORT_DESCENDING; }else{ if(_777==="nosort"){ return RV_RES.IDS_JS_NOT_SORTED; } } } }; CCognosViewer.prototype.getSortInfo=function(_778){ var _779=_778.getAttribute("rp_sort"); if(_779){ _779=_779.split("."); } return _779; }; CCognosViewer.prototype.getSortClass=function(_77a){ var _77b="sortIconHidden"; if(_77a){ if(_77a[0]==="d"||_77a[0]==="a"){ _77b="sortIconVisible"; } } return _77b; }; CCognosViewer.prototype.getSortOrder=function(_77c){ var _77d="nosort"; if(_77c){ if(_77c[0]==="d"){ _77d="descending"; }else{ if(_77c[0]==="a"){ _77d="ascending"; } } } return _77d; }; CCognosViewer.prototype.getImgSrc=function(_77e){ var _77f=_77e.getAttribute("rp_sort"); var src=this.getWebContentRoot()+"/rv/images/"+this.getSortIconName(_77f); return src; }; CCognosViewer.prototype.getSortIconName=function(_781){ var _782="sort_no.gif"; if(_781){ _781=_781.split("."); if(_781[0]==="d"){ _782="sort_descending.gif"; }else{ if(_781[0]==="a"){ _782="sort_ascending.gif"; } } } return _782; }; 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 _783=this.getViewerWidget(); return (_783&&_783.promptParametersRetrieved==true&&this.envParams&&typeof this.envParams["reportPrompts"]!="undefined"&&this.envParams["reportPrompts"]!=null&&this.envParams["reportPrompts"].length>0); }; CCognosViewer.prototype.getPromptParametersInfo=function(){ var _784=null; if(this.widgetHasPromptParameters()){ _784=""+sXmlEncode(this.getExecutionParameters())+""+this.envParams["reportPrompts"]+""; } return _784; }; CCognosViewer.prototype.raisePromptEvent=function(_785,_786,_787){ try{ var _788=this.getViewerWidget(); _788.getWidgetContextManager().raisePromptEvent(_785,_786,_786.get("ui.action"),this.getModelPath(),_787); } catch(e){ } }; CCognosViewer.prototype.getModelPath=function(){ var _789=this.getSelectionController().getModelPathForCurrentSelection(); if(_789){ return _789; }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(_78a){ this._keepFocus=_78a; }; CCognosViewer.prototype.getKeepFocus=function(){ if(typeof this._keepFocus!="undefined"){ return this._keepFocus; } return false; }; CCognosViewer.prototype.onFocus=function(evt){ var _78c=this.getA11YHelper(); if(_78c){ _78c.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 _78e=this.getStatus(); var _78f=document.getElementById("cvSkipToReport"+this.getId()); if(_78f){ _78f.style.display=_78e=="prompting"?"none":""; } }; CCognosViewer.prototype.updateSkipToNavigationLink=function(_790){ var _791=document.getElementById("cvSkipToNavigation"+this.getId()); if(_791){ _791.style.display=_790?"none":""; } }; CCognosViewer.prototype.pageAction=function(_792){ this.setKeepFocus("CVNavLinks"+this.getId()); var _793=new ViewerDispatcherEntry(this); _793.addFormField("ui.action",_792); if(this.getCurrentlySelectedTab()){ _793.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",this.getCurrentlySelectedTab()); } this.dispatchRequest(_793); }; CCognosViewer.prototype.writeNavLink=function(_794,_795,_796,_797){ var _798=""; if(_796){ _798=""+"\"\""+""+""; if(_797){ _798+=""; }else{ _798=""+"\"\""+""+"LINK_TEXT "; } var sImg=this.sSkin+(!_796&&_794.sImgDisabled?_794.sImgDisabled:_794.sImg); return _798.replace(/LINK_REQUEST/g,_795).replace(/LINK_TEXT/g,_794.sText).replace(/LINK_IMG/g,sImg); }; CCognosViewer.prototype.loadNavLinks=function(){ var _79a=window.gScriptLoader.loadFile(this.getGateway(),"b_action=xts.run&m=portal/report-viewer-navlinks.xts"); if(_79a){ this.init(eval("("+_79a+")")); } }; CCognosViewer.prototype.writeNavLinks=function(sSR,_79c){ var _79d=document.getElementById("CVNavLinks"+this.getId()); if(_79d){ var _79e=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)){ _79d.style.display="none"; if(_79e){ _79e.style.display="none"; } this.updateSkipToNavigationLink(true); return; } this.updateSkipToNavigationLink(false); if(_79e){ _79e.style.display=""; } _79d.style.display=(isIE()?"block":"table-cell"); var _79f=""; _79f+=""; _79f+=this.writeNavLink(this.oNavLinks.oFirst,"firstPage",sSR.match(/\bfirstPage\b/gi),_79c); _79f+=this.writeNavLink(this.oNavLinks.oPrevious,"previousPage",sSR.match(/\bpreviousPage\b/gi),_79c); _79f+=this.writeNavLink(this.oNavLinks.oNext,"nextPage",sSR.match(/\bnextPage\b/gi),_79c); _79f+=this.writeNavLink(this.oNavLinks.oLast,"lastPage",sSR.match(/\blastPage\b/gi),_79c); _79f+="
"; var _7a0=document.getElementById("CVNavLinks_label"+this.getId()); var _7a1=""; if(_7a0){ _7a1+=""+_7a0.innerHTML+""; } _79d.innerHTML=_7a1+_79f; }else{ if(this.shouldWriteNavLinks()){ setTimeout(getCognosViewerObjectRefAsString(this.getId())+".writeNavLinks(\""+sSR+"\",\""+_79c+"\");",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 _7a5=this.getActiveRequest(); if(_7a5){ _7a5.abortHttpRequest(); } }; CCognosViewer.prototype.canCancel=function(){ var _7a6=this.getTracking(); var _7a7=this.getStatus(); return _7a6!=""&&_7a7!="complete"; }; CCognosViewer.prototype.cancel=function(_7a8){ if(this.getWorkingDialog()&&this.getWorkingDialog().disableCancelButton){ this.getWorkingDialog().disableCancelButton(_7a8); } this.removeTransparentBackgroundLayer(); this.clearPrompts(); if(this.m_viewerFragment&&this.envParams["fragment.fireEventWhenComplete"]){ this.envParams["fragment.fireEventWhenComplete"]=""; } var _7a9=null; if(this.m_undoStack.length>0){ _7a9=this.m_undoStack.pop(); } var _7aa=this.getActiveRequest(); if(this.canCancel()===true||_7aa){ if(_7aa){ _7aa.cancelRequest(true); }else{ var _7ab=null; var _7ac=_7a9!=null&&_7a9.m_bRefreshPage; if(typeof this.getCancelDispatcherEntry=="function"){ _7ab=this.getCancelDispatcherEntry(); }else{ if(_7ac||this.m_viewerFragment){ _7ab=new ViewerDispatcherEntry(this); }else{ if(this.getId()=="RS"){ _7ab=new ViewerDispatcherEntry(this); _7ab.addFormField("cv.responseFormat","rs"); }else{ _7ab=new DispatcherEntry(this); _7ab.addFormField("cv.responseFormat","successfulRequest"); } } } _7ab.forceSynchronous(); _7ab.addFormField("ui.action","cancel"); _7ab.addFormField("m_tracking",this.getTracking()); this.setTracking(""); if(_7ac){ var _7ad=""; _7ad+=_7a9.m_sConversation; _7ad+=""; _7ab.addFormField("cv.previousSession",_7ad); } this.dispatchRequest(_7ab); if(!this.isBux&&!this.m_viewerFragment&&(this.getUsePageRequest()||!this.isReportRenderingDone())){ this.executeCallback("cancel"); } } this.setStatus("complete"); var _7ae=this.envParams["ui.action"]; var _7af=this.getUsePageRequest(); var _7b0=this.m_undoStack.length; if(_7a9!=null){ this.m_sConversation=_7a9.m_sConversation; this.m_sParameters=_7a9.m_sParameters; this.envParams={}; applyJSONProperties(this.envParams,_7a9.m_envParams); this.m_undoStack.push(_7a9); } this.setTracking(""); if(this.previouslySelectedTab){ this.cancelTabSwitch(); }else{ if(_7ae!="view"&&_7b0<=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 _7b1=this.preProcessControlArray.length; var k=0; for(k=0;k<_7b1;k++){ var _7b3=eval(this.preProcessControlArray[k]); if(_7b3){ if(_7b3.clearSubmit){ _7b3.clearSubmit(); } } } } }; CCognosViewer.prototype.wait=function(){ if(this.isWorking()){ this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING); var _7b4=new ViewerDispatcherEntry(this); _7b4.addFormField("ui.action","wait"); _7b4.addFormField("ui.primaryAction",this.envParams["ui.primaryAction"]); _7b4.addFormField("cv.actionState",this.envParams["cv.actionState"]); _7b4.addNonEmptyStringFormField("bux",this.envParams["bux"]); _7b4.addNonEmptyStringFormField("ui.preserveRapTags",this.envParams["ui.preserveRapTags"]); this.dispatchRequest(_7b4); return true; } return false; }; CCognosViewer.prototype.setCAFContext=function(_7b5){ this.m_sCAFContext=_7b5; }; CCognosViewer.prototype.setContextInfo=function(sXML){ this.m_sContextInfoXML=sXML; }; CCognosViewer.prototype.setConversation=function(_7b7){ this.m_sConversation=_7b7; }; CCognosViewer.prototype.setActionState=function(_7b8){ this.m_sActionState=_7b8; }; CCognosViewer.prototype.setStatus=function(_7b9){ this.m_sStatus=_7b9; }; CCognosViewer.prototype.setDebug=function(_7ba){ this.m_bDebug=_7ba; }; CCognosViewer.prototype.setExecutionParameters=function(_7bb){ this.m_sParameters=_7bb; }; CCognosViewer.prototype.setMetadataInfo=function(sXML){ this.m_sMetadataInfoXML=sXML; }; CCognosViewer.prototype.setSecondaryRequests=function(_7bd){ if(_7bd){ this.m_aSecRequests=_7bd; }else{ this.m_aSecRequests=[]; } }; CCognosViewer.prototype.setTracking=function(_7be){ this.m_sTracking=_7be; }; CCognosViewer.prototype.setSoapFault=function(_7bf){ this.m_sSoapFault=_7bf; }; CCognosViewer.prototype.showOutputInNewWindow=function(sURL){ var _7c1=document.getElementById("formWarpRequest"+this.getId()); var _7c2=_7c1.elements["ui.postBack"]; var _7c3=_7c1.elements["ui.backURL"]; if(this.isAccessibleMode()&&this.envParams["run.outputFormat"]=="PDF"&&window.detachLeavingRV){ window.detachLeavingRV(); } if(window.opener||_7c2||(_7c3&&_7c3.value!=="javascript:window.close();")){ window.open(sURL,"",""); this.updateNewBrowserWindow(); }else{ window.location=sURL; } }; CCognosViewer.prototype.hideToolbar=function(_7c4){ this.m_bHideToolbar=_7c4; }; CCognosViewer.prototype.showExcel=function(sURL){ var _7c6=true; var _7c7=document.getElementById("formWarpRequest"+this.getId()); var _7c8=_7c7.elements["ui.backURL"]; if(_7c8&&_7c8.value.indexOf("javascript:window.close()")!==0&&_7c8.value.indexOf("close.html")===-1){ _7c6=false; } if(window.detachLeavingRV){ window.detachLeavingRV(); } var _7c9=window; if(window.opener&&(isIE()||isFF())&&_7c6){ _7c9=window.opener?window.opener:window; }else{ if(!window.opener&&_7c6){ window.location=sURL; return; } } var _7ca=null; var _7cb=""; try{ if(this.envParams["cv.excelWindowOpenProperties"]){ _7cb=this.envParams["cv.excelWindowOpenProperties"]; } _7ca=_7c9.open(sURL,"",_7cb); } catch(e){ _7c9=window; _7ca=_7c9.open(sURL,"",_7cb); } if(!_7ca||_7ca.closed||typeof _7ca.closed=="undefined"){ alert(RV_RES.RV_BROWSER_POPUP_IS_ENABLED); } this.updateNewBrowserWindow(); }; CCognosViewer.prototype.updateNewBrowserWindow=function(){ var id=this.getId(); var _7cd=document.forms["formWarpRequest"+id].elements["ui.postBack"]; var _7ce=document.forms["formWarpRequest"+id].elements["ui.backURL"]; if(_7cd&&_7cd.value){ setTimeout(getCognosViewerObjectRefAsString(id)+".getRV().doPostBack();",100); }else{ if(_7ce&&_7ce.value){ if(_7ce.value.length<2048){ setTimeout("location.replace(\""+_7ce.value+"\");",100); }else{ _7ce=decodeURIComponent(_7ce.value); var _7cf=_7ce.split("?"); var _7d0=document.createElement("form"); _7d0.style.display="none"; _7d0.setAttribute("target","_self"); _7d0.setAttribute("method","post"); _7d0.setAttribute("action",_7cf[0]); var _7d1=_7cf[1].split("&"); for(var _7d2=0;_7d2<_7d1.length;_7d2++){ var _7d3=_7d1[_7d2].indexOf("="); var _7d4=_7d1[_7d2].substr(0,_7d3); var _7d5=_7d1[_7d2].substr(_7d3+1); var _7d6=document.createElement("img"); _7d6.setAttribute("type","hidden"); _7d6.setAttribute("name",decodeURIComponent(_7d4)); _7d6.setAttribute("value",decodeURIComponent(_7d5)); _7d0.appendChild(_7d6); } document.body.appendChild(_7d0); _7d0.submit(); } }else{ window.close(); } } }; CCognosViewer.prototype.showWaitPage=function(){ }; CCognosViewer.prototype.sendRequest=function(_7d7){ var _7d8=new ViewerDispatcherEntry(this); _7d8.addFormField("ui.action",_7d7.getAction()); if(_7d7.getCallback()!=null){ _7d8.setCallbacks({"complete":{"object":null,"method":_7d7.getCallback()}}); } var _7d9=_7d7.getFormFields().keys(); for(var _7da=0;_7da<_7d9.length;_7da++){ _7d8.addFormField(_7d9[_7da],_7d7.getFormFields().get(_7d9[_7da])); } var _7db=_7d7.m_oOptions.keys(); for(var _7dc=0;_7dc<_7db.length;_7dc++){ _7d8.addFormField(_7db[_7dc],_7d7.getOption(_7db[_7dc])); } var _7dd=_7d7.m_oParams.keys(); for(var _7de=0;_7de<_7dd.length;_7de++){ _7d8.addFormField(_7dd[_7de],_7d7.getParameter(_7dd[_7de])); } this.dispatchRequest(_7d8); }; CCognosViewer.prototype.promptAction=function(_7df,sUrl){ this.setKeepFocus(true); if(typeof datePickerObserverNotify=="function"){ datePickerObserverNotify(); } var _7e1=this.getViewerWidget(); if(_7df=="cancel"){ this.cancelPrompt(sUrl); if(_7e1){ if(!this.isReportRenderingDone()){ var _7e2={action:"deleteWidget"}; _7e1.fireEvent("com.ibm.bux.widget.action",null,_7e2); } } }else{ var oReq=new ViewerDispatcherEntry(this); oReq.addFormField("ui.action",_7df=="back"?"back":"forward"); if(_7df=="finish"){ oReq.addFormField("run.prompt",false); }else{ if(_7df=="back"||_7df=="next"){ oReq.addFormField("run.prompt",true); } } if(_7df=="reprompt"){ if(typeof repromptObserverNotify=="function"){ repromptObserverNotify(this); } oReq.addFormField("_promptControl",_7df); }else{ oReq.addFormField("_promptControl","prompt"); } if(_7e1){ _7e1.fireEvent("com.ibm.bux.widget.modified",null,{"modified":true}); if(_7e1.isSelectionFilterEnabled){ _7e1.clearSelectionFilter(); } } this.submitPromptValues(oReq); } }; CCognosViewer.prototype.cancelPrompt=function(sUrl){ this.cancel(); }; CCognosViewer.prototype.notify=function(_7e5,_7e6){ var _7e7=0,k=0; var _7e9=null; if(this.rangeObserverArray&&this.rangeObserverArray instanceof Array){ _7e7=this.rangeObserverArray.length; for(k=0;k<_7e7;k++){ _7e9=eval(this.rangeObserverArray[k]); if(_7e9&&typeof _7e9=="object"&&typeof _7e9.update=="function"){ _7e9.update(); } } } var _7ea=true; if(this.preProcessControlArray&&this.preProcessControlArray instanceof Array){ _7e7=this.preProcessControlArray.length; for(k=0;k<_7e7;k++){ _7e9=eval(this.preProcessControlArray[k]); if((typeof _7e9.getValid=="function")&&!_7e9.getValid()){ _7ea=false; break; } } } this.notifyPageNavEnabled(_7ea); if(this.multipleObserverArray&&this.multipleObserverArray instanceof Array){ _7e7=this.multipleObserverArray.length; for(k=0;k<_7e7;k++){ _7e9=eval(this.multipleObserverArray[k]); if(_7e9&&typeof _7e9=="object"&&typeof _7e9.checkInsertRemove=="function"){ _7e9.checkInsertRemove(); } } } for(var _7eb=0;_7eb0){ portletSharePrompt(_814); } } this.dispatchRequest(oReq); }; CCognosViewer.prototype.portletPromptParams=function(oReq){ var _816=[]; var _817=null; var _818=true; var _819=oReq.getFormFields().keys(); for(var _81a=0;_81a<_819.length;_81a++){ _817=_819[_81a]; if(_817=="_promptControl"&&oReq.getFormField(_817)=="search"){ _818=false; break; }else{ if(_817.indexOf("p_")===0){ if(_817.indexOf("p_credential")===0){ _818=false; break; }else{ _816.push([_817,oReq.getFormField(_817)]); } } } } if(_816&&!_818){ _816=[]; } return _816; }; CCognosViewer.prototype.preparePromptValues=function(oReq){ var _81c=[]; if(this.preProcessControlArray){ var _81d=this.preProcessControlArray.length; var k=0; for(k=0;k<_81d;k++){ var _81f=eval(this.preProcessControlArray[k]); var _820=(typeof _81f.isEnabled=="function"?_81f.isEnabled():true); if(_81f&&typeof _81f.preProcess=="function"&&_820){ _81f.preProcess(); if(_81f.m_oSubmit){ if(oReq.addParameter){ oReq.addParameter(_81f.m_oSubmit.name,_81f.m_oSubmit.value); }else{ oReq.addFormField(_81f.m_oSubmit.name,_81f.m_oSubmit.value); } _81c.push(_81f.m_oSubmit); if(_81f.m_sPromptId&&_81f.m_oForm&&_81f.m_oForm.elements&&typeof _81f.m_oForm.elements["p_"+_81f.m_sRef]=="object"){ if(oReq.addParameter){ oReq.addParameter("p_"+_81f.m_sPromptId,_81f.m_oForm.elements["p_"+_81f.m_sRef].value); }else{ oReq.addFormField("p_"+_81f.m_sPromptId,_81f.m_oForm.elements["p_"+_81f.m_sRef].value); } } } } } } var _821=document.getElementById("formWarpRequest"+this.getId()); if(_821){ var _822=_821.elements; for(var _823=0;_823<_822.length;_823++){ var _824=_822[_823]; if(!_824.name||!_824.name.match(/^p_/)){ continue; } var _825=true; for(var _826=0;_826<_81c.length;_826++){ if(_81c[_826]==_824){ _825=false; break; } } if(_825){ oReq.addFormField(_824.name,_824.value); _81c.push(_824); } } } var oRM=this["CognosReport"]; if(oRM){ var _828=oRM.prompt.getParameters(); for(var i=0;i<_828.length;i++){ var _82a="p_"+_828[i].getName(); if(!oReq.getFormField(_82a)){ oReq.addFormField(_82a,_828[i].getXML()); } } } return oReq; }; CCognosViewer.prototype.setViewerWidget=function(_82b){ this.m_viewerWidget=_82b; }; CCognosViewer.prototype.getViewerWidget=function(){ return this.m_viewerWidget; }; CCognosViewer.prototype.getFlashChartOption=function(){ var _82c=this.getViewerWidget(); var _82d=null; if(_82c){ var _82e=_82c.getProperties(); if(_82e){ _82d=_82e.getFlashCharts(); } } return _82d; }; CCognosViewer.prototype.fireWidgetEvent=function(evt,_830){ var _831=this.getViewerWidget(); if(_831!=null){ _831.fireEvent(evt,null,_830); } }; CCognosViewer.prototype.isMobile=function(){ return false; }; CCognosViewer.prototype.setVisibleDialog=function(_832){ this.m_visibleDialog=_832; }; CCognosViewer.prototype.getVisibleDialog=function(){ if(typeof this.m_visibleDialog!="undefined"){ return this.m_visibleDialog; } return null; }; CCognosViewer.prototype.getContentLocale=function(){ var _833=document.getElementById("formWarpRequest"+this.getId()); if(_833&&_833["ui.contentLocale"]&&_833["reRunObj"]&&_833["reRunObj"].value.length>0){ return _833["ui.contentLocale"].value; } return null; }; CCognosViewer.prototype.updateLayout=function(_834){ var cvid=this.getId(); var _836=document.getElementById("CVHeader"+cvid); var _837=document.getElementById("CVToolbar"+cvid); if(!_836&&!_837){ setTimeout(getCognosViewerObjectRefAsString(cvid)+".updateLayout(\""+_834+"\");",100); return; } if(_836){ var _838=this.getUIConfig()&&!this.getUIConfig().getShowBanner(); if((_834=="prompting"&&!this.bShowHeaderWithPrompts)||_838){ _836.parentNode.style.display="none"; }else{ _836.parentNode.style.display=""; } } if(_837){ if(_834=="prompting"||this.m_bHideToolbar==true){ _837.parentNode.style.display="none"; }else{ _837.parentNode.style.display=""; } } }; CCognosViewer.prototype.updateResponseSpecification=function(_839){ this.sResponseSpecification=_839; }; CCognosViewer.prototype.getResponseSpecification=function(){ return this.sResponseSpecification; }; CCognosViewer.prototype.release=function(_83a){ if(this.getStatus()!="fault"){ this._release(_83a); } }; CCognosViewer.prototype._release=function(_83b){ var form=document.getElementById("formWarpRequest"+this.getId()); var _83d=this.getTracking(); if(!_83d&&form&&form["m_tracking"]&&form["m_tracking"].value){ _83d=form["m_tracking"].value; form["m_tracking"].value=""; } this.setTracking(""); if(_83d){ var _83e=new DispatcherEntry(this); if(this.isWorkingOrPrompting()){ _83e.addFormField("ui.action","cancel"); }else{ _83e.addFormField("ui.action","release"); } _83e.addFormField("cv.responseFormat","successfulRequest"); _83e.addNonEmptyStringFormField("ui.primaryAction",this.envParams["ui.primaryAction"]); _83e.addNonEmptyStringFormField("ui.objectClass",this.envParams["ui.objectClass"]); _83e.addFormField("m_tracking",_83d); if(_83b!=true){ _83e.forceSynchronous(); } var _83f=this.getActiveRequest()?this.getActiveRequest():this.getFaultDispatcherEntry(); if(_83f&&_83f.getFormField("cv.outputKey")){ _83e.addFormField("b_action","cvx.high"); _83e.addFormField("cv.outputKey",_83f.getFormField("cv.outputKey")); _83e.addFormField("cv.waitForResponse","false"); _83e.setHeaders(_83f.getHeaders()); } var _840=_83e.getRequest().getFormFields(); var _841=_840.keys(); var data=new URLSearchParams(); for(var _843=0;_843<_841.length;_843++){ data.append(_841[_843],_840.get(_841[_843])); } 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(_844){ this.release(_844); if(!this.m_destroyed){ if(typeof window.gaRV_INSTANCES!="undefined"){ for(var _845=0;_845=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 _86a=this.getRAPReportInfo(); if(_86a){ var _86b=_86a.getDisplayTypes(); return _86b.match("_v2")!=null||_86b.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(_86c){ this.m_RAPReportInfo=_86c; }; 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 _86f=oDiv.style.display; oDiv.style.display="none"; oDiv.style.display=_86f; }; CCognosViewer.prototype.isMetadataEmpty=function(){ var oSC=this.getSelectionController(); if(oSC){ var _871=oSC.getCCDManager(); if(_871){ return _871.isMetadataEmpty(); } } return true; }; CCognosViewer.prototype.setContextMenu=function(_872){ this.m_contextMenu=_872; }; CCognosViewer.prototype.getContextMenu=function(){ return this.m_contextMenu; }; CCognosViewer.prototype.setToolbar=function(_873){ this.m_toolbar=_873; }; CCognosViewer.prototype.getToolbar=function(){ return this.m_toolbar; }; CCognosViewer.prototype.getAdvancedServerProperty=function(_874){ if(this.m_advancedProperties&&this.m_advancedProperties[_874]!==undefined&&this.m_advancedProperties[_874]!==null){ return this.m_advancedProperties[_874]; }else{ return null; } }; CCognosViewer.prototype.hasPrompt=function(){ if(typeof this.m_bHasPrompt==="undefined"||this.m_bHasPrompt===null){ var _875=false; if(this.getAdvancedServerProperty("VIEWER_JS_PROMPT_AGAIN_SHOW_ALWAYS")==="true"||(this.envParams.reportPrompts&&this.envParams.reportPrompts.length>0)){ _875=true; }else{ var _876=new CParameterValues(); var _877=XMLBuilderLoadXMLFromString(this.getExecutionParameters()); if(_877.childNodes.length==1){ _876.loadWithOptions(_877.childNodes[0],true); var _878=_876.length(); for(var _879=0;_879<_878;++_879){ var _87a=_876.getAt(_879); if(_87a!==null&&_87a.length()>0&&_87a.name().indexOf("credential:")!=-1){ _875=true; break; } } } } this.m_bHasPrompt=_875; } 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,_87c){ if(this.getViewerWidget()){ this.getViewerWidget().broadcastContextChange(_87c); } stopEventBubble(evt); }; CCognosViewer.prototype.broadcastParameterChange=function(evt,_87e){ if(this.getViewerWidget()){ this.getViewerWidget().broadcastParameterChange(_87e); } 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,_880){ this.m_sId=sId; this.m_sText=""; this.m_sScript=_880; }; 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 _881=/document\.write(ln)?\s*\(/gi; var _882=this.m_sScript.replace(_881,"this.write(").replace(window.gScriptLoader.m_reScriptTagOpen,"").replace(window.gScriptLoader.m_reScriptTagClose,""); try{ eval(_882); var _883=document.getElementById(this.m_sId); if(_883){ _883.innerHTML=this.m_sText; return true; } } catch(e){ } } return false; }; CDocumentWriter.prototype.write=function(_884){ var _885=""; if(typeof _884=="function"){ _885=eval(_884); }else{ if(typeof _884=="string"){ _885=_884; } } this.m_sText+=_885; }; function setFocusToFirstTabItem(_886){ if(!window.dojo){ return; } var _887=dojo.query("*",_886); var _888=_887.length; for(var i=0;i<_888;i++){ var node=_887[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(_88b){ this.m_oCDManager=_88b; }; 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 _88d=sCtx.split("::"); var _88e=[]; for(var i=0;i<_88d.length;++i){ _88e[i]=_88d[i].split(":"); } if(_88e&&_88e.length&&_88e[0].length){ return _88e; }else{ return null; } }; ReportContextHelper.prototype.getDataItemName=function(sCtx){ var _891=this.processCtx(sCtx); if(_891){ return this.getRefDataItem(_891[0][0]); } return null; }; ReportContextHelper.prototype.getRefDataItem=function(_892){ var _893=this.m_oCDManager.GetRDIValue(_892); return (_893==null)?"":_893; }; ReportContextHelper.prototype.getMun=function(_894){ var aCtx=null; if(typeof _894==="string"){ aCtx=this.processCtx(_894); }else{ if(typeof _894==="number"){ aCtx=this.processCtx(_894.toString()); }else{ aCtx=_894; } } 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(_897){ if(!_897){ return; } if(_897.findAction&&this.findConfig){ this.findConfig.configure(_897.findAction); } if(_897.UI){ this.uiConfig.configure(_897.UI); } if(_897.httpRequestCallbacks&&this.httpRequestConfig){ this.httpRequestConfig.configure(_897.httpRequestCallbacks); } if(_897.events&&this.eventsConfig){ this.eventsConfig.configure(_897.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(_898){ applyJSONProperties(this,_898); }; 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(_899){ applyJSONProperties(this,_899); }; 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(_89a){ if(this.reportStatus){ var _89b=this.reportStatus[_89a]; if(_89b){ return _89b; } if(_89a=="complete"&&this.reportStatus["initialComplete"]){ var _89c=this.reportStatus["initialComplete"]; this.reportStatus["initialComplete"]=null; return _89c; } } return null; }; function ViewerState(){ this.findState=null; this.pageState=null; }; ViewerState.prototype.setFindState=function(_89d){ if(typeof ViewerFindState!="function"){ return; } if(!this.findState){ this.findState=new ViewerFindState(); } this.findState.setState(_89d); }; ViewerState.prototype.clearFindState=function(){ this.findState=null; }; ViewerState.prototype.getFindState=function(){ return this.findState; }; ViewerState.prototype.setPageState=function(_89e){ if(typeof ViewerPageState!="function"){ return; } if(!this.pageState){ this.pageState=new ViewerPageState(); } this.pageState.setState(_89e); }; ViewerState.prototype.clearPageState=function(){ this.pageState=null; }; ViewerState.prototype.getPageState=function(){ return this.pageState; }; function ViewerEventsConfig(){ this.showContextMenuOnClick=false; }; ViewerEventsConfig.prototype.configure=function(_89f){ applyJSONProperties(this,_89f); }; ViewerEventsConfig.prototype.getShowContextMenuOnClick=function(){ return this.showContextMenuOnClick; }; CCognosViewer.prototype.loadExtra=function(){ var _8a0=this.getViewerWidget(); if(_8a0){ _8a0.loadExtraJavascriptFiles(this.getWebContentRoot()); } }; function CCognosViewerToolbarHelper(){ }; CCognosViewerToolbarHelper.updateToolbarForCurrentSelection=function(oCV,_8a2){ if(_8a2){ var _8a3=oCV.getActionFactory(); for(var _8a4=0;_8a4<_8a2.length;++_8a4){ var name=_8a2[_8a4]["name"]; if(typeof name!="undefined"&&name!=null){ var _8a6=_8a3.load(name); if(_8a6!=null&&typeof _8a6!="undefined"){ var _8a7=_8a6.updateMenu(_8a2[_8a4]); if(_8a7.visible==false){ if(_8a7.save){ oCV.getViewerWidget().addButtonToSavedToolbarButtons(name,_8a2[_8a4],_8a4); } _8a2.splice(_8a4,1); --_8a4; }else{ _8a2[_8a4]=_8a7; } } }else{ if(typeof _8a2[_8a4]._root!="undefined"){ CCognosViewerToolbarHelper.updateToolbarForCurrentSelection(oCV,_8a2[_8a4]._root); }else{ if(_8a2[_8a4].separator){ if(_8a4==0||(_8a4>0&&_8a2[_8a4-1].separator)||_8a4==_8a2.length){ _8a2.splice(_8a4,1); --_8a4; } } } } } } }; CCognosViewerToolbarHelper.updateContextMenuForCurrentSelection=function(oCV,_8a9){ var _8aa=[]; if(_8a9){ var _8ab=oCV.getActionFactory(); for(var _8ac=0;_8ac<_8a9.length;++_8ac){ var _8ad=_8a9[_8ac]; var name=_8a9[_8ac]["name"]; var _8af=true; if(typeof name!="undefined"){ var _8b0=_8ab.load(name); if(!_8b0){ if(name=="drillDown"){ _8b0=_8ab.load("DrillDown"); }else{ if(name=="drillUp"){ _8b0=_8ab.load("DrillUp"); } } } if(_8b0!=null&&typeof _8b0!="undefined"){ if(typeof _8b0.buildMenu=="function"){ _8ad=_8b0.buildMenu(_8a9[_8ac]); }else{ _8ad=_8b0.updateMenu(_8a9[_8ac]); } _8af=_8b0.isValidMenuItem(); }else{ if(typeof _8ad.items!="undefined"){ _8ad.items=CCognosViewerToolbarHelper.updateContextMenuForCurrentSelection(oCV,_8ad.items); _8af=(_8ad.items&&_8ad.items.length>0)?true:false; if(_8af&&_8ad.items.length==1){ _8ad=_8ad.items[0]; } } } } if(_8ad&&_8ad.visible!==false&&_8af){ if(_8ad.separator===true){ if(_8aa.length>0&&typeof _8aa[_8aa.length-1].separator=="undefined"){ _8aa[_8aa.length]=_8ad; } }else{ if(_8ad.useChildrenItems==true&&_8ad.items&&_8ad.items.length>0){ if(!_8ad.disabled){ for(var _8b1=0;_8b1<_8ad.items.length;_8b1++){ _8aa[_8aa.length]=_8ad.items[_8b1]; } } }else{ if(typeof _8ad._root!="undefined"){ _8aa[_8aa.length]={"_root":CCognosViewerToolbarHelper.updateContextMenuForCurrentSelection(oCV,_8ad._root)}; }else{ _8aa[_8aa.length]=_8ad; } } } } } if(_8aa.length>1){ if(_8aa[_8aa.length-1].separator){ _8aa=_8aa.splice(0,_8aa.length-1); } } } return _8aa; }; 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 _8b9={}; applyJSONProperties(_8b9,this.m_md); return _8b9; }; CCDManager.prototype.getClonedContextdataArray=function(){ var _8ba={}; applyJSONProperties(_8ba,this.m_cd); return _8ba; }; CCDManager.prototype.SetCognosViewer=function(_8bb){ if(_8bb){ this.m_oCV=_8bb; } }; CCDManager.prototype.onComplete_GetCDRequest=function(_8bc,_8bd){ if(_8bc){ var _8be=_8bc.getResult(); var _8bf=XMLBuilderLoadXMLFromString(_8be); if(_8bf){ var _8c0=_8bf.getElementsByTagName("Block"); for(var i=0;i<_8c0.length;i++){ var _8c2=""; var _8c3=_8c0[i].firstChild; while(_8c3){ _8c2+=_8c3.nodeValue; _8c3=_8c3.nextSibling; } var cd=eval("("+_8c2+")"); this.AddContextData(cd); } } } if(_8bd&&typeof _8bd=="function"){ _8bd(); } }; CCDManager.prototype.FetchContextData=function(_8c5,_8c6){ var _8c7=[]; var c=null,_8c9=_8c5.length; for(var i=0;i<_8c9;++i){ c=_8c5[i]; if(c!=""&&!this.ContextIdExists(c)){ _8c7.push(c); } } if(_8c7.length){ if(this.m_oCV){ this.getContextData(_8c7,_8c6); } } return _8c7.length; }; CCDManager.prototype.getContextData=function(_8cb,_8cc){ var oCV=this.m_oCV; var _8ce=new AsynchDataDispatcherEntry(oCV); _8ce.setCanBeQueued(false); if(!oCV.isBux){ _8ce.forceSynchronous(); } var form=document["formWarpRequest"+oCV.getId()]; var _8d0=oCV.getConversation(); var _8d1=oCV.getTracking(); if(!_8d1&&form&&form["m_tracking"]&&form["m_tracking"].value){ _8d1=form["m_tracking"].value; } if(oCV.m_viewerFragment){ var _8d2=oCV.getActiveRequest(); if(_8d2&&_8d2.getFormField("m_tracking")==_8d1){ return; } } var _8d3={customArguments:[_8cc],"complete":{"object":this,"method":this.onComplete_GetCDRequest}}; if(oCV.getStatus()=="prompting"){ _8d3["prompting"]={"object":this,"method":this.onComplete_GetCDRequest}; } _8ce.setCallbacks(_8d3); if(_8d0&&oCV.envParams["ui.action"]!="view"){ _8ce.addFormField("ui.action","getContext"); _8ce.addFormField("ui.conversation",_8d0); }else{ var _8d4=form["ui.object"]; if(typeof _8d4.length!="undefined"&&_8d4.length>1){ _8ce.addFormField("ui.object",form["ui.object"][0].value); }else{ _8ce.addFormField("ui.object",form["ui.object"].value); } _8ce.addFormField("ui.action","getObjectContext"); } _8ce.addFormField("cv.responseFormat","asynchDetailContext"); _8ce.addFormField("context.format","initializer"); _8ce.addFormField("context.type","reportService"); _8ce.addFormField("context.selection",_8cb.join(",")); _8ce.addNonEmptyStringFormField("m_tracking",_8d1); oCV.dispatchRequest(_8ce); }; CCDManager.prototype.ContextIdExists=function(_8d5){ return (this.m_cd&&this.m_cd[_8d5]?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(_8d6,_8d7,_8d8){ var p=null; this.FetchContextData([_8d6]); var cd=this.m_cd&&this.m_cd[_8d6]; if(cd){ var md=this.m_md[cd[_8d7]]; if(md){ p=md[_8d8]; } } return p; }; CCDManager.prototype.GetDrillFlag=function(_8dc){ return this._getMDPropertyFromCD(_8dc,"r","drill"); }; CCDManager.prototype.getModelPathFromBookletItem=function(_8dd){ var mp=null; var md=this.m_md[_8dd]; 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(_8e0){ var p=null; var md=this.m_md[_8e0]; if(md){ p=md.modelBasedDrillThru; } return p?p:0; }; CCDManager.prototype.GetDrillFlagForMember=function(_8e3){ var _8e4=null; var d=this._getMDPropertyFromCD(_8e3,"r","drill"); if(d!==null&&this.m_cd[_8e3].m){ _8e4=d; } return _8e4; }; CCDManager.prototype.GetDataType=function(_8e6){ return this._getMDPropertyFromCD(_8e6,"r","dtype"); }; CCDManager.prototype.GetUsage=function(_8e7){ return this._getMDPropertyFromCD(_8e7,"r","usage"); }; CCDManager.prototype.GetHUN=function(_8e8){ var hun=this._getMDPropertyFromCD(_8e8,"h","h"); if(!hun){ var h=this._getMDPropertyFromCD(_8e8,"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(_8eb){ var qry=null; var q=this._getMDPropertyFromCD(_8eb,"r","q"); if(q){ qry=this.m_md[q].q; } return qry; }; CCDManager.prototype.GetDepth=function(_8ee){ return this._getMDPropertyFromCD(_8ee,"r","level"); }; CCDManager.prototype.GetDisplayValue=function(_8ef){ var _8f0=null; this.FetchContextData([_8ef]); if(this.ContextIdExists(_8ef)&&this.m_cd[_8ef]){ _8f0=this.m_cd[_8ef].u; } return _8f0; }; CCDManager.prototype.GetPUN=function(_8f1){ return this._getMDPropertyFromCD(_8f1,"p","p"); }; CCDManager.prototype.GetLUN=function(_8f2){ return this._getMDPropertyFromCD(_8f2,"l","l"); }; CCDManager.prototype.GetMUN=function(_8f3){ return this._getMDPropertyFromCD(_8f3,"m","m"); }; CCDManager.prototype.GetDUN=function(_8f4){ return this._getMDPropertyFromCD(_8f4,"d","d"); }; CCDManager.prototype.GetQMID=function(_8f5){ return this._getMDPropertyFromCD(_8f5,"i","i"); }; CCDManager.prototype.GetRDIValue=function(_8f6){ return this._getMDPropertyFromCD(_8f6,"r","r"); }; CCDManager.prototype.GetBIValue=function(_8f7){ return this._getMDPropertyFromCD(_8f7,"r","bi"); }; CCDManager.prototype.getContextIdForMetaData=function(lun,hun,_8fa){ var _8fb=[{"expression":lun,"type":"l"},{"expression":hun,"type":"h"}]; for(var _8fc=0;_8fc<_8fb.length;++_8fc){ var _8fd=_8fb[_8fc].expression; var _8fe=_8fb[_8fc].type; if(_8fd==""){ continue; } for(var _8ff in this.m_md){ if(this.m_md[_8ff][_8fe]==_8fd){ for(var _900 in this.m_md){ if(this.m_md[_900].r&&this.m_md[_900][_8fe]==_8ff){ if(this.m_md[_900].drill!=0||_8fa==true){ for(var ctx in this.m_cd){ if(this.m_cd[ctx].r==_900&&this.m_cd[ctx].m){ return ctx; } } } } } } } } return ""; }; CCDManager.prototype.GetContextIdForMUN=function(mun){ var _903=null; var _904=null; for(var i in this.m_md){ if(this.m_md[i].m==mun){ _903=i; break; } } if(_903!=null){ for(var j in this.m_cd){ if(this.m_cd[j].m==_903){ _904=j; break; } } } return _904; }; CCDManager.prototype.GetContextIdsForRDI=function(rdi){ var _908=[]; for(var i in this.m_md){ if(this.m_md[i].r==rdi){ _908.push(i); } } return _908; }; CCDManager.prototype.getMUNForRDIAndUseValue=function(rdi,_90b){ var _90c=this.GetContextIdsForRDI(rdi); for(var i in this.m_cd){ for(var j in _90c){ if(this.m_cd[i].r==_90c[j]&&this.m_cd[i].u==_90b){ var _90f=this.m_cd[i].m; if(_90f){ return this.m_md[_90f].m; } } } } return null; }; CCDManager.prototype.GetPageMinMaxForRDI=function(rdi){ var _911=null; var _912=null; var _913=this.GetContextIdsForRDI(rdi); this.FetchContextData([0]); for(var i in this.m_cd){ for(var j in _913){ if(this.m_cd[i].r==_913[j]){ var _916=parseFloat(this.m_cd[i].u); if(_916==this.m_cd[i].u){ if(_911==null||_916<_911){ _911=_916; } if(_912==null||_916>_912){ _912=_916; } } } } } if(_911!=null&&_912!=null){ return eval("({ pageMin: "+_911+", pageMax: "+_912+"})"); } }; CCDManager.prototype.GetContextIdForDisplayValue=function(_917){ var _918=null; for(var i in this.m_cd){ if(this.m_cd[i].u==_917){ _918=i; break; } } return _918; }; CCDManager.prototype.GetContextIdForUseValue=function(_91a){ var _91b=null; var _91c=null; var _91d=null; for(var i in this.m_md){ var md=this.m_md[i]; for(var j in md){ if(md[j]==_91a){ _91b=i; _91c=j; break; } } } if(_91b!=null){ for(var k in this.m_cd){ if(this.m_cd[k][_91c]==_91b){ _91d=k; break; } } } return _91d; }; CCDManager.prototype.getDataItemInfo=function(){ if(this.m_cd){ var _922={}; this.m_dataItemInfo={}; for(var i in this.m_cd){ var _924=this.m_cd[i].r; if(typeof _924!="undefined"){ var _925=this.m_md[_924].r; if(this.m_dataItemInfo[_925]==null){ this.m_dataItemInfo[_925]=1; }else{ this.m_dataItemInfo[_925]++; } } } 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(_926){ if(_926<=0){ return this.ContextDataToJSON(); } if(this.m_cd){ var _927={}; var _928={}; for(var i in this.m_cd){ var _92a=this.m_cd[i].r; if(typeof _92a!="undefined"){ if(_927[_92a]==null){ _927[_92a]=0; }else{ _927[_92a]++; } if(_927[_92a]<_926){ _928[i]=this.m_cd[i]; } } } return CViewerCommon.toJSON(_928); } return ""; }; CCDManager.prototype.GetHUNForRDI=function(rdi,_92c){ for(var i in this.m_md){ if(this.m_md[i].r==rdi&&this.m_md[i].q==_92c){ var _92e=this.m_md[i].h; if(_92e){ return this.m_md[_92e].h; } } } return null; }; CCDManager.prototype.GetMetadataIdForQueryName=function(_92f){ for(var i in this.m_md){ if(this.m_md[i].q===_92f){ return i; } } return null; }; CCDManager.prototype._isEmptyObject=function(obj){ for(var _932 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(_933){ var item=this.m_cd[_933]; 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(_935){ var item=this.m_cd[_935]; 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 _938=str.split("].["); var _939=_938[_938.length-1]; return _939.substring(0,_939.length-1); } return str; }; CCDManager.prototype._replaceNamespaceForSharedTM1DimensionOnly=function(_93a){ var _93b=this._getNamespaceAndDimensionFromUniqueName(_93a); if(_93b&&this.m_md){ for(var _93c in this.m_md){ var sMun=this.m_md[_93c].m; if(sMun&&sMun.length>0){ if(sMun.indexOf("->:[TM].")>0){ var oObj=this._getNamespaceAndDimensionFromUniqueName(sMun); if(oObj.dimension&&oObj.dimension===_93b.dimension&&oObj.namespace!==_93b.namespace){ var _93f=_93a.indexOf("."); return oObj.namespace+_93a.substr(_93f,_93a.length); } }else{ var _940=sMun.indexOf("->:["); if(_940>0){ if(sMun.substr(_940+4,4)!=="TM]."){ return _93a; } } } } } } return _93a; }; CCDManager.prototype._getNamespaceAndDimensionFromUniqueName=function(_941){ if(_941&&_941.length>0&&_941.indexOf("].[")>0){ var _942=_941.split("].["); if(_942.length>1){ return {"namespace":_942[0]+"]","dimension":"["+_942[1]+"]"}; } } return null; }; CCDManager.prototype.destroy=function(){ delete this.m_cd; delete this.m_md; delete this.m_oCV; delete this.m_dataItemInfo; }; var GUtil={}; GUtil.createHiddenForm=function(name,_944,_945,_946){ var form=document.getElementById(name); if(form){ document.body.removeChild(form); } form=document.createElement("form"); form.id=name; form.name=name; form.method=_944; form.style.display="none"; form.action=document.forms["formWarpRequest"+_945].action; form.target=_946+(new Date()).getTime(); document.body.appendChild(form); return form; }; GUtil.createFormField=function(el,name,_94a){ var _94b=document.createElement("input"); _94b.type="hidden"; _94b.name=name; _94b.value=_94a; el.appendChild(_94b); }; GUtil.generateCallback=function(func,_94d,_94e){ if(func){ var _94f=_94e||this; _94d=(_94d instanceof Array)?_94d:[]; return (function(_950){ if(typeof _950!="undefined"&&_94d.length==0){ _94d.push(_950); } return func.apply(_94f,_94d); }); }else{ return (function(){ }); } }; GUtil.destroyProperties=function(_951,_952){ var _953; if(_951 instanceof Array){ for(var i=0;i<_951.length;i++){ _953=_951[i]; if(_953 instanceof String){ _953=null; }else{ if(_953&&_953.destroy&&!_953._beingDestroyed){ _953.destroy(); } GUtil.destroyProperties(_953); } } }else{ if(_951 instanceof Object){ if(_951._beingDestroyed){ return; } var obj=_951; obj._beingDestroyed=true; for(var _956 in obj){ _953=obj[_956]; if(_956==="_beingDestroyed"||_956==="m_destroyed"||_956==="_destroyed"||typeof _953=="function"){ continue; } if(_953 instanceof Array){ GUtil.destroyProperties(_953); }else{ if(_953 instanceof Object){ if(typeof _953.destroy=="function"&&!_953._destroyed&&(_953!==CCognosViewer||_952)){ _953.destroy(); } } } delete obj[_956]; } } } }; cvLoadDialog=function(_957,_958,_959,_95a,_95b,_95c){ _95c=((_95c===undefined)?true:_95c); var _95d=document.getElementById("formWarpRequest"+_957.getId()); if(_95d&&_957){ _957.getWorkingDialog().hide(); var _95e=""; var _95f=""; var _960=null; if(_957.isAccessibleMode()){ _95e="winNAT_"+(new Date()).getTime(); _95f=_957.getWebContentRoot()+"/"+"rv/blankNewWin.html?cv.id="+this.getCVId(); }else{ var _961=document.body; _960=new CModal("","",_961,null,null,_95a,_959,true,true,false,true,_957.getWebContentRoot()); if(typeof _95b=="string"){ document.getElementById(CMODAL_CONTENT_ID).setAttribute("title",_95b); } document.getElementById(CMODAL_BACK_IFRAME_ID).setAttribute("title",RV_RES.IDS_JS_MODAL_BACK_IFRAME); _95e=CMODAL_CONTENT_ID; } var _962=document.createElement("FORM"); _962.method="POST"; _962.action=_957.getGateway(); _962.target=_95e; _962.style.margin="0px"; document.body.appendChild(_962); for(var _963 in _958){ _962.appendChild(createHiddenFormField(_963,_958[_963])); } if(_95c){ _962.appendChild(createHiddenFormField("cv.id",_957.getId())); _962.appendChild(createHiddenFormField("b_action","xts.run")); _962.appendChild(createHiddenFormField("ui.action",_95d["ui.action"].value)); _962.appendChild(createHiddenFormField("ui.object",_95d["ui.object"].value)); if(typeof _957.rvMainWnd!="undefined"){ _962.appendChild(createHiddenFormField("run.outputFormat",_957.rvMainWnd.getCurrentFormat())); } if(typeof _95d["run.outputLocale"]!="undefined"){ _962.appendChild(createHiddenFormField("run.outputLocale",_95d["run.outputLocale"].value)); } if(typeof _962["backURL"]=="undefined"&&typeof _962["ui.backURL"]=="undefined"&&typeof _95d["ui.backURL"]!="undefined"){ _962.appendChild(createHiddenFormField("ui.backURL",_95d["ui.backURL"].value)); } if(typeof _957!="undefined"&&typeof _957.getConversation!="undefined"&&typeof _957.getTracking!="undefined"){ _962.appendChild(createHiddenFormField("ui.conversation",_957.getConversation())); _962.appendChild(createHiddenFormField("m_tracking",_957.getTracking())); if(_957.envParams["ui.name"]!="undefined"){ _962.appendChild(createHiddenFormField("ui.name",_957.envParams["ui.name"])); } } } var _964=window.onbeforeunload; window.onbeforeunload=null; if(_957.isAccessibleMode()){ window.open(_95f,_95e,"rv"); _962.submit(); }else{ _962.submit(); _960.show(); } window.onbeforeunload=_964; document.body.removeChild(_962); _957.modalShown=true; } }; function createHiddenFormField(name,_966){ var _967=document.createElement("input"); _967.setAttribute("type","hidden"); _967.setAttribute("name",name); _967.setAttribute("id",name); _967.setAttribute("value",_966); return (_967); }; function isAuthenticationFault(_968){ if(_968!=null){ var _969=XMLHelper_FindChildByTagName(_968,"CAM",true); return (_969!=null&&XMLHelper_FindChildByTagName(_969,"promptInfo",true)!=null); } }; function processAuthenticationFault(_96a,_96b){ if(isAuthenticationFault(_96a)){ launchLogOnDialog(_96b,_96a); return true; } return false; }; function isObjectEmpty(_96c){ for(var _96d in _96c){ if(_96c.hasOwnProperty(_96d)){ return false; } } return true; }; function launchLogOnDialog(cvID,_96f){ try{ var oCV=getCognosViewerObjectRef(cvID); var _971={"b_action":"xts.run","m":"portal/close.xts","h_CAM_action":"logonAs"}; if(_96f!=null){ var _972=XMLHelper_FindChildrenByTagName(_96f,"namespace",true); if(_972!=null){ for(var _973=0;_973<_972.length;++_973){ var _974=_972[_973]; if(_974!=null){ var _975=XMLHelper_FindChildByTagName(_974,"name",false); var _976=XMLHelper_FindChildByTagName(_974,"value",false); if(_975!=null&&_976!=null){ var _977=XMLHelper_GetText(_975); var _978=XMLHelper_GetText(_976); if(_977!=null&&_977.length>0){ _971[_977]=_978; } } } } } } cvLoadDialog(oCV,_971,540,460,null,false); } catch(exception){ } }; function getCVWaitingOnFault(){ var oCV=null; for(var _97a=0;_97a0&&_98f.childNodes[0].className=="textItem"){ try{ _98f.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(_992){ var regX=/\r\n|\r|\n/g; var _994="
"; return _992.replace(regX,_994); }; function xml_encode(_995){ var _996=""+_995; if((_996=="0")||((_995!=null)&&(_995!=false))){ _996=_996.replace(/&/g,"&"); _996=_996.replace(//g,">"); _996=_996.replace(/"/g,"""); _996=_996.replace(/'/g,"'"); }else{ if(_995==null){ _996=""; } } return _996; }; function xml_decodeParser(sAll,_998){ var _999=sAll; switch(_998){ case "amp": _999="&"; break; case "lt": _999="<"; break; case "gt": _999=">"; break; case "quot": _999="\""; break; case "apos": _999="'"; break; } return _999; }; function xml_decode(_99a){ var _99b=""+_99a; if((_99b=="0")||((_99a!=null)&&(_99a!=false))){ _99b=_99b.replace(/&(amp|lt|gt|quot|apos);/g,xml_decodeParser); }else{ if(_99a==null){ _99b=""; } } return _99b; }; function xpath_attr_encode(_99c){ var _99d=null; if(_99c.indexOf("'")>=0&&_99c.indexOf("\"")>=0){ var _99e=_99c.split("\""); _99d="concat("; for(var i=0;i<_99e.length;++i){ if(i>0){ _99d+=","; } if(_99e[i].length>0){ _99d+=("\""+_99e[i]+"\""); }else{ _99d+="'\"'"; } } _99d+=")"; }else{ if(_99c.indexOf("'")>=0){ _99d="\""+_99c+"\""; }else{ _99d="'"+_99c+"'"; } } return _99d; }; 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(_9a7){ if(typeof window[_9a7]!="undefined"&&window[_9a7]){ if(isIE()){ eval("delete "+_9a7); }else{ delete window[_9a7]; } } }; function loadClass(_9a8){ try{ var _9a9=eval("new "+_9a8+"();"); return _9a9; } catch(e){ return null; } }; function getElementsByClassName(oElm,_9ab,_9ac){ var _9ad=(_9ab=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(_9ab); var _9ae=[]; var _9af=new RegExp("(^|\\s)"+_9ac+"(\\s|$)"); var _9b0=_9ad.length; for(var i=0;i<_9b0;i++){ var _9b2=_9ad[i]; if(_9af.test(_9b2.className)){ _9ae.push(_9b2); } } return _9ae; }; function getImmediateLayoutContainerId(node){ var _9b4=node; while(_9b4!=null){ if(_9b4.getAttribute&&_9b4.getAttribute("lid")!=null){ return _9b4.getAttribute("lid"); } _9b4=_9b4.parentNode; } return null; }; function getChildElementsByAttribute(oElm,_9b6,_9b7,_9b8){ return getDescendantElementsByAttribute(oElm,_9b6,_9b7,_9b8,true); }; function getElementsByAttribute(oElm,_9ba,_9bb,_9bc,_9bd,_9be){ return getDescendantElementsByAttribute(oElm,_9ba,_9bb,_9bc,false,_9bd,_9be); }; function getDescendantElementsByAttribute(oElm,_9c0,_9c1,_9c2,_9c3,_9c4,_9c5){ var _9c6=[]; var _9c7=null; if(typeof _9c5==="undefined"){ _9c7=(typeof _9c2!="undefined")?new RegExp("(^|\\s)"+_9c2+"(\\s|$)","i"):null; }else{ _9c7=_9c5; } if(typeof _9c0=="string"){ _9c0=[_9c0]; } var _9c8=(oElm?_9c0.length:0); for(var _9c9=0;_9c9<_9c8;_9c9++){ var _9ca=null; if(_9c3){ if(_9c0[_9c9]=="*"&&oElm.all){ _9ca=oElm.childNodes; }else{ _9ca=[]; var _9cb=oElm.childNodes; for(var i=0;i<_9cb.length;++i){ if(_9cb[i].nodeName.toLowerCase()==_9c0[_9c9].toLowerCase()){ _9ca.push(_9cb[i]); } } } }else{ _9ca=(_9c0[_9c9]=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(_9c0[_9c9]); } var _9cd=_9ca.length; for(var idx=0;idx<_9cd;idx++){ var _9cf=_9ca[idx]; var _9d0=_9cf.getAttribute&&_9cf.getAttribute(_9c1); if(_9d0!==null){ var _9d1=null; if(typeof _9d0==="number"){ _9d1=String(_9d0); }else{ if(typeof _9d0==="string"&&_9d0.length>0){ _9d1=_9d0; } } if(_9d1!==null){ if(typeof _9c2=="undefined"||(_9c7&&_9c7.test(_9d1))){ _9c6.push(_9cf); if(_9c4!=-1&&_9c6.length>_9c4){ return []; }else{ if(_9c4==1&&_9c6.length==1){ return _9c6; } } } } } } } return _9c6; }; function savedOutputDoneLoading(cvId,_9d3){ var oCV=window["oCV"+cvId]; var _9d5=(oCV&&oCV.getViewerWidget?oCV.getViewerWidget():null); var _9d6=(_9d5?_9d5.getSavedOutput():null); if(_9d6){ _9d6.outputDoneLoading(); }else{ if(_9d3<5){ _9d3++; var _9d7=function(){ savedOutputDoneLoading(cvId,_9d3); }; setTimeout(_9d7,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 _9d9=navigator.userAgent.match(/(?:MSIE |Trident\/.*; rv:)(\d+)/); return _9d9?parseFloat(_9d9[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(_9da,_9db,_9dc,_9dd){ if(_9db.length>1){ document.images[_9da].src=_9db; } }; 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 _9e3=node.getAttribute("viewerId"); if(!_9e3){ _9e3=node.parentNode.getAttribute("viewerId"); } if(!_9e3){ return; } var oCV=window["oCV"+_9e3]; var _9e5=oCV.getAction("Selection"); _9e5.pageClicked(evt); return stopEventBubble(evt); }; function clientToScreenCoords(_9e6,_9e7){ var _9e8=_9e6; var _9e9={topCoord:0,leftCoord:0}; while(_9e8!=null&&_9e8!=_9e7){ _9e9.topCoord+=_9e8.offsetTop; _9e9.leftCoord+=_9e8.offsetLeft; _9e8=_9e8.offsetParent; } return _9e9; }; function getCurrentPosistionString(oCV,_9eb,_9ec){ var _9ed=RV_RES.IDS_JS_INFOBAR_ITEM_COUNT; var _9ee=/\{0\}/; var _9ef=/\{1\}/; _9ed=_9ed.replace(_9ee,_9eb); _9ed=" "+_9ed.replace(_9ef,_9ec)+" "; return _9ed; }; function applyJSONProperties(obj,_9f1){ for(property in _9f1){ if(typeof _9f1[property]=="object"&&!(_9f1[property] instanceof Array)){ if(typeof obj[property]=="undefined"){ obj[property]={}; } applyJSONProperties(obj[property],_9f1[property]); }else{ obj[property]=_9f1[property]; } } }; function CViewerCommon(){ }; CViewerCommon.openNewWindowOrTab=function(sURL,_9f3){ return window.open(sURL,_9f3); }; CViewerCommon.toJSON=function(obj){ var type=typeof (obj); if(type!="object"||type===null){ if(type==="string"){ obj="\""+obj+"\""; } return String(obj); }else{ var _9f6; var prop; var json=[]; var _9f9=(obj&&obj.constructor==Array); for(_9f6 in obj){ prop=obj[_9f6]; type=typeof (prop); if(type==="string"){ prop="\""+prop+"\""; }else{ if(type=="object"&&prop!==null){ prop=CViewerCommon.toJSON(prop); } } json.push((_9f9?"":"\""+_9f6+"\":")+String(prop)); } return (_9f9?"[":"{")+String(json)+(_9f9?"]":"}"); } }; function resizePinnedContainers(){ var oCV=window.gaRV_INSTANCES[0]; if(oCV&&!oCV.m_viewerFragment){ var _9fb=oCV.getPinFreezeManager(); if(_9fb&&_9fb.hasFrozenContainers()){ var _9fc=document.getElementById("RVContent"+oCV.getId()); var _9fd=document.getElementById("mainViewerTable"+oCV.getId()); var _9fe=_9fc.clientWidth; var _9ff=_9fd.clientHeight; _9fb.resize(_9fe,_9ff); if(isIE()){ oCV.repaintDiv(_9fc); } } } }; function setWindowHref(url){ var _a01=window.onbeforeunload; window.onbeforeunload=null; window.location.href=url; window.onbeforeunload=_a01; }; 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){ var _a1d=new CParameterValueStringOperators(RV_RES.IDS_JS_FILTER_BETWEEN,RV_RES.IDS_JS_FILTER_NOT_BETWEEN,RV_RES.IDS_JS_FILTER_LESS_THAN,RV_RES.IDS_JS_FILTER_GREATER_THAN); for(var _a1e=0;_a1e<_a1b;++_a1e){ var _a1f=_a1a.getAt(_a1e); if(_a1f!=null){ _a1c+=""; _a1c+=""; _a1c+=xml_encode(_a1f.name()); _a1c+=""; _a1c+=""; _a1c+=xml_encode(_a1f.toString(_a1d)); _a1c+=""; _a1c+=""; } } } _a1c+=""; return _a1c; }; function PinFreezeContainer(_a20,lid,_a22,_a23,_a24,_a25,_a26){ this.m_pinFreezeManager=_a20; this.m_lid=lid; this.m_lidNS=lid+_a22+_a26; this.m_viewerId=_a22; this.m_freezeTop=_a23; this.m_freezeSide=_a24; this.m_cachedReportDiv=null; this.m_cachedPFContainer=null; this.m_cachedBaseContainer=_a25; 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=_a26; 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 _a27="{"; _a27+="\"m_clientWidth\":"+this.m_clientWidth+""; _a27+=",\"m_scrollableClientWidth\":"+this.m_scrollableClientWidth+""; _a27+=",\"m_clientHeight\":"+this.m_clientHeight+""; _a27+=",\"m_scrollableClientHeight\":"+this.m_scrollableClientHeight+""; _a27+="}"; return _a27; }; PinFreezeContainer.prototype.copyProperties=function(_a28){ this.m_clientWidth=_a28.m_clientWidth; this.m_scrollableClientWidth=_a28.m_scrollableClientWidth; this.m_clientHeight=_a28.m_clientHeight; this.m_scrollableClientHeight=_a28.m_scrollableClientHeight; }; PinFreezeContainer.prototype.setViewerId=function(id){ this.m_viewerId=id; }; PinFreezeContainer.prototype.getLid=function(){ return this.m_lid; }; PinFreezeContainer.prototype.createPFContainer=function(_a2a,_a2b){ var _a2c=document.createElement("temp"); if(this.m_cachedBaseContainer){ this.applyAuthoredFixedSizes(this.m_cachedBaseContainer); this.m_cachedReportDiv=_a2a; var _a2d=this.m_cachedBaseContainer.parentNode; var _a2e=this.loadTemplateHTML(); if(_a2e){ _a2c.innerHTML=_a2e; var _a2f=this.getContainerByLID(_a2c); var _a30=this.getSectionByLID(_a2c.firstChild,"pfMainOutput"); if(_a30){ var i=this.getChildPosition(_a2d,this.m_cachedBaseContainer); if(i!=-1){ var _a32=this.m_pinFreezeManager.m_oCV; if(_a32&&_a32.envParams["freezeDefaultWrap"]){ if(this.m_cachedBaseContainer.style.whiteSpace===""&&_a32.envParams["freezeDefaultWrap"].toLowerCase()==="true"){ var _a33=this.m_cachedBaseContainer.getElementsByTagName("span"); if(_a33){ for(var k=0;k<_a33.length;k++){ _a33[k].style.whiteSpace="nowrap"; } } this.m_wrapFlag=true; } } if(!_a2b){ 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"; } _a30.style.width=this.m_cachedBaseContainer.clientWidth+2+"px"; _a30.style.height=this.m_cachedBaseContainer.clientHeight+2+"px"; } _a30.appendChild(this.m_cachedBaseContainer); this.insertAt(_a2d,_a2f,i); } if(this.m_cachedBaseContainer.style.border!==""){ _a2f.style.border=this.m_cachedBaseContainer.style.border; this.m_cachedBaseContainer.style.border=""; } } } } }; PinFreezeContainer.prototype._getFixedWidth=function(_a35){ if(_a35&&_a35.style.width&&!_a35.getAttribute("authoredFixedWidth")){ var _a36=Number(_a35.style.width.split("px")[0]); return isNaN(_a36)?null:_a36; } return null; }; PinFreezeContainer.prototype._getFixedHeight=function(_a37){ if(_a37&&_a37.style.height&&!_a37.getAttribute("authoredFixedHeight")){ var _a38=Number(_a37.style.height.split("px")[0]); return isNaN(_a38)?null:_a38; } return null; }; PinFreezeContainer.prototype.applyAuthoredFixedSizes=function(_a39){ var _a3a=this._getFixedWidth(_a39); if(_a3a){ this.m_fixedWidth=_a3a; this.m_clientWidth=this.m_fixedWidth; this.m_scrollableClientWidth=this.m_fixedWidth; } var _a3b=this._getFixedHeight(_a39); if(_a3b){ this.m_fixedHeight=_a3b; this.m_clientHeight=this.m_fixedHeight; this.m_scrollableClientHeight=this.m_fixedHeight; } }; PinFreezeContainer.prototype.loadFreezeBothTemplateHTML=function(){ var _a3c=""+""+""+""+""+""+""+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
 
"+"
"+"
"; return _a3c; }; PinFreezeContainer.prototype.loadFreezeSideTemplateHTML=function(){ var _a3d=""+""+""+""+"
"+"
"+"
"+"
 
"+"
"+"
"; return _a3d; }; PinFreezeContainer.prototype.loadFreezeTopTemplateHTML=function(){ var _a3e=""+""+""+""+"
"+"
"+"
"+"
"+"
"; return _a3e; }; 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(_a3f){ var _a40=this.getSection("pfMainOutput"); var _a41=_a40.getAttribute("pfslid"); var _a42=this.getSection("pfSideHeadings"); var _a43=_a42.getAttribute("pfslid"); var _a44=this.getMainOutputHomeCell(); if(!_a44){ return; } var _a45=_a3f; var _a46=_a42; var _a47=this.isA11yEnabled(_a45); var _a48=this.m_pinFreezeManager.deepCloneNode(_a45); _a46.appendChild(_a48); var _a49=this.getSectionHomeCell(_a42); if(!_a49){ return; } var _a4a=_a45.getElementsByTagName("tbody"); var _a4b=_a48.getElementsByTagName("tbody"); if(_a4a.length>0&&_a4b.length>0){ var _a4c=_a4a[0]; var _a4d=_a4b[0]; var _a4e=_a4c.firstChild; var _a4f=_a4d.firstChild; var _a50=_a44.rowSpan; this.markAsCopy(_a44,_a49,_a41,_a43); for(var r=0;r<_a50;++r){ var _a52=_a4d.rows[r]; this.removeCTX(_a52); } for(var r=_a50;r<_a4d.rows.length;++r){ var _a53=_a4c.rows[r]; var _a52=_a4d.rows[r]; _a52.style.visibility="hidden"; for(var c=0;c<_a52.cells.length;++c){ var _a55=_a52.cells[c]; if(_a47){ _a55=this.m_pinFreezeManager.removeIdAttribute(_a55); } if(_a55.getAttribute("type")=="datavalue"){ _a55.removeAttribute("ctx"); _a55.removeAttribute("uid"); _a55.removeAttribute("name"); }else{ var _a56=_a53.cells[c]; this.markAsCopy(_a56,_a55,_a41,_a43); } } _a52.style.visibility="visible"; } } }; PinFreezeContainer.prototype.applyNeighbouringBorderStylesToHomeCell=function(_a57,_a58){ if(isFF()||isIE()){ if(_a57&&_a57.length&&_a57[0].cells&&_a57[0].cells.length>1){ if(this.m_freezeSide){ var _a59=this.getBorderInfo(_a57[0].cells[1],"right"); if(_a59){ _a58.style.borderRightWidth=_a59.borderRightWidth; _a58.style.borderRightStyle=_a59.borderRightStyle; _a58.style.borderRightColor=_a59.borderRightColor; } } if(this.m_freezeTop){ var _a59=this.getBorderInfo(_a57[0].cells[1],"bottom"); if(_a59){ _a58.style.borderBottomWidth=_a59.borderBottomWidth; _a58.style.borderBottomStyle=_a59.borderBottomStyle; _a58.style.borderBottomColor=_a59.borderBottomColor; } } } } }; PinFreezeContainer.prototype.createTopHeadings=function(_a5a){ var _a5b=this.getSection("pfMainOutput"); var _a5c=_a5b.getAttribute("pfslid"); var _a5d=this.getSection("pfTopHeadings"); var _a5e=_a5d.getAttribute("pfslid"); var _a5f=this.getMainOutputHomeCell(); if(!_a5f){ return; } var _a60=_a5a; var _a61=_a5d; var _a62=this.isA11yEnabled(_a60); var _a63=this.m_pinFreezeManager.deepCloneNode(_a60); _a63.setAttribute("clonednode","true"); _a61.appendChild(_a63); var _a64=_a60.getElementsByTagName("tbody"); var _a65=_a63.getElementsByTagName("tbody"); if(_a64.length>0&&_a65.length>0){ var _a66=_a64[0]; var _a67=_a65[0]; var _a68=_a5f.rowSpan; for(var r=0;r<_a67.rows.length;++r){ var _a6a=_a66.rows[r]; var _a6b=_a67.rows[r]; if(_a62){ _a6b=this.m_pinFreezeManager.removeIdAttribute(_a6b); } _a6b.style.visibility="hidden"; for(var c=0;c<_a6b.cells.length;++c){ var _a6d=_a6b.cells[c]; if(r>_a68||_a6d.getAttribute("type")=="datavalue"){ _a6d.removeAttribute("ctx"); _a6d.removeAttribute("uid"); _a6d.removeAttribute("name"); }else{ var _a6e=_a6a.cells[c]; this.markAsCopy(_a6e,_a6d,_a5c,_a5e); if(_a6e===_a5f){ this.initializeHomeCellTabIndex(_a6d); this.applyNeighbouringBorderStylesToHomeCell(_a66.rows,_a6d); } } } _a6b.style.visibility="visible"; } } }; PinFreezeContainer.prototype.createHomeCellHeading=function(){ var _a6f=this.getSection("pfMainOutput"); var _a70=_a6f.getAttribute("pfslid"); var _a71=this.getSection("pfHomeCell"); var _a72=_a71.parentNode; var _a73=_a71.getAttribute("pfslid"); var _a74=this.getMainOutputHomeCell(); if(!_a74){ return; } _a72.style.height="100%"; var _a75=this.getTopHeadingSectionHeight(_a74); _a71.style.height=_a75-this.m_containerMargin.top+"px"; _a71.style.width=this.getSideHeadingSectionWidth(_a74)-this.m_containerMargin.left+"px"; _a71.style.marginTop=this.m_containerMargin.top+"px"; _a71.style.marginLeft=this.m_containerMargin.left+"px"; var _a76=_a74.parentNode; var _a77=_a76.cloneNode(false); var _a78=this._findBestGuessHomeCell(_a74); var _a79=document.createElement("div"); _a79.style.width="100%"; _a79.style.height="100%"; while(_a74.offsetLeft<=_a78.offsetLeft){ oTargetHomeCell=this.m_pinFreezeManager.deepCloneNode(_a74); if(isFF()||isIE()){ _a74.appendChild(_a79); oTargetHomeCell.style.width=_a79.clientWidth+"px"; _a74.removeChild(_a79); }else{ oTargetHomeCell.style.width=_a74.clientWidth+1+"px"; } oTargetHomeCell.style.borderBottomWidth="0px"; _a77.appendChild(oTargetHomeCell); this.markAsCopy(_a74,oTargetHomeCell,_a70,_a73); if(_a74.nextSibling){ _a74=_a74.nextSibling; }else{ break; } } if(oTargetHomeCell){ oTargetHomeCell.style.borderRightWidth="0px"; } var _a7a=_a76.parentNode; var _a7b=_a7a.cloneNode(false); _a7b.appendChild(_a77); var _a7c=_a7a.parentNode; var _a7d=_a7c.cloneNode(false); _a7d.appendChild(_a7b); _a7d.style.width="100%"; _a7d.style.height="100%"; _a7d.style.marginLeft=""; _a7d.style.marginTop=""; _a71.appendChild(_a7d); this.initializeHomeCellTabIndex(oTargetHomeCell); this.applyNeighbouringBorderStylesToHomeCell(_a6f.firstChild.rows,_a71); }; PinFreezeContainer.prototype.markAsCopy=function(main,copy,_a80,_a81){ if(!main.pfCopy){ main.setAttribute("pfslid",_a80); main.pfCopy=[]; } main.pfCopy.push(copy); copy.pfMain=main; copy.setAttribute("pfslid",_a81); }; PinFreezeContainer.prototype.getCopy=function(_a82){ if(_a82.pfCopy){ var _a83={}; for(var i in _a82.pfCopy){ var copy=_a82.pfCopy[i]; if(copy.getAttribute){ var _a86=copy.getAttribute("pfslid"); if(_a86){ var _a87=PinFreezeContainer.getSectionNameFromSlid(_a86); var _a88=this.getSection(_a87); if(_a88&&PinFreezeContainer.isSectionVisible(_a88)){ _a83[_a87]=copy; } } } } if(_a83["pfHomeCell"]){ return _a83["pfHomeCell"]; } for(i in _a83){ return _a83[i]; } } return null; }; PinFreezeContainer.prototype.getMain=function(_a89){ if(_a89.pfMain){ return _a89.pfMain; } return null; }; PinFreezeContainer.isSectionVisible=function(_a8a){ var node=_a8a; 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 _a8c={isSideFrozen:false,isTopFrozen:false}; if(this.m_freezeSide){ var side=this.getSection("pfSideHeadings"); if(side){ _a8c.isSideFrozen=PinFreezeContainer.isSectionVisible(side); } } if(this.m_freezeTop){ var top=this.getSection("pfTopHeadings"); if(top){ _a8c.isTopFrozen=PinFreezeContainer.isSectionVisible(top); } } return _a8c; }; PinFreezeContainer.prototype.checkSectionStructureChange=function(_a8f,_a90){ if(_a8f.isSideFrozen!==_a90.isSideFrozen||_a8f.isTopFrozen!==_a90.isTopFrozen){ this.m_pinFreezeManager.sectionStructureChange(); } }; PinFreezeContainer.prototype.freezeContainerInReport=function(_a91){ this.cacheContainerAndSections(this.getContainerByLID(_a91)); this.m_homeCellNodes={}; this.updateContainer(); }; PinFreezeContainer.prototype.frozenSectionsRequired=function(){ return (this.frozenSideHeadingsRequired()||this.frozenTopHeadingsRequired()); }; PinFreezeContainer.prototype.frozenSideHeadingsRequired=function(){ var _a92=this.getSection("pfMainOutput"); if(_a92){ if(this.m_freezeSide){ var _a93=_a92.scrollWidth; return ((this.m_clientWidth<_a93)||_a93==0); } } return false; }; PinFreezeContainer.prototype.frozenTopHeadingsRequired=function(){ var _a94=this.getSection("pfMainOutput"); if(_a94){ if(this.m_freezeTop){ var _a95=_a94.scrollHeight; return ((this.m_clientHeight<_a95)||_a95==0); } } return false; }; PinFreezeContainer.prototype.showTemplatePart=function(_a96,_a97){ var _a98=this.getContainer().rows; for(var r=0;r<_a98.length;++r){ if(_a98[r].getAttribute("templatePart")===_a96){ _a98[r].style.display=((_a97)?"":"none"); }else{ var _a9a=_a98[r].cells; for(var c=0;c<_a9a.length;++c){ if(_a9a[c].getAttribute("templatePart")===_a96){ _a9a[c].style.display=((_a97)?"":"none"); } } } } }; PinFreezeContainer.prototype.showFreezeTopOnly=function(_a9c){ if(!(this.m_freezeTop&&this.m_freezeSide)){ return; } var _a9d=(_a9c.scrollWidth==0)?_a9c.clientWidth:_a9c.scrollWidth; this.updateMainOutputWidth(_a9d); this.setScrollX(_a9c,0); if(this.getSection("pfTopHeadings")){ this.getSection("pfTopHeadings").style.width=_a9d+"px"; this.setScrollX(this.getSection("pfTopHeadings"),0); } this.showTemplatePart("freezeSide",false); }; PinFreezeContainer.prototype.showFreezeSideOnly=function(_a9e){ if(!(this.m_freezeTop&&this.m_freezeSide)){ return; } var _a9f=(_a9e.scrollHeight==0)?_a9e.clientHeight:_a9e.scrollHeight; this.updateMainOutputHeight(_a9f); this.setScrollY(_a9e,0); if(this.getSection("pfSideHeadings")){ this.getSection("pfSideHeadings").style.height=_a9f+"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(_aa0){ this.updateMainOutputWidth((_aa0.scrollWidth==0)?_aa0.clientWidth:_aa0.scrollWidth); this.updateMainOutputHeight((_aa0.scrollHeight==0)?_aa0.clientHeight:_aa0.scrollHeight); this.setInitialScrollPosition(_aa0,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(_aa3){ return _aa3.firstChild?true:false; }; PinFreezeContainer.prototype.updateContainer=function(){ var _aa4=this.getSection("pfMainOutput"); var _aa5=this.getMainOutputHomeCell(); if(_aa5){ if(this.m_scrollableClientHeight===this.m_clientHeight||!this.m_scrollableClientHeight){ this.m_scrollableClientHeight-=_aa5.offsetHeight; var _aa6=this.calculateMinCrossTabScrollableClientHeight(); if(_aa6>this.m_scrollableClientHeight){ this.m_scrollableClientHeight=_aa6; } } if(this.m_scrollableClientWidth===this.m_clientWidth||!this.m_scrollableClientWidth){ this.m_scrollableClientWidth-=this.getHomeCellOffsetWidth(_aa5); } } if(_aa4&&_aa5){ this.showAll(); if(this.frozenSectionsRequired()){ this.updateMainOutputSize(); this.initializeHomeCellTabIndex(_aa5); if(this.m_freezeSide){ var _aa7=this.getSection("pfSideHeadings"); if(!this.headingsCreated(_aa7)){ this.createSideHeadings(this.m_cachedBaseContainer); if(this.m_freezeTop){ this.initializeTouchScrolling(_aa7); } } var _aa8=this.getSection("pfHorizontalScrollBar"); _aa8.scrollLeft="0px"; } if(this.m_freezeTop){ var _aa9=this.getSection("pfTopHeadings"); if(!this.headingsCreated(_aa9)){ this.createTopHeadings(this.m_cachedBaseContainer); if(this.m_freezeSide){ this.initializeTouchScrolling(_aa9); } } var _aaa=this.getSection("pfVerticalScrollBar"); _aaa.scrollTop="0px"; } if(this.m_freezeSide&&this.m_freezeTop){ var _aab=this.getSection("pfHomeCell"); if(!this.headingsCreated(_aab)){ this.createHomeCellHeading(); } _aab.style.display=""; } var _aac=this.updateSideHeadingSize(_aa5); var _aad=this.updateTopHeadingSize(_aa5); if(!this.frozenSectionsRequired()){ this.showMainOutputOnly(_aa4); } this.setInitialScrollPosition(_aa4,_aac,_aad); if(this.m_freezeTop&&this.m_freezeSide){ this.setInitialScrollPosition(this.getSection("pfSideHeadings"),0,_aad); this.setInitialScrollPosition(this.getSection("pfTopHeadings"),_aac,0); } this.initializeTouchScrolling(_aa4); }else{ this.showMainOutputOnly(_aa4); this.removeTouchScrolling(); } this.updateTabIndexValues(); } }; PinFreezeContainer.prototype.calculateMinCrossTabScrollableClientHeight=function(){ var _aae=0; if(this.m_cachedPFContainer){ var _aaf=this.getElementByLID(this.m_cachedPFContainer,"table",this.m_lid+this.m_viewerId); if(_aaf){ var _ab0=0; for(var r=0;r<_aaf.rows.length;r++){ var row=_aaf.rows[r]; for(var c=0;c=2){ break; } } } } return _aae; }; PinFreezeContainer.prototype.updateSideHeadingSize=function(_ab6){ var _ab7=0; if(this.m_freezeSide){ var _ab8=this.getSection("pfMainOutput"); if(!_ab8){ return 0; } if(!this.frozenSideHeadingsRequired()){ this.showFreezeTopOnly(_ab8); return 0; } var _ab9=this.getSection("pfSideHeadings"); _ab7=this.getSideHeadingSectionWidth(_ab6); var _aba=this.getSection("pfHorizontalScrollBar"); var _abb=this.getSectionHomeCell(_ab9); if(_ab9.style.display=="none"){ _ab9.style.display=""; _aba.style.display=""; } _ab9.style.width=_ab7+"px"; _ab9.style.height=_ab8.clientHeight+"px"; } return _ab7; }; PinFreezeContainer.prototype.updateTopHeadingSize=function(_abc){ var _abd=0; if(this.m_freezeTop){ var _abe=this.getSection("pfMainOutput"); if(!_abe){ return 0; } if(!this.frozenTopHeadingsRequired()){ this.showFreezeSideOnly(_abe); return 0; } var _abf=this.getSection("pfTopHeadings"); _abd=this.getTopHeadingSectionHeight(_abc); var _ac0=this.getSection("pfVerticalScrollBar"); var _ac1=this.getSectionHomeCell(_abf); if(_abf.style.display=="none"){ _abf.style.display=""; _ac0.style.display=""; } _abf.style.height=_abd+"px"; _abf.style.width=_abe.clientWidth+"px"; } return _abd; }; PinFreezeContainer.prototype.setScrollX=function(_ac2,_ac3){ if(getElementDirection(_ac2)==="rtl"){ setScrollRight(_ac2,_ac3); }else{ setScrollLeft(_ac2,_ac3); } }; PinFreezeContainer.prototype.setScrollY=function(_ac4,_ac5){ _ac4.scrollTop=_ac5; }; PinFreezeContainer.prototype.setInitialScrollPosition=function(_ac6,_ac7,_ac8){ if(getElementDirection(_ac6)==="rtl"){ setScrollRight(_ac6,_ac7); }else{ setScrollLeft(_ac6,_ac7); } _ac6.scrollTop=_ac8; }; PinFreezeContainer.prototype.getScrollableClientWidth=function(){ return this.m_scrollableClientWidth; }; PinFreezeContainer.prototype.setScrollableClientWidth=function(_ac9){ this.m_scrollableClientWidth=_ac9; }; 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(_aca){ this.m_scrollableClientHeight=_aca; }; PinFreezeContainer.prototype.getClientHeight=function(){ return this.m_clientHeight; }; PinFreezeContainer.prototype.clientHeight=function(_acb){ return _acb.clientHeight; }; PinFreezeContainer.prototype.findBestContainerHeight=function(_acc){ if(this.m_freezeTop&&this.m_cachedReportDiv){ var _acd=this.m_cachedReportDiv.parentNode; if(_acd){ var _ace=this._findRestOfPageHeight(this.getContainer()); return _acc-_ace-(this.c_pageMargin/2)-this.m_containerMargin.top; } } return _acc-this.c_pageMargin; }; PinFreezeContainer.prototype.findBestContainerWidth=function(_acf){ 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 _ad1=0; var _ad2=node.parentNode.childNodes; for(var i=0;i<_ad2.length;i++){ if(_ad2[i]!==node){ _ad1+=_ad2[i].clientWidth; } } return _acf-_ad1-(this.c_pageMargin/2); } return _acf; }; PinFreezeContainer.prototype._findRestOfPageHeight=function(node){ var _ad5=0; var _ad6=node.parentNode; if(!_ad6){ return _ad5; } if(_ad6.childNodes.length>1){ for(var i=0;i<_ad6.childNodes.length;i++){ var _ad8=_ad6.childNodes[i]; if(_ad8.nodeType==1){ var _ad9=this.getStyleDisplay(_ad8); if(_ad8!=node&&!isNaN(_ad8.clientHeight)&&_ad9!="none"&&_ad9!="table-cell"){ _ad5+=this.clientHeight(_ad8); } } } } if(node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){ _ad5+=this._findRestOfPageHeight(_ad6); } return _ad5; }; PinFreezeContainer.prototype.resize=function(_ada,_adb,_adc,_add){ if(this.m_fixedWidth&&this.m_fixedHeight){ return; } _ada=(this.m_fixedWidth)?this.m_fixedWidth:_ada; _adb=(this.m_fixedHeight)?this.m_fixedHeight:_adb; var _ade=this.getSectionStructure(); if(this.m_sectionCache&&this.m_cachedPFContainer){ var _adf=0; if(_adb!==0){ _adf=this.findBestContainerHeight(_adb); if(_adc&&_adf<300){ _adf=300; }else{ if(_adf<100){ _adf=100; } } } this.m_clientHeight=_adf>0?_adf:this.m_clientHeight; var _ae0=0; if(_ada!==0){ _ae0=this.findBestContainerWidth(_ada); } this.m_clientWidth=(_ae0>0)?_ae0-5-(this.c_pageMargin/2):this.m_clientWidth; var _ae1=this.getSection("pfMainOutput"); var _ae2=this.getSectionHomeCell(_ae1); if(_ae2){ this.m_scrollableClientWidth=this.m_clientWidth-this.getSideHeadingSectionWidth(_ae2); this.m_scrollableClientHeight=this.m_clientHeight-_ae2.offsetHeight; } if(_add){ var _ae3=getElementsByAttribute(this.m_cachedPFContainer,"div","pflid",_add.lid); if(_ae3){ var node=_ae3[0]; while(node.nodeName.toLowerCase()!="table"){ node=node.parentNode; } node.style.width=_add.width+"px"; } } this.updateContainer(); }else{ this.m_clientWidth=_ada-this.c_pageMargin; this.m_clientHeight=_adb-this.c_pageMargin; } var _ae5=this.getSectionStructure(); this.checkSectionStructureChange(_ade,_ae5); }; 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(_ae6){ var _ae7=this.getSection("pfMainOutput"); if(!_ae7){ return; } if(this.m_freezeSide==true){ _ae7.style.width=(_ae6+"px"); if(this.m_freezeTop==false||!this.frozenTopHeadingsRequired()){ _ae7.style.height=_ae7.firstChild.clientHeight+"px"; } var _ae8=this.getSection("pfHorizontalScrollBar"); if(_ae8){ _ae8.style.width=(_ae6+"px"); var _ae9=_ae8.firstChild; if(_ae9){ var _aea=this.getSectionHomeCell(_ae7); var _aeb=_ae7.scrollWidth-this.getHomeCellOffsetWidth(_aea); _ae9.style.width=_aeb+"px"; } } } }; PinFreezeContainer.prototype.updateMainOutputHeight=function(_aec){ var _aed=this.getSection("pfMainOutput"); if(!_aed){ return; } _aed.style.height=(_aec+"px"); if(!this.m_freezeSide||!this.frozenSideHeadingsRequired()){ _aed.style.width=_aed.firstChild.clientWidth+2+"px"; } var _aee=this.getSection("pfVerticalScrollBar"); if(_aee){ _aee.style.height=(_aec+"px"); var _aef=_aee.firstChild; if(_aef){ var _af0=this.getSectionHomeCell(_aed); var _af1=_aed.scrollHeight-_af0.offsetHeight; _aef.style.height=_af1+"px"; } } }; PinFreezeContainer.prototype.getElementByLID=function(_af2,tag,lid){ var _af5=getElementsByAttribute(_af2,tag,"lid",lid); if(_af5.length>0){ return _af5[0]; } return null; }; PinFreezeContainer.prototype.getContainerByLID=function(_af6){ var _af7=getElementsByAttribute(_af6,"table","pfclid","pfContainer_"+this.m_lidNS); if(_af7.length>0){ return _af7[0]; } return null; }; PinFreezeContainer.prototype.getSectionByLID=function(_af8,_af9){ var _afa=getElementsByAttribute(_af8,"div","pfslid",_af9+"_"+this.m_lidNS); if(_afa.length>0){ return _afa[0]; } return null; }; PinFreezeContainer.getSectionNameFromSlid=function(slid){ return slid?slid.split("_")[0]:null; }; PinFreezeContainer.getLidFromSlid=function(slid){ return slid.split("_")[1]; }; PinFreezeContainer.nodeToSlid=function(_afd){ while(_afd.parentNode&&!_afd.getAttribute("pfslid")){ _afd=_afd.parentNode; } if(_afd.getAttribute){ return _afd.getAttribute("pfslid"); } return null; }; PinFreezeContainer.prototype.cacheContainerAndSections=function(_afe){ if(!_afe){ return _afe; } this.m_cachedPFContainer=_afe; var _aff=getElementsByAttribute(this.m_cachedPFContainer,"div","pflid",this.m_lidNS); this.m_sectionCache={}; for(var i=0;i<_aff.length;++i){ var key=_aff[i].getAttribute("pfslid"); key=key.split("_",1); this.m_sectionCache[key]=_aff[i]; } return _afe; }; 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(_b03){ var slid=PinFreezeContainer.nodeToSlid(_b03); if(!this.m_homeCellNodes[slid]){ var _b05=getElementsByAttribute(_b03,"*","tabIndex","*"); for(var i in _b05){ if(!_b05[i].getAttribute("widgetid")){ this.m_homeCellNodes[slid]=_b05[i]; break; } } } }; PinFreezeContainer.prototype.updateTabIndexValues=function(){ if(this.isContainerFrozen()){ for(var slid in this.m_homeCellNodes){ var _b08=this.m_pinFreezeManager.isNodeVisible(this.m_homeCellNodes[slid])?"0":"-1"; this.m_homeCellNodes[slid].setAttribute("tabIndex",_b08); } }else{ for(var slid in this.m_homeCellNodes){ var _b08=(PinFreezeContainer.getSectionNameFromSlid(slid)==="pfMainOutput")?"0":"-1"; this.m_homeCellNodes[slid].setAttribute("tabIndex",_b08); } } }; PinFreezeContainer.prototype.getSectionHomeCell=function(_b09){ if(_b09){ var _b0a=this.getElementByLID(_b09,"table",this.m_lid+this.m_viewerId); if(_b0a&&_b0a.rows.length&&_b0a.rows[0].cells.length){ return _b0a.rows[0].cells[0]; } } return null; }; PinFreezeContainer.prototype.getMainOutputHomeCell=function(){ var _b0b=this.getSection("pfMainOutput"); if(!_b0b){ _b0b=this.getSectionByLID(this.m_cachedPFContainer,"pfMainOutput"); } return this.getSectionHomeCell(_b0b); }; PinFreezeContainer.prototype.getChildPosition=function(_b0c,_b0d){ for(var i=0;i<_b0c.childNodes.length;++i){ if(_b0c.childNodes[i]==_b0d){ return i; } } return -1; }; PinFreezeContainer.prototype.insertAt=function(_b0f,_b10,_b11){ if(_b11==_b0f.childNodes.length){ _b0f.appendChild(_b10); }else{ _b0f.insertBefore(_b10,_b0f.childNodes[_b11]); } }; PinFreezeContainer.prototype.synchScroll=function(){ if(!this.m_cachedPFContainer){ return; } var _b12=this.getMainOutputHomeCell(); var _b13=this.getSection("pfMainOutput"); var _b14=this.getSection("pfSideHeadings"); if(_b14!=null){ var _b15=this.getSection("pfHorizontalScrollBar"); if(_b15){ var _b16=this.getSideHeadingSectionWidth(_b12); if(getElementDirection(_b13)==="rtl"){ _b16=0; } setScrollLeft(_b13,getScrollLeft(_b15)+_b16); if(this.m_freezeTop){ setScrollLeft(this.getSection("pfTopHeadings"),getScrollLeft(_b15)+_b16); } } } }; PinFreezeContainer.prototype.updateScroll=function(_b17){ var slid=PinFreezeContainer.nodeToSlid(_b17); if(!slid){ return; } var _b19=PinFreezeContainer.getSectionNameFromSlid(slid); if(!_b19){ return; } var _b1a=document.getElementById("CVReport"+this.m_viewerId); if(!_b1a){ return; } if(!this.m_cachedPFContainer){ return; } var _b1b=_b17.parentNode; if(_b1b){ var _b1c=_b1b.tagName.toLowerCase(); if(_b1c==="td"||_b1c==="th"){ var _b1d=this.getMainOutputHomeCell(); var _b1e=this.getSection("pfMainOutput"); if(_b19==="pfMainOutput"||_b19==="pfTopHeadings"){ var _b1f=this.getSection("pfHorizontalScrollBar"); if(_b1f){ var _b20=PinFreezeContainer.calculateNewPosition(_b1b.offsetLeft,_b1b.offsetWidth,getScrollLeft(_b1e),_b1e.offsetWidth); var _b21=this.getHomeCellOffsetWidth(_b1d); if(getElementDirection(_b1e)==="rtl"){ _b21=0; } setScrollLeft(_b1f,_b20-_b21); setScrollLeft(_b1e,_b20); } } if(_b19==="pfMainOutput"||_b19==="pfSideHeadings"){ var _b22=this.getSection("pfVerticalScrollBar"); if(_b22){ var _b23=PinFreezeContainer.calculateNewPosition(_b1b.offsetTop,_b1b.offsetHeight,_b1e.scrollTop,_b1e.offsetHeight); _b22.scrollTop=_b23-_b1d.offsetHeight; _b1e.scrollTop=_b23; } } } } }; PinFreezeContainer.calculateNewPosition=function(_b24,_b25,_b26,_b27){ var _b28=_b24+_b25; var _b29=_b26+_b27; if(_b26>_b24){ return _b24; }else{ if(_b29<_b28){ if(_b25>_b27){ return _b24; } return _b28-_b27; } } return _b26; }; PinFreezeContainer.prototype.synchVScroll=function(){ if(!this.m_cachedPFContainer){ return; } var _b2a=this.getMainOutputHomeCell(); var _b2b=this.getSection("pfMainOutput"); var _b2c=this.getSection("pfTopHeadings"); if(_b2c!=null){ var _b2d=this.getSection("pfVerticalScrollBar"); if(_b2d){ _b2b.scrollTop=_b2d.scrollTop+this.getTopHeadingSectionHeight(_b2a); if(this.m_freezeSide){ this.getSection("pfSideHeadings").scrollTop=_b2d.scrollTop+this.getTopHeadingSectionHeight(_b2a); } } } }; PinFreezeContainer.prototype.getTopHeadingSectionHeight=function(_b2e){ return _b2e.offsetHeight+_b2e.offsetTop+this.m_containerMargin.top; }; PinFreezeContainer.prototype._findBestGuessHomeCell=function(_b2f){ if(this.m_bestGuessHomeCell){ return this.m_bestGuessHomeCell; } if(_b2f){ var _b30=_b2f.parentNode.parentNode; var _b31=_b2f.rowSpan?(_b2f.rowSpan):1; var tr=_b30.childNodes[_b31]; if(tr){ var _b33=tr.childNodes.length; var _b34=null; var td=null; for(var i=0;i<_b33;i++){ td=tr.childNodes[i]; if(td.getAttribute("type")=="datavalue"){ break; } _b34=td; } if(_b34){ this.m_bestGuessHomeCell=_b34; return this.m_bestGuessHomeCell; } }else{ return _b2f; } } return null; }; PinFreezeContainer.prototype.getHomeCellOffsetWidth=function(_b37){ var _b38=this._findBestGuessHomeCell(_b37); return _b38?_b38.offsetWidth:0; }; PinFreezeContainer.prototype.getSideHeadingSectionWidth=function(_b39){ var _b3a=this._findBestGuessHomeCell(_b39); if(_b3a){ return _b3a.offsetWidth+_b3a.offsetLeft+this.m_containerMargin.left; }else{ return _b39.offsetWidth+_b39.offsetLeft; } }; PinFreezeContainer.prototype.isContainerFrozen=function(){ return (this.m_freezeTop||this.m_freezeSide); }; PinFreezeContainer.prototype.unfreeze=function(_b3b){ var _b3c=this.getContainerByLID(_b3b); this.m_freezeTop=false; this.m_freezeSide=false; if(_b3c){ var _b3d=_b3c.parentNode; pfMainOutput=this.getSectionByLID(_b3c,"pfMainOutput"); if(pfMainOutput&&_b3d){ if(_b3c.style.border!==""){ pfMainOutput.firstChild.style.border=_b3c.style.border; _b3c.style.border=""; } if(this.m_wrapFlag){ var _b3e=pfMainOutput.firstChild.getElementsByTagName("span"); if(_b3e){ for(var k=0;k<_b3e.length;k++){ _b3e[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; } _b3d.replaceChild(this.m_pinFreezeManager.deepCloneNode(pfMainOutput.firstChild),_b3c); } } }; PinFreezeContainer.prototype.getBorderInfo=function(el,_b41){ var _b42={}; var _b43="border-"+_b41+"-"; var _b44="border"+_b41.charAt(0).toUpperCase()+_b41.substring(1); if(el.currentStyle){ _b42[_b44+"Width"]=el.currentStyle[_b44+"Width"]; _b42[_b44+"Style"]=el.currentStyle[_b44+"Style"]; _b42[_b44+"Color"]=el.currentStyle[_b44+"Color"]; }else{ if(window.getComputedStyle){ _b42[_b44+"Width"]=window.getComputedStyle(el,null).getPropertyValue(_b43+"width"); _b42[_b44+"Style"]=window.getComputedStyle(el,null).getPropertyValue(_b43+"style"); _b42[_b44+"Color"]=window.getComputedStyle(el,null).getPropertyValue(_b43+"color"); }else{ return null; } } return _b42; }; PinFreezeContainer.prototype.isA11yEnabled=function(_b45){ return (_b45.getAttribute("role")==="grid"); }; PinFreezeContainer.isElementInMainOutput=function(_b46){ var _b47=PinFreezeContainer.nodeToSlid(_b46); if(_b47){ return (_b47.indexOf("pfMainOutput_")===0); } return false; }; PinFreezeContainer.prototype.removeCTX=function(_b48){ _b48.removeAttribute("ctx"); var _b49=getElementsByAttribute(_b48,"*","ctx","*"); if(_b49&&_b49.length){ for(var i=0;i<_b49.length;i++){ _b49[i].removeAttribute("ctx"); } } }; PinFreezeContainer.prototype.initializeTouchScrolling=function(_b4b){ if(!this.m_pinFreezeManager.isIWidgetMobile()){ return; } if(_b4b){ _b4b.m_pinFreezeContainer=this; if(document.attachEvent){ _b4b.attachEvent("touchstart",this.touchStart); _b4b.attachEvent("touchmove",this.touchMove); _b4b.attachEvent("touchend",this.touchEnd); }else{ _b4b.addEventListener("touchstart",this.touchStart,false); _b4b.addEventListener("touchmove",this.touchMove,false); _b4b.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(_b4c){ if(!this.m_pinFreezeManager.isIWidgetMobile()){ return; } if(_b4c){ if(document.detachEvent){ _b4c.detachEvent("touchstart",this.touchStart); _b4c.detachEvent("touchmove",this.touchMove); _b4c.detachEvent("touchend",this.touchEnd); }else{ _b4c.removeEventListener("touchstart",this.touchStart,false); _b4c.removeEventListener("touchmove",this.touchMove,false); _b4c.removeEventListener("touchend",this.touchEnd,false); } } }; PinFreezeContainer.prototype.touchMove=function(e){ if(this.m_pinFreezeContainer&&e&&e.changedTouches&&e.touches&&e.touches.length==1){ var _b4e=e.changedTouches[0]; if(_b4e&&_b4e.clientX&&_b4e.clientY){ var _b4f=parseInt(_b4e.clientX); var _b50=parseInt(_b4e.clientY); if(this.m_pinFreezeContainer.touchMoveHandler(_b4f,_b50)){ return stopEventBubble(e); } } } }; PinFreezeContainer.prototype.touchStart=function(e){ if(this.m_pinFreezeContainer&&e&&e.changedTouches&&e.touches&&e.touches.length==1){ var _b52=e.changedTouches[0]; if(_b52&&_b52.clientX&&_b52.clientY){ var _b53=parseInt(_b52.clientX); var _b54=parseInt(_b52.clientY); this.m_pinFreezeContainer.touchStartHandler(_b53,_b54); } } }; PinFreezeContainer.prototype.touchStartHandler=function(_b55,_b56){ this.touchScrollSections=false; this.touchPreviousX=_b55; this.touchPreviousY=_b56; }; PinFreezeContainer.prototype.touchEnd=function(e){ if(this.m_pinFreezeContainer&&this.m_pinFreezeContainer.touchEndHandler()){ stopEventBubble(e); } }; PinFreezeContainer.prototype.touchEndHandler=function(){ var _b58=this.touchScrollSections; this.touchScrollSections=false; this.touchPreviousX=-1; this.touchPreviousY=-1; return _b58; }; PinFreezeContainer.prototype.touchMoveHandler=function(_b59,_b5a){ var _b5b=this.getSection("pfMainOutput"); if(!_b5b){ return; } var _b5c=this.getSectionHomeCell(_b5b); var _b5d=this.getTopHeadingSectionHeight(_b5c); var _b5e=this.getSideHeadingSectionWidth(_b5c); var _b5f=_b5a-this.touchPreviousY; var _b60=_b59-this.touchPreviousX; if(this.touchScrollSections){ if(_b5f!=0){ var _b61=_b5b.scrollTop-_b5f; _b61=(_b61>_b5d)?_b61:_b5d; _b5b.scrollTop=_b61; var _b62=this.getSection("pfSideHeadings"); if(_b62){ _b62.scrollTop=_b61; } } if(_b60!=0){ var _b63=_b5b.scrollLeft-_b60; _b63=(_b63>_b5e)?_b63:_b5e; _b5b.scrollLeft=_b63; var _b64=this.getSection("pfTopHeadings"); if(_b64){ _b64.scrollLeft=_b63; } } }else{ this.firstTouchMove(_b5b,_b60,_b5f,_b5e,_b5d); } this.touchPreviousX=_b59; this.touchPreviousY=_b5a; return this.touchScrollSections; }; PinFreezeContainer.prototype.firstTouchMove=function(_b65,_b66,_b67,_b68,_b69){ var _b6a=this.mostlyVerticalTouchMove(_b66,_b67); var _b6b=PinFreezeContainer.isSectionVisible(this.getSection("pfTopHeadings")); var _b6c=PinFreezeContainer.isSectionVisible(this.getSection("pfSideHeadings")); if(_b6a&&(!_b6b||(_b67>0&&_b65.scrollTop<=_b69)||(_b67<0&&_b65.scrollTop+_b65.clientHeight>=_b65.scrollHeight))){ this.touchScrollSections=false; }else{ if(!_b6a&&(!_b6c||(_b66>0&&_b65.scrollLeft<=_b68)||(_b66<0&&_b65.scrollLeft+_b65.clientWidth>=_b65.scrollWidth))){ this.touchScrollSections=false; }else{ this.touchScrollSections=true; } } }; PinFreezeContainer.prototype.mostlyVerticalTouchMove=function(_b6d,_b6e){ var _b6f=(_b6d>0)?_b6d:0-_b6d; var _b70=(_b6e>0)?_b6e:0-_b6e; return (_b70>_b6f); }; 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,_b73,_b74,_b75,_b76){ if(_b73||_b74){ if(!this.m_frozenInfo){ this.m_frozenInfo={}; } if(!this.m_frozenInfo[lid]){ this._createDefaultFrozenInfo(lid); } this.m_frozenInfo[lid].freezeTop=_b73; this.m_frozenInfo[lid].freezeSide=_b74; var _b77=this.newContainer(lid,_b73,_b74,_b75,_b76); this.m_frozenInfo[lid].pinFreezeContainers.push(_b77); return _b77; } return null; }; PinFreezeManager.prototype.newContainer=function(lid,_b79,_b7a,_b7b,_b7c){ return new PinFreezeContainer(this,lid,this.m_viewerId,_b79,_b7a,_b7b,_b7c); }; 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 _b80=this.m_frozenInfo[lid]; if(_b80){ delete _b80.pinFreezeContainers; _b80.pinFreezeContainers=[]; _b80.freezeTop=false; _b80.freezeSide=false; } }; PinFreezeManager.prototype.prepopulateFrozenInfo=function(_b81){ var _b82=getDescendantElementsByAttribute(_b81,"table","lid","",false,-1,new RegExp("[\\s\\S]*")); if(_b82){ if(!this.m_frozenInfo){ this.m_frozenInfo={}; } for(var i=0;i<_b82.length;i++){ var _b84=_b82[i]; if(_b84.getAttribute("id")=="rt"+this.m_viewerId){ continue; } var lid=this.removeNamespace(_b84.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 _b86=getDescendantElementsByAttribute(_b84,"table","lid","",false,-1,new RegExp("[\\s\\S]*")); if(_b86){ for(var _b87=0;_b87<_b86.length;_b87++){ var _b88=_b86[_b87]; var _b89=this.removeNamespace(_b88.getAttribute("lid")); if(!this.m_frozenInfo[lid].childContainers[_b89]){ var _b8a=_b88.parentNode; while(_b8a&&!_b8a.getAttribute("lid")){ _b8a=_b8a.parentNode; } if(_b8a&&this.removeNamespace(_b8a.getAttribute("lid"))==lid){ this.m_frozenInfo[lid].childContainers[_b89]=true; } } } } } this._updateParentContainerInfo(); } }; PinFreezeManager.prototype._updateParentContainerInfo=function(){ for(var _b8b in this.m_frozenInfo){ var _b8c=this.m_frozenInfo[_b8b].childContainers; if(_b8c){ for(var _b8d in _b8c){ if(this.m_frozenInfo[_b8d]){ this.m_frozenInfo[_b8d].parentContainer=_b8b; 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,_b90,_b91){ var _b92=document.getElementById("CVReport"+this.m_viewerId); this.prepopulateFrozenInfo(_b92); var _b93=this.getTopLevelContainerLID(lid); this.unfreezeAllNestedContainers(_b93,_b92); this.m_frozenInfo[lid].freezeTop=_b90; this.m_frozenInfo[lid].freezeSide=_b91; var _b94=this._createPinAndFreezeObject(_b92,_b93); this.m_lastWidthProcessed=0; this.m_lastHeightProcessed=0; this._resizePinFreezeObjects(_b94); this.sectionStructureChange(); if(isIE()){ var obj=this; setTimeout(function(){ obj.refresh(); },1); var _b96=document.getElementById("RVContent"+this.m_viewerId); this.m_oCV.repaintDiv(_b96); } return _b94; }; 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,_b9b){ if(this.m_frozenInfo&&this.m_frozenInfo[lid]&&this.m_frozenInfo[lid].pinFreezeContainers[0]){ _b9b=_b9b?_b9b:0; return this.m_frozenInfo[lid].pinFreezeContainers[_b9b]; } return null; }; PinFreezeManager.prototype.nodeToContainer=function(node){ var slid=PinFreezeContainer.nodeToSlid(node); var _b9e=null; if(slid){ var lid=this.removeNamespace(PinFreezeContainer.getLidFromSlid(slid)); _b9e=this.getContainer(lid); } return _b9e; }; PinFreezeManager.prototype.getContainerElement=function(_ba0){ var lid=this.removeNamespace(_ba0.getAttribute("lid")); if(lid){ var _ba2=this.getContainer(lid); if(_ba2){ return _ba2.getContainer(); } } return null; }; PinFreezeManager.prototype._createPinAndFreezeObject=function(_ba3,lid){ var _ba5=null; if(this.m_frozenInfo){ var _ba6=this.m_frozenInfo[lid]; var _ba7=_ba6.initialLoad; if(_ba7){ delete _ba6.initialLoad; } var _ba8=_ba6.freezeTop; var _ba9=_ba6.freezeSide; var _baa=null; if(_ba7&&_ba6.pinFreezeContainers&&(_ba8||_ba9)){ _baa=_ba6.pinFreezeContainers.slice(0); } var _bab=_ba3; if(_ba6&&_ba6.parentContainer){ var _bac=getElementsByAttribute(_ba3,"table","lid",_ba6.parentContainer+this.m_viewerId); if(_bac){ for(parentIndex=0;parentIndex<_bac.length;parentIndex++){ if(!_bac[parentIndex].getAttribute("clonednode")){ _bab=_bac[parentIndex]; break; } } } } if(_ba6.childContainers){ for(var _bad in _ba6.childContainers){ var _bae=this._createPinAndFreezeObject(_bab,_bad); _ba5=_ba5?_ba5:_bae; } } var _baf=getElementsByAttribute(_bab,"table","lid",lid+this.m_viewerId); if(_baf&&_baf.length>0){ delete _ba6.pinFreezeContainers; _ba6.pinFreezeContainers=[]; }else{ return null; } if(_baf&&(_ba8||_ba9)){ var _bb0=(_ba5!==null); for(var i=0;i<_baf.length;i++){ var _bb2=_baf[i]; if(_bb2.getAttribute("clonednode")=="true"){ continue; } _ba5=this.addContainerObject(lid,_ba8,_ba9,_bb2,i); if(_ba5){ _ba5.createPFContainer(_bab,_bb0); if(_ba7){ _ba5.copyProperties(_baa[0]); } _ba5.freezeContainerInReport(_ba3); } } } } return _ba5; }; PinFreezeManager.prototype.renderReportWithFrozenContainers=function(_bb3){ if(this.m_frozenInfo){ var _bb4=false; var _bb5=null; for(var _bb6 in this.m_frozenInfo){ var _bb7=this.m_frozenInfo[_bb6]; if(!_bb4){ _bb4=_bb7.initialLoad; } if(!_bb7.parentContainer){ var temp=this._createPinAndFreezeObject(_bb3,_bb7.lid); _bb5=_bb5?_bb5:temp; } } if(!_bb4&&_bb5){ this._resizePinFreezeObjects(_bb5); } this.refresh(); } }; PinFreezeManager.prototype._resizePinFreezeObjects=function(_bb9){ var _bba,_bbb; var _bbc=this.m_oCV.getViewerWidget(); if(_bbc){ var size=_bbc.getWidgetSize(); _bbb=(size&&size.w&&(size.w2)?_bc0:0; var _bc5=(Math.abs(_bc1-this.m_lastHeightProcessed)>2)?_bc1:0; for(var lid in this.m_frozenInfo){ if(!this.m_frozenInfo[lid].parentContainer){ this.resizeContainer(lid,_bc4,_bc5); } } this.m_lastWidthProcessed=_bc0; this.m_lastHeightProcessed=_bc1; }; PinFreezeManager.prototype.resizeContainer=function(lid,_bc8,_bc9){ var _bca=this.m_frozenInfo[lid]; if(_bca){ var _bcb=null; if(_bca.childContainers){ var _bcc=_bc8>10?_bc8-10:_bc8; var _bcd=_bc9>10?_bc9-10:_bc9; for(var _bce in _bca.childContainers){ _bcb=this.resizeContainer(_bce,_bcc,_bcd); } } var _bcf=_bca.pinFreezeContainers; var _bd0=null; var _bd1=null; if(_bcf){ for(var i=0;i<_bcf.length;i++){ _bd0=_bcf[i]; _bd0.resize(_bc8,_bc9,_bca.parentContainer,_bcb); var _bd3=_bd0.getContainer(); if(_bd3&&(!_bd1||(_bd1.width<_bd3.clientWidth))){ _bd1={"width":_bd3.clientWidth,"lid":_bd0.m_lidNS}; } } } return _bd1; } }; PinFreezeManager.prototype.processAutoResize=function(_bd4,_bd5){ this.m_lastWidthProcessed=_bd4; this.m_lastHeightProcessed=_bd5; }; PinFreezeManager.prototype.onSetVisible=function(){ this.refresh(); if(this.m_repaintOnVisible){ this.rePaint(); this.m_repaintOnVisible=false; } }; PinFreezeManager.prototype.onResizeCanvas=function(_bd6){ if(_bd6){ 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 _bd8 in this.m_frozenInfo){ var _bd9=this.m_frozenInfo[_bd8].pinFreezeContainers; if(_bd9){ for(var i=0;i<_bd9.length;i++){ var _bdb=_bd9[i]; _bdb.synchScroll(); _bdb.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(_be8){ var _be9=this.m_oCV.getSelectionController().getAllSelectedObjects(); if(_be9&&_be9.length&&(_be9[0].getDataContainerType()==="crosstab"||(_be8&&_be9[0].getDataContainerType()==="list"))){ var lid=(_be9[0].getLayoutElementId()); if(lid){ if(!this.hasPromptControlsInFreezableCells(lid)){ return this.removeNamespace(lid); } } } return null; }; PinFreezeManager.prototype.hasPromptControlsInFreezableCells=function(lid){ var _bec=this.m_oCV.getLayoutElementFromLid(lid); var _bed=getElementsByAttribute(_bec,["td","th"],"type","columnTitle"); var _bee=new RegExp("(^|[W])clsPromptComponent($|[W])"); var _bef=isIE()?"className":"class"; for(var j in _bed){ if(_bed.hasOwnProperty(j)){ var _bf1=getElementsByAttribute(_bed[j],"*",_bef,null,1,_bee); if(_bf1.length>0){ return true; } } } return false; }; PinFreezeManager.prototype.unfreeze=function(lid,_bf3,_bf4){ if(this.m_frozenInfo&&this.m_frozenInfo[lid]){ var _bf5=this.m_frozenInfo[lid].pinFreezeContainers; if(_bf5){ for(var i=0;i<_bf5.length;i++){ var _bf7=_bf5[i]; _bf7.unfreeze(_bf3); } if(_bf4){ this._resetFrozenInfo(lid); } } } }; PinFreezeManager.prototype.unfreezeAllNestedContainers=function(lid,_bf9){ var _bfa=this.m_frozenInfo[lid]; if(_bfa){ if(_bfa.freezeTop||_bfa.freezeSide){ this.unfreeze(lid,_bf9,false); } if(_bfa.childContainers){ for(var _bfb in _bfa.childContainers){ this.unfreezeAllNestedContainers(_bfb,_bf9); } } } }; PinFreezeManager.prototype.isNodeVisible=function(node){ var slid=PinFreezeContainer.nodeToSlid(node); if(!slid){ return true; } var lid=this.removeNamespace(PinFreezeContainer.getLidFromSlid(slid)); var _bff=this.getContainer(lid); if(!_bff){ return true; } var _c00=PinFreezeContainer.getSectionNameFromSlid(slid); var _c01=_bff.getSection(_c00); var _c02=null,_c03=null; var _c04=node; var _c05=null; while(_c04&&_c04!==_c01&&!_c02&&!_c03){ _c02=_bff.getMain(_c04); _c03=_bff.getCopy(_c04); _c05=_c04; _c04=_c04.parentNode; } var _c06=_c02?true:false; var _c07=_c03?true:false; if(_c06){ return _bff.getCopy(_c02)===_c05; }else{ if(_c07){ return _bff.getCopy(_c05)?false:true; }else{ return true; } } }; PinFreezeManager.prototype.sectionStructureChange=function(){ var _c08=this.m_oCV.getViewerWidget(); if(_c08&&_c08.getAnnotationHelper()){ _c08.getAnnotationHelper().repositionCommentIndicators(); } }; PinFreezeManager.prototype.deepCloneNode=function(_c09){ var copy=_c09.cloneNode(true); var _c0b=this.m_oCV.getViewerWidget(); if(_c0b){ if(_c0b.reportContainsDijits()){ var _c0c=getElementsByAttribute(copy,"*","widgetid","*"); if(_c0c&&_c0c.length){ for(var i=0;i<_c0c.length;i++){ _c0c[i].parentNode.removeChild(_c0c[i]); } } } } return copy; }; PinFreezeManager.prototype.toJSONString=function(){ var _c0e=""; var _c0f=""; for(var _c10 in this.m_frozenInfo){ if(_c0e.length>0){ _c0e+=","; } var _c11=this.m_frozenInfo[_c10]; _c0e+="{"; _c0e+="\"lid\":\""+_c11.lid.replace("\"","\\\"")+"\","; _c0e+="\"freezeTop\":"+_c11.freezeTop+","; _c0e+="\"freezeSide\":"+_c11.freezeSide+","; if(_c11.parentContainer){ _c0e+="\"parentContainer\":\""+_c11.parentContainer+"\","; } if(_c11.pinFreezeContainers&&_c11.pinFreezeContainers.length>0){ _c0e+="\"properties\":"+_c11.pinFreezeContainers[0].toJSONString()+","; } _c0e+="\"childContainers\": {"; if(_c11.childContainers){ var _c12=true; for(var _c13 in _c11.childContainers){ if(!_c12){ _c0e+=","; } _c0e+="\""+_c13+"\":true"; _c12=false; } } _c0e+="}}"; } if(_c0e.length>0){ _c0f="{\"version\":1, \"containers\":["+_c0e+"]}"; } return _c0f; }; PinFreezeManager.prototype.fromJSONString=function(_c14){ if(!_c14||_c14.length===0){ return; } var _c15=null; try{ _c15=eval("("+_c14+")"); } catch(e){ if(typeof console!="undefined"){ console.log("PinFreezeManager.prototype.fromJSON could not parse JSON - "+_c14); console.log(e); } } if(!_c15){ return; } var _c16=_c15.containers; var _c17=_c15.version; if(_c16.length>0){ this.m_frozenInfo={}; } for(var _c18=0;_c18<_c16.length;_c18++){ var _c19=_c16[_c18]; var lid=_c19.lid; var _c1b=_c19.freezeTop; var _c1c=_c19.freezeSide; var _c1d=document.getElementById("CVReport"+this.m_viewerId); var _c1e=getElementsByAttribute(_c1d,"table","lid",lid+this.m_viewerId); var _c1f=[]; if(_c1e&&(_c1b||_c1c)){ for(var i=0;i<_c1e.length;i++){ var _c21=_c1e[i]; var _c22=new PinFreezeContainer(this,lid,this.m_viewerId,_c19.freezeTop,_c19.freezeSide,_c21,i); if(_c19.properties){ applyJSONProperties(_c22,_c19.properties); } _c1f.push(_c22); } } this.m_frozenInfo[lid]={"lid":lid,"freezeTop":_c1b,"freezeSide":_c1c,"pinFreezeContainers":_c1f,"initialLoad":true}; if(_c17>=1){ if(_c19.childContainers){ this.m_frozenInfo[lid].childContainers=_c19.childContainers; } if(_c19.parentContainer){ this.m_frozenInfo[lid].parentContainer=_c19.parentContainer; } } } }; PinFreezeManager.prototype.removeIdAttribute=function(_c23){ var _c24=_c23.getAttribute("id"); if(_c24!==null&&_c24!==""){ _c23.removeAttribute("id"); } var _c25=getElementsByAttribute(_c23,"*","id","*"); if(_c25&&_c25.length){ for(var i=0;i<_c25.length;i++){ _c25[i].removeAttribute("id"); } } return _c23; }; PinFreezeManager.prototype.isElementInMainOutput=function(_c27){ return PinFreezeContainer.isElementInMainOutput(_c27); }; PinFreezeManager.prototype.isIWidgetMobile=function(){ return (this.m_oCV&&this.m_oCV.isIWidgetMobile()); }; PinFreezeManager.prototype.destroy=function(){ GUtil.destroyProperties(this); }; dojo.provide("WidgetContextManager"); dojo.declare("WidgetContextManager",null,{PP_WIDGET_CONTEXT:"com.ibm.widget.context",PP_REPORT_PROMPT_CONTEXT:"com.ibm.widget.context.report.prompt",PP_REPORT_DRILL_CONTEXT:"com.ibm.widget.context.report.drill",PP_VALUES:"values",PP_RANGES:"ranges",PP_MULTIVALUED:"multivalued",PP_MODELITEM:"modelItem",PP_MODELINFO:"modelInfo",PP_PROMPT:"prompt",PP_DRILL:"drill",PP_SELECT_CHOICES:"selectChoices",PP_BUX_SELECTVALUECONTROL_CONTEXT:"com.ibm.widget.context.bux.selectValueControl",PP_BUX_SELECTION_CONTEXT:"com.ibm.widget.context.bux.selection",PP_CASCADEPROMPT_CLEAR:"clearCascadePromptParams",EVENT_NAME_PROMPT:"com.ibm.widget.contextChanged.prompt",EVENT_NAME_DRILL:"com.ibm.widget.contextChanged.drill",EVENT_NAME_SELECTVALUECONTROL:"com.ibm.widget.contextChanged.selectValueControl",DEFAULT_MODEL_PATH:".",m_widget:null,m_oWidgetContextContainer:null,m_oPromptContextContainer:null,m_oDrillContextContainer:null,m_oPromptGenericContext:null,m_oDrillGenericContext:null,m_oFilterGenericContext:null,m_oSelectionFilterContext:null,m_oContextCollection:null,m_oWidgetContextObject:null,m_oPromptContextObject:null,m_oDrillContextObject:null,m_aSelectionFilterObjects:null,constructor:function(_c28){ this.m_widget=_c28; this.m_oWidgetContextContainer={}; this.m_oPromptContextContainer={}; this.m_oDrillContextContainer={}; this.m_oPromptGenericContext={}; this.m_oDrillGenericContext={}; this.m_oFilterGenericContext={}; this.m_oSelectionFilterContext={}; this.m_oContextCollection={}; this.m_oWidgetContextObject={}; this.m_oPromptContextObject={}; this.m_oDrillContextObject={}; this.m_aSelectionFilterObjects=null; },getWidgetContextObject:function(){ var _c29={}; if(this.m_oWidgetContextContainer){ _c29[this.PP_WIDGET_CONTEXT]=this.m_oWidgetContextContainer; if(this.m_widget){ _c29.clientId=this.m_widget.getWidgetId(); } } return _c29; },getFilterFirstItemName:function(){ var _c2a=this.m_oFilterGenericContext; if(_c2a){ var _c2b=(_c2a.values?_c2a.values:_c2a.ranges); for(_c2c in _c2b){ return _c2c; } } for(var _c2c in _c2a){ return _c2c; } return null; },getItemNames:function(_c2d){ var _c2e=[]; var _c2f=_c2d[this.PP_WIDGET_CONTEXT]; if(_c2f){ var _c30=(_c2f.values?_c2f.values:_c2f.ranges); for(var _c31 in _c30){ _c2e.push(_c31); } return _c2e; } for(var _c31 in _c2f){ _c2e.push(_c31); } return _c2e; },raisePromptEvent:function(_c32,_c33,_c34,_c35,_c36){ var _c37=this._buildGeneralizedPromptPayload(_c32,_c33,_c34,_c35,_c36); if(_c37){ this.m_widget.fireEvent(this.EVENT_NAME_PROMPT,null,_c37); this._updatePromptContext(_c37); this._updateWidgetContextContainer(); } },_updatePromptContext:function(_c38){ this._updatePromptGenericContext(_c38); this._updatePromptContextContainer(_c38); },_resetWorkingMembers:function(){ this.m_oWidgetContextObject={}; this.m_oPromptContextObject={}; this.m_oDrillContextObject={}; },updateFilterContext:function(_c39){ this.m_oFilterGenericContext=_c39[this.PP_WIDGET_CONTEXT]; this._updateWidgetContextContainer(); },getSelectValueControlTypeFromPayload:function(_c3a){ var _c3b=_c3a[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]; if(_c3b&&_c3b["selectValueControl"]){ return _c3b["selectValueControl"]["controlType"]; } return null; },getSelectValuePropertyFromPayload:function(_c3c,_c3d){ var _c3e=_c3c[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]; if(_c3e&&_c3e["selectValueControl"]){ return _c3e["selectValueControl"][_c3d]; } return null; },_updateWidgetContextContainer:function(){ this.m_oWidgetContextContainer={}; var _c3f=null; if(this.m_oDrillGenericContext[this.PP_VALUES]){ _c3f=dojo.mixin(_c3f,this.m_oDrillGenericContext[this.PP_VALUES]); } if(this.m_oPromptGenericContext[this.PP_VALUES]){ _c3f=dojo.mixin(_c3f,this.m_oPromptGenericContext[this.PP_VALUES]); } if(this.m_oFilterGenericContext[this.PP_VALUES]){ _c3f=dojo.mixin(_c3f,this.m_oFilterGenericContext[this.PP_VALUES]); } if(this.m_oSelectionFilterContext[this.PP_VALUES]){ _c3f=dojo.mixin(_c3f,this.m_oSelectionFilterContext[this.PP_VALUES]); } if(_c3f){ this.m_oWidgetContextContainer[this.PP_VALUES]=_c3f; } var _c40=null; if(this.m_oPromptGenericContext[this.PP_RANGES]){ _c40=dojo.mixin(_c40,this.m_oPromptGenericContext[this.PP_RANGES]); } if(this.m_oFilterGenericContext[this.PP_RANGES]){ _c40=dojo.mixin(_c40,this.m_oFilterGenericContext[this.PP_RANGES]); } if(_c40){ this.m_oWidgetContextContainer[this.PP_RANGES]=_c40; } },_updatePromptGenericContext:function(_c41){ if(_c41[this.PP_WIDGET_CONTEXT]){ this.m_oPromptGenericContext=_c41[this.PP_WIDGET_CONTEXT]; } },_updatePromptContextContainer:function(_c42){ if(_c42[this.PP_REPORT_PROMPT_CONTEXT]&&_c42[this.PP_REPORT_PROMPT_CONTEXT][this.PP_PROMPT]){ this.m_oPromptContextContainer=_c42[this.PP_REPORT_PROMPT_CONTEXT][this.PP_PROMPT]; } },_buildGeneralizedPromptPayload:function(_c43,_c44,_c45,_c46,_c47){ var _c48=null; this._resetWorkingMembers(); var _c49=this._buildContextsFromPrompt(_c43,_c44); if(_c49){ _c48={}; _c48[this.PP_WIDGET_CONTEXT]=this.m_oWidgetContextObject; var _c4a={}; _c4a[_c46]=this.m_oPromptContextObject; _c48[this.PP_REPORT_PROMPT_CONTEXT]={"prompt":{"id":this.m_widget.iContext.widgetId,"action":_c45,"itemSpecification":_c4a}}; _c48[this.PP_CASCADEPROMPT_CLEAR]=_c47; } return _c48; },_getReportParameterNodes:function(_c4b){ var _c4c=XMLBuilderLoadXMLFromString(_c4b); if(!_c4c){ return null; } var _c4d=_c4c.firstChild; if(!_c4d){ return null; } var _c4e=XMLHelper_FindChildByTagName(_c4d,"reportParameters",true); if(!_c4e){ return null; } var _c4f=XMLHelper_FindChildrenByTagName(_c4e,"reportParameter",false); if(!_c4f){ return null; } return _c4f; },_getSelectChoicesXMLString:function(_c50,_c51){ var _c52=null; var _c53="p_"+_c50; if(_c51.get(_c53)){ _c52=_c51.get(_c53); } return _c52; },_getSelectChoicesNode:function(_c54){ var _c55=null; if(_c54){ var _c56=XMLBuilderLoadXMLFromString(_c54,true); if(_c56&&_c56.firstChild){ _c55=_c56.firstChild; } } return _c55; },_buildContextsFromPrompt:function(_c57,_c58){ var _c59=this._getReportParameterNodes(_c57); if(_c59===null){ return false; } for(var i in _c59){ var _c5b=_c59[i]; var _c5c=_c5b.getAttribute("parameterName"); var _c5d=this._getSelectChoicesXMLString(_c5c,_c58); var _c5e=this._getSelectChoicesNode(_c5d); if(_c5e){ var _c5f,_c60,_c61; if(!this._isPromptRangeType(_c5d)){ var _c62=this._buildReportContextValuesFromPromptSelectOption(_c5e); _c5f=this._createPromptDetailObject(_c5d,_c5b.getAttribute("modelItem"),_c5b.getAttribute("multivalued"),_c62); _c60=this._buildValuesArrayFromReportContextValueArray(_c62); _c61=this.PP_VALUES; }else{ _c60=this._buildMinMaxArrayFromRangePrompt(_c5e); _c5f=this._createPromptDetailObject(_c5d,_c5b.getAttribute("modelItem"),_c5b.getAttribute("multivalued"),_c60); _c61=this.PP_RANGES; } this.m_oPromptContextObject[_c5c]=_c5f; if(!this.m_oWidgetContextObject[_c61]){ this.m_oWidgetContextObject[_c61]={}; } this.m_oWidgetContextObject[_c61][_c5c]=_c60; } } return true; },_createPromptDetailObject:function(_c63,_c64,_c65,_c66){ var _c67={}; _c67[this.PP_SELECT_CHOICES]=_c63; if(_c64!==null){ _c67[this.PP_MODELITEM]=_c64; } if(_c65!==null){ _c67[this.PP_MULTIVALUED]=true; } _c67[this.PP_VALUES]=_c66; return _c67; },_isPromptRangeType:function(_c68){ var _c69=new RegExp(/^0){ for(var i=0;i<_c6c.length;i++){ var _c6e=_c6c[i].getAttribute("displayValue"); var _c6f=_c6c[i].getAttribute("useValue"); var _c70={"caption":_c6e,"use":_c6f}; _c6b.push(_c70); } } } return _c6b; },_buildValuesArrayFromReportContextValueArray:function(_c71){ var _c72=[]; if(_c71&&_c71.length>0){ for(var i=0;i<_c71.length;i++){ var _c74=_c71[i].caption; if(_c74){ _c72.push(_c74); } } } return _c72; },_buildMinMaxArrayFromRangePrompt:function(_c75){ var _c76=[]; if(_c75&&_c75.childNodes&&_c75.childNodes.length>0){ var _c77=_c75.childNodes.length; for(var i=0;i<_c77;i++){ var _c79=this._buildMinMaxFromSelectAnyRange(_c75.childNodes[i]); if(_c79){ _c76.push(_c79); } } } return _c76; },_buildMinMaxFromSelectAnyRange:function(_c7a){ var _c7b=null; if(_c7a){ var _c7c=dojo.query("[displayValue]",_c7a); if(_c7c.length>0){ _c7b={}; for(var i=0;i<_c7c.length;i++){ var node=_c7c[i]; var _c7f=(node.nodeName==="start")?"min":"max"; _c7b[_c7f]=node.getAttribute("useValue"); _c7b[_c7f+"Display"]=node.getAttribute("displayValue"); } } } return _c7b; },handleIncomingPromptEvent:function(evt){ if(!evt||!evt.payload){ return; } var _c81=this._convertToLegacyPromptPayload(evt.payload); if(_c81){ var _c82={"payload":_c81}; this.m_widget.onPromptLegacyPayload(_c82); } },_convertToLegacyPromptPayload:function(_c83){ var _c84=null; var _c85=_c83[this.PP_REPORT_PROMPT_CONTEXT]; if(_c85&&_c85.prompt){ _c85=_c85.prompt; _c84={}; _c84.cv_id=_c85.id; _c84.parameters=this._genLegacyPromptParameterArrayFromItemSpec(_c85.itemSpecification); _c84.clearCascadePromptParams=_c83[this.PP_CASCADEPROMPT_CLEAR]; }else{ if(_c83[this.PP_WIDGET_CONTEXT]&&_c83[this.PP_WIDGET_CONTEXT].values){ _c84={}; _c84.parameters=[]; var _c86=_c83[this.PP_WIDGET_CONTEXT].values; for(var _c87 in _c86){ var _c88=_c86[_c87]; if(_c88&&_c88.length>0){ if(_c88.length==1&&_c88[0].indexOf("")===0){ _c84.parameters.push({"parmName":_c87,"parmValue":_c88[0]}); }else{ var _c89=""; for(var i=0;i<_c88.length;i++){ _c89+=""; } _c89+=""; _c84.parameters.push({"parmName":_c87,"parmValue":_c89}); } } } _c84.clearCascadePromptParams=_c83[this.PP_CASCADEPROMPT_CLEAR]; } } return _c84; },_genLegacyPromptParameterArrayFromItemSpec:function(_c8b){ if(!_c8b){ return null; } var _c8c=this._getFirstPropertyOfObject(_c8b); var _c8d=[]; for(var _c8e in _c8c){ var _c8f=_c8c[_c8e]; var _c90={parmName:_c8e,parmValue:_c8f[this.PP_SELECT_CHOICES],modelItem:_c8f[this.PP_MODELITEM]}; if(_c8f[this.PP_MULTIVALUES]!==null){ _c90.multivalued=true; } _c8d.push(_c90); } return _c8d; },_isRangeTypeValues:function(_c91){ if(_c91){ if(_c91.min||_c91.max){ return true; } } return false; },_getFirstPropertyOfObject:function(_c92){ var _c93=null; for(var _c94 in _c92){ _c93=_c92[_c94]; break; } return _c93; },_getFirstPropertyNameOfObject:function(_c95){ var _c96=null; for(var _c97 in _c95){ _c96=_c97; break; } return _c96; },extractWidgetContextObject:function(_c98){ if(_c98){ var _c99=_c98[this.PP_WIDGET_CONTEXT]; if(_c99){ var obj={}; obj[this.PP_WIDGET_CONTEXT]=_c99; return obj; } } return null; },genMergedWidgetContextObject:function(){ var _c9b=null; var _c9c=null; for(var key in this.m_oContextCollection){ var _c9e=this.m_oContextCollection[key]; if(_c9e){ var _c9f=_c9e[this.PP_WIDGET_CONTEXT]; if(_c9f){ if(_c9f[this.PP_VALUES]){ _c9b=dojo.mixin(_c9b,_c9f[this.PP_VALUES]); } if(_c9f[this.PP_RANGES]){ _c9c=dojo.mixin(_c9c,this._convertRangeArrayToObjectForActiveReport(_c9f[this.PP_RANGES])); } } } } if(_c9b||_c9c){ var obj={}; obj[this.PP_WIDGET_CONTEXT]={}; if(_c9b){ obj[this.PP_WIDGET_CONTEXT][this.PP_VALUES]=_c9b; } if(_c9c){ obj[this.PP_WIDGET_CONTEXT][this.PP_RANGES]=_c9c; } return obj; } return null; },raiseDrillEvent:function(_ca1,_ca2,_ca3){ var _ca4=this._buildGeneralizedDrillPayload(_ca1,_ca2,_ca3); if(_ca4){ this.m_widget.fireEvent(this.EVENT_NAME_DRILL,null,_ca4); this._updateDrillContext(_ca4); this._updateWidgetContextContainer(); } },_updateDrillContext:function(_ca5){ this._updateDrillGenericContext(_ca5); this._updateDrillContextContainer(_ca5); },_updateDrillGenericContext:function(_ca6){ if(_ca6[this.PP_WIDGET_CONTEXT]){ this.m_oDrillGenericContext=_ca6[this.PP_WIDGET_CONTEXT]; } },_updateDrillContextContainer:function(_ca7){ if(_ca7[this.PP_REPORT_DRILL_CONTEXT]&&_ca7[this.PP_REPORT_DRILL_CONTEXT][this.PP_DRILL]){ this.m_oDrillContextContainer=_ca7[this.PP_REPORT_DRILL_CONTEXT][this.PP_DRILL]; } },_buildGeneralizedDrillPayload:function(_ca8,_ca9,_caa){ if(!_ca8||!_ca9){ return null; } var _cab={}; var _cac={}; for(var i in _ca8){ var _cae=_ca8[i]; var mun=(_cae.mun)?_cae.mun:""; var lun=(_cae.lun)?_cae.lun:""; var hun=(_cae.hun)?_cae.hun:""; var _cb2={}; _cb2[this.PP_VALUES]=[{"caption":_cae.displayValue,"mun":mun,"lun":lun,"hun":hun}]; if(_cae.summary){ _cb2["summary"]=_cae.summary; } _cab[_cae.dataItem]=_cb2; _cac[_cae.dataItem]=[_cae.displayValue]; } var _cb3={}; _cb3[this.PP_VALUES]=_cac; var _cb4={}; _cb4[_caa]=_cab; var _cb5={}; _cb5[_ca9]={"id":this.m_widget.iContext.widgetId,"action":_ca9,"itemSpecification":_cb4}; var _cb6={}; _cb6[this.PP_WIDGET_CONTEXT]=_cb3; _cb6[this.PP_REPORT_DRILL_CONTEXT]=_cb5; return _cb6; },genDrillSpecObjects:function(_cb7){ if(!_cb7||!_cb7[this.PP_REPORT_DRILL_CONTEXT]){ return null; } var _cb8=[]; var _cb9=_cb7[this.PP_REPORT_DRILL_CONTEXT]; var _cba=this._getFirstPropertyOfObject(_cb9); var _cbb=this._getFirstPropertyOfObject(_cba.itemSpecification); for(var _cbc in _cbb){ var _cbd=_cbb[_cbc]; var _cbe=_cbd[this.PP_VALUES]; if(_cbe&&_cbe.length>0){ var _cbf=_cbe[0]; var _cc0={"dataItem":_cbc,"displayValue":_cbf.caption,"mun":_cbf.mun,"lun":_cbf.lun,"hun":_cbf.hun}; if(_cbf.summary){ _cc0["summary"]=_cbf.summary; } _cb8.push(_cc0); } } return (_cb8.length>0)?_cb8:null; },getDrillActionType:function(_cc1){ if(!_cc1||!_cc1[this.PP_REPORT_DRILL_CONTEXT]){ return null; } return this._getFirstPropertyNameOfObject(_cc1[this.PP_REPORT_DRILL_CONTEXT]); },_convertRangeArrayToObjectForActiveReport:function(_cc2){ if(_cc2){ var _cc3={}; for(var name in _cc2){ var _cc5=_cc2[name]; if(_cc5&&_cc5.length>0){ _cc3[name]=_cc5[0]; }else{ _cc3[name]=_cc5; } } return _cc3; } return _cc2; },getItemsInItemSpecification:function(_cc6){ var _cc7=_cc6[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]; if(_cc7&&_cc7["selectValueControl"]&&_cc7["selectValueControl"]["itemSpecification"]){ return this._getFirstPropertyOfObject(_cc7["selectValueControl"]["itemSpecification"]); } return null; },genRemoveDiscreteFilterPayload:function(_cc8){ var _cc9={"clientId":_cc8,"com.ibm.widget.context":{},"com.ibm.widget.context.bux.selectValueControl":{"selectValueControl":{"id":_cc8,"controlType":"selectValueFilter","type":"discrete","valueType":"string"}}}; return _cc9; },genEmptySelectionPayload:function(oCV,_ccb){ var obj={"clientId":_ccb,"com.ibm.widget.context":{},"com.ibm.widget.context.bux.selection":{"selection":{"id":_ccb,"valueType":"string"}}}; this.m_oSelectionFilterContext={}; this._updateWidgetContextContainer(); this.setSelectionFilterObjects(null); return obj; },genSelectionPayload:function(oCV,_cce,_ccf){ var _cd0={}; var _cd1={"id":_cce,"valueType":"string"}; var obj={"clientId":_cce,"com.ibm.widget.context":_cd0,"com.ibm.widget.context.bux.selection":{"selection":_cd1}}; var _cd3=false; var _cd4=[]; var oSC=oCV.getSelectionController(); var _cd6=oSC.getAllSelectedObjects(); if(_cd6&&_cd6.length>0){ var _cd7={}; var _cd8=null; var _cd9={}; var _cda={}; for(var i=0;i<_cd6.length;i++){ if(_cd6[i].populateSelectionPayload(_cd9,_cda,_ccf)){ _cd3=true; _cd8=_cd6[i].getCtxAttributeString(); if(typeof _cd7[_cd8]=="undefined"){ _cd7[_cd8]=true; _cd4.push(_cd6[i].marshal(oSC,oCV.getId())); } } } if(_cd3){ _cd0.values=_cd9; var _cdc={}; var _cdd=oCV.getModelPath(); var _cde=(_cdd)?_cdd:"."; _cdc[_cde]=_cda; _cd1.itemSpecification=_cdc; } } this.m_oSelectionFilterContext=obj[this.PP_WIDGET_CONTEXT]; this._updateWidgetContextContainer(); this.setSelectionFilterObjects(_cd4.length>0?_cd4:null); return obj; },isSelectionPayloadForReset:function(obj){ if(obj&&obj[this.PP_WIDGET_CONTEXT]){ return this.isEmptyObject(obj[this.PP_WIDGET_CONTEXT]); } return true; },setSelectionFilterObjects:function(_ce0){ this.m_aSelectionFilterObjects=_ce0; },getSelectionFilterObjects:function(){ return this.m_aSelectionFilterObjects; },toStringSelectionFilterObjects:function(){ var str=""; for(var idx in this.m_aSelectionFilterObjects){ if(str.length>0){ str+=","; } str+=JSON.stringify(this.m_aSelectionFilterObjects[idx]); } return "["+str+"]"; },convertSelectionToSelectValueControlPayload:function(_ce3){ if(_ce3["com.ibm.widget.context.bux.selection"]){ var _ce4=_ce3["com.ibm.widget.context.bux.selection"]["selection"]; _ce4.controlType="selectValueFilter"; _ce4.type="discrete"; _ce3["com.ibm.widget.context.bux.selectValueControl"]={"selectValueControl":_ce4}; delete _ce3["com.ibm.widget.context.bux.selection"]; } return _ce3; },convertGenericToSelectValueControlPayload:function(_ce5){ if(this._hasItemSpecification(_ce5)){ return; } if(_ce5[this.PP_WIDGET_CONTEXT][this.PP_VALUES]){ var _ce6=_ce5[this.PP_WIDGET_CONTEXT][this.PP_VALUES]; for(dataItem in _ce6){ if(_ce6[dataItem].length==0){ delete _ce6[dataItem]; } } var _ce7=true; for(dataItem in _ce6){ _ce7=false; break; } if(_ce7){ delete _ce5[this.PP_WIDGET_CONTEXT][this.PP_VALUES]; } } if(_ce5[this.PP_WIDGET_CONTEXT][this.PP_RANGES]){ var _ce6=_ce5[this.PP_WIDGET_CONTEXT][this.PP_RANGES]; var _ce7=true; for(dataItem in _ce6){ _ce7=false; break; } if(_ce7){ delete _ce5[this.PP_WIDGET_CONTEXT][this.PP_RANGES]; } } var _ce6=null; if(_ce5[this.PP_WIDGET_CONTEXT][this.PP_VALUES]){ key=this.PP_VALUES; _ce6=_ce5[this.PP_WIDGET_CONTEXT][this.PP_VALUES]; }else{ key=this.PP_RANGES; _ce6=_ce5[this.PP_WIDGET_CONTEXT][this.PP_RANGES]; } var cv=this.m_widget.getViewerObject(); var _ce9=null; if(cv){ var sc=cv.getSelectionController(); _ce9=sc.getCCDManager(); } for(dataItem in _ce6){ var _ceb=true; var _cec={}; for(var _ced in _ce6){ var _cee=[]; for(var i=0;i<_ce6[_ced].length;i++){ var _cf0=_ce6[_ced][i]; var _cf1={"caption":_cf0}; if(_ceb){ var mun=_ce9?_ce9.getMUNForRDIAndUseValue(_ced,_cf0):null; if(mun!=null){ _cf1.mun=mun; }else{ _ceb=false; for(var i=0;i<_cee.length;i++){ delete _cee[i].mun; } } } _cee.push(_cf1); } _cec[_ced]={"values":_cee}; } var _cf3={}; var _cf4=cv?cv.getModelPath():null; var _cf5=(_cf4)?_cf4:"unknown"; _cf3[_cf5]=_cec; _ce5[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]={"selectValueControl":{"valueType":"string","type":"discrete","controlType":"selectValueFilter","id":_ce5.clientId?_ce5.clientId:"","itemSpecification":_cf3}}; } },getMUNOfItemValueInItemSpecification:function(_cf6,_cf7){ var _cf8=this.getItemsInItemSpecification(_cf6); if(_cf8&&_cf8[_cf7]){ var _cf9=_cf8[_cf7]; if(_cf9.values&&_cf9.values.length>0){ return _cf9.values[0].mun; } } return null; },_hasItemSpecification:function(_cfa){ if(_cfa[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]&&_cfa[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]["selectValueControl"]&&_cfa[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]["selectValueControl"]["itemSpecification"]){ return true; } if(_cfa[this.PP_BUX_SELECTION_CONTEXT]&&_cfa[this.PP_BUX_SELECTION_CONTEXT]["selection"]&&_cfa[this.PP_BUX_SELECTION_CONTEXT]["selection"]["itemSpecification"]){ return true; } return false; },getSourceUniqueId:function(_cfb,_cfc){ var id=null; var _cfe=null; if(_cfb["clientId"]){ id=_cfb["clientId"]; } if(_cfb[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]){ _cfe="selectValueControl"; if(!id&&_cfb[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]["selectValueControl"]&&_cfb[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]["selectValueControl"]["id"]){ id=_cfb[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]["selectValueControl"]["id"]; } }else{ if(_cfb[this.PP_BUX_SELECTION_CONTEXT]){ _cfe="selection"; if(!id&&_cfb[this.PP_BUX_SELECTION_CONTEXT]["selection"]&&_cfb[this.PP_BUX_SELECTION_CONTEXT]["selection"]["id"]){ id=_cfb[this.PP_BUX_SELECTION_CONTEXT]["selection"]["id"]; } }else{ if(_cfb[this.PP_REPORT_PROMPT_CONTEXT]){ _cfe="prompt"; if(!id&&_cfb[this.PP_REPORT_PROMPT_CONTEXT]["prompt"]&&_cfb[this.PP_REPORT_PROMPT_CONTEXT]["prompt"]["id"]){ id=_cfb[this.PP_REPORT_PROMPT_CONTEXT]["prompt"]["id"]; } }else{ if(_cfb[this.PP_REPORT_DRILL_CONTEXT]){ _cfe="drill"; if(!id&&_cfb[this.PP_REPORT_DRILL_CONTEXT]["DrillUp"]&&_cfb[this.PP_REPORT_DRILL_CONTEXT]["DrillUp"]["id"]){ id=_cfb[this.PP_REPORT_DRILL_CONTEXT]["DrillUp"]["id"]; } }else{ if(_cfb[this.PP_REPORT_DRILL_CONTEXT]){ _cfe="drill"; if(!id&&_cfb[this.PP_REPORT_DRILL_CONTEXT]["DrillDown"]&&_cfb[this.PP_REPORT_DRILL_CONTEXT]["DrillDown"]["id"]){ id=_cfb[this.PP_REPORT_DRILL_CONTEXT]["DrillDown"]["id"]; } } } } } } if(!id){ id="unknown"; } if(!_cfe){ _cfe="unknown"; } if(typeof _cfc=="string"){ _cfe=_cfc; } return id+"_"+_cfe; },isWidgetContextEmpty:function(_cff){ return (this.isEmptyObject(_cff[this.PP_WIDGET_CONTEXT])||(this.isEmptyObject(_cff[this.PP_WIDGET_CONTEXT][this.PP_VALUES])&&this.isEmptyObject(_cff[this.PP_WIDGET_CONTEXT][this.PP_RANGES]))); },isEmptyObject:function(obj){ var _d01=true; if(obj){ for(var _d02 in obj){ _d01=false; break; } } return _d01; },updateContextCollection:function(_d03){ if(!this.isEmptyObject(_d03)){ var _d04=this.getSourceUniqueId(_d03); if(this.isWidgetContextEmpty(_d03)){ if(this.m_oContextCollection[_d04]){ this.setEmptyArrayToWidgetContextValues(this.m_oContextCollection[_d04]); }else{ var _d05=this.getSourceUniqueId(_d03,"unknown"); if(this.m_oContextCollection[_d05]){ this.setEmptyArrayToWidgetContextValues(this.m_oContextCollection[_d05]); } } }else{ if(_d03[this.PP_WIDGET_CONTEXT][this.PP_VALUES]){ for(var name in _d03[this.PP_WIDGET_CONTEXT][this.PP_VALUES]){ for(var key in this.m_oContextCollection){ var _d08=this.m_oContextCollection[key]; if(_d08[this.PP_WIDGET_CONTEXT][this.PP_VALUES]&&_d08[this.PP_WIDGET_CONTEXT][this.PP_VALUES][name]){ delete _d08[this.PP_WIDGET_CONTEXT][this.PP_VALUES][name]; } } } } this.m_oContextCollection[_d04]=dojo.clone(_d03); } return this.m_oContextCollection; } },setEmptyArrayToWidgetContextValues:function(_d09){ if(_d09&&_d09[this.PP_WIDGET_CONTEXT]&&_d09[this.PP_WIDGET_CONTEXT][this.PP_VALUES]){ var _d0a=_d09[this.PP_WIDGET_CONTEXT][this.PP_VALUES]; for(var name in _d0a){ _d0a[name]=[]; } } }}); dojo.provide("viewer.AnnotationHelper"); dojo.declare("viewer.AnnotationHelper",null,{m_loadAnnotationsDfd:null,m_bCallGetAnnotations:true,m_bAnnotationsEnabled:null,constructor:function(_d0c){ this.m_viewerIWidget=_d0c; this.m_bCallGetAnnotations=true; this.m_bAnnotationsEnabled=null; },getAnnotationStore:function(){ return this.m_viewerIWidget.getAnnotationStore(); },setCallGetAnnotations:function(flag){ this.m_bCallGetAnnotations=flag; },isEnabled:function(){ if(this.m_bAnnotationsEnabled===null){ this.m_bAnnotationsEnabled=this.m_viewerIWidget.getViewerObject().bBuxAnnotationsAvailable; } return this.m_bAnnotationsEnabled; },refreshAnnotationData:function(){ if(this.m_loadAnnotationsDfd){ return null; } this.m_loadAnnotationsDfd=new dojo.Deferred(); this.fetchAnnotationData(); return this.m_loadAnnotationsDfd; },fetchAnnotationData:function(){ var _d0e=this.m_viewerIWidget; if(!this.m_bCallGetAnnotations||!this.isEnabled()){ return; } dojo.when(_d0e.getWidgetStoreID(),dojo.hitch(this,function(_d0f){ if(!_d0f){ return; } this.m_viewerIWidget.getLoadManager().runWhenHasViewer(dojo.hitch(this,this._fetchAnnotationData,_d0f)); })); },_fetchAnnotationData:function(_d10){ var _d11=this.m_viewerIWidget.getViewerObject(); var _d12=_d11.getSelectionController(); var _d13=_d12.getCCDManager().m_md; if(!_d13){ _d13={}; } _d13=dojo.toJson(_d13); var _d14=_d12.getCCDManager().m_cd; if(!_d14){ _d14={}; } _d14=dojo.toJson(_d14); var _d15={"complete":{},"fault":{}}; _d15.complete["object"]=this; _d15.complete["method"]=this.fetchAnnotationDataResponse; _d15.fault["object"]=this; _d15.fault["method"]=this.fetchAnnotationDataResponseFault; var _d16=new AsynchJSONDispatcherEntry(_d11); _d16.setCallbacks(_d15); _d16.addFormField("widgetStoreID",_d10); _d16.addFormField("ui.action","getAnnotations"); _d16.addFormField("cv.metatdata",_d13); _d16.addFormField("cv.context",_d14); _d16.sendRequest(); },fetchAnnotationDataResponseFault:function(_d17){ this.m_bCallGetAnnotations=false; var _d18=new FaultDialog(this.m_viewerIWidget.getViewerObject()); var _d19=_d17.getSoapFault(); var _d1a=null; var _d1b=XMLHelper_FindChildByTagName(_d19,"exception",true); if(_d1b){ var _d1c=XMLHelper_FindChildByTagName(_d1b,"errorCode",false); if(_d1c){ _d1a=XMLHelper_GetText(_d1c); } } if(_d1a==="0"){ var _d1d=null; var _d1e=XMLHelper_FindChildByTagName(_d1b,"message",false); if(_d1e){ var _d1f=XMLHelper_FindChildByTagName(_d1e,"messageString",true); if(_d1f){ _d1d=XMLHelper_GetText(_d1f,false); } } if(_d1d){ var _d20=/ANS-GEN-(\d{2,4})/; var _d21=_d20.exec(_d1d); if(_d21&&_d21.length&&_d21.length>1){ var _d22=_d21[1]; if(_d22==="0075"){ _d18.setErrorMessage(RV_RES.IDS_ANNOTATION_WIDGET_DELETED_ERROR); } } } } this._cleanupPreviousAnnotations(); this.getAnnotationStore().clear(); _d18.show(_d19); if(this.m_loadAnnotationsDfd){ this.m_loadAnnotationsDfd.errback(); this.m_loadAnnotationsDfd=null; } },fetchAnnotationDataResponse:function(_d23){ var _d24=window["CVEditContentActionInstance"]; var _d25=_d23.getResult(); this.m_bCallGetAnnotations=this.m_bCallGetAnnotations&&_d25!==null; if(_d25===null){ _d25=[]; } var _d26=this.m_viewerIWidget.getViewerObject(); _d26.envParams["cv.annotationData"]=_d25; this._cleanupPreviousAnnotations(); if(_d25.length>0){ if(this.getAnnotationStore()){ var _d27=this._generateMatchedAnnotationsFromViewerObject(); this.getAnnotationStore().load(_d27); this.displayCommentIndicators(); } } if(this.m_loadAnnotationsDfd){ this.m_loadAnnotationsDfd.callback(); this.m_loadAnnotationsDfd=null; } },_cleanupPreviousAnnotations:function(){ var _d28=this.getAnnotationStore(); if(_d28){ var _d29=_d28.getAll(); for(var _d2a in _d29){ var _d2b=this.m_viewerIWidget.getWidgetId()+"_"+_d2a+"_comment"; var _d2c=dijit.byId(_d2b); if(typeof _d2c!="undefined"&&_d2c!=null){ _d2c.destroy(); delete _d2c; } _d28.clear(_d2a); } } },_generateMatchedAnnotationsFromViewerObject:function(){ var _d2d=this.m_viewerIWidget.getViewerObject(); var _d2e=[]; if(_d2d&&_d2d.envParams&&_d2d.envParams["cv.annotationData"]){ _d2e=eval(_d2d.envParams["cv.annotationData"]); } var _d2f=this._generateAnnotationListWithoutORoperator(_d2e); return this._updateAnnotationCtxWithMatchedCellCtx(_d2f,_d2d); },_generateAnnotationListWithoutORoperator:function(_d30){ var _d31=[]; for(var i=0,len=_d30.length;i"]; if(_d9f&&_d9f.length>0){ _da0.push(_d9f); } var _da1=this.getDisplayName(); if(_da1&&_da1.length>0){ _da0.push("",xml_encode(_da1),""); } if(this._BUXDBInfoArray&&this._BUXDBInfoArray.length>0){ _da0=_da0.concat(this._BUXDBInfoArray); } _da0.push(""); return _da0.length>2?_da0.join(""):""; },getBUXDBInfoArray:function(_da2){ var _da3=null; var _da4=null; if(_da2){ _da3=_da2.dbTitle; _da4=_da2.dbSearchPath; }else{ var _da5=this.iContext.getItemSet("buxrtstate",false); if(_da5){ _da3=_da5.getItemValue("dbTitle"); _da4=_da5.getItemValue("dbSearchPath"); } } var _da6=[]; if(_da3&&_da4&&_da4.length>0){ _da6.push("",xml_encode(_da3),"",xml_encode(_da4),""); } return _da6; },loadExtraJavascriptFiles:function(_da7){ if(typeof CSelectionContext=="undefined"){ this._loadFile("/drill/CSelectionContextBuilder.js",_da7); } this._loadFile("/mdsrv/lineage.js",_da7); if(window.cognosViewerDebug){ this._loadFile("/rv/viewer.extra.debug.js",_da7); }else{ this._loadFile("/rv/viewer.extra.js",_da7); } },_loadFile:function(_da8,_da9){ if(dojo.isIE||dojo.isTrident||_da9.indexOf("..")==0){ var _daa=window.gScriptLoader.loadFile(_da9+_da8,"","GET"); var _dab=document.createElement("script"); _dab.type="text/javascript"; _dab.text=_daa; document.getElementsByTagName("head")[0].appendChild(_dab); }else{ dojo._loadPath(_da9+_da8,null); } },_getCWALaunchInformation:function(){ var args={url:this.buildPostUrl(),sync:false,handleAs:"json",preventCache:true,content:{"b_action":"cognosViewer","ui.action":"noOp","cv.responseFormat":"getCWALaunchParameters"},error:dojo.hitch(this,function(_dad){ this.fireEvent("com.ibm.bux.widget.render.done",null,{noAutoResize:true}); this.fireEvent("com.ibm.bux.widget.notification",null,{type:"error",message:_dad.message,description:_dad.description}); }),load:dojo.hitch(this,function(_dae,_daf){ var _db0=_daf.xhr.getResponseHeader("Content-Type"); if(_db0&&_db0.indexOf("text/html")!=-1&&_dae&&_dae.match(/CAM_PASSPORT_ERROR<\/ERROR_CODE>/)){ this.handlePassportErrorFromDispatcher(); }else{ this._launchCWA(_dae); } })}; dojo.xhrPost(args); },_launchCWA:function(_db1){ if(_db1){ if(typeof NewReportAction=="undefined"){ this.loadExtraJavascriptFiles(_db1.webContentRoot); if(_db1.productLocale!="en"){ this._loadFile("rv/res/viewer_"+_db1.productLocale+".js",_db1.webContentRoot); } } var _db2=new NewReportAction(); _db2.setRequestParms({"packageSearchPath":this.getAttributeValue("packageSearchPath"),"viewerIWidget":this,"webContentRoot":_db1.webContentRoot,"gateway":_db1.gateway,"capabilitiesXml":_db1.capabilitiesXML,"cafContextId":_db1.cafContextId}); this.removeAttributeValue("packageSearchPath"); _db2.execute(); } },setNewReportInfo:function(info){ this._newReportInfo=info; },_handleFileDialogCancel:function(){ this.fireEvent("com.ibm.bux.widget.action",null,{action:"deleteWidget"}); },_handleFileDialogOk:function(_db4){ this.removeAttributeValue("newReport"); this.setAttributeValue("packageSearchPath","storeID(\""+_db4+"\")"); this.onLoad(); },onLoad:function(){ this.sViewerIWidgetId=this.iContext.getRootElement().id; if(this.getAttributeValue("packageSearchPath")){ this._getCWALaunchInformation(); return; }else{ if(this.getAttributeValue("newReport")==="true"){ dojo["require"]("bux.dialogs.FileDialog"); var oDlg=new bux.dialogs.PackageDialog({onCancelHandler:dojo.hitch(this,this._handleFileDialogCancel),selectPackageHandler:dojo.hitch(this,this._handleFileDialogOk)}); oDlg.startup(); oDlg.show(); return; } } var _db6=this.getAttributeValue("ViewerConcurrentRequestLimit"); if(_db6){ this.removeAttributeValue("ViewerConcurrentRequestLimit"); if(!window["gReportWidgetLoadQueue"]){ window["gReportWidgetLoadQueue"]=new ReportWidgetLoadQueue(_db6); } } this._isMobile=this.getEmbeddedMobileItem(); this._BUXDBInfoArray=this.getBUXDBInfoArray(); var _db7=this.getAttributeValue("viewerProperties"); var _db8=this.getAttributeValue("promptParametersRetrieved"); if(_db8!==null&&_db8=="true"){ this.promptParametersRetrieved=true; } this.properties=this.createProperties(_db7); this.savedOutput.setPagedOutput(!this.properties.getRetrieveAll()); this.setWidgetCopyPasteParameters(); this.m_bSelectionFilterSwitch=this.getAttributeValue("selectionFilterEnabled")=="true"?true:false; if(this.isOpeningSavedDashboard()&&this.copyPasteResource==null){ this.disableListenToIfFullReportUpgraded(); this.enableFlashChartsToIfReportPartUpgraded(); this.disableListenToIfReportPartUpgraded(); if(this.isVisible()){ if(window["gReportWidgetLoadQueue"]){ window["gReportWidgetLoadQueue"].add(this); }else{ this.postReport(null); } } }else{ var _db9={action:"canvas.filters"}; this.fireEvent("com.ibm.bux.widget.action",null,_db9); this.getLoadManager().viewerLoadInitiated(); this.m_visible=true; } this.addWidgetEventListeners(); this.iContext.iEvents.svc.addWire(this.iContext.widgetId,"com.ibm.widget.contextChanged","widgetBuxCanvasTabs","com.ibm.widget.contextChanged"); this.iContext.iEvents.svc.addWire(this.iContext.widgetId,"com.ibm.bux.data.filterCache.init","widgetBuxCanvasTabs","com.ibm.bux.data.filterCache.init"); this.fireEvent("com.ibm.bux.widget.updateStoreID",null,{}); },addWindowEventListeners:function(){ if(!this.dojoConnections){ this.dojoConnections=[]; } this.dojoConnections.push(dojo.connect(window,"onresize",this,this.onBrowserResize)); this.dojoConnections.push(dojo.connect(window,"onbeforeunload",this,this.possibleUnloadEvent)); },addWidgetEventListeners:function(){ if(this.isMobile()){ this.dojoConnections.push(dojo.connect(this.iContext.getRootElement(),"touchstart",this,this.onTouchStart)); this.dojoConnections.push(dojo.connect(this.iContext.getRootElement(),"touchmove",this,this.onTouchMove)); } },addChromeWhitespaceHandler:function(_dba){ if(isIE()){ var _dbb=document.getElementById("mainViewerTR"+_dba); if(_dbb){ this.dojoConnections.push(dojo.connect(_dbb,"onmousedown",this,this.onMouseDownOnChromeDiv)); } } },onMouseDownOnChromeDiv:function(evt){ if(evt.srcElement.id.indexOf("PRMT",0)===0){ return; } var oCV=this.getViewerObject(); if(oCV){ var _dbe=oCV.getReportDiv(); if(_dbe){ var _dbf=_dbe.getBoundingClientRect(); var _dc0=_dbf.top+_dbe.offsetHeight; if(evt.clientY>_dc0&&evt.button!==2){ if(oCV.getSelectionController()){ oCV.getSelectionController().clearSelectedObjects(); this.onSelectionChange(); stopEventBubble(evt); } } } } },removeWindowEventListeners:function(){ if(this.dojoConnections){ for(var i=0;i10){ this.touchPaging=true; this.m_oCV.pageAction("nextPage"); this.m_oCV.setKeepFocus(false); }else{ if(this.m_oCV.hasPrevPage()&&_dc7-this.touchStartX>10){ this.touchPaging=true; this.m_oCV.pageAction("previousPage"); this.m_oCV.setKeepFocus(false); }else{ this.touchPaging=false; this.touchStartX=-1; } } } } if(this.touchStartX>0){ stopEventBubble(e); } },isLiveReport:function(){ return this.isSavedOutput()===false&&!this.isLimitedInteractiveMode(); },createProperties:function(_dc8){ return new bux.reportViewer.Properties(this,_dc8); },disableListenToIfFullReportUpgraded:function(){ if(this.isGoDashboardReportUpgrade()){ if(this.getAttributeValue("flexParam_properties")==null){ var _dc9={}; _dc9["*"]={blockedEvents:["com.ibm.bux.data.filter","com.ibm.bux.filter.values.get","com.ibm.bux.filter.items.get"]}; this.fireEvent("com.ibm.bux.widget.updateEventFilter",null,_dc9); } } },enableFlashChartsToIfReportPartUpgraded:function(){ if(this.isGoDashboardReportUpgrade()){ var _dca=this.getAttributeValue("originalReportPart"); if(typeof _dca!=="undefined"&&_dca!==null){ this.properties.setProperty("flashCharts","true"); } } },disableListenToIfReportPartUpgraded:function(){ if(this.isGoDashboardReportUpgrade()){ var _dcb=this.getAttributeValue("originalReportPart"); if(typeof _dcb!=="undefined"&&_dcb!==null){ var _dcc={}; _dcc["*"]={blockedEvents:["com.ibm.bux.viewer.drill","com.ibm.bux.viewer.prompt"]}; this.fireEvent("com.ibm.bux.widget.updateEventFilter",null,_dcc); } } },possibleUnloadEvent:function(){ var oCV=this.getViewerObject(); if(oCV){ oCV.getViewerDispatcher().possibleUnloadEvent(); } },onUnload:function(){ this.onUnloadInProgress=true; this.destroy(); this.iContext=null; },onGetFiltersDone:function(evt){ if(typeof this.filterRequiredAction!="undefined"&&this.filterRequiredAction!=null){ var _dcf=this.buildDataFiltersParam(evt.payload.filters); var _dd0=new ActionFactory(this.getViewerObject()); var _dd1=_dd0.load(this.filterRequiredAction); _dd1.dispatchRequest(_dcf,this.filterRequiredAction); this.filterRequiredAction=null; }else{ this.postReport(evt.payload.filters); this.postSetWidgetCopyPasteParameters(); } },getOriginalFormFields:function(){ return this.m_originalFormFields; },setOriginalFormFields:function(_dd2){ this.m_originalFormFields=_dd2; },getXNodeId:function(){ return this.xNodeId; },setXNodeId:function(_dd3){ this.xNodeId=_dd3; },postReport:function(_dd4){ this.getLoadManager().viewerLoadInitiated(); this.viewerWidgetLastAction={"functionName":"postReport","param":[_dd4]}; if(this.getRunReportOption()!==false){ this.m_oLoadManager.runningReport(); } var _dd5=this.buildPostContent(_dd4); if(_dd5["ui.reportDrop"]=="true"){ this.m_bReportDropped=true; } this.m_originalFormFields=new CDictionary(); for(var _dd6 in _dd5){ if(_dd6!="cv.outputKey"){ this.m_originalFormFields.add(_dd6,_dd5[_dd6]); } } var _dd7={}; if(this.getAttributeValue("X-Node-ID")){ this.setXNodeId(this.getAttributeValue("X-Node-ID")); _dd7["X-Node-ID"]=this.getAttributeValue("X-Node-ID"); this.removeAttributeValue("X-Node-ID"); } var args={url:this.buildPostUrl(),sync:false,preventCache:true,content:_dd5,headers:_dd7,error:dojo.hitch(this,function(_dd9){ this.fireEvent("com.ibm.bux.widget.render.done",null,{noAutoResize:true}); this.fireEvent("com.ibm.bux.widget.notification",null,{type:"error",message:_dd9.message,description:_dd9.description}); })}; if(typeof xhrMultiPart!=="undefined"&&xhrMultiPart.active){ args.load=dojo.hitch(this,function(_dda){ this.loadContent(_dda.responseText); }); xhrMultiPart.Post(args); }else{ args.load=dojo.hitch(this,function(_ddb,_ddc){ var _ddd=_ddc.xhr.getResponseHeader("Content-Type"); if(_ddd&&_ddd.indexOf("text/html")!=-1&&_ddb&&_ddb.match(/CAM_PASSPORT_ERROR<\/ERROR_CODE>/)){ this.handlePassportErrorFromDispatcher(); }else{ this.loadContent(_ddb); } }); dojo.xhrPost(args); } },isDropped:function(){ return this.m_bReportDropped; },cleanupStyles:function(){ this._cssLimitReached=true; if(!this.isVisible()){ if(!this._styles){ this._styles=[]; } var id=this.getViewerId(); var _ddf=document.getElementsByTagName("head").item(0).getElementsByTagName("style"); for(var i=0;i<_ddf.length;i++){ var _de1=_ddf[i]; if(_de1.getAttribute&&_de1.getAttribute("namespaceId")==id){ _de1.parentNode.removeChild(_de1); this._styles.push(_de1); i--; } } } },reloadStyles:function(){ if(this._styles){ while(this._styles.length>0){ var _de2=this._styles.pop(); document.getElementsByTagName("head").item(0).appendChild(_de2); } } },loadStylesAndScripts:function(_de3,_de4,_de5){ window.gScriptLoader.m_bIgnoreAjaxWarnings=true; window.gScriptLoader.setHandlerStylesheetLimit(true); var _de6=this.iContext.getRootElement(); if(!_de6){ return; } _de3=window.gScriptLoader.loadCSS(_de3,_de4,true,this.getViewerId()); if(dojo.isIE||dojo.isTrident){ _de3=" "+_de3; } _de4.innerHTML=_de3; if(this.isSelectionFilterEnabled()){ this.updateDrillThroughLinks(); } var _de7=GUtil.generateCallback(this.fireResizeEvent,[],this); this.m_sScriptLoaderNamespace=this.getViewerId(); window.gScriptLoader.loadAll(_de4,_de7,this.m_sScriptLoaderNamespace,_de5); },fireResizeEvent:function(){ var _de8=this.getViewerObject(); if(_de8==null){ this.fireEvent("com.ibm.bux.widget.render.done",null,{}); }else{ var _de9=_de8.getViewerWidget(); if(_de9){ _de8.m_resizeReady=true; _de8.doneLoading(); }else{ var _dea=this; setTimeout(function(){ _dea.fireResizeEvent(); },100); } } },getSavedReportSearchPath:function(_deb){ var _dec=this.getAttributeValue("savedReportPath"); if(_dec){ return _dec; } var _ded=this.getAttributeValue("dashboardID"); _ded=_ded.substr("$$dbid$$".length); var _dee="storeID(\""+_ded+"\")/*[@name="+xpath_attr_encode(_deb)+"]"; return _dee; },isSavedReport:function(_def,_df0){ return (typeof _df0!=="undefined"&&_df0!==null&&_df0.length>0&&_def!==_df0); },getGlobalPromptsInfo:function(){ var _df1=null; var oCV=null; var _df3=[]; var _df4=null; if(window.gaRV_INSTANCES){ for(var _df5=0;_df50){ _df1=""+_df3.join("")+""; } return _df1; },buildPostUrl:function(){ return this.getAttributeValue("gateway"); },getSavedItem:function(){ var _df6=this.getAttributeValue("savedReportPath"); if(!_df6){ _df6=this.getAttributeValue("savedReportName"); } return _df6; },setRunReportOption:function(_df7){ this.m_bRunReportOption=_df7; },getRunReportOption:function(){ return this.m_bRunReportOption; },resetRunReportOption:function(){ this.m_bRunReportOption=null; },buildPostContent:function(_df8){ var _df9=this.getAttributeValue("originalReport"); var _dfa=this.getSavedItem(); var _dfb=this.getAttributeValue("originalReportPart"); var _dfc=this.getAttributeValue("flexParam_properties"); var _dfd=this.getAttributeValue("flexParam_promptData"); var _dfe=this.isSavedReport(_df9,_dfa); var _dff=this.getPromptRunOption(_dfd,_dfe); var _e00=this.getAttributeValue("cv.outputKey")?"cvx.high":"cognosViewer"; var _e01={"b_action":_e00,"run.outputFormat":"HTML","bux":"true","cv.responseFormat":"iWidget","cv.id":this.getViewerId()}; if(this.isMobile()){ _e01["container"]="mobile"; } if(this.getAttributeValue("cv.outputKey")){ _e01["cv.outputKey"]=this.getAttributeValue("cv.outputKey"); this.removeAttributeValue("cv.outputKey"); _e01["widget.id"]=this.getWidgetId(); } if(this.getAttributeValue("gateway")){ _e01["cv.gateway"]=this.getAttributeValue("gateway"); } if(this.getAttributeValue("webcontent")){ _e01["cv.webcontent"]=this.getAttributeValue("webcontent"); } this.sInitialSpec=this.getAttributeValue("specification"); if(_dfe){ this.addUserParamsToContent(_e01); } if(!this.sInitialSpec||this.copyPasteResource){ if(_dfe){ _e01["ui.object"]=this.getSavedReportSearchPath(_dfa); if(!this.getAttributeValue("savedReportPath")&&this.getAttributeValue("savedReportName")){ _e01["savedReportName"]=_dfa; } _e01["widget.isSavedReport"]="true"; _e01["ui.reRunObj"]=this.getSavedReportSearchPath(_dfa); }else{ _e01["ui.object"]=_df9; if(_dfc&&_dfc.length>0){ _e01["flexParamProperties"]=_dfc; } if(_dfd&&_dfd.length>0){ _e01["gdPromptAnswers"]=_dfd; } } _e01["originalReport"]=_df9; } if(this.getAttributeValue("savedOutputSearchPath")!=null){ this.setSavedOutputSearchPath(this.getAttributeValue("savedOutputSearchPath")); _e01["ui.savedOutputSearchPath"]=this.getAttributeValue("savedOutputSearchPath"); _e01["ui.action"]="buxView"; }else{ if(this.getAttributeValue("mostRecentSavedOutput")=="true"){ _e01["ui.action"]="buxView"; }else{ if(_dfe){ if(this.getAttributeValue("limitedInteractiveMode")==="true"){ _e01["limitedInteractiveMode"]="true"; _e01["ui.action"]="run"; _e01["run.xslURL"]="bux.xsl"; }else{ _e01["ui.action"]="bux"; } if(this.getRunReportOption()!==null){ _e01["widget.runReport"]=(this.getRunReportOption())?"true":"false"; if(this.getDoGetParametersOnLoad()){ _e01["widget.globalPromptInfo"]=""; } this.resetRunReportOption(); } }else{ if(_dfb&&_dfb.length>0&&this.copyPasteResource==null){ _e01["ui.reportDrop"]="true"; _e01["ui.action"]="bux"; _e01["reportpart_id"]=_dfb; }else{ if(this.copyPasteResource){ if(this.ciPublishedReportPath!=null){ _e01["ui.object"]=this.ciPublishedReportPath; } var _e02=dojo.fromJson(this.copyPasteResource); if(_e02[0]&&_e02[0].body){ var _e03=this.getAttributeValue("copy.conversation"); if(_e03){ _e01["ui.conversation"]=_e03; } if(_e02[0].body.specification){ _e01["ui.spec"]=_e02[0].body.specification; _e01["ui.action"]="buxCopyPaste"; if(this.getAttributeValue("reportCreatedInCW")==="true"){ _e01["cv.objectPermissions"]="read write execute setPolicy traverse"; } }else{ _e01["ui.reportDrop"]="true"; _e01["ui.action"]="buxDropReportOnCanvas"; } } }else{ if(this.sInitialSpec){ _e01["ui.spec"]=this.sInitialSpec; _e01["ui.action"]="buxRunSpecification"; _e01["cv.objectPermissions"]="read write execute setPolicy traverse"; }else{ if(this._newReportInfo){ for(prop in this._newReportInfo){ _e01[prop]=this._newReportInfo[prop]; } _e01["ui.reportDrop"]="true"; _e01["ui.action"]="bux"; _e01["cv.objectPermissions"]="read write execute setPolicy traverse"; _e01["ui.objectClass"]="report"; _e01["openReportFromClipboard"]="true"; }else{ _e01["ui.reportDrop"]="true"; _e01["ui.action"]="buxDropReportOnCanvas"; } } } } } } } if(_dff!==null){ _e01["run.prompt"]=(_dff?"true":"false"); } if(this.getAttributeValue("lastLocaleSaved")!=null){ _e01["lastLocaleSaved"]=this.getAttributeValue("lastLocaleSaved"); } var _e04=""; if(this.copyPasteResource){ _e04=this.updateCopyPasteFilters(_df8); }else{ _e04=this.buildDataFiltersParam(_df8); if(typeof _df8=="undefined"||_df8==null){ _e04=this.buildFiltersParamFromLoadedSliderState(); } } if(_e04!=""){ _e01["cv.updateDataFilters"]=_e04; } if(this.properties&&this.properties.getFlashCharts()!==null){ _e01["savedFlashChartOption"]=(this.properties.getFlashCharts()?"true":"false"); var _e05=this.getAttributeValue("hasAVSChart"); if(_e05=="true"){ _e01["hasAVSChart"]="true"; }else{ _e01["hasAVSChart"]="false"; } } if(this.properties.getRowsPerPage()!=null){ _e01["run.verticalElements"]=this.properties.getRowsPerPage(); } var _e06=this.getAttributeValue("syncNewWidgets"); if(_e06===null||_e06==="true"){ _e06=true; }else{ _e06=false; } if(!_dfe&&_e06){ var _e07=this.getGlobalPromptsInfo(); if(_e07!==null){ _e01["widget.globalPromptInfo"]=_e07; } } if(this.isOpeningSavedDashboard()){ _e01["ui.preserveRapTags"]="true"; } if(_dfe===true&&this.getAttributeValue("limitedInteractiveMode")!=="true"){ this.getUserId(); } if(window.cognosViewerDebug){ _e01.debug=true; } _e01["cv.buxCurrentUserRole"]=this.getUserRole(); if(this.shouldUseSavedReportInfo()){ _e01["rap.getReportInfo"]="false"; } if(window.icdConfig&&window.icdConfig.ZIPIMode!="0"){ this.addBUXRTStateInfoToContent(_e01); } this.addBUXWidgetTitleToContent(_e01); return _e01; },addBUXRTStateInfoToContent:function(_e08){ if(_e08!=null){ var _e09=this.getBUXRTStateInfoMap(); if(_e09&&_e09.length>0){ _e08["cv.buxRTStateInfo"]=_e09; } } },addBUXWidgetTitleToContent:function(_e0a){ if(_e0a!=null){ var _e0b=this.getAttributeValue("widgetTitle"); if(_e0b&&_e0b.length>0){ _e0a["widgetTitle"]=_e0b; } var _e0c=this.getDisplayName(); if(_e0c&&_e0c.length>0){ _e0a["displayTitle"]=_e0c; } } },addUserParamsToContent:function(_e0d){ var _e0e=this.getAttributeValue("userParams"); if(!_e0e){ return; } var doc=XMLBuilderLoadXMLFromString(_e0e); if(!doc){ return; } var _e10=XMLHelper_FindChildrenByTagName(doc.documentElement,"item",false); var _e11=_e10.length; for(var i=0;i<_e11;i++){ if(!_e10[i]){ continue; } var _e13=XMLHelper_FindChildByTagName(_e10[i],"name",false); if(!_e13){ continue; } var _e14=XMLHelper_FindChildByTagName(_e10[i],"value",false); _e0d[XMLHelper_GetText(_e13)]=(!_e14?"":XMLHelper_GetText(_e14)); } if(_e11>0){ _e0d["widget.userParameters"]="true"; if(this.getAttributeValue("viewerReportPrompts")){ _e0d["viewerReportPrompts"]=this.getAttributeValue("viewerReportPrompts"); } } this.removeAttributeValue("userParams"); },shouldUseSavedReportInfo:function(){ return this.getAttributeValue("rapReportInfoVersion")===this.RAP_REPORT_INFO_VERSION&&this.getAttributeValue("rapReportInfo")!=null; },isConsumeUser:function(){ return this.getUserRole()==="consume"; },getUserRole:function(){ var _e15=null; var _e16=this.iContext.getItemSet("buxuserprofile",false); if(_e16){ _e15=_e16.getItemValue("currentUserRole"); } return _e15==null?"assemble":_e15; },getUserId:function(){ dojo["require"]("bux.UserAccount"); return bux.UserAccount.getUserAccount().then(dojo.hitch(this,function(_e17){ this.m_sUserId=_e17.cm$searchPath; return this.m_sUserId; })); },_genMobileFormFieldPayload:function(form){ var _e19={}; var _e1a=form.getElementsByTagName("input"); if(_e1a){ for(var i=0;i<_e1a.length;i++){ var name=_e1a[i].getAttribute("name"); var _e1d=_e1a[i].getAttribute("value"); if(name&&_e1d){ _e19[name]=_e1d; } } } return _e19; },launchGotoPageForIWidgetMobile:function(form){ var _e1f={"action":"goto","payload":this._genMobileFormFieldPayload(form)}; if(typeof console!="undefined"&&console&&console.log){ console.log(_e1f); } this.fireEvent("com.ibm.bux.widget.openView",null,_e1f); },executeDrillThroughForIWidgetMobile:function(form){ var _e21=getChildElementsByAttribute(form,"input","name","ui.action"); if(_e21&&_e21.length>0){ _e21[0].setAttribute("value","authoredDrillThroughMobile"); } var _e22={"action":"drillThrough","payload":this._genMobileFormFieldPayload(form)}; if(typeof console!="undefined"&&console&&console.log){ console.log(_e22); } this.fireEvent("com.ibm.bux.widget.openView",null,_e22); },isBuxAvailable:function(){ return (this.bux&&this.bux._base?true:false); },getDrillOptions:function(){ return this.properties.getDrillOptions(); },getPromptRunOption:function(_e23,_e24){ if(!_e24&&_e23&&_e23.length>0){ return false; }else{ if(_e24){ return this.properties.getPromptUserOnLoad(); }else{ return null; } } },buildDataFiltersParam:function(_e25){ var _e26=""; if(_e25&&_e25.length>0){ this.sliderState={}; _e26=""; for(var _e27=0;_e27<_e25.length;++_e27){ var _e28=_e25[_e27]; var _e29=dojo.fromJson(_e28); if(_e29.clientId==this.getWidgetId()){ continue; } if(!(_e29["com.ibm.widget.context.bux.selectValueControl"])){ this.m_oWidgetContextManager.convertSelectionToSelectValueControlPayload(_e29); this.m_oWidgetContextManager.convertGenericToSelectValueControlPayload(_e29); _e28=dojo.toJson(_e29); } _e26+=""+xml_encode(_e28)+""; this.sliderState[_e29.clientId]=_e28; } _e26+=""; } return _e26; },updateCopyPasteFilters:function(_e2a){ this.loadSliderState(); if(this.sliderState){ for(var _e2b in this.sliderState){ this.sliderState[_e2b]="{'clientId':'"+_e2b+"',\t'com.ibm.widget.context':{},'com.ibm.widget.context.bux.selectValueControl':"+"{'selectValueControl':{'id':'"+_e2b+"','controlType':'slider','type':'discrete','valueType':'string'}}}"; } } if(_e2a&&_e2a.length>0){ for(var _e2c=0;_e2c<_e2a.length;++_e2c){ var _e2d=_e2a[_e2c]; var _e2e=dojo.fromJson(_e2d); if(_e2e["com.ibm.widget.context.bux.selection"]){ this.m_oWidgetContextManager.convertSelectionToSelectValueControlPayload(_e2e); this.m_oWidgetContextManager.convertGenericToSelectValueControlPayload(_e2e); _e2d=dojo.toJson(_e2e); } this.sliderState[_e2e.clientId]=_e2d; } } return this.buildDataFiltersParam_fromState(); },buildFiltersParamFromLoadedSliderState:function(){ var _e2f=""; this.loadSliderState(); _e2f=this.buildDataFiltersParam_fromState(); return _e2f; },loadSliderState:function(){ this.sliderState={}; var _e30=dojo.fromJson(this.getAttributeValue("sliderIDs")); if(_e30){ for(var i=0;i<_e30.length;++i){ var _e32=_e30[i]; var _e33=this.getItemValue("sliderState_"+_e32); if(_e33!=null&&_e33!=""){ this.sliderState[_e32]=_e33; } } } },buildDataFiltersParam_fromState:function(){ var _e34=""; if(this.sliderState){ for(var _e35 in this.sliderState){ _e34+=""+xml_encode(this.sliderState[_e35])+""; } if(_e34!==""){ return (""+_e34+""); } } return _e34; },loadContent:function(_e36){ var _e37=dojo.byId("_"+this.iContext.widgetId+"_cv"); this.loadStylesAndScripts(_e36,_e37,true); if(!window.gScriptLoader.hasCompletedExecution()){ var obj=this; this.timer=setInterval(function(){ window.gInitializeViewer(obj); },this.timerInterval); }else{ window.gInitializeViewer(this); } this.viewerWidgetLastAction=null; },executeAction:function(evt,_e3a){ var _e3b=this.getViewerObject(); if(evt&&_e3b){ var _e3c=_e3a?_e3a:evt.payload.name; var _e3d=evt.payload; if(_e3c&&typeof _e3d!="undefined"&&_e3d!=null){ if(evt.payload.payload){ _e3d=evt.payload.payload; } _e3b.executeAction(_e3c,_e3d); } } },onContextMenuAction:function(evt){ this.executeAction(evt); },onToolbarAction:function(evt){ this.executeAction(evt); },updateToolbar:function(){ var _e40=this.getViewerObject(); if(!_e40||(!this.bToolbarInitialized&&typeof CognosViewerAction!="function")){ return; } if(_e40.getStatus()==="prompting"){ return; } var _e41=_e40.getToolbar(); CCognosViewerToolbarHelper.updateToolbarForCurrentSelection(_e40,_e41); this.fireEvent("com.ibm.bux.widgetchrome.toolbar.init",null,_e40.getToolbar()); },onSelect:function(){ if(!this.bToolbarInitialized){ this.bToolbarInitialized=true; var _e42=this.getViewerObject(); if(_e42){ var _e43=_e42.getStatus(); if(_e43!=="prompting"&&_e43!=="working"&&_e43!="stillWorking"){ this.updateToolbar(); } } } this.fireEvent("com.ibm.bux.widget.select.done",null,{}); },hideToolbarAndContextMenu:function(){ this.fireEvent("com.ibm.bux.widget.contextMenu.update"); this.fireEvent("com.ibm.bux.widgetchrome.toolbar.init"); },updateSavedAttributes:function(_e44){ this.setAttributeValue("version",this.BUX_REPORT_VERSION); this.setAttributeValue("viewerProperties",this.properties.toString()); if(this.m_oWidgetContextManager.getSelectionFilterObjects()){ this.setAttributeValue("selectionObjects",this.m_oWidgetContextManager.toStringSelectionFilterObjects()); } if(_e44==="live"){ var oCV=this.getViewerObject(); var _e46=this.getEnvParam("reportPrompts"); if(this.promptParametersRetrieved==true&&_e46&&_e46.length>0){ this.setAttributeValue("viewerReportPrompts",this.getEnvParam("reportPrompts")); } this.setAttributeValue("promptParametersRetrieved",(this.promptParametersRetrieved?"true":"false")); this.setAttributeValue("selectionFilterEnabled",this.m_bSelectionFilterSwitch?"true":"false"); if(this.getEnvParam("reportpart_id")&&this.getEnvParam("reportpart_id").length>0){ this.setAttributeValue("fromReportPart","true"); } if(this.isLimitedInteractiveMode()){ this.setAttributeValue("limitedInteractiveMode","true"); }else{ this.setAttributeValue("baseReportModificationTime",oCV.envParams["baseReportModificationTime"]); } var _e47=oCV.envParams["contentLocale"]; if(_e47!=null){ this.saveSliderState(); this.setAttributeValue("lastLocaleSaved",_e47); } this.setAttributeValue("originalReportLocation",oCV.envParams["originalReportLocation"]); this.setAttributeValue("hasAVSChart",oCV.hasAVSChart()?"true":"false"); this.setAttributeValue("displayTypes",this.getDisplayTypes()); this.setSavedOutputsCMResponse(null); if(oCV.getPinFreezeManager()){ var _e48=oCV.getPinFreezeManager().toJSONString(); this.setAttributeValue("PinFreezeInfo",_e48); } if(oCV.envParams["rapReportInfo"]){ this.setAttributeValue("rapReportInfoVersion",this.RAP_REPORT_INFO_VERSION); this.setAttributeValue("rapReportInfo",oCV.envParams["rapReportInfo"]); } } if(_e44==="savedOutput"){ if(this.getSavedOutputSearchPath()==null){ this.setAttributeValue("mostRecentSavedOutput","true"); }else{ this.setAttributeValue("savedOutputSearchPath",this.getSavedOutputSearchPath()); } this.setAttributeValue("selectionFilterEnabled",this.m_bSelectionFilterSwitch?"true":"false"); } },onItemSetChanged:function(_e49){ if(this.getViewerObject()){ var _e4a=_e49.payload.changes; for(var i in _e4a){ if(_e4a[i].id==="savedReportPath"&&_e4a[i].newVal){ this.updateCVEnvParam(); } } } },updateCVEnvParam:function(){ var oCV=this.getViewerObject(); oCV.envParams["ui.objectClass"]=this.isSavedOutput()?"reportView":"report"; oCV.envParams["widget.isSavedReport"]="true"; var _e4d=this.getAttributeValue("savedReportName"); if(_e4d){ oCV.envParams["ui.object"]=_e4d; oCV.envParams["savedReportName"]=_e4d; }else{ oCV.envParams["ui.object"]=this.getAttributeValue("savedReportPath"); } },onWidgetSave:function(evt){ var _e4f=this.getViewerObject(); var _e50={"status":false}; if(evt&&evt.payload&&evt.payload.isCopy===true){ this.setAttributeValue("copy.conversation",_e4f.getConversation()); }else{ this.removeItem("copy.conversation"); this.removeItem("copy.ciPublishedReportPath"); } var _e51=evt&&evt.payload&&evt.payload.operation=="saveAs"?true:false; if(!_e4f&&!_e51){ this.fireEvent("com.ibm.bux.widget.save.done",null,_e50); return; } this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){ var _e52=this.getViewerObject(); _e52.loadExtra(); if(this.isSavedOutput()){ this.cleanSavedAttributes(); this.updateSavedAttributes("savedOutput"); _e50.status=true; this.fireEvent("com.ibm.bux.widget.save.done",null,_e50); }else{ if(this.sInitialSpec){ _e50.status=true; this.fireEvent("com.ibm.bux.widget.save.done",null,_e50); }else{ var _e53=this.getEnvParam("cv.objectPermissions"); var _e54=new ViewerIWidgetSave(this,evt.payload); if(!_e54.canSave(_e53)){ this.showErrorMessage(RV_RES.IDS_CANNOT_SAVE_CONTENT_ERROR); this.fireEvent("com.ibm.bux.widget.save.done",null,_e50); return; } if(this.isLimitedInteractiveMode()||(_e52.envParams["ui.spec"]&&_e52.envParams["ui.spec"].length>0)){ this.cleanSavedAttributes(); this.updateSavedAttributes("live"); if(_e54.doGetSavePropertiesFromServer()){ _e54.getSavePropertiesFromServer(); }else{ this.doWidgetSaveDone(_e54); } }else{ if(!_e52.envParams["ui.spec"]){ _e54.setDoCWCopy(true); this.doWidgetSaveDone(_e54); }else{ this.fireEvent("com.ibm.bux.widget.save.done",null,_e50); } } } } }),evt); },doWidgetSaveDone:function(_e55){ var _e56=_e55.getPayload(); _e56.status=true; if(window.icdConfig&&window.icdConfig.ZIPIMode!="0"){ var _e57=_e55.m_payload.dashboard; if(_e57){ this._BUXDBInfoArray=this.getBUXDBInfoArray({dbTitle:_e57.title._text,dbSearchPath:_e57.cm$searchPath}); } } this.fireEvent("com.ibm.bux.widget.save.done",null,_e56); },handleGetSavePropertiesFromServerResponse:function(_e58,_e59){ var _e5a=new ViewerIWidgetSave(this,_e59); if(_e58&&_e58.getJSONResponseObject()){ applyJSONProperties(this.getViewerObject(),_e58.getJSONResponseObject()); } this.doWidgetSaveDone(_e5a); },isPreCaspianRP1BUXReport:function(){ var _e5b=this.getAttributeValue("version"); if(!_e5b||_e5b0){ this.setAttributeValue("fromReportPart","true"); } if(this.isLimitedInteractiveMode()){ this.setAttributeValue("limitedInteractiveMode","true"); }else{ this.setAttributeValue("baseReportModificationTime",oCV.envParams["baseReportModificationTime"]); } var _e63=oCV.envParams["contentLocale"]; if(_e63!=null){ this.saveSliderState(); this.setAttributeValue("lastLocaleSaved",_e63); } this.setAttributeValue("originalReportLocation",oCV.envParams["originalReportLocation"]); oCV.envParams["ui.object"]=this.getSavedReportSearchPath(_e61); oCV.envParams["savedReportName"]=_e61; this.setAttributeValue("hasAVSChart",oCV.hasAVSChart()?"true":"false"); this.setAttributeValue("displayTypes",this.getDisplayTypes()); this.setSavedOutputsCMResponse(null); var _e64={"status":true}; this.fireEvent("com.ibm.bux.widget.save.done",null,_e64); },getDisplayTypes:function(){ var oCV=this.getViewerObject(); if(oCV.getRAPReportInfo()){ return oCV.getRAPReportInfo().getDisplayTypes(); } },saveSliderState:function(){ var _e66=this.getViewerObject(); var _e67=_e66.getRAPReportInfo(); var _e68={}; if(_e67){ _e68=_e67.collectSliderSetFromReportInfo(); } var i=0; var _e6a=[]; for(var _e6b in this.sliderState){ if(typeof _e68[_e6b]!="undefined"){ this.setItemValue("sliderState_"+_e6b,this.sliderState[_e6b]); _e6a[i++]=_e6b; }else{ this.removeItem("sliderState_"+_e6b); } } this.setAttributeValue("sliderIDs",dojo.toJson(_e6a)); },onWidgetRefresh:function(evt){ var _e6d={}; var _e6e=this.getViewerObject(); if(evt&&_e6e){ if(_e6e.envParams["ui.action"]=="view"||_e6e.envParams["ui.action"]=="buxView"){ _e6e.executeAction("RefreshViewEvent"); }else{ if(evt.payload&&evt.payload.refreshType=="preferencesChanged"){ this.clearRAPCache(); _e6e.executeAction("EditContent",{"preferencesChanged":true}); _e6e.executeAction("Reprompt",{"preferencesChanged":true}); }else{ if(!this.isVisible()){ this.getDelayedLoadingContext().setForceRunReport(true); }else{ _e6e.executeAction("Refresh"); } } } this.fireEvent("com.ibm.bux.widget.refresh.done",null,_e6d); } },invokeDisplayTypeDialog:function(_e6f,_e70){ if(!this.m_chart){ this.m_chart=new bux.reportViewer.chart(); } var _e71=this.m_chart.getDisplayTypeDialogDefinition(_e6f); var _e72={"supportedChartTypes":_e71,"suggestedDisplayTypes":_e70}; this.fireEvent("com.ibm.bux.widget.invokeDisplayTypeDialog",null,_e72); },onChangeDisplayType:function(evt){ var _e74=this.getViewerObject(); if(evt&&_e74){ _e74.executeAction("ChangeDisplayType",evt.payload); } },onDisplayTypeDialogVariations:function(evt){ var _e76=this.getViewerObject(); if(evt&&_e76){ _e76.executeAction("ChangeDisplayVariations",evt.payload); } },updateDisplayTypeDialogVariations:function(_e77,_e78){ if(!this.m_chart){ this.m_chart=new bux.reportViewer.chart(); } var _e79=this.m_chart.getDisplayTypeDialogDefinition(_e77); var _e7a={"supportedChartTypes":_e79,"variationGroups":_e78}; this.fireEvent("com.ibm.bux.widget.updateDisplayTypeDialogVariations",null,_e7a); },onGetDisplayTitleDone:function(evt){ if(evt&&evt.payload&&evt.payload.callback){ evt.payload.callback(evt.payload.title); } },getWidgetStoreID:function(){ if(typeof this.widgetStoreId==="undefined"){ if(!this.widgetStoreIdDfd){ this.widgetStoreIdDfd=new dojo.Deferred(); } return this.widgetStoreIdDfd; } return this.widgetStoreId; },setWidgetStoreID:function(_e7c){ this.widgetStoreId=_e7c; if(this.widgetStoreIdDfd){ this.widgetStoreIdDfd.callback(this.widgetStoreId); this.widgetStoreIdDfd=null; } },onUpdateWidgetStoreIDDone:function(evt){ var _e7e=evt.payload.storeID; var _e7f="storeID(\""; if(_e7e&&(_e7e.indexOf(_e7f)>-1)){ _e7e=_e7e.substr(_e7f.length,_e7e.length-_e7f.length-1); } dojo.when(this.getWidgetStoreID(),dojo.hitch(this,function(_e80){ if(_e80&&_e80!=_e7e){ this._copyComments(_e80,_e7e); } })); this.setWidgetStoreID(_e7e); },_copyComments:function(_e81,_e82){ var _e83=this.buildPostUrl(); if(_e83){ var _e84=new XmlHttpObject(); _e84.addFormField("b_action","cognosViewer"); _e84.addFormField("widgetOldStoreID",_e81); _e84.addFormField("widgetStoreID",_e82); _e84.addFormField("ui.action","cloneAnnotations"); _e84.addFormField("cv.responseFormat","json"); _e84.sendHtmlRequest("POST",_e83,"",true); } },onRemoveDone:function(evt){ this.destroy(); },onGetProperties:function(evt){ this.initializeProperties(); this.fireEvent("com.ibm.bux.widget.properties.get.done",null,this.properties.onGet()); },onSetProperties:function(evt){ if(evt&&evt.payload&&evt.payload.properties){ this.properties.onSet(evt.payload); } this.fireEvent("com.ibm.bux.widget.properties.set.done"); var _e88={"modified":true}; this.fireEvent("com.ibm.bux.widget.modified",null,_e88); },getProperties:function(){ return this.properties; },clearPropertiesDialog:function(){ if(this.properties){ this.properties.clearDialogSpec(); } },onGenericSelectValueControl:function(evt,_e8a){ if(evt){ this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){ var _e8b=false; var _e8c=this._getFilterPayload(evt); var _e8d=(this.m_oWidgetContextManager)?this.m_oWidgetContextManager.getSelectValueControlTypeFromPayload(_e8c):null; if(_e8d&&_e8d!=="facet"){ var _e8e=dojo.clone(evt); this.preProcessFilterValues(_e8e); this.m_oWidgetContextManager.updateFilterContext(_e8e.payload); _e8b=this.onFilter(_e8e,_e8a); }else{ this.m_oWidgetContextManager.updateFilterContext(_e8c); _e8b=this.onFilter(evt,_e8a); } return _e8b; }),evt.source); } },onFilter:function(evt,_e90){ if(evt){ this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){ var _e91=false; if(this.isLiveReport()===false){ return _e91; } var _e92=this._getFilterPayload(evt); var _e93=(this.m_oWidgetContextManager)?this.m_oWidgetContextManager.getSelectValueControlTypeFromPayload(_e92):null; var _e94=null; var _e95=this.m_oWidgetContextManager.getItemNames(_e92); var _e96=false; for(var i=0;!_e96&&i<_e95.length;i++){ _e94=_e95[i]; _e96=this.canFilter(_e92,_e94,_e93,evt); } if(_e94==null&&!_e96){ _e96=this.canFilter(_e92,_e94,_e93,evt); } if(_e96){ var _e98={}; var _e99=this._getDrillResetHUNForFacet(_e94,_e93); if(_e99&&_e99.length>0){ _e98.drillResetHUN=_e99; } var _e9a=(evt.type=="string")?evt.payload:dojo.toJson(evt.payload); this.sliderState[evt.source]=_e9a; _e98.filterPayload=_e9a; _e98.isFacet=("facet"===_e93); if(_e90){ _e98.forceCleanup=this.m_oWidgetContextManager.genRemoveDiscreteFilterPayload(this.getWidgetId()); } this.getViewerObject().executeAction("UpdateDataFilter",_e98); if(!this.shouldReportBeRunOnAction()){ this.getLoadManager().getDelayedLoadingContext().setForceRunReport(true); } _e91=true; } return _e91; }),evt.source); } },clearSelectionFilter:function(){ if(this.m_oWidgetContextManager){ var _e9b=this.m_oWidgetContextManager.genEmptySelectionPayload(this.getViewerObject(),this.getWidgetId()); this._fireContextChangedEvent(_e9b,false); } },broadcastSelectionFilter:function(){ this.onSelectionChange(); },onSelectionChange:function(){ if(this.isSelectionFilterEnabled()){ var _e9c=(this.getContainerTypeForSelection()==="list"); var _e9d=this.m_oWidgetContextManager.genSelectionPayload(this.getViewerObject(),this.getWidgetId(),_e9c); this._fireContextChangedEvent(_e9d,!this.m_oWidgetContextManager.isSelectionPayloadForReset(_e9d)); } },_fireContextChangedEvent:function(_e9e,_e9f){ this.setSelectionFilterSent(_e9f); this.fireEvent("com.ibm.widget.contextChanged",null,_e9e); },somethingSelected:function(){ var oCV=this.getViewerObject(); return (oCV&&oCV.getSelectionController()&&oCV.getSelectionController().getAllSelectedObjects().length>0); },selectionFilterSent:function(){ return this.m_bSelectionFilterSent; },setSelectionFilterSent:function(flag){ this.m_bSelectionFilterSent=flag; },reselectSelectionFilterObjects:function(){ if(this.isSelectionFilterEnabled()){ var oCV=this.getViewerObject(); var _ea3=oCV.getSelectionController(); var _ea4=this.m_oWidgetContextManager.getSelectionFilterObjects(); if(!_ea4){ var str=this.getAttributeValue("selectionObjects"); if(str&&str.length>0){ _ea4=eval(str); this.m_oWidgetContextManager.setSelectionFilterObjects(_ea4); this.removeAttributeValue("selectionObjects"); } } if(_ea4&&_ea4.length>0){ var _ea6=new ReselectAction(oCV,_ea4); _ea6.executeAction(); } } },_getFilterPayload:function(evt){ return (evt.type=="string"?dojo.fromJson(evt.payload):evt.payload); },_getFilterPayloadItemName:function(_ea8){ var _ea9=_ea8.name; if(!_ea8.name){ _ea9=this.m_oWidgetContextManager.getFilterFirstItemName(); } return _ea9; },canFilter:function(_eaa,_eab,_eac,evt){ var _eae; var _eaf=this.getRAPCachedItem("filterableItems"); if(_eac!=="facet"&&typeof _eab!="undefined"&&_eab!=null&&_eaf!=null){ for(var type in _eaf){ for(_eae=0;_eae<_eaf[type].length;++_eae){ if(_eaf[type][_eae].name==_eab||_eaf[type][_eae].label==_eab){ return true; } } } }else{ var _eb1=this.getViewerObject(); var _eb2=_eb1.getRAPReportInfo(); if(_eb2){ var _eb3=(this.m_oWidgetContextManager)?this.m_oWidgetContextManager.getSelectValuePropertyFromPayload(_eaa,"dimension"):null; var _eb4=_eb2.getContainers(); for(var lid in _eb4){ var _eb6=_eb4[lid]; var _eb7=_eb6.sliders; if(_eb7&&_eb7.length){ for(var _eb8=0;_eb8<_eb7.length;++_eb8){ var _eb9=_eb7[_eb8]; if(_eb9.clientId==_eaa.clientId||(_eb9.clientId==evt.source)||(_eb9.clientId==_eb9.name&&_eb9.name==_eab)){ return true; } } } var _eba=_eb6.itemInfo; if(_eba&&_eba.length){ for(var _ebb=0;_ebb<_eba.length;++_ebb){ if(_eba[_ebb].item==_eab){ return true; } if(_eac==="facet"&&_eba[_ebb].dimensionName==_eab){ return true; } if(_eac==="facet"&&_eba[_ebb].dimensionName===_eb3){ return true; } } } if(_eac==="facet"){ var _ebc=(this.m_oWidgetContextManager)?this.m_oWidgetContextManager.getSelectValuePropertyFromPayload(_eaa,"filterType"):null; if(_eac==="facet"&&_ebc==="attribute"){ return true; } var _ebd=_eb6.filter; if(_ebd&&_ebd.length){ for(var _ebe=0;_ebe<_ebd.length;++_ebe){ if(_ebd[_ebe].hierarchyName===_eab){ return true; } } } }else{ if(_eb2.getFilterObjectFromContainer(lid,_eab,false)){ return true; } } } if(_eb2.isReportLevel_nonVisibleFilterItem(_eab)){ return true; } } } return false; },_getDrillResetHUNForFacet:function(_ebf,_ec0){ if(_ec0!=="facet"){ return null; } var _ec1=null; var _ec2=this.getViewerObject(); if(_ec2.getRAPReportInfo()){ _ec1=_ec2.getRAPReportInfo().getDrilledOnHUNs(); } if(!_ec1){ return null; } var _ec3=[]; for(var i=0;i<_ec1.length;i++){ if(_ec1[i].indexOf(_ebf)!==-1){ _ec3.push(_ec1[i]); break; } } return _ec3; },preProcessFilterValues:function(evt){ var _ec6=evt.payload["com.ibm.widget.context"]["values"]; _ec6=(_ec6)?_ec6:evt.payload["com.ibm.widget.context"]["ranges"]; var _ec7=this.m_oWidgetContextManager.getItemsInItemSpecification(evt.payload); var _ec8=(_ec6)?false:true; if(_ec8){ _ec6=evt.payload["com.ibm.widget.context"]; } var _ec9=this.getViewerObject(); if(_ec9){ var _eca=_ec9.getRAPReportInfo(); for(var _ecb in _ec6){ if(!_eca.isReferenced(_ecb)||_ec8){ delete _ec6[_ecb]; if(_ec7&&_ec7[_ecb]){ delete _ec7[_ecb]; } } } } if(isObjectEmpty(_ec6)){ evt.payload["com.ibm.widget.context"]={}; } },isLimitedInteractiveMode:function(){ var _ecc=this.getViewerObject(); if(_ecc){ return _ecc.isLimitedInteractiveMode(); } return false; },onMouseOver:function(evt){ if(DragDropAction_isDragging(evt)==false&&this.getViewerObject().getStatus()=="complete"){ var _ece=ActionFactory_loadActionHandler(evt,this.getViewerObject()); if(_ece){ return _ece.onMouseOver(evt); } } return true; },onMouseOut:function(evt){ var _ed0=ActionFactory_loadActionHandler(evt,this.getViewerObject()); if(_ed0&&this.getViewerObject().getStatus()=="complete"){ return _ed0.onMouseOut(evt); } return true; },onMouseOverRenamedItem:function(evt){ var node=getNodeFromEvent(evt); if(node.getAttribute){ var _ed3=node.getAttribute("rp_name"); if(_ed3!=null){ var _ed4=this.getViewerObject().getSelectionController().getTextValue(node.childNodes); if(_ed3!=_ed4){ var id=node.getAttribute("id"); node.m_tooltip=new bux.reportViewer.ReportInfo({connectId:[id],position:["above","below"],title:RV_RES.IDS_JS_RENAMED_ITEM,text:RV_RES.IDS_JS_RENAMED_ITEM_ORIGINAL_LABEL+" "+node.getAttribute("rp_name")}); node.m_tooltip.open(); } } } },onMouseOutRenamedItem:function(evt){ var node=getNodeFromEvent(evt); node.m_tooltip=null; },onDoubleClick:function(evt){ var _ed9=ActionFactory_loadActionHandler(evt,this.getViewerObject()); if(_ed9&&this.getViewerObject().getStatus()=="complete"){ return _ed9.onDoubleClick(evt); } return true; },onMouseDown:function(evt){ var oCV=this.getViewerObject(); var _edc=oCV.getActionFactory(); this._selectionAction=_edc.load("Selection"); if(this.isMobile()){ var _edd=oCV.getSelectionController(); var _ede=_edd.pageClickedForMobile(evt); if(this.isSelectionFilterEnabled()){ this.onSelectionChange(); }else{ if(_ede){ this.onContextMenu(evt); } } }else{ if(oCV.envParams["ui.action"]=="view"){ this._selectionAction.onMouseDown(evt); }else{ if(oCV.getStatus()=="complete"){ if((evt.button==1||evt.button==0)){ if(!this._selectionAction.onMouseDown(evt)&&!_edc.load("RenameDataItem").onMouseDown(evt)){ this.initDragAndDrop(); _edc.load("DragDrop").onMouseDown(evt); } }else{ this._selectionAction.onMouseDown(evt); } } } } },onMouseUp:function(evt){ if(this.isMobile()){ return; } var _ee0=getCrossBrowserNode(evt); try{ var _ee1=_ee0.nodeName.toLowerCase(); if(_ee1=="input"||_ee1=="textarea"){ evt.cancelBubble=true; return false; } } catch(ex){ } var _ee2=false; if(this.getViewerObject().envParams["ui.action"]=="view"){ setNodeFocus(evt); }else{ if(this.getViewerObject().getStatus()=="complete"){ _ee2|=DragDropAction_isDragging(evt); DragDropAction_onmouseup(evt); this.removeDragAndDrop(); setNodeFocus(evt); } } if(!this._selectionAction){ var oCV=this.getViewerObject(); var _ee4=oCV.getActionFactory(); this._selectionAction=_ee4.load("Selection"); } this._selectionAction.onMouseUp(evt,_ee2); clearTextSelection(); },getContainerTypeForSelection:function(){ var _ee5=this.getViewerObject(); if(_ee5){ var _ee6=_ee5.getSelectionController(); return _ee6.getDataContainerType(); } return null; },onContextMenu:function(evt){ var _ee8=this.getViewerObject(); if(_ee8.getStatus()=="complete"||this.isSavedOutput()){ var _ee9=_ee8.getContextMenu(); var _eea=CCognosViewerToolbarHelper.updateContextMenuForCurrentSelection(_ee8,_ee9); if(this.isMobile()){ var _eeb=_ee8.getSelectionController(); var _eec=_eeb.getContainerType(); var _eed=_eec==="chart"?_eeb.getChartTooltip():null; if(this.getAnnotationStore()&&this.getAnnotationStore().hasAnnotation()){ var _eee=this._genMobileCommentMenuItem(_eeb); if(_eee){ _eea.push(_eee); } var _eef=this._genMobileCommentMenuItem(); if(_eef){ var _ef0=_ee8.findBlueDotMenu(_eea); if(_ef0){ _ef0.push(_eef); } } } var _ef1={"context":{"event":evt,"viewerContext":{"displayValues":_eeb.getDisplayValues(),"chartTooltip":_eed,"containerType":_eec}},"menuItems":_eea}; if(typeof console!="undefined"&&console&&console.log){ console.log(_ef1); } this.fireEvent("com.ibm.bux.widget.contextMenu.update",null,_ef1); }else{ this.fireEvent("com.ibm.bux.widget.contextMenu.update",null,_eea); } } },_genMobileCommentMenuItem:function(_ef2){ var ctx=null; if(_ef2){ if(_ef2.getSelections().length==1){ ctx=_ef2.getSelections()[0].getCtxAttributeString(); } if(!ctx){ return null; } } var _ef4=this.getAnnotationStore().getAsJSON(ctx); if(_ef4.length>0){ return {"name":RV_RES.IDS_JS_ANNOTATIONS,"label":RV_RES.IDS_JS_ANNOTATIONS,"flatten":false,"comments":_ef4}; } return null; },initDragAndDrop:function(){ if(window.attachEvent){ document.attachEvent("onmouseup",DragDropAction_onmouseup); document.attachEvent("onmousemove",DragDropAction_onmousemove); }else{ if(document.addEventListener){ document.addEventListener("mouseup",DragDropAction_onmouseup,false); document.addEventListener("mousemove",DragDropAction_onmousemove,false); } } },removeDragAndDrop:function(){ if(window.detachEvent){ document.detachEvent("onmouseup",DragDropAction_onmouseup); document.detachEvent("onmousemove",DragDropAction_onmousemove); }else{ if(document.removeEventListener){ document.removeEventListener("mouseup",DragDropAction_onmouseup,false); document.removeEventListener("mousemove",DragDropAction_onmousemove,false); } } },onWidgetResize:function(evt){ var _ef6=evt.payload.resize; if(_ef6){ if(!this.m_visible||(this.widgetSize&&this.widgetSize.h===_ef6.h&&this.widgetSize.w===_ef6.w)){ return; } var _ef7=!this.widgetSize; this.widgetSize={h:_ef6.h,w:_ef6.w}; if(_ef7){ return; } if(!_ef6.autoResize){ this.executeAction(evt,"ResizeChart"); } var oCV=this.getViewerObject(); if(oCV&&oCV.getPinFreezeManager()){ if(_ef6.autoResize){ oCV.getPinFreezeManager().processAutoResize(_ef6.w,_ef6.h); } setTimeout(function(){ oCV.getPinFreezeManager().refresh(); },100); } if(oCV.getTabController()){ oCV.getTabController().onResize(evt); } } },getWidgetSize:function(){ return this.widgetSize; },refreshAnnotationData:function(){ return this.getAnnotationHelper().refreshAnnotationData(); },fetchAnnotationData:function(){ this.getAnnotationHelper().fetchAnnotationData(); },reportContainsDijits:function(){ var _ef9=this.getAnnotationStore(); var _efa=_ef9.getAll(); for(var key in _efa){ if(typeof _efa[key]!=="function"){ return true; } } return false; },isSaveNecessary:function(){ var _efc=false; if(this.isSavedOutput()){ var _efd=this.getAttributeValue("mostRecentSavedOutput"); var _efe=_efd==="true"||_efd===true; var _eff=this.getAttributeValue("savedOutputSearchPath"); _efc=!_efe&&_eff==null; }else{ var _f00=this.getAttributeValue("originalReport"); var _f01=this.getAttributeValue("savedReportName")||this.getAttributeValue("savedReportPath"); if(!this.isSavedReport(_f00,_f01)){ _efc=true; } } return _efc; },addAsNewComment:function(_f02,text){ this.getAnnotationHelper().addAsNewComment(_f02,text); },onWidgetActionDone:function(_f04){ if(_f04&&_f04.payload&&_f04.payload.status===true){ this.getAnnotationHelper().addNewComment(this._pendingContextId,this._pendingCellValue); } this._pendingContextId=null; this._pendingCellValue=null; },commitComment:function(_f05){ if(!_f05.isNew){ return null; } if(!_f05.isLoaded){ return this.getAnnotationHelper().commitComment(_f05); } return null; },getAnnotationStore:function(){ if(!this.annotationStore){ dojo["require"]("bux.data.AnnotationStore"); this.annotationStore=new bux.data.AnnotationStore(this,this.commitComment,this); } return this.annotationStore; },fireEvent:function(_f06,arg,_f08){ if(window.gViewerLogger){ var id=this.getViewerObject()?this.getViewerObject().getId()+" ":""; window.gViewerLogger.log(id+_f06,_f08,"json"); } this.iContext.iEvents.fireEvent(_f06,arg,_f08); },onGetFilterableItems:function(evt){ this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){ var _f0b=false; var _f0c=this.getRAPCachedItem("filterableItems"); if(_f0c==null&&this.isLiveReport()&&(this.getViewerObject().getStatus()=="complete"||this.isFaultStatusWithSpec())){ this.executeAction(evt,"GetFilterableItems"); _f0b=true; }else{ if(!_f0c){ _f0c={visible:[],hidden:[]}; } if(this.isLiveReport()){ this.fireEvent("com.ibm.bux.filter.items.get.done",null,_f0c); }else{ this.savedOutputResponseHandler("com.ibm.bux.filter.items.get.done",_f0c); } } return _f0b; })); },isFaultStatusWithSpec:function(){ var oVO=this.getViewerObject(); if(oVO.getStatus()==="fault"){ if(oVO.envParams["ui.spec"]){ return true; } } return false; },onGetFilterValues:function(oEvt){ this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){ var _f0f=oEvt.payload; if(typeof oEvt.source!="undefined"&&typeof _f0f!="undefined"){ if(typeof _f0f.payload!="undefined"){ _f0f=_f0f.payload; } if(typeof _f0f.source=="undefined"){ _f0f.source=oEvt.source; } } var _f10=false; var _f11=this.isLiveReport(); var _f12=this.getViewerObject().getStatus(); var _f13=this.isFaultStatusWithSpec(); if(_f11&&(_f12==="complete"||_f13)){ var _f14=null; if(!_f0f.forceRefresh&&_f0f.name){ _f14=this.getRAPCachedItem("filterValues."+_f0f.name); } if(_f14){ this.fireEvent("com.ibm.bux.filter.values.get.done",null,_f14); }else{ this.executeAction(oEvt,"GetFilterValues"); _f10=true; } }else{ if(this.getViewerObject().isWorking(_f12)){ var self=this; var _f16=function(){ self.onGetFilterValues(oEvt); }; setTimeout(_f16,10); }else{ var _f17={}; if(_f0f.name){ _f17.name=_f0f.name; } this.fireEvent("com.ibm.bux.filter.values.get.done",null,_f17); } } return _f10; })); },onGetFilterValuesCancel:function(evt){ if(evt&&evt.payload){ var oCV=this.getViewerObject(); var _f1a=oCV.getAction("GetFilterValues"); _f1a.setRequestParms(evt); var _f1b=_f1a.getActionKey(); if(_f1b){ oCV.getViewerDispatcher().cancelRequest(_f1b); } } },savedOutputResponseHandler:function(_f1c,_f1d){ var oCV=this.getViewerObject(); var _f1f=dojo.toJson(_f1d); var _f20="window[\"oCV"+oCV.getId()+"\"].getViewerWidget().fireEvent(\""+_f1c+"\", null, "+_f1f+");"; if(oCV){ var _f21=window["oCV"+oCV.getId()]; if(typeof _f21=="object"){ setTimeout(_f20,1); } } return _f20; },handleGetFilterableItemsResponse:function(_f22){ var _f23={}; var json=this.getJsonFromResponse(_f22); if(json){ _f23=json.filterableItems; if(!_f23){ _f23={"visible":[],"invisible":[]}; } this.addToRAPCache("filterableItems",_f23); } this.fireEvent("com.ibm.bux.filter.items.get.done",null,_f23); },handleGetFilterValuesResponse:function(_f25,_f26){ var _f27={}; var json=this.getJsonFromResponse(_f25); if(json&&json.filterValues){ _f27=json.filterValues; if(_f27&&_f27.name){ this.addToRAPCache("filterValues."+_f27.name,_f27); } } if(_f26&&_f26.name&&!_f27.name){ _f27.name=_f26.name; } _f27=dojo.clone(_f27); this.fireEvent("com.ibm.bux.filter.values.get.done",null,_f27); },getJsonFromResponse:function(_f29){ var json=null; if(_f29&&_f29.m_jsonResponse&&_f29.m_jsonResponse.json){ json=dojo.eval("("+_f29.m_jsonResponse.json+")"); }else{ if(_f29&&_f29.responseText){ json=dojo.eval("["+_f29.responseText+"]"); if(json&&json[0]){ json=json[0]; } } } return json; },onContextChanged:function(evt){ if(evt){ this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){ var _f2c=false; var _f2d=dojo.clone(evt); var _f2e=this._getFilterPayload(_f2d); this.m_oWidgetContextManager.convertSelectionToSelectValueControlPayload(_f2e); this.m_oWidgetContextManager.convertGenericToSelectValueControlPayload(_f2e); var _f2f=this.getViewerObject(); var _f30=_f2f.getRAPReportInfo(); if(_f30&&(_f30.containsFilters()||_f30.hasSlider())){ var _f31=_f2e["com.ibm.widget.context"].values; var _f32=this.m_oWidgetContextManager.getItemsInItemSpecification(_f2e); var _f33=dojo.clone(_f32); for(var _f34 in _f33){ if(!_f30.isReferenced(_f34)&&_f32[_f34].values){ var mun=_f32[_f34].values[0].mun; var _f36=_f30.hunHasFilterOrSlider(mun); if(_f36&&!_f32[_f36]){ _f32[_f36]=_f32[_f34]; delete _f32[_f34]; _f31[_f36]=_f31[_f34]; delete _f31[_f34]; } } } } _f2d.payload=_f2e; _f2c=this.onGenericSelectValueControl(_f2d,true); return _f2c; }),evt.source); } },broadcastParameterChange:function(_f37){ var _f38={"clientId":this.getWidgetId(),"com.ibm.widget.context":_f37}; this.fireEvent("com.ibm.widget.contextChanged.prompt",null,_f38); },broadcastContextChange:function(_f39){ if(this.isSelectionFilterEnabled()){ var _f3a={"clientId":this.getWidgetId(),"com.ibm.widget.context":_f39,"com.ibm.widget.context.bux.selection":{"selection":{"id":this.getWidgetId(),"valueType":"string"}}}; this.m_oWidgetContextManager.updateFilterContext(_f3a); this.m_oWidgetContextManager.setSelectionFilterObjects(null); this._fireContextChangedEvent(_f3a,true); } },onGenericDrill:function(evt){ this.m_handleDrill=false; this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){ var _f3c=false; if(!(evt&&evt.payload)||this.isLimitedInteractiveMode()){ return _f3c; } if(evt.payload.cv_id===this.iContext.widgetId){ return _f3c; } var _f3d=this.m_oWidgetContextManager.getDrillActionType(evt.payload); var _f3e=this.m_oWidgetContextManager.genDrillSpecObjects(evt.payload); var _f3f=null; if(_f3d==="DrillDown"){ _f3f=this.getViewerObject().getAction("DrillDown"); }else{ if(_f3d==="DrillUp"){ _f3f=this.getViewerObject().getAction("DrillUp"); }else{ return _f3c; } } _f3f.setKeepFocusOnWidget(false); if(this.getViewerObject().isMetadataEmpty()||!this.shouldReportBeRunOnAction()){ _f3f.setUseReportInfoSelection(true); } if(_f3f.parseDrillSpecObjects(_f3e)){ if(!this.shouldReportBeRunOnAction()){ this.getLoadManager().getDelayedLoadingContext().setForceRunReport(true); } _f3f.execute(); _f3c=true; } this.m_handleDrill=true; return _f3c; })); },setDoGetParametersOnLoad:function(_f40){ this.m_doGetParametersOnLoad=_f40; },getDoGetParametersOnLoad:function(){ return this.m_doGetParametersOnLoad; },onPromptLegacyPayload:function(evt){ try{ if(evt.payload.cv_id===this.iContext.widgetId){ return false; } var _f42=null; this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(_f43){ _f42=false; if(this.isSavedOutput()){ return _f42; } if(this.promptParametersRetrieved===false){ var _f44=this.getViewerObject().getAction("GetParameters"); _f44.setRequestParms(evt.payload); _f44.execute(); _f42=true; }else{ _f42=this.sharePrompts(evt.payload); } return _f42; })); return _f42; } catch(e){ return false; } },sharePrompts:function(_f45){ var _f46=this.getViewerObject().getAction("SharePrompt"); _f46.setRequestParms(_f45); if(this.shouldReportBeRunOnAction()){ var _f47=this.getViewerObject().getDrillResetHUNs(_f45); if(!_f47||_f47.length===0){ return _f46.executePrompt(); }else{ var _f48={"drilledResetHUNs":_f47,"promptValues":_f46.getPromptValues()}; this.getViewerObject().executeAction("DrillReset",_f48); } return true; } var _f49=this.getLoadManager().getDelayedLoadingContext(); _f49.setPromptValues(_f46.getPromptValues()); _f49.setCascadingPromptParamsToClear(_f45.clearCascadePromptParams); return false; },onGenericPrompt:function(evt){ this.clearRAPCacheFilterValues(); this.m_oWidgetContextManager.handleIncomingPromptEvent(evt); },setPromptParametersRetrieved:function(_f4b){ this.promptParametersRetrieved=_f4b; },getEnvParam:function(_f4c){ return this.getViewerObject().envParams[_f4c]; },destroy:function(){ var _f4d=this.getViewerObject(); if(_f4d){ if(this.isSelectionFilterEnabled()){ if(this.selectionFilterSent()){ this.clearSelectionFilter(); } } if(this.onUnloadInProgress){ _f4d.destroy(false); }else{ _f4d.destroy(true); } var _f4e=function(_f4f){ if(_f4f&&_f4f.parentNode&&_f4f.parentNode.removeChild){ _f4f.parentNode.removeChild(_f4f); } }; var _f50=dojo.query("[namespaceId='"+this.getViewerId()+"'],[namespaceId='"+this.m_sScriptLoaderNamespace+"']",document.getElementsByTagName("head").item(0)); if(_f50&&_f50.length>0){ _f50.forEach(_f4e); } _f50=dojo.query("> [namespaceId=\""+this.getViewerId()+"\"]",document.getElementsByTagName("body").item(0)); if(typeof _f50!="undefined"&&_f50&&_f50.length>0){ _f50.forEach(_f4e); } if(this.getAnnotationHelper()){ this.getAnnotationHelper()._cleanupPreviousAnnotations(); } } if(this.annotationHelper){ this.annotationHelper.m_viewerIWidget=null; } this.annotationHelper=null; if(this.savedOutput){ this.savedOutput.iWidget=null; } this.savedOutput=null; if(this.m_oLoadManager){ this.m_oLoadManager.m_oWidget=null; } this.m_oLoadManager=null; if(this.m_oWidgetContextManager){ this.m_oWidgetContextManager.m_widget=null; } this.m_oWidgetContextManager=null; this.removeWindowEventListeners(); if(this.undoRedoQueue){ GUtil.destroyProperties(this.undoRedoQueue); delete this.undoRedoQueue; } GUtil.destroyProperties(this.getAnnotationStore()); delete this.getAnnotationStore(); GUtil.destroyProperties(this.savedOutput); delete this.savedOutput; delete this.m_oCV; _f4d=null; },setSavedOutputsCMResponse:function(_f51){ this.savedOutputsCMResponse=_f51; if(_f51==null){ var _f52=this.getViewerObject().getActionFactory(); var _f53=_f52.load("Snapshots"); _f53.resetMenu(); } },getSavedOutputsCMResponse:function(){ if(typeof this.savedOutputsCMResponse=="undefined"||this.savedOutputsCMResponse==null){ return null; } return this.savedOutputsCMResponse; },setSavedOutputSearchPath:function(_f54){ this.m_savedOutputSearchPath=_f54; },getSavedOutputSearchPath:function(){ if(typeof this.m_savedOutputSearchPath=="undefined"){ return null; } return this.m_savedOutputSearchPath; },initializeProperties:function(){ if(this.properties){ var _f55=this.getViewerObject(); this.properties.initialize(_f55.envParams); } },addToRAPCache:function(name,_f57){ if(!this.m_RAPCache){ this.m_RAPCache={}; } this.m_RAPCache[name]=_f57; },getRAPCachedItem:function(name){ if(this.m_RAPCache&&typeof this.m_RAPCache[name]!="undefined"){ return this.m_RAPCache[name]; } return null; },clearRAPCacheFilterValues:function(){ for(var key in this.m_RAPCache){ if(key.indexOf("filterValues.")===0){ delete this.m_RAPCache[key]; } } },clearRAPCache:function(){ this.m_RAPCache=null; },reset:function(){ this.m_bCallGetAnnotations=true; this.promptParametersRetrieved=false; this.getViewerObject().envParams["reportPrompts"]=""; this.setSavedOutputsCMResponse(null); this.getUndoRedoQueue().clearQueue(); if(this.isSelectionFilterEnabled){ this.clearSelectionFilter(); } this.m_bSelectionFilterSwitch=false; },handleFault:function(){ if(typeof console!="undefined"&&console&&console.log){ console.log("ViewrIWidget:handle fault is deprecated and should not be used anymore."); } var _f5a=this.getViewerObject(); var _f5b=new RequestHandler(_f5a); _f5b.onFault(); },disableListenToForGlobalPrompt:function(){ this.fireEvent("com.ibm.bux.widget.updateEventFilter",null,{"*":{blockedEvents:["com.ibm.widget.contextChanged.prompt"]}}); var _f5c=this.getViewerObject(); if(window.gaRV_INSTANCES){ var _f5d={}; _f5d[this.iContext.widgetId]={blockedEvents:["com.ibm.widget.contextChanged.prompt"]}; for(var _f5e=0;_f5e0){ this.m_queue.pop(); } this.m_iCurrentPos=0; }; UndoRedoQueue.prototype.getPosition=function(){ return this.m_iCurrentPos; }; UndoRedoQueue.prototype.hasBeenUsed=function(){ return this.beenUsed; }; UndoRedoQueue.prototype.getLength=function(){ return this.m_queue.length; }; UndoRedoQueue.prototype.initUndoObj=function(obj){ if(this.m_queue.length==0){ var oCV=this.m_widget.getViewerObject(); var spec=this.m_originalSpec==null?oCV.envParams["ui.spec"]:this.m_originalSpec; this.m_originalSpec=null; this.m_queue.push({"spec":spec,"parameters":oCV.getExecutionParameters(),"tooltip":obj.tooltip,"infoBar":oCV.envParams["rapReportInfo"],"widgetProperties":this.m_widget.getProperties().getOldProperties(),"hasAVSChart":oCV.hasAVSChart(),"undoType":"server"}); this.m_iCurrentPos=this.m_queue.length-1; this.beenUsed=true; } this.currentUndoObj=obj; }; UndoRedoQueue.prototype.add=function(obj){ if(this.m_bUndoRedoCalled){ this.m_bUndoRedoCalled=false; return; }else{ if(this.currentUndoObj==null){ return; }else{ if(obj.reportUpdated==true){ while(this.m_queue.length>this.m_queueLimit){ this.m_queue.shift(); } this.clearEnd(); var _fa4=this.m_widget.getViewerObject(); if(this.currentUndoObj.saveSpec==true||_fa4.envParams["ui.doNotUseConversationForUndo"]==="true"){ this.currentUndoObj.spec=_fa4.envParams["ui.spec"]; this.currentUndoObj.parameters=_fa4.getExecutionParameters(); }else{ this.currentUndoObj.conversation=_fa4.getConversation(); } if(_fa4.envParams["rapReportInfo"]){ this.currentUndoObj.infoBar=_fa4.envParams["rapReportInfo"]; } this.currentUndoObj.widgetProperties=this.m_widget.getProperties().getUndoInfo(); this.currentUndoObj.palette=_fa4.m_sPalette; if(this.m_widget.getProperties().getFlashCharts()){ this.currentUndoObj.hasAVSChart=_fa4.hasAVSChart(); } this.currentUndoObj.undoType="server"; this.finalizeAdd(); } } } }; UndoRedoQueue.prototype.addClientSideUndo=function(obj){ if(this.m_bUndoRedoCalled){ this.m_bUndoRedoCalled=false; return; } if(obj.undoCallback&&obj.redoCallback){ this.initUndoObj(obj); this.currentUndoObj.undoType="client"; this.finalizeAdd(); } }; UndoRedoQueue.prototype.finalizeAdd=function(){ this.m_queue.push(this.currentUndoObj); this.m_iCurrentPos=this.m_queue.length-1; this.m_bUndoRedoCalled=false; this.m_lastAction=""; this.currentUndoObj=null; this.beenUsed=true; }; UndoRedoQueue.prototype.moveBack=function(){ if(this.m_iCurrentPos<=0){ return null; } var _fa6=this.m_queue[this.m_iCurrentPos].undoType; this.m_bUndoRedoCalled=true; this.m_lastAction="undo"; this.m_iCurrentPos--; this.m_viewerState={"parameters":this.m_widget.getViewerObject().getExecutionParameters(),"spec":this.m_widget.getViewerObject().envParams["ui.spec"]}; if(typeof this.m_queue[this.m_iCurrentPos]!="undefined"){ this.m_widget.getViewerObject().m_sPalette=this.m_queue[this.m_iCurrentPos].palette; if(_fa6=="client"){ return this.m_queue[this.m_iCurrentPos+1]; } var _fa7=this.m_iCurrentPos; while(_fa7>0&&this.m_queue[_fa7]&&this.m_queue[_fa7].undoType!="server"){ _fa7--; } return this.m_queue[_fa7]; } return null; }; UndoRedoQueue.prototype.moveForward=function(){ if(this.m_iCurrentPos>=this.m_queue.length){ return null; } this.m_bUndoRedoCalled=true; this.m_iCurrentPos++; this.m_lastAction="redo"; this.m_viewerState={"parameters":this.m_widget.getViewerObject().getExecutionParameters(),"spec":this.m_widget.getViewerObject().envParams["ui.spec"]}; if(typeof this.m_queue[this.m_iCurrentPos]!="undefined"){ this.m_widget.getViewerObject().m_sPalette=this.m_queue[this.m_iCurrentPos].palette; return this.m_queue[this.m_iCurrentPos]; } return null; }; UndoRedoQueue.prototype.clearEnd=function(){ while(this.m_queue.length-1>this.m_iCurrentPos){ this.m_queue.pop(); } }; UndoRedoQueue.prototype.handleCancel=function(){ if(this.m_lastAction=="undo"){ this.m_iCurrentPos++; }else{ if(this.m_lastAction=="redo"){ this.m_iCurrentPos--; } } if(this.m_lastAction=="redo"||this.m_lastAction=="undo"){ var _fa8=this.m_widget.getProperties(); var _fa9=this.m_queue[this.m_iCurrentPos]; if(_fa8&&_fa9&&_fa9.widgetProperties){ _fa8.doUndo(_fa9.widgetProperties); } } this.m_lastAction=""; this.m_bUndoRedoCalled=false; this.currentUndoObj=null; }; UndoRedoQueue.prototype.handleFault=function(){ this.currentUndoObj=null; this.m_bUndoRedoCalled=false; }; UndoRedoQueue.prototype.getUndoTooltip=function(){ if(this.m_iCurrentPos>0){ return RV_RES.IDS_JS_UNDO+" "+this.m_queue[this.m_iCurrentPos].tooltip; } return RV_RES.IDS_JS_UNDO; }; UndoRedoQueue.prototype.getRedoTooltip=function(){ if(this.m_iCurrentPos<(this.m_queue.length-1)){ return RV_RES.IDS_JS_REDO+" "+this.m_queue[this.m_iCurrentPos+1].tooltip; } return RV_RES.IDS_JS_REDO; }; function CIWidgetSavedOutput(_faa){ this.iWidget=_faa; this.bContainsChart=false; this.bContainsDrillThrough=false; this.bPagedOutput=true; }; CIWidgetSavedOutput.prototype.getIWidget=function(){ return this.iWidget; }; CIWidgetSavedOutput.prototype.isPagedOutput=function(){ return this.bPagedOutput; }; CIWidgetSavedOutput.prototype.setPagedOutput=function(_fab){ this.bPagedOutput=_fab; }; CIWidgetSavedOutput.prototype.getCognosViewer=function(){ return this.getIWidget().getViewerObject(); }; CIWidgetSavedOutput.prototype.getIframeWindow=function(){ return this.savedOutputWindow; }; CIWidgetSavedOutput.prototype.getSavedOutputDiv=function(){ return this.savedOutputDiv; }; CIWidgetSavedOutput.prototype.render=function(){ if(this.isPagedOutput()&&this.getFirstPage()){ this.currentPageIndex=0; this._showPages([this.getFirstPage()]); }else{ if(this.tabbedSavedOutput&&this.currentPageIndex&&this.pageNodes){ var _fac=this.pageNodes[this.currentPageIndex].getAttribute("tabid"); this.switchSavedOutputTab(_fac); }else{ if(this.getCognosViewer()&&this.getCognosViewer().getCurrentlySelectedTab()){ this.switchSavedOutputTab(this.getCognosViewer().getCurrentlySelectedTab()); }else{ this.showHTMLFragment(this.getIframeWindow().document.body.innerHTML); } } } }; CIWidgetSavedOutput.prototype.outputDoneLoading=function(){ if(window["gReportWidgetLoadQueue"]){ window["gReportWidgetLoadQueue"].widgetDoneLoading(this.getIWidget()); } this.getIWidget().setOriginalFormFields(null); var _fad=this.getCognosViewer(); var _fae=_fad.getId(); this.savedOutputWindow=dojo.byId("CVHiddenIFrame"+_fae).contentWindow; this.savedOutputDiv=dojo.byId("CVSavedOutputDiv"+_fae); var sc=_fad.getSelectionController(); if(!sc.hasContextData()&&this.savedOutputWindow.onLoadEvent){ this.savedOutputWindow.onLoadEvent(); } this._populatePageNode(); var _fb0=dojo.byId("_"+this.iWidget.iContext.widgetId+"_cv"); this.loadStyleInfoFromIframe(_fb0); this.bContainsChart=typeof this.savedOutputWindow.displayChart=="function"?true:false; this.bContainsDrillThrough=typeof this.savedOutputWindow.drillThroughTarget!="undefined"?true:false; this.render(); this.getMetaDataFromIFrame(); if(this.bContainsDrillThrough){ window[_fae+"drillTargets"]=this.getIframeWindow().drillTargets; } _fad.fillInContextData(); _fad.updateBorderCollapse(); this.getIWidget().updateToolbar(); _fad.setReportRenderingDone(true); var _fb1=GUtil.generateCallback(this.getIWidget().fetchAnnotationData,[],this.getIWidget()); var _fb2=this.getPageContextData(_fb1); if(_fb2==0){ this.getIWidget().fetchAnnotationData(); } this.fixDuplicateFormFields(); this.getIWidget().getLoadManager().processQueue(); delete _fad.envParams["cv.outputKey"]; this.getIWidget().setXNodeId(null); var _fb3=this.getIWidget(); var _fb4=function(){ _fb3.iContext.iEvents.fireEvent("com.ibm.bux.widget.render.done",null,{}); _fad.renderTabs(); if(_fad.getCurrentlySelectedTab()!=null){ _fb3.getSavedOutput().tabbedSavedOutput=true; _fb3.getSavedOutput().switchSavedOutputTab(_fad.getCurrentlySelectedTab()); } }; setTimeout(_fb4,100); }; CIWidgetSavedOutput.prototype._populatePageNode=function(){ this.pageNodes=[]; var node=this.getIframeWindow().document.body.firstChild; while(node){ if(node.nodeName.toLowerCase()=="table"){ this.pageNodes.push(node); } node=node.nextSibling; } }; CIWidgetSavedOutput.prototype.switchSavedOutputTab=function(_fb6,_fb7){ if(!this.pageNodes){ return; } if(_fb7){ if(!this.lastVisitedPage){ this.lastVisitedPage={}; } if(this.isPagedOutput()){ var _fb8=this.pageNodes[this.currentPageIndex].getAttribute("tabid"); this.lastVisitedPage[_fb8]=this.currentPageIndex; if(this.lastVisitedPage[_fb6]){ this.currentPageIndex=this.lastVisitedPage[_fb6]; this._showPages([this.pageNodes[this.currentPageIndex]]); return; } } } var _fb9=[]; for(var i=0;i0){ if(_fbc[name].length>1){ var _fbf=_fbc[name][_fbc[name].length-1].value; while(_fbc[name].length>1){ _fbc[name][1].parentNode.removeChild(_fbc[name][1]); } if(_fbc[name][0]){ _fbc[name][0].value=_fbf; } _fbc[name].value=_fbf; } } } } }; CIWidgetSavedOutput.prototype.getPageContextData=function(_fc0){ var _fc1={}; dojo.query("[ctx]",this.getSavedOutputDiv()).forEach(function(item){ var ctx=item.getAttribute("ctx"); var _fc4=ctx.split(":"); for(var i=0;i<_fc4.length;i++){ var _fc6=_fc4[i]; if(_fc6&&_fc6.length>0){ _fc1[_fc6]=true; } } }); var _fc7=[]; for(var item in _fc1){ _fc7.push(item); } return this.getCognosViewer().getSelectionController().fetchContextData(_fc7,_fc0); }; CIWidgetSavedOutput.prototype.loadStyleInfoFromIframe=function(_fc9){ var _fca=null; var _fcb=this.savedOutputWindow.document; for(var _fcc=0;_fcc<_fcb.childNodes.length;_fcc++){ if(_fcb.childNodes[_fcc].childNodes&&_fcb.childNodes[_fcc].childNodes.length>0){ _fca=_fcb.childNodes[_fcc]; break; } } window.gScriptLoader.loadStyles(_fca.firstChild,this.iWidget.getViewerId()); var _fcd=dojo.query("link",_fca); var _fce=""; for(i=0;i<_fcd.length;i++){ var href=_fcd[i].getAttribute("href"); if(href){ _fce+=""; } } window.gScriptLoader.loadCSS(_fce,_fc9,true,this.iWidget.getViewerId()); }; CIWidgetSavedOutput.prototype.getFirstPage=function(){ return this.pageNodes[0]; }; CIWidgetSavedOutput.prototype.getLastPage=function(){ return this.pageNodes?this.pageNodes[this.pageNodes.length-1]:null; }; CIWidgetSavedOutput.prototype.writeNavLinks=function(){ var _fd0=""; if(this.isPagedOutput()){ if(this.tabbedSavedOutput&&!isNaN(this.currentPageIndex)){ var _fd1=this.pageNodes[this.currentPageIndex].getAttribute("tabid"); if(this.currentPageIndex>0&&this.pageNodes[this.currentPageIndex-1].getAttribute("tabid")==_fd1){ _fd0+=" firstPage previousPage "; } if(this.currentPageIndex<(this.pageNodes.length-1)&&this.pageNodes[this.currentPageIndex+1].getAttribute("tabid")==_fd1){ _fd0+=" nextPage lastPage "; } }else{ if(this.currentPageIndex>0){ _fd0+=" firstPage previousPage "; } if(this.currentPageIndex<(this.pageNodes.length-1)){ _fd0+=" nextPage lastPage "; } } } this.getCognosViewer().writeNavLinks(_fd0,true); }; CIWidgetSavedOutput.prototype.pageAction=function(_fd2){ switch(_fd2){ case "firstPage": if(this.tabbedSavedOutput){ var _fd3=this.pageNodes[this.currentPageIndex].getAttribute("tabid"); for(var i=0;i0&&aM[0].indexOf("'_THIS_'")>0){ this.bOldOutput=false; }else{ this.bOldOutput=true; var _fe2=""; var quot="'"; if(aM.length>0){ _fe2=aM[0].charAt(aM[0].length-1); } if(_fe2=="'"){ quot="\""; } for(var i=0;i=0){ var _fe9=_fe8.indexOf("content"); var _fea=_fe8.substring(0,_fe9); _fe5=_fe5.replace(/src\=\"images\//g,"src=\""+_fea+"images/"); } _fe5=this.fixupChartUseMapValue(_fe5); return _fe5.replace(/displayChart[^;].*;|var graphicSrc[^;].*;|var graphicName[^;].*;/g,""); }; CIWidgetSavedOutput.prototype.fixupChartUseMapValue=function(_feb){ var re=/usemap\s*=\s*"*#(\w+)"*/gi; var _fed,_fee=[]; while((_fed=re.exec(_feb))){ _fee.push(_fed[1]); } for(var i=0;i<_fee.length;i++){ var _ff0=new RegExp(_fee[i],"g"); _feb=_feb.replace(_ff0,_fee[i]+this.getCognosViewer().getId()); } return _feb; }; CIWidgetSavedOutput.prototype.showHTMLFragment=function(_ff1){ if(this.bContainsChart){ _ff1=this.processChart(_ff1); } _ff1=this.processDrillThrough(_ff1); _ff1=_ff1.replace(/_THIS_/g,this.getCognosViewer().getId()); this.getIWidget().loadStylesAndScripts(_ff1,this.getSavedOutputDiv(),false); this.getIWidget().reselectSelectionFilterObjects(); this.getIWidget().addChromeWhitespaceHandler(this.getCognosViewer().getId()); }; function gInitializeViewer(obj){ if(window.gScriptLoader.hasCompletedExecution()){ var _ff3=obj.getViewerObject(); if(_ff3&&_ff3.inlineScriptsDoneExecuting==true){ clearInterval(obj.timer); if(typeof _ff3.errorOccured!="undefined"){ obj.fireEvent("com.ibm.bux.widget.render.done",null,{}); }else{ if(typeof _ff3.getToolbar()!="undefined"){ _ff3.setViewerWidget(obj); if(obj.isSelectionFilterEnabled()){ obj.updateDrillThroughLinks(); } if(obj.isDashboardOwner()){ _ff3.addReportInfo(); } if(obj.promptParametersRetrieved==true){ var _ff4=obj.getAttributeValue("viewerReportPrompts"); _ff3.envParams["reportPrompts"]=_ff4; }else{ if(_ff3.envParams&&_ff3.envParams["widget.promptParametersRetrievedOnDrop"]=="true"){ obj.promptParametersRetrieved=true; } } var _ff5=obj.getAttributeValue("syncNewWidgets"); if(_ff5===null||_ff5==="true"){ _ff5=true; }else{ _ff5=false; } if(!_ff5&&(obj.isPastedWidget()||obj.isOpeningSavedDashboard()==false)){ obj.disableListenToForEvent(["com.ibm.widget.contextChanged.drill","com.ibm.widget.contextChanged.prompt","com.ibm.widget.contextChanged"]); } obj.fireEvent("com.ibm.bux.widget.setShowBordersWhenInnactive",null,(_ff3.m_flashChartsObjectIds.length!==0)); } } } } }; function gVWEvent(sId,evt,_ff8){ var oCV=window["oCV"+sId]; if(oCV){ oCV.loadExtra(); var _ffa=oCV.getViewerWidget(); if(_ffa){ _ffa[_ff8](evt); } } }; function ReportWidgetLoadQueue(_ffb){ this._concurrentLoadSetting=_ffb; this._widgetsRunning=[]; this._queue=[]; }; ReportWidgetLoadQueue.prototype.add=function(_ffc){ this._queue.push(_ffc); this.loadNextWidget(); }; ReportWidgetLoadQueue.prototype.widgetDoneLoading=function(_ffd){ for(var i=0;i0){ text+=" - "+enforceTextDir(_100c); } return text; }; CognosViewerCellAnnotation.prototype.hasAnnotaionsOnSelectedCell=function(){ var _1010=this.getSelections(); if(_1010&&_1010.length==1){ var _1011=_1010[0].getCellRef(); var ctxId=this.getCognosViewer().findCtx(_1011); var _1013=this.getCognosViewer().getViewerWidget(); if(_1013){ var _1014=_1013.getAnnotationStore(); if(_1014){ var _1015=_1014.get(ctxId); if(_1015&&_1015.length>0){ return true; } } } } return false; }; CognosViewerCellAnnotation.prototype.getChangeableAnnotation=function(){ var _1016=this.getSelections(); if(_1016&&_1016.length==1){ var _1017=_1016[0].getCellRef(); var ctxId=this.getCognosViewer().findCtx(_1017); var _1019=this.getCognosViewer().getViewerWidget(); if(_1019){ var _101a=_1019.getAnnotationStore(); if(_101a){ return _101a.getChangeableAnnotation(ctxId); } } } return null; }; CognosViewerCellAnnotation.prototype.hasValidContextOnSelectedCell=function(){ var _101b=this.getSelections(); if(_101b&&_101b.length==1){ var _101c=_101b[0].getCellRef(); var ctxId=this.getCognosViewer().findCtx(_101c); if(ctxId){ var ids=AnnotationCTXLookup.generateIDArrayFromCellCtxValue(ctxId); for(var i=0;i0){ _1025=enforceTextDir(_1025); text+=" - "+_1025; } return text; }; CognosViewerWidgetAnnotation.prototype.hasWidgetLevelAnnotations=function(){ var _1027=false; var _1028=this.getCognosViewer().getViewerWidget(); if(_1028){ var _1029=_1028.getAnnotationStore(); var _102a=_1029.get(_1029.WIDGET_CONTEXT); if(_102a&&_102a.length>0){ _1027=true; } } return _1027; }; CognosViewerWidgetAnnotation.prototype.getWidgetLevelChangeableAnnotation=function(){ var _102b=this.getCognosViewer().getViewerWidget(); if(_102b){ var _102c=_102b.getAnnotationStore(); if(_102c){ return _102c.getChangeableAnnotation(_102c.WIDGET_CONTEXT); } } return null; }; CognosViewerWidgetAnnotation.prototype.hasValidSelection=function(_102d){ var _102e=this.m_oCV.getSelectionController(); var _102f=_102e.getSelections(); var _1030=false; if(_102e.hasSelectedChartNodes()){ _1030=(_102e.getSelectedChartNodes()[0].m_contextIds.length>0); } return (_102d==="widgetActions")||(_102f.length!=1&&!_1030); }; function NewWidgetAnnotation(){ }; NewWidgetAnnotation.prototype=new CognosViewerWidgetAnnotation(); NewWidgetAnnotation.prototype.isEnabled=function(_1031){ return this.areAnnotationsEnabled()&&(_1031!=="contextMenu")&&this.hasValidSelection(_1031); }; NewWidgetAnnotation.prototype.getMenuItemBaseString=function(){ return RV_RES.IDS_JS_WIDGET_ANNOTATION_NEW; }; NewWidgetAnnotation.prototype.getMenuItemIconClass=function(){ return "NewWidgetAnnotation"; }; function EditWidgetAnnotation(){ }; EditWidgetAnnotation.prototype=new CognosViewerWidgetAnnotation(); EditWidgetAnnotation.prototype.isEnabled=function(_1032){ return (this.areAnnotationsEnabled()&&(_1032!=="contextMenu")&&this.hasValidSelection(_1032)&&this.getWidgetLevelChangeableAnnotation())?true:false; }; EditWidgetAnnotation.prototype.getMenuItemBaseString=function(){ return RV_RES.IDS_JS_WIDGET_ANNOTATION_EDIT; }; EditWidgetAnnotation.prototype.getMenuItemIconClass=function(){ return "EditWidgetAnnotation"; }; function DeleteWidgetAnnotation(){ }; DeleteWidgetAnnotation.prototype=new CognosViewerWidgetAnnotation(); DeleteWidgetAnnotation.prototype.isEnabled=function(_1033){ return (this.areAnnotationsEnabled()&&(_1033!=="contextMenu")&&this.hasValidSelection(_1033)&&this.getWidgetLevelChangeableAnnotation())?true:false; }; DeleteWidgetAnnotation.prototype.getMenuItemBaseString=function(){ return RV_RES.IDS_JS_WIDGET_ANNOTATION_DELETE; }; DeleteWidgetAnnotation.prototype.getMenuItemIconClass=function(){ return "DeleteWidgetAnnotation"; }; function AnnotationCTXLookup(_1034){ this.m_ccdManager=_1034; this.m_md=this.m_ccdManager.m_md; this.m_cd=this.m_ccdManager.m_cd; this.m_RDIVALUE_KEY="annotationHook"; this.m_oContextDetailsMap={}; }; AnnotationCTXLookup.prototype.populateCtxDetailsForAllAnnotations=function(_1035){ for(var i=0,len=_1035.length;i=2&&_1054[this.m_RDIVALUE_KEY][2]){ rdi=_1054[this.m_RDIVALUE_KEY][2]; } return this._compareWithoutNS(_1052.rdi,rdi); }else{ return false; } }else{ return _1051===id; } }; AnnotationCTXLookup.prototype._compareWithoutNS=function(rdi1,rdi2){ if(!rdi1||!rdi2){ return false; } if(rdi1!==rdi2){ var _1058=rdi2.indexOf("].["); if(_1058>0){ return rdi1.lastIndexOf(rdi2.substr(_1058))>0; } return false; } return true; }; AnnotationCTXLookup.prototype.isAnnotatedCell=function(_1059,_105a){ if(!_1059||!_1059.ctx||!_105a){ return false; } this._populateCtxDetailsForOneCtxValue(_105a); var _105b=this.generateIDArrayFromCellCtxValue(_1059.ctx); var _105c=this.generateIDArrayFromCellCtxValue(_105a); if(!this.isAnnotatedId(_105b[0],_1059,_105c[0])){ return false; } var _105d=this._generateDataItemIDArrayFromAnnotationIDs(_105b); var _105e=this._generateDataItemIDArrayFromCellIDs(_105c); if(_105d.length>_105e.length){ return false; } for(var i=0,len=_105d.length;i\n\t
\n\t
\n\n",title:"",text:"",linkText:null,linkScript:null,constructor:function(args){ if(args.focusElement){ dojo.connect(args.focusElement,"onfocus",this,"_onHover"); dojo.connect(args.focusElement,"onblur",this,"_onUnHover"); } },createMarkup:function(){ var _1072=this.connectId+"_linkId"; var _1073=dojo.isIE||dojo.isTrident?"\"#\"":"\"javascript:void(0);\""; var _1074=""; _1074+=""; _1074+=""; _1074+=""; _1074+=""; _1074+=""; _1074+=""; _1074+=""; _1074+=""; if(this.linkScript){ _1074+=""; }else{ _1074+=""; } _1074+=""; _1074+="
"; _1074+=html_encode(this.title); _1074+="
"; _1074+=html_encode(this.text); _1074+="
"; _1074+=""+html_encode(this.linkText)+""; _1074+="
"; return _1074; }}); dojo.provide("ViewerIWidgetInlineDialog"); dojo.require("dijit._base.focus"); dojo.declare("ViewerIWidgetInlineDialog",null,{constructor:function(oCV,sHTML,_1077,_1078){ this.initialize(oCV,sHTML); this.m_aButtons=_1077; this.m_sButtonContainerId=_1078; },initialize:function(oCV,sHTML){ this.m_oCV=oCV; this.m_html=sHTML; this.m_viewerDiv=dojo.byId("RVContent"+this.m_oCV.getId()); this.positionOptions={horizontal:"center",vertical:"center"}; this.onScrollHandle=null; this.m_dialogDiv=null; if(this.m_oCV.getViewerWidget){ this.m_background=this.m_oCV.getViewerWidget().getReportBlocker(); } },setVerticalPositionOption:function(_107b){ this.positionOptions.vertical=_107b; },getDialogDiv:function(){ return this.m_dialogDiv; },initializeDialog:function(){ this.m_dialogDiv=document.createElement("div"); dojo.addClass(this.m_dialogDiv,"inlineDialog"); this.m_dialogDiv.style.display="none"; this.m_dialogDiv.innerHTML=this.m_html; dojo.place(this.m_dialogDiv,this.m_background.getNode().nextSibling,"before"); var _107c=dojo.byId(this.m_sButtonContainerId); if(_107c&&this.m_aButtons&&this.m_aButtons.length>0){ dojo.forEach(this.m_aButtons,function(_107d){ var span=document.createElement("span"); _107c.appendChild(span); var _107f=new dijit.form.Button(_107d,span); }); } },createBackgroundTabCatchDiv:function(){ if(this.m_tabCatch==null){ this.m_tabCatch=dojo.byId("BACKGROUND_TABCATCH"+this.m_oCV.getId()); if(!this.m_tabCatch){ this.m_tabCatch=document.createElement("div"); this.m_tabCatch.id="BACKGROUND_TABCATCH"+this.m_oCV.getId(); this.m_tabCatch.style.display="none"; this.m_tabCatch.style.position="absolute"; this.m_tabCatch.style.left="0"; this.m_tabCatch.style.top="0"; this.m_tabCatch.style.height="0px"; this.m_tabCatch.style.width="0px"; this.m_tabCatch.setAttribute("tabIndex","0"); if(this.m_viewerDiv.firstChild){ dojo.place(this.m_tabCatch,this.m_viewerDiv.firstChild,"before"); }else{ this.m_viewerDiv.appendChild(this.m_tabCatch); } } } },initializeBackground:function(){ this.createBackgroundTabCatchDiv(); },initializeKeyboardSupport:function(){ var _1080=dijit._getTabNavigable(this.m_dialogDiv); var _1081=_1080.lowest||_1080.first; var _1082=_1080.last||_1080.highest||_1081; if(_1081){ this.m_tabCatch.onfocus=function(){ dijit.focus(_1081); }; this.m_background.getNode().onfocus=function(){ dijit.focus(_1081); }; } if(_1082&&_1081){ _1082.onblur=function(){ dijit.focus(_1081); }; }else{ if(_1081){ _1081.onblur=function(){ dijit.focus(_1081); }; } } if(this.m_oCV.getKeepFocus()!=false&&_1081&&_1081.focus){ _1081.focus(); } },show:function(){ this.m_oCV.setVisibleDialog(this); if(this.m_tabCatch==null){ this.initializeBackground(); } if(this.m_dialogDiv==null){ this.initializeDialog(); } this.m_background.setClassNameOverride("inlineDialog-background-error"); this.m_background.show(); this.m_tabCatch.style.display="block"; this.m_dialogDiv.style.display="block"; this.initializeKeyboardSupport(); },hide:function(){ this.m_oCV.setVisibleDialog(null); if(this.onScrollHandle!=null){ dojo.disconnect(this.onScrollHandle); this.onScrollHandle=null; } if(this.m_background!=null){ this.m_background.hide(); } if(this.m_tabCatch!=null){ this.m_tabCatch.style.display="none"; } if(this.m_dialogDiv!=null){ this.m_dialogDiv.style.display="none"; } },destroy:function(){ this.hide(); if(this.m_dialogDiv!=null){ this.m_dialogDiv.parentNode.removeChild(this.m_dialogDiv); this.m_dialogDiv=null; } if(this.m_tabCatch!=null){ this.m_tabCatch.parentNode.removeChild(this.m_tabCatch); this.m_tabCatch=null; } if(this.m_background!=null){ this.m_background.destroy(); this.m_background=null; } },setDebugHelper:function(_1083){ var _1084=document.createElement("div"); _1084.style.zIndex="100"; _1084.style.display="block"; _1084.style.position="relative"; _1084.style.backgroundColor="#FFFFFF"; _1084.innerHTML="
"+"show"+" "+"hide
"; document.body.insertBefore(_1084,document.body.firstChild); }}); dojo.provide("bux.reportViewer.Properties"); dojo.declare("bux.reportViewer.Properties",null,{iWidget:null,masterDialogSpec:null,masterDialogSpecProperties:null,flashChartSpec:null,isFlashChartOptionEnabled:true,oldProperties:null,dialogDisplayValues:null,constructor:function(_1085,_1086){ this.isInitialized=false; this.initializeDialogDisplayValues(); this.oldProperties={}; this.iWidget=_1085; if(_1086===""){ return; } var json=dojo.eval("["+_1086+"]"); if(json&&json[0]){ this.initializeWithSavedPropertyValues(json[0]); } },initializeDialogDisplayValues:function(){ this.dialogDisplayValues={flashCharts:{value:null,canUndo:true,runReport:true},rowsPerPage:{value:null,canUndo:true,runReport:true},promptUserOnLoad:{value:false},retrieveAll:{value:false,refreshSavedOutput:true},showExpandCollapseIcon:{value:null}}; },clearDialogSpec:function(){ this.masterDialogSpec=null; this.masterDialogSpecProperties=null; },initializeWithSavedPropertyValues:function(_1088){ for(var prop in _1088){ if(typeof prop!="undefined"&&prop!=null){ if(this.dialogDisplayValues[prop]){ this.dialogDisplayValues[prop].value=_1088[prop]; }else{ this.dialogDisplayValues[prop]={value:_1088[prop],canUndo:false}; } } } },setProperty:function(_108a,value){ this.dialogDisplayValues[_108a].value=value; },getProperty:function(_108c){ if(this.dialogDisplayValues[_108c]){ return this.dialogDisplayValues[_108c].value; } return null; },getOldProperty:function(_108d){ if(this.oldProperties&&this.oldProperties[_108d]){ return this.oldProperties[_108d].value; } return null; },getOldProperties:function(){ var _108e={}; for(var prop in this.oldProperties){ if(this.dialogDisplayValues[prop].canUndo===true){ _108e[prop]={}; _108e[prop].value=this.oldProperties[prop].value; } } return _108e; },onGet:function(){ this.copyPropertyValues(this.dialogDisplayValues,this.oldProperties); if(!this.masterDialogSpec){ this.initializeDialogSpec(); }else{ this.updateDialogSpec(); } var _1090={tabTitle:this._getReportWidgetTabTitle(),properties:this.dialogDisplayValues,propertiesDialogSpec:this.masterDialogSpec}; return _1090; },_getReportWidgetTabTitle:function(){ var _1091; if(this.iWidget&&this.iWidget.getViewerObject()){ _1091=RV_RES.IDS_REPORT_WIDGET_PROPERTY_TAB_TITLE; } return _1091; },onSet:function(_1092){ if(this.isSavedOutput()){ this.updateSavedOutput(); }else{ if(!this.runReportWithNewOptions()){ this._updateReport(); } } },_updateReport:function(){ var _1093=this.getProperty("showExpandCollapseIcon"); if(this.getOldProperty("showExpandCollapseIcon")!=_1093){ var oCV=this.iWidget.getViewerObject(); if(_1093===true){ oCV.insertExpandIconsForAllCrosstabs(); }else{ oCV.removeExpandIconsForAllCrosstabs(); } } },copyPropertyValues:function(from,to){ for(var prop in from){ if(!to[prop]){ to[prop]={}; } to[prop].value=from[prop].value; } },doUndo:function(_1098){ this.copyPropertyValues(_1098,this.dialogDisplayValues); },getUndoInfo:function(){ if(!this.isInitialized){ var oCV=this.iWidget.getViewerObject(); this.initialize(oCV.envParams); } var _109a={}; for(var prop in this.dialogDisplayValues){ if(this.dialogDisplayValues[prop].canUndo===true){ _109a[prop]={value:this.getProperty(prop)}; } } return _109a; },shouldUpdateReport:function(_109c){ for(var prop in this.dialogDisplayValues){ if(this.dialogDisplayValues[prop][_109c]==true&&this.getOldProperty(prop)!=this.getProperty(prop)){ return true; } } return false; },runReportWithNewOptions:function(){ if(this.shouldUpdateReport("runReport")){ var oCV=this.iWidget.getViewerObject(); var _109f=oCV.getAction("RunReport"); _109f.setReuseQuery(true); _109f.execute(); this.iWidget.getUndoRedoQueue().initUndoObj({"tooltip":this.getUndoHint(),"saveSpec":this.saveSpecForUndo()}); return true; } return false; },updateSavedOutput:function(){ if(this.shouldUpdateReport("refreshSavedOutput")){ var _10a0=this.iWidget.getSavedOutput(); _10a0.setPagedOutput(!this.getRetrieveAll()); _10a0.render(); } },toString:function(){ var str="{"; for(var prop in this.dialogDisplayValues){ var _10a3=this.getProperty(prop); if(_10a3!=null&&typeof _10a3!=="undefined"){ if(str!="{"){ str+=", "; } str+="\""+prop+"\": "; str+=(typeof (_10a3)=="string")?_10a3.toString():dojo.toJson(_10a3); } } str+="}"; return str; },isSavedOutput:function(){ return this.iWidget.getViewerObject().envParams["ui.action"]==="view"; },getUndoHint:function(){ return RV_RES.IDS_JS_WIDGET_PROPERTIES; },saveSpecForUndo:function(){ return false; },getRetrieveAll:function(){ return this.getProperty("retrieveAll"); },getPromptUserOnLoad:function(){ return this.getProperty("promptUserOnLoad"); },getFlashCharts:function(){ return this.getProperty("flashCharts"); },getRowsPerPage:function(){ return this.getProperty("rowsPerPage"); },getOriginalReportLocation:function(_10a4){ if(_10a4.getAttributeValue&&!_10a4.getAttributeValue("originalReport")){ return RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION+" "+RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION_UNAVAILABLE; } var _10a5=_10a4.getViewerObject().envParams["originalReportLocation"]; if(typeof _10a5=="undefined"||_10a5==null||_10a5=="Unavailable"){ return RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION+" "+RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION_UNAVAILABLE; } return (RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION+" "+_10a5); },getShowExpandCollapseIconFlag:function(){ return this.getProperty("showExpandCollapseIcon"); },getAdvancedServerProperty:function(_10a6){ if(!this.iWidget&&!this.iWidget.getViewerObject()){ return null; } return this.iWidget.getViewerObject().getAdvancedServerProperty(_10a6); },initializeShowExpandCollapseIconFlag:function(){ var _10a7=this.getAdvancedServerProperty("VIEWER_JS_EXPAND_COLLAPSE_CONTROLS_DEFAULT"); this.bHideExpandCollapseOption=(!_10a7); if(this.bHideExpandCollapseOption){ return; } if(this.getShowExpandCollapseIconFlag()===null){ this.setProperty("showExpandCollapseIcon",_10a7.toLowerCase()==="on"); } },initialize:function(_10a8){ if(this.isInitialized){ return; } this.isInitialized=true; this.initializeFlashChartSettings(_10a8.flashChartOption); this.initializeShowExpandCollapseIconFlag(); if(this.getRowsPerPage()==null){ if(_10a8["run.verticalElements"]!=null){ this.setProperty("rowsPerPage",_10a8["run.verticalElements"]); }else{ this.setProperty("rowsPerPage",20); } } this.initializeDialogSpec(); },createViewReportSpecLink:function(){ var oCV=this.iWidget.getViewerObject(); var _10aa=oCV.envParams["ui.spec"]; if(oCV.bCanUseReportStudio&&_10aa&&_10aa.length>0&&oCV.envParams["ui.action"]!="view"){ return {columns:[{propertyName:"viewReportSpecification",uiElementType:"link",label:RV_RES.IDS_JS_SHOW_REPORT_SPEC,eventHandler:this,onClickAction:dojo.hitch(this,this.onClickViewReportSpecification)}]}; }else{ return {}; } },isBlackListedOption:function(_10ab){ return this.iWidget.getViewerObject().isBlacklisted(_10ab); },createFlashChartOption:function(){ var _10ac=[{columns:[{propertyName:"flashCharts",uiElementType:"checkBox",label:RV_RES.IDS_JS_PROPERTY_FLASHCHARTS}]},{columns:[{uiElementType:"hSpacer"}]}]; return _10ac; },getShowExpandCollapseIconOptionSpec:function(){ var spec=[{columns:[{propertyName:"showExpandCollapseIcon",uiElementType:"checkBox",label:RV_RES.IDS_JS_PROPERTY_SHOW_EXPAND_COLLAPSE_ICON}]},{columns:[{uiElementType:"hspacer"}]}]; return spec; },generateDialogSpec:function(role){ var _10af; if(role=="consume"){ _10af=[{columns:[{propertyName:"rowsPerPage",uiElementType:"textBox",type:"number",label:RV_RES.IDS_JS_PROPERTY_ROWS_PER_PAGE}]}]; this.masterDialogSpec={rows:_10af}; }else{ var _10b0=this.createViewReportSpecLink(); _10af=[{columns:[{propertyName:"rowsPerPage",uiElementType:"textBox",type:"number",label:RV_RES.IDS_JS_PROPERTY_ROWS_PER_PAGE,constraints:{min:1,max:1000},required:true,invalidMessage:RV_RES.IDS_JS_PROPERTY_ROWS_PER_PAGE_ERROR}]},{columns:[{uiElementType:"hspacer"}]},{columns:[{propertyName:"promptUserOnLoad",uiElementType:"checkBox",label:RV_RES.IDS_JS_PROPERTY_PROMPT_ON_LOAD}]},{columns:[{propertyName:"retrieveAll",uiElementType:"checkBox",label:RV_RES.IDS_JS_PROPERTY_RETRIEVE_ENTIRE_REPORT}]},_10b0,{columns:[{propertyName:"originalReportLocation",uiElementType:"text",label:this.getOriginalReportLocation(this.iWidget),allowWrapping:true}]}]; if(this.isFlashChartOptionEnabled&&!this.hasAVSChart()&&role!=="consume"){ var _10b1=this.createFlashChartOption(); _10af=_10b1.concat(_10af); } if(!this.bHideExpandCollapseOption&&!this.isBlackListedOption("ExpandMember")){ _10af=this.getShowExpandCollapseIconOptionSpec().concat(_10af); } this.masterDialogSpec={rows:_10af}; } if(this.masterDialogSpec&&this.masterDialogSpec.rows){ this.masterDialogSpecProperties={}; for(var r in this.masterDialogSpec.rows){ var row=this.masterDialogSpec.rows[r]; if(row.columns){ for(var c in row.columns){ var col=row.columns[c]; if(col.propertyName){ this.masterDialogSpecProperties[col.propertyName]=col; } } } } } },updateDialogSpec:function(){ if(this.masterDialogSpecProperties){ if(this.masterDialogSpecProperties.originalReportLocation){ this.masterDialogSpecProperties.originalReportLocation.label=this.getOriginalReportLocation(this.iWidget); } } },initializeDialogSpec:function(){ var _10b6=this.iWidget.getUserRole(); this.generateDialogSpec(_10b6); },hasAVSChart:function(){ if(this.iWidget==null||typeof this.iWidget.getViewerObject()=="undefined"){ return false; } var oCV=this.iWidget.getViewerObject(); if(typeof oCV=="undefined"){ return false; } return oCV.hasAVSChart(); },initializeFlashChartSettings:function(value){ if(!value){ return; } var json=(typeof value==="string")?(eval(value)):value; var _10ba=json[0]; this.setProperty("flashCharts",_10ba.defaultValue); this.isFlashChartOptionEnabled=!_10ba.isOptionDisabled; },onClickViewReportSpecification:function(){ var _10bb=this.iWidget.getViewerObject().envParams["ui.spec"]; this._viewSpecInWindow(_10bb); },_getWindowOptions:function(w,h){ var _10be="resizable=yes,scrollbars=yes,menubar=no,directories=no,location=no,status=no,toolbar=no,titlebar=no"; var left=(screen.width-w)/2; var top=(screen.height-h)/2; _10be+=",top="+top; _10be+=",left="+left; _10be+=",width="+w; _10be+=",height="+h; return _10be; },_viewSpecInWindow:function(_10c1){ var _10c2=dijit.getViewport(); var _10c3="debugWindow"+this.iWidget.getViewerObject().getId(); var _10c4=this._getWindowOptions(_10c2.w,_10c2.h); var _10c5=window.open("",_10c3,_10c4); var head=""+"
"+"
"; _10c5.document.write(head+html_encode(_10c1)+tail); }}); dojo.require("bux.reportViewer.Properties"); dojo.provide("ActiveReportIWidgetProperties"); dojo.declare("ActiveReportIWidgetProperties",[bux.reportViewer.Properties],{initializeDialogDisplayValues:function(){ this.dialogDisplayValues={activeReportState:{value:null,canUndo:false,runReport:false}}; },getActiveReportState:function(){ return this.getProperty("activeReportState"); },setActiveReportState:function(_10c8){ this.setProperty("activeReportState",_10c8); },initialize:function(_10c9){ if(this.isInitialized){ return; } this.isInitialized=true; this.initializeDialogSpec(); },initializeDialogSpec:function(){ var _10ca=[{columns:[{propertyName:"originalReportLocation",uiElementType:"text",label:this.getOriginalReportLocation(this.iWidget),allowWrapping:true}]},{columns:[{propertyName:"ActiveReportOutputVersion",uiElementType:"text",label:this._getAcitveReportOutputVersion(this.iWidget),allowWrapping:true}]}]; if(this.iWidget.isDebugMode()){ _10ca.push({columns:[{propertyName:"PublicVariables",uiElementType:"text",label:this._getPublicVariableNames(this.iWidget),allowWrapping:true}]}); } this.masterDialogSpec={rows:_10ca}; },_getAcitveReportOutputVersion:function(_10cb){ var _10cc=_10cb.getActiveReportOutputVersion(); if(_10cc==null){ _10cc=RV_RES.IDS_JS_PROPERTY_ACTIVEREPORT_OUTPUT_VERSION_UNAVAILABLE; } return (RV_RES.IDS_JS_PROPERTY_ACTIVEREPORT_OUTPUT_VERSION+" "+_10cc); },_getPublicVariableNames:function(_10cd){ var _10ce=_10cd.getPublicVariableNames(); var _10cf=""; for(var name in _10ce){ var sType=_10ce[name]; if(_10cf.length>0){ _10cf+=", "; } _10cf+=name; _10cf+=(sType==="D")?" (Discrete)":"(Range)"; } if(_10cf.length>0){ _10cf="Public Variables: "+_10cf; } return _10cf; },_getReportWidgetTabTitle:function(){ var _10d2; if(this.iWidget&&this.iWidget.getViewerObject()){ _10d2=RV_RES.IDS_ACTIVE_REPORT_WIDGET_PROPERTY_TAB_TITLE; } return _10d2; }}); function RAPReportInfo(_10d3,oCV){ this.m_reportInfoJSON=_10d3; this.m_containerInfoJSON={}; this.m_iContainerCount=0; this.m_bPromptPart=null; this.m_bSingleContainer=null; this.m_bDetailFilteringDisabled=null; this.m_aDrilledOnHUNs=null; this.m_bPassTrackingToBUA=null; this.m_sDisplayTypes=null; this.m_bContainsInteractiveDataContainer=null; this.m_bContainsFilters=false; this.m_bContainsSlider=false; this.m_referenceInfoObject={}; this.initializeContainerInfo(); this._addNonVisibleReferences(this.m_reportInfoJSON.reportLevelProperties); this._populateHun(oCV); }; RAPReportInfo.prototype.initializeContainerInfo=function(){ if(this.m_reportInfoJSON){ var _10d5=this.m_reportInfoJSON.containers; if(_10d5){ this.m_iContainerCount=_10d5.length; for(var _10d6=0;_10d60){ var _10ef=this.m_reportInfoJSON.reportLevelProperties; if(_10ef){ if(_10ef&&_10ef.nonVisibleFiltersMemberItemInfo){ for(var i=0;i<_10ef.nonVisibleFiltersMemberItemInfo.length;i++){ if(_10ee===_10ef.nonVisibleFiltersMemberItemInfo[i]){ return true; } } } } } return false; }; RAPReportInfo.prototype.isChildContainer=function(lid){ return ((this.m_containerInfoJSON[lid]&&this.m_containerInfoJSON[lid].parentContainer)?true:false); }; RAPReportInfo.prototype.getItemDetails=function(_10f2,sHun){ var obj=null; for(var lid in this.m_containerInfoJSON){ var oItem=this.getItemInfo(lid,_10f2); if(oItem&&oItem.hun===sHun){ obj={}; obj.item=oItem.item; if(oItem.hun){ obj.hun=oItem.hun; } obj.lid=lid; obj.queryName=oItem.queryName; break; } } return (obj)?obj:null; }; RAPReportInfo.prototype.getItemDetailsByHun=function(sHun){ var _10f8=null; for(var lid in this.m_containerInfoJSON){ var _10fa=this.getItemInfo(lid); for(var sName in _10fa){ var oItem=_10fa[sName]; if(oItem.hun===sHun){ _10f8=sName; break; } } } return (_10f8?this.getItemDetails(_10f8,sHun):null); }; RAPReportInfo.prototype._populateHun=function(oCV){ if(oCV){ var _10fe=oCV.getSelectionController().getCCDManager(); var _10ff=oCV.envParams; var _1100=oCV.getRAPReportInfo(); var _1101=false; for(var lid in this.m_containerInfoJSON){ var _1103=this.m_containerInfoJSON[lid].m_itemInfoJSON; for(var _1104 in _1103){ var oItem=_1103[_1104]; if(oItem.hun){ continue; } var sHun=this.getHUNForItem(oItem,_10fe,lid,_1100); if(sHun){ oItem.hun=sHun; _1101=true; } } } if(_1101&&typeof JSON!="undefined"&&JSON!=null&&JSON.stringify){ _10ff["rapReportInfo"]=JSON.stringify(this.m_reportInfoJSON); } } }; RAPReportInfo.prototype.getHUNForItem=function(oItem,_1108,lid,_110a){ var sHun=this.getHUNFromCCDManager(_1108,oItem); var _110c=null; if(!sHun&&_110a){ _110c=_110a.getItemInfo(lid,oItem.item); if(_110c){ sHun=_110c.hun; } } return sHun; }; RAPReportInfo.prototype.getHUNFromCCDManager=function(_110d,oItem){ var _110f={}; var sHUN=null; var _1111=this._findQueryMetadataId(_110d,_110f,oItem.queryName); if(_1111){ sHUN=_110d.GetHUNForRDI(oItem.item,_1111); } return sHUN; }; RAPReportInfo.prototype._findQueryMetadataId=function(_1112,oMap,_1114){ if(oMap[_1114]){ return oMap[_1114]; } var ctxId=_1112.GetMetadataIdForQueryName(_1114); if(ctxId){ oMap[_1114]=ctxId; return ctxId; } return null; }; RAPReportInfo.prototype.isPromptPart=function(){ if(this.m_bPromptPart===null){ if(this.m_reportInfoJSON.reportLevelProperties&&this.m_reportInfoJSON.reportLevelProperties.promptWidget===true){ this.m_bPromptPart=true; }else{ this.m_bPromptPart=false; } } return this.m_bPromptPart; }; RAPReportInfo.prototype.getContainerCount=function(){ return this.m_iContainerCount; }; RAPReportInfo.prototype.isSingleContainer=function(){ if(this.m_bSingleContainer===null){ if(this.m_iContainerCount===1&&this.m_reportInfoJSON.reportLevelProperties&&this.m_reportInfoJSON.reportLevelProperties.singleContainerReport===true){ this.m_bSingleContainer=true; }else{ this.m_bSingleContainer=false; } } return this.m_bSingleContainer; }; RAPReportInfo.prototype.isDetailFilteringDisabled=function(){ if(this.m_bDetailFilteringDisabled===null){ if(this.m_reportInfoJSON.reportLevelProperties&&this.m_reportInfoJSON.reportLevelProperties.detailFilteringDisabled===true){ this.m_bDetailFilteringDisabled=true; }else{ this.m_bDetailFilteringDisabled=false; } } return this.m_bDetailFilteringDisabled; }; RAPReportInfo.prototype.getPassTrackingtoBUA=function(){ if(this.m_bPassTrackingToBUA===null){ if(this.m_reportInfoJSON.reportLevelProperties&&this.m_reportInfoJSON.reportLevelProperties.shouldNotPassTrackingtoBUA===true){ this.m_bPassTrackingToBUA=false; }else{ this.m_bPassTrackingToBUA=true; } } return this.m_bPassTrackingToBUA; }; RAPReportInfo.prototype.getDrilledOnHUNs=function(){ if(!this.m_aDrilledOnHUNs&&this.m_reportInfoJSON.reportLevelProperties&&this.m_reportInfoJSON.reportLevelProperties.drilledOnHUNs){ this.m_aDrilledOnHUNs=this.m_reportInfoJSON.reportLevelProperties.drilledOnHUNs; } return this.m_aDrilledOnHUNs; }; RAPReportInfo.prototype.getDisplayTypes=function(_1116){ if(this.m_sDisplayTypes===null||_1116){ var _1117=""; var _1118=[]; for(var lid in this.m_containerInfoJSON){ if(!_1116||lid!=_1116){ _1118.push(this.m_containerInfoJSON[lid].displayTypeId); } } _1117=_1118.join(","); if(_1117==""&&this.isPromptPart()){ _1117="promptWidget"; } if(!_1116){ this.m_sDisplayTypes=_1117; } return _1117; } return this.m_sDisplayTypes; }; RAPReportInfo.prototype.isChart=function(lid){ var id=lid.toLowerCase(); return id!="mapchart"&&id.match("chart$")=="chart"; }; RAPReportInfo.prototype.isViz=function(lid){ if(this.m_containerInfoJSON[lid]){ var _111d=this.m_containerInfoJSON[lid].displayTypeId; if(_111d){ return (_111d.toLowerCase()=="viz"); } } return false; }; RAPReportInfo.prototype.isInteractiveDataContainer=function(lid){ var _111f=false; if(this.m_containerInfoJSON[lid]){ var _1120=this.m_containerInfoJSON[lid].displayTypeId; if(_1120){ var id=_1120.toLowerCase(); _111f=id=="crosstab"||id=="list"||id=="viz"||this.isChart(id); } } return _111f; }; RAPReportInfo.prototype.containsInteractiveDataContainer=function(){ if(this.m_bContainsInteractiveDataContainer==null){ this.m_bContainsInteractiveDataContainer=false; for(var lid in this.m_containerInfoJSON){ if(this.isInteractiveDataContainer(lid)){ this.m_bContainsInteractiveDataContainer=true; break; } } } return this.m_bContainsInteractiveDataContainer; }; RAPReportInfo.prototype.containsFilters=function(){ return this.m_bContainsFilters; }; RAPReportInfo.prototype.getFilterObject=function(_1123,_1124){ for(var lid in this.m_containerInfoJSON){ var _1126=this.getFilterObjectFromContainer(lid,_1123,_1124); if(_1126){ return _1126; } } return null; }; RAPReportInfo.prototype.getFilterObjectFromContainer=function(lid,_1128,_1129){ var _112a=this.m_containerInfoJSON[lid]; if(_112a&&_112a.filter){ var _112b=_112a.filter.length; for(var i=0;i<_112b;++i){ var _112d=_112a.filter[i]; if(_1128==_112d.item){ if(!_1129||(_112d.itemLabel&&_112d.itemLabel.length>0)){ return _112d; } } } } return null; }; RAPReportInfo.prototype.hunHasFilterOrSlider=function(_112e){ if(!_112e){ return null; } for(var lid in this.m_containerInfoJSON){ var _1130=this.m_containerInfoJSON[lid]; if(_1130&&_1130.filter){ var _1131=_1130.filter.length; for(var i=0;i<_1131;++i){ var _1133=_1130.filter[i]; if(_1133.HUN&&_112e.indexOf(_1133.HUN)==0){ return _1133.item; } } } if(_1130&&_1130.sliders){ var _1131=_1130.sliders.length; for(var i=0;i<_1131;++i){ var _1134=_1130.sliders[i]; if(_1134.hun&&_112e.indexOf(_1134.hun)==0){ return _1134.name; } } } } return null; }; RAPReportInfo.prototype.hasSlider=function(){ return this.m_bContainsSlider; }; RAPReportInfo.prototype.collectSliderSetFromReportInfo=function(){ var _1135={}; for(var lid in this.m_containerInfoJSON){ var _1137=this.m_containerInfoJSON[lid].sliders; if(_1137){ for(var _1138=0;_1138<_1137.length;++_1138){ var _1139=_1137[_1138].clientId; _1135[_1139]=_1137[_1138]; } } } return _1135; }; RAPReportInfo.prototype._getEventTimings=function(){ return (this.m_reportInfoJSON&&this.m_reportInfoJSON.reportLevelProperties&&this.m_reportInfoJSON.reportLevelProperties.eventTimings)?this.m_reportInfoJSON.reportLevelProperties.eventTimings:null; }; RAPReportInfo.prototype.destroy=function(){ GUtil.destroyProperties(this); }; function DelayedLoadingContext(id){ this.widgetid=id; this.m_promptValues=null; }; DelayedLoadingContext.prototype.setPromptValues=function(_113b){ if(_113b===null){ this.m_promptValues=null; return; } if(!this.m_promptValues){ this.m_promptValues={}; } applyJSONProperties(this.m_promptValues,_113b); }; DelayedLoadingContext.prototype.getPromptValues=function(){ return this.m_promptValues; }; DelayedLoadingContext.prototype.setForceRunReport=function(_113c){ this.m_forceRunReport=_113c; }; DelayedLoadingContext.prototype.getForceRunReport=function(){ return this.m_forceRunReport; }; DelayedLoadingContext.prototype.isEmpty=function(){ return !(this.m_promptValues||this.m_forceRunReport); }; DelayedLoadingContext.prototype.reset=function(){ delete (this.m_promptValues); this.m_promptValues=null; this.m_forceRunReport=false; delete (this._cascadingPromptParamsToClear); }; DelayedLoadingContext.prototype.setCascadingPromptParamsToClear=function(_113d){ this._cascadingPromptParamsToClear=_113d; }; DelayedLoadingContext.prototype.getCascadingPromptParamsToClear=function(){ return this._cascadingPromptParamsToClear; }; function ViewerLoadManager(_113e){ this.m_oWidget=_113e; this.m_oDelayedLoadingContext=new DelayedLoadingContext(); this.m_aQueue=[]; this.m_fOnEmptyCallback=null; this.m_bPendingRequest=false; this.m_bViewerLoadInitiated=false; this.m_bCanRunReports=false; }; ViewerLoadManager.prototype.viewerLoadInitiated=function(){ this.m_bViewerLoadInitiated=true; }; ViewerLoadManager.prototype.isViewerLoadInitiated=function(){ return this.m_bViewerLoadInitiated; }; ViewerLoadManager.prototype.canRunReports=function(){ return this.m_bCanRunReports; }; ViewerLoadManager.prototype.runningReport=function(){ if(!this.m_bCanRunReports){ this._queue({fCallback:dojo.hitch(this,function(){ this.m_bCanRunReports=true; return false; })}); } }; ViewerLoadManager.prototype.isViewerReady=function(){ if(!this.isViewerLoaded()){ return false; } if(!this._isEmpty()||this.m_fOnEmptyCallback||this.m_bPendingRequest){ return false; } return true; }; ViewerLoadManager.prototype.isViewerLoaded=function(){ var oCV=this.m_oWidget.getViewerObject(); if(!oCV){ return false; } if(this.m_oWidget.isLiveReport()){ var _1140=oCV.getStatus(); return _1140==="complete"||_1140==="prompting"||_1140==="fault"; } return true; }; ViewerLoadManager.prototype.runWhenHasViewer=function(f,_1142){ if(this.isViewerReady()){ this._run(f); return true; }else{ var _1143={fCallback:f}; if(_1142){ _1143.sGroupId=_1142; } this._queue(_1143); if(!this.m_bViewerLoadInitiated){ this.getDelayedLoadingContext().setForceRunReport(true); this.m_oWidget.setRunReportOption(false); this.m_oWidget.postReport(null); } return false; } }; ViewerLoadManager.prototype.processQueue=function(){ this.m_bPendingRequest=false; var _1144=false; while(!_1144&&!this._isEmpty()){ var _1145=this.m_aQueue.shift(); while(_1145.sGroupId&&!this._isEmpty()&&this.m_aQueue[0].sGroupId===_1145.sGroupId){ _1145=this.m_aQueue.shift(); } _1144=this._run(_1145.fCallback); } if(this._isEmpty()&&!_1144&&this.m_fOnEmptyCallback){ var _1146=this.m_fOnEmptyCallback; this.m_fOnEmptyCallback=null; _1146(); } }; ViewerLoadManager.prototype._run=function(f){ var _1148=f.call(); if(_1148){ this.m_bPendingRequest=true; } return _1148; }; ViewerLoadManager.prototype._isEmpty=function(){ return !this.m_aQueue.length; }; ViewerLoadManager.prototype._queue=function(_1149){ this.m_aQueue.push(_1149); }; ViewerLoadManager.prototype.setOnEmptyCallback=function(_114a){ this.m_fOnEmptyCallback=_114a; }; ViewerLoadManager.prototype.getDelayedLoadingContext=function(){ return this.m_oDelayedLoadingContext; }; 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(_114b){ this.m_headers=_114b; }; XmlHttpObject.prototype.getHeaders=function(){ return this.m_headers; }; XmlHttpObject.prototype.newRequest=function(){ var _114c=new XmlHttpObject(); _114c.init(this.m_action,this.m_gateway,this.m_url,this.m_asynch); this.executeHttpCallback("newRequest"); return _114c; }; 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(_114d){ if(this.m_httpCallbacks&&this.m_httpCallbacks[_114d]){ var _114e=this.concatResponseArguments(this.m_httpCallbacks.customArguments); var _114f=GUtil.generateCallback(this.m_httpCallbacks[_114d].method,_114e,this.m_httpCallbacks[_114d].object); _114f(); return true; } return false; }; XmlHttpObject.prototype.setCallbacks=function(_1150){ if(!this.m_httpCallbacks){ this.m_httpCallbacks={}; } for(callback in _1150){ this.m_httpCallbacks[callback]=_1150[callback]; } }; XmlHttpObject.prototype.getCallbacks=function(){ return this.m_httpCallbacks; }; XmlHttpObject.createRequestObject=function(){ var _1151=null; if(window.XMLHttpRequest){ _1151=new XMLHttpRequest(); }else{ if(window.ActiveXObject){ _1151=new ActiveXObject("Msxml2.XMLHTTP"); }else{ } } return _1151; }; XmlHttpObject.prototype.waitForXmlHttpResponse=function(){ var _1152=this.xmlHttp; if(_1152&&_1152.readyState===4){ if(_1152.status===200){ this.httpSuccess(); }else{ this.httpError(); } }else{ } }; XmlHttpObject.prototype.init=function(_1153,_1154,url,_1156){ this.m_action=_1153; this.m_gateway=_1154; this.m_url=url; this.m_asynch=_1156; }; 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(_1157,_1158,url,async){ var _115b=this.xmlHttp; if(_115b){ _115b.open(_1157,_1158,async); if(async){ _115b.onreadystatechange=GUtil.generateCallback(this.waitForXmlHttpResponse,[],this); }else{ _115b.onreadystatechange=GUtil.generateCallback(this.waitForXmlHttpResponse,[],this); if(!isIE()){ _115b.onload=GUtil.generateCallback(this.httpSuccess,[],this); _115b.onerror=GUtil.generateCallback(this.httpError,[],this); } } _115b.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); if(this.m_headers){ for(header in this.m_headers){ _115b.setRequestHeader(header,this.m_headers[header]); } } this.executeHttpCallback("preHttpRequest"); var _115c=this.convertFormFieldsToUrl(); if(url){ _115c+=url; } _115b.send(_115c); } }; 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(_1160){ return this.m_formFields.get(_1160); }; XmlHttpObject.prototype.clearFormFields=function(){ this.m_formFields=new CDictionary(); }; XmlHttpObject.prototype.convertFormFieldsToUrl=function(){ var url=""; var _1162=this.m_formFields.keys(); for(var index=0;index<_1162.length;index++){ if(index>0){ url+="&"; } url+=encodeURIComponent(_1162[index])+"="+encodeURIComponent(this.m_formFields.get(_1162[index])); } return url; }; XmlHttpObject.prototype.concatResponseArguments=function(_1164){ var _1165=[this]; if(_1164){ _1165=_1165.concat(_1164); } return _1165; }; function AsynchRequest(_1166,_1167){ AsynchRequest.baseConstructor.call(this); this.m_gateway=_1166; this.m_webContentRoot=_1167; 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(_1168){ if(this.m_callbacks[_1168]){ var _1169=this.concatResponseArguments(this.m_callbacks.customArguments); var _116a=GUtil.generateCallback(this.m_callbacks[_1168].method,_1169,this.m_callbacks[_1168].object); _116a(); return true; } return false; }; AsynchRequest.prototype.setCallbacks=function(_116b){ if(!this.m_callbacks){ this.m_callbacks={}; } for(callback in _116b){ this.m_callbacks[callback]=_116b[callback]; } }; AsynchRequest.prototype.getCallbacks=function(){ return this.m_callbacks; }; AsynchRequest.prototype.newRequest=function(){ var _116c=this.construct(); _116c.setHeaders(this.getHeaders()); if(this.getFormFields().exists("b_action")){ _116c.addFormField("b_action",this.getFormField("b_action")); } if(this.getFormFields().exists("cv.catchLogOnFault")){ _116c.addFormField("cv.catchLogOnFault",this.getFormField("cv.catchLogOnFault")); } _116c.setPromptDialog(this.m_promptDialog); _116c.setFaultDialog(this.m_faultDialog); _116c.setLogonDialog(this.m_logonDialog); _116c.m_asynch=this.m_asynch; if(this.m_callbacks.newRequest){ var _116d=GUtil.generateCallback(this.m_callbacks.newRequest.method,[_116c],this.m_callbacks.newRequest.object); _116d(); } return _116c; }; AsynchRequest.prototype.success=function(){ var _116e=this.getAsynchStatus(); switch(_116e){ 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(_116f){ if(_116f instanceof IFaultDialog){ if(typeof console!="undefined"){ console.log("AsynchRequest.prototype.setFaultDialog is deprecated"); } this.m_faultDialog=_116f; }else{ if(_116f&&typeof console!="undefined"){ console.log("The parameter faultDialog must be an instance of IFaultDialog"); } } }; AsynchRequest.prototype.setPromptDialog=function(_1170){ if(_1170 instanceof IPromptDialog){ if(typeof console!="undefined"){ console.log("AsynchRequest.prototype.setPromptDialog is deprecated"); } this.m_promptDialog=_1170; }else{ if(_1170&&typeof console!="undefined"){ console.log("The parameter promptDialog must be an instance of IPromptDialog"); } } }; AsynchRequest.prototype.setLogonDialog=function(_1171){ if(_1171 instanceof ILogOnDialog){ if(typeof console!="undefined"){ console.log("AsynchRequest.prototype.setLogonDialog is deprecated"); } this.m_logonDialog=_1171; }else{ if(_1171&&typeof console!="undefined"){ console.log("The parameter logOnDialog must be an instance of ILogOnDialog"); } } }; AsynchRequest.prototype.resubmitRequest=function(){ var _1172=this.newRequest(); _1172.m_formFields=this.m_formFields; _1172.sendRequest(); return _1172; }; AsynchRequest.prototype.sendRequest=function(){ var _1173=this; var _1174={"complete":{"object":_1173,"method":_1173.successHandler},"fault":{"object":_1173,"method":_1173.errorHandler}}; this.init("POST",this.m_gateway,"",this.m_asynch); this.executeCallback("preHttpRequest"); this.parent.setCallbacks.call(this,_1174); 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 _1175=this.getResponseText(); if(_1175.indexOf("CAM_PASSPORT_ERROR")!=-1){ this.passportTimeout(); }else{ if((_1175.indexOf("http-equiv=\"refresh\"")!=-1)||(_1175.indexOf("http-equiv='refresh'")!=-1)){ this.passportTimeout(); }else{ this.executeCallback("entryFault"); if(!this.executeCallback("fault")){ var _1176=window.open("","","height=400,width=500"); if(_1176!=null){ _1176.document.write(_1175); } } } } }else{ this.m_soapFault=this.constructFaultEnvelope(); if(this.m_soapFault!=null){ var _1177=XMLHelper_FindChildByTagName(this.m_soapFault,"CAM",true); if(_1177!=null&&XMLHelper_FindChildByTagName(_1177,"promptInfo",true)){ this.passportTimeout(); }else{ this.fault(); } }else{ this.success(); } } }; AsynchRequest.prototype.cancel=function(){ this.parent.cancel.call(this); var _1178=this.getFormField("m_tracking"); if(_1178){ var _1179=new XmlHttpObject(); _1179.init("POST",this.m_gateway,"",false); if(this.getFormField("cv.outputKey")){ _1179.addFormField("b_action","cvx.high"); _1179.addFormField("cv.outputKey",this.getFormField("cv.outputKey")); _1179.setHeaders(this.getHeaders()); }else{ _1179.addFormField("b_action","cognosViewer"); } _1179.addFormField("cv.responseFormat","successfulRequest"); _1179.addFormField("ui.action","cancel"); _1179.addFormField("m_tracking",_1178); if(this.getFormField("cv.debugDirectory")){ _1179.addFormField("cv.debugDirectory",this.getFormField("cv.debugDirectory")); } _1179.sendRequest(); this.executeCallback("cancel"); } }; AsynchRequest.prototype.working=function(){ this.executeCallback("working"); var _117a=this.newRequest(); _117a.addFormField("m_tracking",this.getTracking()); if(this.getFormField("cv.outputKey")){ _117a.addFormField("cv.outputKey",this.getFormField("cv.outputKey")); _117a.addFormField("b_action","cvx.high"); } if(this.isRAPWaitTrue()){ _117a.m_formFields=this.m_formFields; _117a.addFormField("m_tracking",this.getTracking()); _117a.addFormField("rapWait","true"); var _117b=this.getRAPRequestCache(); if(_117b!==null&&typeof _117b!="undefined"){ _117a.addFormField("rapRequestCache",_117b); } var _117c=this.getMainConversation(); if(_117c){ _117a.addFormField("mainConversation",_117c); } var _117d=this.getMainTracking(); if(_117d){ _117a.addFormField("mainTracking",_117d); } }else{ _117a.addFormField("ui.action","wait"); _117a.addFormField("ui.primaryAction",this.getPrimaryAction()); _117a.addFormField("cv.actionState",this.getActionState()); if(this.getFormField("ui.preserveRapTags")){ _117a.addFormField("ui.preserveRapTags",this.getFormField("ui.preserveRapTags")); } if(this.getFormField("ui.backURL")){ _117a.addFormField("ui.backURL",this.getFormField("ui.backURL")); } if(this.getFormField("errURL")){ _117a.addFormField("errURL",this.getFormField("errURL")); } if(this.getFormField("cv.showFaultPage")){ _117a.addFormField("cv.showFaultPage",this.getFormField("cv.showFaultPage")); } if(this.getFormField("cv.catchLogOnFault")){ _117a.addFormField("cv.catchLogOnFault",this.getFormField("cv.catchLogOnFault")); } } if(this.getFormField("bux")){ _117a.addFormField("bux",this.getFormField("bux")); } if(this.getFormField("cv.debugDirectory")){ _117a.addFormField("cv.debugDirectory",this.getFormField("cv.debugDirectory")); } _117a.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(_117e){ var _117f=this.newRequest(); _117f.addFormField("ui.action","forward"); _117f.addFormField("m_tracking",this.getTracking()); _117f.addFormField("ui.conversation",this.getConversation()); _117f.addFormField("ui.primaryAction",this.getPrimaryAction()); _117f.addFormField("cv.actionState",this.getActionState()); for(var _1180 in _117e){ _117f.addFormField(_1180,_117e[_1180]); } _117f.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 _1181=this.m_promptDialog.getViewerId()==null?"":"?cv.id="+this.m_promptDialog.getViewerId(); window["AsynchRequestPromptDialog"].initialize(this.m_webContentRoot+"/rv/showStandalonePrompts.html"+_1181,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 _1182=this.constructFaultEnvelope(); if(_1182){ var _1183=XMLHelper_FindChildByTagName(_1182,"faultcode",true); if(_1183!=null){ return XMLHelper_GetText(_1183); } } return null; }; AsynchRequest.prototype.getSoapFaultDetailMessageString=function(){ var _1184=this.constructFaultEnvelope(); if(_1184){ var entry=XMLHelper_FindChildByTagName(_1184,"messageString",true); if(entry!=null){ return XMLHelper_GetText(entry); } } return null; }; function AsynchDATARequest(_1186,_1187){ AsynchDATARequest.baseConstructor.call(this,_1186,_1187); 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 _1188=this.getResponseText().substring(0,12); if(_1188==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 _118a=state.m_sSoapFault; this.m_soapFault=XMLBuilderLoadXMLFromString(_118a); } } } return this.m_soapFault; }; AsynchDATARequest.prototype.construct=function(){ var _118b=new AsynchDATARequest(this.m_gateway,this.m_webContentRoot); _118b.setCallbacks(this.m_callbacks); if(this.getFormFields().exists("cv.responseFormat")){ _118b.addFormField("cv.responseFormat",this.getFormField("cv.responseFormat")); }else{ _118b.addFormField("cv.responseFormat","data"); } return _118b; }; AsynchDATARequest.prototype.getEnvParam=function(param){ var _118d=this.getResponseState(); if(_118d&&typeof _118d.envParams!="undefined"&&typeof _118d.envParams[param]!="undefined"){ return _118d.envParams[param]; } return null; }; AsynchDATARequest.prototype.isRAPWaitTrue=function(){ var _118e=this.getEnvParam("rapWait"); if(_118e!=null){ return _118e=="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(_118f,_1190){ AsynchJSONRequest.baseConstructor.call(this,_118f,_1190); 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 _1192=this.removeInvalidCharacters(text); this.m_jsonResponse=eval("("+_1192+")"); } } } return this.m_jsonResponse; }; AsynchJSONRequest.prototype.getTracking=function(){ var _1193=this.getJSONResponseObject(); if(_1193){ return _1193.tracking; } return ""; }; AsynchJSONRequest.prototype.getConversation=function(){ var _1194=this.getJSONResponseObject(); if(_1194){ return _1194.conversation; } return ""; }; AsynchJSONRequest.prototype.getAsynchStatus=function(){ var _1195=this.getJSONResponseObject(); if(_1195){ return _1195.status; } return "unknown"; }; AsynchJSONRequest.prototype.getPrimaryAction=function(){ var _1196=this.getJSONResponseObject(); if(_1196){ return _1196.primaryAction; } return ""; }; AsynchJSONRequest.prototype.getActionState=function(){ var _1197=this.getJSONResponseObject(); if(_1197){ return _1197.actionState; } return ""; }; AsynchJSONRequest.prototype.getDebugLogs=function(){ var _1198=this.getJSONResponseObject(); if(_1198){ return _1198.debugLogs; } return ""; }; AsynchJSONRequest.prototype.isRAPWaitTrue=function(){ var _1199=this.getJSONResponseObject(); if(_1199){ return (_1199.rapWait==="true"); } return false; }; AsynchJSONRequest.prototype.getRAPRequestCache=function(){ var _119a=this.getJSONResponseObject(); if(_119a){ var _119b=_119a.rapRequestCache; if(_119b!==null&&typeof _119b!="undefined"){ return _119b; } } return null; }; AsynchJSONRequest.prototype.getMainConversation=function(){ var _119c=this.getJSONResponseObject(); if(_119c){ return _119c.mainConversation; } return null; }; AsynchJSONRequest.prototype.getMainTracking=function(){ var _119d=this.getJSONResponseObject(); if(_119d){ return _119d.mainTracking; } return null; }; AsynchJSONRequest.prototype.getResult=function(){ var _119e=this.getJSONResponseObject(); if(_119e&&_119e.json){ var _119f=this.removeInvalidCharacters(_119e.json); return eval("("+_119f+")"); } return null; }; AsynchJSONRequest.prototype.removeInvalidCharacters=function(text){ if(text){ text=text.replace(/(\n|\r|\t)+/g,""); } return text; }; AsynchJSONRequest.prototype.getPromptHTMLFragment=function(){ var _11a1=this.getJSONResponseObject(); if(_11a1&&_11a1.promptHTMLFragment){ return _11a1.promptHTMLFragment; } return ""; }; AsynchJSONRequest.prototype.constructFaultEnvelope=function(){ if(this.m_soapFault==null){ var _11a2=this.getJSONResponseObject(); if(_11a2.status=="fault"){ this.m_soapFault=XMLBuilderLoadXMLFromString(_11a2.fault); } } return this.m_soapFault; }; AsynchJSONRequest.prototype.construct=function(){ var _11a3=new AsynchJSONRequest(this.m_gateway,this.m_webContentRoot); _11a3.setCallbacks(this.m_callbacks); if(this.getFormFields().exists("cv.responseFormat")){ _11a3.addFormField("cv.responseFormat",this.getFormField("cv.responseFormat")); }else{ _11a3.addFormField("cv.responseFormat","asynchJSON"); } return _11a3; }; 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(_11a4){ if(typeof console!="undefined"){ console.log("Required method ILogOnDialog:show not implemented."); } }; ILogOnDialog.prototype.handleUnknownHTMLResponse=function(_11a5){ if(typeof console!="undefined"){ console.log("Required method ILogOnDialog:handleUnknownHTMLResponse not implemented."); } }; function IPromptDialog(){ }; IPromptDialog.prototype.initialize=function(url,width,_11a8){ 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(_11a9){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:preHttpRequest not implemented."); } }; IRequestHandler.prototype.postHttpRequest=function(_11aa){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:postHttpRequest not implemented."); } }; IRequestHandler.prototype.postComplete=function(_11ab){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:postComplete not implemented."); } }; IRequestHandler.prototype.onComplete=function(_11ac){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:onComplete not implemented."); } }; IRequestHandler.prototype.onPostEntryComplete=function(_11ad){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:onPostEntryComplete not implemented."); } }; IRequestHandler.prototype.onFault=function(_11ae){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:onFault not implemented."); } }; IRequestHandler.prototype.onPrompting=function(_11af){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:onPrompting not implemented."); } }; IRequestHandler.prototype.onWorking=function(_11b0){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:onWorking not implemented."); } }; IRequestHandler.prototype.setWorkingDialog=function(_11b1){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:setWorkingDialog not implemented."); } }; IRequestHandler.prototype.setRequestIndicator=function(_11b2){ 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(_11b4){ }; 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(_11b5){ this.m_oDispatcherEntry=_11b5; }; BaseRequestHandler.prototype.getDispatcherEntry=function(){ return this.m_oDispatcherEntry; }; BaseRequestHandler.prototype.processInitialResponse=function(_11b6){ this.updateViewerState(_11b6); }; BaseRequestHandler.prototype.setLogOnDialog=function(_11b7){ if(_11b7==null){ this.m_logOnDialog=null; }else{ if(_11b7 instanceof ILogOnDialog){ this.m_logOnDialog=_11b7; }else{ if(_11b7&&typeof console!="undefined"){ console.log("The parameter logOnDialog must be an instance of ILogOnDialog"); } } } }; BaseRequestHandler.prototype.setWorkingDialog=function(_11b8){ if(_11b8==null){ this.m_workingDialog=null; }else{ if(this.m_httpRequestConfig&&this.m_httpRequestConfig.getWorkingDialog()){ this.m_workingDialog=this.m_httpRequestConfig.getWorkingDialog(); }else{ if(_11b8 instanceof IRequestIndicator){ this.m_workingDialog=_11b8; }else{ if(_11b8&&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(_11b9){ if(_11b9==null){ this.m_requestIndicator=null; }else{ if(this.m_httpRequestConfig&&this.m_httpRequestConfig.getRequestIndicator()){ this.m_requestIndicator=this.m_httpRequestConfig.getRequestIndicator(); }else{ if(_11b9 instanceof IRequestIndicator){ this.m_requestIndicator=_11b9; }else{ if(_11b9&&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(_11ba){ if(_11ba==null){ this.m_faultDialog=null; }else{ if(_11ba instanceof IFaultDialog){ this.m_faultDialog=_11ba; }else{ if(_11ba&&typeof console!="undefined"){ console.log("The parameter faultDialog must be an instance of IFaultDialog"); } } } }; BaseRequestHandler.prototype.setPromptDialog=function(_11bb){ if(_11bb==null){ this.m_promptDialog=null; }else{ if(_11bb instanceof IPromptDialog){ this.m_promptDialog=_11bb; }else{ if(_11bb&&typeof console!="undefined"){ console.log("The parameter promptDialog must be an instance of IPromptDialog"); } } } }; BaseRequestHandler.prototype.preHttpRequest=function(_11bc){ if(_11bc&&typeof _11bc.getFormField=="function"){ if(_11bc.getFormField("ui.action")!="wait"&&_11bc.getFormField("rapWait")!="true"){ if(this.m_requestIndicator){ this.m_requestIndicator.show(); } } } }; BaseRequestHandler.prototype.postHttpRequest=function(_11bd){ if(_11bd&&typeof _11bd.getAsynchStatus=="function"){ var _11be=_11bd.getAsynchStatus(); if(_11be!="working"&&_11be!="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(_11bf){ 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",_11bf); } return; } if(!this.m_faultDialog){ this.m_faultDialog=new FaultDialog(this.getViewer()); } if(_11bf&&_11bf.getResponseHeader&&_11bf.getResponseHeader("Content-type").indexOf("text/html")!=-1){ this.m_faultDialog.handleUnknownHTMLResponse(_11bf.getResponseText()); }else{ if(_11bf&&_11bf.getSoapFault){ this.m_faultDialog.show(_11bf.getSoapFault()); }else{ if(oCV.getSoapFault()){ var _11c1=XMLBuilderLoadXMLFromString(oCV.getSoapFault()); this.m_faultDialog.show(_11c1); oCV.setSoapFault(""); }else{ if(typeof console!="undefined"){ console.log("An unhandled fault was returned: %o",_11bf); } } } } }; BaseRequestHandler.prototype.isAuthenticationFault=function(_11c2){ var oCV=this.getViewer(); var _11c4=null; if(_11c2&&_11c2.getSoapFault){ _11c4=_11c2.getSoapFault(); }else{ if(oCV.getSoapFault()){ _11c4=XMLBuilderLoadXMLFromString(oCV.getSoapFault()); } } if(_11c4!=null){ var _11c5=XMLHelper_FindChildByTagName(_11c4,"CAM",true); return (_11c5!=null&&XMLHelper_FindChildByTagName(_11c5,"promptInfo",true)!=null); } return false; }; BaseRequestHandler.prototype.onPassportTimeout=function(_11c6){ 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(_11c6&&_11c6.getResponseHeader&&_11c6.getResponseHeader("Content-type").indexOf("text/html")!=-1){ var _11c8=""; if(_11c6.getResponseText){ _11c8=_11c6.getResponseText(); } if((_11c8.indexOf("http-equiv=\"refresh\"")!=-1)||(_11c8.indexOf("http-equiv='refresh'")!=-1)){ this.m_logOnDialog.show(null); }else{ this.m_logOnDialog.handleUnknownHTMLResponse(_11c8); } }else{ if(_11c6&&_11c6.getSoapFault){ this.m_logOnDialog.show(_11c6.getSoapFault()); }else{ if(oCV.getSoapFault()){ var _11c9=XMLBuilderLoadXMLFromString(oCV.getSoapFault()); this.m_logOnDialog.show(_11c9); oCV.setSoapFault(""); }else{ if(typeof console!="undefined"){ console.log("BaseRequestHandler.prototype.onPassportTimeout: An unhandled authentication fault was returned: %o",_11c6); } } } } }; BaseRequestHandler.prototype.onWorking=function(_11ca){ if(this.m_workingDialog){ var _11cb=_11ca&&typeof _11ca.getAsynchStatus=="function"&&_11ca.getAsynchStatus()=="stillWorking"?true:false; if(!_11cb){ 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 _11ce=oCV.getViewerWidget(); if(_11ce.getLoadManager()){ _11ce.getLoadManager().processQueue(); } } }; BaseRequestHandler.prototype.onPrompting=function(_11cf){ 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"]=_11cf; window["AsynchRequestPromptDialog"]=this.m_promptDialog; var _11d1="?cv.id="+oCV.getId(); window["AsynchRequestPromptDialog"].initialize(oCV.getWebContentRoot()+"/rv/showStandalonePrompts.html"+_11d1,400,400); window["AsynchRequestPromptDialog"].show(); }; BaseRequestHandler.prototype.processDATAReportResponse=function(_11d2){ 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 _11d4=_11d2.getResponseState(); if(!_11d4){ this.resubmitInSafeMode(); } if(this.loadReportHTML(_11d2.getResult())===false){ this.resubmitInSafeMode(); } this.updateViewerState(_11d4); }; BaseRequestHandler.prototype.updateViewerState=function(_11d5){ var oCV=this.getViewer(); applyJSONProperties(oCV,_11d5); var _11d7=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(_11d7!="fault"){ if(oCV.envParams["rapReportInfo"]){ this._processRapReportInfo(oCV); } if(typeof _11d5.clientunencodedexecutionparameters!="undefined"){ var _11d8=document.getElementById("formWarpRequest"+oCV.getId()); if(_11d8!=null&&typeof _11d8["clientunencodedexecutionparameters"]!="undefined"){ _11d8["clientunencodedexecutionparameters"].value=_11d5.clientunencodedexecutionparameters; } if(typeof document.forms["formWarpRequest"]!="undefined"&&typeof document.forms["formWarpRequest"]["clientunencodedexecutionparameters"]!="undefined"){ document.forms["formWarpRequest"]["clientunencodedexecutionparameters"].value=_11d5.clientunencodedexecutionparameters; } } }else{ oCV.setTracking(""); } }; BaseRequestHandler.prototype._processRapReportInfo=function(oCV){ if(oCV.envParams["rapReportInfo"]){ var _11da=eval("("+oCV.envParams["rapReportInfo"]+")"); if(typeof RAPReportInfo!="undefined"){ var _11db=new RAPReportInfo(_11da,oCV); oCV.setRAPReportInfo(_11db); } } }; BaseRequestHandler.prototype.loadReportHTML=function(_11dc){ if(!_11dc){ 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=_11dc.replace(/]*>/gi,"").replace(/<\/form[^>]*>/gi,""); oCV.m_sHTML=sHTML; oCV.setHasPrompts(false); var id=oCV.getId(); var _11e0=document.getElementById("RVContent"+id); var _11e1=document.getElementById("CVReport"+id); if(window.gScriptLoader){ var _11e2=oCV.getViewerWidget()?true:false; var _11e3=oCV.getViewerWidget()?document.getElementById("_"+oCV.getViewerWidget().iContext.widgetId+"_cv"):_11e1; sHTML=window.gScriptLoader.loadCSS(sHTML,_11e3,_11e2,id); } if(oCV.sBrowser=="ie"){ sHTML=" "+sHTML; } _11e1.innerHTML=sHTML; this.massageHtmlBeforeDisplayed(); if(window.gScriptLoader){ var _11e4=GUtil.generateCallback(oCV.showLoadedContent,[_11e0],oCV); oCV.m_resizeReady=false; if(!window.gScriptLoader.loadAll(_11e1,_11e4,id,true)){ if(window.gScriptLoader.containsAjaxWarnings()){ return false; } } }else{ _11e0.style.display="block"; } var _11e5=document.querySelectorAll("button"); var _11e6=_11e5.length; for(var k=0;k<_11e6;k++){ var _11e8=_11e5[k]; var id=_11e8.id; var _11e9=id.match(/reprompt/); if(_11e9){ var _11ea=_11e8.outerHTML; var _11eb=_11ea.match(/layoutname="\w+"/); if(_11eb!==null){ var _11ec=_11eb[0]; var _11ed=/".*"/; var _11ee=_11ed.exec(_11ec); if(oCV.getCurrentPromptControlFocus()==_11ee){ _11e8.focus(); oCV.setCurrentPromptControlFocus(null); _11e8=null; } }else{ oCV.setCurrentPromptControlFocus(null); _11e8=null; } } } oCV.updateOutputForA11ySupport(); this._clearFindState(); return true; }; BaseRequestHandler.prototype._clearFindState=function(){ var oCV=this.getViewer(); var _11f0=oCV.getState()&&oCV.getState().getFindState()?oCV.getState().getFindState():null; if(_11f0&&!_11f0.findOnServerInProgress()){ oCV.getState().clearFindState(); } }; BaseRequestHandler.prototype.showReport=function(){ var oCV=this.getViewer(); var _11f2=document.getElementById("CVReport"+oCV.getId()); if(_11f2){ _11f2.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(_11f4){ if(this.m_httpRequestConfig){ var _11f5=this.m_httpRequestConfig.getReportStatusCallback(_11f4); if(_11f5){ _11f5(); } } }; 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(_11f6,_11f7){ var _11f8=_11f6; var _11f9=this[_11f7]; this[_11f7]=function(_11fa){ _11f9.apply(this,arguments); var _11fb=null; if(_11fa&&typeof _11fa.getAsynchStatus=="function"){ _11fb=_11fa.getAsynchStatus(); }else{ _11fb=_11f8=="complete"?this.getViewer().getStatus():_11f8; } if(_11fb=="stillWorking"){ return; } var _11fc=this.m_httpRequestConfig.getReportStatusCallback(_11fb); if(typeof _11fc=="function"){ setTimeout(_11fc,10); } }; }; dojo.provide("FaultDialog"); dojo.declare("FaultDialog",IFaultDialog,{m_soapFault:null,m_errorMessage:null,m_oCV:null,constructor:function(oCV){ this.m_oCV=oCV; },show:function(_11fe){ this.m_soapFault=_11fe; this.m_oCV.m_resizeReady=true; this.renderInlineDialog(); this.m_oCV.getViewerWidget().setErrorDlg(this); },handleUnknownHTMLResponse:function(_11ff){ if(_11ff){ var _1200=window.open("","","height=400,width=500"); if(_1200!=null){ _1200.document.write(_11ff); } } },canRetryRequest:function(){ var _1201=true; var _1202=XMLHelper_FindChildrenByTagName(this.m_soapFault,"allowRetry",true); if(_1202.length>0){ _1201=(XMLHelper_GetText(_1202[0],false)==="true"); } return _1201; },isWarningMessage:function(){ return false; },getButtons:function(){ var _1203=[{label:RV_RES.IDS_JS_OK,action:dojo.hitch(this,this.ok)}]; if(this.canRetryRequest()){ _1203.push({label:RV_RES.IDS_JS_RETRY,action:dojo.hitch(this,this.retry)}); } return _1203; },renderInlineDialog:function(){ var _1204={"type":this.isWarningMessage()?"warning":"error","message":this.getErrorMessage(),"buttons":this.getButtons()}; var _1205=this.getDetails(); if(_1205&&_1205.length>0){ _1204.details=_1205; } this.m_oCV.getViewerWidget().fireEvent("com.ibm.bux.widget.notification",null,_1204); },setErrorMessage:function(_1206){ this.m_errorMessage=_1206; },getErrorMessage:function(){ if(this.m_errorMessage==null){ var _1207=XMLHelper_FindChildrenByTagName(this.m_soapFault,"message",true); if(_1207.length>0){ var _1208=XMLHelper_FindChildByTagName(_1207[0],"messageString",false); this.checkAndSetErrorMessage(XMLHelper_GetText(_1208,false)); } } return this.m_errorMessage; },checkAndSetErrorMessage:function(_1209){ this.m_detailMessageStartIndex=1; if(_1209.indexOf("RSV-BBP-0038")==0){ _1209=RV_RES.IDS_CONV_CANCELED_ERROR; this.m_detailMessageStartIndex=0; } this.m_errorMessage=_1209; },getDetails:function(){ var _120a=""; var _120b=XMLHelper_FindChildrenByTagName(this.m_soapFault,"message",true); if(_120b.length>0){ if(typeof this.m_detailMessageStartIndex==="undefined"||this.m_detailMessageStartIndex===null){ this.m_detailMessageStartIndex=1; } for(var _120c=this.m_detailMessageStartIndex;_120c<_120b.length;++_120c){ var _120d=XMLHelper_FindChildByTagName(_120b[_120c],"messageString",false); _120a+=XMLHelper_GetText(_120d,false)+"\n"; } } return _120a; },retry:function(){ var _120e=this.m_oCV.getRetryDispatcherEntry(); this.hide(); if(_120e){ _120e.retryRequest(); }else{ var _120f=this.m_oCV.getViewerWidget().getOriginalFormFields(); if(_120f&&(_120f.get("b_action")=="cvx"||_120f.get("b_action")=="cvx.high")){ _120f.add("b_action","cognosViewer"); } this.m_oCV.executeAction("RetryRequest",_120f); } },ok:function(){ var _1210=this.m_oCV.getRetryDispatcherEntry(); this.hide(); if(_1210){ _1210.onCloseErrorDlg(); } },hide:function(){ this.m_oCV.getViewerWidget().fireEvent("com.ibm.bux.widget.notification",null,{remove:1}); this.m_oCV.getViewerWidget().setErrorDlg(null); this.m_oCV.setRetryDispatcherEntry(null); }}); function buxErrorPage_toggleErrorDetails(event,cvId,_1213){ if((event.button==0&&(event.keyCode=="0"||typeof event.keyCode=="undefined"))||event.keyCode=="32"||event.keyCode=="13"){ var _1214=document.getElementById("buxErrorPageDetailContentOuter"+cvId); var _1215=document.getElementById("buxErrorPageDetails"+cvId); var _1216=document.getElementById("titlePaneTitle"+cvId); var _1217=(_1215.style.display=="none"); dojo.removeClass(_1214,_1217?"dijitTitlePaneContentOuterClosed":"dijitTitlePaneContentOuterOpen"); dojo.addClass(_1214,_1217?"dijitTitlePaneContentOuterOpen":"dijitTitlePaneContentOuterClosed"); dojo.removeClass(_1216,_1217?"dijitClose":"dijitOpen"); dojo.addClass(_1216,_1217?"dijitOpen":"dijitClose"); _1215.style.display=_1217?"":"none"; } }; function ModalFaultDialog(){ }; ModalFaultDialog.prototype=new FaultDialog(); ModalFaultDialog.prototype.show=function(_1218){ var _1219=""; var _121a="",_121b=""; var _121c=XMLHelper_FindChildrenByTagName(_1218,"message",true); if(_121c.length>0){ for(var _121d=1;_121d<_121c.length;++_121d){ _121b=XMLHelper_FindChildByTagName(_121c[_121d],"messageString",false); _1219+=XMLHelper_GetText(_121b,false)+"\n"; } _121b=XMLHelper_FindChildByTagName(_121c[0],"messageString",false); _121a=XMLHelper_GetText(_121b,false); } bux.messageBox(bux.MB_ERROR,_121a,"",_1219); }; dojo.provide("GlobalPromptFaultDialog"); dojo.require("FaultDialog"); dojo.declare("GlobalPromptFaultDialog",FaultDialog,{m_sendRequestOnOK:false,setSendRequestOnOK:function(_121e){ this.m_sendRequestOnOK=_121e; },ok:function(){ this.hide(); this.m_oCV.getViewerWidget().disableListenToForGlobalPrompt(); if(this.m_sendRequestOnOK){ var _121f=this.m_oCV.getRetryDispatcherEntry(); var _1220=null; if(_121f){ _1220=_121f.getOriginalFormFields(); }else{ _1220=this.m_oCV.getViewerWidget().getOriginalFormFields(); } if(_1220&&_1220.exists("widget.globalPromptInfo")){ _1220.remove("widget.globalPromptInfo"); } this.retry(); } }}); dojo.provide("FaultMessageDialog"); dojo.declare("FaultMessageDialog",FaultDialog,{m_oCV:null,m_errorMessage:"",constructor:function(oCV,_1222){ this.m_errorMessage=_1222; },getErrorMessage:function(){ return this.m_errorMessage; },getDetails:function(){ return ""; },canRetryRequest:function(){ return false; }}); dojo.provide("WarningMessageDialog"); dojo.declare("WarningMessageDialog",FaultMessageDialog,{constructor:function(oCV,_1224){ },isWarningMessage:function(){ return true; }}); function LogOnDialog(oCV){ if(oCV){ this.m_oCV=oCV; } }; LogOnDialog.prototype=new ILogOnDialog(); LogOnDialog.prototype.getViewer=function(){ return this.m_oCV; }; LogOnDialog.prototype.handleUnknownHTMLResponse=function(_1226){ this.show(null); }; LogOnDialog.prototype.show=function(_1227){ var _1228=this.getPromptInfoNamespacesFromAuthenticationFault(_1227); if(window["CVEditContentActionInstance"]){ window["CVEditContentActionInstance"].transitionFromBUA(); } IWidgetLogonhandler.handleLogon(this.getViewer().getId(),_1228); }; LogOnDialog.prototype.getPromptInfoNamespacesFromAuthenticationFault=function(_1229){ if(!_1229){ return null; } var _122a=XMLHelper_FindChildByTagName(_1229,"CAM",true); if(_122a==null){ return null; } var _122b=XMLHelper_FindChildByTagName(_122a,"promptInfo",true); if(_122b==null){ return null; } var _122c=XMLHelper_FindChildByTagName(_122a,"displayObjects",true); if(_122c==null){ return null; } var items=XMLHelper_FindChildrenByTagName(_122c,"item",true); if(items==null||items.length!=1){ return null; } var _122e=items[0]; if(_122e==null){ return null; } var _122f=XMLHelper_FindChildByTagName(_122e,"name",true); var name=XMLHelper_GetText(_122f,false); if(name==="CAMNamespace"){ var _1231=XMLHelper_FindChildByTagName(_122e,"value",true); var value=XMLHelper_GetText(_1231,false); if(value!=null){ return value; } } return null; }; dojo.provide("LogOnHandler"); dojo.declare("LogOnHandler",null,{constructor:function(){ this.m_cvIdList=[]; },handleLogon:function(cvId,_1234){ this.m_cvIdList.push(cvId); if(this.m_cvIdList.length==1){ dojo["require"]("bux.dialogs.IFrameDialog"); var _1235=(_1234==null||_1234.length==0)?new bux.dialogs.LogonDialog({okHandler:GUtil.generateCallback(this.okHandler,[],this),cancelHandler:GUtil.generateCallback(this.cancelHandler,[],this)}):new bux.dialogs.LogonDialog({okHandler:GUtil.generateCallback(this.okHandler,[],this),cancelHandler:GUtil.generateCallback(this.cancelHandler,[],this),params:{"h_CAM_action":"logonAs","CAMNamespace":_1234}}); _1235.startup(); _1235.show(); } },okHandler:function(){ for(var index=0;index"; _1295.innerHTML=_1297; _1296.appendChild(_1295); } this.parent.show.call(this); }; RequestExecutedIndicator.prototype.hide=function(){ var _1298=document.getElementById("executionCursor"+this.getViewer().getId()); if(_1298!=null){ _1298.parentNode.removeChild(_1298); } this.parent.hide.call(this); }; dojo.provide("WorkingDialog"); dojo.declare("WorkingDialog",IRequestIndicator,{constructor:function(oCV){ this.m_oCV=oCV; this.m_sNamespace=oCV.getId(); this.m_sGateway=oCV.getGateway(); try{ var _129a=[]; if(oCV.getAdvancedServerProperty("VIEWER_JS_HIDE_CANCEL_BUTTON")!="true"){ _129a.push({"class":"icdDialogButton",label:RV_RES.CANCEL,onClick:dojo.hitch(this,this.doCancel)}); } this.m_waitPageDialog=new ViewerIWidgetInlineDialog(this.getCognosViewer(),this.getWaitPageHTML(),_129a,"waitButtonContainer_"+this.getCognosViewer().getId()); } catch(e){ if(console&&console.log){ console.log(e); } } },setSimpleWorkingDialogFlag:function(flag){ },getCognosViewer:function(){ return this.m_oCV; },show:function(){ this.m_waitPageDialog.show(); },getWaitPageHTML:function(){ var id=this.getCognosViewer().getId(); return ""+""+"
"+"
"+"
"+RV_RES.IDS_JS_WAIT_PAGE_LOADING+"
"+"
"+"
"+"
"; },hide:function(){ this.m_waitPageDialog.hide(); this.m_cancelCallback=null; },setCancelCallback:function(_129d){ this.m_cancelCallback=_129d; },doCancel:function(){ var oCV=this.getCognosViewer(); if(this.m_cancelCallback){ this.m_cancelCallback(); this.m_cancelCallback=null; }else{ var _129f=oCV.cancel(); if(_129f){ var _12a0=oCV.getViewerWidget().getUndoRedoQueue(); if(_12a0){ _12a0.handleCancel(); } } } if(oCV.isReportRenderingDone()){ this.hide(); }else{ var _12a1={action:"deleteWidget"}; oCV.getViewerWidget().iContext.iEvents.fireEvent("com.ibm.bux.widget.action",null,_12a1); } }}); dojo.provide("ModalFaultMessageDialog"); dojo.declare("ModalFaultMessageDialog",IFaultDialog,{m_errorMessage:"",m_errorDetails:"",constructor:function(_12a2,_12a3){ this.m_errorMessage=_12a2; this.m_errorDetails=_12a3; },getErrorMessage:function(){ return this.m_errorMessage; },getDetails:function(){ return this.m_errorDetails; },show:function(){ bux.messageBox(bux.MB_ERROR,this.getErrorMessage(),"",this.getDetails()); }}); dojo.provide("MissingMemberFaultDialog"); dojo.declare("MissingMemberFaultDialog",FaultDialog,{m_oCV:null,m_errorMessage:null,m_bHasBUACapability:false,m_bHasParameters:false,constructor:function(oCV,_12a5,_12a6,_12a7){ this.m_errorMessage=_12a5; this.m_bHasBUACapability=_12a6; this.m_bHasParameters=_12a7; },getErrorMessage:function(){ return this.m_errorMessage; },canRetryRequest:function(){ return false; },getButtons:function(){ var _12a8=[]; if(this.m_bHasBUACapability){ _12a8.push({label:RV_RES.IDS_JS_EDIT,action:dojo.hitch(this,this.invokeEditContentAction)}); } _12a8.push({label:RV_RES.IDS_JS_CLOSE,action:dojo.hitch(this,this.ok)}); return _12a8; },invokeEditContentAction:function(){ var _12a9={}; _12a9.oFaultDialog=this; _12a9.bHasParameters=this.m_bHasParameters; this.m_oCV.executeAction("EditContent",{"MissingMemberRecoveryMode":_12a9}); }}); 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(_12aa){ this.m_bUsePageRequest=_12aa; }; ViewerDispatcher.prototype.getUsePageRequest=function(){ return this.m_bUsePageRequest; }; ViewerDispatcher.prototype.dispatchRequest=function(_12ab){ if(this.m_activeRequest==null){ this.startRequest(_12ab); }else{ if(_12ab.canBeQueued()==true){ this.m_requestQueue.push(_12ab); }else{ if(window.cognosViewerDebug&&console&&console.warn){ console.warn("Warning! Dropped a dispatcher entry!"); } } } }; ViewerDispatcher.prototype.startRequest=function(_12ac){ this.m_activeRequest=_12ac; if(_12ac!=null){ _12ac.setUsePageRequest(this.m_bUsePageRequest); _12ac.sendRequest(); } }; ViewerDispatcher.prototype.cancelRequest=function(key){ for(var i=0;i0){ _12b1=this.m_requestQueue.shift(); if(_12b1.getKey()!=null){ while(this.m_requestQueue.length>0&&this.m_requestQueue[0].getKey()==_12b1.getKey()){ _12b1=this.m_requestQueue.shift(); } } } return _12b1; }; 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(_12b3){ this.m_request.setHeaders(_12b3); }; DispatcherEntry.prototype.getHeaders=function(){ return this.m_request.getHeaders(); }; DispatcherEntry.prototype.setOriginalFormFields=function(_12b4){ this.m_originalFormFields=_12b4; }; DispatcherEntry.prototype.getOriginalFormFields=function(){ return this.m_originalFormFields; }; DispatcherEntry.prototype.setRequestHandler=function(_12b5){ _12b5.addCallbackHooks(); this.m_requestHandler=_12b5; }; DispatcherEntry.prototype.getRequestHandler=function(){ return this.m_requestHandler; }; DispatcherEntry.prototype.setWorkingDialog=function(_12b6){ if(this.getRequestHandler()){ this.m_requestHandler.setWorkingDialog(_12b6); } }; DispatcherEntry.prototype.setRequestIndicator=function(_12b7){ if(this.getRequestHandler()){ this.getRequestHandler().setRequestIndicator(_12b7); } }; DispatcherEntry.prototype.forceSynchronous=function(){ this.getRequest().forceSynchronous(); }; DispatcherEntry.prototype.setUsePageRequest=function(_12b8){ this.m_bUsePageRequest=_12b8; }; DispatcherEntry.prototype.getUsePageRequest=function(){ return this.m_bUsePageRequest; }; DispatcherEntry.prototype.setDefaultFormFields=function(){ var _12b9=this.getViewer().envParams; this.addFormField("b_action","cognosViewer"); this.addFormField("cv.catchLogOnFault","true"); this.addDefinedNonNullFormField("protectParameters",_12b9["protectParameters"]); this.addDefinedNonNullFormField("ui.routingServerGroup",_12b9["ui.routingServerGroup"]); this.addDefinedNonNullFormField("cv.debugDirectory",_12b9["cv.debugDirectory"]); this.addDefinedNonNullFormField("cv.showFaultPage",_12b9["cv.showFaultPage"]); this.addDefinedNonNullFormField("cv.useRAPDrill",_12b9["cv.useRAPDrill"]); this.addDefinedNonNullFormField("container",_12b9["container"]); this.addNonEmptyStringFormField("cv.objectPermissions",_12b9["cv.objectPermissions"]); }; DispatcherEntry.prototype.getViewer=function(){ return this.m_oCV; }; DispatcherEntry.prototype.prepareRequest=function(){ }; DispatcherEntry.addWidgetInfoToFormFields=function(_12ba,_12bb){ if(_12ba){ var _12bc=_12ba.getBUXRTStateInfoMap(); if(_12bc){ _12bb.addFormField("cv.buxRTStateInfo",_12bc); } var _12bd=_12ba.getDisplayName(); if(_12bd&&_12bd.length>0){ _12bb.addFormField("displayTitle",_12bd); } } }; DispatcherEntry.prototype.canBeQueued=function(){ return this.m_canBeQueued; }; DispatcherEntry.prototype.setCanBeQueued=function(_12be){ this.m_canBeQueued=_12be; }; DispatcherEntry.prototype.getKey=function(){ return this.m_requestKey; }; DispatcherEntry.prototype.setKey=function(key){ this.m_requestKey=key; }; DispatcherEntry.prototype.setRequest=function(_12c0){ this.m_request=_12c0; }; DispatcherEntry.prototype.getRequest=function(){ return this.m_request; }; DispatcherEntry.prototype.setCallbacks=function(_12c1){ this.getRequest().setCallbacks(_12c1); }; DispatcherEntry.prototype.getCallbacks=function(){ return this.getRequest().getCallbacks(); }; DispatcherEntry.prototype.sendRequest=function(){ this.prepareRequest(); var _12c2=this.getRequest().getFormFields(); var _12c3=_12c2.keys(); if(!this.m_originalFormFields){ this.m_originalFormFields=new CDictionary(); for(var index=0;index<_12c3.length;index++){ this.m_originalFormFields.add(_12c3[index],_12c2.get(_12c3[index])); } } this.getRequest().sendRequest(); }; DispatcherEntry.prototype.onNewRequest=function(_12c5){ this.setRequest(_12c5); }; DispatcherEntry.prototype.retryRequest=function(){ var oCV=this.getViewer(); oCV.setRetryDispatcherEntry(null); var _12c7=this.getRequest().newRequest(); _12c7.setHeaders(null); this.setRequest(_12c7); var _12c8=this.m_originalFormFields.keys(); for(var index=0;index<_12c8.length;index++){ var _12ca=_12c8[index]; var _12cb=this.m_originalFormFields.get(_12ca); if(_12ca=="cv.responseFormat"&&_12cb=="iWidget"){ this.addFormField("cv.responseFormat","data"); }else{ if(_12ca=="ui.action"&&_12cb=="wait"){ this.addFormField("ui.action",this.m_originalFormFields.get("ui.primaryAction")); }else{ if(_12ca!="m_tracking"&&_12ca!="cv.outputKey"){ this.addFormField(_12ca,_12cb); } } } } 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(_12cc){ if(!this.m_bCancelCalled){ this.m_bCancelCalled=true; if(this.getRequestHandler()){ this.getRequestHandler().onCancel(); } if(_12cc){ 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(_12da,arg1){ if(this.getRequestHandler()){ this.getRequestHandler().onWorking(_12da); } }; DispatcherEntry.prototype.onFault=function(_12dc){ if(this.getRequestHandler()){ this.getRequestHandler().onFault(_12dc); } }; DispatcherEntry.prototype.onError=function(_12dd){ if(this.m_bCancelCalled){ return; } if(this.getRequestHandler()){ this.getRequestHandler().onError(_12dd); } }; DispatcherEntry.prototype.possibleUnloadEvent=function(){ this.setCallbacks({"error":{}}); }; DispatcherEntry.prototype.onPreHttpRequest=function(_12de){ if(this.getRequestHandler()){ this.getRequestHandler().preHttpRequest(_12de); } }; DispatcherEntry.prototype.onPostHttpRequest=function(_12df){ if(this.getRequestHandler()){ this.getRequestHandler().postHttpRequest(_12df); } }; DispatcherEntry.prototype.onPassportTimeout=function(_12e0){ if(this.getRequestHandler()){ this.getRequestHandler().onPassportTimeout(_12e0); } }; DispatcherEntry.prototype.onPrompting=function(_12e1){ if(this.getRequestHandler()){ this.getRequestHandler().onPrompting(_12e1); } }; DispatcherEntry.prototype.onEntryComplete=function(_12e2){ if(!this.m_oCV._beingDestroyed){ this.m_oCV.getViewerDispatcher().requestComplete(this); } }; DispatcherEntry.prototype.onEntryFault=function(_12e3){ this.m_oCV.setFaultDispatcherEntry(this); this.m_oCV.resetViewerDispatcher(); if(!this.m_bCancelCalled){ this.m_oCV.setRetryDispatcherEntry(this); } }; DispatcherEntry.prototype.onCloseErrorDlg=function(){ var _12e4=this.getCallbacks(); if(_12e4["closeErrorDlg"]){ var _12e5=GUtil.generateCallback(_12e4["closeErrorDlg"].method,[],_12e4["closeErrorDlg"].object); _12e5(); } }; DispatcherEntry.prototype.onPostEntryComplete=function(){ if(this.getRequestHandler()){ this.getRequestHandler().onPostEntryComplete(); } this.executeCallback("postComplete"); }; DispatcherEntry.prototype.executeCallback=function(_12e6){ var _12e7=this.getCallbacks(); if(_12e7[_12e6]){ var _12e8=(_12e7.customArguments)?[this,_12e7.customArguments]:[this]; var _12e9=GUtil.generateCallback(_12e7[_12e6].method,_12e8,_12e7[_12e6].object); _12e9(); 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 _12ed=new AsynchDATARequest(oCV.getGateway(),oCV.getWebContentRoot()); this.setRequest(_12ed); 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 _12ef=new AsynchJSONRequest(oCV.getGateway(),oCV.getWebContentRoot()); this.setRequest(_12ef); 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 _12f1=this.getFormField("ui.action"); var _12f2=this.getViewer().getActionState(); if(_12f2!==""&&(_12f1=="wait"||_12f1=="forward"||_12f1=="back")){ this.addFormField("cv.actionState",_12f2); } var _12f3=["nextPage","previousPage","firstPage","lastPage","reportAction","cancel","wait"]; var _12f4=true; for(var i=0;i<_12f3.length;i++){ if(_12f3[i]==_12f1){ _12f4=false; break; } } if(_12f4){ 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 _12f7=oCV.envParams; this.addFormField("cv.id",oCV.getId()); if(_12f7["cv.showFaultPage"]){ this.addFormField("cv.showFaultPage",_12f7["cv.showFaultPage"]); }else{ this.addFormField("cv.showFaultPage","false"); } this.addDefinedNonNullFormField("ui.object",_12f7["ui.object"]); this.addDefinedNonNullFormField("ui.primaryAction",_12f7["ui.primaryAction"]); this.addDefinedNonNullFormField("ui.objectClass",_12f7["ui.objectClass"]); this.addNonEmptyStringFormField("specificationType",_12f7["specificationType"]); this.addNonEmptyStringFormField("cv.promptForDownload",_12f7["cv.promptForDownload"]); this.addNonEmptyStringFormField("ui.conversation",oCV.getConversation()); this.addNonEmptyStringFormField("m_tracking",oCV.getTracking()); var _12f8=oCV.getExecutionParameters(); this.addNonEmptyStringFormField("executionParameters",_12f8); var sCAF=oCV.getCAFContext(); this.addDefinedNonNullFormField("ui.cafcontextid",sCAF); }; ReportDispatcherEntry.prototype.onWorking=function(_12fa,arg1){ var _12fc=_12fa.getResponseState(); var _12fd=this.getRequestHandler(); if(_12fd){ var _12fe=_12fd.getWorkingDialog(); if(_12fe&&_12fe.setSecondaryRequests&&_12fc.m_aSecRequests){ _12fe.setSecondaryRequests(_12fc.m_aSecRequests); } } DispatcherEntry.prototype.onWorking.call(this,_12fa,arg1); if(_12fd){ this.getRequestHandler().updateViewerState(_12fc); } }; ReportDispatcherEntry.prototype.onComplete=function(_12ff,arg1){ if(this.getRequestHandler()){ this.getRequestHandler().onComplete(_12ff); } }; function ViewerDispatcherEntry(oCV){ ViewerDispatcherEntry.baseConstructor.call(this,oCV); if(oCV){ ViewerDispatcherEntry.prototype.setDefaultFormFields.call(this); this.setCallbacks({"prompting":{"object":this,"method":this.onPrompting}}); var _1302=oCV.getViewerWidget(); if(_1302.m_originalFormFields){ this.setOriginalFormFields(_1302.m_originalFormFields); _1302.m_originalFormFields=null; } } }; ViewerDispatcherEntry.prototype=new ReportDispatcherEntry(); ViewerDispatcherEntry.baseConstructor=ReportDispatcherEntry; ViewerDispatcherEntry.prototype.parent=ReportDispatcherEntry.prototype; ViewerDispatcherEntry.prototype.prepareRequest=function(){ this.parent.prepareRequest.call(this); var _1303=this.getViewer().getViewerWidget(); if(this.getFormField("widget.reloadToolbar")){ this.addFormField("cv.buxCurrentUserRole",_1303.getUserRole()); } if(_1303){ DispatcherEntry.addWidgetInfoToFormFields(_1303,this); } this.getViewer().inlineScriptsDoneExecuting=false; }; ViewerDispatcherEntry.prototype.setDefaultFormFields=function(){ var oCV=this.getViewer(); var _1305=oCV.getViewerWidget(); var _1306=oCV.envParams; this.addFormField("bux","true"); this.addFormField("cv.showFaultPage","false"); this.addDefinedNonNullFormField("baseReportModificationTime",_1306["baseReportModificationTime"]); this.addDefinedNonNullFormField("originalReport",_1306["originalReport"]); this.addDefinedNonNullFormField("ui.reportDrop",_1306["ui.reportDrop"]); this.addDefinedNonNullFormField("ui.preserveRapTags",_1306["ui.preserveRapTags"]); if(_1305.getProperties()){ var _1307=_1305.getProperties().getFlashCharts(); if(_1307!=null){ this.addDefinedNonNullFormField("savedFlashChartOption",_1307); if(_1306.hasAVSChart){ this.addDefinedNonNullFormField("hasAVSChart",_1306.hasAVSChart); }else{ this.addDefinedNonNullFormField("hasAVSChart",oCV.hasAVSChart()); } } } var _1308=_1305.getAttributeValue("gateway"); if(_1308){ this.addDefinedNonNullFormField("cv.gateway",_1308); } var _1309=_1305.getAttributeValue("webcontent"); if(_1309){ this.addDefinedNonNullFormField("cv.webcontent",_1309); } if(oCV.envParams["cv.outputKey"]){ this.addFormField("cv.outputKey",oCV.envParams["cv.outputKey"]); this.addFormField("b_action","cvx.high"); delete oCV.envParams["cv.outputKey"]; } if(_1305.getXNodeId()){ this.setHeaders({"X-Node-ID":_1305.getXNodeId()}); _1305.setXNodeId(null); } }; ViewerDispatcherEntry.prototype.onPrompting=function(_130a){ if(this.getRequestHandler()){ this.getRequestHandler().onPrompting(_130a); } }; function Blocker(oCVId){ this.oCV_Id=oCVId; this.m_viewerDiv=dojo.byId("RVContent"+this.oCV_Id); this.m_containerDiv=this._findContainerDiv(); this.initialize(); }; Blocker.prototype._findContainerDiv=function(){ var _130c=null; if(!this.m_containerDiv){ _130c=this.m_viewerDiv; while(_130c){ if(_130c.style&&_130c.style.height&&_130c.style.height.indexOf("px")!=-1){ return _130c; } _130c=_130c.parentNode; } } if(typeof console!="undefined"&&console&&console.log){ console.log("ViewerIWidgetInlineDialog: Could not find the container div for showing the dialog."); } return this.m_viewerDiv; }; Blocker.prototype.setClassNameOverride=function(_130d){ if(!_130d){ return; } this.m_classNameOverride=_130d; this.applyClassNameOverride(); }; Blocker.prototype.applyClassNameOverride=function(){ if(!this.m_classNameOverride||!this.m_background){ return; } dojo.removeClass(this.m_background); dojo.addClass(this.m_background,this.m_classNameOverride); }; Blocker.prototype.getNode=function(){ return this.m_background; }; Blocker.prototype.initialize=function(){ if(!this.m_background){ this.m_background=dojo.byId("BACKGROUND"+this.oCV_Id); if(!this.m_background){ this.m_background=document.createElement("div"); this.m_background.id="BACKGROUND"+this.oCV_Id; this.m_background.className="report-blocker"; this.m_background.tabIndex="0"; dojo.place(this.m_background,this.m_containerDiv,"before"); } } }; Blocker.prototype.show=function(){ if(this.m_background){ this.m_background.style.display="block"; } }; Blocker.prototype.hide=function(){ if(this.m_background){ this.m_background.style.display="none"; } }; Blocker.prototype.destroy=function(){ if(this.m_background!=null){ this.m_background.parentNode.removeChild(this.m_background); this.m_background=null; } }; function ReselectAction(oCV,_130f){ this.m_aSelectionFilterObjects=_130f; this.m_oCV=oCV; this.m_oSC=oCV.getSelectionController(); this.m_cd=this.m_oSC.getCCDManager().m_cd; this.m_md=this.m_oSC.getCCDManager().m_md; this.m_nReportDiv=oCV.getReportDiv(); this.m_oRAPReportContainers=oCV.getRAPReportInfo().getContainers(); }; ReselectAction.prototype.executeAction=function(){ this.mapCdMd(); if(this.show()){ var oVW=this.m_oCV.getViewerWidget(); if(oVW){ var _1311=oVW.m_oWidgetContextManager.genSelectionPayload(this.m_oCV,oVW.getWidgetId()); oVW.setSelectionFilterSent(true); oVW.fireEvent("com.ibm.bux.data.filterCache.init",null,_1311); if(oVW.isPastedWidget()&&!oVW.pastedSelectedBroadcasted){ oVW.pastedSelectedBroadcasted=true; oVW.onSelectionChange(); } } } }; ReselectAction.prototype.mapCdMd=function(){ var _1312=this.m_aSelectionFilterObjects; for(var i in _1312){ var _1314=_1312[i]; var oItem=_1314.selectedItem; var aCtx=[]; var _1317=null; var _1318=this._findMdIndex("q",_1314.query); _1317=this._setNewCtx(oItem,_1318); if(_1317){ aCtx.push(_1317); }else{ continue; } for(var j in _1314.context){ var _131a=_1314.context[j]; _1317=this._setNewCtx(_131a,_1318); if(_1317){ aCtx.push(_1317); } } _1314.ctxArray=aCtx; } }; ReselectAction.prototype._setNewCtx=function(oItem,_131c){ var _131d=null; var ctxId=null; if(oItem.isMeasure==="true"){ _131d=this._findMdIndex(oItem.mdProperty,oItem.mdValue,_131c); if(_131d){ oItem.ctxRef={"property":oItem.mdProperty,"mdIndex":_131d}; return oItem.ctxRef; } }else{ if(oItem.mun){ _131d=this._findMdIndex("m",oItem.mun,_131c); ctxId=this._getContextIdForCdProperty(_131c,"m",_131d); }else{ _131d=this._findMdIndex(oItem.mdProperty,oItem.mdValue,_131c); ctxId=this._getContextIdForCdPropertyAndMdProperty(_131c,"u",oItem.use,oItem.mdProperty,_131d); } if(ctxId){ oItem.ctxId=ctxId; return oItem.ctxId; } } return null; }; ReselectAction.prototype._getContextIdForCdProperty=function(_131f,_1320,_1321){ var ctxid=null; for(var j in this.m_cd){ if(this.m_cd[j].q==_131f&&this.m_cd[j][_1320]==_1321){ ctxid=j; break; } } return ctxid; }; ReselectAction.prototype._getContextIdForCdPropertyAndMdProperty=function(_1324,_1325,_1326,_1327,_1328){ var ctxid=null; for(var j in this.m_cd){ if(this.m_cd[j].q==_1324&&this.m_cd[j][_1327]==_1328&&this.m_cd[j][_1325]==_1326){ ctxid=j; break; } } return ctxid; }; ReselectAction.prototype._findMdIndex=function(_132b,value,_132d){ var _132e=null; for(var j in this.m_md){ if(this.m_md[j][_132b]===value){ if(this.m_md[j]["q"]&&_132d){ if(this.m_md[j]["q"]==_132d){ _132e=j; break; } }else{ _132e=j; break; } } } return _132e; }; ReselectAction.prototype.show=function(){ var _1330=false; var oCV=this.m_oCV; var oVW=oCV.getViewerWidget(); var _1333=oCV.getReportDiv(); var _1334=null; var _1335=null; var _1336=null; oVW.preprocessPageClicked(false); if(oVW&&_1333){ for(var _1337 in this.m_aSelectionFilterObjects){ var _1338=this.m_aSelectionFilterObjects[_1337]; var _1339=(_1338.selectedItem.isMeasure==="true"); var _133a=true; if(_1339){ var _133b=_1338.context; for(var idx in _133b){ if(_133b[idx].isMeasure!=="true"){ _133a=false; break; } } if(_133a){ continue; } } var aCtx=_1338.ctxArray; if(aCtx&&aCtx.length>0){ _1334=this._getLayoutContainers(_1338.lid); var _133e=false; for(var _133f=0;!_133e&&_133f<_1334.length;_133f++){ if(/img|IMG/.test(_1334[_133f].tagName)){ var _1340=_1334[_133f]; for(_1336=null;!_1336&&_1340.parentNode;){ _1340=_1340.parentNode; var _1341=_1340.getElementsByTagName("map"); if(_1341&&_1341.length>0){ _1336=_1341[0]; } } }else{ _1336=_1334[_133f].parentNode; } if(_1336){ var _1342=this._buildCtxQueryRegExp(aCtx); _1335=getElementsByAttribute(_1336,"*","ctx",null,-1,_1342); var _1343=_1338.selectedItem; for(var idx in _1335){ if(_1335[idx].getAttribute){ if(_1339&&_1343.isDataValueOrChartElement==="false"&&(_1335[idx].getAttribute("type")==="datavalue"||_1335[idx].getAttribute("type")==="chartElement")){ continue; } if(this.isMatchingCell(aCtx,_1335[idx])){ var _1344=_1335[idx]; if(_1344.tagName==="SPAN"||_1344.tagName==="span"){ var _1345=_1344.parentNode.tagName; if(_1345=="td"||_1345=="TD"||_1345=="TH"||_1345=="th"){ if(_1344.parentNode.getAttribute("ctx")==_1344.getAttribute("ctx")){ continue; } } } var evt={"target":_1344,"button":1,"ctrlKey":true}; this.m_oSC.pageClicked(evt); _133e=true; _1330=true; } } } } } } } } return _1330; }; ReselectAction.prototype.isMatchingCell=function(aCtx,_1348){ var _1349=_1348.getAttribute("ctx"); if(!_1349||_1349.length==0){ return false; } var _134a=_1349.replace(/::/g,":").split(":"); var _134b=0; var _134c=null; var _134d=0; var _134e=null; var _134f=0; var _1350=false; for(;_134b<_134a.length;_134b++){ if(_134a[_134b].length>0){ _134c=_134a[_134b++]; break; } } _134e=aCtx[_134d]; if(typeof _134e=="string"){ if(_134e==_134c){ _134f++; } }else{ if(this.m_cd[_134c][_134e.property]==_134e.mdIndex){ _134f++; } } if(_134f!=1){ return false; } if(aCtx.length==1){ _1350=true; } for(_134d=1;!_1350&&_134d0&&_134a[_134b]!="0"){ _134c=_134a[_134b]; if(_134e==_134c){ _134f++; _134a[_134b]="0"; break; } } } }else{ for(_134b=1;_134b<_134a.length;_134b++){ if(_134a[_134b].length>0&&_134a[_134b]!="0"){ _134c=_134a[_134b]; if(this.m_cd[_134c][_134e.property]==_134e.mdIndex){ _134f++; _134a[_134b]="0"; break; } } } } if(aCtx.length==_134f){ _1350=true; } } return _1350; }; ReselectAction.prototype._buildCtxQueryRegExp=function(aCtx){ var _1352=""; var _1353=false; var i=0; if(typeof aCtx[i]=="string"){ _1352+="^"+aCtx[i]; }else{ _1352+="^[\\d:]+"; } i++; var _1355=""; for(;!_1353&&i0){ _1355+="+"; } _1355+=aCtx[i]; _1353=true; }else{ if(i0){ _1355+="+"; } _1355+="[\\d:]"; } } } if(_1355.length>0){ _1352+=":{1,}"+_1355; } return new RegExp(_1352); }; ReselectAction.prototype._getLayoutContainers=function(sLid){ var _1357=""; if(this.m_oRAPReportContainers&&this.m_oRAPReportContainers[sLid]){ _1357=sLid+".+"; }else{ for(var name in this.m_oRAPReportContainers){ if(_1357.length>0){ _1357+="|"; } _1357+=name+".+"; } } return getElementsByAttribute(this.m_nReportDiv,"*","lid",null,-1,new RegExp(_1357)); }; function ViewerA11YHelper(oCV){ this.m_oCV=oCV; }; ViewerA11YHelper.prototype.onFocus=function(evt){ var _135b=getCrossBrowserNode(evt); _135b=ViewerA11YHelper.findChildOfTableCell(_135b); this.updateCellAccessibility(_135b,false); }; ViewerA11YHelper.prototype.onKeyDown=function(evt){ evt=(evt)?evt:((event)?event:null); var _135d=getCrossBrowserNode(evt); if(ViewerA11YHelper.isTableCell(_135d)){ for(var i=0;i<_135d.childNodes.length;i++){ if(_135d.childNodes[i].nodeName.toLowerCase()=="span"){ _135d=_135d.childNodes[i]; break; } } } if(!this.isValidNodeToSelect(_135d)){ return true; } _135d=ViewerA11YHelper.findChildOfTableCell(_135d); if(_135d){ 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(_135d); } return stopEventBubble(evt); }else{ if(evt.keyCode=="37"){ this.moveLeft(_135d); return stopEventBubble(evt); }else{ if(evt.keyCode=="38"){ this.moveUp(_135d); return stopEventBubble(evt); }else{ if(evt.keyCode=="40"){ this.moveDown(_135d); 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 _135f=this.m_oCV.getActionFactory().load("Selection"); _135f.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 _1360=this.m_oCV.getActionFactory().load("Delete"); if(!this.m_oCV.isBlacklisted("Delete")&&_1360.canDelete()){ _1360.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(_135d); if(lid!=""){ lid=lid.split(this.m_oCV.getId())[0]; var _1362=-1; var _1363=this.m_oCV.getRAPReportInfo(); if(_1363){ var _1364=_1363.getContainer(lid); if(typeof _1364.layoutIndex!="undefined"){ _1362=_1364.layoutIndex; } } var _1365=document.getElementById("infoBarHeaderButton"+_1362+this.m_oCV.getId()); if(_1365!==null){ this.m_oCV.setCurrentNodeFocus(getCrossBrowserNode(evt)); _1365.focus(); } } return stopEventBubble(evt); }else{ if(!this.m_oCV.isBux&&evt.shiftKey==true&&evt.keyCode=="121"){ var ocv=this.m_oCV; var _1367=function(){ if(typeof evt.clientX=="undefined"||typeof evt.clientY=="undefined"){ var _1368=clientToScreenCoords(evt.target,document.body); evt.clientX=_1368.leftCoord; evt.clientY=_1368.topCoord; } ocv.dcm(evt,true); }; if(isFF()){ setTimeout(_1367,0); }else{ _1367.call(); } return stopEventBubble(evt); }else{ if(this.m_oCV.isBux&&(evt.keyCode=="93"||(evt.shiftKey==true&&evt.keyCode=="121"))){ var _1369=this.m_oCV.getViewerWidget(); var _136a=this.m_oCV.getSelectionController(); _1369.preprocessPageClicked(true); _136a.pageClicked(evt); _1369.updateToolbar(); _1369.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 _136d=node.nodeName.toLowerCase(); if((_136d=="span"&&(!node.getAttribute("class")||node.getAttribute("class").indexOf("expandButton")===-1))||(_136d=="div"&&node.getAttribute("flashchartcontainer")=="true")||(_136d=="div"&&node.getAttribute("chartcontainer")=="true")||(_136d=="img"&&(!node.id||node.id.indexOf("sortimg")!==0))){ return node; } if(ViewerA11YHelper.isSemanticNode(node)){ var child=node.childNodes&&node.childNodes.length?node.childNodes[0]:null; if(child){ return this.getValidNodeToSelect(child); } } } return null; }; ViewerA11YHelper.isSemanticNode=function(node){ if(!ViewerA11YHelper.isSemanticNode._semanticNodeNames){ ViewerA11YHelper.isSemanticNode._semanticNodeNames=["strong","em","h1","h2","h3","h4","h5","h6"]; } var _1370=node.nodeName.toLowerCase(); for(var i=0;i1){ var _1386=_1383.rowSpan; for(var _1387=1;_1387<_1386;_1387++){ _1385=_1385.nextSibling; } } var _1388=false; while(_1385){ if(_1385.nextSibling){ _1385=_1385.nextSibling; }else{ if(_1383.nextSibling&&!_1388){ _1385=_1385.parentNode.firstChild; _1388=true; _1384++; }else{ return false; } } if(this.doMoveUpDown(_1385,_1384)){ return true; } } return false; }; ViewerA11YHelper.prototype.moveUp=function(_1389){ var _138a=ViewerA11YHelper.getTableCell(_1389); _138a=this.getPfMainOutputCell(_138a); var _138b=_138a.parentNode; var _138c=this.getColumnIndex(_138a); _138c+=this.getColSpanFromRowSpans(_138a); var _138d=false; while(_138b){ if(_138b.previousSibling){ _138b=_138b.previousSibling; }else{ if(_138a.previousSibling&&!_138d){ _138b=_138b.parentNode.lastChild; _138d=true; _138c--; }else{ return false; } } if(this.doMoveUpDown(_138b,_138c)){ 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(_138f,_1390){ if(_138f!=null){ var _1391=_138f.firstChild; var pos=this.getColSpanFromRowSpans(_1391); while(_1391){ if(pos==_1390){ return this.moveToTDFromTheRight(_1391); }else{ if(pos>_1390){ break; } } var _1393=0; if(_1391.colSpan){ _1393=_1391.colSpan; }else{ _1393++; } pos+=_1393; _1391=_1391.nextSibling; } } }; ViewerA11YHelper.prototype.moveToTDFromTheRight=function(td){ td=this.getPfVisibleCell(td); var _1395=td.childNodes; for(var _1396=_1395.length-1;_1396>=0;_1396--){ var node=this.getValidNodeToSelect(_1395[_1396]); 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 _1399=td.childNodes; for(var _139a=0;_139a<_1399.length;_139a++){ var node=this.getValidNodeToSelect(_1399[_139a]); 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 _139d=this.m_oCV.m_pinFreezeManager.nodeToContainer(node); if(_139d){ _139d.updateScroll(node); } } }; ViewerA11YHelper.prototype.getPfMainOutputCell=function(_139e){ var main=null; var slid=_139e.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 _13a2=this.m_oCV.m_pinFreezeManager.getContainer(lid); if(_13a2){ main=_13a2.getMain(_139e); } } } return main?main:_139e; }; 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 _13a5=0; while(node.previousSibling){ node=node.previousSibling; if(node.rowSpan==1){ if(node.colSpan){ _13a5+=node.colSpan; }else{ _13a5++; } } } return _13a5; }; ViewerA11YHelper.prototype.getPfVisibleCell=function(_13a6){ var copy=null; var slid=_13a6.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 _13aa=this.m_oCV.m_pinFreezeManager.getContainer(lid); if(_13aa){ copy=_13aa.getCopy(_13a6); } } } return copy?copy:_13a6; }; ViewerA11YHelper.prototype.updateCellAccessibility=function(_13ab,force){ if(!_13ab){ return false; } var _13ad=false; var _13ae=false; var _13af=false; var _13b0=_13ab.getAttribute("ctx")!=null?_13ab:_13ab.parentNode; if(_13ab.getAttribute("flashChartContainer")!="true"){ if(_13b0.getAttribute("ctx")!=null){ if(this.m_oCV.isBux){ var _13b1=this.m_oCV.getAction("DrillUpDown"); _13b1.updateDrillability(this.m_oCV,_13b0); _13ad=_13b1.canDrillDown(); _13ae=_13b1.canDrillUp(); }else{ var _13b2=_13b0.getAttribute("ctx"); var ctxID=_13b2.indexOf(":")==-1?_13b2:_13b2.substring(0,_13b2.indexOf(":")); var _13b4=this.m_oCV.getSelectionController(); _13ad=_13b4.canDrillDown(ctxID); _13ae=_13b4.canDrillUp(ctxID); } } _13af=_13ab.parentNode.getAttribute("dtTargets")?true:false; } var _13b5=_13ab.nodeName.toLowerCase()=="img"; var _13b6=_13ab.parentNode.getAttribute("type")=="columnTitle"; if(!_13b5&&(force||((_13ab.getAttribute("aria-labelledby")!=null||_13b6||this.m_oCV.isAccessibleMode())))){ var _13b7=""; if(_13ab.parentNode.getAttribute("cc")=="true"){ _13b7+=" "+RV_RES.IDS_JS_CROSSTAB_CORNER; } if(_13ab.innerHTML.length===0){ _13ab.innerHTML=" "; _13b7+=" "+RV_RES.IDS_JS_EMPTY_CELL; } if(_13ad&&_13ae){ _13b7+=" "+RV_RES.IDS_JS_DRILL_DOWN_UP_JAWS; }else{ if(_13ad){ _13b7+=" "+RV_RES.IDS_JS_DRILL_DOWN_JAWS; }else{ if(_13ae){ _13b7+=" "+RV_RES.IDS_JS_DRILL_UP_JAWS; } } } if(_13af){ _13b7+=" "+RV_RES.IDS_JS_DRILL_THROUGH_JAWS; } if(_13ab.altText&&_13ab.altText.length>0){ _13b7=_13ab.altText; }else{ if(_13ab.getAttribute("flashChartContainer")=="true"){ _13b7=RV_RES.IDS_JS_CHART_IMAGE; } } if(this.m_oCV.isBux){ var _13b8=_13ab.previousSibling; if(_13b8){ var wid=_13b8.getAttribute("widgetid"); if(wid&&wid.indexOf("comment")){ _13b7+=" "+RV_RES.IDS_JS_ANNOTATION_JAWS; } } if(_13ab.getAttribute("rp_name")||_13ab.parentNode.getAttribute("rp_name")){ _13b7+=" "+RV_RES.IDS_JS_LABEL_HAS_BEEN_RENAMED; } if(_13ab.nextSibling&&_13ab.nextSibling.getAttribute("class")=="sortIconVisible"){ _13b7+=" "+_13ab.nextSibling.getAttribute("alt"); } } if(_13b7.length>0){ this.addAriaLabelledByOnCell(_13ab,_13b7); } } if(_13ae||_13ad||_13af){ this.addDrillAccessibilityAttributes(_13ab,_13af); } if(_13ab.attachEvent){ _13ab.attachEvent("onblur",this.onBlur); }else{ _13ab.addEventListener("blur",this.onBlur,false); } if((isIE()&&_13ab.getAttribute("tabIndex")!=0)||_13b5){ _13ab.setAttribute("modifiedTabIndex","true"); _13ab.setAttribute("oldTabIndex",_13ab.getAttribute("tabIndex")); _13ab.setAttribute("tabIndex",0); } }; ViewerA11YHelper.prototype.addAriaLabelledByOnCell=function(_13ba,_13bb){ var _13bc=0; var _13bd=_13ba; while(_13bd.previousSibling){ _13bc++; _13bd=_13bd.previousSibling; } var _13be=_13ba.getAttribute("ariaHiddenSpanId"); if(_13be&&document.getElementById(_13be)){ document.getElementById(_13be).innerHTML=_13bb; }else{ if(!_13ba.parentNode.id&&!_13ba.id){ _13ba.parentNode.id=Math.random(); } var _13bf=document.createElement("span"); _13bf.style.visibility="hidden"; _13bf.style.display="none"; _13bf.id=(_13ba.id==""?_13ba.parentNode.id:_13ba.id)+"_"+_13bc; _13bf.innerHTML=_13bb; _13ba.parentNode.appendChild(_13bf); var _13c0=""; if(_13ba.getAttribute("aria-labelledby")!=null){ _13c0+=_13ba.getAttribute("aria-labelledby"); }else{ if(_13ba.id==""){ _13ba.id=_13ba.parentNode.id+"_main_"+_13bc; } _13c0+=_13ba.id; } _13c0+=" "+_13bf.id; _13ba.setAttribute("aria-labelledby",_13c0); _13ba.setAttribute("ariaHiddenSpanId",_13bf.id); } }; ViewerA11YHelper.prototype.addDrillAccessibilityAttributes=function(_13c1,_13c2){ if(!_13c1.getAttribute("oldClassName")){ if(!_13c2){ _13c1.setAttribute("oldClassName",_13c1.className); _13c1.className="dl "+_13c1.className; } if(!_13c1.getAttribute("role")){ _13c1.setAttribute("role","link"); } } }; ViewerA11YHelper.prototype.onBlur=function(evt){ var _13c4=null; if(isIE()){ _13c4=getNodeFromEvent(evt,true); }else{ _13c4=this; } _13c4=ViewerA11YHelper.findChildOfTableCell(_13c4); if(_13c4){ if(_13c4.getAttribute("oldClassName")){ _13c4.className=_13c4.getAttribute("oldClassName"); _13c4.removeAttribute("oldClassName"); } if(_13c4.getAttribute("modifiedTabIndex")=="true"){ _13c4.removeAttribute("modifiedTabIndex"); _13c4.removeAttribute("tabIndex"); if(_13c4.getAttribute("oldTabIndex")){ _13c4.setAttribute("tabIndex",_13c4.getAttribute("oldTabIndex")); } _13c4.removeAttribute("oldTabIndex"); } var _13c5=_13c4.getAttribute("ariaHiddenSpanId"); if(_13c5){ var _13c6=document.getElementById(_13c5); if(_13c6){ _13c6.innerHTML=""; } } } }; ViewerA11YHelper.prototype.getColSpanFromRowSpans=function(_13c7){ var _13c8=0; var _13c9=_13c7.parentNode; var _13ca=0; while(_13c9){ var _13cb=_13c9.firstChild; var _13cc=this.getColumnCount(_13c9)-_13ca; while(_13cb&&_13cb.rowSpan>1&&_13cc>0&&_13cb!=_13c7){ _13c8+=_13cb.colSpan; _13cb=_13cb.nextSibling; _13cc--; } if(_13c9.childNodes.length>_13ca){ _13ca=this.getColumnCount(_13c9); } _13c9=_13c9.previousSibling; } return _13c8; }; ViewerA11YHelper.prototype.getColumnCount=function(_13cd){ var _13ce=0; var node=_13cd.firstChild; while(node){ _13ce+=node.colSpan; node=node.nextSibling; } return _13ce; }; ViewerA11YHelper.prototype.addLabelledByForItemsOutsideOfContainers=function(){ if(!this.m_oCV.isAccessibleMode()){ return; } var _13d0=document.getElementById("RVContent"+this.m_oCV.getId()); if(!_13d0){ return; } var _13d1=getElementsByAttribute(_13d0,"span","tabindex","0"); if(!_13d1){ return; } for(var i=0;i<_13d1.length;i++){ var span=_13d1[i]; this.updateCellAccessibility(span,false); } }; function CtxArrayPlaceHolder(){ }; var self=window; function CDrillManager(oCV){ this.m_drawDrillTargets=false; this.setCV(oCV); }; CDrillManager.prototype=new CViewerHelper(); CDrillManager.prototype.getSelectionController=function(){ var _13d5; try{ _13d5=getCognosViewerSCObjectRef(this.getCV().getId()); } catch(e){ _13d5=null; } return _13d5; }; CDrillManager.prototype.getSelectedObject=function(){ var _13d6=this.getSelectionController(); if(_13d6==null){ return null; } var _13d7=null; var _13d8=null; if(_13d6.hasSelectedChartNodes()){ _13d8=_13d6.getSelectedChartNodes(); }else{ _13d8=_13d6.getSelections(); } if(_13d8&&_13d8.length==1){ _13d7=_13d8[0]; } return _13d7; }; 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(_13d9){ if(typeof _13d9=="undefined"){ _13d9=this.getSelectedObject(); } if(_13d9==null){ return false; } var _13da=_13d9.getMuns(); var muns=""; for(var _13dc=0;_13dc<_13da.length&&muns=="";++_13dc){ if(typeof _13da[_13dc][0]!="undefined"){ muns+=_13da[_13dc][0]; } } return (muns!=""); }; CDrillManager.prototype.getRefQuery=function(){ var _13dd=""; var _13de=this.getSelectedObject(); if(_13de==null){ return ""; } var _13df=_13de.getRefQueries(); for(var i=0;i<_13df.length;i++){ if(_13df[i]!=null){ for(var j=0;j<_13df[i].length;j++){ if(_13df[i][j]!=null&&_13df[i][j]!=""){ return _13df[i][j]; } } } } return _13dd; }; CDrillManager.prototype.isIsolated=function(){ var _13e2=this.getSelectionController(); if(_13e2==null||_13e2.getDrillUpDownEnabled()==false){ return false; } var _13e3=this.getSelectedObject(); if(_13e3==null){ return false; } if(_13e3 instanceof CSelectionChartObject&&_13e2!=null){ var _13e4=_13e3.getArea(); if(_13e4!=null){ var _13e5=_13e4.getAttribute("isolated"); if(typeof _13e5!="undefined"&&_13e5!=null&&_13e5=="true"){ return true; } } }else{ var _13e6=_13e3.getCellRef(); if(typeof _13e6=="object"&&_13e6!=null){ var _13e7=_13e6.getElementsByTagName("span"); if(_13e7!=null&&typeof _13e7!="undefined"&&_13e7.length>0){ var _13e8=_13e7[0].getAttribute("isolated"); if(_13e8!=null&&_13e8!="undefined"&&_13e8=="true"){ return true; } } } } return false; }; CDrillManager.prototype.getDrillOption=function(_13e9){ var _13ea=this.getSelectionController(); if(_13ea==null||_13ea.getDrillUpDownEnabled()==false||typeof _13e9=="undefined"){ return false; } var _13eb=this.getSelectedObject(); if(_13eb==null){ return false; } if(this.isIsolated()){ if(_13e9=="drillDown"){ return false; }else{ if(_13e9=="drillUp"){ return true; } } } if(_13e9=="drillDown"){ if(_13eb instanceof CSelectionChartObject&&_13ea!=null){ var _13ec=_13eb.getArea(); if(_13ec!=null){ var _13ed=_13ec.getAttribute("isChartTitle"); if(typeof _13ed!="undefined"&&_13ed!=null&&_13ed=="true"){ return false; } } } } var _13ee=_13eb.getDrillOptions(); var _13ef=(typeof DrillContextMenuHelper!=="undefined"&&DrillContextMenuHelper.needsDrillSubMenu(this.m_oCV)); for(var idx=0;idx<_13ee.length;++idx){ var _13f1=(_13ef)?_13ee[idx].length:1; for(var level=0;level<_13f1;++level){ var _13f3=_13ee[idx][level]; if(_13f3=="3"){ return true; }else{ if(_13e9=="drillUp"&&_13f3=="1"){ return true; }else{ if(_13e9=="drillDown"&&_13f3=="2"){ return true; } } } } } return false; }; CDrillManager.prototype.canDrillThrough=function(){ var _13f4=this.getSelectionController(); if(_13f4==null||_13f4.getModelDrillThroughEnabled()==false){ return false; } return true; }; CDrillManager.prototype.singleClickDrillEvent=function(evt,app){ var _13f7=this.getSelectionController(); if(_13f7!=null){ if(this.getCV().bCanUseCognosViewerSelection==true){ _13f7.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(_13fd,_13fe,_13ff,_1400){ var _1401=[]; var _1402=this.getSelectedObject(); if(_1402==null){ return _1401; } if(typeof _13fe=="undefined"){ _13fe=true; } var _1403=_1402.getDataItems(); var _1404=_1402.getMuns(); var _1405=_1402.getDimensionalItems("lun"); var _1406=_1402.getDimensionalItems("hun"); var _1407=_1402.getDrillOptions(); if(typeof _1403=="undefined"||typeof _1404=="undefined"||typeof _1407=="undefined"||_1404==null||_1403==null||_1407==null){ return _1401; } if(_1404.length!=_1403.length){ return _1401; } var _1408=_1404.length; for(var _1409=0;_1409<_1408;++_1409){ if(_1403[_1409].length!=0){ var _140a=(_1400)?this.findUserSelectedDrillItem(_1400,_1403[_1409]):0; if(_140a<0){ continue; } if((_13ff===true)||this.getDrillOption(_13fd)){ if(_1404[_1409][_140a]==""||_1401.toString().indexOf(_1404[_1409][_140a],0)==-1){ _1401[_1401.length]=_1403[_1409][_140a]; _1401[_1401.length]=_1404[_1409][_140a]; if(_13fe===true){ _1401[_1401.length]=_1405[_1409][_140a]; _1401[_1401.length]=_1406[_1409][_140a]; } } } } } return _1401; }; CDrillManager.prototype.findUserSelectedDrillItem=function(_140b,_140c){ for(var _140d=0;_140d<_140c.length;++_140d){ if(_140b==_140c[_140d]){ return _140d; } } return -1; }; CDrillManager.prototype.getModelDrillThroughContext=function(_140e){ var _140f=""; if(this.canDrillThrough()===true){ if(typeof gUseNewSelectionContext=="undefined"){ var _1410=""; if(typeof getConfigFrame!="undefined"){ _1410=decodeURIComponent(getConfigFrame().cfgGet("PackageBase")); }else{ if(this.getCV().getModelPath()!==""){ _1410=this.getCV().getModelPath(); } } _140f=getViewerSelectionContext(this.getSelectionController(),new CSelectionContext(_1410)); }else{ var _1411=new CParameterValues(); var _1412=this.getSelectionController(); if(_1412){ var _1413=_1412.getAllSelectedObjects(); for(var _1414=0;_1414<_1413.length;++_1414){ var _1415=_1413[_1414]; var _1416=_1415.getMuns(); var _1417=_1415.getMetadataItems(); var _1418=_1415.getUseValues(); for(var _1419=0;_1419<_1417.length;++_1419){ for(var idx=0;idx<_1417[_1419].length;++idx){ if(_1417[_1419][idx]==null||_1417[_1419][idx]==""){ continue; } var name=_1417[_1419][idx]; var _141c; if(_1416[_1419][idx]!=null&&_1416[_1419][idx]!=""){ _141c=_1416[_1419][idx]; }else{ _141c=_1418[_1419][idx]; } var _141d=_1418[_1419][idx]; _1411.addSimpleParmValueItem(name,_141c,_141d,"true"); } } } } var _141e=_140e.XMLBuilderCreateXMLDocument("context"); _140f=_1411.generateXML(_140e,_141e); } } return _140f; }; CDrillManager.prototype.rvDrillUp=function(_141f){ this.getCV().executeAction("DrillUp",_141f); }; CDrillManager.prototype.rvDrillDown=function(_1420){ this.getCV().executeAction("DrillDown",_1420); }; CDrillManager.prototype.rvBuildXMLDrillParameters=function(_1421,_1422){ var _1423=this.getDrillParameters(_1421,true,false,_1422); if(_1423.length==0){ return drillParams; } return this.buildDrillParametersSpecification(_1423); }; CDrillManager.prototype.buildDrillParametersSpecification=function(_1424){ var _1425=""; var idx=0; while(idx<_1424.length){ _1425+=""; _1425+=""; _1425+=sXmlEncode(_1424[idx++]); _1425+=""; _1425+=""; _1425+=sXmlEncode(_1424[idx++]); _1425+=""; _1425+=""; _1425+=sXmlEncode(_1424[idx++]); _1425+=""; _1425+=""; _1425+=sXmlEncode(_1424[idx++]); _1425+=""; _1425+=""; } _1425+=""; return _1425; }; CDrillManager.prototype.getAuthoredDrillsForCurrentSelection=function(){ var _1427=null; var _1428=this.getAuthoredDrillThroughTargets(); if(_1428.length>0){ var _1429=""; for(var _142a=0;_142a<_1428.length;++_142a){ _1429+=eval("\""+_1428[_142a]+"\""); } _1429+=""; var cv=this.getCV(); var _142c=cv.getAction("AuthoredDrill"); var _142d=cv.getDrillTargets(); if(_142d.length>0){ _1427=_142c.getAuthoredDrillThroughContext(_1429,_142d); } } return _1427; }; CDrillManager.prototype.getAuthoredDrillsForGotoPage=function(){ var _142e=""; var _142f=this.getAuthoredDrillsForCurrentSelection(); if(_142f){ _142e=XMLBuilderSerializeNode(_142f); } return _142e; }; CDrillManager.prototype.launchGoToPage=function(_1430,_1431){ var _1432=this.getSelectionController(); if((_1432!=null&&_1432.getModelDrillThroughEnabled()==true)||(typeof _1430!="undefined"&&_1430!=null&&_1430!="")){ var _1433=this.getAuthoredDrillsForGotoPage(); var _1434=this.getModelDrillThroughContext(self); var form=document.getElementById("drillForm"); if(form!=null){ document.body.removeChild(form); } form=document.createElement("form"); var cvid=this.getCVId(); var _1437=document.forms["formWarpRequest"+cvid]; form.setAttribute("id","drillForm"); form.setAttribute("name","drillForm"); form.setAttribute("target",_1437.getAttribute("target")); form.setAttribute("method","post"); form.setAttribute("action",_1437.getAttribute("action")); form.style.display="none"; document.body.appendChild(form); if(this.getCV().getModelPath()!==""){ form.appendChild(createHiddenFormField("modelPath",this.getCV().getModelPath())); } if(typeof _1437["ui.object"]!="undefined"&&_1437["ui.object"].value!=""){ form.appendChild(createFormField("drillSource",_1437["ui.object"].value)); }else{ if(typeof this.getCV().envParams["ui.spec"]!="undefined"){ form.appendChild(createFormField("sourceSpecification",this.getCV().envParams["ui.spec"])); } } if(_1433!=""){ form.appendChild(createHiddenFormField("m","portal/drillthrough.xts")); form.appendChild(createFormField("invokeGotoPage","true")); form.appendChild(createFormField("m","portal/drillthrough.xts")); form.appendChild(createFormField("modelDrillEnabled",_1432.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",_1433)); if(typeof gUseNewSelectionContext=="undefined"){ form.appendChild(createHiddenFormField("drillContext",_1434)); }else{ form.appendChild(createHiddenFormField("modeledDrillthru",_1434)); } form.appendChild(createHiddenFormField("errURL","javascript:window.close();")); if(typeof _1431!="undefined"&&_1431==true){ form.appendChild(this.createFormField("directLaunch","true")); } var _1438=""; if(this.getCV().envParams["ui.routingServerGroup"]){ _1438=this.getCV().envParams["ui.routingServerGroup"]; } form.appendChild(createHiddenFormField("ui.routingServerGroup",_1438)); if(this.getCV().getExecutionParameters()!=""){ form.appendChild(createHiddenFormField("encExecutionParameters",this.getCV().getExecutionParameters())); } if(_1437.lang&&_1437.lang.value!=""){ form.appendChild(createHiddenFormField("lang",_1437.lang.value)); } if(!this.getCV()||!this.getCV().launchGotoPageForIWidgetMobile(drillForm)){ if(typeof this.getCV().launchGotoPage==="function"){ this.getCV().launchGotoPage(form); }else{ var _1439="winNAT_"+(new Date()).getTime(); var sPath=this.getCV().getWebContentRoot()+"/rv/blankDrillWin.html?cv.id="+cvid; window.open(sPath,_1439,"toolbar,location,status,menubar,resizable,scrollbars=1"); form.target=_1439; } } } }; CDrillManager.prototype.buildSearchPageXML=function(_143b,pkg,model,_143e,_143f,_1440,_1441){ var _1442=null; if(typeof _143b.XMLElement=="function"){ _1442=_143b.XMLBuilderCreateXMLDocument("cognosSearch"); _143b.XMLBuilderSetAttributeNodeNS(_1442.documentElement,"xmlns:cs","http://developer.cognos.com/schemas/cs/1/"); var _1443=_1442.createElement("package"); if(typeof pkg=="string"&&pkg!==""){ _1443.appendChild(_1442.createTextNode(pkg)); } _1442.documentElement.appendChild(_1443); var _1444=_1442.createElement("model"); if(typeof model=="string"&&model!==""){ _1444.appendChild(_1442.createTextNode(model)); } _1442.documentElement.appendChild(_1444); var _1445=_1442.createElement("selectedContext"); _143b.XMLBuilderSetAttributeNodeNS(_1445,"xmlns:xs","http://www.w3.org/2001/XMLSchema"); _143b.XMLBuilderSetAttributeNodeNS(_1445,"xmlns:bus","http://developer.cognos.com/schemas/bibus/3/"); _143b.XMLBuilderSetAttributeNodeNS(_1445,"SOAP-ENC:arrayType","bus:parameterValue[]","http://schemas.xmlsoap.org/soap/encoding/"); _143b.XMLBuilderSetAttributeNodeNS(_1445,"xmlns:xsd","http://www.w3.org/2001/XMLSchema"); _143b.XMLBuilderSetAttributeNodeNS(_1445,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance"); _1442.documentElement.appendChild(_1445); for(var _1446 in _143e){ var _1447=_1442.createElement("item"); _143b.XMLBuilderSetAttributeNodeNS(_1447,"xsi:type","bus:parameterValue","http://www.w3.org/2001/XMLSchema-instance"); var _1448=_143b.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:name",_1442); _143b.XMLBuilderSetAttributeNodeNS(_1448,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance"); _1448.appendChild(_1442.createTextNode(_143e[_1446].name)); var _1449=_143b.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:value",_1442); _143b.XMLBuilderSetAttributeNodeNS(_1449,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance"); _143b.XMLBuilderSetAttributeNodeNS(_1449,"SOAP-ENC:arrayType","bus:parmValueItem[]","http://schemas.xmlsoap.org/soap/encoding/"); for(var j=0;j<_143e[_1446].values.length;j++){ var _144b=_1442.createElement("item"); _143b.XMLBuilderSetAttributeNodeNS(_144b,"xsi:type","bus:simpleParmValueItem","http://www.w3.org/2001/XMLSchema-instance"); var _144c=_143b.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:use",_1442); _143b.XMLBuilderSetAttributeNodeNS(_144c,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance"); _144c.appendChild(_1442.createTextNode(_143e[_1446].values[j][0])); var _144d=_143b.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:display",_1442); _143b.XMLBuilderSetAttributeNodeNS(_144d,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance"); var _144e=_143e[_1446].values[j][1]==null?"":_143e[_1446].values[j][1]; _144d.appendChild(_1442.createTextNode(_144e)); _144b.appendChild(_144c); _144b.appendChild(_144d); _1449.appendChild(_144b); } _1447.appendChild(_1448); _1447.appendChild(_1449); _1445.appendChild(_1447); } var _144f=_1442.createElement("defaultMeasure"); _1442.documentElement.appendChild(_144f); _1440.buildXML(_143b,_1442,"data"); var _1450=_1442.createElement("filter"); _1442.documentElement.appendChild(_1450); } return _1442; }; CDrillManager.prototype.openSearchPage=function(_1451,_1452){ this.getModelDrillThroughContext(self); var _1453=document.getElementById("searchPage"); if(_1453!=null){ document.body.removeChild(_1453); } _1453=document.createElement("form"); _1453.setAttribute("id","searchPage"); _1453.setAttribute("name","searchPage"); _1453.setAttribute("method","post"); _1453.setAttribute("target",_1453.name); _1453.setAttribute("action",this.getCV().getGateway()+"/gosearch"); _1453.style.display="none"; document.body.appendChild(_1453); _1453.appendChild(createHiddenFormField("csn.action","search")); _1453.appendChild(createHiddenFormField("csn.drill",_1452)); var _1454=window.open("",_1453.name,"directories=no,location=no,status=no,toolbar=no,resizable=yes,scrollbars=yes,top=100,left=100,height=480,width=640"); _1454.focus(); _1453.submit(); }; CDrillManager.prototype.launchSearchPage=function(){ var _1455=this.getSelectionController(); var _1456=document.forms["formWarpRequest"+this.getCVId()]; var _1457=this.determineSelectionsForSearchPage(_1455); var _1458=this.getSearchContextDataSpecfication(_1455); var spXML=this.buildSearchPageXML(self,_1456.packageBase.value,this.getCV().getModelPath(),_1457,[],_1458,[]); this.openSearchPage(_1456.packageBase.value,XMLBuilderSerializeNode(spXML)); }; CDrillManager.prototype.qsDrillDown=function(){ if(!this.canDrillDown()){ getConfigFrame().dlgGenericSelectionMessage(false); return; } var _145a="DD:"; this.qsSendDrillCommand(_145a); }; CDrillManager.prototype.qsDrillUp=function(){ if(!this.canDrillUp()){ getConfigFrame().dlgGenericSelectionMessage(false); return; } var _145b="DU:"; this.qsSendDrillCommand(_145b); }; CDrillManager.prototype.qsSendDrillCommand=function(_145c){ var _145d; if(_145c=="DU:"){ _145d="drillUp"; }else{ _145d="drillDown"; } var _145e=this.getDrillParameters(_145d,false,false); if(_145e.length==0){ getConfigFrame().dlgGenericSelectionMessage(false); return; } for(var idx=0;idx<_145e.length;++idx){ _145c+=getConfigFrame().escapeParam(_145e[idx]); if(idx+1<_145e.length){ _145c+=","; } } getConfigFrame().sendCmd(_145c,"",true); }; CDrillManager.prototype.qsLaunchGoToPage=function(_1460){ var _1461=this.getSelectionController(); if(_1461!=null&&_1461.getModelDrillThroughEnabled()==true){ var _1462=this.getModelDrillThroughContext(cf); if(_1462==""){ getConfigFrame().dlgGenericSelectionMessage(false); return; } var _1463=document.getElementById("gotoPage"); if(_1463!=null){ document.body.removeChild(_1463); } _1463=document.createElement("form"); _1463.setAttribute("id","gotoPage"); _1463.setAttribute("name","gotoPage"); _1463.setAttribute("method","post"); _1463.style.display="none"; document.body.appendChild(_1463); var _1464=getConfigFrame(); _1463.appendChild(this.createFormField("objpath",decodeURIComponent(_1464.cfgGet("PackageBase")))); if(typeof gUseNewSelectionContext=="undefined"){ _1463.appendChild(this.createFormField("m","portal/goto2.xts")); }else{ _1463.appendChild(this.createFormField("m","portal/goto.xts")); } _1463.appendChild(this.createFormField("b_action","xts.run")); if(typeof gUseNewSelectionContext=="undefined"){ _1463.appendChild(this.createFormField("drillContext",_1462)); }else{ _1463.appendChild(this.createFormField("modeledDrillthru",_1462)); } if(typeof getConfigFrame().routingServerGroup!="undefined"){ _1463.appendChild(this.createFormField("ui.routingServerGroup",getConfigFrame().routingServerGroup)); } if(typeof _1460!="undefined"&&_1460==true){ _1463.appendChild(this.createFormField("directLaunch","true")); } var _1465=_1464.goApplicationManager.getReportManager().getParameterManager().getExecutionParameters(); if(_1465){ _1463.appendChild(this.createFormField("encExecutionParameters",_1465)); } var _1466="winNAT_"+(new Date()).getTime(); var sPath=this.getCV().getWebContentRoot()+"/rv/blankDrillWin.html?cv.id="+this.getCVId(); window.open(sPath,_1466,"toolbar,location,status,menubar,resizable,scrollbars=1"); _1463.target=_1466; } }; CDrillManager.prototype.qsLaunchSearchPage=function(){ var cf=getConfigFrame(); var _1469=goWindowManager.getSelectionController(); var _146a=this.determineSelectionsForSearchPage(_1469); var _146b=this.getSearchContextDataSpecfication(_1469); var _146c=decodeURIComponent(cf.cfgGet("PackageBase")); var spXML=this.buildSearchPageXML(cf,_146c,decodeURIComponent(cf.cfgGet("cmLastModel")),_146a,[],_146b,[]); this.openSearchPage(_146c,cf.XMLBuilderSerializeNode(spXML)); }; CDrillManager.prototype.determineSelectionsForSearchPage=function(_146e){ var _146f=new CtxArrayPlaceHolder(); var _1470=_146e.getAllSelectedObjects(); for(var i=0;i<_1470.length;i++){ var _1472=_1470[i].getColumnName(); if(!this.containsByIndiceInArray(_146f,_1472)){ _146f[_1472]={}; _146f[_1472].name=_1472; _146f[_1472].values=[]; } var idx0=""; var muns=_1470[i].getMuns(); if(muns!=null&&muns.length>0){ idx0=muns[0][0]; } var idx1=_1470[i].getDisplayValues()[0]; if(!(this.containsInArray(_146f[_1472].values,0,idx0)&&this.containsInArray(_146f[_1472].values,1,idx1))){ _146f[_1472].values[_146f[_1472].values.length]=[idx0,idx1]; } } return _146f; }; CDrillManager.prototype.getSearchContextDataSpecfication=function(_1476){ var _1477=new CParameterValues(); var _1478=_1476.getCCDManager(); var _1479=_1478.m_cd; for(var ctxId in _1479){ var _147b=_1478.GetUsage(ctxId); if(_147b!="2"){ var _147c=_1478.GetRDIValue(ctxId); var _147d=_1478.GetDisplayValue(ctxId); _1477.addSimpleParmValueItem(_147c,_147c,_147d,"true"); } } return _1477; }; 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,value){ var _1487=document.createElement("input"); _1487.setAttribute("type","hidden"); _1487.setAttribute("name",name); _1487.setAttribute("value",value); return (_1487); }; CDrillManager.prototype.getAuthoredDrillThroughTargets=function(){ var _1488=[]; var _1489=this.getSelectionController(); var _148a=null; if(_1489!=null){ if(_1489.getSelectedColumnIds().length==1){ var _148b=_1489.getSelections(); for(var _148c=0;_148c<_148b.length;++_148c){ var _148d=_148b[_148c]; _148a=_148d.getCellRef(); while(_148a){ if(_148a.getAttribute("dtTargets")!=null){ _1488.push(""+_148a.getAttribute("dtTargets")+""); break; }else{ if(_148a.getAttribute("onclick")!=null){ var _148e=_148a.getAttribute("onclick"); var _148f=null; if(_148e.indexOf("doSingleDrillThrough")!=-1){ _148f=_148e.replace("doSingleDrillThrough","this.buildRvTargetsForSingleDrillThrough"); }else{ if(_148e.indexOf("doMultipleDrillThrough")!=-1){ _148f=_148e.replace("doMultipleDrillThrough","this.buildRvTargetsForMultipleDrillThrough"); } } if(_148f!=null){ var _1490=eval(_148f); if(_1490!=null){ _1488.push(_1490); break; } } } } _148a=XMLHelper_GetFirstChildElement(_148a); } } }else{ if(_1489.hasSelectedChartNodes()){ var _1491=_1489.getSelectedChartNodes(); var _1492=_1491[0]; _148a=_1492.getArea(); if(_148a.getAttribute("dtTargets")!=null){ _1488.push(""+_148a.getAttribute("dtTargets")+""); } }else{ if(_1489.getSelectedDrillThroughImage()!=null){ var _1493=_1489.getSelectedDrillThroughImage(); if(_1493&&_1493.getAttribute("dtTargets")!=null){ _1488.push(""+_1493.getAttribute("dtTargets")+""); } }else{ if(_1489.getSelectDrillThroughSingleton()!=null){ var _1494=_1489.getSelectDrillThroughSingleton(); if(_1494&&_1494.getAttribute("dtTargets")!=null){ _1488.push(""+_1494.getAttribute("dtTargets")+""); } } } } } } return _1488; }; CDrillManager.prototype.getDrillThroughParameters=function(_1495,evt){ if(typeof _1495=="undefined"){ _1495="query"; } var _1497=[]; if(typeof evt!="undefined"){ var _1498=getCrossBrowserNode(evt,true); try{ while(_1498){ if(typeof _1498.getAttribute!="undefined"&&_1498.getAttribute("dtTargets")){ _1497.push(""+_1498.getAttribute("dtTargets")+""); break; } _1498=_1498.parentNode; } } catch(e){ return false; } }else{ var oCV=this.getCV(); var _149a=oCV.getDrillMgr(); var _149b=_149a.getSelectionController(); if(_149b!=null){ var _149c=null; if(_149b.hasSelectedChartNodes()){ var _149d=_149b.getSelectedChartNodes(); var _149e=_149d[0]; _149c=_149e.getArea(); } if(_149c!=null){ _1497.push(""+_149c.getAttribute("dtTargets")+""); }else{ _1497=this.getAuthoredDrillThroughTargets(); } } } if(_1497.length>0){ var _149f=""; for(var _14a0=0;_14a0<_1497.length;++_14a0){ _149f+=eval("\""+_1497[_14a0]+"\""); } _149f+=""; var _14a1=this.getCV().getAction("AuthoredDrill"); if(_1495=="query"){ _14a1.populateContextMenu(_149f); this.showOtherMenuItems(); }else{ if(this.getCV().envParams["cv.id"]=="AA"){ this.getCV().m_viewerFragment.raiseAuthoredDrillClickEvent(); }else{ _14a1.execute(_149f); } } return true; }else{ if(_1495=="query"){ this.showOtherMenuItems(); return true; }else{ return false; } } }; CDrillManager.prototype.executeAuthoredDrill=function(_14a2){ var _14a3=decodeURIComponent(_14a2); var _14a4=this.getCV().getAction("AuthoredDrill"); _14a4.executeDrillTarget(_14a3); }; CDrillManager.prototype.doesMoreExist=function(_14a5){ for(var i=0;i<_14a5.getNumItems();i++){ var _14a7=_14a5.get(i); if(_14a7!=null){ if((_14a7 instanceof CMenuItem)&&(_14a7.getLabel()==RV_RES.RV_MORE)&&(_14a7.getAction()==this.getCVObjectRef()+".getDrillMgr().launchGoToPage();")){ return true; } } } return false; }; CDrillManager.prototype.showOtherMenuItems=function(){ var cv=this.getCV(); var _14a9=cv.rvMainWnd; var _14aa=_14a9.getToolbarControl(); var _14ab=null; var _14ac=null; if(typeof _14aa!="undefined"&&_14aa!=null){ _14ab=_14aa.getItem("goto"); if(_14ab){ _14ac=_14ab.getMenu(); } } var _14ad=_14a9.getContextMenu(); var _14ae=_14a9.getUIHide(); var _14af=null; if(typeof _14ad!="undefined"&&_14ad!=null&&_14ad.getGoToMenuItem()){ _14af=_14ad.getGoToMenuItem().getMenu(); } var _14b0=null; var _14b1=this.getSelectionController(); if(_14ac!=null){ if(this.doesMoreExist(_14ac)==false){ if(typeof gMenuSeperator!="undefined"&&_14ac.getNumItems()>0&&(cv.bCanUseCognosViewerIndexSearch||_14ae.indexOf(" RV_TOOLBAR_BUTTONS_GOTO_RELATED_LINKS ")==-1)){ _14ac.add(gMenuSeperator); } var _14b2=new CMenuItem(_14ac,RV_RES.RV_MORE,this.getCVObjectRef()+".getDrillMgr().launchGoToPage();","",gMenuItemStyle,cv.getWebContentRoot(),cv.getSkin()); if(_14ae.indexOf(" RV_TOOLBAR_BUTTONS_GOTO_RELATED_LINKS ")!=-1){ _14b2.hide(); }else{ if(_14b1==null||_14b1.getModelDrillThroughEnabled()==false){ _14b2.disable(); } } } } if(_14af!=null){ if(typeof gMenuSeperator!="undefined"&&_14af.getNumItems()>0&&(cv.bCanUseCognosViewerIndexSearch||_14ae.indexOf(" RV_CONTEXT_MENU_GOTO_RELATED_LINKS ")==-1)){ _14af.add(gMenuSeperator); } var _14b3=new CMenuItem(_14af,RV_RES.RV_MORE,this.getCVObjectRef()+".getDrillMgr().launchGoToPage();","",gMenuItemStyle,cv.getWebContentRoot(),cv.getSkin()); if(_14ae.indexOf(" RV_CONTEXT_MENU_GOTO_RELATED_LINKS ")!=-1){ _14b3.hide(); }else{ if(_14b1==null||_14b1.getModelDrillThroughEnabled()==false){ _14b3.disable(); } } } if(_14b0!=null&&_14b1!=null){ var _14b4=_14b1.getAllSelectedObjects(); if(_14b4==null||_14b4.length===0){ _14b0.disable(); } } if(_14ac!=null){ _14ac.draw(); if(_14ac.isVisible()){ _14ac.show(); } } if(_14af!=null){ _14af.draw(); if(_14af.isVisible()){ _14af.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 _14b7=this.getSelectionController(); if(_14b7!=null){ var _14b8=_14b7.getSelectionObjectFactory().getSelectionChartObject(node); if(_14b8!=null){ var _14b9=_14b8.getDrillOptions(); for(var idx=0;idx<_14b9.length;++idx){ var _14bb=_14b9[idx][0]; if((node.getAttribute("isChartTitle")==="true"&&_14bb=="1")||_14bb=="3"||_14bb=="2"){ node.className="dl "+node.className; node.setAttribute("href","#"); break; } } } } } }; CDrillManager.prototype.buildRvTargetsForSingleDrillThrough=function(_14bc){ if(typeof _14bc=="undefined"||_14bc==null){ return null; } var _14bd=this.getCV().getDrillTargets(); if(!_14bd||_14bd.length==0){ return null; } var _14be=_14bc[0][0]; if(typeof _14be=="undefined"||_14be==null){ return null; } var _14bf=_14bd[_14be]; if(typeof _14bf=="undefined"||_14bf==null){ return null; } var _14c0=""; return ""+_14c0+""; }; CDrillManager.prototype.buildRvTargetsForMultipleDrillThrough=function(_14c1){ if(typeof _14c1=="undefined"||_14c1==null){ return null; } var _14c2=this.getCV().getDrillTargets(); if(!_14c2||_14c2.length==0){ return null; } var _14c3=""; for(var _14c4=0;_14c4<_14c1.length;++_14c4){ var _14c5=_14c1[_14c4]; if(_14c5.length<2){ continue; } var _14c6=_14c5[0]; if(typeof _14c6=="undefined"||_14c6==null){ continue; } var _14c7=_14c5[1]; if(typeof _14c7=="undefined"||_14c7==null){ continue; } var _14c8=_14c2[_14c6]; if(typeof _14c8=="undefined"||_14c8==null){ continue; } if(_14c7===null||_14c7===""){ _14c7=_14c8.getLabel(); } _14c3+=""; } if(_14c3.length>0){ return ""+_14c3+""; } return null; }; function CImageMapHighlight(map,_14ca){ this.m_webContentRoot=_14ca; this.createHighlight=CImageMapHighlight.prototype.createHighlightElement; this.initialize(map); }; CImageMapHighlight.prototype.initialize=function(map){ this.m_map=map; this.m_areas={}; this.m_areaNodes={}; this.m_visibleAreas=[]; this.initImageBlank(); this.m_divCanvas=null; this.m_creationNode=null; this._setMapAreasId(); this.m_sDefaultFillColour="#F7E1BC"; this.m_sDefaultStrokeColour="#F0A630"; this.m_sFillColour=this.m_sDefaultFillColour; this.m_sStrokeColour=this.m_sDefaultStrokeColour; }; CImageMapHighlight.prototype.setFillColour=function(_14cc){ this.m_sFillColour=(!_14cc)?this.m_sDefaultFillColour:_14cc; }; CImageMapHighlight.prototype.getFillColour=function(){ return this.m_sFillColour; }; CImageMapHighlight.prototype.setStrokeColour=function(_14cd){ this.m_sStrokeColour=(!_14cd)?this.m_sDefaultStrokeColour:_14cd; }; CImageMapHighlight.prototype.getStrokeColour=function(){ return this.m_sStrokeColour; }; CImageMapHighlight.prototype.resetColours=function(){ this.m_sStrokeColour=this.m_sDefaultStrokeColour; this.m_sFillColour=this.m_sDefaultFillColour; }; CImageMapHighlight.prototype.initImageBlank=function(){ var img=this._getChartImageFromMap(); if(img===null){ return; } this.m_img=img; this.m_sImageHeight=img.offsetHeight+"px"; this.m_sImageWidth=img.offsetWidth+"px"; this.m_sUseMap=img.getAttribute("usemap"); this.m_imgLid=img.getAttribute("lid"); this.m_imgBlank=img.ownerDocument.createElement("IMG"); this.m_imgBlank.src=this.m_webContentRoot+"/rv/images/blank.gif"; this.m_imgBlank.style.height=this.m_sImageHeight; this.m_imgBlank.style.width=this.m_sImageWidth; this.m_imgBlank.style.position="absolute"; this.m_imgBlank.border="0"; this.m_imgBlank.useMap=this.m_sUseMap; this.m_imgBlank.setAttribute("lid",this.m_imgLid); this.m_imgBlank.setAttribute("rsvpchart",img.getAttribute("rsvpchart")); this.m_imgBlank.alt=img.alt; if(this.m_bShowPointer){ this.m_imgBlank.style.cursor="auto"; } this.m_imgBlank.v_bIsBlankImageMapImg=true; img.parentNode.insertBefore(this.m_imgBlank,img); this.f_copyStyle(img,this.m_imgBlank); this.m_imgBlank.style.borderColor="transparent"; }; CImageMapHighlight.prototype._getChartImageFromMap=function(){ var map=this.m_map; var _14d0=null; var _14d1=null; var _14d2=map.nextSibling; while(_14d2){ if(_14d2.tagName=="DIV"){ var _14d3=_14d2.firstChild; while(_14d3){ if((_14d3.tagName=="SPAN"||_14d3.tagName=="DIV")&&_14d3.getAttribute("chartcontainer")=="true"){ _14d1=_14d3; break; } _14d3=_14d3.nextSibling; } } if(_14d1){ break; } _14d2=_14d2.nextSibling; } if(_14d1){ var _14d4=_14d1.children; var _14d5=_14d4.length; for(var i=0;i<_14d5;i++){ var el=_14d4[i]; if(el.tagName=="IMG"&&el.getAttribute("rsvpchart")=="true"&&el.getAttribute("usemap")=="#"+map.name){ _14d0=el; break; } } } return _14d0; }; CImageMapHighlight.prototype._AREA_ID="aid"; CImageMapHighlight.prototype._setMapAreasId=function(){ var _14d8=this.m_map.getAttribute("lid")+"_"; var areas=this.m_map.childNodes; var _14da=areas.length; for(var i=0;i<_14da;i++){ var a=areas[i]; var id=_14d8+i; a.setAttribute(this._AREA_ID,id); this.m_areaNodes[id]=a; } }; CImageMapHighlight.prototype.isAreaInitialized=function(area){ return (area.getAttribute(this._AREA_ID)===null?false:true); }; CImageMapHighlight.prototype.getAreaId=function(area){ var _14e0=area.getAttribute(this._AREA_ID); if(_14e0===null){ this.initialize(area.parentNode); _14e0=area.getAttribute(this._AREA_ID); } return _14e0+this.getFillColour(); }; CImageMapHighlight.prototype.getAreaFromId=function(_14e1){ return this.m_areaNodes[_14e1]; }; CImageMapHighlight.prototype.highlightArea=function(area,_14e3){ var _14e4=this.getAreaId(area); if(!_14e3){ var _14e5=this.m_visibleAreas; var _14e6=_14e5.length; for(var i=0;i<_14e6;i++){ if(_14e4!=_14e5[i]){ this.hideAreaById(_14e5[i]); } } this.m_visibleAreas=[]; } this._highlightArea(area); }; CImageMapHighlight.prototype.highlightAreas=function(areas,_14e9){ if(!_14e9){ this.hideAllAreas(); } this._highlightAreas(areas); }; CImageMapHighlight.prototype._highlightAreas=function(areas){ var _14eb=areas.length; for(var i=0;i<_14eb;i++){ this._highlightArea(areas[i]); } }; CImageMapHighlight.prototype._highlightArea=function(area){ var _14ee=this.getAreaId(area); if(!this.highlightAreaExists(_14ee)){ var _14ef=this.createHighlight(area); if(_14ef){ this.m_areas[_14ee]=_14ef; _14ef.style.visibility="visible"; area.setAttribute("highlighted","true"); } }else{ if(this.m_areas[_14ee].style.visibility=="hidden"){ this.m_areas[_14ee].style.visibility="visible"; area.setAttribute("highlighted","true"); } } this.m_visibleAreas.push(_14ee); }; CImageMapHighlight.prototype.highlightAreaExists=function(_14f0){ return this.m_areas[_14f0]?true:false; }; CImageMapHighlight.prototype.hideAreaById=function(_14f1){ if(this.m_areas[_14f1]&&this.m_areas[_14f1].style.visibility){ this.m_areas[_14f1].style.visibility="hidden"; } }; CImageMapHighlight.prototype.hideAreas=function(areas){ var _14f3=areas.length; for(var i=0;i<_14f3;i++){ this.hideArea(areas[i]); } }; CImageMapHighlight.prototype.hideArea=function(area){ this.hideAreaById(this.getAreaId(area)); area.setAttribute("highlighted","false"); }; CImageMapHighlight.prototype.hideAllAreas=function(){ var _14f6=this.m_visibleAreas; var _14f7=_14f6.length; for(var i=0;i<_14f7;i++){ this.hideAreaById(_14f6[i]); var _14f9=this.getAreaFromId(_14f6[i]); if(_14f9){ _14f9.setAttribute("highlighted","false"); } } this.m_visibleAreas=[]; }; CImageMapHighlight.prototype.isAreaHighlighted=function(area){ var _14fb=this.getAreaId(area); return this.m_areas[_14fb]&&this.m_areas[_14fb].style.visibility=="visible"; }; CImageMapHighlight.prototype.removeAreaHighlights=function(areas){ }; CImageMapHighlight.prototype.removeAllAreaHighlights=function(){ }; CImageMapHighlight.prototype.destroy=function(area){ this.removeAllAreaHighlights(); }; CImageMapHighlight.prototype.createHighlightElement=function(_14fe,_14ff){ var doc=_14fe.ownerDocument; if(!this.m_divCanvas){ for(var _1501=this.m_img.parentNode;_1501;_1501=_1501.parentNode){ if((_1501.nodeName=="DIV")&&(_1501.getAttribute("sSpecName")=="block")){ var _1502=doc.defaultView.getComputedStyle(_1501,null); var _1503=_1502.overflow; if((_1503=="auto")||(_1503=="scroll")&&(_1502.position!="relative")){ _1501.style.position="relative"; } } } this.m_divCanvas=doc.createElementNS("http://www.w3.org/2000/svg","svg"); this.m_divCanvas.style.height=this.m_sImageHeight; this.m_divCanvas.style.width=this.m_sImageWidth; this.m_divCanvas.style.position="absolute"; this.m_img.parentNode.insertBefore(this.m_divCanvas,this.m_imgBlank); this.f_copyStyle(this.m_imgBlank,this.m_divCanvas); this.m_divCanvas.style.display=this.m_bHiddenCanvas?"none":"block"; } var _1504=doc.createElementNS("http://www.w3.org/2000/svg","polyline"); var _1505=_14fe.getAttribute("coords"); _1504.setAttribute("points",_14fe.getAttribute("coords")+" "+_1505.substr(0,_1505.indexOf(",",_1505.indexOf(",")+1))); _1504.style.position="absolute"; _1504.style.top="0px"; _1504.style.left="0px"; _1504.style.visibility="hidden"; _1504.setAttribute("stroke",_14ff?"#F7CB83":this.getStrokeColour()); _1504.setAttribute("stroke-width",(_14fe.getAttribute("type")=="legendLabel")?"1pt":"1.75pt"); _1504.setAttribute("fill",_14ff?"#F7E1BC":this.getFillColour()); _1504.setAttribute("fill-opacity","0.4"); this.m_divCanvas.appendChild(_1504); return _1504; }; CImageMapHighlight.prototype.f_copyStyle=function(_1506,_1507){ var a=["margin","marginTop","marginRight","marginBottom","marginLeft","border","borderTop","borderRight","borderBottom","borderLeft"]; var _1509=a.length; for(var i=0;i<_1509;i++){ var _150b=a[i]; var _150c=_1506.style[_150b]; if(_150c){ _1507.style[_150b]=_150c; } } }; function CSelectionXml(_150d,_150e,_150f){ this.queries={}; this.burstContext=_150d||""; this.expressionLocale=_150e||""; this.contentLocale=_150f||""; }; 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 _1511=sc.getAllSelectedObjects(); for(var s=0;s<_1511.length;++s){ var _1513=_1511[s]; var _1514=_1513.getSelectedContextIds(); var muns=_1513.getMuns(); var _1516=muns.length; var _1517=new SC_SingleSelection(); _1517.layoutElementId=_1513.getLayoutElementId(); var _1518=null; for(var i=0;i<_1516;++i){ var j,ctxId,_151c; if(i===0&&_1516===1){ for(j=0;j0){ var _156f=this.CanModifyWatchRule(); for(var sub=0;sub0){ _1577.add(gMenuSeperator); } if(!this.m_bAllowAnnotations||!this.m_bCanCreateAnnotations){ menu.disable(); } var _157a; var bidi=isViewerBidiEnabled()?BidiUtils.getInstance():null; for(var i=0;i<_1579;i++){ var _157d=this.m_annotations[i].defaultName; _157a=_157d.length>60?_157d.substring(0,60)+"...":_157d; if(isViewerBidiEnabled()){ _157a=bidi.btdInjectUCCIntoStr(_157a,getViewerBaseTextDirection()); } var _157e=Boolean(this.m_annotations[i].permissions.read); var _157f=Boolean(this.m_annotations[i].permissions.write); var _1580=Boolean(this.m_annotations[i].permissions.traverse)&&Boolean(this.m_annotations[i].permissions.write); var _1581="javascript:"+this.m_cv.getObjectId()+".getSubscriptionManager().ViewAnnotation("+i+");"; var _1582="javascript:alert('Permission denied')"; _1581=_157e?_1581:_1582; if(i>0&&this.m_annotations[i].layoutElementId!=this.m_annotations[i-1].layoutElementId){ _1577.add(gMenuSeperator); } var _1583="/rv/images/action_comment.gif"; if(this.m_annotations[i].layoutElementId!=""){ _1583="/rv/images/action_subscribe.gif"; } menu=new CMenuItem(_1577,_157a,_1581,_1575+_1583,gMenuItemStyle,_1575,sSkin); var _1584=menu.createCascadedMenu(gMenuStyle); var _1585=new CInfoPanel("300px",_1575,_1584.getId()+"_comments"); _1585.setParent(_1584); _157d=this.m_annotations[i].defaultName; var _1586=_157d.length>60?_157d.substring(0,60)+"...":_157d; if(isViewerBidiEnabled()){ _1586=bidi.btdInjectUCCIntoStr(_1586,getViewerBaseTextDirection()); } _1585.addProperty(RV_RES.RV_VIEW_COMMENT_NAME,html_encode(_1586)); _1585.addSpacer(4); var cmnt=this.m_annotations[i].description; var _1588=cmnt.length>590?cmnt.substring(0,590)+"...":cmnt; if(isViewerBidiEnabled()){ _1588=bidi.btdInjectUCCIntoStr(_1588,getViewerBaseTextDirection()); } _1585.addProperty(RV_RES.RV_VIEW_COMMENT_CONTENTS,replaceNewLine(html_encode(_1588))); _1585.addSpacer(4); var _1589=this.m_annotations[i].modificationTime; if(isViewerBidiEnabled()){ _1589=bidi.btdInjectUCCIntoStr(_1589,getViewerBaseTextDirection()); } _1585.addProperty(RV_RES.RV_VIEW_COMMENT_MODTIME,_1589); var _158a=this.m_annotations[i].owner.defaultName; if(isViewerBidiEnabled()){ _158a=bidi.btdInjectUCCIntoStr(_158a,getViewerBaseTextDirection()); } _1585.addProperty(RV_RES.RV_VIEW_COMMENT_OWNER,_158a); _1584.add(_1585); if(_157f||_1580){ _1584.add(gMenuSeperator); } new CMenuItem(_1584,RV_RES.RV_VIEW_COMMENT,this.m_cv.getObjectId()+".getSubscriptionManager().ViewAnnotation("+i+");",_1575+"/rv/images/action_comment_view.gif",gMenuItemStyle,_1575,sSkin); if(_157f){ new CMenuItem(_1584,RV_RES.RV_MODIFY_WATCH_RULE,this.m_cv.getObjectId()+".getSubscriptionManager().ModifyAnnotation("+i+");",_1575+"/rv/images/action_comment_modify.gif",gMenuItemStyle,_1575,sSkin); } if(_1580){ new CMenuItem(_1584,RV_RES.RV_DELETE_WATCH_RULE,this.m_cv.getObjectId()+".getSubscriptionManager().DeleteAnnotation("+i+");",_1575+"/rv/images/action_comment_delete.gif",gMenuItemStyle,_1575,sSkin); } } _1577.setForceCallback(false); _1577.draw(); if(_1577.isVisible()){ _1577.show(); } _1577.setForceCallback(true); }; CSubscriptionManager.prototype.AddNotification=function(){ alert(this.m_sAlertNewVersionConfirm); var oCV=this.getViewer(); var _158c=new DataDispatcherEntry(oCV); _158c.setKey("subscriptionManager"); _158c.addFormField("ui.action","addNotification"); _158c.addFormField("cv.responseFormat","data"); this.addCommonFormFields(_158c); oCV.dispatchRequest(_158c); }; CSubscriptionManager.prototype.DeleteNotification=function(){ alert(RV_RES.RV_DO_NOT_ALERT_NEW_VERSION_CONFIRM); var oCV=this.getViewer(); var _158e=new DataDispatcherEntry(oCV); _158e.setKey("subscriptionManager"); _158e.addFormField("ui.action","deleteNotification"); _158e.addFormField("cv.responseFormat","data"); this.addCommonFormFields(_158e); oCV.dispatchRequest(_158e); }; CSubscriptionManager.prototype.NewAnnotation=function(){ var oFWR=document.forms["formWarpRequest"+this.m_cv.getId()]; var _1590=oFWR["ui.object"].value; var form=GUtil.createHiddenForm("subscriptionForm","post",this.m_cv.getId(),CSubscriptionManager.k_SubscriptionWizardName); GUtil.createFormField(form,"ui.object",_1590); 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 sPath=this.m_cv.getWebContentRoot()+"/rv/blankSubscriptionWin.html?cv.id="+this.m_cv.getId(); window.open(sPath,form.target,this.m_windowOptions); }; CSubscriptionManager.prototype.ViewAnnotation=function(idx){ var sub=this.m_annotations[idx]; var _1595=sub.searchPath; var form=GUtil.createHiddenForm("subscriptionForm","post",this.m_cv.getId(),CSubscriptionManager.k_SubscriptionWizardName); GUtil.createFormField(form,"ui.object",_1595); GUtil.createFormField(form,"b_action","xts.run"); GUtil.createFormField(form,"m","rv/annotation1.xts"); GUtil.createFormField(form,"backURL","javascript:window.close();"); var sPath=this.m_cv.getWebContentRoot()+"/rv/blankSubscriptionWin.html?cv.id="+this.m_cv.getId(); window.open(sPath,form.target,this.m_windowOptions); }; CSubscriptionManager.prototype.ModifyAnnotation=function(idx){ var sub=this.m_annotations[idx]; var _159a=this.m_annotations[idx].searchPath; if(sub&&_159a){ var form=GUtil.createHiddenForm("subscriptionForm","post",this.m_cv.getId(),CSubscriptionManager.k_SubscriptionWizardName); GUtil.createFormField(form,"ui.object",_159a); 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 sPath=this.m_cv.getWebContentRoot()+"/rv/blankSubscriptionWin.html?cv.id="+this.m_cv.getId(); window.open(sPath,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 _15a0=new DataDispatcherEntry(oCV); _15a0.setKey("subscriptionManager"); _15a0.addFormField("ui.action","deleteAnnotation"); _15a0.addFormField("cv.responseFormat","data"); this.addCommonFormFields(_15a0,sub.searchPath); oCV.dispatchRequest(_15a0); } }; CSubscriptionManager.prototype.NewSubscription=function(){ var sc=this.m_cv.getSelectionController(); var oFWR=document.forms["formWarpRequest"+this.m_cv.getId()]; var _15a3=oFWR.reRunObj.value; if(_15a3&&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 _15a6=new CSelectionXml(fWR["ui.burstID"].value,fWR["ui.contentLocale"].value,fWR["ui.outputLocale"].value); _15a6.BuildSelectionFromController(sc); GUtil.createFormField(form,"rv.selectionSpecXML",_15a6.toXml()); GUtil.createFormField(form,"rv.periodicalProducer",_15a3); GUtil.createFormField(form,"b_action","xts.run"); GUtil.createFormField(form,"m","subscribe/conditional_subscribe1.xts"); GUtil.createFormField(form,"backURL","javascript:window.close();"); var sPath=this.m_cv.getWebContentRoot()+"/rv/blankSubscriptionWin.html?cv.id="+this.m_cv.getId(); window.open(sPath,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 _15ab=new DataDispatcherEntry(oCV); _15ab.setKey("subscriptionManager"); _15ab.addFormField("ui.action","deleteSubscription"); _15ab.addFormField("cv.responseFormat","data"); this.addCommonFormFields(_15ab,sub.searchPath); oCV.dispatchRequest(_15ab); } }; 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 sPath=this.m_cv.getWebContentRoot()+"/rv/blankSubscriptionWin.html?cv.id="+this.m_cv.getId(); window.open(sPath,form.target,"toolbar,location,status,menubar,resizable,scrollbars=1"); } }; CSubscriptionManager.prototype.OpenSubscriptionMenu=function(){ var oCV=this.getViewer(); var _15b1=new JSONDispatcherEntry(oCV); _15b1.setKey("subscriptionManager"); _15b1.addFormField("ui.action","getSubscriptionInfo"); _15b1.addFormField("cv.responseFormat","subscriptionManager"); this.addCommonFormFields(_15b1); _15b1.setCallbacks({"complete":{"object":this,"method":this.OpenSubscriptionMenuResponse}}); oCV.dispatchRequest(_15b1); }; CSubscriptionManager.prototype.OpenAnnotationMenu=function(){ var oCV=this.getViewer(); var _15b3=new JSONDispatcherEntry(oCV); _15b3.setKey("subscriptionManager"); _15b3.addFormField("ui.action","getAnnotationInfo"); _15b3.addFormField("cv.responseFormat","getAnnotations"); var _15b4=oCV.envParams["ui.object"]; this.addCommonFormFields(_15b3,_15b4?_15b4:""); _15b3.setCallbacks({"complete":{"object":this,"method":this.OpenAnnotationMenuResponse}}); oCV.dispatchRequest(_15b3); }; CSubscriptionManager.prototype.OpenAnnotationMenuResponse=function(_15b5){ if(this.Initialize(_15b5)){ this.UpdateAnnotationMenu(); }else{ this.ClearAnnotationMenu(); } }; CSubscriptionManager.prototype.OpenSubscriptionMenuResponse=function(_15b6){ if(this.Initialize(_15b6)){ this.UpdateSubscribeMenu(); }else{ this.AddEmptySubscriptionMenuItem(); } }; CSubscriptionManager.prototype.addCommonFormFields=function(_15b7,_15b8){ if(_15b8&&_15b8!=""){ _15b7.addFormField("ui.object",_15b8); }else{ var _15b9=document["formWarpRequest"+this.getViewer().getId()]; if(_15b9&&_15b9["reRunObj"]){ _15b7.addFormField("ui.object",_15b9["reRunObj"].value); } } if(_15b7.getFormField("ui.action")=="getSubscriptionInfo"){ _15b7.addFormField("initialized",this.m_bInitialized?"true":"false"); } _15b7.addFormField("cv.id",this.getViewer().getId()); }; CSubscriptionManager.prototype.AddEmptySubscriptionMenuItem=function(){ var _15ba=this.getStandaloneViewerToolbarControl(); if(_15ba){ var _15bb=_15ba.getItem("watchNewVersions"); if(_15bb){ _15bb.getMenu().clear(); } var _15bc=this.m_cv.getWebContentRoot(); var sSkin=this.m_cv.getSkin(); var _15be=_15bb.getMenu(); var _15bf=new CMenuItem(_15be,RV_RES.RV_NO_WATCH_RULES,"","",gMenuItemStyle,_15bc,sSkin); _15bf.disable(); _15be.setForceCallback(false); _15be.draw(); if(_15be.isVisible()){ _15be.show(); } _15be.setForceCallback(true); } }; CSubscriptionManager.prototype.ClearSubscriptionMenu=function(){ var _15c0=this.getStandaloneViewerToolbarControl(); if(_15c0){ var _15c1=_15c0.getItem("watchNewVersions"); if(_15c1){ _15c1.getMenu().clear(); } } }; CSubscriptionManager.prototype.ClearAnnotationMenu=function(){ var _15c2=this.getStandaloneViewerToolbarControl(); if(_15c2){ var _15c3=_15c2.getItem("addAnnotations"); if(_15c3){ _15c3.getMenu().clear(); } } }; CSubscriptionManager.prototype.ClearContextAnnotationMenu=function(){ var _15c4=this.getStandaloneViewerContextMenu(); if(_15c4){ var _15c5=_15c4.getFindCommentMenuItem(); if(_15c5){ _15c5.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; } }; function CSelectionMetadata(){ this.m_sContextId=""; this.m_sDataItem=""; this.m_sMetadataModelItem=""; this.m_sUseValue=""; this.m_sUseValueType=""; this.m_sType=null; this.m_sDisplayValue=""; this.m_sUsage=null; this.m_refQuery=null; this.m_sHun=null; this.m_sDun=null; }; CSelectionMetadata.prototype.setContextId=function(_15c6){ this.m_sContextId=_15c6; }; CSelectionMetadata.prototype.getContextId=function(){ return this.m_sContextId; }; CSelectionMetadata.prototype.setRefQuery=function(_15c7){ this.m_refQuery=_15c7; }; CSelectionMetadata.prototype.getRefQuery=function(){ return this.m_refQuery; }; CSelectionMetadata.prototype.setDataItem=function(_15c8){ this.m_sDataItem=_15c8; }; CSelectionMetadata.prototype.getDataItem=function(){ return this.m_sDataItem; }; CSelectionMetadata.prototype.setMetadataModelItem=function(_15c9){ this.m_sMetadataModelItem=_15c9; }; CSelectionMetadata.prototype.getMetadataModelItem=function(){ return this.m_sMetadataModelItem; }; CSelectionMetadata.prototype.setUseValue=function(_15ca){ this.m_sUseValue=_15ca; }; CSelectionMetadata.prototype.getUseValue=function(){ return this.m_sUseValue; }; CSelectionMetadata.prototype.setUseValueType=function(_15cb){ this.m_sUseValueType=_15cb; }; CSelectionMetadata.prototype.setType=function(sType){ this.m_sType=sType; }; CSelectionMetadata.prototype.getType=function(){ var sType=null; switch(this.m_sUseValueType){ case 25: case 27: case 30: case 32: sType="memberUniqueName"; break; case 26: sType="memberCaption"; break; case 1: case 55: case 56: sType="string"; break; case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11: case 12: case 16: case 17: case 18: case 19: case 20: case 22: case 21: case 23: case 24: case 54: sType=parseInt(this.m_sUseValueType,10); break; } return sType; }; CSelectionMetadata.prototype.getUseValueType=function(){ if(this.m_sType==null){ this.m_sType=this.getType(); } return this.m_sType; }; CSelectionMetadata.prototype.setDisplayValue=function(_15ce){ this.m_sDisplayValue=_15ce; }; CSelectionMetadata.prototype.getDisplayValue=function(){ return this.m_sDisplayValue; }; CSelectionMetadata.prototype.setUsage=function(_15cf){ this.m_sUsage=_15cf; }; CSelectionMetadata.prototype.getUsage=function(){ if(this.m_sUsage=="2"){ return "measure"; }else{ return "nonMeasure"; } }; CSelectionMetadata.prototype.setHun=function(sHun){ this.m_sHun=sHun; }; CSelectionMetadata.prototype.getHun=function(){ return this.m_sHun; }; CSelectionMetadata.prototype.setDun=function(sDun){ this.m_sDun=sDun; }; CSelectionMetadata.prototype.getDun=function(){ return this.m_sDun; }; function CSelectionMetadataIterator(_15d2,_15d3){ this.m_axisIndex=_15d3; this.m_index=0; this.m_selectionObject=_15d2; }; CSelectionMetadataIterator.prototype.getSelectionAxis=function(){ var _15d4=null; if(typeof this.m_selectionObject=="object"&&this.m_axisIndex0){ for(var index=0;index<_15df.length;++index){ var _15e1=_15df[index]; var _15e2=_15e1.getSelectedContextIds(); var _15e3=[]; for(var item=0;item<_15e2.length;++item){ var _15e5=_15e2[item].join(":"); _15e3.push(_15e5); } _15de.push(_15e3.join("::")); } } return _15de; }; function getViewerSelectionContext(_15e6,_15e7,_15e8){ var _15e9=_15e8==true?_15e6.getAllSelectedObjectsWithUniqueCTXIDs():_15e6.getAllSelectedObjects(); if(_15e9!=null&&_15e9.length>0){ for(var index=0;index<_15e9.length;++index){ var _15eb={}; var _15ec=new CAxisSelectionIterator(_15e9[index]); if(_15ec.hasNext()){ var _15ed=_15ec.next(); if(_15ed.hasNext()){ var _15ee=_15ed.next(); var _15ef=_15ee.getContextId(); _15eb[_15ef]=true; var _15f0=_15e7.addSelectedCell(_15ee.getDataItem(),_15ee.getMetadataModelItem(),_15ee.getUseValue(),_15ee.getUseValueType(),_15ee.getDisplayValue(),_15ee.getUsage(),{"queryName":_15ee.getRefQuery()}); if(_15ee.getHun()!=null){ _15f0.addProperty("HierarchyUniqueName",_15ee.getHun()); } if(_15ee.getDun()!=null){ _15f0.addProperty("DimensionUniqueName",_15ee.getDun()); } while(_15ed.hasNext()){ _15ee=_15ed.next(); _15ef=_15ee.getContextId(); if(typeof _15eb[_15ef]=="undefined"||_15ef===""){ _15eb[_15ef]=true; var _15f1=_15f0.addDefiningCell(_15ee.getDataItem(),_15ee.getMetadataModelItem(),_15ee.getUseValue(),_15ee.getUseValueType(),_15ee.getDisplayValue(),_15ee.getUsage(),{"queryName":_15ee.getRefQuery()}); if(_15ee.getHun()!=null){ _15f1.addProperty("HierarchyUniqueName",_15ee.getHun()); } if(_15ee.getDun()!=null){ _15f1.addProperty("DimensionUniqueName",_15ee.getDun()); } } } while(_15ec.hasNext()){ _15ed=_15ec.next(); var _15f2=_15f0; while(_15ed.hasNext()){ _15ee=_15ed.next(); _15ef=_15ee.getContextId(); if(typeof _15eb[_15ef]=="undefined"||_15ef===""){ _15eb[_15ef]=true; _15f2=_15f2.addDefiningCell(_15ee.getDataItem(),_15ee.getMetadataModelItem(),_15ee.getUseValue(),_15ee.getUseValueType(),_15ee.getDisplayValue(),_15ee.getUsage(),{"queryName":_15ee.getRefQuery()}); if(_15ee.getHun()!=null){ _15f2.addProperty("HierarchyUniqueName",_15ee.getHun()); } if(_15ee.getDun()!=null){ _15f2.addProperty("DimensionUniqueName",_15ee.getDun()); } } } } } } } } var _15f3=_15e7.toString(); if(window.gViewerLogger){ window.gViewerLogger.log("Selection context",_15f3,"xml"); } return _15f3; }; dojo.provide("bux.dialogs.CalculationDialog"); dojo.require("bux.dialogs.BaseCustomContentDialog"); dojo.require("bux.layout.TableContainer"); dojo.require("dijit.form.NumberTextBox"); dojo.require("dijit.form.Button"); dojo.declare("viewer.dialogs.CalculationDialog",bux.dialogs.BaseCustomContentDialog,{sTitle:null,sLabel:null,sDescription:null,sContentLocale:null,okHandler:null,cancelHandler:null,startup:function(){ this.updateTitle(this.sTitle); this.inherited(arguments); var _15f4=new bux.layout.TableContainer({classname:"bux-InformationDialog"},this.contentContainer); var cell=null,row=null; if(this.sDescription){ row=new bux.layout.TableContainerRow({parentContainer:_15f4}); cell=new bux.layout.TableContainerCell({classname:"bux-dialog-info",parentContainer:row}); cell.addContent(document.createTextNode(this.sDescription)); dijit.setWaiState(this._buxBaseDialog.domNode,"describedBy",cell.id); } row=new bux.layout.TableContainerRow({parentContainer:_15f4}); cell=new bux.layout.TableContainerCell({classname:"bux-dialog-label",parentContainer:row}); this._calculationField=new dijit.form.NumberTextBox({required:true,onBlur:function(){ if(!this._cancelled&&!this.isValid()){ this.focus(); } },_setOKBtnDisabled:function(_15f7,_15f8){ if(_15f7&&_15f7[0]&&_15f7[0].label===RV_RES.IDS_JS_OK){ _15f7[0].set("disabled",_15f8); } },isValid:function(){ var _15f9=this.validator(this.get("displayedValue"),this.get("constraints")); this._setOKBtnDisabled(this.oDlgBtns,!_15f9); return _15f9; }}); if(this.sContentLocale!=null){ dojo.requireLocalization("dojo.cldr","number",this.sContentLocale); this._calculationField.constraints={locale:this.sContentLocale}; } var _15fa=document.createElement("label"); _15fa.appendChild(document.createTextNode(this.sLabel)); _15fa.setAttribute("for",this._calculationField.id); cell.addContent(_15fa); row=new bux.layout.TableContainerRow({parentContainer:_15f4}); cell=new bux.layout.TableContainerCell({classname:"bux-dialog-field",parentContainer:row}); cell.addContent(this._calculationField.domNode); this._calculationField.oDlgBtns=this._buxBaseDialog._aButtonObjects; },onOK:function(){ if(this._calculationField.state!="Error"){ this.inherited(arguments); this.okHandler(this._calculationField.get("value")); this.hide(); } },onCancel:function(){ this._calculationField._cancelled=true; this.inherited(arguments); }}); dojo.provide("bux.dialogs.ConfirmationDialog"); viewer.dialogs.ConfirmationDialog=function(_15fb,_15fc,_15fd,_15fe,_15ff,_1600){ dojo["require"]("bux.dialogs.InformationDialog"); var _1601=new bux.dialogs.Confirm(_15fb,_15fc,_15fd,dojo.hitch(_15ff,_1600,_15ff),_15fe); return _1601; }; dojo.provide("bux.dialogs.SelectSnapshot"); dojo.require("bux.dialogs.BaseCustomContentDialog"); dojo.require("bux.layout.TableContainer"); dojo.require("dijit.form.NumberTextBox"); dojo.require("dijit.form.Button"); dojo.declare("viewer.dialogs.SelectSnapshot",bux.dialogs.BaseCustomContentDialog,{sTitle:null,sLabel:null,okHandler:null,cancelHandler:null,startup:function(){ this.updateTitle(this.sTitle); this.inherited(arguments); var _1602=new bux.layout.TableContainer({classname:"bux-InformationDialog"},this.contentContainer); var row=new bux.layout.TableContainerRow({parentContainer:_1602}); var cell=new bux.layout.TableContainerCell({classname:"bux-dialog-label",parentContainer:row}); this.createSnapshotsControl(); var _1605=document.createElement("label"); _1605.appendChild(document.createTextNode(this.sLabel)); _1605.setAttribute("for",this._snapshots.id); cell.addContent(_1605); row=new bux.layout.TableContainerRow({parentContainer:_1602}); cell=new bux.layout.TableContainerCell({classname:"bux-dialog-field",parentContainer:row}); cell.addContent(this._snapshots); },onOK:function(){ this.inherited(arguments); var _1606=this._snapshots.selectedIndex; var _1607=this._snapshots.options[_1606]; this.okHandler(_1607.getAttribute("storeID"),_1607.value); this.hide(); },createSnapshotsControl:function(){ this._snapshots=document.createElement("select"); this._snapshots.id=this.dialogId+"snapshots"; this._snapshots.setAttribute("size","8"); this._snapshots.setAttribute("name",this.dialogId+"snapshots"); var _1608=XMLHelper_FindChildByTagName(this.cmResponse,"result",true); var _1609=XMLHelper_FindChildrenByTagName(_1608,"item",false); for(var _160a=0;_160a<_1609.length;_160a++){ var _160b=_1609[_160a]; var _160c=XMLHelper_GetText(XMLHelper_FindChildByTagName(_160b,"creationTime_localized",true)); var _160d=XMLHelper_FindChildByTagName(_160b,"storeID",true); var _160e=XMLHelper_GetText(XMLHelper_FindChildByTagName(_160d,"value",true)); var _160f=XMLHelper_FindChildByTagName(_160b,"creationTime",true); var _1610=XMLHelper_GetText(XMLHelper_FindChildByTagName(_160f,"value",true)); this._snapshots.options[_160a]=new Option(_160c,_1610); this._snapshots.options[_160a].setAttribute("storeID",_160e); if(this.currentSnapshotCreationTime==_1610){ this._snapshots.options[_160a].selected=true; } } }}); function CognosViewerAction(){ this.m_oCV=null; }; CognosViewerAction.prototype.setRequestParms=function(parms){ }; 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(_1617){ return _1617; }; CognosViewerAction.prototype.addAdditionalOptions=function(_1618){ }; 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 _161a=""; if(this.m_oCV!=null){ if(typeof this.m_oCV.envParams["reportpart_id"]!="undefined"){ _161a=this.m_oCV.envParams["reportpart_id"]; }else{ if(typeof this.m_oCV.envParams["ui.name"]!="undefined"){ _161a=this.m_oCV.envParams["ui.name"]; } } } return _161a; }; CognosViewerAction.prototype.getContainerId=function(_161b){ var _161c=""; if(_161b&&_161b.getAllSelectedObjects){ var _161d=_161b.getAllSelectedObjects(); if(_161d){ var _161e=_161d[0]; if(_161e&&_161e.getLayoutElementId){ _161c=this.removeNamespace(_161e.getLayoutElementId()); } } } return _161c; }; CognosViewerAction.prototype.removeNamespace=function(value){ var _1620=value; try{ if(value!=""){ var _1621=value.indexOf(this.m_oCV.getId()); if(_1621!=-1){ value=value.replace(this.m_oCV.getId(),""); } } return value; } catch(e){ return _1620; } }; 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 _1622=-1; if(this.m_oCV!=null&&this.m_oCV.getSelectionController()!=null){ _1622=this.m_oCV.getSelectionController().getSelections().length; } return _1622; }; CognosViewerAction.prototype.buildDynamicMenuItem=function(_1623,_1624){ _1623.action={name:"LoadMenu",payload:{action:_1624}}; _1623.items=[{"name":"loading","label":RV_RES.GOTO_LOADING,iconClass:"loading"}]; return _1623; }; CognosViewerAction.prototype.createCognosViewerDispatcherEntry=function(_1625){ var oReq=new ViewerDispatcherEntry(this.getCognosViewer()); oReq.addFormField("ui.action",_1625); this.preProcess(); if(this.doAddActionContext()===true){ var _1627=this.addActionContext(); oReq.addFormField("cv.actionContext",_1627); if(window.gViewerLogger){ window.gViewerLogger.log("Action context",_1627,"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 _1628=this.getCognosViewer().getViewerWidget(); if(_1628){ var _1629={"modified":true}; _1628.fireEvent("com.ibm.bux.widget.modified",null,_1629); } } catch(e){ } }; CognosViewerAction.prototype.showCustomCursor=function(evt,id,_162c){ var _162d=document.getElementById(id); if(_162d==null){ _162d=document.createElement("span"); _162d.className="customCursor"; _162d.setAttribute("id",id); document.body.appendChild(_162d); } var _162e=""; _162d.innerHTML=_162e; _162d.style.position="absolute"; _162d.style.left=(evt.clientX+15)+"px"; _162d.style.top=(evt.clientY+15)+"px"; _162d.style.display="inline"; }; CognosViewerAction.prototype.hideCustomCursor=function(id){ var _1630=document.getElementById(id); if(_1630!=null){ _1630.style.display="none"; } }; CognosViewerAction.prototype.selectionHasContext=function(){ var _1631=this.getCognosViewer().getSelectionController().getAllSelectedObjects(); var _1632=false; if(_1631!=null&&_1631.length>0){ for(var i=0;i<_1631.length;i++){ if(_1631[i].hasContextInformation()){ _1632=true; break; } } } return _1632; }; CognosViewerAction.prototype.isInteractiveDataContainer=function(_1634){ var _1635=false; if(typeof _1634!="undefined"&&_1634!=null){ var id=_1634.toLowerCase(); _1635=id=="crosstab"||id=="list"||this.getCognosViewer().getRAPReportInfo().isChart(id); } return _1635; }; CognosViewerAction.prototype.getSelectedContainerId=function(){ var _1637=this.getCognosViewer(); var _1638=_1637.getSelectionController(); var _1639=null; if(_1638!=null&&typeof _1638!="undefined"){ _1639=this.getContainerId(_1638); } return _1639; }; CognosViewerAction.prototype.getSelectedReportInfo=function(){ var _163a=this.getCognosViewer(); var _163b=this.getSelectedContainerId(); var _163c=this.getReportInfo(_163b); if(_163c==null){ var _163d=_163a.getRAPReportInfo(); if(_163d.getContainerCount()==1){ _163c=_163d.getContainerFromPos(0); } } return _163c; }; CognosViewerAction.prototype.getReportInfo=function(_163e){ var _163f=null; if(_163e!=null&&_163e.length>0){ var _1640=this.getCognosViewer(); var _1641=_1640.getRAPReportInfo(); _163f=_1641.getContainer(_163e); } return _163f; }; CognosViewerAction.prototype.isSelectionOnChart=function(){ var _1642=this.getCognosViewer(); if(_1642.getSelectionController().hasSelectedChartNodes()){ return true; } var _1643=this.getContainerId(_1642.getSelectionController()); if(typeof _1643!="undefined"){ var _1644=this.getReportInfo(_1643); if(_1644!=null&&_1644.displayTypeId){ var _1645=_1644.displayTypeId.toLowerCase(); return _1642.getRAPReportInfo().isChart(_1645); } } return false; }; CognosViewerAction.prototype.ifContainsInteractiveDataContainer=function(){ var _1646=this.getCognosViewer().getRAPReportInfo(); if(_1646){ return _1646.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 _1648=[]; var _1649=document.getElementById("rt"+this.m_oCV.getId()); if(_1649!=null){ _1648=getElementsByAttribute(_1649,"*","lid"); } return _1648; }; CognosViewerAction.prototype.addClientContextData=function(_164a){ var _164b=this.m_oCV.getSelectionController(); if(typeof _164b!="undefined"&&_164b!=null&&typeof _164b.getCCDManager!="undefined"&&_164b.getCCDManager()!=null){ var _164c=_164b.getCCDManager(); return (""+xml_encode(_164c.MetadataToJSON())+""+""+xml_encode(_164c.ContextDataSubsetToJSON(_164a))+""); } return ""; }; CognosViewerAction.prototype.getDataItemInfoMap=function(){ var _164d=this.m_oCV.getSelectionController(); if(typeof _164d!="undefined"&&_164d!=null&&typeof _164d.getCCDManager!="undefined"&&_164d.getCCDManager()!=null){ var _164e=_164d.getCCDManager(); return (""+xml_encode(_164e.DataItemInfoToJSON())+""); } return ""; }; CognosViewerAction.prototype.getRAPLayoutTag=function(_164f){ var _1650=null; if(typeof _164f=="object"&&_164f!=null){ _1650=_164f.getAttribute("rap_layout_tag"); } return _1650; }; CognosViewerAction.prototype.addMenuItemChecked=function(_1651,_1652,_1653){ if(_1651){ if(this.getCognosViewer().isHighContrast()){ _1652["class"]="menuItemSelected"; } _1652.iconClass="menuItemChecked"; }else{ if(_1653&&_1653.length>0){ _1652.iconClass=_1653; } } }; CognosViewerAction.prototype.gatherFilterInfoBeforeAction=function(_1654){ var _1655=this.getCognosViewer().getViewerWidget(); _1655.filterRequiredAction=_1654; _1655.clearRAPCache(); _1655.fireEvent("com.ibm.bux.widget.action",null,{action:"canvas.filters"}); }; CognosViewerAction.prototype.addClientSideUndo=function(_1656,_1657){ var _1658=GUtil.generateCallback(_1656.doUndo,_1657,_1656); var _1659=GUtil.generateCallback(_1656.doRedo,_1657,_1656); this.getUndoRedoQueue().addClientSideUndo({"tooltip":_1656.getUndoHint(),"undoCallback":_1658,"redoCallback":_1659}); this.getCognosViewer().getViewerWidget().updateToolbar(); }; CognosViewerAction.prototype.isValidMenuItem=function(){ var _165a=this.getCognosViewer(); var _165b=_165a.getViewerWidget(); if(this.isPromptWidget()){ return false; } return true; }; CognosViewerAction.prototype.isPositiveInt=function(value){ if(typeof value==="undefined"||value===null){ return false; } var _165d=parseInt(value,10); return value&&_165d===+value&&_165d>0&&value.indexOf(".")==-1; }; CognosViewerAction.prototype.buildActionResponseObject=function(_165e,code,msg){ return {"status":_165e,"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(_1661){ _1661.addFormField("cv.responseFormat","asynchDetailMIMEAttachment"); _1661.addFormField("bux",this.m_oCV.getViewerWidget()?"true":"false"); _1661.addFormField("cv.id",this.m_oCV.envParams["cv.id"]); }; LineageAction.prototype.getSelectionOptions=function(_1662){ var _1663=this.m_oCV.getSelectionController(); var _1664=getSelectionContextIds(_1663); _1662.addFormField("context.format","initializer"); _1662.addFormField("context.type","reportService"); _1662.addFormField("context.selection","metadata,"+_1664.toString()); }; LineageAction.prototype.getPrimaryRequestOptions=function(_1665){ _1665.addFormField("specificationType","metadataServiceLineageSpecification"); _1665.addFormField("ui.action","runLineageSpecification"); _1665.addFormField("ui.object",this.m_oCV.envParams["ui.object"]); }; LineageAction.prototype.getSecondaryRequestOptions=function(_1666){ _1666.addFormField("ui.conversation",this.m_oCV.getConversation()); _1666.addFormField("m_tracking",this.m_oCV.getTracking()); _1666.addFormField("ui.action","lineage"); }; LineageAction.prototype.updateMenu=function(_1667){ if(!this.getCognosViewer().bCanUseLineage){ return ""; } _1667.disabled=!this.selectionHasContext(); return _1667; }; LineageAction.prototype.execute=function(){ var oCV=this.getCognosViewer(); var _1669=new AsynchDataDispatcherEntry(oCV); this.getCommonOptions(_1669); this.getSelectionOptions(_1669); if(oCV.getConversation()==""){ this.getPrimaryRequestOptions(_1669); }else{ this.getSecondaryRequestOptions(_1669); } _1669.setCallbacks({"complete":{"object":this,"method":this.handleLineageResponse}}); if(!oCV.m_viewerFragment){ _1669.setRequestIndicator(oCV.getRequestIndicator()); var _166a=new WorkingDialog(oCV); _166a.setSimpleWorkingDialogFlag(true); _1669.setWorkingDialog(_166a); } oCV.dispatchRequest(_1669); }; LineageAction.prototype.handleLineageResponse=function(_166b){ var oCV=this.getCognosViewer(); oCV.loadExtra(); oCV.setStatus(_166b.getAsynchStatus()); oCV.setConversation(_166b.getConversation()); oCV.setTracking(_166b.getTracking()); var _166d=null; if(typeof MDSRV_CognosConfiguration!="undefined"){ _166d=new MDSRV_CognosConfiguration(); var _166e=""; if(this.m_oCV.envParams["metadataInformationURI"]){ _166e=this.m_oCV.envParams["metadataInformationURI"]; } _166d.addProperty("lineageURI",_166e); _166d.addProperty("gatewayURI",this.m_oCV.getGateway()); } var _166f=this.m_oCV.envParams["ui.object"]; var _1670=getViewerSelectionContext(this.m_oCV.getSelectionController(),new CSelectionContext(_166f)); var _1671=new MDSRV_LineageFragmentContext(_166d,_1670); _1671.setExecutionParameters(this.m_oCV.getExecutionParameters()); if(typeof _166f=="string"){ _1671.setReportPath(_166f); } _1671.setReportLineage(_166b.getResult()); _1671.open(); }; function ModifyReportAction(){ this.m_reuseConversation=true; }; ModifyReportAction.prototype=new CognosViewerAction(); ModifyReportAction.prototype.addActionContextAdditionalParms=function(){ }; ModifyReportAction.prototype.runReport=function(){ return true; }; ModifyReportAction.prototype.updateRunReport=function(){ }; ModifyReportAction.prototype.reuseQuery=function(){ return false; }; ModifyReportAction.prototype.reuseGetParameter=function(){ return true; }; ModifyReportAction.prototype.reuseConversation=function(_1672){ if(typeof _1672!="undefined"){ this.m_reuseConversation=_1672; } return this.m_reuseConversation; }; ModifyReportAction.prototype.updateInfoBar=function(){ return true; }; ModifyReportAction.prototype.getUndoHint=function(){ return ""; }; ModifyReportAction.prototype.isUndoable=function(){ return true; }; ModifyReportAction.prototype.saveSpecForUndo=function(){ return false; }; ModifyReportAction.prototype.keepFocusOnWidget=function(){ return true; }; ModifyReportAction.prototype.keepRAPCache=function(){ return true; }; ModifyReportAction.prototype.getActionKey=function(){ return null; }; ModifyReportAction.prototype.canBeQueued=function(){ return false; }; ModifyReportAction.prototype.getPromptOption=function(){ return "false"; }; ModifyReportAction.prototype.createActionDispatcherEntry=function(){ var _1673=new ModifyReportDispatcherEntry(this.m_oCV); _1673.initializeAction(this); return _1673; }; ModifyReportAction.prototype.isSelectSingleMember=function(_1674){ var _1675=this.m_oCV.getRAPReportInfo(); var _1676=_1674.getDataItems(); if(_1675&&_1676.length>0){ var _1677=this.getContainerId(this.m_oCV.getSelectionController()); var _1678=_1675.getItemInfo(_1677,_1676[0][0]); if(_1678.single=="true"){ return true; } } return false; }; ModifyReportAction.prototype.execute=function(){ var oCV=this.getCognosViewer(); oCV.setKeepFocus(this.keepFocusOnWidget()); this.updateRunReport(); if(this.runReport()==true){ var _167a=this.createActionDispatcherEntry(); this.addAdditionalOptions(_167a); oCV.dispatchRequest(_167a); }else{ var _167b=this.createCognosViewerDispatcherEntry("modifyReport"); _167b.setCallbacks({"complete":{"object":this,"method":this.updateReportSpecCallback}}); oCV.dispatchRequest(_167b); } this.fireModifiedReportEvent(); }; ModifyReportAction.prototype.updateReportSpecCallback=function(_167c){ var state=_167c.getResponseState(); var _167e=new RequestHandler(this.m_oCV); _167e.updateViewerState(state); if(!this.m_bUndoAdded){ this.m_bUndoAdded=true; var _167f=this.getUndoRedoQueue(); if(_167f){ _167f.initUndoObj({"tooltip":this.getUndoHint(),"saveSpec":true}); _167f.add({"reportUpdated":true}); } var _1680=this.getCognosViewer().getViewerWidget(); if(_1680){ _1680.updateToolbar(); } } }; ModifyReportAction.prototype.addActionContext=function(){ var _1681=""; var _1685=this.getContainerId(_1683); if(_1685!=""){ _1684+=""+xml_encode(_1685)+""; } _1684+=this.getRTStateInfo(); _1684+=this.getSelectionContext(); var _1686=this.addActionContextAdditionalParms(); if(_1686!=null&&_1686!="undefined"){ _1684+=_1686; } _1684+=""; if(this.updateInfoBar()){ _1684+=this.getGetInfoActionContext(); } return _1684; }; ModifyReportAction.prototype.getGetInfoActionContext=function(){ return ""; }; ModifyReportAction.prototype.getRTStateInfo=function(){ var _1687=this.getCognosViewer().getViewerWidget(); if(_1687&&_1687.getBUXRTStateInfoMap){ var _1688=_1687.getBUXRTStateInfoMap(); return _1688?_1688:""; } return ""; }; ModifyReportAction.prototype.createEmptyMenuItem=function(){ return {name:"None",label:"(empty)",iconClass:"",action:null,items:null}; }; ModifyReportAction.prototype.getStateFromResponse=function(_1689){ var _168a=null; if(_1689&&typeof _1689!="undefined"&&_1689.responseText&&typeof _1689.responseText!="undefined"&&_1689.responseText.length>0){ var _168b=XMLBuilderLoadXMLFromString(_1689.responseText); var _168c=_168b.getElementsByTagName("state"); if(_168c!=null&&_168c.length>0){ try{ if(typeof _168c[0].text!="undefined"){ _168a=eval("("+_168c[0].text+")"); }else{ _168a=eval("("+_168c[0].textContent+")"); } } catch(e){ if(typeof console!="undefined"&&console&&console.log){ console.log(e); } } } } return _168a; }; ModifyReportAction.prototype.getSelectedCellTags=function(){ var _168d=""; var _168e=this.getCognosViewer().getSelectionController().getSelections(); for(var i=0;i<_168e.length;++i){ var _1690=_168e[i].getCellRef(); var _1691=_168e[i].getDataItems()[0]; if(typeof _1691=="undefined"||_1691==null){ _1691=""; } var tag=this.getRAPLayoutTag(_1690); if(tag!=null){ _168d+=""+xml_encode(tag)+""+xml_encode(_1691)+""; }else{ _168d+=""+xml_encode(_1691)+""; } } if(_168d!=""){ _168d=""+_168d+""; } return _168d; }; ModifyReportAction.prototype.getIsNumericFromReportInfo=function(_1693){ var _1694=this.getSelectedReportInfo(); if(_1694!=null&&typeof _1694.itemInfo!="undefined"){ for(var item=0;item<_1694.itemInfo.length;++item){ if(_1693==_1694.itemInfo[item].item&&typeof _1694.itemInfo[item].numeric!="undefined"){ return (_1694.itemInfo[item].numeric=="true"); } } } return false; }; function CognosViewerCalculation(){ this.m_oCV=null; }; CognosViewerCalculation.prototype.setCognosViewer=function(oCV){ this.m_oCV=oCV; }; CognosViewerCalculation.prototype.getCognosViewer=function(){ return this.m_oCV; }; CognosViewerCalculation.prototype.validSelectionLength=function(_1697){ try{ return _1697.getAllSelectedObjects().length>0; } catch(e){ return false; } }; CognosViewerCalculation.prototype.getDisplayValueFromSelection=function(_1698){ var _1699=""; if(!_1698){ return _1699; } if(_1698.getLayoutType()=="columnTitle"){ _1699=_1698.getDisplayValues()[0]; }else{ if(_1698.getLayoutType()=="datavalue"){ var _169a=this.m_oCV.getAction("CognosViewer"); var _169b=this.m_oCV.getSelectionController(); var _169c=_169a.getContainerId(_169b); _1699=_1698.getDataItemDisplayValue(_169a.getReportInfo(_169c)); } } if(_1699.indexOf("+")!=-1||_1699.indexOf("-")!=-1||_1699.indexOf("*")!=-1||_1699.indexOf("/")!=-1){ _1699="("+_1699+")"; } return _1699; }; CognosViewerCalculation.prototype.getCalcSymbol=function(){ }; CognosViewerCalculation.prototype.getMenuItemString=function(_169d){ var _169e=this.getCognosViewer(); var _169f=_169e.getSelectionController(); var _16a0=""; var _16a1,index; if(_169d){ try{ var _16a3=_169f.getAllSelectedObjects().length; if(_16a3==1){ _16a1=_169f.getAllSelectedObjects()[0]; if(this.m_bFlipSelection){ _16a0=RV_RES.IDS_JS_CALCULATE_NUMBER+" "+this.getCalcSymbol()+" "+this.getDisplayValueFromSelection(_16a1); }else{ _16a0=this.getDisplayValueFromSelection(_16a1)+" "+this.getCalcSymbol()+" "+RV_RES.IDS_JS_CALCULATE_NUMBER; } }else{ if(this.m_bFlipSelection){ _16a3--; for(index=_16a3;index>=0;index--){ _16a1=_169f.getAllSelectedObjects()[index]; if(index!=_16a3){ _16a0+=" "+this.getCalcSymbol()+" "; } _16a0+=this.getDisplayValueFromSelection(_16a1); } }else{ for(index=0;index<_16a3;index++){ _16a1=_169f.getAllSelectedObjects()[index]; if(index>0){ _16a0+=" "+this.getCalcSymbol()+" "; } _16a0+=this.getDisplayValueFromSelection(_16a1); } } } } catch(e){ _16a0=this.getCalcSymbol(); } }else{ _16a0=this.getCalcSymbol(); } return _16a0; }; function PercentDifferenceCalculation(){ }; PercentDifferenceCalculation.prototype=new CognosViewerCalculation(); PercentDifferenceCalculation.prototype.validSelectionLength=function(_16a4){ try{ return _16a4.getAllSelectedObjects().length==2; } catch(e){ return false; } }; PercentDifferenceCalculation.prototype.getMenuItemString=function(_16a5){ var _16a6=this.getCognosViewer().getSelectionController(); var _16a7=RV_RES.IDS_JS_CALCULATE_PERCENT_DIFFERENCE; if(_16a5){ try{ var _16a8=_16a6.getAllSelectedObjects().length; _16a7+=" ("; for(var index=0;index<_16a8;index++){ var _16aa=_16a6.getAllSelectedObjects()[index]; if(index>0){ _16a7+=", "; } _16a7+=this.getDisplayValueFromSelection(_16aa); } _16a7+=")"; } catch(e){ } } return _16a7; }; function PercentDifferenceCalculationSwapOrder(){ this.m_bFlipSelection=true; }; PercentDifferenceCalculationSwapOrder.prototype=new PercentDifferenceCalculation(); PercentDifferenceCalculationSwapOrder.prototype.getMenuItemString=function(_16ab){ var _16ac=this.getCognosViewer().getSelectionController(); var _16ad=RV_RES.IDS_JS_CALCULATE_PERCENT_DIFFERENCE; if(_16ab){ try{ var _16ae=_16ac.getAllSelectedObjects().length; _16ad+=" ("; _16ae--; for(var index=_16ae;index>=0;index--){ var _16b0=_16ac.getAllSelectedObjects()[index]; if(index<_16ae){ _16ad+=", "; } _16ad+=this.getDisplayValueFromSelection(_16b0); } _16ad+=")"; } catch(e){ } } return _16ad; }; function AdditionCalculation(){ }; AdditionCalculation.prototype=new CognosViewerCalculation(); AdditionCalculation.prototype.getCalcSymbol=function(){ return "+"; }; function SubtractionCalculation(){ }; SubtractionCalculation.prototype=new CognosViewerCalculation(); SubtractionCalculation.prototype.getCalcSymbol=function(){ return "-"; }; SubtractionCalculation.prototype.validSelectionLength=function(_16b1){ try{ var _16b2=_16b1.getAllSelectedObjects().length; return _16b2>0&&_16b2<3; } catch(e){ return false; } }; function SubtractionCalculationSwapOrder(){ this.m_bFlipSelection=true; }; SubtractionCalculationSwapOrder.prototype=new SubtractionCalculation(); function MultiplicationCalculation(){ }; MultiplicationCalculation.prototype=new CognosViewerCalculation(); MultiplicationCalculation.prototype.getCalcSymbol=function(){ return "*"; }; function DivisionCalculation(){ }; DivisionCalculation.prototype=new CognosViewerCalculation(); DivisionCalculation.prototype.getCalcSymbol=function(){ return "/"; }; DivisionCalculation.prototype.validSelectionLength=function(_16b3){ try{ var _16b4=_16b3.getAllSelectedObjects().length; return (_16b4>0&&_16b4<3); } catch(e){ return false; } }; function DivisionCalculationSwapOrder(){ this.m_bFlipSelection=true; }; DivisionCalculationSwapOrder.prototype=new DivisionCalculation(); function CalculationAction(){ this.m_payload=""; this.m_menuBuilderClass=null; this.m_defaultName=""; this.m_constant=null; }; CalculationAction.prototype=new ModifyReportAction(); CalculationAction.prototype.getUndoHint=function(){ return RV_RES.IDS_JS_CALCULATION; }; CalculationAction.prototype.keepRAPCache=function(){ return false; }; CalculationAction.prototype.listRules=function(){ var _16b5=this.getCognosViewer().getSelectionController(); var _16b6=_16b5.getSelections(); if(_16b6.length>1){ var tmp={}; for(var i=0;i<_16b6.length;++i){ var _16b9=_16b6[i].getColumnRef(); if(typeof tmp[_16b9]=="undefined"){ tmp[_16b9]=1; }else{ return false; } } } return _16b5.selectionsHaveCalculationMetadata(); }; CalculationAction.prototype.crosstabRules=function(){ var _16ba=this.getCognosViewer().getSelectionController(); if(!_16ba.areSelectionsColumnRowTitles()){ return false; } if(_16ba.isRelational()){ if(!this.relationalCrosstabRules(_16ba)){ return false; } }else{ if(!this.olapCrosstabRules(_16ba)){ return false; } } return true; }; CalculationAction.prototype.relationalCrosstabRules=function(_16bb){ return _16bb.selectionsHaveCalculationMetadata(); }; CalculationAction.prototype.olapCrosstabRules=function(_16bc){ if(!_16bc.selectionsHaveCalculationMetadata()){ return false; } if(!this.sameDimension(_16bc)){ return (typeof this.m_oCV.aQoSFunctions!="undefined")&&this.m_oCV.aQoSFunctions.toString().indexOf("MULTIPLE_MEASURE_DIMENSION_CALCULATIONS")!=-1&&_16bc.selectionsAreMeasures(); }else{ if(this.sameHierarchy(_16bc)){ return true; }else{ return (typeof this.m_oCV.aQoSFunctions!="undefined")&&this.m_oCV.aQoSFunctions.toString().indexOf("VALUE_EXPRESSIONS_REF_MULTIPLE_HIERARCHIES_OF_SAME_DIMENSION")!=-1; } } }; CalculationAction.prototype.sameDimension=function(_16bd){ try{ var dim=""; var _16bf=_16bd.getAllSelectedObjects().length; for(var _16c0=0;_16c0<_16bf;_16c0++){ if(dim.length==0){ dim=_16bd.getAllSelectedObjects()[_16c0].getDimensionalItems("dun")[0][0]; }else{ if(dim!=_16bd.getAllSelectedObjects()[_16c0].getDimensionalItems("dun")[0][0]){ return false; } } } return true; } catch(e){ return false; } }; CalculationAction.prototype.sameHierarchy=function(_16c1){ try{ var dim=""; var _16c3=_16c1.getAllSelectedObjects().length; for(var _16c4=0;_16c4<_16c3;_16c4++){ if(dim.length==0){ dim=_16c1.getAllSelectedObjects()[_16c4].getDimensionalItems("hun")[0][0]; }else{ if(dim!=_16c1.getAllSelectedObjects()[_16c4].getDimensionalItems("hun")[0][0]){ return false; } } } return true; } catch(e){ return false; } }; CalculationAction.prototype.addActionContextAdditionalParms=function(){ var _16c5=""; if(this.m_constant!=null){ _16c5+=""+xml_encode(this.m_constant)+""; if(this.m_swapSelectionOrder){ _16c5+=""; } } if(this.m_defaultName!=""){ _16c5+=""+xml_encode(this.m_defaultName)+""; } return _16c5; }; CalculationAction.prototype.setRequestParms=function(parms){ if(parms!=null){ if(typeof parms.constant!=null){ this.m_constant=parms.constant; } } }; CalculationAction.prototype.buildDefaultName=function(){ try{ var calc=this.getCognosViewer().getCalculation(this.m_menuBuilderClass); this.m_defaultName=calc.getMenuItemString(true); if(this.m_constant!=null){ var _16c8=""+this.m_constant; var _16c9=this.getCognosViewer().envParams["contentDecimalSeparator"]; if(typeof _16c9!="undefined"&&_16c9!=null&&_16c9!="."){ _16c8=_16c8.replace(".",_16c9); } this.m_defaultName=this.m_defaultName.replace(RV_RES.IDS_JS_CALCULATE_NUMBER,_16c8); } } catch(e){ this.m_defaultName=""; } }; CalculationAction.prototype.preProcess=function(){ var _16ca=this.getNumberOfSelections(); this.buildDefaultName(); if(this.m_swapSelectionOrder&&_16ca==2){ var _16cb=this.getCognosViewer().getSelectionController(); var sel1=_16cb.getAllSelectedObjects()[0]; var sel2=_16cb.getAllSelectedObjects()[1]; _16cb.m_aSelectedObjects=[sel2,sel1]; } }; CalculationAction.prototype.isFactCellOnCrosstabOrEmpty=function(){ var _16ce=this.m_oCV.getSelectionController(); var _16cf=_16ce.getAllSelectedObjects(); if(_16cf!=null&&typeof _16cf!="undefined"){ if(_16cf.length==0){ return true; }else{ var _16d0=_16cf[0]; if(_16ce.getDataContainerType()=="crosstab"&&_16d0.getLayoutType()=="datavalue"){ return true; } } } return false; }; CalculationAction.prototype.isSummaryOrAggregateCell=function(){ var _16d1=this.m_oCV.getSelectionController(); var _16d2=_16d1.getAllSelectedObjects(); if(_16d2!=null&&typeof _16d2!="undefined"){ var _16d3; var _16d4=/\b(ol|il)\b/; for(var i=0;i<_16d2.length;i++){ _16d3=_16d2[i].getCellRef(); if(_16d3!=null&&typeof _16d3!="undefined"){ if(_16d2[i].getLayoutType()=="summary"||(_16d3!=null&&_16d4.test(_16d3.className))){ return true; } } _16d3=null; } } return false; }; CalculationAction.prototype.isLastSelectionSingleDimensionNested=function(){ var _16d6=this.m_oCV.getSelectionController(); var _16d7=_16d6.getAllSelectedObjects(); if(_16d7!=null&&typeof _16d7!="undefined"&&_16d7.length){ var _16d8=_16d7[_16d7.length-1]; var _16d9=_16d8.getDimensionalItems("dun")[0]; if(_16d9&&_16d9.length&&_16d9[0]){ for(var _16da=1;_16da<_16d9.length;++_16da){ if(_16d9[_16da]===_16d9[0]){ return true; } } } } return false; }; CalculationAction.prototype.areCalculationsPossible=function(){ var _16db=this.getCognosViewer().getSelectionController(); if(this.isFactCellOnCrosstabOrEmpty()){ return false; } if(this.isSelectionOnChart()){ return false; } if(this.isSummaryOrAggregateCell()){ return false; } if(!_16db.selectionsInSameDataContainer()){ return false; } if(_16db.getDataContainerType()=="list"){ return this.listRules(_16db); }else{ if(_16db.getDataContainerType()=="crosstab"&&!this.isLastSelectionSingleDimensionNested()){ return this.crosstabRules(_16db); } } return false; }; CalculationAction.prototype.updateMenu=function(_16dc,_16dd){ _16dc.visible=this.ifContainsInteractiveDataContainer(); if(!_16dc.visible){ return _16dc; } if(!this.areCalculationsPossible()){ return this.toggleMenu(_16dc,false); } this.toggleMenu(_16dc,true); if(this.m_oCV.aQoSFunctions){ _16dc=this.buildCalculationMenuItemsAgainstSelection(_16dc); }else{ _16dc=this.buildDynamicMenuItem(_16dc,"Calculation"); } return _16dc; }; CalculationAction.prototype.toggleMenu=function(_16de,_16df){ if(_16df){ _16de.iconClass="calculate"; _16de.disabled=false; }else{ _16de.iconClass="calculateDisabled"; _16de.disabled=true; } return _16de; }; CalculationAction.prototype.buildMenu=function(_16e0,_16e1){ _16e0.visible=this.ifContainsInteractiveDataContainer(); if(!_16e0.visible){ return _16e0; } if(!this.areCalculationsPossible()){ return this.toggleMenu(_16e0,false); } this.toggleMenu(_16e0,true); var _16e2=this.getCognosViewer(); if(typeof _16e2.aQoSFunctions=="undefined"){ this.fetchQoS(_16e0,_16e1,(typeof _16e1=="undefined")?false:true); } if(typeof _16e2.aQoSFunctions!="undefined"){ return this.buildCalculationMenuItemsAgainstSelection(_16e0); } }; CalculationAction.prototype.fetchQoS=function(_16e3,_16e4,_16e5){ var _16e6={customArguments:[_16e3,_16e4],"complete":{"object":this,"method":this.handleQoSResponse}}; var _16e7=new AsynchJSONDispatcherEntry(this.m_oCV); _16e7.setCallbacks(_16e6); _16e7.addFormField("ui.action","getQualityOfService"); _16e7.addFormField("parameterValues",this.m_oCV.getExecutionParameters()); _16e7.addFormField("bux","true"); _16e7.addNonEmptyStringFormField("modelPath",this.m_oCV.getModelPath()); _16e7.addDefinedFormField("metaDataModelModificationTime",this.m_oCV.envParams["metaDataModelModificationTime"]); if(!_16e5){ _16e7.forceSynchronous(); } this.m_oCV.dispatchRequest(_16e7); }; CalculationAction.prototype.handleQoSResponse=function(_16e8,_16e9,_16ea){ this.m_oCV.aQoSFunctions=_16e8.getResult(); this.buildCalculationMenuItemsAgainstSelection(_16e9,_16ea); if(typeof _16ea=="function"){ _16ea(); } }; CalculationAction.prototype.buildCalculationMenuItemsAgainstSelection=function(_16eb,_16ec){ var _16ed=this.m_oCV.aBuxCalculations; var _16ee=[]; for(var _16ef=0;_16ef<_16ed.length;_16ef++){ var calc=this.m_oCV.getCalculation(_16ed[_16ef]); if(this.m_oCV.aQoSFunctions==null||typeof this.m_oCV.aQoSFunctions=="undefined"){ _16eb.disabled=true; _16eb.iconClass="calculate"; _16eb.items=null; return _16eb; } if(calc&&calc.validSelectionLength(this.getCognosViewer().getSelectionController())&&this.m_oCV.aQoSFunctions.toString().indexOf(_16ed[_16ef])!=-1){ var _16f1={}; _16f1.name=_16ed[_16ef]; _16f1.label=calc.getMenuItemString(true); _16f1.action={}; var _16f2=""; if(_16ed[_16ef].indexOf("SwapOrder")!=-1){ _16f2=_16ed[_16ef].substring(0,_16ed[_16ef].indexOf("SwapOrder")); }else{ _16f2=_16ed[_16ef]; } _16f1.iconClass=_16f2; if(this.getNumberOfSelections()==1){ _16f1.action.name="ConstantOperandCalculation"; _16f1.action.payload=_16ed[_16ef]; }else{ _16f1.action.name=_16ed[_16ef]; _16f1.action.payload=""; } if(_16f1.action.name=="PercentDifferenceCalculation"){ _16ee.push({separator:true}); } _16f1.items=null; _16ee.push(_16f1); } } if(_16ee.length==0){ this.toggleMenu(_16eb,false); _16ee.push({name:"None",label:RV_RES.IDS_JS_CALCULATION_SELECT_DATA,iconClass:"",action:null,items:null}); }else{ this.toggleMenu(_16eb,true); } _16eb.items=_16ee; return _16eb; }; function PercentDifferenceCalculationAction(){ this.m_sAction="PercentDifference"; this.m_menuBuilderClass="PercentDifferenceCalculation"; }; PercentDifferenceCalculationAction.prototype=new CalculationAction(); function PercentDifferenceCalculationSwapOrderAction(){ this.m_sAction="PercentDifference"; this.m_menuBuilderClass="PercentDifferenceCalculationSwapOrder"; this.m_swapSelectionOrder=true; }; PercentDifferenceCalculationSwapOrderAction.prototype=new CalculationAction(); function AdditionCalculationAction(){ this.m_sAction="Addition"; this.m_menuBuilderClass="AdditionCalculation"; }; AdditionCalculationAction.prototype=new CalculationAction(); function SubtractionCalculationAction(){ this.m_sAction="Subtraction"; this.m_menuBuilderClass="SubtractionCalculation"; }; SubtractionCalculationAction.prototype=new CalculationAction(); function SubtractionCalculationSwapOrderAction(){ this.m_sAction="Subtraction"; this.m_menuBuilderClass="SubtractionCalculationSwapOrder"; this.m_swapSelectionOrder=true; }; SubtractionCalculationSwapOrderAction.prototype=new CalculationAction(); function MultiplicationCalculationAction(){ this.m_sAction="Multiplication"; this.m_menuBuilderClass="MultiplicationCalculation"; }; MultiplicationCalculationAction.prototype=new CalculationAction(); function DivisionCalculationAction(){ this.m_sAction="Division"; this.m_menuBuilderClass="DivisionCalculation"; }; DivisionCalculationAction.prototype=new CalculationAction(); function DivisionCalculationSwapOrderAction(){ this.m_sAction="Division"; this.m_menuBuilderClass="DivisionCalculationSwapOrder"; this.m_swapSelectionOrder=true; }; DivisionCalculationSwapOrderAction.prototype=new CalculationAction(); function ConstantOperandCalculationAction(){ this.m_action=null; }; ConstantOperandCalculationAction.prototype=new CognosViewerAction(); ConstantOperandCalculationAction.prototype.setRequestParms=function(_16f3){ this.m_action=_16f3; }; ConstantOperandCalculationAction.prototype.execute=function(){ var _16f4=getCognosViewerObjectString(this.m_oCV.getId()); var _16f5=this.m_action; var _16f6=this.m_oCV.getCalculation(_16f5); var _16f7=_16f6.getMenuItemString(true); var _16f8=RV_RES.IDS_JS_CALCULATE_ENTER_NUMBER_TITLE; var _16f9=RV_RES.IDS_JS_CALCULATE_ENTER_NUMBER_DESCRIPTION; _16f9=_16f9.substring(0,_16f9.indexOf("{0}"))+_16f7+_16f9.substring(_16f9.indexOf("{0}")+3); var _16fa=RV_RES.IDS_JS_CALCULATE_ENTER_NUMBER; var _16fb=this.m_oCV.envParams["contentLocale"]; var _16fc=new viewer.dialogs.CalculationDialog({sTitle:_16f8,sLabel:_16fa,sDescription:_16f9,sContentLocale:_16fb,okHandler:function(value){ window[_16f4].executeAction(_16f5,{constant:value}); },cancelHandler:function(){ }}); _16fc.startup(); window.setTimeout(function(){ _16fc.show(); },0); }; function FilterAction(){ this.m_sAction="Filter"; this.m_sType=""; this.m_sItem=""; this.m_sFormattedNumber=""; this.m_sFormattedEndNumber=""; this.m_jsonDetails=""; }; FilterAction.prototype=new ModifyReportAction(); FilterAction.prototype.execute=function(){ ModifyReportAction.prototype.execute.apply(this,arguments); if(this.m_sType.indexOf("remove")!=-1){ this.getCognosViewer().getViewerWidget().clearRAPCache(); } }; FilterAction.prototype.genSelectionContextWithUniqueCTXIDs=function(){ return true; }; FilterAction.prototype.getUndoHint=function(){ if(this.m_sType.indexOf("remove")!=-1){ return RV_RES.IDS_JS_REMOVE_FILTER; }else{ return RV_RES.IDS_JS_FILTER; } }; FilterAction.prototype.setRequestParms=function(parms){ if(parms.type!=null&&typeof parms.type!="undefined"){ this.m_sType=parms.type; if(parms.id!=null&&typeof parms.id!="undefined"){ this.m_sId=parms.id; } if(parms.item!=null&&typeof parms.item!="undefined"){ this.m_sItem=parms.item; } if(parms.details){ this.m_jsonDetails=parms.details; } if(parms.formattedNumber!=null&&typeof parms.formattedNumber!="undefined"){ this.m_sFormattedNumber=parms.formattedNumber; } if(parms.formattedEndNumber!=null&&typeof parms.formattedEndNumber!="undefined"){ this.m_sFormattedEndNumber=parms.formattedEndNumber; } }else{ this.m_sType=parms; } }; FilterAction.prototype.addActionContextAdditionalParms=function(){ var parms=""+this.m_sType+""; if(this.m_sId!=null&&typeof this.m_sId!="undefined"){ parms+=(""+xml_encode(this.m_sId)+""); } if(this.m_sItem!=null&&typeof this.m_sItem!="undefined"&&this.m_sItem!=""){ parms+=(""+xml_encode(this.m_sItem)+""); } if(this.m_jsonDetails&&this.m_jsonDetails!=""){ parms+="
"+xml_encode(this.m_jsonDetails)+"
"; } if(this.m_sFormattedNumber!=null&&typeof this.m_sFormattedNumber!="undefined"&&this.m_sFormattedNumber!=""){ parms+=(""+this.m_sFormattedNumber+""); } if(this.m_sFormattedEndNumber!=null&&typeof this.m_sFormattedEndNumber!="undefined"&&this.m_sFormattedEndNumber!=""){ parms+=(""+this.m_sFormattedEndNumber+""); } return parms; }; FilterAction.prototype.buildSelectedItemsString=function(_1700){ var _1701=""; var _1702=_1700.length; var _1703=_1702>5?5:_1702; for(var index=0;index<_1702;++index){ var value=this.getItemLabel(_1700[index]); if(typeof value=="undefined"||value==""){ return ""; } if((index)<_1703){ _1701+=value; } if((index+1)<_1703){ _1701+=", "; } } if(_1702>5){ _1701+=", ++"; } return _1701; }; FilterAction.prototype.getItemLabel=function(_1706){ var value=_1706.getDisplayValues()[0]; if(typeof value=="undefined"){ value=_1706.getUseValues()[0][0]; } return value; }; FilterAction.prototype.toggleMenu=function(_1708,_1709){ if(_1709){ _1708.iconClass="filter"; _1708.disabled=false; }else{ _1708.iconClass="filterDisabled"; _1708.disabled=true; } return _1708; }; FilterAction.prototype.updateMenu=function(_170a){ _170a.visible=(this.ifContainsInteractiveDataContainer()&&!this.detailFilteringIsDisabled()); var _170b=_170a; if(_170a.visible){ var _170c=(this.m_oCV.getSelectionController().getAllSelectedObjects().length>0||this.isSelectionFilterable()||this.isRemoveAllValid()); if(!_170c){ _170b=this.toggleMenu(_170a,false); }else{ this.buildMenu(_170a); if(_170a.disabled==true){ _170b=this.toggleMenu(_170a,false); }else{ _170b=this.buildDynamicMenuItem(_170a,"Filter"); } } } return _170b; }; FilterAction.prototype.detailFilteringIsDisabled=function(){ var _170d=this.getCognosViewer().getRAPReportInfo(); if(_170d){ return _170d.isDetailFilteringDisabled(); } return false; }; FilterAction.prototype.buildMenu=function(_170e){ _170e.visible=(this.ifContainsInteractiveDataContainer()&&!this.detailFilteringIsDisabled()); if(!_170e.visible){ return _170e; } var _170f=this.isSelectionFilterable(); this.toggleMenu(_170e,_170f); var _1710=[]; var _1711=false; var _1712=false; var _1713=this.m_oCV.getSelectionController(); var _1714=_1713.getAllSelectedObjects(); if(_1714.length>0&&_1713.selectionsInSameDataContainer()&&_1713.selectionsFromSameDataItem()){ var _1715=_1714[0].getDataItems()[0][0]; if(_170f){ _1711=this.addFilterValueActionsToMenu(_1713,_1710,_1715); } if(this.isRemoveItemFilterValid(_1715)){ if(_1711==true){ _1710.push({separator:true}); _1712=true; } var label=this.getRefDataItemLabel(_1715); _1710.push({name:"RemoveFilterFor",label:RV_RES.IDS_JS_REMOVE_FILTER_FOR+" "+enforceTextDir(label),iconClass:"",action:{name:"Filter",payload:"remove"},items:null}); } } if(this.isRemoveAllValid()==true){ if(_1711&&!_1712){ _1710.push({separator:true}); } _1710.push({name:"RemoveAllFiltersForWidget",label:RV_RES.IDS_JS_REMOVE_ALL_FILTERS_FOR_WIDGET,iconClass:"",action:{name:"Filter",payload:"removeAllForWidget"},items:null}); } if(_1710.length==0){ return this.toggleMenu(_170e,false); }else{ _170e.items=_1710; this.toggleMenu(_170e,true); return _170e; } }; FilterAction.prototype.getRefDataItemLabel=function(_1717){ var label=_1717; var _1719=this.m_oCV.getRAPReportInfo(); if(_1719){ var _171a=_1719.getFilterObject(_1717,true); if(_171a){ label=_171a.itemLabel; } } return label; }; FilterAction.prototype.addFilterValueActionsToMenu=function(_171b,_171c,_171d){ var _171e=_171b.getAllSelectedObjectsWithUniqueCTXIDs(); var _171f=_171e.length; var sel=0; if(_171e[0].m_dataContainerType=="list"){ for(sel=0;sel<_171e.length;++sel){ if(_171e[sel].m_sLayoutType=="columnTitle"){ _171f=0; break; } } } if(_171f==0){ return false; } var _1721=this.buildSelectedItemsString(_171e); if(_1721==""){ if(_171f==1&&_171e[0].getLayoutType()=="datavalue"){ _1721=RV_RES.IDS_JS_NULL; _171c.push({name:"InFilter",label:CViewerCommon.getMessage(RV_RES.IDS_JS_FILTER_INCLUDE,_1721),iconClass:"",action:{name:"Filter",payload:"in"},items:null}); _171c.push({name:"NotInFilter",label:CViewerCommon.getMessage(RV_RES.IDS_JS_FILTER_EXCLUDE,_1721),iconClass:"",action:{name:"Filter",payload:"not"},items:null}); } }else{ if(_171b.selectionsAreDateTime()||(_171b.selectionsHaveCalculationMetadata()&&!_171b.selectionsNonMeasureWithMUN())){ for(sel=0;sel<_171f;++sel){ if(_171e[sel].m_sLayoutType=="columnTitle"){ return false; } } if(_171f==1){ if(_171e[0].getUseValues()[0][0]){ _171c.push({name:"LessFilter",label:RV_RES.IDS_JS_FILTER_LESS_THAN+" "+_1721,iconClass:"",action:{name:"Filter",payload:{type:"lessThan",formattedNumber:_1721}},items:null}); _171c.push({name:"LessEqualFilter",label:RV_RES.IDS_JS_FILTER_LESS_THAN_EQUAL+" "+_1721,iconClass:"",action:{name:"Filter",payload:{type:"lessThanEqual",formattedNumber:_1721}},items:null}); _171c.push({name:"GreaterEqualFilter",label:RV_RES.IDS_JS_FILTER_GREATER_THAN_EQUAL+" "+_1721,iconClass:"",action:{name:"Filter",payload:{type:"greaterThanEqual",formattedNumber:_1721}},items:null}); _171c.push({name:"GreaterFilter",label:RV_RES.IDS_JS_FILTER_GREATER_THAN+" "+_1721,iconClass:"",action:{name:"Filter",payload:{type:"greaterThan",formattedNumber:_1721}},items:null}); } }else{ if(_171f==2){ if(_171e[0].getUseValues()[0][0]&&_171e[1].getUseValues()[0][0]){ var _1722=this.getItemLabel(_171e[0]); var _1723=this.getItemLabel(_171e[1]); _171c.push({name:"BetweenFilter",label:CViewerCommon.getMessage(RV_RES.IDS_JS_FILTER_BETWEEN,[_1722,_1723]),iconClass:"",action:{name:"Filter",payload:{type:"between",formattedNumber:_1722,formattedEndNumber:_1723}},items:null}); _171c.push({name:"NotBetweenFilter",label:CViewerCommon.getMessage(RV_RES.IDS_JS_FILTER_NOT_BETWEEN,[_1722,_1723]),iconClass:"",action:{name:"Filter",payload:{type:"notBetween",formattedNumber:_1722,formattedEndNumber:_1723}},items:null}); } }else{ return false; } } }else{ var _1724=_171b.getDataContainerType(); if(_1724=="crosstab"&&_171e[0].getLayoutType()=="columnTitle"){ if(this.isSelectSingleMember(_171e[0])==true){ return false; } } _171c.push({name:"InFilter",label:CViewerCommon.getMessage(RV_RES.IDS_JS_FILTER_INCLUDE,enforceTextDir(_1721)),iconClass:"",action:{name:"Filter",payload:"in"},items:null}); _171c.push({name:"NotInFilter",label:CViewerCommon.getMessage(RV_RES.IDS_JS_FILTER_EXCLUDE,enforceTextDir(_1721)),iconClass:"",action:{name:"Filter",payload:"not"},items:null}); } } return true; }; FilterAction.prototype.isRemoveAllValid=function(){ var _1725=this.m_oCV.getRAPReportInfo(); if(_1725){ return _1725.containsFilters(); } return false; }; FilterAction.prototype.isRemoveItemFilterValid=function(_1726){ var _1727=this.getContainerId(this.m_oCV.getSelectionController()); var _1728=this.m_oCV.getRAPReportInfo(); if(_1727!=null&&_1728){ var _1729=_1728.getFilterObjectFromContainer(_1727,_1726,false); return _1729?true:false; } return false; }; FilterAction.prototype.isSelectionFilterable=function(){ var _172a=this.m_oCV.getSelectionController(); var _172b=_172a.getAllSelectedObjects(); if(_172b.length>0){ var _172c=_172b[0].getCellRef(); if(_172c&&_172c.getAttribute&&_172c.getAttribute("no_data_item_column")==="true"){ return false; } if(_172a.hasSelectedChartNodes()){ var _172d=false; if(_172a.selectionsAreDateTime()||(_172a.selectionsHaveCalculationMetadata()&&!_172a.selectionsNonMeasureWithMUN())){ _172d=true; } for(var sel=0;sel<_172b.length;++sel){ if(_172b[sel].getLayoutType()){ if(_172b[sel].getLayoutType().match("Title$")=="Title"){ return false; } if(_172d&&_172b[sel].getLayoutType().match("Label$")=="Label"){ return false; } } } } } return true; }; function GetFilterInfoAction(){ this.m_requestParms=null; }; GetFilterInfoAction.prototype=new ModifyReportAction(); GetFilterInfoAction.prototype.isUndoable=function(){ return false; }; GetFilterInfoAction.prototype.canBeQueued=function(){ return true; }; GetFilterInfoAction.prototype.setRequestParms=function(parms){ this.m_requestParms=parms; }; GetFilterInfoAction.prototype.runReport=function(){ return false; }; GetFilterInfoAction.prototype.updateInfoBar=function(){ return false; }; GetFilterInfoAction.prototype.fireModifiedReportEvent=function(){ }; GetFilterInfoAction.prototype.buildActionContextAdditionalParmsXML=function(){ var _1730=XMLBuilderCreateXMLDocument("item"); var _1731=_1730.documentElement; for(var parm in this.m_requestParms){ if(this.m_requestParms.hasOwnProperty(parm)){ var _1733=_1730.createElement(parm); _1733.appendChild(_1730.createTextNode(this.m_requestParms[parm])); _1731.appendChild(_1733); } } return _1730; }; GetFilterInfoAction.prototype.addActionContextAdditionalParms=function(){ if(this.m_requestParms===null){ return ""; } return XMLBuilderSerializeNode(this.buildActionContextAdditionalParmsXML()); }; GetFilterInfoAction.prototype.createFilterInfoDispatcherEntry=function(){ var _1734=new ReportInfoDispatcherEntry(this.m_oCV); _1734.initializeAction(this); return _1734; }; GetFilterInfoAction.prototype.execute=function(){ this.getCognosViewer().setKeepFocus(this.keepFocusOnWidget()); var _1735=this.createFilterInfoDispatcherEntry(); this.m_oCV.dispatchRequest(_1735); this.fireModifiedReportEvent(); }; GetFilterInfoAction.prototype.getOnPromptingCallback=function(){ return this.getOnCompleteCallback(); }; function GetFilterValuesAction(){ this.m_sAction="CollectFilterValues"; this.m_sRetryClass="GetFilterValues"; }; GetFilterValuesAction.prototype=new GetFilterInfoAction(); GetFilterValuesAction.prototype.addActionContextAdditionalParms=function(){ if(this.m_requestParms===null){ return ""; } var _1736=this.buildActionContextAdditionalParmsXML(); var _1737=_1736.documentElement; for(var parm in this.m_requestParms){ if(parm=="name"){ var _1739=this.m_oCV.getSelectionController(); if(typeof _1739!="undefined"&&typeof _1739.getCCDManager()!="undefined"){ var _173a=_1739.getCCDManager().GetPageMinMaxForRDI(this.m_requestParms[parm]); if(typeof _173a!="undefined"){ var _173b=_1736.createElement("pageMin"); _173b.appendChild(_1736.createTextNode(_173a.pageMin)); var _173c=_1736.createElement("pageMax"); _173c.appendChild(_1736.createTextNode(_173a.pageMax)); _1737.appendChild(_173b); _1737.appendChild(_173c); } if(this.m_oCV.isSinglePageReport()==true){ var _173d=_1736.createElement("singlePageReport"); _1737.appendChild(_173d); } } break; } } var _173e=XMLBuilderSerializeNode(_1736); return (_173e+this.addClientContextData(3)); }; GetFilterValuesAction.prototype.getOnCompleteCallback=function(){ var _173f=this.getCognosViewer(); var _1740=_173f.getViewerWidget(); var _1741=this.m_requestParms; var _1742=function(_1743){ _1740.handleGetFilterValuesResponse(_1743,_1741); }; return _1742; }; GetFilterValuesAction.prototype.canBeQueued=function(){ return true; }; GetFilterValuesAction.prototype.getActionKey=function(){ if(typeof this.m_requestParms!="undefined"&&typeof this.m_requestParms.source!="undefined"){ return this.m_sAction+this.m_requestParms.source; } return null; }; function GetFilterableItemsAction(){ this.m_sAction="CollectFilterableItems"; }; GetFilterableItemsAction.prototype=new GetFilterInfoAction(); GetFilterableItemsAction.prototype.addActionContextAdditionalParms=function(){ return this.addClientContextData(3); }; GetFilterableItemsAction.prototype.getOnCompleteCallback=function(){ var _1744=this.getCognosViewer(); var _1745=_1744.getViewerWidget(); var _1746=function(_1747){ _1745.handleGetFilterableItemsResponse(_1747); }; return _1746; }; function UpdateDataFilterAction(){ this.m_sAction="UpdateDataFilter"; this.m_bForceRunSpec=false; }; UpdateDataFilterAction.prototype=new ModifyReportAction(); UpdateDataFilterAction.prototype.runReport=function(){ return this.getViewerWidget().shouldReportBeRunOnAction(); }; UpdateDataFilterAction.prototype.getActionKey=function(){ if(typeof this.m_requestParams!="undefined"){ try{ var parms=eval("("+this.m_requestParams+")"); if(parms.clientId!==null){ return this.m_sAction+parms.clientId; } } catch(e){ } } return null; }; UpdateDataFilterAction.prototype.canBeQueued=function(){ return true; }; UpdateDataFilterAction.prototype.keepFocusOnWidget=function(){ return false; }; UpdateDataFilterAction.prototype.isUndoable=function(){ return false; }; UpdateDataFilterAction.prototype.setRequestParms=function(parms){ this.m_requestParams=parms.filterPayload; this.m_drillResetHUN=parms.drillResetHUN; this.m_isFacet=parms.isFacet; if(parms.forceCleanup){ this.m_sForceCleanup=parms.forceCleanup; } }; UpdateDataFilterAction.prototype.forceRunSpecRequest=function(){ return this.m_bForceRunSpec; }; UpdateDataFilterAction.prototype.preProcessContextValues=function(){ var _174a=[]; var _174b=dojo.fromJson(this.m_requestParams); if(_174b&&_174b["com.ibm.widget.context"]&&(_174b["com.ibm.widget.context"]["values"]||_174b["com.ibm.widget.context"]["ranges"])){ var _174c=this.m_oCV.m_RAPReportInfo; var _174d=_174c.getContainers(); if(!_174d){ _174a; } var key=""; var _174f=""; if(_174b["com.ibm.widget.context"]["values"]){ key="values"; _174f=_174b["com.ibm.widget.context"]["values"]; }else{ key="ranges"; _174f=_174b["com.ibm.widget.context"]["ranges"]; } var _1750=_174c.collectSliderSetFromReportInfo(); for(dataItem in _174f){ if(_174c&&_174c.isReferenced(dataItem)){ var _1751=dojo.clone(_174b); var _1752={}; _1752[dataItem]=_174b["com.ibm.widget.context"][key][dataItem]; _1751["com.ibm.widget.context"][key]=_1752; if(_174b["com.ibm.widget.context.bux.selectValueControl"]&&_174b["com.ibm.widget.context.bux.selectValueControl"]["selectValueControl"]&&_174b["com.ibm.widget.context.bux.selectValueControl"]["selectValueControl"]["itemSpecification"]){ var _1753={}; _1751["com.ibm.widget.context.bux.selectValueControl"]["selectValueControl"]["itemSpecification"]={}; var _1754=document.forms["formWarpRequest"+this.m_oCV.getId()].packageBase.value; for(modelItem in _174b["com.ibm.widget.context.bux.selectValueControl"]["selectValueControl"]["itemSpecification"]){ if(modelItem.indexOf(_1754)!=-1){ _1753[dataItem]=_174b["com.ibm.widget.context.bux.selectValueControl"]["selectValueControl"]["itemSpecification"][modelItem][dataItem]; if(_1753[dataItem]){ _1751["com.ibm.widget.context.bux.selectValueControl"]["selectValueControl"]["itemSpecification"][modelItem]=_1753; break; } } } } var _1755=_174f[dataItem]&&key!=="ranges"?_174f[dataItem].length:0; if(this.checkIfFilterExpressionChanged(dataItem,_174b.clientId,_1755,_1750)){ this.m_bForceRunSpec=true; } _174a.push(dojo.toJson(_1751)); } } }else{ _174a.push(dojo.toJson(_174b)); } return _174a; }; UpdateDataFilterAction.prototype.checkIfFilterExpressionChanged=function(_1756,_1757,_1758,_1759){ if(!_1759||!_1759[_1757]||_1759[_1757].name!=_1756){ return true; } var _175a=_1759[_1757].values?_1759[_1757].values.length:0; if(_1758==_175a){ return false; } return (_1758===1)!==(_175a===1); }; UpdateDataFilterAction.prototype.addActionContext=function(){ var _175b="0){ _175b+=this._getDrillResetActionContext(); } if(this.m_sForceCleanup){ _175b+=""+dojo.toJson(this.m_sForceCleanup)+""; } var _175d; var _175e=(this.m_requestParams.charAt(0)==="<"); if(this.m_isFacet||_175e){ _175d=[this.m_requestParams]; }else{ _175d=this.preProcessContextValues(); } for(var idx=0;idx<_175d.length;++idx){ var _1760=_175d[idx]; _175b+=""+_175c; _175b+=(_175e)?_1760:xml_encode(_1760); if(idx>0){ _175b+="true"; } if(!this.m_isFacet){ _175b+=this.addClientContextData(3); } _175b+=""; _175b+=""; _175b+=""; } _175b+=""; return _175b; }; UpdateDataFilterAction.prototype._getDrillResetActionContext=function(){ var _1761=new DrillResetAction(); _1761.setCognosViewer(this.getCognosViewer()); var _1762={drilledResetHUNs:this.m_drillResetHUN}; _1761.setRequestParms(_1762); _1761.setUpdateInfoBar(false); var _1763=_1761.getReportActionContext(); return _1763; }; function CognosViewerSort(event,oCV){ this.m_oCV=oCV; if(event){ this.m_oEvent=event; this.m_oNode=getCrossBrowserNode(event,true); } }; CognosViewerSort.prototype.setNode=function(node){ this.m_oNode=node; }; CognosViewerSort.prototype.getNode=function(){ return this.m_oNode; }; CognosViewerSort.prototype.isSort=function(){ if(this.m_oNode&&this.m_oNode.nodeName=="IMG"&&(this.m_oNode.id).indexOf("sortimg")>=0){ return true; }else{ return false; } }; CognosViewerSort.prototype.execute=function(){ var _1767=getCognosViewerSCObjectRef(this.m_oCV.getId()); _1767.selectSingleDomNode(this.m_oNode.parentNode); var _1768=this.getSortAction(); _1768.setCognosViewer(this.m_oCV); _1768.execute(); if(window.gViewerLogger){ window.gViewerLogger.addContextInfo(_1767); } }; CognosViewerSort.prototype.getSortAction=function(){ var _1769=this.m_oCV.getAction("Sort"); var _176a=this.m_oNode.getAttribute("sortOrder"); if(_176a.indexOf("nosort")!=-1){ _1769.setRequestParms({order:"ascending",type:"value"}); }else{ if(_176a.indexOf("ascending")!=-1){ _1769.setRequestParms({order:"descending",type:"value"}); }else{ if(_176a.indexOf("descending")!=-1){ _1769.setRequestParms({order:"none",type:"value"}); } } } return _1769; }; function SortAction(){ this.m_sAction="Sort"; this.m_sortOrder="none"; this.m_sortType=""; this.m_sItem=""; this.m_sId=""; }; SortAction.prototype=new ModifyReportAction(); SortAction.prototype.doExecute=function(){ if(this.m_sortOrder==="none"){ if(this.getContainerId(this.m_oCV.getSelectionController())){ var _176b=this.getCurrentSortFromSelection(); if(this.m_sortType==="value"&&_176b.indexOf("sortByValue")===-1){ return false; }else{ if(this.m_sortType==="label"&&_176b.indexOf("sortByLabel")===-1){ return false; } } } } return true; }; SortAction.prototype.execute=function(){ if(this.doExecute()){ ModifyReportAction.prototype.execute.call(this); } }; SortAction.prototype.getUndoHint=function(){ if(this.m_sortOrder=="none"){ return RV_RES.IDS_JS_DONT_SORT; }else{ return RV_RES.IDS_JS_SORT; } }; SortAction.prototype.setRequestParms=function(_176c){ this.m_sortOrder=_176c.order; this.m_sortType=_176c.type; if(_176c.id!=null&&typeof _176c.id!="undefined"){ this.m_sId=_176c.id; } if(_176c.item!=null&&typeof _176c.item!="undefined"){ this.m_sItem=_176c.item; } }; SortAction.prototype.addActionContextAdditionalParms=function(){ var _176d=this.m_oCV.getSelectionController(); var parms=""+this.m_sortOrder+""; if(this.m_sortType=="label"){ parms+=""; } if(this.getContainerId(_176d)==""&&this.m_sId!=null&&typeof this.m_sId!="undefined"&&this.m_sId!=""){ parms+=(""+xml_encode(this.m_sId)+""); } if(this.m_sItem!=null&&typeof this.m_sItem!="undefined"&&this.m_sItem!=""){ parms+=(""+xml_encode(this.m_sItem)+""); } parms+=this.addClientContextData(3); parms+=this.getSelectedCellTags(); return parms; }; SortAction.prototype.toggleMenu=function(_176f,_1770){ if(_1770){ _176f.iconClass="sort"; _176f.disabled=false; }else{ _176f.iconClass="sortDisabled"; _176f.disabled=true; } return _176f; }; SortAction.prototype.updateMenu=function(_1771){ _1771.visible=this.ifContainsInteractiveDataContainer(); if(!_1771.visible){ return _1771; } this.buildMenu(_1771); if(_1771.disabled==true){ return this.toggleMenu(_1771,false); } return this.buildDynamicMenuItem(this.toggleMenu(_1771,true),"Sort"); }; SortAction.prototype.buildSelectedItemsString=function(_1772,_1773,_1774){ try{ var _1775=_1772[_1772.length-1]; if(_1773){ var _1776=_1775.getDisplayValues()[0]; if(typeof _1776=="undefined"){ _1776=_1775.getUseValues()[0][0]; } return _1776; }else{ return _1775.getDataItemDisplayValue(_1774); } } catch(e){ if(console&&console.log){ console.log(e); } } }; SortAction.prototype.buildMenu=function(_1777){ _1777.visible=this.ifContainsInteractiveDataContainer(); if(!_1777.visible){ return _1777; } if(!this.isSelectionSortable()){ return this.toggleMenu(_1777,false); } _1777=this.toggleMenu(_1777,true); var _1778=[]; var _1779=this.m_oCV.getSelectionController(); var _177a=_1779.getAllSelectedObjects(); if(_177a.length==1&&_177a[0].isHomeCell()==false){ var _177b=_1779.getDataContainerType(); var _177c=this.getContainerId(_1779); var _177d=this.getReportInfo(_177c); if(_177b==""&&!this.isSelectionOnChart()&&_177a[0].getLayoutType()=="section"){ if(_177d!=null){ _177b=_177d.displayTypeId; } } var _177e,_177f,_1780; var _1781=this.getCurrentSortFromSelection(); var _1782=this.isSelectionOnChart(); var _1783=_1781.indexOf("sortByValue")!=-1; var _1784=_1781.indexOf("sortByValueAscending")!=-1; var _1785=_1781.indexOf("sortByValueDescending")!=-1; var _1786=this.m_oCV.isIWidgetMobile(); if(_177b=="list"){ var _1787={name:"SortAscending",label:RV_RES.IDS_JS_SORT_ASCENDING,action:{name:"Sort",payload:{order:"ascending",type:"value"}},items:null}; this.addMenuItemChecked(_1784,_1787,"sortAscending"); _1778.push(_1787); var _1788={name:"SortDescending",label:RV_RES.IDS_JS_SORT_DESCENDING,action:{name:"Sort",payload:{order:"descending",type:"value"}},items:null}; this.addMenuItemChecked(_1785,_1788,"sortDescending"); _1778.push(_1788); var _1789={name:"DontSort",label:RV_RES.IDS_JS_DONT_SORT,action:{name:"Sort",payload:{order:"none",type:"value"}},items:null}; this.addMenuItemChecked(!_1783,_1789,"sortNone"); _1778.push(_1789); }else{ if(_177b=="crosstab"||_1782){ if(_177a[0].getLayoutType()=="columnTitle"||_1782){ _177e=this.m_oCV.getRAPReportInfo(); if(this.canSortByValueOnCrosstab(_177a[0],_177e)){ _177f=RV_RES.IDS_JS_SORT_BY_VALUE; if(_1782){ _1780=this.buildSelectedItemsString(_177a,true,_177d); if(typeof _1780!=="undefined"){ _177f+=":"+_1780; } } var _178a={name:"SortByValue",label:_177f,action:null,items:[{name:"Ascending",label:RV_RES.IDS_JS_SORT_BY_ASCENDING,action:{name:"Sort",payload:{order:"ascending",type:"value"}},items:null},{name:"Descending",label:RV_RES.IDS_JS_SORT_BY_DESCENDING,action:{name:"Sort",payload:{order:"descending",type:"value"}},items:null},{name:"SortNone",label:RV_RES.IDS_JS_DONT_SORT,action:{name:"Sort",payload:{order:"none",type:"value"}},items:null}]}; this.addMenuItemChecked(_1783,_178a); this.addMenuItemChecked(_1784,_178a.items[0],"sortAscending"); this.addMenuItemChecked(_1785,_178a.items[1],"sortDescending"); this.addMenuItemChecked(!_1783,_178a.items[2],"sortNone"); if(_1786){ _178a.flatten=true; } _1778.push(_178a); } if(this.canSortByLabelOnCrosstab(_177a[0])){ _177f=RV_RES.IDS_JS_SORT_BY_LABEL; if(_1782){ _1780=this.buildSelectedItemsString(_177a,false,_177d); if(typeof _1780!=="undefined"){ _177f+=":"+_1780; } } var _178b={name:"SortByLabel",label:_177f,action:null,items:[{name:"Ascending",label:RV_RES.IDS_JS_SORT_BY_ASCENDING,action:{name:"Sort",payload:{order:"ascending",type:"label"}},items:null},{name:"Descending",label:RV_RES.IDS_JS_SORT_BY_DESCENDING,action:{name:"Sort",payload:{order:"descending",type:"label"}},items:null},{name:"SortNone",label:RV_RES.IDS_JS_DONT_SORT,action:{name:"Sort",payload:{order:"none",type:"label"}},items:null}]}; var _178c=_1781.indexOf("sortByLabel")!=-1; this.addMenuItemChecked(_178c,_178b); this.addMenuItemChecked(_1781.indexOf("sortByLabelAscending")!=-1,_178b.items[0],"sortAscending"); this.addMenuItemChecked(_1781.indexOf("sortByLabelDescending")!=-1,_178b.items[1],"sortDescending"); this.addMenuItemChecked(!_178c,_178b.items[2],"sortNone"); if(_1786){ _178b.flatten=true; } _1778.push(_178b); } } } } } if(_1778.length==0){ this.toggleMenu(_1777,false); }else{ if(_1786){ if(_177b=="crosstab"||_1782){ _1777.useChildrenItems=true; }else{ _1777.flatten=true; } } _1777.items=_1778; this.toggleMenu(_1777,true); } return _1777; }; SortAction.prototype.isSelectionSortable=function(){ var _178d=this.m_oCV.getSelectionController(); var _178e=_178d.getAllSelectedObjects(); if(_178e.length==1){ var _178f=_178e[0]; if(_178d.getDataContainerType()=="crosstab"&&_178f.getLayoutType()=="datavalue"){ return false; } if(_178d.hasSelectedChartNodes()){ var node=_178f.getArea(); if(node.nodeName=="AREA"||node.nodeName=="IMG"){ return _178e[0].getLayoutType()=="ordinalAxisLabel"||_178e[0].getLayoutType()=="legendLabel"; } }else{ var data=_178f.getDataItems(); if(_178f.getCellRef().getAttribute("type")=="datavalue"&&!(data&&data.length)){ return false; } var oCell=_178f.getCellRef(); if(oCell.getAttribute("no_data_item_column")==="true"){ return false; } if(oCell.getAttribute("canSort")!="false"){ return true; } } } return false; }; SortAction.prototype.getCurrentSortFromSelection=function(){ var _1793=this.getContainerId(this.m_oCV.getSelectionController()); var _1794=this.m_oCV.getRAPReportInfo(); var _1795=""; if(_1793!=""&&_1794){ var _1796=_1794.getContainer(_1793); if(typeof _1796.sort!="undefined"){ var _1797=this.m_oCV.getSelectionController(); var _1798=_1797.getAllSelectedObjects(); if(_1798.length==1){ var _1799=_1798[0].getDataItems(); if(_1799.length<1){ return _1795; } var _179a=_1799[0][0]; for(var index=0;index<_1796.sort.length;++index){ var _179c=_1796.sort[index]; if(typeof _179c.labels=="string"&&_179c.labels==_179a){ _1795+=_179c.order=="descending"?"sortByLabelDescending":"sortByLabelAscending"; } if(typeof _179c.valuesOf=="string"&&(_179c.valuesOf==_179a||this.isSortedValueOnRenamedColumn(_1798[0],_179c))){ _1795+=_179c.order=="descending"?"sortByValueDescending":"sortByValueAscending"; }else{ if(_179c.valuesOf instanceof Array){ var match=true; for(var _179e=0;_179e<_179c.valuesOf.length;++_179e){ if(_179e<_1798[0].m_contextIds[0].length){ var ctx=_1798[0].m_contextIds[0][_179e]; var _17a0=_1797.getDisplayValue(ctx); var _17a1=this.findItemLabel(_1796,_179c.valuesOf[_179e].item); if(_17a1!=_17a0){ match=false; break; } } } if(match){ _1795+=_179c.valuesOf[0].order=="descending"?"sortByValueDescending":"sortByValueAscending"; } } } } } } } return _1795; }; SortAction.prototype.isSortedValueOnRenamedColumn=function(_17a2,_17a3){ if(_17a3&&_17a2){ return (_17a3.valuesOf===_17a2.getColumnRP_Name()&&_17a2.getLayoutType()==="columnTitle"); } }; SortAction.prototype.findItemLabel=function(_17a4,item){ var _17a6=_17a4.itemInfo; if(_17a6){ for(var i=0;i<_17a6.length;i++){ if(_17a6[i].item===item){ if(_17a6[i].itemLabel){ return _17a6[i].itemLabel; } break; } } } return item; }; SortAction.prototype.canSortByValueOnCrosstab=function(_17a8,_17a9){ var _17aa=this.m_oCV.getSelectionController(); var _17ab=this.getContainerId(this.m_oCV.getSelectionController()); if(_17aa.isRelational()==true){ return false; } if(_17aa.selectionsHaveCalculationMetadata()&&this.selectedObjectIsLeaf(_17ab,_17a8,_17a9)){ var aMuns=_17a8.getMuns()[0]; for(var index=0;index=0){ return false; } } return true; } return false; }; SortAction.prototype.selectedObjectIsLeaf=function(_17ae,_17af,_17b0){ if(_17b0){ var _17b1=_17af.getDataItems(); if(_17b1!=null&&typeof _17b1!="undefined"&&_17b1.length>0){ var _17b2=_17b0.getDrillability(_17ae,_17b1[0][0]); if(_17b2){ return _17b2.leaf==true; } } } return false; }; SortAction.prototype.canSortByLabelOnCrosstab=function(_17b3){ var _17b4=this.m_oCV.getSelectionController(); var _17b5=_17b4.getAllSelectedObjects(); if(_17b5.length==1){ var _17b3=_17b5[0]; if(this.isSelectSingleMember(_17b3)==false){ if(_17b4.selectionsNonMeasureWithMUN()||!_17b4.selectionsHaveCalculationMetadata()){ return true; } } } return false; }; function RedrawAction(){ this.m_specUpdated=false; }; RedrawAction.prototype=new ModifyReportAction(); RedrawAction.prototype.reuseQuery=function(){ return true; }; RedrawAction.prototype.keepRAPCache=function(){ return false; }; RedrawAction.prototype.setSpecUpdated=function(flag){ this.m_specUpdated=flag; }; RedrawAction.prototype.getUndoHint=function(){ return RV_RES.IDS_JS_ADVANCED_EDITING; }; RedrawAction.prototype.addActionContext=function(){ if(this.m_specUpdated){ return ""; } return ""; }; function EditContentAction(){ this._oMissingMemberRecoveryMode=null; }; EditContentAction.prototype=new CognosViewerAction(); EditContentAction.superclass=CognosViewerAction.prototype; EditContentAction.prototype.execute=function(){ if(typeof this.preferencesChanged!="undefined"&&this.preferencesChanged!==null&&this.preferencesChanged===true){ this.deleteCWAContainer(); return; } window.CVEditContentActionInstance=this; var _17b7=window.viewerCWAContainer?true:false; if(!window.viewerCWAContainer){ this.createCWAContainer(); } this.addWindowEventListeners(); this.buildBUAObjects(); window.viewerCWAContainer.show(); if(_17b7){ window.BUAEvent("appReady"); } }; EditContentAction.prototype.createCWAContainer=function(){ this.deleteCWAContainer(); var _17b8=this.createCWAIFrame(); var _17b9=this.createBlocker(); window.viewerCWAContainer={"type":"iframe","containerDiv":_17b8,"blocker":_17b9,"iframePadding":"18","show":function(){ this.resize(); this.containerDiv.style.display="block"; this.blocker.style.display="block"; },"hide":function(){ this.blocker.style.display="none"; this.containerDiv.style.display="none"; },"resize":function(){ var _17ba=dojo.window.getBox(); this.containerDiv.style.height=_17ba.h-this.iframePadding+"px"; this.containerDiv.style.width=_17ba.w-this.iframePadding+"px"; }}; }; EditContentAction.prototype.deleteCWAContainer=function(){ var _17bb=window.viewerCWAContainer; if(_17bb){ _17bb.hide(); document.body.removeChild(_17bb.containerDiv); document.body.removeChild(_17bb.blocker); delete window.viewerCWAContainer; window.viewerCWAContainer=null; } }; EditContentAction.prototype.hideCWAContainer=function(){ this.removeWindowEventListeners(); if(window.viewerCWAContainer){ window.viewerCWAContainer.hide(); } window.CVEditContentActionInstance=null; }; EditContentAction.prototype.createCWAIFrame=function(){ var _17bc=document.createElement("div"); _17bc.className="buaContainer"; document.body.appendChild(_17bc); var _17bd=document.createElement("iframe"); _17bd.setAttribute("id","buaIframe"); _17bd.setAttribute("src",this.getWebContent()+"/pat/rsapp.htm"); _17bd.setAttribute("name","buaIframe"); _17bd.setAttribute("frameborder","0"); _17bd.className="buaIframe"; _17bc.appendChild(_17bd); return _17bc; }; EditContentAction.prototype.createBlocker=function(){ var _17be=document.createElement("div"); _17be.setAttribute("id","reportBlocker"); _17be.setAttribute("name","reportBlocker"); _17be.setAttribute("tabIndex","1"); _17be.className="reportBlocker"; document.body.appendChild(_17be); return _17be; }; EditContentAction.prototype.buildBUAObjects=function(){ window.RSParameters={"rs_UIProfile":"BUA","ui.action":"edit","gateway":location.protocol+"//"+location.host+this.getGateway(),"theme":"corporate","capabilitiesXML":this.getCapabilitiesXml(),"cafcontextid":this.getCafContextId(),"paneOnRight":this.getViewerIWidget().getPaneOnRight()}; var _17bf=this.getViewerIWidget(); if(_17bf!==null){ var _17c0=_17bf.getAttributeValue("gateway"); if(_17c0){ window.RSParameters["cv.gateway"]=_17c0; } var _17c1=_17bf.getAttributeValue("webcontent"); if(_17c1){ window.RSParameters["cv.webcontent"]=_17c1; } } this.addExtraLaunchParameters(window.RSParameters); }; EditContentAction.prototype.getBUAIframe=function(){ return document.getElementById("buaIframe"); }; EditContentAction.prototype.getBUAWindow=function(){ var _17c2=null; var _17c3=this.getBUAIframe(); if(_17c3!==null){ _17c2=_17c3.contentWindow; } return _17c2; }; EditContentAction.prototype.setReportSettings=function(){ var oCV=this.getCognosViewer(); var _17c5=oCV.getViewerWidget(); _17c5.fireEvent("com.ibm.bux.widget.getDisplayTitle",null,{callback:function(_17c6){ window.CVEditContentActionInstance.openReportWithBUA(_17c6); }}); }; EditContentAction.prototype.openReportWithBUA=function(_17c7){ var _17c8=this.m_oCV.envParams["ui.spec"].indexOf(""); if(_17c8==-1){ _17c8=0; }else{ _17c8="".length; } var _17c9=this.m_oCV.envParams["ui.spec"].substr(_17c8,this.m_oCV.envParams["ui.spec"].length); var _17ca={"displayName":xml_decode(_17c7),"parameterValues":this.m_oCV.getExecutionParameters(),"reportXML":_17c9,"showOpenTransition":false}; if(this.ifPassTrackingtoBUA()){ _17ca.tracking=this.m_oCV.getTracking(); } var _17cb=this.getBUAWindow(); _17cb.Application.SetBUAContext(_17ca); }; EditContentAction.prototype.getViewerIWidget=function(){ return this.m_oCV.getViewerWidget(); }; EditContentAction.prototype.getGateway=function(){ return this.m_oCV.getGateway(); }; EditContentAction.prototype.getCapabilitiesXml=function(){ return this.m_oCV.capabilitiesXML; }; EditContentAction.prototype.getCafContextId=function(){ return typeof this.m_oCV.cafContextId!="undefined"?this.m_oCV.cafContextId:""; }; EditContentAction.prototype.getWebContent=function(){ return this.getCognosViewer().getWebContentRoot(); }; EditContentAction.prototype.addExtraLaunchParameters=function(_17cc){ }; EditContentAction.prototype.runUpdatedReportFromBUA=function(){ var _17cd=this.getBUAWindow(); var _17ce=this.m_oCV.envParams["ui.spec"]; var _17cf=_17cd.Application.GetBUAContext(); if(_17cf.isSpecModified){ this.m_oCV.envParams["ui.spec"]=_17cf.reportXML; this.m_oCV.setTracking(_17cf.tracking); this.m_oCV.setExecutionParameters(_17cf.parameterValues); this._invokeRedrawAction(_17ce); } }; EditContentAction.prototype._invokeRedrawAction=function(_17d0){ this.getUndoRedoQueue().setOriginalSpec(_17d0); var _17d1=this.m_oCV.getAction("Redraw"); _17d1.setSpecUpdated(true); this.m_oCV.getViewerWidget().setPromptParametersRetrieved(false); _17d1.execute(); }; EditContentAction.prototype.ifPassTrackingtoBUA=function(){ if(this.m_oCV.getRAPReportInfo()){ return this.m_oCV.getRAPReportInfo().getPassTrackingtoBUA(); } return true; }; EditContentAction.prototype.setRequestParms=function(_17d2){ EditContentAction.superclass.setRequestParms(_17d2); if(_17d2){ if(_17d2.preferencesChanged){ this.preferencesChanged=_17d2.preferencesChanged; } if(_17d2.MissingMemberRecoveryMode){ this._oMissingMemberRecoveryMode=_17d2.MissingMemberRecoveryMode; } } }; EditContentAction.prototype.runUpdatedReportFromBUA_MissingMemberRecoveryMode=function(){ var _17d3=this.getBUAWindow(); var _17d4=this.m_oCV.envParams["ui.spec"]; var _17d5=_17d3.Application.GetBUAContext(); this.m_oCV.setTracking(_17d5.tracking); this.m_oCV.envParams["ui.spec"]=_17d5.reportXML; this.m_oCV.setExecutionParameters(_17d5.parameterValues); if(this._oMissingMemberRecoveryMode&&this._oMissingMemberRecoveryMode.oFaultDialog){ this._oMissingMemberRecoveryMode.oFaultDialog.hide(); } this._invokeRedrawAction(_17d4); }; EditContentAction.prototype.cancelPressed=function(){ }; EditContentAction.prototype.addWindowEventListeners=function(){ if(window.attachEvent){ window.attachEvent("onresize",window.CVEditContentActionInstance.onWindowResize); }else{ window.addEventListener("resize",window.CVEditContentActionInstance.onWindowResize,false); } }; EditContentAction.prototype.removeWindowEventListeners=function(){ if(window.detachEvent){ window.detachEvent("onresize",window.CVEditContentActionInstance.onWindowResize); }else{ window.removeEventListener("resize",window.CVEditContentActionInstance.onWindowResize,false); } }; EditContentAction.prototype.onWindowResize=function(){ var _17d6=window.viewerCWAContainer; if(_17d6){ _17d6.resize(); } }; function BUAEvent(_17d7){ var _17d8=window.CVEditContentActionInstance; switch(_17d7){ case "appReady": _17d8.setReportSettings(); break; case "donePressed": _17d8.hideCWAContainer(); if(_17d8._oMissingMemberRecoveryMode){ _17d8.runUpdatedReportFromBUA_MissingMemberRecoveryMode(); }else{ _17d8.runUpdatedReportFromBUA(); } break; case "cancelPressed": _17d8.cancelPressed(); _17d8.hideCWAContainer(); break; } }; function NewReportAction(){ this._viewerIWidget=null; this._packageSearchPath=null; this._webContentRoot=null; this._gateway=null; this._capabilitiesXml=null; this._cafContextId=null; }; NewReportAction.prototype=new EditContentAction(); NewReportAction.prototype.parent=EditContentAction.prototype; NewReportAction.prototype.clearSelections=function(){ }; NewReportAction.prototype.getCognosViewer=function(){ return this.getViewerIWidget().getViewerObject(); }; NewReportAction.prototype.setRequestParms=function(_17d9){ this.parent.setRequestParms.call(this,_17d9); this._packageSearchPath=_17d9.packageSearchPath; this._viewerIWidget=_17d9.viewerIWidget; this._webContentRoot=_17d9.webContentRoot; this._gateway=_17d9.gateway; this._capabilitiesXml=_17d9.capabilitiesXml; this._cafContextId=_17d9.cafContextId; }; NewReportAction.prototype.getViewerIWidget=function(){ return this._viewerIWidget; }; NewReportAction.prototype.getGateway=function(){ return this._gateway; }; NewReportAction.prototype.getCapabilitiesXml=function(){ return this._capabilitiesXml; }; NewReportAction.prototype.getCafContextId=function(){ return this._cafContextId?this._cafContextId:""; }; NewReportAction.prototype.getWebContent=function(){ return this._webContentRoot; }; NewReportAction.prototype.setReportSettings=function(){ var _17da={"showOpenTransition":false,"model":this._packageSearchPath}; var _17db=this.getBUAWindow(); _17db.Application.SetBUAContext(_17da); }; NewReportAction.prototype.addExtraLaunchParameters=function(_17dc){ _17dc.model=this._packageSearchPath; }; NewReportAction.prototype.cancelPressed=function(){ this.getViewerIWidget().iContext.iEvents.fireEvent("com.ibm.bux.widget.action",null,{action:"deleteWidget"}); }; NewReportAction.prototype.runUpdatedReportFromBUA=function(){ var _17dd=this.getViewerIWidget(); _17dd.setAttributeValue("reportCreatedInCW","true"); var _17de=this.getBUAWindow().Application.GetBUAContext(); _17dd.setNewReportInfo({"ui.spec":_17de.reportXML,"m_tracking":_17de.tracking?_17de.tracking:"","parameterValues":_17de.parameterValues?_17de.parameterValues:""}); _17dd.onLoad(); }; function AuthoredDrillAction(){ this.m_drillTargetSpecification=""; }; AuthoredDrillAction.prototype=new CognosViewerAction(); AuthoredDrillAction.prototype.setRequestParms=function(_17df){ this.m_drillTargetSpecification=_17df; }; AuthoredDrillAction.prototype.executeDrillTarget=function(_17e0){ var _17e1=XMLHelper_GetFirstChildElement(XMLBuilderLoadXMLFromString(_17e0)); var _17e2=encodeURIComponent(_17e1.getAttribute("bookmarkRef")); var _17e3=_17e1.getAttribute("path"); var _17e4=this._shouldShowInNewWindow(_17e1); var oCV=this.getCognosViewer(); if((_17e2!==null&&_17e2!=="")&&(_17e3===null||_17e3==="")){ var _17e6=_17e1.getAttribute("bookmarkPage"); if(_17e6&&_17e6!==""){ oCV.executeAction("GotoPage",{"pageNumber":_17e6,"anchorName":_17e2}); }else{ document.location="#"+_17e2; } }else{ var _17e7=""; if(_17e4){ _17e7="_blank"; } var _17e8=[]; var _17e9=[]; _17e9.push("obj"); _17e9.push(_17e3); _17e8[_17e8.length]=_17e9; var _17ea=false; var _17eb,_17ec,_17ed,sName,sNil; var _17f0=XMLHelper_FindChildrenByTagName(_17e1,"drillParameter",false); for(var index=0;index<_17f0.length;++index){ _17eb=[]; _17ec=_17f0[index]; _17ed=_17ec.getAttribute("value"); sName=_17ec.getAttribute("name"); if(_17ed!==null&&_17ed!==""){ _17eb.push("p_"+sName); _17eb.push(this.buildSelectionChoicesSpecification(_17ec)); } sNil=_17ec.getAttribute("nil"); if(sNil!==null&&sNil!==""){ _17eb.push("p_"+sName); _17eb.push(this.buildSelectionChoicesNilSpecification()); } if(_17eb.length>0){ _17e8[_17e8.length]=_17eb; } if(!_17ea){ var _17f2=_17ec.getAttribute("propertyToPass"); _17ea=(_17f2&&_17f2.length>0)?true:false; } } var _17f3=_17e1.getAttribute("method"); var _17f4=_17e1.getAttribute("outputFormat"); var _17f5=_17e1.getAttribute("outputLocale"); var _17f6=_17e1.getAttribute("prompt"); var _17f7=_17e1.getAttribute("dynamicDrill"); var _17f8=this.getXMLNodeAsString(_17e1,"parameters"); var _17f9=this.getXMLNodeAsString(_17e1,"objectPaths"); var oCVId=oCV.getId(); var _17fb=document.forms["formWarpRequest"+oCVId]; var _17fc=oCV.getAdvancedServerProperty("VIEWER_JS_CALL_FORWARD_DRILLTHROUGH_TO_SELF"); if((!_17fc||_17fc.toLowerCase()!=="false")&&_17f6!="true"&&this.isSameReport(_17fb,_17e3)&&this.isSameReportFormat(_17f4)&&!_17e4&&!_17ea){ var _17fd=new ViewerDispatcherEntry(oCV); _17fd.addFormField("ui.action","forward"); if(oCV!==null&&typeof oCV.rvMainWnd!="undefined"){ oCV.rvMainWnd.addCurrentReportToReportHistory(); var _17fe=oCV.rvMainWnd.saveReportHistoryAsXML(); _17fd.addFormField("cv.previousReports",_17fe); } for(index=0;index<_17f0.length;++index){ _17eb=[]; _17ec=_17f0[index]; _17ed=_17ec.getAttribute("value"); sName=_17ec.getAttribute("name"); sNil=_17ec.getAttribute("nil"); if((sNil===null||sNil==="")&&(_17ed===null||_17ed==="")){ _17eb.push("p_"+sName); _17eb.push(this.buildSelectionChoicesNilSpecification()); } if(_17eb.length>0){ _17e8[_17e8.length]=_17eb; } } for(index=1;index<_17e8.length;index++){ _17fd.addFormField(_17e8[index][0],_17e8[index][1]); } _17fd.addFormField("_drillThroughToSelf","true"); if(oCV.m_tabsPayload&&oCV.m_tabsPayload.tabs){ _17fd.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",oCV.m_tabsPayload.tabs[0].id); } oCV.setUsePageRequest(true); oCV.dispatchRequest(_17fd); if(typeof oCV.m_viewerFragment=="undefined"){ var _17ff=getCognosViewerObjectRefAsString(oCVId); setTimeout(_17ff+".getRequestIndicator().show()",10); } }else{ doSingleDrill(_17e7,_17e8,_17f3,_17f4,_17f5,_17e2,_17f8,_17f9,this.getCognosViewer().getId(),_17f6,_17f7); } } }; AuthoredDrillAction.prototype._shouldShowInNewWindow=function(_1800){ return _1800.getAttribute("showInNewWindow")=="true"; }; AuthoredDrillAction.prototype.isSameReport=function(_1801,_1802){ if(_1801["ui.object"]&&_1802==_1801["ui.object"].value){ return true; } return false; }; AuthoredDrillAction.prototype.isSameReportFormat=function(_1803){ var _1804=this.getCognosViewer().envParams["run.outputFormat"]; if(_1804){ if(_1803==_1804){ return true; }else{ if(_1804=="HTML"&&_1803=="HTMLFragment"){ return true; } } } return false; }; AuthoredDrillAction.prototype.getXMLNodeAsString=function(_1805,_1806){ var sXML=""; if(_1805!=null){ var node=XMLHelper_FindChildByTagName(_1805,_1806,false); if(node!=null){ sXML=XMLBuilderSerializeNode(node); } } return sXML; }; AuthoredDrillAction.prototype.execute=function(_1809){ if(this.m_drillTargetSpecification!=""){ this.executeDrillTarget(this.m_drillTargetSpecification); }else{ if(typeof _1809!="undefined"){ var _180a=this.getCognosViewer().getDrillTargets(); var _180b=this.getAuthoredDrillThroughContext(_1809,_180a); var _180c=_180b.childNodes; if(_180c.length==1){ this.executeDrillTarget(XMLBuilderSerializeNode(_180c[0])); }else{ doMultipleDrills(XMLBuilderSerializeNode(_180b),this.getCognosViewer().getId()); } } } }; AuthoredDrillAction.prototype.showDrillTargets=function(_180d){ var _180e=""; for(var index=0;index<_180d.length;++index){ var _1810=_180d[index]; _180e+=""; var sName=_1810.getAttribute("label"); _180e+=""; _180e+=sXmlEncode(sName); _180e+=""; var _1812=_1810.getAttribute("path"); _180e+=""; _180e+=sXmlEncode(_1812); _180e+=""; var _1813=_1810.getAttribute("method"); _180e+=""; _180e+=sXmlEncode(_1813); _180e+=""; var _1814=_1810.getAttribute("outputFormat"); _180e+=""; _180e+=sXmlEncode(_1814); _180e+=""; var sData="parent."+this.getTargetReportRequestString(_1810); _180e+=""; _180e+=sXmlEncode(sData); _180e+=""; _180e+=""; } _180e+=""; }; AuthoredDrillAction.prototype.populateContextMenu=function(_1816){ var _1817=this.getCognosViewer(); var _1818=_1817.rvMainWnd.getToolbarControl(); var _1819=null; if(typeof _1818!="undefined"&&_1818!=null){ var _181a=_1818.getItem("goto"); if(_181a){ _1819=_181a.getMenu(); } } var _181b=_1817.rvMainWnd.getContextMenu(); var _181c=null; if(typeof _181b!="undefined"&&_181b!=null){ _181c=_181b.getGoToMenuItem().getMenu(); } if(_1819!=null||_181c!=null){ var _181d=this.getCognosViewer().getDrillTargets(); var _181e=this.getAuthoredDrillThroughContext(_1816,_181d); var _181f=_181e.childNodes; if(_181f.length>0){ for(var index=0;index<_181f.length;++index){ var _1821=_181f[index]; var _1822=getCognosViewerObjectRefAsString(this.getCognosViewer().getId())+".m_oDrillMgr.executeAuthoredDrill(\""+encodeURIComponent(XMLBuilderSerializeNode(_1821))+"\");"; var _1823=this.getTargetReportIconPath(_1821); var _1824=_1821.getAttribute("label"); if(isViewerBidiEnabled()){ var bidi=BidiUtils.getInstance(); _1824=bidi.btdInjectUCCIntoStr(_1824,getViewerBaseTextDirection()); } if(_1819!=null){ new CMenuItem(_1819,_1824,_1822,_1823,gMenuItemStyle,_1817.getWebContentRoot(),_1817.getSkin()); } if(_181c!=null){ new CMenuItem(_181c,_1824,_1822,_1823,gMenuItemStyle,_1817.getWebContentRoot(),_1817.getSkin()); } } } } }; AuthoredDrillAction.prototype.buildSelectionChoicesNilSpecification=function(){ return ""; }; AuthoredDrillAction.prototype.buildSelectionChoicesSpecification=function(_1826){ var _1827=""; var _1828=_1826.getAttribute("value"); if(_1828!=null){ var _1829=_1826.getAttribute("propertyToPass"); _1827+="")!=-1){ _1827+=_1828.substring(_1828.indexOf("")+15); }else{ if(_1828!=""){ _1827+="=_184c.length){ continue; } var _1857=_184c[_1856]; if(typeof _1857!="object"){ continue; } _1853.setAttribute("outputFormat",_1857.getOutputFormat()); _1853.setAttribute("outputLocale",_1857.getOutputLocale()); _1853.setAttribute("prompt",_1857.getPrompt()); _1853.setAttribute("dynamicDrill",_1857.isDynamicDrillThrough()?"true":"false"); var _1858=_1850[_1852].getAttribute("label"); if(_1858===null||_1858===""){ _1858=_1857.getLabel(); } _1853.setAttribute("label",_1858); _1853.setAttribute("path",_1857.getPath()); _1853.setAttribute("showInNewWindow",_1857.getShowInNewWindow()); _1853.setAttribute("method",_1857.getMethod()); var _1859=_184f; var _185a=""; var _185b=_1857.getParameterProperties(); if(typeof _185b!="undefined"&&_185b!=null&&_185b!=""){ _185a=XMLHelper_GetFirstChildElement(XMLBuilderLoadXMLFromString(_1857.getParameterProperties())); } while(_1859){ var _185c=_1859.childNodes[_1852].childNodes; for(var _185d=0;_185d<_185c.length;++_185d){ var _185e=_185c[_185d].cloneNode(true); if(_185a){ var _185f=this.getPropertyToPass(_185e.getAttribute("name"),_185a); if(_185f!=null&&_185f!=""){ _185e.setAttribute("propertyToPass",_185f); } } _1853.appendChild(_185e); } _1859=_1859.nextSibling; } var _1860=""; var _1861=""; var _1862=_1860+_1857.getParameters()+_1861; var _1863=XMLBuilderLoadXMLFromString(_1862); var _1864=XMLHelper_GetFirstChildElement(XMLHelper_GetFirstChildElement(_1863)); if(_1864){ _1853.appendChild(_1864.cloneNode(true)); } var _1865=_1860+_1857.getObjectPaths()+_1861; var _1866=XMLBuilderLoadXMLFromString(_1865); _1864=XMLHelper_GetFirstChildElement(XMLHelper_GetFirstChildElement(_1866)); if(_1864){ _1853.appendChild(_1864.cloneNode(true)); } } return XMLHelper_GetFirstChildElement(_1851); }; function ChangeDisplayTypeAction(){ this.m_requestParams=null; this.m_sAction="ChangeDataContainerType"; this.m_iMAX_NUM_SUGGESTED_DISPLAY_TYPES=5; }; ChangeDisplayTypeAction.prototype=new ModifyReportAction(); ChangeDisplayTypeAction.prototype.getUndoHint=function(){ return RV_RES.IDS_JS_CHANGE_DISPLAY; }; ChangeDisplayTypeAction.prototype.setRequestParms=function(parms){ this.m_requestParams=parms; }; ChangeDisplayTypeAction.prototype.addActionContextAdditionalParms=function(){ this._cleaerPinAndFreeze(); var _1868=false; if(this.m_requestParams.bestVisualization){ _1868=true; }else{ if(((this.m_requestParams.targetType.targetType==undefined)||(this.m_requestParams.targetType.targetType=="undefined"))&&(this.m_requestParams.targetType.templateId==undefined)){ var _1869=eval("("+this.m_requestParams.targetType+")"); }else{ var _1869=this.m_requestParams.targetType; } } var _186a=this.m_oCV.getViewerWidget().findContainerDiv(); var _186b=""; if(_186a){ _186b=""+(parseInt(_186a.style.width,10)-ResizeChartAction.PADDING.getWidth())+"px"+""+(parseInt(_186a.style.height,10)-ResizeChartAction.PADDING.getHeight())+"px"; } var _186c=""; if(_1868){ _186c+="true"; _186c+=this.getDataItemInfoMap(); }else{ _186c+=""; _186c+=_1869.targetType; _186c+=""; if(_1869.templateId){ _186c+=""; _186c+=((_1869.templateId)?_1869.templateId:""); _186c+=""; _186c+=""; _186c+=((_1869.variationId)?_1869.variationId:""); _186c+=""; _186c+=this.getDataItemInfoMap(); } _186c+=""; } _186c+=_186b; _186c+=this.addClientContextData(3); return (_186c); }; ChangeDisplayTypeAction.prototype._cleaerPinAndFreeze=function(){ var _186d=this.m_oCV.getPinFreezeManager(); if(_186d){ var _186e=this.getContainerId(this.m_oCV.getSelectionController()); _186d.clearPinInfo(_186e); } }; ChangeDisplayTypeAction.prototype.updateMenu=function(_186f){ var _1870=this.getCognosViewer().getRAPReportInfo(); _186f.visible=(_1870)?_1870.containsInteractiveDataContainer():_186f.visible; if(!_186f.visible){ return _186f; } var _1871=this.getSelectedReportInfo(); _186f.disabled=(_1871==null||_1871.displayTypeId==null||!this.isInteractiveDataContainer(_1871.displayTypeId)); if(_186f.disabled){ _186f.iconClass="chartTypesDisabled"; return _186f; } _186f.iconClass="chartTypes"; return this.buildDynamicMenuItem(_186f,"ChangeDisplayType"); }; ChangeDisplayTypeAction.prototype.createEmptyMenuItem=function(){ return {name:"None",label:RV_RES.IDS_JS_CHANGE_DISPLAY_SELECT_DATA,iconClass:"",action:null,items:null}; }; ChangeDisplayTypeAction.prototype.getActionContextString=function(_1872){ var _1873=""; _1873+=""; _1873+=""; _1873+=this.getDataItemInfoMap(); _1873+=""; _1873+=_1872; _1873+=""; _1873+=this.addClientContextData(3); _1873+=""; _1873+=""; return _1873; }; ChangeDisplayTypeAction.prototype.fetchSuggestedDisplayTypes=function(_1874){ var oCV=this.getCognosViewer(); var _1876=new AsynchJSONDispatcherEntry(oCV); _1876.addFormField("ui.action","getInfoFromReportSpec"); _1876.addFormField("bux","true"); _1876.addFormField("ui.object",oCV.envParams["ui.object"]); _1876.addFormField("cv.actionContext",this.getActionContextString(_1874)); _1876.addDefinedFormField("ui.spec",oCV.envParams["ui.spec"]); _1876.addNonEmptyStringFormField("modelPath",oCV.getModelPath()); if(_1874=="undefined"){ _1876.setCallbacks({"complete":{"object":this,"method":this.handleSuggestedDisplayTypesResponse}}); }else{ _1876.setCallbacks({"complete":{"object":this,"method":this.handleSuggestedDisplayVariationsResponse}}); } oCV.dispatchRequest(_1876); }; ChangeDisplayTypeAction.prototype.handleSuggestedDisplayTypesResponse=function(_1877){ var _1878=this.getCognosViewer(); var _1879=_1878.getViewerWidget(); this.addSuggestedDisplayTypesMenuItems(_1877.getResult()); }; ChangeDisplayTypeAction.prototype.addSuggestedDisplayTypesMenuItems=function(_187a){ var _187b=this.getCognosViewer().findToolbarItem("ChangeDisplayType"); if(_187b){ _187b.open=false; } var _187c=[]; var _187d=this.getSelectedReportInfo(); var _187e=undefined; for(var x=0;x<_187a.containers.length;x++){ if(_187d.container==_187a.containers[x].container){ _187e=_187a.containers[x]; break; } } if(_187e==undefined){ return; } var _1880=_187e.suggestedDisplayTypes.length<=this.m_iMAX_NUM_SUGGESTED_DISPLAY_TYPES?_187e.suggestedDisplayTypes.length:this.m_iMAX_NUM_SUGGESTED_DISPLAY_TYPES; _187c.push({title:RV_RES.IDS_JS_CHANGE_DISPLAY_RECOMMENDED}); _187c.push({separator:true}); for(var i=0;i<_1880;i++){ _187c.push({name:_187e.suggestedDisplayTypes[i].name,label:_187e.suggestedDisplayTypes[i].title,description:_187e.suggestedDisplayTypes[i].description,iconClass:_187e.suggestedDisplayTypes[i].iconClass,action:{name:"ChangeDisplayType",payload:{targetType:{templateId:_187e.suggestedDisplayTypes[i].templateId},label:_187e.suggestedDisplayTypes[i].title}},items:null}); } _187c.push({separator:true}); _187c.push({name:"ChangeDisplayMore",label:RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_MORE,iconClass:"ChartTypeOther",action:{name:"InvokeChangeDisplayTypeDialog",payload:{}},items:null}); _187b.open=true; _187b.items=_187c; var _1882=[]; _1882.push(_187b); this.getCognosViewer().getViewerWidget().fireEvent("com.ibm.bux.widgetchrome.toolbar.update",null,_1882); return _187c; }; ChangeDisplayTypeAction.prototype.buildMenu=function(_1883){ var _1884=this.getCognosViewer().getRAPReportInfo(); _1883.visible=(_1884)?_1884.containsInteractiveDataContainer():_1883.visible; if(!_1883.visible){ return _1883; } var _1885=this.getSelectedReportInfo(); _1883.disabled=(_1885==null||_1885.displayTypeId==null||!this.isInteractiveDataContainer(_1885.displayTypeId)); if(_1883.disabled){ _1883.iconClass="chartTypesDisabled"; }else{ _1883.iconClass="chartTypes"; var _1886=this.getCognosViewer().getAdvancedServerProperty("VIEWER_JS_enableVisCoach"); if(_1886!=="false"&&(typeof _1885.suggestedDisplayTypesEnabled!="undefined")&&(_1885.suggestedDisplayTypesEnabled!=null)&&(_1885.suggestedDisplayTypesEnabled=="true")){ this.fetchSuggestedDisplayTypes("undefined"); return this.buildDynamicMenuItem(_1883,"ChangeDisplayType"); }else{ _1883.items=[]; var isV2=(_1885.displayTypeId.match("v2_")!=null||_1885.displayTypeId=="crosstab"||_1885.displayTypeId=="list"); if(isV2){ _1883.items.push({name:"ChangeDisplayBar",label:RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_BAR,iconClass:"ChartTypeBar",action:{name:"ChangeDisplayType",payload:{targetType:"v2_bar_rectangle_clustered"}},items:null}); _1883.items.push({name:"ChangeDisplayColumn",label:RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_COLUMN,iconClass:"ChartTypeColumn",action:{name:"ChangeDisplayType",payload:{targetType:"v2_column_rectangle_clustered"}},items:null}); _1883.items.push({name:"ChangeDisplayLine",label:RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_LINE,iconClass:"ChartTypeLine",action:{name:"ChangeDisplayType",payload:{targetType:"v2_line_clustered_markers"}},items:null}); _1883.items.push({name:"ChangeDisplayPie",label:RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_PIE,iconClass:"ChartTypePie",action:{name:"ChangeDisplayType",payload:{targetType:"v2_pie"}},items:null}); _1883.items.push({name:"ChangeDisplayCrosstab",label:RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_CROSSTAB,iconClass:"ChartTypeCrosstab",action:{name:"ChangeDisplayType",payload:{targetType:"Crosstab"}},items:null}); _1883.items.push({name:"ChangeDisplayList",label:RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_LIST,iconClass:"ChartTypeList",action:{name:"ChangeDisplayType",payload:{targetType:"List"}},items:null}); _1883.items.push({name:"ChangeDisplayMore",label:RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_MORE,iconClass:"ChartTypeOther",action:{name:"InvokeChangeDisplayTypeDialog",payload:""},items:null}); }else{ _1883.items.push({name:"ChangeDisplayBar",label:RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_BAR,iconClass:"ChartTypeBar",action:{name:"ChangeDisplayType",payload:{targetType:"bar_clustered_flat"}},items:null}); _1883.items.push({name:"ChangeDisplayColumn",label:RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_COLUMN,iconClass:"ChartTypeColumn",action:{name:"ChangeDisplayType",payload:{targetType:"column_clustered_flat"}},items:null}); _1883.items.push({name:"ChangeDisplayLine",label:RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_LINE,iconClass:"ChartTypeLine",action:{name:"ChangeDisplayType",payload:{targetType:"line_clustered_flat_markers"}},items:null}); _1883.items.push({name:"ChangeDisplayPie",label:RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_PIE,iconClass:"ChartTypePie",action:{name:"ChangeDisplayType",payload:{targetType:"pie_flat"}},items:null}); _1883.items.push({name:"ChangeDisplayCrosstab",label:RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_CROSSTAB,iconClass:"ChartTypeCrosstab",action:{name:"ChangeDisplayType",payload:{targetType:"Crosstab"}},items:null}); _1883.items.push({name:"ChangeDisplayList",label:RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_LIST,iconClass:"ChartTypeList",action:{name:"ChangeDisplayType",payload:{targetType:"List"}},items:null}); _1883.items.push({name:"ChangeDisplayMore",label:RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_MORE,iconClass:"ChartTypeOther",action:{name:"InvokeChangeDisplayTypeDialog",payload:""},items:null}); } } for(var i in _1883.items){ _1883.items[i].action.payload={targetType:_1883.items[i].action.payload}; _1883.items[i].action.payload.targetType.label=_1883.items[i].label; } } return _1883; }; function ChangeDisplayVariationsAction(){ }; ChangeDisplayVariationsAction.prototype=new CognosViewerAction(); function ChangeDisplayVariationsAction(){ this.m_requestParams=null; }; ChangeDisplayVariationsAction.prototype.setRequestParms=function(parms){ this.m_requestParams=parms; }; ChangeDisplayVariationsAction.prototype.execute=function(){ var _188a=this.m_requestParams.groupId; var _188b=this.getCognosViewer(); var _188c=this.getSelectedReportInfo(); if(_188c){ var _188d=_188b.getViewerWidget(); if(typeof _188c.suggestedDisplayVariations=="undefined"){ var _188e=new AsynchJSONDispatcherEntry(this.m_oCV); _188e.setCallbacks({"complete":{"object":this,"method":this.handleResponse}}); _188e.setRequestIndicator(_188b.getRequestIndicator()); _188e.addFormField("ui.action","getInfoFromReportSpec"); _188e.addFormField("bux","true"); _188e.addNonEmptyStringFormField("modelPath",this.m_oCV.getModelPath()); _188e.addFormField("ui.object",this.m_oCV.envParams["ui.object"]); _188e.addDefinedFormField("ui.spec",this.m_oCV.envParams["ui.spec"]); _188e.addFormField("cv.actionContext",this.addActionContext(_188a)); _188b.dispatchRequest(_188e); }else{ _188d.updateDisplayTypeDialogVariations(_188c.possibleDisplayTypes,_188c.suggestedDisplayVariations); } } }; ChangeDisplayVariationsAction.prototype.handleResponse=function(_188f){ var _1890=this.getCognosViewer(); var _1891=_1890.getViewerWidget(); var _1892=_188f.getResult(); for(var i in _1892.containers){ var _1894=this.getReportInfo(_1892.containers[i].container); _1894.possibleDisplayTypes=_1892.containers[i].possibleDisplayTypes; _1894.variationGroups=_1892.containers[i].variationGroups; } var _1895=this.getSelectedReportInfo(); _1891.updateDisplayTypeDialogVariations(_1895.possibleDisplayTypes,_1895.variationGroups); }; ChangeDisplayVariationsAction.prototype.addActionContext=function(_1896){ var _1897=""; _1897+=""; _1897+=""; _1897+=this.getDataItemInfoMap(); _1897+=this.addClientContextData(3); _1897+=""; _1897+=_1896; _1897+=""; _1897+=""; _1897+=""; return _1897; }; function ChangePaletteAction(){ this.m_sAction="ChangePalette"; this.m_palette=""; this.m_runReport=true; this.m_aPaletteNames=["Flow","Classic","Contemporary","Contrast","Corporate","Dynamic","Excel","Excel 2007","Gradients","Grey Scale","Jazz","Legacy","Metro","Mixed","Modern","Patterns"]; this.m_aPaletteIcons=["changePaletteFlow","changePaletteClassic","changePaletteContemporary","changePaletteContrast","changePaletteCorporate","changePaletteDynamic","changePaletteExcel","changePaletteExcel2007","changePaletteGradients","changePaletteGreyScale","changePaletteJazz","changePaletteLegacy","changePaletteMetro","changePaletteMixed","changePaletteModern","changePalettePatterns"]; }; ChangePaletteAction.prototype=new ModifyReportAction(); ChangePaletteAction.baseclass=ModifyReportAction.prototype; ChangePaletteAction.prototype.reuseQuery=function(){ return true; }; ChangePaletteAction.prototype.preProcess=function(){ this.updateRunReport(); if(this.m_runReport==false){ var _1898=this.getLayoutComponents(); for(var index=0;index<_1898.length;++index){ var _189a=_1898[index]; if(_189a.getAttribute("flashChart")!=null){ if(this.m_palette==""){ _189a.setPalette("Flow"); }else{ _189a.setPalette(this.m_palette); } } } } }; ChangePaletteAction.prototype.updateRunReport=function(){ this.m_runReport=true; var _189b=document.getElementById("rt"+this.m_oCV.getId()); if(_189b!=null){ var _189c=getElementsByAttribute(_189b,"*","chartcontainer","true"); if(_189c.length==0){ this.m_runReport=false; } } }; ChangePaletteAction.prototype.runReport=function(){ return this.m_runReport; }; ChangePaletteAction.prototype.updateInfoBar=function(){ return false; }; ChangePaletteAction.prototype.getUndoHint=function(){ return RV_RES.IDS_JS_CHANGE_PALETTE; }; ChangePaletteAction.prototype.setRequestParms=function(_189d){ if(typeof _189d=="string"){ this.m_palette=_189d; if(this.m_oCV!=null&&typeof this.m_oCV!="undefined"){ this.m_oCV.m_sPalette=_189d; } } }; ChangePaletteAction.prototype.addActionContextAdditionalParms=function(){ if(this.m_palette!=""){ return ""+this.m_palette+""; } return ""; }; ChangePaletteAction.prototype.updateMenu=function(_189e){ _189e.visible=this.ifContainsInteractiveDataContainer(); if(!_189e.visible){ return _189e; } var _189f=this.getSelectedReportInfo(); if(_189f!=null&&_189f.displayTypeId.indexOf("Chart")>=0){ _189e.disabled=false; return _189e; } _189e.disabled=true; return _189e; }; ChangePaletteAction.reset=function(oCV){ delete (oCV.m_sPalette); }; function DragDropAction(){ this.m_source=null; this.m_target=null; this.m_insertBefore=false; this.m_sAction="Reorder"; }; DragDropAction.prototype=new ModifyReportAction(); DragDropAction.prototype.getUndoHint=function(){ return RV_RES.IDS_JS_MOVE; }; DragDropAction.prototype.getOffsetCoords=function(_18a1){ var _18a2=document.getElementById("rt"+this.getCognosViewer().getId()); var _18a3=_18a1; var _18a4=0; var _18a5=0; while(_18a3!=_18a2){ _18a4+=_18a3.offsetTop; _18a5+=_18a3.offsetLeft; _18a3=_18a3.offsetParent; } return {left:_18a5,top:_18a4}; }; DragDropAction.prototype.showDragDropCaret=function(evt,cell,_18a8){ var _18a9=document.getElementById("VDDC"+this.getCognosViewer().getId()); if(_18a9==null){ _18a9=document.createElement("span"); _18a9.setAttribute("id","VDDC"+this.getCognosViewer().getId()); _18a9.className="dropCaret"; if(_18a9.attachEvent){ _18a9.attachEvent("onmousemove",stopEventBubble); }else{ _18a9.addEventListener("mousemove",stopEventBubble,false); } _18a9.style.width="8px"; _18a9.innerHTML=""; _18a8.appendChild(_18a9); } var _18aa=this.getOffsetCoords(_18a8); _18a9.style.top=(_18aa.top-1)+"px"; var _18ab; if(typeof evt.offsetX=="undefined"){ _18ab=evt.layerX; }else{ _18aa=this.getOffsetCoords(evt.srcElement); _18ab=evt.offsetX+_18aa.left; } _18aa=this.getOffsetCoords(cell); var _18ac=_18aa.left+(cell.clientWidth/2); this.m_insertBefore=(_18ab<_18ac); _18a9.style.height=_18a8.clientHeight+"px"; if(this.m_insertBefore==false){ _18a9.style.left=(_18aa.left+cell.clientWidth+1)+"px"; }else{ _18a9.style.left=_18aa.left+"px"; } _18a9.style.display="inline"; }; DragDropAction.prototype.showDragDropIndicators=function(evt){ if(this.m_target!=null){ var cell=this.m_target.getCellRef(); var _18af=cell; while(_18af.getAttribute("lid")==null){ _18af=_18af.parentNode; } this.showDragDropCaret(evt,cell,_18af); } }; DragDropAction.prototype.showDragDropToolTip=function(evt){ var _18b1=""; if(this.canDrop()==true){ _18b1="/rv/images/cursor_move.gif"; }else{ _18b1="/rv/images/cursor_nodrop.gif"; } this.showCustomCursor(evt,"viewerTooltipSpan",_18b1); }; DragDropAction.prototype.canMove=function(){ if(this.m_oCV.isBlacklisted("Move")){ return false; } var _18b2=this.getCognosViewer().getSelectionController(); this.m_source=_18b2.getAllSelectedObjects(); if(this.m_source!=null&&this.m_source.length>0){ if(typeof this.m_source[0].m_dataContainerType!="undefined"&&this.m_source[0].m_dataContainerType=="list"&&this.m_source[0].getLayoutType()!="summary"){ return true; } } return false; }; DragDropAction.prototype.onDrag=function(evt){ clearTextSelection(); var _18b4=getNodeFromEvent(evt); var _18b5=this.getCognosViewer().getSelectionController(); this.m_target=_18b5.buildSelectionObject(_18b4,evt); this.showDragDropToolTip(evt); if(this.canDrop()){ this.showDragDropIndicators(evt); }else{ this.hideDropIndicators(); } }; DragDropAction.prototype.hideDropIndicators=function(){ var _18b6=document.getElementById("VDDC"+this.getCognosViewer().getId()); if(_18b6!=null){ _18b6.style.display="none"; } }; DragDropAction.prototype.onMouseDown=function(evt){ if(this.canMove()){ window.oCVDragDropObject={action:this,x:evt.clientX,y:evt.clientY,dragging:false}; } }; DragDropAction.prototype.canDrop=function(){ return this.m_target!=null&&this.m_source!=null&&this.m_target.getLayoutType()!="summary"&&(this.m_target.getLayoutElementId()==this.m_source[0].getLayoutElementId()); }; DragDropAction.prototype.onDrop=function(evt){ this.hideCustomCursor("viewerTooltipSpan"); this.hideDropIndicators(); if(this.canDrop(evt)){ var _18b9=true; var _18ba; var first=parseInt(this.m_source[0].getColumnRef(),10); var last=first; var _18bd=true; for(var index=0;index0&&_18ba!==last+1){ _18bd=false; break; } last=_18ba; } if(_18bd){ var _18bf=parseInt(this.m_target.getColumnRef(),10); _18bf+=this.m_insertBefore?0:1; if(_18bf>=first&&_18bf<=last+1){ _18b9=false; } } if(_18b9){ this.execute(); } } }; DragDropAction.prototype.addActionContextAdditionalParms=function(){ var tag=this.m_insertBefore==true?"before":"after"; var _18c1=this.m_target.getCellRef(); var _18c2=this.getRAPLayoutTag(_18c1); _18c2=(_18c2!=null)?_18c2:this.m_target.getColumnName(); return this.getSelectedCellTags()+"<"+tag+">"+xml_encode(_18c2)+""; }; function DragDropAction_isDragging(evt){ var _18c4=window.oCVDragDropObject; if(_18c4){ var _18c5=evt.clientX; var _18c6=evt.clientY; var _18c7=_18c4.x; var _18c8=_18c4.y; if((_18c5>=(_18c7+2))||(_18c5<=(_18c7-2))||(_18c6>=(_18c8+2))||(_18c6<=(_18c8-2))){ _18c4.dragging=true; } return _18c4.dragging; } return false; }; function DragDropAction_onmouseup(evt){ if(DragDropAction_isDragging(evt)){ window.oCVDragDropObject.action.onDrop(evt); } window.oCVDragDropObject=null; }; function DragDropAction_onmousemove(evt){ if(DragDropAction_isDragging(evt)){ window.oCVDragDropObject.action.onDrag(evt); } }; function DrillAction(){ this.m_bUseReportInfoSelection=false; this.m_aDrillSelectedObjects=[]; this.m_useMARequest=false; this.m_userSelectedDrillItem=null; }; DrillAction.prototype=new ModifyReportAction(); DrillAction.prototype.getHoverClassName=function(){ return ""; }; DrillAction.prototype.setRequestParms=function(parms){ if(parms){ this.m_userSelectedDrillItem=parms.userSelectedDrillItem; } }; DrillAction.prototype.setKeepFocusOnWidget=function(_18cc){ this.m_bKeepFocusOnWidget=_18cc; }; DrillAction.prototype.keepFocusOnWidget=function(){ if(typeof this.m_bKeepFocusOnWidget!="undefined"){ return this.m_bKeepFocusOnWidget; } return true; }; DrillAction.prototype.getDrillabilityForItemFromReportInfo=function(_18cd){ if(!this.m_oCV){ return null; } var _18ce=this.m_oCV.getRAPReportInfo(); if(!_18ce){ return null; } var _18cf=_18ce.getContainers(); for(var _18d0 in _18cf){ var _18d1=_18ce.getDrillability(_18d0); if(_18d1[_18cd]){ return _18d1[_18cd]; } } return null; }; DrillAction.prototype.onDoubleClick=function(evt){ this.execute(); }; DrillAction.prototype.preProcess=function(){ if(typeof this.m_drillSpec==="undefined"||this.m_drillSpec===null){ var _18d3=this.generateDrillSpecObjects(); if(!_18d3){ return null; } var _18d4=this.getCognosViewer(); var _18d5=_18d4.getViewerWidget(); if(_18d5){ var _18d6=_18d4.getModelPath(); _18d5.getWidgetContextManager().raiseDrillEvent(_18d3,this.m_sAction,_18d6); } } }; DrillAction.prototype.generateDrillSpecObjects=function(){ try{ var _18d7=[]; var oCV=this.getCognosViewer(); var _18d9=oCV.getDrillMgr(); var _18da=oCV.getSelectionController(); var _18db=true; var _18dc=_18d9.getDrillParameters(this.m_drillOption,true,_18db,this.m_userSelectedDrillItem); if(_18dc.length===0){ return null; } var _18dd=_18d9.getSelectedObject(); if(_18dc.length>3*4&&(_18dd.getDataContainerType()=="crosstab"||_18dd.getLayoutType()=="chartElement")){ _18dc.length=3*4; } var _18de=_18d9.getSelectedObject().getSelectedContextIds(); for(var i=0,_18e0=0;_18e0<_18de.length&&i<_18dc.length;++_18e0){ var _18e1=_18de[_18e0][0]; var _18e2=_18da.getRefDataItem(_18e1); var sMUN=_18da.getMun(_18e1); var _18e4=_18da.getDisplayValue(_18e1); if(_18da.getDrillFlagForMember(_18e1)===0){ i=i+4; continue; } var _18e5={"dataItem":_18dc[i++],"mun":_18dc[i++],"lun":_18dc[i++],"hun":_18dc[i++]}; if(_18e2!=""&&_18e4!=""){ if(_18e5.dataItem===_18e2){ _18e5.displayValue=_18e4; } } var _18e6=_18da.getUsageInfo(_18e1); _18e5.isMeasure=(_18e6==="2")?"true":"false"; var _18e7=false; if(sMUN!=""&&_18e6!="2"){ var _18e8=this.getDrillabilityForItemFromReportInfo(_18e2); if((_18e8!=null&&_18e8.disableDown==true)||this.m_oCV.getSelectionController().getDrillFlagForMember(_18e1)==1){ _18e7=true; } } if(_18e7){ if(_18e5.dataItem===_18e2){ _18e5.summary="true"; } } _18d7.push(_18e5); } return (_18d7.length>0)?_18d7:null; } catch(e){ return null; } }; DrillAction.prototype.parseDrillSpec=function(evt){ try{ var oCV=this.getCognosViewer(); if(oCV.getStatus()!=="complete"||oCV.getConversation()===""){ return false; } this.m_drillSpec=evt.payload.drillSpec; var _18eb=XMLBuilderLoadXMLFromString(this.m_drillSpec); var _18ec=_18eb.firstChild; var _18ed=getCognosViewerSCObjectRef(oCV.getId()); _18ed.m_aSelectedObjects=[]; if(_18ed.hasSelectedChartNodes()){ _18ed.clearSelectionData(); } var _18ee=XMLHelper_FindChildrenByTagName(_18ec,"DrillGroup",false); for(var _18ef=0;_18ef<_18ee.length;++_18ef){ var _18f0=XMLHelper_FindChildByTagName(_18ee[_18ef],"MUN",false); var sMun=XMLHelper_GetText(_18f0); var sLun=""; var sHun=""; var _18f4=""; var _18f5=""; var _18f6=XMLHelper_FindChildByTagName(_18ee[_18ef],"DisplayValue",false); if(_18f6!=null){ _18f4=XMLHelper_GetText(_18f6); } var _18f7=XMLHelper_FindChildByTagName(_18ee[_18ef],"LUN",false); if(_18f7!=null){ sLun=XMLHelper_GetText(_18f7); } var _18f8=XMLHelper_FindChildByTagName(_18ee[_18ef],"HUN",false); if(_18f8!=null){ sHun=XMLHelper_GetText(_18f8); } var _18f9=XMLHelper_FindChildByTagName(_18ee[_18ef],"Summary",false); if(_18f9!=null){ _18f5=XMLHelper_GetText(_18f9); } this.selectObject(sMun,sLun,sHun,_18f4,_18f5,_18ed); } } catch(e){ return false; } return (_18ed.m_aSelectedObjects.length>0); }; DrillAction.prototype.parseDrillSpecObjects=function(_18fa){ if(this.useReportInfoSelection()){ return this.parseDrillSpecObjectsWithReportInfo(_18fa); } try{ var oCV=this.getCognosViewer(); if(oCV.getStatus()!=="complete"||oCV.getConversation()===""){ return false; } this.m_drillSpec=""; var _18fc=getCognosViewerSCObjectRef(oCV.getId()); _18fc.m_aSelectedObjects=[]; if(_18fc.hasSelectedChartNodes()){ _18fc.clearSelectionData(); } for(var i in _18fa){ var oSpec=_18fa[i]; var _18ff=(oSpec.summary)?oSpec.summary:""; var _1900=true; this.selectObject(oSpec.mun,oSpec.lun,oSpec.hun,oSpec.displayValue,_18ff,_18fc,_1900); } } catch(e){ return false; } return (_18fc.m_aSelectedObjects.length>0); }; DrillAction.prototype.getDrillabilityForCtxValue=function(_1901){ if(console&&console.log){ console.log("Required method, getDrillabilityForCtxValue, not implemented."); } }; DrillAction.prototype.setDrillabilityForSelectObject=function(_1902){ this.drillability=this.getDrillabilityForCtxValue(_1902); }; DrillAction.prototype.canDrillDown=function(){ if(console&&console.log){ console.log("Required method, canDrillDown, not implemented."); } }; DrillAction.prototype.canDrilUp=function(){ if(console&&console.log){ console.log("Required method, canDrilUp, not implemented."); } }; DrillAction.prototype.selectObject=function(sMun,sLun,sHun,_1906,_1907,_1908,_1909){ var _190a=sHun; var _190b=sLun; var _190c=sMun; var _190d=false; var _190e=_1908.getCtxIdFromMun(sMun); var _190f=_190e; if(_190e===""){ var _1910=_1908.replaceNamespaceForSharedTM1DimensionOnly(sLun,sHun,sMun); _190b=_1910.lun; _190a=_1910.hun; if(_190a!==sHun){ _190c=this._replaceNamespace(sMun,_190a); } _190d=(_1909==true); _190e=_1908.getCtxIdFromMetaData(_190b,_190a,_190d); if(_190e===""){ return false; } } this.setDrillabilityForSelectObject(_190e); if((_190d==true)||(this.m_sAction=="DrillDown"&&this.canDrillDown())||(this.m_sAction=="DrillUp"&&this.canDrillUp())){ var _1911=_1908.getSelections().length; _1908.selectObject(_190c,_190b,_190a,_190d); var _1912=_1908.getSelections(); if(_190f===""&&_1912.length>_1911){ var aMuns=_1912[_1912.length-1].m_aMuns; aMuns[aMuns.length]=[]; aMuns[aMuns.length-1].push(_190c); var _1914=_1912[_1912.length-1].m_aDisplayValues; _1914.push(_1906); _1912[_1912.length-1].useDisplayValueFromObject=true; } if(_1907=="true"){ _1912=_1908.getSelections(); _1912[_1912.length-1].onSummary=true; } } }; DrillAction.prototype._replaceNamespace=function(mun,_1916){ var _1917=null; if(_1916){ var _1918=_1916.substr(0,_1916.indexOf("].[")+1); if(mun&&_1918&&!(mun.match("^"+_1918))){ var _1919=mun.indexOf("].["); _1917=_1918+mun.substr(_1919+1,mun.length); } } return _1917||mun; }; DrillAction.prototype.addActionContextAdditionalParms=function(){ var _191a=""; var _191b=(this.useReportInfoSelection())?this.m_aDrillSelectedObjects:this.getCognosViewer().getSelectionController().getSelections(); var sItem=null; for(var i=0;i<_191b.length;++i){ if(_191b[i].onSummary){ sItem=(this.useReportInfoSelection())?_191b[i].item:_191b[i].getDataItems()[0][0]; _191a+=""+xml_encode(sItem)+""; } } if(_191a!=""){ _191a=""+_191a+""; } if(this.m_userSelectedDrillItem){ _191a+=(""+this.m_userSelectedDrillItem+""); } if(this.m_useMARequest===true){ _191a=_191a+"false"; _191a=_191a+"false"; } _191a+=this.addClientContextData(3); return _191a; }; DrillAction.prototype.getDrillOptionsAsString=function(){ var _191e=this.getViewerWidget(); var _191f=""; if(_191e){ _191f=""+_191e.getDrillOptions().addSummaryMembers+""; _191f=_191f+""+_191e.getDrillOptions().backwardsCompatible+""; } return _191f; }; DrillAction.prototype.getItemInfo=function(_1920,_1921){ var _1922=_1920.getRAPReportInfo(); if(!_1922){ return null; } var _1923=_1922.getContainers(); for(var _1924 in _1923){ var _1925=_1922.getItemInfo(_1924); if(_1925[_1921]){ return _1925[_1921]; } } return null; }; DrillAction.prototype.isSelectionFilterEnabled=function(){ var _1926=this.getViewerWidget(); if(!_1926){ return false; } return _1926.isSelectionFilterEnabled(); }; DrillAction.prototype.getHierarchyHasExpandedSet=function(_1927,_1928){ var _1929=this.getItemInfo(_1927,_1928); return (_1929&&_1929.hierarchyHasExpandedMembers); }; DrillAction.prototype.getIsRSDrillParent=function(_192a,_192b){ var _192c=this.getItemInfo(_192a,_192b); return (_192c&&_192c.isRSDrillParent); }; DrillAction.prototype.setUseReportInfoSelection=function(bFlag){ this.m_bUseReportInfoSelection=bFlag; }; DrillAction.prototype.useReportInfoSelection=function(){ return this.m_bUseReportInfoSelection; }; DrillAction.prototype.parseDrillSpecObjectsWithReportInfo=function(_192e){ try{ var _192f=this.m_oCV.getRAPReportInfo(); if(!_192f){ return null; } this.m_drillSpec=""; this.m_aDrillSelectedObjects=[]; for(var i in _192e){ this.populateSelectObjectWithReportInfo(_192e[i],_192f); } } catch(e){ return false; } return (this.m_aDrillSelectedObjects.length>0); }; DrillAction.prototype.populateSelectObjectWithReportInfo=function(oSpec,_1932){ var _1933=_1932.getItemDetails(oSpec.dataItem,oSpec.hun); if(!_1933){ _1933=_1932.getItemDetailsByHun(oSpec.hun); if(!_1933){ return null; } } if(oSpec.mun){ _1933.mun=oSpec.mun; } if(oSpec.lun){ _1933.lun=oSpec.lun; } if(oSpec.displayValue){ _1933.displayValue=oSpec.displayValue; } if(oSpec.isMeasure==="true"){ _1933.isMeasure=true; } if(oSpec.summary==="true"){ _1933.onSummary=true; } this.m_aDrillSelectedObjects.push(_1933); }; DrillAction.prototype.getSelectionContext=function(){ if(this.useReportInfoSelection()){ return this.genLeanSelection(); }else{ return CognosViewerAction.prototype.getSelectionContext.call(this); } }; DrillAction.prototype.genLeanSelection=function(){ if(this.m_aDrillSelectedObjects.length==0){ return ""; } var _1934=""; for(var idx in this.m_aDrillSelectedObjects){ var obj=this.m_aDrillSelectedObjects[idx]; _1934+=""; _1934+=(""+obj.item+""+""+obj.displayValue+""+""+obj.lid+""+""+obj.queryName+""); if(obj.mun){ _1934+=(""+obj.mun+""); _1934+=("memberUniqueName"); } if(obj.hun){ _1934+=(""+obj.hun+""); } var _1937=(obj.isMeasure)?"measure":"nonMeasure"; _1934+=(""+_1937+""); _1934+=""; } return (""+_1934+""); }; DrillAction.prototype.runReport=function(){ if(this.getViewerWidget()){ return this.getViewerWidget().shouldReportBeRunOnAction(); }else{ return true; } }; DrillAction.prototype.canBeQueued=function(){ if(this.getViewerWidget()){ return !(this.getViewerWidget().isVisible()); }else{ return false; } }; function DrillUpDownAction(){ this.m_sAction="DrillDown"; this.m_drillOption="drillDown"; this.undoTooltip=""; }; DrillUpDownAction.prototype=new DrillAction(); DrillUpDownAction.prototype.getHoverClassName=function(){ return "dl"; }; DrillUpDownAction.prototype.getUndoHint=function(){ return this.undoTooltip; }; DrillUpDownAction.prototype.keepRAPCache=function(){ return false; }; DrillUpDownAction.prototype.updateDrillability=function(_1938,_1939){ this.m_oCV=_1938; var _193a=_1939.getAttribute("ctx"); this.drillability=0; if(_193a){ var _193b=_193a.split("::"); if(_193b&&_193b.length>0){ if(_193b.length>2){ this.drillability=this.getDrillabilityForIntersection(_193b[1].split(":")[0],_193b[2].split(":")[0]); }else{ if(_193b.length===2){ this.drillability=this.getDrillabilityForCtxValue(_193b[1].split(":")[0]); }else{ this.drillability=this.getDrillabilityForCtxValue(_193b[0].split(":")[0]); } } } } if(this.isDefaultDrillUp(_1939)){ this.m_sAction="DrillUp"; this.m_drillOption="drillUp"; this.undoTooltip=RV_RES.RV_DRILL_UP; }else{ this.m_sAction="DrillDown"; this.m_drillOption="drillDown"; this.undoTooltip=RV_RES.RV_DRILL_DOWN; } return this.drillability; }; DrillUpDownAction.prototype.updateDrillabilityFromSelections=function(){ var _193c=this.m_oCV.getSelectionController(); var _193d=_193c.getAllSelectedObjects(); this.drillability=0; if(_193d!=null&&typeof _193d!="undefined"&&_193d.length==1&&_193d[0].m_contextIds!=null){ if(_193d[0].getLayoutType()=="section"){ this.drillability=0; }else{ if(_193d[0].m_contextIds.length==0){ this.drillability=0; }else{ if(typeof DrillContextMenuHelper!=="undefined"&&DrillContextMenuHelper.needsDrillSubMenu(this.m_oCV)){ this.drillability=this.getDrillabilityForAll(_193d[0].m_contextIds); }else{ if(_193d[0].m_contextIds.length>2){ this.drillability=this.getDrillabilityForIntersection(_193d[0].m_contextIds[1][0],_193d[0].m_contextIds[2][0]); }else{ this.drillability=this.getDrillabilityForCtxValue(_193d[0].m_contextIds[0][0]); } } } } } return this.drillability; }; DrillUpDownAction.prototype.getDrillabilityForCtxValue=function(_193e){ var _193f=0; var _1940=this.m_oCV.getSelectionController(); var _1941=_1940.getRefDataItem(_193e); if(this.getHierarchyHasExpandedSet(this.m_oCV,_1941)&&this.getIsRSDrillParent(this.m_oCV,_1941)){ _193f=1; return _193f; } if(_1940.getMun(_193e)!==""&&_1940.getUsageInfo(_193e)!=="2"){ _193f=(+_1940.getDrillFlagForMember(_193e)); var _1942=this.getDrillabilityForItemFromReportInfo(_1940.getRefDataItem(_193e)); if(_1942!=null){ if(_1942.disableDown==true||_1942.isolated==true){ if(_193f==1||_193f>=3||_1942.isolated==true){ _193f=1; }else{ _193f=0; } } if(_1942.disableUp==true){ if(_193f>=2){ _193f=2; }else{ _193f=0; } } } } return _193f; }; DrillUpDownAction.prototype.getDrillabilityForIntersection=function(_1943,_1944){ var _1945=this.getDrillabilityForCtxValue(_1943); return this.mergeDrillability(_1945,_1944); }; DrillUpDownAction.prototype.getDrillabilityForAll=function(_1946){ var _1947=(_1946.length>=2)?1:0; var _1948; if(_1946.length==2){ _1948=1; }else{ if(_1946.length>2){ _1948=2; }else{ _1948=0; } } var _1949=0; for(var iDim=_1947;iDim<=_1948;++iDim){ for(var _194b=0;_194b<_1946[iDim].length;++_194b){ _1949=this.mergeDrillability(_1949,_1946[iDim][_194b]); } } return _1949; }; DrillUpDownAction.prototype.mergeDrillability=function(_194c,_194d){ var _194e=this.getDrillabilityForCtxValue(_194d); if(_194c==_194e){ return _194c; } if(_194c>_194e){ var temp=_194c; _194c=_194e; _194e=temp; } if(_194c==1&&_194e==2){ return 3; } return _194e; }; DrillUpDownAction.prototype.hasPermission=function(){ if(this.m_oCV){ if(this.m_oCV.isDrillBlackListed()){ return false; } var _1950=this.m_oCV.envParams; if(_1950){ return !(this.m_oCV.isLimitedInteractiveMode()||(_1950["cv.objectPermissions"].indexOf("read")===-1)); } } return false; }; DrillUpDownAction.prototype.canDrillUp=function(){ return ((this.drillability==1||this.drillability==3||this.drillability==4)&&this.hasPermission()); }; DrillUpDownAction.prototype.canDrillDown=function(){ return ((this.drillability==2||this.drillability==3||this.drillability==4)&&this.hasPermission()); }; DrillUpDownAction.prototype.isDefaultDrillUp=function(_1951){ if(this.drillability==1||this.drillability==4||(_1951&&_1951.getAttribute("ischarttitle")==="true")){ return true; }else{ return false; } }; DrillUpDownAction.prototype.doOnMouseOver=function(evt){ if(this.drillability>0&&!this.getCognosViewer().isLimitedInteractiveMode()){ var _1953=getCtxNodeFromEvent(evt); this.addDrillableClass(_1953); if(evt.toElement&&evt.toElement.nodeName&&evt.toElement.nodeName.toLowerCase()=="img"){ this.addDrillableClass(evt.toElement); } } }; DrillUpDownAction.prototype.doOnMouseOut=function(evt){ var _1955=getCtxNodeFromEvent(evt); if(_1955){ this.removeDrillableClass(_1955); if(evt.toElement&&evt.toElement.nodeName&&evt.toElement.nodeName.toLowerCase()=="img"){ this.removeDrillableClass(evt.toElement); } } }; DrillUpDownAction.prototype.onMouseOver=function(evt){ this.doOnMouseOver(evt); }; DrillUpDownAction.prototype.onMouseOut=function(evt){ this.doOnMouseOut(evt); }; DrillUpDownAction.prototype.onDoubleClick=function(evt){ if(this.drillability>0&&this.hasPermission()&&!this.isSelectionFilterEnabled()){ this.execute(); var _1959=getCtxNodeFromEvent(evt); if(_1959!=null){ this.removeDrillableClass(_1959); } } }; DrillUpDownAction.prototype.addDrillableClass=function(node){ if(!node.className.match(new RegExp("(\\s|^)"+this.getHoverClassName()+"(\\s|$)"))){ node.className+=" "+this.getHoverClassName(); } }; DrillUpDownAction.prototype.removeDrillableClass=function(node){ var _195c=node.className; _195c=_195c.replace(new RegExp("(\\s|^)"+this.getHoverClassName()+"(\\s|$)")," "); node.className=_195c.replace(/^\s*/,"").replace(/\s*$/,""); }; function DrillUpDownOrThroughAction(){ this.m_hasAuthoredDrillTargets=false; this.m_canDrillUpDown=false; }; DrillUpDownOrThroughAction.prototype=new DrillUpDownAction(); DrillUpDownOrThroughAction.prototype.init=function(_195d,_195e){ if(this.getCognosViewer()){ var _195f=this.getCognosViewer().getViewerWidget(); if(_195f&&_195f.isSelectionFilterEnabled()){ return; }else{ if(this.m_oCV.isDrillBlackListed()){ return; } } } this.m_hasAuthoredDrillTargets=_195d; this.m_canDrillUpDown=_195e; }; DrillUpDownOrThroughAction.prototype.updateDrillabilityInfo=function(_1960,_1961){ if(this.m_canDrillUpDown){ return this.updateDrillability(_1960,_1961); } return null; }; DrillUpDownOrThroughAction.prototype.onMouseOver=function(evt){ if(this.m_hasAuthoredDrillTargets){ var _1963=getCtxNodeFromEvent(evt); if(_1963){ this.addDrillableClass(_1963); this._set_chartImage_drillThroughCursor_IE("pointer",evt); } } if(this.m_canDrillUpDown&&!this.isSelectionFilterEnabled()&&!this.m_oCV.isDrillBlackListed()){ this.doOnMouseOver(evt); } }; DrillUpDownOrThroughAction.prototype.onMouseOut=function(evt){ if(this.m_hasAuthoredDrillTargets){ var _1965=getCtxNodeFromEvent(evt); if(_1965){ this.removeDrillableClass(_1965); this._set_chartImage_drillThroughCursor_IE("default",evt); } } if(this.m_canDrillUpDown&&!this.isSelectionFilterEnabled()&&!this.m_oCV.isDrillBlackListed()){ this.doOnMouseOut(evt); } }; DrillUpDownOrThroughAction.prototype._getDrillThroughChartImage_from_chartArea=function(evt){ var _1967=getCrossBrowserNode(evt); if(_1967){ var _1968=this.m_oCV.getSelectionController(); return _1968.getSelectedChartImageFromChartArea(_1967); } }; DrillUpDownOrThroughAction.prototype._set_chartImage_drillThroughCursor_IE=function(_1969,evt){ if(dojo.isIE||dojo.isTrident){ var oImg=this._getDrillThroughChartImage_from_chartArea(evt); if(oImg){ oImg.style.cursor=_1969; } } }; function DrillDownAction(){ this.m_sAction="DrillDown"; this.m_drillOption="drillDown"; }; DrillDownAction.prototype=new DrillUpDownAction(); DrillDownAction.prototype.getUndoHint=function(){ return RV_RES.RV_DRILL_DOWN; }; DrillDownAction.prototype.getHoverClassName=function(){ return "dl"; }; DrillDownAction.prototype.updateMenu=function(_196c){ _196c.visible=this.ifContainsInteractiveDataContainer(); if(!_196c.visible){ return _196c; } this.updateDrillabilityFromSelections(); if(!this.canDrillDown()){ _196c.disabled=true; }else{ _196c.disabled=false; DrillContextMenuHelper.updateDrillMenuItems(_196c,this.m_oCV,this.m_sAction); } return _196c; }; function DrillUpAction(){ this.m_sAction="DrillUp"; this.m_drillOption="drillUp"; }; DrillUpAction.prototype=new DrillUpDownAction(); DrillUpAction.prototype.getHoverClassName=function(){ return "dl"; }; DrillUpAction.prototype.getUndoHint=function(){ return RV_RES.RV_DRILL_UP; }; DrillUpAction.prototype.updateMenu=function(_196d){ _196d.visible=this.ifContainsInteractiveDataContainer(); if(!_196d.visible){ return _196d; } this.updateDrillabilityFromSelections(); if(!this.canDrillUp()){ _196d.disabled=true; }else{ _196d.disabled=false; DrillContextMenuHelper.updateDrillMenuItems(_196d,this.m_oCV,this.m_sAction); } return _196d; }; function DeleteAction(){ this.m_sAction="Delete"; }; DeleteAction.prototype=new ModifyReportAction(); DeleteAction.baseclass=ModifyReportAction.prototype; DeleteAction.prototype.getUndoHint=function(){ return RV_RES.IDS_JS_DELETE; }; DeleteAction.prototype.canDelete=function(){ if(!this.m_oCV.isLimitedInteractiveMode()){ var _196e=this.m_oCV.getSelectionController().getAllSelectedObjects(); if(_196e.length>0){ for(var i=0;i<_196e.length;++i){ var _1970=_196e[i]; var _1971=_1970.getCellRef(); if(!_1970.hasContextInformation()||_1970.isHomeCell()||(_1970.getLayoutType()!="columnTitle"&&_1970.getDataContainerType()!="list")||_1971.getAttribute("cc")=="true"){ return false; } } return true; } } return false; }; DeleteAction.prototype.execute=function(){ DeleteAction.baseclass.execute.call(this); this.m_oCV.getSelectionController().clearSelectionData(); this.m_oCV.getViewerWidget().onContextMenu(null); }; DeleteAction.prototype.keepRAPCache=function(){ return false; }; DeleteAction.prototype.updateMenu=function(_1972){ _1972.visible=this.ifContainsInteractiveDataContainer(); if(!_1972.visible){ return _1972; } _1972.disabled=!this.canDelete(); return _1972; }; DeleteAction.prototype.addActionContextAdditionalParms=function(){ return this.getSelectedCellTags(); }; function UndoableClientActionBase(){ }; UndoableClientActionBase.prototype=new CognosViewerAction(); UndoableClientActionBase.prototype.setContainerId=function(_1973){ this.m_sContainerId=_1973; }; UndoableClientActionBase.prototype.doRedo=function(_1974){ this.setContainerId(_1974); this.execute(); }; UndoableClientActionBase.prototype.doUndo=function(_1975){ factory=this.getCognosViewer().getActionFactory(); var _1976=factory.load(this.getUndoClass()); _1976.setContainerId(_1975); _1976.execute(); }; UndoableClientActionBase.prototype.getSelectedContainerId=function(){ var _1977=this.m_oCV.getSelectionController().getAllSelectedObjects(); if(_1977&&_1977.length){ var lid=_1977[0].getLayoutElementId(); if(lid){ return this.removeNamespace(lid); } } return null; }; function FreezeRowHeadingsAction(){ }; FreezeRowHeadingsAction.prototype=new UndoableClientActionBase(); FreezeRowHeadingsAction.superclass=UndoableClientActionBase.prototype; FreezeRowHeadingsAction.prototype.execute=function(){ var _1979=this.m_sContainerId?this.m_sContainerId:this.getSelectedCrosstabContainerId(); if(_1979){ this.m_oCV.getSelectionController().resetSelections(); this.m_oCV.getPinFreezeManager().freezeContainerRowHeadings(_1979); this.addClientSideUndo(this,[_1979]); } }; FreezeRowHeadingsAction.prototype.getUndoHint=function(){ return RV_RES.IDS_JS_FREEZEROWHEADINGS; }; FreezeRowHeadingsAction.prototype.getUndoClass=function(){ return "UnfreezeRowHeadings"; }; FreezeRowHeadingsAction.prototype.getSelectedCrosstabContainerLid=function(){ var _197a=this.m_oCV.getSelectionController().getAllSelectedObjects(); if(_197a&&_197a.length&&_197a[0].getDataContainerType()=="crosstab"){ var lid=(_197a[0].getLayoutElementId()); if(lid){ return lid; } } return null; }; FreezeRowHeadingsAction.prototype.getSelectedCrosstabContainerId=function(){ var lid=this.getSelectedCrosstabContainerLid(); if(lid){ return this.removeNamespace(lid); } return null; }; FreezeRowHeadingsAction.prototype.canFreezeRowHeadings=function(){ var _197d=this.m_oCV.getPinFreezeManager(); if(_197d){ var _197e=this.getSelectedCrosstabContainerId(); if(_197e){ if(!_197d.hasFrozenRowHeadings(_197e)&&_197d.getValidSelectedContainerId(false)){ return true; } } } return false; }; FreezeRowHeadingsAction.prototype.updateMenu=function(_197f){ _197f.visible=this.canFreezeRowHeadings(); return _197f; }; function UnfreezeRowHeadingsAction(){ }; UnfreezeRowHeadingsAction.prototype=new UndoableClientActionBase(); UnfreezeRowHeadingsAction.superclass=UndoableClientActionBase.prototype; UnfreezeRowHeadingsAction.prototype.execute=function(){ if(this.m_oCV.getPinFreezeManager()){ var _1980=document.getElementById("CVReport"+this.m_oCV.getId()); var _1981=this.m_sContainerId?this.m_sContainerId:this.getSelectedContainerId(); this.m_oCV.getSelectionController().resetSelections(); this.m_oCV.getPinFreezeManager().unfreezeContainerRowHeadings(_1981,_1980); this.addClientSideUndo(this,[_1981]); } }; UnfreezeRowHeadingsAction.prototype.getUndoHint=function(){ return RV_RES.IDS_JS_UNFREEZEROWHEADINGS; }; UnfreezeRowHeadingsAction.prototype.getUndoClass=function(){ return "FreezeRowHeadings"; }; UnfreezeRowHeadingsAction.prototype.areRowHeadingsFrozen=function(){ if(this.m_oCV.getPinFreezeManager()&&this.m_oCV.getPinFreezeManager().hasFrozenRowHeadings(this.getSelectedContainerId())){ return true; } return false; }; UnfreezeRowHeadingsAction.prototype.updateMenu=function(_1982){ _1982.visible=this.areRowHeadingsFrozen(); return _1982; }; function FreezeColumnHeadingsAction(){ }; FreezeColumnHeadingsAction.prototype=new UndoableClientActionBase(); FreezeColumnHeadingsAction.superclass=UndoableClientActionBase.prototype; FreezeColumnHeadingsAction.prototype.execute=function(){ var _1983=this.m_sContainerId?this.m_sContainerId:this.getSelectedCrosstabOrListContainerId(); if(_1983){ this.m_oCV.getSelectionController().resetSelections(); this.m_oCV.getPinFreezeManager().freezeContainerColumnHeadings(_1983); this.addClientSideUndo(this,[_1983]); } }; FreezeColumnHeadingsAction.prototype.getUndoHint=function(){ return RV_RES.IDS_JS_FREEZECOLUMNHEADINGS; }; FreezeColumnHeadingsAction.prototype.getUndoClass=function(){ return "UnfreezeColumnHeadings"; }; FreezeColumnHeadingsAction.prototype.getSelectedCrosstabOrListContainerLid=function(){ var _1984=this.m_oCV.getSelectionController().getAllSelectedObjects(); if(_1984&&_1984.length&&(_1984[0].getDataContainerType()=="crosstab"||_1984[0].getDataContainerType()=="list")){ var lid=(_1984[0].getLayoutElementId()); if(lid){ return lid; } } return null; }; FreezeColumnHeadingsAction.prototype.getSelectedCrosstabOrListContainerId=function(){ var lid=this.getSelectedCrosstabOrListContainerLid(); if(lid){ return this.removeNamespace(lid); } return null; }; FreezeColumnHeadingsAction.prototype.canFreezeColumnHeadings=function(){ var _1987=this.m_oCV.getPinFreezeManager(); if(_1987){ var _1988=this.getSelectedCrosstabOrListContainerId(); if(_1988){ if(!_1987.hasFrozenColumnHeadings(_1988)&&_1987.getValidSelectedContainerId(true)){ return true; } } return false; } }; FreezeColumnHeadingsAction.prototype.updateMenu=function(_1989){ _1989.visible=this.canFreezeColumnHeadings(); return _1989; }; function UnfreezeColumnHeadingsAction(){ }; UnfreezeColumnHeadingsAction.prototype=new UndoableClientActionBase(); UnfreezeColumnHeadingsAction.superclass=UndoableClientActionBase.prototype; UnfreezeColumnHeadingsAction.prototype.execute=function(){ if(this.m_oCV.getPinFreezeManager()){ var _198a=document.getElementById("CVReport"+this.m_oCV.getId()); var _198b=this.m_sContainerId?this.m_sContainerId:this.getSelectedContainerId(); this.m_oCV.getSelectionController().resetSelections(); this.m_oCV.getPinFreezeManager().unfreezeContainerColumnHeadings(_198b,_198a); this.addClientSideUndo(this,[_198b]); } }; UnfreezeColumnHeadingsAction.prototype.getUndoHint=function(){ return RV_RES.IDS_JS_UNFREEZECOLUMNHEADINGS; }; UnfreezeColumnHeadingsAction.prototype.getUndoClass=function(){ return "FreezeColumnHeadings"; }; UnfreezeColumnHeadingsAction.prototype.areColumnHeadingsFrozen=function(){ if(this.m_oCV.getPinFreezeManager()&&this.m_oCV.getPinFreezeManager().hasFrozenColumnHeadings(this.getSelectedContainerId())){ return true; } return false; }; UnfreezeColumnHeadingsAction.prototype.updateMenu=function(_198c){ _198c.visible=this.areColumnHeadingsFrozen(); return _198c; }; function GlossaryAction(){ }; GlossaryAction.prototype=new CognosViewerAction(); GlossaryAction.prototype.execute=function(){ var _198d=this.getCognosViewer(); _198d.loadExtra(); var _198e=_198d.getSelectionController(); var _198f=_198e.getAllSelectedObjects(); if(_198f.length>0){ var _1990=null; if(typeof MDSRV_CognosConfiguration!="undefined"){ _1990=new MDSRV_CognosConfiguration(); var _1991=""; if(_198d.envParams["glossaryURI"]){ _1991=_198d.envParams["glossaryURI"]; } _1990.addProperty("glossaryURI",_1991); _1990.addProperty("gatewayURI",_198d.getGateway()); } var _1992=_198d.envParams["ui.object"]; var _1993=getViewerSelectionContext(_198e,new CSelectionContext(_1992)); var _1994=new MDSRV_BusinessGlossary(_1990,_1993); _1994.open(); } }; GlossaryAction.prototype.updateMenu=function(_1995){ if(!this.getCognosViewer().bCanUseGlossary){ return ""; } var _1996=this.selectionHasContext(); if(!_1996||this.getCognosViewer().envParams["glossaryURI"]==null||this.getCognosViewer().envParams["glossaryURI"]==""){ _1995.disabled=true; }else{ _1995.disabled=false; } return _1995; }; function GroupAction(){ this.m_sAction="GroupColumn"; }; GroupAction.prototype=new ModifyReportAction(); GroupAction.prototype.getUndoHint=function(){ return RV_RES.IDS_JS_GROUP_UNGROUP; }; GroupAction.prototype.updateMenu=function(_1997){ _1997.visible=this.ifContainsInteractiveDataContainer(); if(!_1997.visible){ return _1997; } var _1998=this.m_oCV.getSelectionController(); var _1999=_1998.getAllSelectedObjects(); if(_1999.length===0||_1998.getDataContainerType()!="list"){ return this.disableMenuItem(_1997); } if(_1999[0].getCellRef().getAttribute("no_data_item_column")==="true"){ return this.disableMenuItem(_1997); } var _199a=!_1998.isRelational(); for(var index=0;index<_1999.length;++index){ if(_1998.getUsageInfo(_1999[index].getSelectedContextIds()[0][0])==_1998.c_usageMeasure&&(_199a||_1999[index].getLayoutType()==="summary")){ return this.disableMenuItem(_1997); } } _1997.disabled=false; _1997.iconClass="group"; return _1997; }; GroupAction.prototype.disableMenuItem=function(_199c){ _199c.disabled=true; _199c.iconClass="groupDisabled"; return _199c; }; GroupAction.prototype.addActionContextAdditionalParms=function(){ return this.addClientContextData(3); }; function LoadMenuAction(){ this.m_action=null; }; LoadMenuAction.prototype=new CognosViewerAction(); LoadMenuAction.prototype.FROM_TOOLBAR="toolbar"; LoadMenuAction.prototype.FROM_TOOLBAR_BLUEDOTMENU="toolbarBlueDotMenu"; LoadMenuAction.prototype.FROM_CONTEXTMENU="contextMenu"; LoadMenuAction.prototype.FROM_CONTEXTMENU_MOREACTIONS="contextMenuMoreActions"; LoadMenuAction.prototype.TOOLBAR_UPDATE_EVENT="com.ibm.bux.widgetchrome.toolbar.update"; LoadMenuAction.prototype.CONTEXTMENU_UPDATE_EVENT="com.ibm.bux.widget.contextMenu.update"; LoadMenuAction.prototype.setRequestParms=function(_199d){ this.m_action=_199d.action; this.m_sFrom=(_199d.from)?_199d.from:this.FROM_TOOLBAR; }; LoadMenuAction.prototype.execute=function(){ var _199e=this.m_oCV.getActionFactory(); var _199f=_199e.load(this.m_action); var _19a0=this.getMenuSpec(); var _19a1=GUtil.generateCallback(this.buildMenuCallback,[_19a0],this); _19a0=_199f.buildMenu(_19a0,_19a1); if(_19a0!=null){ this.buildMenuCallback(_19a0); } }; LoadMenuAction.prototype.buildMenuCallback=function(_19a2){ _19a2.open=true; _19a2.action=null; this.fireEvent(_19a2); }; LoadMenuAction.prototype.getMenuSpec=function(){ var oCV=this.m_oCV; var sFrom=this.m_sFrom; if(!sFrom||!oCV){ return null; } var _19a5=null; var _19a6=null; switch(sFrom){ case this.FROM_TOOLBAR: _19a5=oCV.getToolbar(); break; case this.FROM_TOOLBAR_BLUEDOTMENU: _19a5=oCV.findBlueDotMenu(); break; case this.FROM_CONTEXTMENU_MOREACTIONS: _19a5=oCV.findToolbarItem("MoreActions",oCV.getContextMenu()); break; } if(_19a5){ _19a6=oCV.findToolbarItem(this.m_action,_19a5); } if(_19a6){ _19a6.from=sFrom; } return _19a6; }; LoadMenuAction.prototype.fireEvent=function(_19a7){ var _19a8=[]; if(_19a7){ _19a8.push(_19a7); } var _19a9=this.m_oCV.getViewerWidget(); var sFrom=_19a7.from; switch(sFrom){ case this.FROM_TOOLBAR: case this.FROM_TOOLBAR_BLUEDOTMENU: _19a9.fireEvent(this.TOOLBAR_UPDATE_EVENT,null,_19a8); break; case this.FROM_CONTEXTMENU_MOREACTIONS: _19a9.fireEvent(this.CONTEXTMENU_UPDATE_EVENT,null,_19a8); break; } }; function MoveAction(){ this.m_sAction="Reorder"; }; MoveAction.prototype=new DragDropAction(); MoveAction.prototype.setRequestParms=function(_19ab){ this.m_order=_19ab.order; }; MoveAction.prototype.canMoveLeftRight=function(_19ac){ var _19ad=this.m_oCV.getSelectionController(); if(_19ad&&_19ad.getAllSelectedObjects().length==1){ var _19ae=_19ad.getAllSelectedObjects()[0].getCellRef(); if(_19ac=="right"&&_19ae.nextSibling){ return true; }else{ if(_19ac=="left"&&_19ae.previousSibling){ return true; } } } return false; }; MoveAction.prototype.updateMenu=function(_19af){ if(!this.canMove()){ _19af=""; }else{ var _19b0=this.m_oCV.getSelectionController(); if(_19b0&&_19b0.getAllSelectedObjects().length>1){ _19af.disabled=true; _19af.items=null; }else{ _19af.disabled=false; _19af.items=[]; _19af.items.push({disabled:!this.canMoveLeftRight("left"),name:"Move",label:RV_RES.IDS_JS_LEFT,iconClass:"moveLeft",action:{name:"Move",payload:{order:"left"}},items:null}); _19af.items.push({disabled:!this.canMoveLeftRight("right"),name:"Move",label:RV_RES.IDS_JS_RIGHT,iconClass:"moveRight",action:{name:"Move",payload:{order:"right"}},items:null}); } } return _19af; }; MoveAction.prototype.addActionContextAdditionalParms=function(){ var _19b1=this.getCognosViewer().getSelectionController(); var _19b2=null; if(this.m_order=="right"){ _19b2=_19b1.getAllSelectedObjects()[0].getCellRef().nextSibling; }else{ _19b2=_19b1.getAllSelectedObjects()[0].getCellRef().previousSibling; } var _19b3=_19b1.buildSelectionObject(_19b2,null); var tag=this.m_order=="right"?"after":"before"; var _19b5=this.getRAPLayoutTag(_19b2); _19b5=(_19b5!=null)?_19b5:_19b3.getColumnName(); return this.getSelectedCellTags()+"<"+tag+">"+xml_encode(_19b5)+""; }; function RefreshViewAction(){ this.m_bCanvasRefreshEvent=false; }; RefreshViewAction.prototype=new CognosViewerAction(); RefreshViewAction.prototype.addCommonOptions=function(_19b6){ var _19b7=this.getCognosViewer().getViewerWidget(); if(this.m_bCanvasRefreshEvent&&_19b7.getSavedOutputSearchPath()!=null){ _19b6.addFormField("ui.savedOutputSearchPath",encodeURIComponent(_19b7.getSavedOutputSearchPath())); }else{ _19b7.setSavedOutputsCMResponse(null); _19b7.setSavedOutputSearchPath(null); } _19b6.addFormField("run.outputFormat","HTML"); _19b6.addFormField("widget.reloadToolbar","true"); _19b7.clearPropertiesDialog(); var _19b8=document.getElementById("formWarpRequest"+this.getCognosViewer().getId()); _19b6.addFormField("ui.object",_19b8["reRunObj"].value); }; RefreshViewAction.prototype.execute=function(){ var _19b9=this.createCognosViewerDispatcherEntry("buxDropReportOnCanvas"); this.addCommonOptions(_19b9); var oCV=this.getCognosViewer(); var _19bb=oCV.getViewerWidget(); if(oCV.getCurrentlySelectedTab()&&_19bb.getSavedOutput()){ oCV.setKeepTabSelected(oCV.getCurrentlySelectedTab()); } this.getCognosViewer().dispatchRequest(_19b9); }; RefreshViewAction.prototype.doAddActionContext=function(){ return false; }; RefreshViewAction.prototype.updateMenu=function(_19bc){ _19bc.disabled=false; var oCV=this.getCognosViewer(); if(oCV){ var _19be=oCV.getViewerWidget(); if(_19be&&_19be.getSavedOutputSearchPath()!=null){ _19bc.disabled=true; } } return _19bc; }; function RefreshViewEventAction(){ this.m_bCanvasRefreshEvent=true; }; RefreshViewEventAction.prototype=new RefreshViewAction(); function RenameDataItemAction(){ this.m_sAction="Rename"; this.m_newLabel=""; this.m_prevLabel=""; this.m_containerId=""; this.m_bUndoAdded=false; }; RenameDataItemAction.prototype=new ModifyReportAction(); RenameDataItemAction.prototype.getUndoHint=function(){ return RV_RES.IDS_JS_RENAME; }; RenameDataItemAction.prototype.saveSpecForUndo=function(){ return true; }; RenameDataItemAction.prototype.getContainerId=function(){ return this.m_containerId; }; RenameDataItemAction.prototype.addActionContextAdditionalParms=function(){ var _19bf=this.getSelectedCellTags(); return (_19bf+""+xml_encode(this.m_prevLabel)+""+""+xml_encode(this.m_newLabel)+""); }; RenameDataItemAction.prototype.onMouseOver=function(evt){ var _19c1=getCtxNodeFromEvent(evt); _19c1.style.cursor=this.canRename()?"text":"default"; }; RenameDataItemAction.prototype.onMouseOut=function(evt){ var _19c3=getCtxNodeFromEvent(evt); _19c3.style.cursor="default"; }; RenameDataItemAction.prototype.onDoubleClick=function(evt){ if(this.canRename()){ var _19c5=getCtxNodeFromEvent(evt); this.insertTextArea(_19c5); } }; RenameDataItemAction.prototype.canRename=function(){ if(this.m_oCV.isBlacklisted("RenameFromContextMenu")){ return false; } var _19c6=this.m_oCV.getSelectionController(); var _19c7=_19c6.getAllSelectedObjects().length; if(_19c7==1&&!this.m_oCV.isLimitedInteractiveMode()){ var _19c8=_19c6.getAllSelectedObjects()[0]; if(_19c8.hasContextInformation()){ var _19c9=_19c8.getSelectedContextIds()[0][0]; var _19ca=_19c8.getCellRef(); return this.checkRenamableConditions(_19c8,_19ca,_19c9,_19c6); } } return false; }; RenameDataItemAction.prototype.checkRenamableConditions=function(_19cb,_19cc,_19cd,_19ce){ if(_19cb.isHomeCell()){ return false; } if(_19cb.getLayoutType()=="columnTitle"&&_19ce.selectionsHaveCalculationMetadata()){ if(_19cb.getDataContainerType()=="crosstab"&&!_19ce.areSelectionsMeasureOrCalculation()){ return false; } return true; } if(_19cb.getLayoutType()=="columnTitle"&&_19cb.getDataContainerType()=="crosstab"){ return false; } if(_19cb.getLayoutType()!="columnTitle"){ return false; } if(_19cc.getAttribute("cc")=="true"){ return false; } if(_19cc.getAttribute("CTNM")!=null&&_19ce.getMun(_19cd)!=""){ return false; } return true; }; RenameDataItemAction.prototype.insertTextArea=function(_19cf){ var label=document.createElement("label"); label.style.height="1px"; label.style.width="1px"; label.style.overflow="hidden"; label.style.position="absolute"; label.style.left="0px"; label.style.top="-500px"; label.setAttribute("for","rename"+this.m_oCV.getId()); label.id="renameLabel"+this.m_oCV.getId(); label.innerHTML=RV_RES.IDS_JS_RENAME_LABEL; var input=document.createElement("input"); input.id="rename"+this.m_oCV.getId(); input.name="rename"+this.m_oCV.getId(); input.type="text"; input.value=_19cf.childNodes[0].nodeValue; input.style.backgroundColor="transparent"; input.style.borderWidth="0px"; input.style.padding="0px"; input.style.margin="0px"; input.setAttribute("role","textbox"); input.setAttribute("aria-labelledby","renameLabel"+this.m_oCV.getId()); var width=_19cf.parentNode.scrollWidth-10; var _19d3=_19cf.parentNode.firstChild; while(_19d3){ if(_19d3!=_19cf){ width-=_19d3.scrollWidth; } _19d3=_19d3.nextSibling; } input.style.width=width+"px"; input.ctxNode=_19cf; input.action=this; input.originalLabel=_19cf.childNodes[0].nodeValue; if(isIE()){ input.style.fontFamily=_19cf.currentStyle.fontFamily; input.style.fontSize=_19cf.currentStyle.fontSize; input.style.fontStyle=_19cf.currentStyle.fontStyle; input.style.fontVariant=_19cf.currentStyle.fontVariant; input.style.fontWeight=_19cf.currentStyle.fontWeight; input.attachEvent("onblur",this.onBlur); input.attachEvent("onkeydown",this.onKeyDown); input.style.overflow="hidden"; }else{ input.style.font="inherit"; input.addEventListener("blur",this.onBlur,false); input.addEventListener("keydown",this.onKeyDown,false); input.style.overflow="visible"; } _19cf.innerHTML=""; _19cf.appendChild(label); _19cf.appendChild(input); input.focus(); input.select(); }; RenameDataItemAction.prototype.onMouseDown=function(evt){ if(evt){ try{ var node=evt.originalTarget?evt.originalTarget:evt.srcElement; if(node&&node.getAttribute("id")==="rename"+this.m_oCV.getId()){ return true; } } catch(ex){ } } return false; }; RenameDataItemAction.prototype.onBlur=function(evt){ var node; if(isIE()){ node=getNodeFromEvent(evt); }else{ node=this; } var _19d8=node.ctxNode; var _19d9=node.action; var _19da=node.value!=""?node.value:node.innerHTML; _19d9.updateLabel(_19d8,_19da,node.originalLabel); }; RenameDataItemAction.prototype.onKeyDown=function(evt){ var _19dc=""; var node=getNodeFromEvent(evt); if(evt.keyCode=="13"){ _19dc=node.value!=""?node.value:node.originalLabel; }else{ if(evt.keyCode=="27"){ _19dc=node.originalLabel; } } if(_19dc!=""){ var _19de=node.ctxNode; var _19df=node.action; _19df.updateLabel(_19de,_19dc,node.originalLabel); return stopEventBubble(evt); }else{ return true; } }; RenameDataItemAction.prototype.updateLabel=function(_19e0,_19e1,_19e2){ this.m_newLabel=_19e1; this.m_prevLabel=_19e2; _19e0.innerHTML=""; _19e0.appendChild(document.createTextNode(_19e1)); var _19e3=this.m_oCV.getSelectionController(); if(_19e3!=null&&_19e1!=_19e2){ var _19e4=new CSelectionObjectFactory(_19e3); this.m_containerId=this.removeNamespace(_19e4.getLayoutElementId(_19e0)); var _19e5=_19e4.getSelectionObject(_19e0.parentNode); _19e3.m_aSelectedObjects[0]=_19e5; var _19e6=_19e5.getCellRef().getElementsByTagName("span"); var span=null; if(_19e6){ for(var i=0;i<_19e6.length;i++){ span=_19e6[i]; if(span.getAttribute("ctx")!=null&&span.style.visibility!="hidden"){ span.focus(); break; } } } this.execute(); } }; RenameDataItemAction.prototype.buildUrl=function(){ var _19e9="b_action=cognosViewer&ui.action=modifyReport&cv.responseFormat=xml"; var _19ea=this.addActionContext(); _19e9+="&cv.actionContext="+encodeURIComponent(_19ea); if(window.gViewerLogger){ window.gViewerLogger.log("Action context",_19ea,"xml"); } _19e9+="&ui.object="+encodeURIComponent(this.m_oCV.envParams["ui.object"]); if(typeof this.m_oCV.envParams["ui.spec"]!="undefined"){ _19e9+="&ui.spec="+encodeURIComponent(this.m_oCV.envParams["ui.spec"]); } if(typeof this.m_oCV.getModelPath()!=""){ _19e9+="&modelPath="+encodeURIComponent(this.m_oCV.getModelPath()); } return _19e9; }; RenameDataItemAction.prototype.keepRAPCache=function(){ return false; }; RenameDataItemAction.prototype.reuseQuery=function(){ return true; }; function RenameFromContextMenuAction(){ }; RenameFromContextMenuAction.prototype=new RenameDataItemAction(); RenameFromContextMenuAction.prototype.canRename=function(_19eb){ if(!_19eb||_19eb.hasContextInformation()==false){ return false; } var _19ec=this.m_oCV.getSelectionController(); var _19ed=_19eb.getSelectedContextIds()[0][0]; var _19ee=_19eb.getCellRef(); return this.checkRenamableConditions(_19eb,_19ee,_19ed,_19ec); }; RenameFromContextMenuAction.prototype.updateMenu=function(_19ef){ _19ef.visible=this.ifContainsInteractiveDataContainer(); if(!_19ef.visible){ return _19ef; } var _19f0=this.m_oCV.getSelectionController(); var _19f1=_19f0.getAllSelectedObjects().length; if(_19f1!=1){ for(var _19f2=0;_19f2<_19f1;_19f2++){ if(!this.canRename(_19f0.getAllSelectedObjects()[_19f2])){ return ""; } } _19ef.disabled=true; }else{ if(!this.canRename(_19f0.getAllSelectedObjects()[0])){ _19ef=""; }else{ _19ef.disabled=false; } } return _19ef; }; RenameFromContextMenuAction.prototype.getSpanFromCellRef=function(_19f3){ var _19f4=_19f3.getElementsByTagName("span"); var span=null; if(_19f4){ for(var i=0;i<_19f4.length;i++){ span=_19f4[i]; if(span.getAttribute("ctx")!=null&&span.style.visibility!="hidden"){ break; } } } return span; }; RenameFromContextMenuAction.prototype.execute=function(){ var _19f7=this.m_oCV.getSelectionController().getAllSelectedObjects()[0].getCellRef(); if(_19f7){ var span=this.getSpanFromCellRef(_19f7); var _19f9=this.m_oCV.getAction("RenameDataItem"); _19f9.insertTextArea(span); } }; function ResetToOriginalAction(){ }; ResetToOriginalAction.prototype=new CognosViewerAction(); ResetToOriginalAction.prototype.updateMenu=function(_19fa){ var _19fb=this.getCognosViewer().envParams.baseReportAvailable; _19fa.disabled=(_19fb==="false")?true:_19fa.disabled; return _19fa; }; ResetToOriginalAction.prototype.execute=function(){ var _19fc=viewer.dialogs.ConfirmationDialog(RV_RES.IDS_JS_RESET_TO_ORIGINAL,RV_RES.IDS_JS_RESET_TO_ORIGINAL_WARNING,RV_RES.IDS_JS_RESET_TO_ORIGINAL_WARNING_DESC,null,this,this.executeAction); _19fc.startup(); _19fc.show(); }; ResetToOriginalAction.prototype.executeAction=function(_19fd){ this.gatherFilterInfoBeforeAction("ResetToOriginal"); ChangePaletteAction.reset(this.getCognosViewer()); }; ResetToOriginalAction.prototype.dispatchRequest=function(_19fe){ var _19ff=this.getCognosViewer(); var _1a00=_19ff.getViewerWidget(); _1a00.reset(); var _1a01=_1a00.getAttributeValue("originalReport"); if(!_1a01){ var _1a02=_1a00.getSavedItem(); if(_1a00.isSavedReport(_1a01,_1a02)){ _1a01=_1a02; } } var _1a03=_1a00.getAttributeValue("originalReportPart"); var _1a04=_19ff.envParams["cv.objectPermissions"]; var _1a05=_19ff.envParams["bpmRestURI"]; var _1a06=_19ff.envParams["glossaryURI"]; var _1a07=_19ff.envParams["metadataInformationURI"]; var _1a08=_19ff.envParams["ui.routingServerGroup"]; delete _19ff.envParams; _19ff.envParams={}; _19ff.envParams["ui.object"]=_1a01; _19ff.envParams["originalReport"]=_1a01; _19ff.envParams["bux"]="true"; _19ff.envParams["cv.objectPermissions"]=_1a04; _19ff.envParams["ui.routingServerGroup"]=_1a08; if(_1a05){ _19ff.envParams["bpmRestURI"]=_1a05; } if(_1a06){ _19ff.envParams["glossaryURI"]=_1a06; } if(_1a07){ _19ff.envParams["metadataInformationURI"]=_1a07; } var _1a09=this.createCognosViewerDispatcherEntry("resetToOriginal"); _1a09.addFormField("run.outputFormat","HTML"); _1a09.addFormField("widget.reloadToolbar","true"); _1a09.addFormField("ui.reportDrop","true"); _19ff.resetbHasPromptFlag(); _1a09.addFormField("widget.forceGetParameters","true"); if(_19fe!=""){ _1a09.addFormField("cv.updateDataFilters",_19fe); } _1a09.addFormField("run.prompt","false"); var _1a0a=(_1a03&&_1a03.length>0); if(_1a0a){ _1a09.addFormField("reportpart_id",_1a03); } _19ff.hideReportInfo(); _19ff.dispatchRequest(_1a09); this.fireModifiedReportEvent(); }; ResetToOriginalAction.prototype.doAddActionContext=function(){ return false; }; ResetToOriginalAction.prototype.canShowMenuInGlobalArea=function(){ return true; }; ResetToOriginalAction.prototype.isValidMenuItem=function(){ var _1a0b=this.getCognosViewer(); var _1a0c=_1a0b.getViewerWidget(); if(_1a0c.m_isInGlobalArea){ return (this.isPromptWidget()?true:false); }else{ return (this.isPromptWidget()?false:true); } }; function ResizeChartAction(){ this.m_width=0; this.m_height=0; this.m_sAction="ChangeDataContainerSize"; this.m_bRunReport=true; this.m_oChart=null; }; ResizeChartAction.prototype=new ModifyReportAction(); ResizeChartAction.prototype.isUndoable=function(){ return false; }; ResizeChartAction.superclass=ModifyReportAction.prototype; ResizeChartAction.prototype.runReport=function(){ return this.m_bRunReport; }; ResizeChartAction.prototype.canBeQueued=function(){ return true; }; ResizeChartAction.prototype.reuseQuery=function(){ return true; }; ResizeChartAction.PADDING={getWidth:function(){ return 2; },getHeight:function(){ return 2; }}; ResizeChartAction.prototype.getActionKey=function(){ return "ResizeChartAction"; }; ResizeChartAction.prototype.setRequestParms=function(_1a0d){ if(_1a0d&&_1a0d.resize){ this.m_width=parseInt(_1a0d.resize.w,10)-ResizeChartAction.PADDING.getWidth(); this.m_height=parseInt(_1a0d.resize.h,10)-ResizeChartAction.PADDING.getHeight(); } }; ResizeChartAction.prototype.execute=function(){ if(this.m_oCV.m_readyToRespondToResizeEvent!==true){ return; } if(this.m_oCV.getPinFreezeManager()){ this.m_oCV.getPinFreezeManager().resize(this.m_width,this.m_height); } if(this.isActionApplicable()){ var _1a0e=this.getLayoutComponents(); if(_1a0e&&_1a0e.length>0){ for(var i=0;i<_1a0e.length;++i){ if(_1a0e[i].nodeName==="IMG"||_1a0e[0].getAttribute("flashChart")!==null){ this.m_oChart=_1a0e[i]; break; } } if(this.m_oChart&&this.isNewSizeDifferent()){ if(_1a0e[0].getAttribute("flashChart")!==null){ this.m_bRunReport=false; this.resizeFlashChart(); }else{ this.m_bRunReport=true; this.resizeChart(); } } } } }; ResizeChartAction.prototype.isActionApplicable=function(){ var _1a10=this.m_oCV.getRAPReportInfo(); if(_1a10&&_1a10.isSingleContainer()){ return true; } return false; }; ResizeChartAction.prototype.resizeFlashChart=function(){ var size=this.getNewChartSize(); this.m_oChart.setAttribute("width",size.w+"px"); this.m_oChart.setAttribute("height",size.h+"px"); this.resizeChart(); }; ResizeChartAction.prototype.resizeChart=function(){ ResizeChartAction.superclass.execute.call(this); }; ResizeChartAction.prototype.addActionContextAdditionalParms=function(){ var _1a12=""; var size=this.getNewChartSize(); _1a12+=""+size.h+"px"; _1a12+=""+size.w+"px"; return _1a12; }; ResizeChartAction.prototype.isNewSizeDifferent=function(){ var _1a14=(this.m_oChart.getAttribute("flashChart")!==null); var _1a15=_1a14?this.m_oChart.getAttribute("width"):this.m_oChart.style.width; var _1a16=_1a14?this.m_oChart.getAttribute("height"):this.m_oChart.style.height; if(!_1a15||_1a15==""){ _1a15=this.m_oChart.width; _1a16=this.m_oChart.height; } return parseInt(_1a15,10)!=this.m_width||parseInt(_1a16,10)!=this.m_height; }; ResizeChartAction.prototype.getNewChartSize=function(){ var _1a17=this.m_oChart; var _1a18=0; var _1a19=0; var _1a1a=0; var _1a1b=0; var _1a1c=0; var _1a1d=0; var _1a1e=0; var _1a1f=0; var _1a20=0; var _1a21=0; var _1a22=0; var _1a23=0; require(["dojo/dom-style"],function(_1a24){ _1a18=_1a24.get(_1a17,"marginLeft"); _1a19=_1a24.get(_1a17,"marginRight"); _1a1a=_1a24.get(_1a17,"marginTop"); _1a1b=_1a24.get(_1a17,"marginBottom"); _1a1c=_1a24.get(_1a17,"borderLeftWidth"); _1a1d=_1a24.get(_1a17,"borderRightWidth"); _1a1e=_1a24.get(_1a17,"borderTopWidth"); _1a1f=_1a24.get(_1a17,"borderBottomWidth"); _1a20=_1a24.get(_1a17,"paddingLeft"); _1a21=_1a24.get(_1a17,"paddingRight"); _1a22=_1a24.get(_1a17,"paddingTop"); _1a23=_1a24.get(_1a17,"paddingBottom"); }); this.m_width-=_1a1c+_1a1d+_1a18+_1a19+_1a20+_1a21; this.m_height-=_1a1e+_1a1f+_1a1a+_1a1b+_1a22+_1a23; if(this.m_keepRatio){ var ratio=parseInt(this.m_oChart.style.width,10)/parseInt(this.m_oChart.style.height,10); var _1a26=ratio*this.m_height; if(_1a26>this.m_width){ this.m_height=this.m_width/ratio; } var _1a27=this.m_width/ratio; if(_1a27>this.m_height){ this.m_width=this.m_height*ratio; } } return {w:this.m_width,h:this.m_height}; }; function RetryRequestAction(){ this.m_lastActionParams=null; }; RetryRequestAction.prototype=new CognosViewerAction(); RetryRequestAction.prototype.setRequestParms=function(parms){ this.m_lastActionParams=parms; }; RetryRequestAction.prototype.execute=function(){ if(this.m_lastActionParams){ var _1a29=new ViewerDispatcherEntry(this.m_oCV); var _1a2a=this.m_lastActionParams.keys(); for(var index=0;index<_1a2a.length;index++){ _1a29.addFormField(_1a2a[index],this.m_lastActionParams.get(_1a2a[index])); } _1a29.addFormField("cv.responseFormat","data"); _1a29.addFormField("widget.reloadToolbar","true"); _1a29.addNonEmptyStringFormField("limitedInteractiveMode",this.m_oCV.envParams["limitedInteractiveMode"]); this.m_oCV.dispatchRequest(_1a29); this.m_oCV.getViewerWidget().setOriginalFormFields(null); } }; function RunReportAction(){ this.m_reuseQuery=false; this.m_promptValues=null; this.m_sendParameterValues=false; this.m_clearCascadeParamsList=null; }; RunReportAction.prototype=new CognosViewerAction(); RunReportAction.prototype.setRequestParams=function(_1a2c){ if(!_1a2c){ return; } this.m_promptValues=_1a2c.promptValues; this.m_clearCascadeParamsList=_1a2c.clearCascadeParamsList; }; RunReportAction.prototype.setSendParameterValues=function(_1a2d){ this.m_sendParameterValues=_1a2d; }; RunReportAction.prototype.reuseQuery=function(){ return this.m_reuseQuery; }; RunReportAction.prototype.setReuseQuery=function(value){ this.m_reuseQuery=value; }; RunReportAction.prototype.getPromptOption=function(){ return "false"; }; RunReportAction.prototype.canBeQueued=function(){ return false; }; RunReportAction.prototype.getAction=function(_1a2f){ return _1a2f?"run":"runSpecification"; }; RunReportAction.prototype.addAdditionalOptions=function(_1a30){ this._addCommonOptions(_1a30); this._addRunOptionsFromProperties(_1a30); this._addClearCascadeParams(_1a30); this._addPromptValuesToRequest(_1a30); }; RunReportAction.prototype._addClearCascadeParams=function(oReq){ if(!this.m_clearCascadeParamsList||this.m_clearCascadeParamsList.length==0){ return; } var _1a32=this.m_clearCascadeParamsList.length; for(var i=0;i<_1a32;i++){ oReq.addFormField("c"+this.m_clearCascadeParamsList[i],"1"); } }; RunReportAction.prototype._addPromptValuesToRequest=function(_1a34){ if(!this.m_promptValues){ return; } _1a34.addFormField("sharedPromptRequest","true"); for(var _1a35 in this.m_promptValues){ _1a34.addFormField(_1a35,this.m_promptValues[_1a35]); } }; RunReportAction.prototype._addCommonOptions=function(oReq){ var _1a37=this.getCognosViewer().isLimitedInteractiveMode(); if(typeof this.m_action==="undefined"){ this.m_action=this.getAction(_1a37); } oReq.addFormField("run.prompt",this.getPromptOption()); oReq.addFormField("ui.action",this.m_action); if(_1a37){ oReq.addFormField("run.xslURL","bux.xsl"); } oReq.addFormField("run.outputFormat","HTML"); if(this.reuseQuery()===true){ oReq.addFormField("reuseResults","true"); } }; RunReportAction.prototype._addRunOptionsFromProperties=function(oReq){ var _1a39=this.getCognosViewer().getViewerWidget().getProperties(); if(_1a39.getRowsPerPage()!=null){ oReq.addFormField("run.verticalElements",_1a39.getRowsPerPage()); } }; RunReportAction.prototype.execute=function(){ var oReq=this.createCognosViewerDispatcherEntry(this.m_action); oReq.setCanBeQueued(this.canBeQueued()); if((this.m_action==="forward"||this.m_action==="back")&&(typeof this.m_bAbortAction==="undefined"||this.m_bAbortAction===true)){ return false; } var oCV=this.getCognosViewer(); if(this.m_sendParameterValues&&oCV.envParams["delayedLoadingExecutionParams"]){ oReq.addFormField("delayedLoadingExecutionParams",oCV.envParams["delayedLoadingExecutionParams"]); delete oCV.envParams["delayedLoadingExecutionParams"]; } this.getCognosViewer().dispatchRequest(oReq); return true; }; RunReportAction.prototype.doAddActionContext=function(){ return false; }; RunReportAction.prototype.updateMenu=function(json){ json.visible=!this.isPromptWidget(); return json; }; function BuxRunReportAction(){ BuxRunReportAction.baseConstructor.call(); }; BuxRunReportAction.prototype=new RunReportAction(); BuxRunReportAction.baseConstructor=RunReportAction; BuxRunReportAction.prototype.canBeQueued=function(){ return true; }; BuxRunReportAction.prototype.getAction=function(_1a3d){ return _1a3d?"runBux":"buxRunSpec"; }; function RefreshAction(){ this.m_sAction="Refresh"; }; RefreshAction.prototype=new RunReportAction(); RefreshAction.superclass=RunReportAction.prototype; RefreshAction.prototype.execute=function(){ RefreshAction.superclass.execute.call(this); }; function GetParametersAction(){ this.m_payload=""; this.isPrimaryPromptWidget=false; this.m_requestParamsCopy=null; }; GetParametersAction.prototype=new RunReportAction(); GetParametersAction.prototype.setRequestParms=function(_1a3e){ this.m_payload=_1a3e; }; GetParametersAction.prototype.addRequestOptions=function(_1a3f){ _1a3f.addFormField("asynch.alwaysIncludePrimaryRequest","false"); _1a3f.addFormField("ui.action","getParameters"); _1a3f.addFormField("ui.spec",this.m_oCV.envParams["ui.spec"]); _1a3f.addFormField("ui.object",this.m_oCV.envParams["ui.object"]); _1a3f.addFormField("isPrimaryPromptWidget",this.isPrimaryPromptWidget?"true":"false"); _1a3f.addFormField("parameterValues",this.m_oCV.getExecutionParameters()); if(this.m_oCV.envParams["bux"]=="true"){ _1a3f.addFormField("bux","true"); } }; GetParametersAction.prototype.execute=function(){ var oCV=this.getCognosViewer(); var _1a41=new AsynchJSONDispatcherEntry(oCV); _1a41.setCallbacks({"complete":{"object":this,"method":this.handleGetParametersResponse}}); this.addRequestOptions(_1a41); if(oCV.getActiveRequest()){ this.m_requestFormFieldsCopy=oCV.getActiveRequest().getFormFields(); } _1a41.sendRequest(); }; GetParametersAction.prototype.handleGetParametersResponse=function(_1a42){ try{ var _1a43=_1a42.getResult(); var _1a44=_1a43.xml; var _1a45=this.getCognosViewer(); var _1a46=_1a45.getViewerWidget(); if(typeof _1a44!="undefined"&&_1a44!=null){ var _1a47=xml_decode(_1a44); this.m_oCV.envParams["reportPrompts"]=_1a47; if(this.isPrimaryPromptWidget){ this.m_oCV.raisePromptEvent(_1a47,this.m_requestFormFieldsCopy); }else{ _1a46.sharePrompts(this.m_payload); } } if(typeof _1a46!="undefined"){ _1a46.promptParametersRetrieved=true; var _1a48=_1a46.getButtonFromSavedToolbarButtons("Reprompt"); if(typeof _1a48!="undefined"&&_1a48!=null){ var _1a49=_1a45.findBlueDotMenu(); if(_1a45.addedButtonToToolbar(_1a49,_1a48.button,"Refresh",_1a48.position)){ _1a45.resetbHasPromptFlag(); _1a46.updateToolbar(); } _1a46.removeFromSavedToolbarButtons("Reprompt"); } } } catch(e){ } }; function RepromptAction(){ this.m_repromptAction=null; }; RepromptAction.prototype=new CognosViewerAction(); RepromptAction.superclass=CognosViewerAction.prototype; RepromptAction.prototype.updateMenu=function(_1a4a){ var oCV=this.getCognosViewer(); _1a4a.visible=(!this.isPromptWidget()&&oCV.hasPrompt()); if(!_1a4a.visible){ _1a4a.save=true; }else{ delete _1a4a.save; } return _1a4a; }; RepromptAction.prototype.setRequestParms=function(_1a4c){ RepromptAction.superclass.setRequestParms(_1a4c); if(_1a4c&&_1a4c["preferencesChanged"]){ this["preferencesChanged"]=_1a4c["preferencesChanged"]; } }; RepromptAction.prototype.execute=function(){ var oCV=this.getCognosViewer(); if(oCV.isLimitedInteractiveMode()){ this.m_repromptAction=new RepromptRunAction(); }else{ this.m_repromptAction=new RepromptRAPAction(); } this.m_repromptAction.setCognosViewer(oCV); if(this["preferencesChanged"]){ this.m_repromptAction.reuseConversation(false); } this.m_repromptAction.execute(); }; function RepromptRAPAction(){ this.m_sAction="Reprompt"; }; RepromptRAPAction.prototype=new ModifyReportAction(); RepromptRAPAction.prototype.getPromptOption=function(){ return "true"; }; RepromptRAPAction.prototype.isUndoable=function(){ return false; }; RepromptRAPAction.prototype.reuseQuery=function(){ return false; }; RepromptRAPAction.prototype.reuseGetParameter=function(){ return false; }; RepromptRAPAction.prototype.keepFocusOnWidget=function(){ return false; }; RepromptRAPAction.prototype.preProcess=function(){ var cv=this.getCognosViewer(); cv.m_raiseSharePromptEvent=true; }; RepromptRAPAction.prototype.addAdditionalOptions=function(_1a4f){ _1a4f.addFormField("run.outputFormat","HTML"); _1a4f.addFormField("bux","true"); }; function RepromptRunAction(){ }; RepromptRunAction.prototype=new RunReportAction(); RepromptRunAction.prototype.reuseQuery=function(){ return false; }; RepromptRunAction.prototype.reuseGetParameter=function(){ return false; }; RepromptRunAction.prototype.preProcess=function(){ var cv=this.getCognosViewer(); cv.m_raiseSharePromptEvent=true; }; RepromptRunAction.prototype.getPromptOption=function(){ return "true"; }; function SelectionAction(){ }; SelectionAction.prototype=new CognosViewerAction(); SelectionAction.prototype.onMouseOver=function(evt){ if(DragDropAction_isDragging(evt)==false){ var _1a52=this.getCognosViewer().getSelectionController(); _1a52.pageHover(evt); } }; SelectionAction.prototype.onMouseOut=function(evt){ if(DragDropAction_isDragging(evt)==false){ var _1a54=this.getCognosViewer().getSelectionController(); _1a54.pageHover(evt); } }; SelectionAction.prototype.hasPermission=function(){ var oCV=this.getCognosViewer(); return !(oCV.isLimitedInteractiveMode()||oCV.envParams["cv.objectPermissions"].indexOf("read")===-1); }; SelectionAction.prototype.executeDrillUpDown=function(evt){ var oCV=this.getCognosViewer(); var _1a58=oCV.getViewerWidget(); if(oCV.isDrillBlackListed()||(_1a58&&_1a58.isSelectionFilterEnabled())){ return false; } if(evt.button==0||evt.button==1||evt.keyCode=="13"){ var _1a59=getCtxNodeFromEvent(evt); if(_1a59!=null){ var _1a5a=this.m_oCV.getSelectionController(); var _1a5b=_1a59.getAttribute("type")!=null?_1a59:_1a59.parentNode; var type=_1a5b.getAttribute("type"); var _1a5d=_1a59.getAttribute("ctx"); _1a5d=_1a5d.split("::")[0].split(":")[0]; if((_1a5b.getAttribute("CTNM")!=null||type=="datavalue")&&_1a5a.getMun(_1a5d)!=""){ var _1a5e=_1a5a.getAllSelectedObjects(); for(var index=0;index<_1a5e.length;++index){ var _1a60=_1a5e[index]; if(_1a60.getCellRef()==_1a59.parentNode){ if(_1a5e.length>1){ _1a5a.clearSelectedObjects(); _1a5a.addSelectionObject(_1a60); } var _1a61=this.m_oCV.getActionFactory(); var _1a62=_1a61.load("DrillUpDown"); _1a62.updateDrillability(this.m_oCV,_1a59); if(_1a62.drillability>0&&this.hasPermission()){ _1a62.execute(); return true; } } } } } } return false; }; SelectionAction.prototype.executeDrillThrough=function(evt){ var _1a64=this.getCognosViewer().getViewerWidget(); if(_1a64&&_1a64.isSelectionFilterEnabled()){ return; } var _1a65=this.getCognosViewer().getDrillMgr(); return _1a65.getDrillThroughParameters("execute",evt); }; SelectionAction.prototype.pageClicked=function(evt){ var _1a67=false; var _1a68=evt.which?evt.which==1:evt.button==1; var _1a69=new CognosViewerSort(evt,this.m_oCV); var _1a6a,_1a6b=getCrossBrowserNode(evt); try{ _1a6a=(_1a6b&&_1a6b.className)||""; } catch(ex){ _1a6a=""; } var oCV=this.getCognosViewer(); var _1a6d=null; if(_1a68&&_1a69.isSort(evt)&&!oCV.isLimitedInteractiveMode()&&!oCV.isBlacklisted("Sort")){ _1a69.execute(); }else{ if(_1a68&&_1a6a.indexOf("expandButton")>-1){ var nNode=_1a6b; if(_1a6a.indexOf("expandButtonCaption")>-1){ nNode=nNode.parentNode; _1a6a=nNode.className; } _1a6d=getCognosViewerSCObjectRef(this.m_oCV.getId()); _1a6d.selectSingleDomNode(nNode.parentNode); var _1a6f; if(_1a6a.indexOf("collapse")===-1){ _1a6f=new ExpandMemberAction(); }else{ _1a6f=new CollapseMemberAction(); } _1a6f.setCognosViewer(oCV); _1a6f.execute(); }else{ _1a6d=this.m_oCV.getSelectionController(); if(this.executeDrillUpDown(evt)===false){ var _1a70=this.m_oCV.getViewerWidget(); if(_1a70.isSelectionFilterEnabled()){ if(_1a68||evt.keyCode===13){ _1a70.preprocessPageClicked(false,evt); }else{ _1a70.preprocessPageClicked(true); } } if(_1a6d.pageClicked(evt)!=false){ this.m_oCV.getViewerWidget().updateToolbar(); _1a6d.resetAllowHorizontalDataValueSelection(); } setNodeFocus(evt); } if(_1a68||evt.keyCode===13){ _1a67=this.executeDrillThrough(evt); } if(_1a68&&this.m_oCV.getViewerWidget()&&this.m_oCV.getViewerWidget().onSelectionChange){ this.m_oCV.getViewerWidget().onSelectionChange(); } } } return _1a67; }; SelectionAction.prototype.mouseActionInvolvesSelection=function(evt){ var _1a72=evt.which?evt.which==1:evt.button==1; var _1a73=new CognosViewerSort(evt,this.m_oCV); if(_1a72&&_1a73.isSort(evt)){ return false; } if(this.executeDrillUpDown(evt)!==false){ return false; } return true; }; SelectionAction.prototype.onMouseDown=function(evt){ this.delegateClickToMouseUp=false; if(this.mouseActionInvolvesSelection(evt)&&!this.m_oCV.getSelectionController().shouldExecutePageClickedOnMouseDown(evt)){ this.delegateClickToMouseUp=true; return false; } return this.pageClicked(evt); }; SelectionAction.prototype.onMouseUp=function(evt,_1a76){ var ret=false; if(!_1a76&&this.mouseActionInvolvesSelection(evt)&&this.delegateClickToMouseUp){ ret=this.pageClicked(evt); } this.delegateClickToMouseUp=false; return ret; }; SelectionAction.prototype.onKeyDown=function(evt){ this.pageClicked(evt); }; SelectionAction.prototype.onDoubleClick=function(evt){ var _1a7a=this.m_oCV; var _1a7b=_1a7a.getViewerWidget(); if(_1a7a.isDrillBlackListed()||(_1a7b&&_1a7b.isSelectionFilterEnabled())){ return; } if(_1a7a.getStatus()=="complete"){ var _1a7c=_1a7a.getDrillMgr(); var _1a7d="DrillDown"; var _1a7e="DrillDown"; var _1a7f=false; var _1a80=false; if(_1a7c!=null){ if(!this.hasPermission()){ return true; } var _1a81=_1a7c.getSelectedObject(); if(_1a81==null||(_1a81.m_dataContainerType=="list"&&_1a81.m_sLayoutType=="columnTitle")){ return true; } var _1a82=_1a81.getDrillOptions(); if(typeof _1a82=="undefined"||_1a82==null||!_1a82.length){ return true; } _1a7f=_1a7c.canDrillDown(); if(!_1a7f){ _1a80=_1a7c.canDrillUp(); if(_1a80){ _1a7d="DrillUp"; _1a7e="DrillUp"; } } if(_1a7f||_1a80){ _1a7a.executeAction(_1a7d,_1a7e); } }else{ return true; } } }; function SelectionFilterSwitchAction(){ this.m_sAction="SelectionFilterSwitch"; }; SelectionFilterSwitchAction.prototype=new CognosViewerAction(); SelectionFilterSwitchAction.prototype.updateMenu=function(_1a83){ if(this.getCognosViewer().getViewerWidget().isSelectionFilterEnabled()){ _1a83.disabled=false; _1a83.checked=true; _1a83.iconClass="selectionFilterEnabled"; _1a83.label=RV_RES.IDS_JS_SELECTION_FILTER_SWITCH_DISABLE; }else{ _1a83.disabled=false; _1a83.checked=false; _1a83.iconClass="selectionFilter"; _1a83.label=RV_RES.IDS_JS_SELECTION_FILTER_SWITCH; } return _1a83; }; SelectionFilterSwitchAction.prototype.execute=function(){ var oCV=this.getCognosViewer(); var _1a85=oCV.getViewerWidget(); var _1a86=_1a85.isSelectionFilterEnabled(); if(_1a86){ if(_1a85.selectionFilterSent()){ _1a85.clearSelectionFilter(); } } _1a85.toggleSelectionFilterSwitch(); _1a85.updateToolbar(); _1a85.onContextMenu({}); if(!_1a86){ if(_1a85.somethingSelected()){ _1a85.broadcastSelectionFilter(); } } _1a85.updateDrillThroughLinks(); _1a85.fireEvent("com.ibm.bux.widget.modified",null,{"modified":true}); }; function SharePromptAction(){ this.m_bAbortAction=true; }; SharePromptAction.prototype=new RunReportAction(); SharePromptAction.prototype.preProcess=function(){ var cv=this.getCognosViewer(); cv.disableRaiseSharePromptEvent(); }; SharePromptAction.prototype.setRequestParms=function(_1a88){ this.m_sharePromptParameters=_1a88.parameters; this.m_action="forward"; }; SharePromptAction.prototype.parsePromptParameters=function(){ var _1a89=false; var _1a8a=this.getReportParameterNodes(); if(_1a8a){ var _1a8b=this.m_sharePromptParameters; var _1a8c={}; var _1a8d=[]; for(var i in _1a8b){ var _1a8f=_1a8b[i].parmName; var _1a90=_1a8b[i].modelItem; var sName=null; var _1a92=null; var _1a93=false; var _1a94={}; for(var j in _1a8a){ var _1a96=_1a8a[j].getAttribute("parameterName"); var _1a97=_1a8a[j].getAttribute("modelItem"); if((typeof _1a96!=="undefined"&&_1a96===_1a8f)||(typeof _1a97!=="undefined"&&_1a90!=="undefined"&&_1a90!==""&&_1a97===_1a90&&!this.arrayContains(_1a8d,_1a97))){ _1a89=true; sName="p_"+_1a96; _1a92=this.getSharedPromptValue(_1a8b[i],_1a8a[j]); if(_1a96===_1a8f){ _1a8c[sName]=_1a92; _1a8d.push(_1a97); _1a93=false; break; }else{ _1a94[sName]=_1a92; _1a93=true; } } } if(_1a93){ for(var x in _1a94){ _1a8c[x]=_1a94[x]; } } } if(_1a89){ this.m_bAbortAction=false; this.m_promptValues=_1a8c; } } return _1a89; }; SharePromptAction.prototype.getSharedPromptValue=function(_1a99,_1a9a){ var _1a9b=null; var _1a9c=_1a99.parmValue; var _1a9d=this._isPromptParamMultiValued(_1a99.multivalued,_1a9c); var _1a9e=new RegExp(/^<)/); var _1aa0=_1a9f.exec(_1a9c); _1a9b=_1aa0[1]+"/selectChoices>"; }else{ _1a9b=_1a9c; } return _1a9b; }; SharePromptAction.prototype.arrayContains=function(array,value){ var found=false; for(var i=0;i\s*0&&_1aac.childNodes[0].nodeName==="parsererror")){ var _1aad=_1aac.firstChild; var _1aae=XMLHelper_FindChildByTagName(_1aad,"reportParameters",true); _1aaa=XMLHelper_FindChildrenByTagName(_1aae,"reportParameter",false); } } } catch(e){ } return _1aaa; }; SharePromptAction.prototype.executePrompt=function(){ if(this.getPromptValues()!==null){ this.execute(); return true; } return false; }; function SnapshotsAction(){ }; SnapshotsAction.prototype=new CognosViewerAction(); SnapshotsAction.prototype.updateMenu=function(_1aaf){ var _1ab0=this.m_oCV.getViewerWidget(); _1aaf.disabled=(_1ab0.getAttributeValue("reportCreatedInCW")=="true")||(_1ab0.getAttributeValue("fromReportPart")=="true")||(this.m_oCV.envParams["reportpart_id"]&&this.m_oCV.envParams["reportpart_id"].length)>0?true:false; _1aaf.visible=!this.isPromptWidget(); return _1aaf; }; SnapshotsAction.prototype.execute=function(){ var oCV=this.getCognosViewer(); var _1ab2=oCV.getViewerWidget(); if(_1ab2.getSavedOutputsCMResponse()==null){ this.queryCMForSavedOutputs({"complete":{"object":this,"method":this.handleQueryResponse}}); }else{ if(typeof _1ab2.savedOutputMenuUpdated!="undefined"&&_1ab2.savedOutputMenuUpdated==false){ this.populateMenu(true); _1ab2.savedOutputMenuUpdated=true; } } }; SnapshotsAction.prototype.queryCMForSavedOutputs=function(_1ab3){ var oCV=this.getCognosViewer(); var _1ab5=oCV.getViewerWidget(); var _1ab6=""; var _1ab7=document.getElementById("formWarpRequest"+oCV.getId()); if(oCV.envParams["originalReport"]){ _1ab6=oCV.envParams["originalReport"]; }else{ if(_1ab7&&_1ab7["reRunObj"]!=null&&_1ab7["reRunObj"].value.length>0){ _1ab6=_1ab7["reRunObj"].value; }else{ _1ab6=oCV.envParams["ui.object"]; } } _1ab6+="/reportVersion/*[@format='HTML' or @format='XHTML']/.."; var _1ab8=""+""+xml_encode(_1ab6)+""+""+"searchPath"+"creationTime"+"storeID"+""+""+""+"creationTime"+"descending"+""+""+""; var _1ab9=new DataDispatcherEntry(oCV); _1ab9.addFormField("ui.action","CMRequest"); _1ab9.addFormField("cv.responseFormat","CMRequest"); _1ab9.addFormField("ui.object",_1ab6); _1ab9.addFormField("CMRequest",_1ab8); _1ab9.setCallbacks(_1ab3); oCV.dispatchRequest(_1ab9); }; SnapshotsAction.prototype.setSavedOutputsCMResponse=function(_1aba){ var oCV=this.getCognosViewer(); var _1abc=oCV.getViewerWidget(); var _1abd=XMLBuilderLoadXMLFromString(_1aba.getResult()); _1abc.setSavedOutputsCMResponse(_1abd); }; SnapshotsAction.prototype.handleQueryResponse=function(_1abe){ this.setSavedOutputsCMResponse(_1abe); this.populateMenu(true); }; SnapshotsAction.prototype.canShowLiveMenuItem=function(){ var oCV=this.getCognosViewer(); return (oCV.envParams["cv.responseFormat"]!=="activeReport"&&(oCV.isLimitedInteractiveMode()||(oCV.envParams["cv.objectPermissions"]&&oCV.envParams["cv.objectPermissions"].indexOf("execute")!=-1))); }; SnapshotsAction.prototype.getMenuItemActionClassHandler=function(){ var oCV=this.getCognosViewer(); return oCV.envParams["cv.responseFormat"]==="activeReport"?"ViewActiveReport":"ViewSavedOutput"; }; SnapshotsAction.prototype.populateMenu=function(bOpen){ var oCV=this.getCognosViewer(); var _1ac3=oCV.getViewerWidget(); var _1ac4=oCV.envParams["ui.action"]; var _1ac5=_1ac3.savedOutputsCMResponse; var root=oCV.findBlueDotMenu(); root.open=bOpen; var _1ac7=oCV.findToolbarItem("Snapshots",root); var _1ac8=XMLHelper_FindChildByTagName(_1ac5,"result",true); var _1ac9=XMLHelper_FindChildrenByTagName(_1ac8,"item",false); var _1aca=[]; var _1acb=null; var _1acc=null; var _1acd=null; var _1ace; if(this.canShowLiveMenuItem()){ _1ace=(_1ac4!="view"&&_1ac4!="buxView"&&oCV.getStatus()!=="fault"); _1acd={name:"live",label:RV_RES.IDS_JS_SNAPSHOTS_LIVE,action:_1ace?{}:{name:"RunSavedOutputReport",payload:{}},items:null}; this.addMenuItemChecked(_1ace,_1acd); _1aca.push(_1acd); if(_1ac9.length>0){ _1aca.push({separator:true}); } } if(_1ac9.length>0){ var _1acf=this.getMenuItemActionClassHandler(); var _1ad0=[]; for(var _1ad1=0;_1ad1<_1ac9.length;_1ad1++){ if(_1ad1<5){ var _1ad2=_1ac9[_1ad1]; var _1ad3=XMLHelper_GetText(XMLHelper_FindChildByTagName(_1ad2,"creationTime_localized",true)); _1ad3=enforceTextDir(_1ad3); var _1ad4=XMLHelper_FindChildByTagName(_1ad2,"storeID",true); var _1ad5=XMLHelper_GetText(XMLHelper_FindChildByTagName(_1ad4,"value",true)); var _1ad6=XMLHelper_FindChildByTagName(_1ad2,"creationTime",true); var _1ad7=XMLHelper_GetText(XMLHelper_FindChildByTagName(_1ad6,"value",true)); if(_1acb==null){ _1acb=_1ad7; _1acc=_1ad5; } _1ace=(_1ac4=="view"||_1ac4=="buxView")&&oCV.envParams["creationTime"]==_1ad7&&_1ac3.getSavedOutputSearchPath()!=null; _1acd={name:"savedOutput",label:_1ad3,action:_1ace?{}:{name:_1acf,payload:{obj:_1ad5,creationTime:_1ad7,mostRecent:false}},items:null}; this.addMenuItemChecked(_1ace,_1acd); _1ad0.push(_1acd); }else{ _1ad0.push({name:"viewAllSnapshots",label:RV_RES.IDS_JS_VIEW_ALL_SNAPSHOTS,action:{name:"ViewAllSnapshots",payload:{}},items:null}); break; } } _1ace=false; if(_1ac3.getSavedOutputSearchPath()==null&&(_1ac4=="view"||_1ac4=="buxView")){ _1ace=true; } _1acd={name:"savedOutput",label:RV_RES.IDS_JS_MOST_RECENT_SNAPSHOT,action:_1ace?{}:{name:_1acf,payload:{obj:_1acc,creationTime:_1acb,mostRecent:true}},items:null}; this.addMenuItemChecked(_1ace,_1acd); _1aca.push(_1acd); _1aca.push({separator:true}); _1aca=_1aca.concat(_1ad0); } _1ac7.open=bOpen; _1ac7.items=_1aca; var _1ad8=[]; _1ad8.push(_1ac7); _1ac3.fireEvent("com.ibm.bux.widgetchrome.toolbar.update",null,_1ad8); }; SnapshotsAction.prototype.resetMenu=function(bOpen){ var oCV=this.getCognosViewer(); var _1adb=oCV.getViewerWidget(); var root=oCV.findBlueDotMenu(); var _1add=oCV.findToolbarItem("Snapshots",root); if(_1add){ _1add.open=false; var _1ade=[{name:"loadng",label:RV_RES.GOTO_LOADING,iconClass:"loading"}]; _1add.items=_1ade; var _1adf=[_1add]; _1adb.fireEvent("com.ibm.bux.widgetchrome.toolbar.update",null,_1adf); } }; function SwapRowsAndColumnsAction(){ this.m_sAction="SwapRowsAndColumns"; }; SwapRowsAndColumnsAction.prototype=new ModifyReportAction(); SwapRowsAndColumnsAction.prototype.getUndoHint=function(){ return RV_RES.IDS_JS_SWAP_ROWS_AND_COLUMNS; }; SwapRowsAndColumnsAction.M_oDisplayTypeIsUnsupported={winLossChart:true,progressiveChart:true,list:true}; SwapRowsAndColumnsAction.prototype.canSwap=function(){ if(this.reportHasOneObjectOnly()){ return this.isCurrentObject_singlePart_SupportedChartOrCrosstab(); }else{ return this.isSelectedObject_SupportedChartOrCrosstab(); } }; SwapRowsAndColumnsAction.prototype.reportHasOneObjectOnly=function(){ var _1ae0=this.m_oCV.getRAPReportInfo(); if(_1ae0){ return (_1ae0.getContainerCount()==1); } return false; }; SwapRowsAndColumnsAction.prototype.isSelectedObject_SupportedChartOrCrosstab=function(){ var _1ae1=this.getSelectedReportInfo(); return (_1ae1&&!SwapRowsAndColumnsAction.M_oDisplayTypeIsUnsupported[_1ae1.displayTypeId]); }; SwapRowsAndColumnsAction.prototype.isCurrentObject_singlePart_SupportedChartOrCrosstab=function(){ var _1ae2=this.m_oCV.getRAPReportInfo(); if(_1ae2){ if(_1ae2.getContainerCount()===1){ var _1ae3=_1ae2.getContainerFromPos(0).displayTypeId; if(_1ae3&&!SwapRowsAndColumnsAction.M_oDisplayTypeIsUnsupported[_1ae3]){ return true; } } } return false; }; SwapRowsAndColumnsAction.prototype.keepRAPCache=function(){ return false; }; SwapRowsAndColumnsAction.prototype.updateMenu=function(_1ae4){ _1ae4.visible=this.ifContainsInteractiveDataContainer(); if(!_1ae4.visible){ return _1ae4; } _1ae4.disabled=!this.canSwap(); _1ae4.iconClass=_1ae4.disabled?"disabledSwap":"swap"; return _1ae4; }; function UndoRedoAction(){ }; UndoRedoAction.prototype=new CognosViewerAction(); UndoRedoAction.prototype.dispatchRequest=function(_1ae5,_1ae6){ var _1ae7=null; var _1ae8=null; var _1ae9=this.getUndoRedoQueue(); if(_1ae6=="Undo"){ _1ae8=_1ae9.moveBack(); }else{ _1ae8=_1ae9.moveForward(); } if(_1ae6=="Undo"&&_1ae8&&_1ae8.undoCallback){ _1ae8.undoCallback(); this.getCognosViewer().getViewerWidget().updateToolbar(); }else{ if(_1ae6=="Redo"&&_1ae8&&_1ae8.redoCallback){ _1ae8.redoCallback(); this.getCognosViewer().getViewerWidget().updateToolbar(); }else{ var _1aea=this.getCognosViewer().getViewerWidget().getProperties(); if(_1aea&&_1ae8.widgetProperties){ _1aea.doUndo(_1ae8.widgetProperties); } var _1ae7=new ViewerDispatcherEntry(this.getCognosViewer()); if(typeof _1ae8.spec!="undefined"){ _1ae7.addFormField("ui.action","undoRedo"); _1ae7.addFormField("ui.spec",_1ae8.spec); _1ae7.addFormField("executionParameters",_1ae8.parameters); }else{ _1ae7.addFormField("ui.action","undoRedo"); _1ae7.addFormField("ui.conversation",_1ae8.conversation); } if(typeof _1ae8.hasAVSChart!="undefined"){ _1ae7.addFormField("hasAVSChart",_1ae8.hasAVSChart); } if(_1aea&&_1aea.getRowsPerPage()!=null){ _1ae7.addFormField("run.verticalElements",_1aea.getRowsPerPage()); } if(_1ae5!=""){ _1ae7.addFormField("cv.updateDataFilters",_1ae5); } if(typeof _1ae8.infoBar=="string"){ _1ae7.addFormField("rap.reportInfo",_1ae8.infoBar); }else{ _1ae7.addFormField("rap.reportInfo","{}"); } _1ae7.addFormField("run.prompt","false"); _1ae7.setCallbacks({"closeErrorDlg":{"object":_1ae9,"method":_1ae9.handleCancel}}); this.getCognosViewer().dispatchRequest(_1ae7); } } this.fireModifiedReportEvent(); }; UndoRedoAction.prototype.execute=function(){ this.gatherFilterInfoBeforeAction(this.m_sAction); }; function UndoAction(){ this.m_sAction="Undo"; }; UndoAction.prototype=new UndoRedoAction(); UndoAction.prototype.updateMenu=function(_1aeb){ _1aeb.visible=this.getCognosViewer().isLimitedInteractiveMode()?true:this.ifContainsInteractiveDataContainer(); if(!_1aeb.visible){ return _1aeb; } if(this.getUndoRedoQueue().getPosition()>0){ _1aeb.iconClass="undo"; _1aeb.disabled=false; }else{ _1aeb.iconClass="undoDisabled"; _1aeb.disabled=true; } _1aeb.label=this.getUndoRedoQueue().getUndoTooltip(); return _1aeb; }; function RedoAction(){ this.m_sAction="Redo"; }; RedoAction.prototype=new UndoRedoAction(); RedoAction.prototype.updateMenu=function(_1aec){ _1aec.visible=this.getCognosViewer().isLimitedInteractiveMode()?true:this.ifContainsInteractiveDataContainer(); if(!_1aec.visible){ return _1aec; } if(this.getUndoRedoQueue().getPosition()<(this.getUndoRedoQueue().getLength()-1)){ _1aec.iconClass="redo"; _1aec.disabled=false; }else{ _1aec.iconClass="redoDisabled"; _1aec.disabled=true; } _1aec.label=this.getUndoRedoQueue().getRedoTooltip(); return _1aec; }; function ViewAllSnapshotsAction(){ }; ViewAllSnapshotsAction.prototype=new SnapshotsAction(); ViewAllSnapshotsAction.prototype.updateMenu=function(_1aed){ var oCV=this.getCognosViewer(); var _1aef=oCV.getViewerWidget(); if(_1aef.m_bNoSavedOutputs==true){ _1aed.disabled=true; } return _1aed; }; ViewAllSnapshotsAction.prototype.execute=function(){ if(!this.getCognosViewer().getViewerWidget().getSavedOutputsCMResponse()){ this.queryCMForSavedOutputs({"complete":{"object":this,"method":this.handleQueryResponse}}); }else{ this.showDialog(); } }; ViewAllSnapshotsAction.prototype.handleQueryResponse=function(_1af0){ this.setSavedOutputsCMResponse(_1af0); this.showDialog(); }; ViewAllSnapshotsAction.prototype.showDialog=function(){ var oCV=this.getCognosViewer(); var _1af2=oCV.getViewerWidget(); var _1af3=_1af2.getSavedOutputsCMResponse(); var _1af4=null; var _1af5=null; if(_1af3){ _1af4=XMLHelper_FindChildByTagName(_1af3,"result",true); if(_1af4){ _1af5=XMLHelper_FindChildrenByTagName(_1af4,"item",false); } } if(!_1af3||!_1af5||_1af5.length==0){ _1af2.m_bNoSavedOutputs=true; var _1af6=new WarningMessageDialog(oCV,RV_RES.IDS_JS_NO_SAVED_OUTPUTS); _1af6.renderInlineDialog(); }else{ var _1af7=getCognosViewerObjectString(this.m_oCV.getId()); var _1af8=RV_RES.IDS_JS_SELECT_SNAPSHOT_DIALOG_TITLE; var _1af9=RV_RES.IDS_JS_SELECT_SNAPSHOT_DIALOG_DESC; var _1afa=this.getCognosViewer().envParams["creationTime"]; this.selectSnapshotDialog=new viewer.dialogs.SelectSnapshot({sTitle:_1af8,sLabel:_1af9,cmResponse:_1af3,currentSnapshotCreationTime:_1afa,okHandler:function(_1afb,_1afc){ window[_1af7].executeAction("ViewSavedOutput",{obj:_1afb,creationTime:_1afc}); },cancelHandler:function(){ }}); this.selectSnapshotDialog.startup(); this.selectSnapshotDialog.show(); } }; function ViewOriginalLabelAction(){ }; ViewOriginalLabelAction.prototype=new CognosViewerAction(); ViewOriginalLabelAction.prototype.getCellRef=function(){ return this.m_oCV.getSelectionController().getSelections()[0].getCellRef(); }; ViewOriginalLabelAction.prototype.updateMenu=function(_1afd){ if(this.getNumberOfSelections()==1){ var _1afe=this.getCellRef(); if(_1afe.getAttribute("rp_name")){ var _1aff=[]; _1aff.push({name:"originalLabel",label:_1afe.getAttribute("rp_name"),iconClass:"",action:null,items:null}); _1afd.items=_1aff; return _1afd; } } return ""; }; function ViewSavedOutputAction(){ this.m_obj=""; this.creationTime=""; this.m_mostRecent=false; }; ViewSavedOutputAction.prototype=new CognosViewerAction(); ViewSavedOutputAction.prototype.addAdditionalRequestParms=function(_1b00){ }; ViewSavedOutputAction.prototype.setRequestParms=function(_1b01){ this.m_obj=_1b01.obj; this.creationTime=_1b01.creationTime; this.m_mostRecent=_1b01.mostRecent; }; ViewSavedOutputAction.prototype.updateMenu=function(){ var _1b02=this.getCognosViewer().getAction("Snapshots"); _1b02.populateMenu(false); }; ViewSavedOutputAction.prototype.execute=function(){ var _1b03=this.getCognosViewer(); var _1b04=_1b03.getViewerWidget(); if(_1b03.getStatus()==="fault"){ _1b04.clearErrorDlg(); } _1b03.getViewerWidget().setPromptParametersRetrieved(false); _1b03.envParams["reportPrompts"]=""; var _1b05=_1b03.envParams["ui.action"]; var _1b06=document.getElementById("formWarpRequest"+_1b03.getId()); if(_1b05=="view"&&_1b06&&_1b06.reRunObj&&_1b06.reRunObj.value){ _1b03.envParams["ui.reRunObj"]=_1b06["reRunObj"].value; }else{ if(_1b05!="view"){ _1b03.envParams["ui.reRunObj"]=_1b03.envParams["ui.object"]; } } var _1b07="storeID('"+this.m_obj+"')"; _1b03.envParams["ui.action"]="buxView"; _1b03.envParams["ui.object"]=_1b03.envParams["ui.reRunObj"]; _1b03.envParams["creationTime"]=this.creationTime; if(this.m_mostRecent===true){ _1b04.setSavedOutputSearchPath(null); }else{ _1b04.setSavedOutputSearchPath(_1b07); } this.updateMenu(); this.getUndoRedoQueue().clearQueue(); _1b03.getViewerWidget().clearPropertiesDialog(); if(_1b03.getCurrentlySelectedTab()&&_1b04.getSavedOutput()){ _1b03.setKeepTabSelected(_1b03.getCurrentlySelectedTab()); } this.dispatchRequest(_1b07); this.fireModifiedReportEvent(); }; ViewSavedOutputAction.prototype.dispatchRequest=function(_1b08){ this.m_request=new ViewerDispatcherEntry(this.m_oCV); this.m_request.addFormField("ui.action","buxView"); this.m_request.addFormField("ui.name",this.m_oCV.envParams["ui.name"]); this.m_request.addFormField("widget.reloadToolbar","true"); this.m_request.addFormField("cv.objectPermissions",this.m_oCV.envParams["cv.objectPermissions"]); this.m_request.addFormField("ui.savedOutputSearchPath",_1b08); this.m_request.setCallbacks({"complete":{"object":this,"method":this.onComplete}}); this.addAdditionalRequestParms(this.m_request); this.m_oCV.dispatchRequest(this.m_request); }; ViewSavedOutputAction.prototype.onComplete=function(_1b09,arg1){ this.m_oCV.setTracking(""); this.m_oCV.setConversation(""); this.m_request.onComplete(_1b09,arg1); }; function WatchNewVersionsAction(){ this.m_requestParms={subAction:""}; }; WatchNewVersionsAction.prototype=new CognosViewerAction(); WatchNewVersionsAction.prototype.setRequestParms=function(_1b0b){ this.m_requestParms=_1b0b; }; WatchNewVersionsAction.prototype.execute=function(){ var _1b0c=this.m_oCV.getSubscriptionManager(); switch(this.m_requestParms.subAction){ case "loadMenu": this.loadMenu(this.m_requestParms.contextMenu); break; case "close": this.closeMenu(); break; case "DeleteNotification": _1b0c.DeleteNotification(); break; case "AddNotification": _1b0c.AddNotification(); break; case "NewSubscription": _1b0c.NewSubscription(); break; case "ModifySubscription": _1b0c.ModifySubscription(this.m_requestParms.subscriptionId); break; case "DeleteSubscription": _1b0c.DeleteSubscription(this.m_requestParms.subscriptionId); break; } }; WatchNewVersionsAction.prototype.closeMenu=function(){ var _1b0d=this.m_oCV.findToolbarItem("WatchNewVersions"); this.resetMenu(_1b0d); var _1b0e=getCognosViewerObjectRefAsString(this.m_oCV.getId()); setTimeout(_1b0e+".getViewerWidget().fireEvent(\"com.ibm.bux.widgetchrome.toolbar.update\", null, ["+_1b0e+".findToolbarItem(\"WatchNewVersions\")]);",1); }; WatchNewVersionsAction.prototype.resetMenu=function(_1b0f){ _1b0f.open=false; _1b0f.action={name:"WatchNewVersions",payload:{subAction:"loadMenu",contextMenu:false}}; _1b0f.closeAction=null; var _1b10=[]; _1b10.push({name:"loadng",label:RV_RES.GOTO_LOADING,iconClass:"loading"}); _1b0f.items=_1b10; }; WatchNewVersionsAction.prototype.updateMenu=function(_1b11){ var items=_1b11.items; var _1b13=this.m_oCV.getSubscriptionManager(); if(!items||items.length===0){ _1b11.visible=_1b13.CanCreateNewWatchRule(); _1b11.disabled=!(_1b13.IsValidSelectionForNewRule()); }else{ this.resetMenu(_1b11); } return _1b11; }; WatchNewVersionsAction.prototype.loadMenu=function(_1b14){ var _1b15=this.m_oCV.getSubscriptionManager(); var cvId=this.m_oCV.getId(); var oCV=this.m_oCV; var _1b18=new JSONDispatcherEntry(oCV); _1b18.addFormField("ui.action","getSubscriptionInfo"); _1b18.addFormField("cv.responseFormat","subscriptionManager"); _1b18.addFormField("contextMenu",_1b14==true?"true":"false"); _1b15.addCommonFormFields(_1b18,""); _1b18.setCallbacks({"complete":{"object":this,"method":this.openSubscriptionMenuResponse}}); oCV.dispatchRequest(_1b18); }; WatchNewVersionsAction.prototype.openSubscriptionMenuResponse=function(_1b19){ var _1b1a=this.m_oCV.getSubscriptionManager(); _1b1a.Initialize(_1b19); var _1b1b=[]; _1b1a.ClearSubscriptionMenu(); var _1b1c=false; if(_1b1a.CanGetNotified()){ if(_1b1a.m_sQueryNotificationResponse=="on"){ _1b1b.push({name:"DeleteNotification",label:RV_RES.RV_DO_NOT_ALERT_NEW_VERSION,iconClass:"deleteNotification",action:{name:"WatchNewVersions",payload:{subAction:"DeleteNotification"}},items:null}); _1b1c=true; }else{ if(_1b1a.m_sQueryNotificationResponse=="off"&&_1b1a.m_sEmail!=""){ _1b1b.push({name:"AddNotification",label:RV_RES.RV_ALERT_NEW_VERSION,iconClass:"addNotification",action:{name:"WatchNewVersions",payload:{subAction:"AddNotification"}},items:null}); _1b1c=true; } } } if(_1b1a.CanCreateNewWatchRule()){ if(_1b1c){ _1b1b.push({separator:true}); } var _1b1d={name:"NewSubscription",label:RV_RES.RV_NEW_WATCH_RULE,iconClass:"newSubscription",action:{name:"WatchNewVersions",payload:{subAction:"NewSubscription"}},items:null}; if(!_1b1a.IsValidSelectionForNewRule()){ _1b1d.disabled=true; } _1b1b.push(_1b1d); _1b1c=true; } var _1b1e=""; if(typeof this.m_oCV.UIBlacklist!="undefined"){ _1b1e=this.m_oCV.UIBlacklist; } if(_1b1e.indexOf(" RV_TOOLBAR_BUTTONS_RULES ")==-1){ if(_1b1a.m_aWatchRules&&_1b1a.m_aWatchRules.length>0){ if(_1b1c){ _1b1b.push({separator:true}); } var _1b1f=_1b1a.CanModifyWatchRule(); for(var sub=0;sub<_1b1a.m_aWatchRules.length;++sub){ var menu={name:"WatchRule"+sub,label:_1b1a.m_aWatchRules[sub].name,iconClass:"watchRule",action:null,items:[]}; if(_1b1f&&_1b1e.indexOf(" RV_TOOLBAR_BUTTONS_RULES_MODIFY ")==-1){ menu.items.push({name:"ModifySubscription"+sub,label:RV_RES.RV_MODIFY_WATCH_RULE,iconClass:"modifySubscription",action:{name:"WatchNewVersions",payload:{subAction:"ModifySubscription",subscriptionId:sub}},items:null}); } if(_1b1e.indexOf(" RV_TOOLBAR_BUTTONS_RULES_DELETE ")==-1){ menu.items.push({name:"DeleteSubscription"+sub,label:RV_RES.RV_DELETE_WATCH_RULE,iconClass:"deleteSubscription",action:{name:"WatchNewVersions",payload:{subAction:"DeleteSubscription",subscriptionId:sub}},items:null}); } _1b1b.push(menu); } } } if(_1b1b.length===0){ _1b1b.push({name:"NoWatchRules",label:RV_RES.RV_NO_WATCH_RULES,iconClass:"",action:null,items:null,disabled:true}); } var _1b22=this.m_oCV.findToolbarItem("WatchNewVersions"); if(_1b22){ _1b22.items=_1b1b; _1b22.action=null; _1b22.open=true; _1b22.closeAction={name:"WatchNewVersions",payload:{subAction:"close"}}; var _1b23=[]; _1b23.push(_1b22); this.m_oCV.getViewerWidget().fireEvent("com.ibm.bux.widgetchrome.toolbar.update",null,_1b23); } }; function RunSavedOutputReportAction(){ }; RunSavedOutputReportAction.prototype=new CognosViewerAction(); RunSavedOutputReportAction.prototype.updateMenu=function(_1b24){ var _1b25=this.m_oCV.envParams["ui.action"]; var _1b26=(_1b25!="view"&&_1b25!="buxView"&&this.m_oCV.getStatus()!=="fault"); this.addMenuItemChecked(_1b26,_1b24); return _1b24; }; RunSavedOutputReportAction.prototype.dispatchRequest=function(_1b27){ var _1b28=this.getCognosViewer(); if(_1b28.envParams["savedReportName"]){ delete _1b28.envParams["savedReportName"]; } if(_1b28.getStatus()==="fault"){ var _1b29=this.getCognosViewer().getViewerWidget(); _1b29.clearErrorDlg(); } var _1b2a=_1b28.envParams["ui.action"]; var _1b2b=document.getElementById("formWarpRequest"+_1b28.getId()); if(_1b28.envParams["ui.reRunObj"]){ _1b28.envParams["ui.object"]=_1b28.envParams["ui.reRunObj"]; }else{ if(_1b2a=="view"&&_1b2b&&typeof _1b2b["reRunObj"]!="undefined"&&_1b2b["reRunObj"]!=null&&_1b2b["reRunObj"].value.length>0){ _1b28.envParams["ui.object"]=_1b2b["reRunObj"].value; } } var oReq=new ViewerDispatcherEntry(_1b28); oReq.addFormField("ui.action","bux"); oReq.addFormField("widget.runFromSavedOutput","true"); oReq.addFormField("ui.object",_1b28.envParams["ui.object"]); oReq.addFormField("run.outputFormat","HTML"); oReq.addFormField("ui.primaryAction",""); oReq.addFormField("widget.reloadToolbar","true"); oReq.addDefinedNonNullFormField("cv.objectPermissions",_1b28.envParams["cv.objectPermissions"]); oReq.addDefinedNonNullFormField("run.prompt",_1b28.envParams["promptOnRerun"]); oReq.addDefinedNonNullFormField("limitedInteractiveMode",_1b28.envParams["limitedInteractiveMode"]); oReq.addDefinedNonNullFormField("widget.globalPromptInfo",_1b28.getViewerWidget().getGlobalPromptsInfo()); oReq.addDefinedNonNullFormField("baseReportSearchPath",_1b28.envParams["baseReportSearchPath"]); oReq.addNonEmptyStringFormField("cv.updateDataFilters",_1b27); _1b28.getViewerWidget().clearPropertiesDialog(); _1b28.preparePromptValues(oReq); _1b28.dispatchRequest(oReq); this.fireModifiedReportEvent(); _1b28.envParams["ui.action"]="run"; }; RunSavedOutputReportAction.prototype.execute=function(){ this.gatherFilterInfoBeforeAction("RunSavedOutputReport"); }; function InvokeChangeDisplayTypeDialogAction(){ }; InvokeChangeDisplayTypeDialogAction.prototype=new CognosViewerAction(); InvokeChangeDisplayTypeDialogAction.prototype.execute=function(){ var _1b2d=this.getCognosViewer(); var _1b2e=this.getSelectedReportInfo(); if(_1b2e){ var _1b2f=_1b2d.getViewerWidget(); var _1b30=false; if(_1b2e.suggestedDisplayTypesEnabled==true){ _1b30=(typeof _1b2e.possibleDisplayTypes=="undefined")||(typeof _1b2e.suggestedDisplayTypes=="undefined")?true:false; }else{ _1b30=(typeof _1b2e.possibleDisplayTypes=="undefined"); } if(_1b30){ var _1b31=new AsynchJSONDispatcherEntry(this.m_oCV); _1b31.setCallbacks({"complete":{"object":this,"method":this.handleResponse}}); _1b31.setRequestIndicator(_1b2d.getRequestIndicator()); _1b31.addFormField("ui.action","getInfoFromReportSpec"); _1b31.addFormField("bux","true"); _1b31.addNonEmptyStringFormField("modelPath",this.m_oCV.getModelPath()); _1b31.addFormField("ui.object",this.m_oCV.envParams["ui.object"]); _1b31.addDefinedFormField("ui.spec",this.m_oCV.envParams["ui.spec"]); _1b31.addFormField("cv.actionContext",this.addActionContext()); _1b31.addFormField("ui.conversation",encodeURIComponent(this.m_oCV.getConversation())); _1b2d.dispatchRequest(_1b31); }else{ _1b2f.invokeDisplayTypeDialog(_1b2e.possibleDisplayTypes,_1b2e.suggestedDisplayTypes); } } }; InvokeChangeDisplayTypeDialogAction.prototype.handleResponse=function(_1b32){ var _1b33=this.getCognosViewer(); var _1b34=_1b33.getViewerWidget(); var _1b35=_1b32.getResult(); for(var i in _1b35.containers){ var _1b37=this.getReportInfo(_1b35.containers[i].container); _1b37.possibleDisplayTypes=_1b35.containers[i].possibleDisplayTypes; _1b37.suggestedDisplayTypes=_1b35.containers[i].suggestedDisplayTypes; } var _1b38=this.getSelectedReportInfo(); _1b34.invokeDisplayTypeDialog(_1b38.possibleDisplayTypes,_1b38.suggestedDisplayTypes); }; InvokeChangeDisplayTypeDialogAction.prototype.addActionContext=function(){ var _1b39=""; _1b39+=""; _1b39+=""; _1b39+=""; _1b39+=this.getDataItemInfoMap(); _1b39+=this.addClientContextData(3); _1b39+=""; _1b39+=""; return _1b39; }; InvokeChangeDisplayTypeDialogAction.prototype.updateMenu=function(_1b3a){ var _1b3b=this.getCognosViewer().getRAPReportInfo(); _1b3a.visible=_1b3b.containsInteractiveDataContainer(); if(!_1b3a.visible){ return _1b3a; } var _1b3c=this.getSelectedReportInfo(); _1b3a.disabled=(_1b3c==null||_1b3c.displayTypeId==null||!this.isInteractiveDataContainer(_1b3c.displayTypeId)); if(_1b3a.disabled){ _1b3a.iconClass="chartTypesDisabled"; return _1b3a; } _1b3a.iconClass="chartTypes"; return _1b3a; }; function GotoAction(){ }; GotoAction.prototype=new CognosViewerAction(); GotoAction.prototype.execute=function(){ var _1b3d=this.m_oCV.getDrillMgr(); _1b3d.launchGoToPage(); }; GotoAction.prototype.updateMenu=function(_1b3e){ var items=[]; var _1b40=this.m_oCV.getDrillTargets(); var _1b41=this.m_oCV.getDrillMgr(); var _1b42=_1b41.getAuthoredDrillThroughTargets(); if(_1b42.length>0){ var _1b43=""; for(var _1b44=0;_1b44<_1b42.length;++_1b44){ _1b43+=eval("\""+_1b42[_1b44]+"\""); } _1b43+=""; var _1b45=this.m_oCV.getAction("AuthoredDrill"); var _1b46=_1b45.getAuthoredDrillThroughContext(_1b43,_1b40); var _1b47=_1b46.childNodes; if(_1b47.length>0){ for(var index=0;index<_1b47.length;++index){ var _1b49=_1b47[index]; var _1b4a=this.getTargetReportIconClass(_1b49); var _1b4b=_1b49.getAttribute("label"); items.push({name:"AuthoredDrill",label:_1b4b,iconClass:_1b4a,action:{name:"AuthoredDrill",payload:XMLBuilderSerializeNode(_1b49)},items:null}); } } } if(items.length>0){ items.push({separator:true}); } var _1b4c=false; if(this.m_oCV.getSelectionController()==null||this.m_oCV.getSelectionController().getModelDrillThroughEnabled()==false){ _1b4c=true; } items.push({name:"Goto",disabled:_1b4c,label:RV_RES.RV_MORE,iconClass:"",action:{name:"Goto",payload:""},items:null}); if(this.m_oCV.isIWidgetMobile()){ _1b3e.flatten="true"; } _1b3e.items=items; return _1b3e; }; GotoAction.prototype.getTargetReportIconClass=function(_1b4d){ var _1b4e=""; var _1b4f=_1b4d.getAttribute("method"); switch(_1b4f){ case "edit": _1b4e="editContent"; break; case "execute": _1b4e="runReport"; break; case "view": var _1b50=_1b4d.getAttribute("outputFormat"); switch(_1b50){ case "HTML": case "XHTML": case "HTMLFragment": _1b4e="html"; break; case "PDF": _1b4e="pdf"; break; case "XML": _1b4e="xml"; break; case "CSV": _1b4e="csv"; break; case "XLS": _1b4e="excel2000"; break; case "SingleXLS": _1b4e="excelSingleSheet"; break; case "XLWA": _1b4e="excel2002"; break; case "spreadsheetML": _1b4e="excel2007"; break; case "xlsxData": _1b4e="excel2007"; break; } break; } return _1b4e; }; function AnnotationAction(){ }; AnnotationAction.prototype=new CognosViewerAction(); AnnotationAction.prototype.updateMenu=function(_1b51){ var _1b52=this.m_oCV.getViewerWidget(); var _1b53=this.m_oCV.aBuxAnnotations; var _1b54=[]; for(var _1b55=0;_1b55<_1b53.length;_1b55++){ var ann=eval("new "+_1b53[_1b55]+"()"); ann.setCognosViewer(this.m_oCV); if(ann&&ann.isEnabled(_1b51.placeType)){ var _1b57={}; _1b57.name=_1b53[_1b55]; _1b57.label=ann.getMenuItemString(_1b52.getAttributeValue("itemName")); _1b57.action={}; _1b57.action.name=_1b53[_1b55]; _1b57.action.payload=""; _1b57.items=null; _1b57.iconClass=ann.getMenuItemIconClass(); _1b54.push(_1b57); } } _1b51.items=_1b54; _1b51.disabled=!(_1b51.items&&_1b51.items.length); if(_1b51.disabled){ _1b51.iconClass="disabledAnnotation"; }else{ _1b51.iconClass="annotation"; } return _1b51; }; AnnotationAction.prototype.execute=function(){ var _1b58=this.getCognosViewer(); var _1b59=_1b58.getSelectionController(); var _1b5a=_1b59.getSelections(); if(_1b5a&&_1b5a.length==1){ var _1b5b=_1b58.getViewerWidget(); if(_1b5b){ this.executeAction(_1b58,_1b5b,_1b5a[0]); } } }; AnnotationAction.prototype.executeAction=function(_1b5c,_1b5d,_1b5e){ }; function DeleteWidgetAnnotationAction(){ }; DeleteWidgetAnnotationAction.prototype=new AnnotationAction(); DeleteWidgetAnnotationAction.prototype.execute=function(){ var _1b5f=this.getCognosViewer(); var _1b60=_1b5f.getViewerWidget(); if(_1b60){ _1b60.getAnnotationHelper().deleteWidgetComment(); } }; function EditWidgetAnnotationAction(){ }; EditWidgetAnnotationAction.prototype=new AnnotationAction(); EditWidgetAnnotationAction.prototype.execute=function(){ var _1b61=this.getCognosViewer(); var _1b62=_1b61.getViewerWidget(); if(_1b62){ window.setTimeout(function(){ _1b62.getAnnotationHelper().editWidgetComment(); },0); } }; function NewWidgetAnnotationAction(){ }; NewWidgetAnnotationAction.prototype=new AnnotationAction(); NewWidgetAnnotationAction.prototype.execute=function(){ var _1b63=this.getCognosViewer(); var _1b64=_1b63.getViewerWidget(); if(_1b64){ _1b64.getAnnotationHelper().addWidgetComment(); } }; function DeleteAnnotationAction(){ }; DeleteAnnotationAction.prototype=new AnnotationAction(); DeleteAnnotationAction.prototype.executeAction=function(_1b65,_1b66,_1b67){ if(_1b65&&_1b66&&_1b67){ var _1b68=_1b67.getCellRef(); var ctxId=_1b65.findCtx(_1b68); _1b66.getAnnotationHelper().deleteComment(ctxId); } }; function EditAnnotationAction(){ }; EditAnnotationAction.prototype=new AnnotationAction(); EditAnnotationAction.prototype.executeAction=function(_1b6a,_1b6b,_1b6c){ if(_1b6a&&_1b6b&&_1b6c){ var _1b6d=_1b6c.getCellRef(); var ctxId=_1b6a.findCtx(_1b6d); window.setTimeout(function(){ _1b6b.getAnnotationHelper().editComment(ctxId); },0); } }; function NewAnnotationAction(){ }; NewAnnotationAction.prototype=new AnnotationAction(); NewAnnotationAction.prototype.executeAction=function(_1b6f,_1b70,_1b71){ if(_1b6f&&_1b70&&_1b71){ var _1b72=_1b71.getCellRef(); var ctxId=_1b6f.findCtx(_1b72); var value=_1b71.getDisplayValues()[0]; window.setTimeout(function(){ _1b70.getAnnotationHelper().addComment(ctxId,value); },0); } }; function ExploreWithAAFAction(){ }; ExploreWithAAFAction.prototype=new CognosViewerAction(); ExploreWithAAFAction.prototype.execute=function(){ window.open(this.m_oCV.getGateway()+this.m_oCV.envParams.aafBaseURL,"_blank"); }; function ViewActiveReportAction(){ }; ViewActiveReportAction.prototype=new ViewSavedOutputAction(); ViewActiveReportAction.prototype.addAdditionalRequestParms=function(_1b75){ _1b75.addFormField("cv.responseFormat","CMRequest"); _1b75.setCallbacks({"complete":{"object":this,"method":this.handleQueryResponse}}); }; ViewActiveReportAction.prototype.handleQueryResponse=function(_1b76){ var _1b77=this.m_oCV.getViewerWidget(); _1b77.showLoading(); var _1b78=XMLBuilderLoadXMLFromString(_1b76.getResult()); var _1b79=XMLHelper_FindChildByTagName(_1b78,"storeID",true); var _1b7a=XMLHelper_GetText(XMLHelper_FindChildByTagName(_1b79,"value",true)); var _1b7b=dojo.byId(this.m_oCV.getViewerWidget().getIFrameId()); _1b7b.src=this.m_oCV.getGateway()+"/output/cm/"+_1b7a+"/"; }; function RefreshActiveReportAction(){ this.m_sAction="RefreshActiveReport"; }; RefreshActiveReportAction.prototype=new CognosViewerAction(); RefreshActiveReportAction.prototype.execute=function(){ var _1b7c=this.m_oCV.getViewerWidget(); var _1b7d=dojo.byId(_1b7c.getIFrameId()); var _1b7e=_1b7d.src; _1b7d.src=_1b7e; _1b7c.showLoading(); }; function ExportAction(){ this.m_format=""; this.m_responseFormat=""; }; ExportAction.prototype=new CognosViewerAction(); ExportAction.prototype.getWindowTitle=function(){ return ""; }; ExportAction.prototype.execute=function(){ if(!this.m_format){ return false; } this.initializeForm(); this.insertGenericFormElements(); this.insertSpecializedFormElements(); return this.sendRequest(); }; ExportAction.prototype.addFormField=function(sName,_1b80){ if(console){ console.log("Required method ExportAction.addFormField not implemented"); } }; ExportAction.prototype.initializeForm=function(){ if(console){ console.log("Required method ExportAction.initializeForm not implemented"); } }; ExportAction.prototype.sendRequest=function(){ if(console){ console.log("Required method ExportAction.sendRequest not implemented"); } }; ExportAction.prototype.insertGenericFormElements=function(){ var _1b81="false"; var _1b82="cognosViewer"; this.addFormField("b_action",_1b82); this.addFormField("cv.toolbar","false"); this.addFormField("cv.header","false"); this.addFormField("ui.windowtitleformat","chromeless_window_action_format"); this.addFormField("ui.name",this.getObjectDisplayName()); this.addFormField("cv.responseFormat",this.m_responseFormat); this.addFormField("ui.reuseWindow","true"); var _1b83=this.m_oCV.envParams["ui.spec"]; var _1b84=this.m_oCV.getConversation(); this.addFormField("ui.action","export"); this.addFormField("ui.conversation",_1b84); this.addFormField("run.prompt",_1b81); this.addFormField("asynch.attachmentEncoding","base64"); this.addFormField("run.outputEncapsulation","URLQueryString"); this.addFormField("ui.spec",_1b83); this.addFormField("rap.reportInfo",this.m_oCV.envParams["rapReportInfo"]); if(this.m_oCV.envParams["ui.routingServerGroup"]){ this.addFormField("ui.routingServerGroup",this.m_oCV.envParams["ui.routingServerGroup"]); } var _1b85=this.m_oCV.getViewerWidget(); if(_1b85!=null){ dojo.when(_1b85.getWidgetStoreID(),dojo.hitch(this,function(_1b86){ if(typeof _1b86!="undefined"&&_1b86!=null){ this.addFormField("widgetStoreID",_1b86); } })); var _1b87=_1b85.getAttributeValue("gateway"); if(_1b87){ this.addFormField("cv.gateway",_1b87); } var _1b88=_1b85.getAttributeValue("webcontent"); if(_1b88){ this.addFormField("cv.webcontent",_1b88); } } this.addFormField("rap.parametersInfo",CViewerCommon.buildParameterValuesSpec(this.m_oCV)); }; ExportAction.prototype.insertSpecializedFormElements=function(_1b89){ this.addFormField("run.outputFormat",this.m_format); this.addFormField("ui.windowtitleaction",this.getWindowTitle()); }; ExportAction.prototype.updateMenu=function(json){ json.visible=!this.isPromptWidget(); if(this.m_oCV.isIWidgetMobile()){ json.flatten=true; } return json; }; function ExportFromIframeAction(){ this.m_format=""; this.m_responseFormat="downloadObject"; }; ExportFromIframeAction.prototype=new ExportAction(); ExportFromIframeAction.prototype.initializeForm=function(){ this.oRequest=new HiddenIframeDispatcherEntry(this.getCognosViewer()); this.addFormField("cv.detachRelease","true"); }; ExportFromIframeAction.prototype.addFormField=function(sName,_1b8c){ this.oRequest.addFormField(sName,_1b8c); }; ExportFromIframeAction.prototype.sendRequest=function(){ this.getCognosViewer().dispatchRequest(this.oRequest); return true; }; function ExportToCSVAction(){ this.m_format="CSV"; }; ExportToCSVAction.prototype=new ExportFromIframeAction(); ExportToCSVAction.prototype.getWindowTitle=function(){ return RV_RES.RV_CSV; }; function ExportToExcel2000Action(){ this.m_format="XLS"; }; ExportToExcel2000Action.prototype=new ExportFromIframeAction(); ExportToExcel2000Action.prototype.getWindowTitle=function(){ return RV_RES.RV_EXCEL_2000; }; function ExportToExcel2002Action(){ this.m_format="XLWA"; }; ExportToExcel2002Action.prototype=new ExportFromIframeAction(); ExportToExcel2002Action.prototype.getWindowTitle=function(){ return RV_RES.RV_EXCEL_2002; }; function ExportToExcel2007Action(){ this.m_format="spreadsheetML"; }; ExportToExcel2007Action.prototype=new ExportFromIframeAction(); ExportToExcel2007Action.prototype.getWindowTitle=function(){ return RV_RES.RV_EXCEL_2007; }; function ExportToExcel2007DataAction(){ this.m_format="xlsxData"; }; ExportToExcel2007DataAction.prototype=new ExportFromIframeAction(); ExportToExcel2007DataAction.prototype.getWindowTitle=function(){ return RV_RES.RV_EXCEL_2007_DATA; }; function ExportToExcelSingleSheetAction(){ this.m_format="singleXLS"; }; ExportToExcelSingleSheetAction.prototype=new ExportFromIframeAction(); ExportToExcelSingleSheetAction.prototype.getWindowTitle=function(){ return RV_RES.RV_EXCEL_2000SF; }; function ExportToPDFAction(){ this.m_format="PDF"; }; ExportToPDFAction.prototype=new ExportFromIframeAction(); ExportToPDFAction.prototype.getWindowTitle=function(){ return RV_RES.RV_PDF; }; function ExportToXMLAction(){ this.m_format="XML"; }; ExportToXMLAction.prototype=new ExportFromIframeAction(); ExportToXMLAction.prototype.getWindowTitle=function(){ return RV_RES.RV_XML; }; function PrintAsPDFAction(){ this.m_format="PDF"; this.m_responseFormat="page"; }; PrintAsPDFAction.prototype=new ExportAction(); PrintAsPDFAction.prototype.getWindowTitle=function(){ return RV_RES.IDS_PRINT_AS_PDF; }; PrintAsPDFAction.prototype.initializeForm=function(){ this.nForm=document.createElement("form"); this.nForm.setAttribute("method","post"); var _1b8d=location.protocol+"//"+location.host+this.m_oCV.m_sGateway; this.nForm.setAttribute("action",_1b8d); }; PrintAsPDFAction.prototype.sendRequest=function(){ var _1b8e=this.m_oCV.getId(); var sName="get"+this.m_format+_1b8e; this.nForm.setAttribute("id",sName); this.nForm.setAttribute("name",sName); this.nForm.setAttribute("target",this.m_format+"Window"+_1b8e); document.body.appendChild(this.nForm); var _1b90=this.nForm.getAttribute("target"); window.open("",_1b90,"resizable=yes,menubar=no,directories=no,location=no,status=no,toolbar=no,titlebar=no"); this.nForm.submit(); document.body.removeChild(this.nForm); this.nForm=null; return true; }; PrintAsPDFAction.prototype.addFormField=function(sName,_1b92){ this.nForm.appendChild(createHiddenFormField(sName,_1b92)); }; function ExpandCollapseMemberAction(){ this.m_sAction="ExpandCollapseMember"; this.m_sExpandCollapseType=null; this.m_RAPReportInfo=null; this.m_itemInfo=null; this.m_sPreviousDataItem=null; }; ExpandCollapseMemberAction.prototype=new ModifyReportAction(); ExpandCollapseMemberAction.baseclass=ModifyReportAction.prototype; ExpandCollapseMemberAction.prototype._getCanExpand=function(_1b93){ var _1b94=this._getItemInfo(_1b93); return (_1b94&&_1b94.canExpand); }; ExpandCollapseMemberAction.prototype._isExpanded=function(_1b95){ var sMUN=this._getSelectedMUN(_1b95); if(!sMUN){ return false; } var _1b97=this._getItemInfo(_1b95); return (_1b97&&_1b97.expandedMembers&&_1b97.expandedMembers[sMUN]===true); }; ExpandCollapseMemberAction.prototype._getSelectedMUN=function(_1b98){ var sMun=null; var aMuns=_1b98.getMuns(); if(aMuns&&aMuns.length>0&&aMuns[0].length>0){ sMun=aMuns[0][0]; } return sMun; }; ExpandCollapseMemberAction.prototype._getDataItem=function(_1b9b){ if(!_1b9b){ return null; } var _1b9c=null; var _1b9d=_1b9b.getDataItems(); if(_1b9d&&_1b9d.length>0&&_1b9d[0].length>0){ _1b9c=_1b9d[0][0]; } return _1b9c; }; ExpandCollapseMemberAction.prototype._getItemInfo=function(_1b9e){ var _1b9f=this._getDataItem(_1b9e); if(!_1b9f){ return null; } var _1ba0=this.removeNamespace(_1b9e.getLayoutElementId()); this.m_RAPReportInfo=this.m_oCV.getRAPReportInfo(); this.m_itemInfo=this.m_RAPReportInfo.getItemInfo(_1ba0,_1b9f); this.m_sPreviousDataItem=_1b9f; return this.m_itemInfo; }; ExpandCollapseMemberAction.prototype._alwaysCanExpandCollapse=function(_1ba1){ var _1ba2=this._getItemInfo(_1ba1); return (_1ba2&&_1ba2.alwaysCanExpandCollapse); }; ExpandCollapseMemberAction.prototype._canShowMenu=function(_1ba3){ var _1ba4=this._getFirstSelectedObject(_1ba3); return (_1ba4&&this._hasMUN(_1ba4)&&this._isCrosstab(_1ba4)&&this._isOnEdge(_1ba4)&&!_1ba3.areSelectionsMeasureOrCalculation()); }; ExpandCollapseMemberAction.prototype._getCtxId=function(_1ba5){ var _1ba6=_1ba5.getCellRef(); if(_1ba6&&_1ba6.getAttribute){ var _1ba7=_1ba6.getAttribute("ctx"); if(_1ba7){ _1ba7=_1ba7.split("::")[0].split(":")[0]; return _1ba7; } } return ""; }; ExpandCollapseMemberAction.prototype._hasMUN=function(_1ba8){ var aMuns=_1ba8.getMuns(); return aMuns.length>0?true:false; }; ExpandCollapseMemberAction.prototype._isCrosstab=function(_1baa){ return _1baa.getDataContainerType()==="crosstab"?true:false; }; ExpandCollapseMemberAction.prototype._isOnEdge=function(_1bab){ return _1bab.getLayoutType()==="columnTitle"?true:false; }; ExpandCollapseMemberAction.prototype.keepRAPCache=function(){ return false; }; ExpandCollapseMemberAction.prototype.updateMenu=function(_1bac){ var _1bad=this.m_oCV.getSelectionController(); _1bac.visible=this._canShowMenu(_1bad); if(!_1bac.visible){ return _1bac; } _1bac.disabled=!this._canEnableMenu(_1bad); return _1bac; }; ExpandCollapseMemberAction.prototype._canEnableMenu=function(_1bae){ return true; }; ExpandCollapseMemberAction.prototype._getFirstSelectedObject=function(_1baf){ var _1bb0=_1baf.getAllSelectedObjects(); if(_1bb0.length>0){ return _1bb0[0]; } return null; }; ExpandCollapseMemberAction.prototype._isSingleSelection=function(_1bb1){ var _1bb2=_1bb1.getAllSelectedObjects(); return (_1bb2.length===1); }; ExpandCollapseMemberAction.prototype.addActionContextAdditionalParms=function(){ var _1bb3=this.getCognosViewer().getSelectionController(); var _1bb4=this._getFirstSelectedObject(_1bb3); var sPUN=_1bb3.getPun(this._getCtxId(_1bb4)); if(sPUN){ sPUN=""+sXmlEncode(sPUN)+""; } var sType=""; if(this.m_sExpandCollapseType){ sType=""+this.m_sExpandCollapseType+""; } return this.getSelectedCellTags()+sPUN+sType; }; function ExpandMemberAction(){ this.m_sAction="ExpandCollapseMember"; this.m_sExpandCollapseType="ExpandMember"; }; ExpandMemberAction.prototype=new ExpandCollapseMemberAction(); ExpandMemberAction.baseclass=ExpandCollapseMemberAction.prototype; ExpandMemberAction.prototype.getUndoHint=function(){ return RV_RES.IDS_JS_EXPAND_MEMBER; }; ExpandMemberAction.prototype._canEnableMenu=function(_1bb7){ if(!this._isSingleSelection(_1bb7)){ return false; } var _1bb8=this._getFirstSelectedObject(_1bb7); if(this._alwaysCanExpandCollapse(_1bb8)){ return true; } var ctxId=this._getCtxId(_1bb8); var _1bba=true; if(_1bb7.getDrillUpDownEnabled()===true){ _1bba=_1bb7.canDrillDown(ctxId); } return (_1bba&&this._getCanExpand(_1bb8)&&!this._isExpanded(_1bb8)); }; function CollapseMemberAction(){ this.m_sAction="ExpandCollapseMember"; this.m_sExpandCollapseType="CollapseMember"; }; CollapseMemberAction.prototype=new ExpandCollapseMemberAction(); CollapseMemberAction.baseclass=ExpandCollapseMemberAction.prototype; CollapseMemberAction.prototype.getUndoHint=function(){ return RV_RES.IDS_JS_COLLAPSE_MEMBER; }; CollapseMemberAction.prototype._canDisableMenu=function(_1bbb){ if(this._isSingleSelection(_1bbb)&&!this._isExpanded()){ return true; } return false; }; CollapseMemberAction.prototype._canEnableMenu=function(_1bbc){ var _1bbd=this._getFirstSelectedObject(_1bbc); if(this._alwaysCanExpandCollapse(_1bbd)){ return true; } return (this._isSingleSelection(_1bbc)&&this._isExpanded(_1bbd)); }; function OpenReportFromClipboardAction(){ this.m_action="bux"; this.m_cv=this.getCognosViewer(); }; OpenReportFromClipboardAction.prototype=new CognosViewerAction(); OpenReportFromClipboardAction.prototype.reuseQuery=function(){ return false; }; OpenReportFromClipboardAction.prototype.reuseGetParameter=function(){ return false; }; OpenReportFromClipboardAction.prototype.keepRAPCache=function(){ return false; }; OpenReportFromClipboardAction.prototype.reuseConversation=function(){ return false; }; OpenReportFromClipboardAction.prototype.runReport=function(){ return true; }; OpenReportFromClipboardAction.prototype.isUndoable=function(){ return true; }; OpenReportFromClipboardAction.prototype.execute=function(){ if(window.clipboardData){ this.openReportForIE(); }else{ this.openReportForNonIE(); } }; OpenReportFromClipboardAction.prototype.openReportForNonIE=function(){ var _1bbe=this; var _1bbf=new viewer.dialogs.ClipboardDialog({sTitle:RV_RES.IDS_JS_CLIPBOARD,okHandler:function(_1bc0){ _1bbe.executeAction(_1bc0); },cancelHandler:function(){ }}); _1bbf.startup(); window.setTimeout(function(){ _1bbf.show(); },0); }; OpenReportFromClipboardAction.prototype.openReportForIE=function(){ var _1bc1=window.clipboardData.getData("Text"); this.executeAction(_1bc1); }; OpenReportFromClipboardAction.prototype.getDeleteEnvParamsList=function(){ var _1bc2=["modelPath","packageBase","rapReportInfo","rap.state"]; return _1bc2; }; OpenReportFromClipboardAction.prototype.deleteEnvParams=function(){ var _1bc3=this.m_cv.envParams; var _1bc4=this.getDeleteEnvParamsList(); for(var index in _1bc4){ if(_1bc3[_1bc4[index]]){ delete _1bc3[_1bc4[index]]; } } }; OpenReportFromClipboardAction.prototype.cleanUpCognosViewer=function(){ this.m_cv.setExecutionParameters(""); this.m_cv.setConversation(""); this.deleteEnvParams(); }; OpenReportFromClipboardAction.prototype.getRequestParams=function(){ var _1bc6={"run.outputFormat":"HTML","cv.id":this.m_cv.getId(),"widget.reloadToolbar":"true","openReportFromClipboard":"true","ui.reportDrop":"true"}; var _1bc7=this.m_cv.getViewerWidget().getGlobalPromptsInfo(); if(_1bc7!=null){ _1bc6["widget.globalPromptInfo"]=_1bc7; } if(this.m_filters!=""){ _1bc6["cv.updateDataFilters"]=this.m_filters; } var _1bc8=["cv.objectPermissions","limitedInteractiveMode"]; for(var index in _1bc8){ var _1bca=_1bc8[index]; var _1bcb=this.m_cv.envParams[_1bca]; if(_1bcb){ _1bc6[_1bca]=_1bcb; } } return _1bc6; }; OpenReportFromClipboardAction.prototype.addAdditionalOptions=function(_1bcc){ var _1bcd=this.getRequestParams(); for(var index in _1bcd){ _1bcc.addFormField(index,_1bcd[index]); } }; OpenReportFromClipboardAction.prototype.executeAction=function(_1bcf){ this.m_cv=this.getCognosViewer(); this.m_cv.envParams["ui.spec"]=_1bcf; this.gatherFilterInfoBeforeAction("OpenReportFromClipboard"); ChangePaletteAction.reset(this.getCognosViewer()); }; OpenReportFromClipboardAction.prototype.dispatchRequest=function(_1bd0){ this.m_cv=this.getCognosViewer(); var _1bd1=this.m_cv.getViewerWidget(); _1bd1.reset(); this.m_filters=_1bd0; this.cleanUpCognosViewer(); var _1bd2=this.createCognosViewerDispatcherEntry(this.m_action); this.m_cv.hideReportInfo(); this.m_cv.dispatchRequest(_1bd2); this.fireModifiedReportEvent(); }; OpenReportFromClipboardAction.prototype.doAddActionContext=function(){ return false; }; OpenReportFromClipboardAction.prototype.updateMenu=function(json){ json.visible=(window.cognosViewerDebug===true); return json; }; function SaveAsReportAction(){ _progressDisplay=null; }; SaveAsReportAction.prototype=new CognosViewerAction(); SaveAsReportAction.prototype.onSaveCallback=function(){ if(!this._progressDisplay){ dojo["require"]("bux.dialogs.InformationDialog"); this._progressDisplay=new bux.dialogs.Working(BUXMSG.CPN.IDS_CPN_SAVING); this._progressDisplay.startup(); this._progressDisplay.show(); } }; SaveAsReportAction.prototype.afterSaveCallback=function(){ if(this._progressDisplay){ this._progressDisplay.destroy(); this._progressDisplay=null; } }; SaveAsReportAction.prototype.execute=function(){ this.getCognosViewer().executeAction("RemoveAllDataFilter",{callback:{method:this.doSaveAs,object:this}}); }; SaveAsReportAction.prototype.updateMenu=function(_1bd4){ _1bd4.visible=this.hasEnvUISpec(); return _1bd4; }; SaveAsReportAction.prototype.hasEnvUISpec=function(){ if(this.m_oCV){ var sSpec=this.m_oCV.envParams["ui.spec"]; return (sSpec&&sSpec.length>0); } return false; }; SaveAsReportAction.prototype.doSaveAs=function(_1bd6){ dojo["require"]("bux.dialogs.FileDialog"); dojo["require"]("bux.iwidget.canvas.ReportIOHandler"); this.m_cv=this.getCognosViewer(); var _1bd7=_1bd6; var _1bd8=this.m_cv.envParams["ui.objectClass"]; var _1bd9=this.onSaveCallback; var _1bda=this.afterSaveCallback; var _1bdb={filter:"content-report",title:RV_RES.IDS_JS_SAVE_AS_FDG_TITLE,sMainActionButtonLabel:RV_RES.IDS_JS_OK,"class":"bux-fileDialog"}; var _1bdc=new bux.iwidget.canvas.ReportIOHandler(_1bd7,_1bd8,_1bd9,_1bda,_1bdb); _1bdc._doSaveAs(); }; function BusinessProcessAction(){ }; BusinessProcessAction.prototype=new CognosViewerAction(); BusinessProcessAction.prototype.updateMenu=function(_1bdd){ var _1bde=this.getCognosViewer().envParams["bpmRestURI"]; _1bdd.visible=(_1bde?true:false); if(_1bdd.visible){ _1bdd.disabled=!this._hasAnyContextInSelectedObjects(); } return _1bdd; }; BusinessProcessAction.prototype._initBPMGateway=function(){ var _1bdf=this.getCognosViewer(); this.m_BPMGateway=_1bdf.envParams["bpmRestURI"]; var _1be0=this.m_BPMGateway.length; if(this.m_BPMGateway[_1be0-1]!=="/"){ this.m_BPMGateway+="/"; } }; BusinessProcessAction.prototype.execute=function(){ this._initBPMGateway(); var _1be1=this._getBPMProcesses(); }; BusinessProcessAction.prototype._getBPMProcesses=function(){ var _1be2={complete:{object:this,method:this.handleGetBPMProcessSuccess},fault:{object:this,method:this.handleGetBPMProcessFail}}; var url=this.m_BPMGateway+"exposed/process"; var _1be4=this._createBPMServerRequest("GET",_1be2,url); _1be4.sendRequest(); }; BusinessProcessAction.prototype._createBPMServerRequest=function(_1be5,_1be6,url,_1be8){ var _1be9=new XmlHttpObject(); _1be9.init(_1be5,this._rewriteURL(url)); _1be9.setCallbacks(_1be6); _1be9.setHeaders({Accept:"application/json"}); if(_1be8){ for(var i in _1be8){ _1be9.addFormField(_1be8[i].name,_1be8[i].value); } } return _1be9; }; BusinessProcessAction.prototype._rewriteURL=function(url){ if(bux&&bux.iwidget&&bux.iwidget.canvas&&bux.iwidget.canvas.Helper&&bux.iwidget.canvas.Helper.rewriteUrl){ return bux.iwidget.canvas.Helper.rewriteUrl(url); } return url; }; BusinessProcessAction.prototype.handleGetBPMProcessFail=function(_1bec){ var _1bed=RV_RES.IDS_JS_BUSINESS_PROCESS_GET_PROCESSES_FAIL_MSG; var _1bee=_1bec.getResponseText(); this._showErrorMessage(_1bed,_1bee); }; BusinessProcessAction.prototype.handleGetBPMProcessSuccess=function(_1bef){ var _1bf0=_1bef.getResponseText(); if(!_1bf0){ return; } var _1bf1=dojo.fromJson(_1bf0); var _1bf2=this._getBusinessProcessesInfo(_1bf1.data.exposedItemsList); this._showDialog(_1bf2); }; BusinessProcessAction.prototype._getBusinessProcessesInfo=function(_1bf3){ if(!_1bf3){ return; } var _1bf4=_1bf3.length; var _1bf5=new Array(); var _1bf6={}; for(var i=0;i<_1bf4;i++){ var _1bf8=_1bf3[i].display; var _1bf9=_1bf3[i].itemID; var _1bfa=_1bf3[i].processAppID; if(_1bf8&&!_1bf6[_1bf8]&&_1bf9&&_1bfa){ _1bf6[_1bf8]=true; _1bf5.push({sCaption:_1bf8,sBPD_ID:_1bf9,sProcessAppID:_1bfa}); } } return _1bf5; }; BusinessProcessAction.prototype._showDialog=function(_1bfb){ var _1bfc=this; var _1bfd=new viewer.dialogs.SelectBusinessProcess({sTitle:RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_TITLE,sLabel:RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_DESC,okHandler:function(){ },cancelHandler:function(){ },BPMProcessesInfo:_1bfb,bpAction:_1bfc}); _1bfd.startup(); _1bfd.show(); }; BusinessProcessAction.prototype.getInputParameter=function(_1bfe){ var obj=null; var _1c00=this.getCognosViewer(); var _1c01=_1c00.getSelectionController(); var _1c02=_1c01.getSelectedObjectsJsonContext(); if(_1c02){ var value=_1c02; if(_1bfe){ value=dojo.toJson(value); } obj={"cognosParameter":value}; } return obj; }; BusinessProcessAction.prototype.startProcess=function(_1c04,_1c05,_1c06){ var _1c07={customArguments:[_1c06],complete:{object:this,method:this.handleGetStartProcessSuccessResponse},fault:{object:this,method:this.handleGetStartProcessFailResponse}}; var url=this.m_BPMGateway+"process"; var _1c09=new Array(); _1c09.push({name:"action",value:"start"}); _1c09.push({name:"parts",value:"data"}); if(_1c04){ _1c09.push({name:"bpdId",value:_1c04}); } if(_1c05){ _1c09.push({name:"processAppId",value:_1c05}); } var _1c0a=this.getInputParameter(true); if(_1c0a){ _1c09.push({name:"params",value:dojo.toJson(_1c0a)}); } var _1c0b=this._createBPMServerRequest("POST",_1c07,url,_1c09); _1c0b.sendRequest(); }; BusinessProcessAction.prototype.handleGetStartProcessSuccessResponse=function(_1c0c,_1c0d){ var _1c0e=_1c0c.getResponseText(); if(_1c0e){ var _1c0f=dojo.fromJson(_1c0e); if(_1c0f.status==="200"){ var sMsg=CViewerCommon.getMessage(RV_RES.IDS_JS_BUSINESS_PROCESS_START_PROCESS_SUCCEED_MSG,_1c0d); var _1c11=new ModalInfoMessageDialog({sTitle:RV_RES.IDS_JS_BUSINESS_PROCESS_START_PROCESS_SUCCEED_MSG_TITLE,sMessage:sMsg,sDescription:RV_RES.IDS_JS_BUSINESS_PROCESS_START_PROCESS_SUCCEED_MSG_DETAIL}); _1c11.show(); } } }; BusinessProcessAction.prototype.handleGetStartProcessFailResponse=function(_1c12,_1c13){ var _1c14=_1c12.getResponseXml(); if(_1c14&&_1c14.documentElement){ this._handleXMLErrorResponse(_1c14,_1c13); return; } var _1c15=CViewerCommon.getMessage(RV_RES.IDS_JS_BUSINESS_PROCESS_START_PROCESS_FAILED_MSG,_1c13); var _1c16=_1c12.getResponseText(); try{ var _1c17=dojo.fromJson(_1c16); _1c16=_1c17.Data.errorMessage; } catch(err){ } this._showErrorMessage(_1c15,_1c16); }; BusinessProcessAction.prototype._handleXMLErrorResponse=function(_1c18,_1c19){ var _1c1a=XMLHelper_FindChildrenByTagName(_1c18,"error"); var _1c1b=""; var _1c1c=""; if(_1c1a){ _1c1b=XMLHelper_FindChildrenByTagName(_1c1a,"message").childNodes[0].nodeValue; _1c1c=XMLHelper_FindChildrenByTagName(_1c1a,"detail").childNodes[0].nodeValue; }else{ _1c1b=CViewerCommon.getMessage(RV_RES.IDS_JS_BUSINESS_PROCESS_START_PROCESS_FAILED_MSG,_1c19); } this._showErrorMessage(_1c1b,_1c1c); }; BusinessProcessAction.prototype._showErrorMessage=function(_1c1d,_1c1e){ var _1c1f=new ModalFaultMessageDialog(_1c1d,_1c1e); _1c1f.show(); }; BusinessProcessAction.prototype._hasAnyContextInSelectedObjects=function(){ var _1c20=false; var _1c21=this.m_oCV.getSelectionController(); var _1c22=_1c21.getAllSelectedObjects(); for(var i=0;i<_1c22.length;i++){ var _1c24=_1c22[i].getSelectedContextIds(); if(_1c24&&_1c24.length>0){ _1c20=true; break; } } return _1c20; }; function DrillResetAction(){ this.m_sAction="DrillDown"; this.m_sharePromptValues=null; this.m_aDrilledResetHUNs=null; this.m_updateInfoBar=true; }; DrillResetAction.prototype=new ModifyReportAction(); DrillResetAction.prototype.setRequestParms=function(_1c25){ this.m_aDrilledResetHUNs=_1c25.drilledResetHUNs; this.m_sharePromptValues=_1c25.promptValues; }; DrillResetAction.prototype.addAdditionalOptions=function(oReq){ if(!this.m_oCV){ return; } if(!this.m_sharePromptValues){ this.m_oCV.preparePromptValues(oReq); oReq.getRequestHandler().setForceRaiseSharePrompt(true); }else{ if(!this.m_sharePromptValues){ return; } for(var _1c27 in this.m_sharePromptValues){ oReq.addFormField(_1c27,this.m_sharePromptValues[_1c27]); } } }; DrillResetAction.prototype.addActionContextAdditionalParms=function(){ var _1c28=""; for(var i=0;i"; } _1c28+=""; _1c28+="resetDimension"; return _1c28; }; DrillResetAction.prototype.setUpdateInfoBar=function(_1c2a){ this.m_updateInfoBar=_1c2a; }; DrillResetAction.prototype.updateInfoBar=function(){ this.m_updateInfoBar; }; function RemoveAllDataFilterAction(){ this.m_sAction="UpdateDataFilter"; }; RemoveAllDataFilterAction.prototype.setCognosViewer=function(oCV){ this.m_oCV=oCV; }; RemoveAllDataFilterAction.prototype.getCognosViewer=function(oCV){ return this.m_oCV; }; RemoveAllDataFilterAction.prototype.setRequestParms=function(_1c2d){ if(!_1c2d||!_1c2d.callback){ return; } this.m_callbackMethod=_1c2d.callback.method; this.m_callbackObject=_1c2d.callback.object; }; RemoveAllDataFilterAction.prototype.createJSONDispatcherEntry=function(_1c2e){ var oReq=new JSONDispatcherEntry(this.getCognosViewer()); oReq.addFormField("ui.action",_1c2e); var _1c30=this.addActionContext(); oReq.addFormField("cv.actionContext",_1c30); if(window.gViewerLogger){ window.gViewerLogger.log("Action context",_1c30,"xml"); } if(typeof this.m_oCV.envParams["ui.spec"]!="undefined"){ oReq.addFormField("ui.spec",this.m_oCV.envParams["ui.spec"]); } oReq.addFormField("bux","true"); return oReq; }; RemoveAllDataFilterAction.prototype.addActionContext=function(){ var _1c31=""; var _1c33="{ \"removeAll\" :\"true\"}"; _1c31+=xml_encode(_1c33); _1c31+=""; _1c31+=""; return _1c31; }; RemoveAllDataFilterAction.prototype.executeCallback=function(_1c34){ var _1c35=GUtil.generateCallback(this.m_callbackMethod,[_1c34],this.m_callbackObject); _1c35(); }; RemoveAllDataFilterAction.prototype.handleServerResponse=function(_1c36){ if(_1c36&&_1c36.getJSONResponseObject()){ this.executeCallback(_1c36.getJSONResponseObject().reportSpec); } }; RemoveAllDataFilterAction.prototype.execute=function(){ var oCV=this.getCognosViewer(); if(!oCV.getRAPReportInfo().hasSlider()){ this.executeCallback(oCV.envParams["ui.spec"]); }else{ var _1c38=this.createJSONDispatcherEntry("modifyReport"); _1c38.setCallbacks({"complete":{"object":this,"method":this.handleServerResponse}}); oCV.dispatchRequest(_1c38); } }; CCognosViewer.prototype.loadExtra=function(){ }; function DrillContextMenuHelper(){ }; DrillContextMenuHelper.updateDrillMenuItems=function(_1c39,oCV,_1c3b){ var _1c3c=[]; if(DrillContextMenuHelper.needsDrillSubMenu(oCV)){ var _1c3d=oCV.getSelectionController(); var _1c3e=_1c3d.getAllSelectedObjects(); var _1c3f=_1c3e[0]; if(_1c3f.getUseValues().length>1&&typeof RV_RES!="undefined"){ var _1c40={name:_1c3b,label:RV_RES.RV_DRILL_DEFAULT,action:{name:_1c3b,payload:{}}}; _1c3c.push(_1c40); } var _1c41=(_1c3f.getUseValues().length>1)?1:0; var _1c42=_1c3f.getUseValues().length-1; _1c42=(_1c42>2)?2:_1c42; for(var iDim=_1c41;iDim<=_1c42;++iDim){ DrillContextMenuHelper.addSubMenuItem(_1c3b,_1c3c,_1c3f,iDim,0); } var _1c44=false; for(var iDim=_1c41;iDim<=_1c42;++iDim){ for(var _1c45=1;_1c45<_1c3f.getUseValues()[iDim].length;++_1c45){ if(_1c44==false){ _1c3c.push({separator:true}); _1c44=true; } DrillContextMenuHelper.addSubMenuItem(_1c3b,_1c3c,_1c3f,iDim,_1c45); } } } DrillContextMenuHelper.completeDrillMenu(_1c3b,_1c3c,_1c39); }; DrillContextMenuHelper.needsDrillSubMenu=function(oCV){ var _1c47=(oCV&&oCV.getSelectionController()); if(_1c47){ var _1c48=_1c47.getAllSelectedObjects(); if(_1c48.length==1&&_1c48[0].isHomeCell&&_1c48[0].isHomeCell()==false){ var _1c49=_1c48[0].isSelectionOnVizChart(); if(!_1c49){ var _1c4a=oCV.getAdvancedServerProperty("VIEWER_JS_ENABLE_DRILL_SUBMENU"); _1c49=(_1c4a=="charts"&&_1c47.hasSelectedChartNodes()); } if(_1c49){ var _1c4b=_1c48[0]; return (_1c49&&_1c4b.getUseValues()&&(_1c4b.getUseValues().length>1||_1c4b.getUseValues()[0].length>1)); } } } return false; }; DrillContextMenuHelper.addSubMenuItem=function(_1c4c,_1c4d,_1c4e,iDim,_1c50){ var _1c51=_1c4e.getDrillOptions()[iDim][_1c50]; if(DrillContextMenuHelper.isOptionDrillable(_1c4c,_1c51)){ var _1c52=DrillContextMenuHelper.getItemValue(_1c4e,iDim,_1c50); if(_1c52){ var _1c53=_1c4e.getDataItems()[iDim][_1c50]; var _1c54={name:_1c4c,label:_1c52,action:{name:_1c4c,payload:{userSelectedDrillItem:_1c53}}}; _1c4d.push(_1c54); } } }; DrillContextMenuHelper.completeDrillMenu=function(_1c55,_1c56,_1c57){ if(_1c56.length>0){ _1c57.items=_1c56; }else{ _1c57.items=null; if(_1c57.action==null){ _1c57.action={name:_1c55,action:{name:_1c55}}; } } }; DrillContextMenuHelper.isOptionDrillable=function(_1c58,_1c59){ return (_1c59>=3||(_1c58=="DrillDown"&&_1c59==2)||(_1c58=="DrillUp"&&_1c59==1)); }; DrillContextMenuHelper.getItemValue=function(_1c5a,iDim,_1c5c){ var _1c5d=(_1c5c==0)?_1c5a.getDisplayValues()[iDim]:null; return ((_1c5d)?_1c5d:_1c5a.getUseValues()[iDim][_1c5c]); }; dojo.provide("viewer.dialogs.ClipboardDialog"); dojo.require("bux.dialogs.BaseCustomContentDialog"); dojo.require("bux.layout.TableContainer"); dojo.require("dijit.form.Textarea"); dojo.require("dijit.form.Button"); dojo.declare("viewer.dialogs.ClipboardDialog",bux.dialogs.BaseCustomContentDialog,{sTitle:null,okHandler:null,cancelHandler:null,startup:function(){ this.updateTitle(this.sTitle); this.inherited(arguments); var _1c5e=new bux.layout.TableContainer({classname:"bux-InformationDialog"},this.contentContainer); var cell=null,row=null; this._textField=new dijit.form.SimpleTextarea({required:true,rows:10,cols:50,style:"width:auto"}); row=new bux.layout.TableContainerRow({parentContainer:_1c5e}); cell=new bux.layout.TableContainerCell({classname:"bux-dialog-field",parentContainer:row}); cell.addContent(this._textField.domNode); },onOK:function(){ if(this._textField.state!="Error"){ this.inherited(arguments); this.okHandler(this._textField.get("value")); this.hide(); } }}); dojo.provide("bux.reportViewer.chart"); dojo.declare("bux.reportViewer.chart",null,{m_displayTypeDialogDefinition:null,constructor:function(){ this.initialize(); },initialize:function(){ if(this.m_displayTypeDialogDefinition!==null){ return; } this.m_displayTypeDialogDefinition=[{label:RV_RES.IDS_JS_CHART_TABLE,image:"images/dialog/displayOptionsDialog/type_icons/table.gif",options:[{label:RV_RES.IDS_JS_CHART_CROSSTAB,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/crosstab_48.gif",value:"crosstab"},{label:RV_RES.IDS_JS_CHART_LIST_TABLE,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/List_48.gif",value:"list"}]},{label:RV_RES.IDS_JS_CHART_COLUMN,image:"images/dialog/displayOptionsDialog/type_icons/column.gif",options:[{label:RV_RES.IDS_JS_CHART_COLUMN,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_column_clustered_flat.gif",value:"column_clustered_flat"},{label:RV_RES.IDS_JS_CHART_COLUMN_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_column_clustered.gif",value:"column_clustered"},{label:RV_RES.IDS_JS_CHART_STACKED_COLUMN,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_column_stacked_flat.gif",value:"column_stacked_flat"},{label:RV_RES.IDS_JS_CHART_STACKED_COLUMN_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_column_stacked.gif",value:"column_stacked"},{label:RV_RES.IDS_JS_CHART_PERCENT_STACKED_COLUMN,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_column_percent_flat.gif",value:"column_percent_flat"},{label:RV_RES.IDS_JS_CHART_PERCENT_STACKED_COLUMN_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_column_percent.gif",value:"column_percent"},{label:RV_RES.IDS_JS_CHART_3D_AXIS_COLUMN,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_column_3daxis.gif",value:"column_3daxis"},{label:RV_RES.IDS_JS_CHART_COLUMN,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_column_rectangle_clustered.jpg",value:"v2_column_rectangle_clustered"},{label:RV_RES.IDS_JS_CHART_COLUMN_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_column_box_clustered_depth.jpg",value:"v2_column_box_clustered_depth"},{label:RV_RES.IDS_JS_CHART_STACKED_COLUMN,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_column_rectangle_stacked.jpg",value:"v2_column_rectangle_stacked"},{label:RV_RES.IDS_JS_CHART_STACKED_COLUMN_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_column_box_stacked_depth.jpg",value:"v2_column_box_stacked_depth"},{label:RV_RES.IDS_JS_CHART_PERCENT_STACKED_COLUMN,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_column_rectangle_percent.jpg",value:"v2_column_rectangle_percent"},{label:RV_RES.IDS_JS_CHART_PERCENT_STACKED_COLUMN_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_column_box_percent_depth.jpg",value:"v2_column_box_percent_depth"}]},{label:RV_RES.IDS_JS_CHART_BAR,image:"images/dialog/displayOptionsDialog/type_icons/bar.gif",options:[{label:RV_RES.IDS_JS_CHART_BAR,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_bar_clustered_flat.gif",value:"bar_clustered_flat"},{label:RV_RES.IDS_JS_CHART_BAR_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_bar_clustered.gif",value:"bar_clustered"},{label:RV_RES.IDS_JS_CHART_STACKED_BAR,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_bar_stacked_flat.gif",value:"bar_stacked_flat"},{label:RV_RES.IDS_JS_CHART_STACKED_BAR_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_bar_stacked.gif",value:"bar_stacked"},{label:RV_RES.IDS_JS_CHART_PERCENT_STACKED_BAR,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_bar_percent_flat.gif",value:"bar_percent_flat"},{label:RV_RES.IDS_JS_CHART_PERCENT_STACKED_BAR_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_bar_percent.gif",value:"bar_percent"},{label:RV_RES.IDS_JS_CHART_BAR,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_bar_rectangle_clustered.jpg",value:"v2_bar_rectangle_clustered"},{label:RV_RES.IDS_JS_CHART_BAR_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_bar_box_clustered_depth.jpg",value:"v2_bar_box_clustered_depth"},{label:RV_RES.IDS_JS_CHART_STACKED_BAR,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_bar_rectangle_stacked.jpg",value:"v2_bar_rectangle_stacked"},{label:RV_RES.IDS_JS_CHART_STACKED_BAR_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_bar_box_stacked_depth.jpg",value:"v2_bar_box_stacked_depth"},{label:RV_RES.IDS_JS_CHART_PERCENT_STACKED_BAR,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_bar_rectangle_percent.jpg",value:"v2_bar_rectangle_percent"},{label:RV_RES.IDS_JS_CHART_PERCENT_STACKED_BAR_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_bar_box_percent_depth.jpg",value:"v2_bar_box_percent_depth"}]},{label:RV_RES.IDS_JS_CHART_LINE,image:"images/dialog/displayOptionsDialog/type_icons/line.gif",options:[{label:RV_RES.IDS_JS_CHART_LINE_WITH_MARKERS,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_line_clustered_flat_markers.gif",value:"line_clustered_flat_markers"},{label:RV_RES.IDS_JS_CHART_LINE,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_line_clustered_flat.gif",value:"line_clustered_flat"},{label:RV_RES.IDS_JS_CHART_LINE_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_line_clustered.gif",value:"line_clustered"},{label:RV_RES.IDS_JS_CHART_STEP_LINE_MARKERS,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_line_stepAtPoint_clustered_flat_markers.gif",value:"line_stepAtPoint_clustered_flat_markers"},{label:RV_RES.IDS_JS_CHART_STEP_LINE,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_line_stepAtPoint_clustered_flat.gif",value:"line_stepAtPoint_clustered_flat"},{label:RV_RES.IDS_JS_CHART_STACKED_LINE_MARKERS,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_line_stacked_flat_markers.gif",value:"line_stacked_flat_markers"},{label:RV_RES.IDS_JS_CHART_STACKED_LINE,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_line_stacked_flat.gif",value:"line_stacked_flat"},{label:RV_RES.IDS_JS_CHART_STACKED_LINE_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_line_stacked.gif",value:"line_stacked"},{label:RV_RES.IDS_JS_CHART_PERCENT_STACKED_LINE_MARKERS,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_line_percent_flat_markers.gif",value:"line_percent_flat_markers"},{label:RV_RES.IDS_JS_CHART_PERCENT_STACKED_LINE,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_line_percent_flat.gif",value:"line_percent_flat"},{label:RV_RES.IDS_JS_CHART_PERCENT_STACKED_LINE__3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_line_percent.gif",value:"line_percent"},{label:RV_RES.IDS_JS_CHART_3D_AXIS_LINE,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_line_3daxis.gif",value:"line_3daxis"},{label:RV_RES.IDS_JS_CHART_LINE,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_line_clustered.jpg",value:"v2_line_clustered"},{label:RV_RES.IDS_JS_CHART_LINE_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_line_clustered_depth.jpg",value:"v2_line_clustered_depth"},{label:RV_RES.IDS_JS_CHART_LINE_WITH_MARKERS,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_line_clustered_markers.jpg",value:"v2_line_clustered_markers"},{label:RV_RES.IDS_JS_CHART_LINE_WITH_3D_MARKERS,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_line_clustered_3dmarkers.jpg",value:"v2_line_clustered_3dmarkers"},{label:RV_RES.IDS_JS_CHART_STEP_LINE,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_stepped_line_at_points_clustered.jpg",value:"v2_stepped_line_at_points_clustered"},{label:RV_RES.IDS_JS_CHART_STEP_LINE_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_stepped_line_at_points_clustered_depth.jpg",value:"v2_stepped_line_at_points_clustered_depth"}]},{label:RV_RES.IDS_JS_CHART_PIE_DONUT,image:"images/dialog/displayOptionsDialog/type_icons/pie.gif",options:[{label:RV_RES.IDS_JS_CHART_PIE,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_pie_flat.gif",value:"pie_flat"},{label:RV_RES.IDS_JS_CHART_DONUT,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_pie_flat_hole.gif",value:"pie_flat_hole"},{label:RV_RES.IDS_JS_CHART_PIE_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_pie.gif",value:"pie"},{label:RV_RES.IDS_JS_CHART_DONUT_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_pie_hole.gif",value:"pie_hole"},{label:RV_RES.IDS_JS_CHART_PIE,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_pie_flat.jpg",value:"v2_pie"},{label:RV_RES.IDS_JS_CHART_PIE_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_pie.jpg",value:"v2_pie_depth_round"},{label:RV_RES.IDS_JS_CHART_DONUT,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_pie_hole_flat.jpg",value:"v2_donut"},{label:RV_RES.IDS_JS_CHART_DONUT_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_pie_hole.jpg",value:"v2_donut_depth_round"}]},{label:RV_RES.IDS_JS_CHART_AREA,image:"images/dialog/displayOptionsDialog/type_icons/area.gif",options:[{label:RV_RES.IDS_JS_CHART_AREA,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_area_clustered_flat.gif",value:"area_clustered_flat"},{label:RV_RES.IDS_JS_CHART_AREA_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_area_clustered.gif",value:"area_clustered"},{label:RV_RES.IDS_JS_CHART_STACKED_AREA,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_area_stacked_flat.gif",value:"area_stacked_flat"},{label:RV_RES.IDS_JS_CHART_STACKED_AREA_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_area_stacked.gif",value:"area_stacked"},{label:RV_RES.IDS_JS_CHART_PERCENT_AREA,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_area_percent_flat.gif",value:"area_percent_flat"},{label:RV_RES.IDS_JS_CHART_PERCENT_AREA_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_area_percent.gif",value:"area_percent"},{label:RV_RES.IDS_JS_CHART_3D_AXIS_AREA,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_area_3daxis.gif",value:"area_3daxis"},{label:RV_RES.IDS_JS_CHART_STACKED_AREA,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_area_flat_point_to_point.gif",value:"v2_area_stacked_flat"},{label:RV_RES.IDS_JS_CHART_STACKED_AREA_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_area_depth_point_to_point.gif",value:"v2_area_stacked"},{label:RV_RES.IDS_JS_CHART_PERCENT_AREA,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_area_flat_percent_point_to_point.gif",value:"v2_area_percent_flat"},{label:RV_RES.IDS_JS_CHART_PERCENT_AREA_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_area_depth_percent_point_to_point.gif",value:"v2_area_percent"}]},{label:RV_RES.IDS_JS_CHART_SCATTER_BUBBLE_POINT,image:"images/dialog/displayOptionsDialog/type_icons/scatter.gif",options:[{label:RV_RES.IDS_JS_CHART_SCATTER,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_scatter.gif",value:"scatter"},{label:RV_RES.IDS_JS_CHART_BUBBLE,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_bubble.gif",value:"bubble"},{label:RV_RES.IDS_JS_CHART_BUBBLE_WITH_EXCEL_BUBBLE_SIZING,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_bubble_excel.gif",value:"bubble_zeroBased"},{label:RV_RES.IDS_JS_CHART_POINT,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_point_clustered.gif",value:"point_clustered"},{label:RV_RES.IDS_JS_CHART_3D_SCATTER,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_scatter_3daxis.gif",value:"scatter_3daxis"},{label:RV_RES.IDS_JS_CHART_SCATTER,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_scatter.gif",value:"v2_scatter"},{label:RV_RES.IDS_JS_CHART_BUBBLE,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_bubble.gif",value:"v2_bubble"},{label:RV_RES.IDS_JS_CHART_BUBBLE_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_bubble_3dmarkers.gif",value:"v2_bubble_3d"},{label:RV_RES.IDS_JS_CHART_POINT,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_point_clustered_markers.jpg",value:"v2_point_clustered_markers"},{label:RV_RES.IDS_JS_CHART_POINT_3D,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_point_clustered_3dmarkers.jpg",value:"v2_point_clustered_3dmarkers"}]},{label:RV_RES.IDS_JS_CHART_GAUGE,image:"images/dialog/displayOptionsDialog/type_icons/gauge.gif",options:[{label:RV_RES.IDS_JS_CHART_DIAL_GAUGE,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_gauge_dial.gif",value:"gauge_dial"},{label:RV_RES.IDS_JS_CHART_DIAL_GAUGE,Description:"",image:"images/dialog/displayOptionsDialog/chart_thumbnails/type_v2_gauge.gif",value:"v2_gauge"}]}]; },getDisplayTypeDialogDefinition:function(_1c61){ var _1c62=[]; for(var j in this.m_displayTypeDialogDefinition){ var _1c64=this.m_displayTypeDialogDefinition[j]; var _1c65={}; _1c65.image=this.m_displayTypeDialogDefinition[j].image; _1c65.label=this.m_displayTypeDialogDefinition[j].label; _1c65.options=[]; var _1c66=_1c64.options; for(var k in _1c66){ var chart=_1c66[k]; for(var i in _1c61){ var _1c6a=_1c61[i]; if(chart.value===_1c6a){ var _1c6b={label:chart.label,Description:chart.Description,image:chart.image,value:"{targetType:'"+chart.value+"', label:'"+chart.label+"'}"}; _1c65.options.push(_1c6b); } } } if(_1c65.options.length>0){ _1c62.push(_1c65); } } return _1c62; }}); function ActionFormFields(_1c6c){ this.m_dispatcherEntry=_1c6c; this.m_oCV=_1c6c.getViewer(); }; ActionFormFields.prototype.addFormFields=function(){ var _1c6d=this.m_dispatcherEntry; var _1c6e=_1c6d.getAction(); _1c6e.preProcess(); _1c6d.addFormField("ui.action","modifyReport"); if(this.m_oCV.getModelPath()!==""){ _1c6d.addFormField("modelPath",this.m_oCV.getModelPath()); if(typeof this.m_oCV.envParams["metaDataModelModificationTime"]!="undefined"){ _1c6d.addFormField("metaDataModelModificationTime",this.m_oCV.envParams["metaDataModelModificationTime"]); } } if(_1c6e.doAddActionContext()===true){ var _1c6f=_1c6e.addActionContext(); _1c6d.addFormField("cv.actionContext",_1c6f); if(window.gViewerLogger){ window.gViewerLogger.log("Action context",_1c6f,"xml"); } } var isBux=this.m_oCV.envParams["bux"]=="true"; if(isBux){ _1c6d.addFormField("cv.showFaultPage","false"); }else{ _1c6d.addFormField("cv.showFaultPage","true"); } _1c6d.addFormField("ui.object",this.m_oCV.envParams["ui.object"]); _1c6d.addDefinedFormField("ui.spec",this.m_oCV.envParams["ui.spec"]); _1c6d.addDefinedFormField("modelPath",this.m_oCV.envParams["modelPath"]); _1c6d.addDefinedFormField("packageBase",this.m_oCV.envParams["packageBase"]); _1c6d.addDefinedFormField("rap.state",this.m_oCV.envParams["rap.state"]); _1c6d.addDefinedFormField("rap.reportInfo",this.m_oCV.envParams["rapReportInfo"]); _1c6d.addDefinedFormField("ui.primaryAction",this.m_oCV.envParams["ui.primaryAction"]); _1c6d.addNonNullFormField("cv.debugDirectory",this.m_oCV.envParams["cv.debugDirectory"]); _1c6d.addNonNullFormField("ui.objectClass",this.m_oCV.envParams["ui.objectClass"]); _1c6d.addNonNullFormField("bux",this.m_oCV.envParams["bux"]); _1c6d.addNonNullFormField("baseReportModificationTime",this.m_oCV.envParams["baseReportModificationTime"]); _1c6d.addNonNullFormField("originalReport",this.m_oCV.envParams["originalReport"]); var _1c71=this.m_oCV.getFlashChartOption(); if(_1c71!=null){ _1c6d.addFormField("savedFlashChartOption",_1c71); if(_1c71&&_1c6e!=null&&typeof (_1c6e.m_requestParams)!="undefined"&&typeof (_1c6e.m_requestParams.targetType)!="undefined"){ var _1c72=false; var _1c73=null; if(typeof (_1c6e.m_requestParams.targetType.targetType)!="undefined"){ _1c73=_1c6e.m_requestParams.targetType.targetType; }else{ _1c73=_1c6e.m_requestParams.targetType; } if(_1c73.match("v2_")!=null||_1c73.match("_v2")!=null){ _1c72=true; }else{ var _1c74=this.m_oCV.getRAPReportInfo(); var _1c75=_1c6e.getSelectedReportInfo(); if(_1c74&&_1c75){ var _1c76=_1c74.getDisplayTypes(_1c75.container); if(_1c76.match("v2_")!=null||_1c76.match("_v2")!=null){ _1c72=true; } } } _1c6d.addFormField("hasAVSChart",_1c72); }else{ _1c6d.addFormField("hasAVSChart",this.m_oCV.hasAVSChart()); } } var sEP=this.m_oCV.getExecutionParameters(); if(sEP){ _1c6d.addFormField("executionParameters",encodeURIComponent(sEP)); } _1c6d.addFormField("ui.conversation",encodeURIComponent(this.m_oCV.getConversation())); _1c6d.addFormField("m_tracking",encodeURIComponent(this.m_oCV.getTracking())); var sCAF=this.m_oCV.getCAFContext(); if(sCAF){ _1c6d.addFormField("ui.cafcontextid",sCAF); } if(_1c6e.forceRunSpecRequest()){ _1c6d.addFormField("widget.forceRunSpec","true"); } }; HiddenIframeDispatcherEntry.IFRAME_ID_PREFIX="viewerHiddenRequest"; HiddenIframeDispatcherEntry.FORM_NAME="viewerHiddenFormRequest"; function HiddenIframeDispatcherEntry(oCV){ HiddenIframeDispatcherEntry.baseConstructor.call(this,oCV); if(oCV){ HiddenIframeDispatcherEntry.prototype.setDefaultFormFields.call(this); this.setRequestHandler(new RequestHandler(oCV)); this.setWorkingDialog(oCV.getWorkingDialog()); this.setRequestIndicator(oCV.getRequestIndicator()); this.m_httpRequestConfig=oCV.getConfig()&&oCV.getConfig().getHttpRequestConfig()?oCV.getConfig().getHttpRequestConfig():null; this.setIframeId(HiddenIframeDispatcherEntry.IFRAME_ID_PREFIX+oCV.getId()); this.originalGetViewerConfiguration=null; } }; HiddenIframeDispatcherEntry.prototype=new DispatcherEntry(); HiddenIframeDispatcherEntry.baseConstructor=DispatcherEntry; HiddenIframeDispatcherEntry.prototype.setDefaultFormFields=function(){ var oCV=this.getViewer(); var sCAF=oCV.getCAFContext(); this.addDefinedNonNullFormField("ui.cafcontextid",sCAF); }; HiddenIframeDispatcherEntry.prototype.sendRequest=function(){ this._createHiddenIframe(); var form=this._createForm(); this._setupCallbacks(); this.onPreHttpRequest(this.getRequest()); form.submit(); }; HiddenIframeDispatcherEntry.prototype._iframeRequestComplete=function(){ window.getViewerConfiguration=this.originalGetViewerConfiguration; this.onPostHttpRequest(); this.onEntryComplete(); }; HiddenIframeDispatcherEntry.prototype._setupCallbacks=function(){ this.originalGetViewerConfiguration=window.getViewerConfiguration; if(this.getFormField("cv.useAjax")!="false"){ var _1c7d=this; var _1c7e=this.getRequestHandler().getRequestIndicator(); var _1c7f=this.getRequestHandler().getWorkingDialog(); window.getViewerConfiguration=function(){ var _1c80={"httpRequestCallbacks":{"reportStatus":{"complete":function(){ _1c7d.onComplete(); },"working":function(){ _1c7d.onWorking(); },"prompting":function(){ _1c7d.onPrompting(); }}}}; return _1c80; }; } }; HiddenIframeDispatcherEntry.prototype.setIframeId=function(id){ this._iframeId=id; }; HiddenIframeDispatcherEntry.prototype.getIframeId=function(){ return this._iframeId; }; HiddenIframeDispatcherEntry.prototype._createForm=function(_1c82){ var oCV=this.getViewer(); var _1c84=HiddenIframeDispatcherEntry.FORM_NAME+oCV.getId(); var _1c85=document.getElementById(_1c84); if(_1c85){ _1c85.parentNode.removeChild(_1c85); _1c85=null; } var _1c86=location.protocol+"//"+location.host+oCV.m_sGateway; _1c85=document.createElement("form"); _1c85.setAttribute("method","post"); _1c85.setAttribute("action",_1c86); _1c85.setAttribute("target",this.getIframeId()); _1c85.setAttribute("id",_1c84); _1c85.style.display="none"; var _1c87=this.getRequest().getFormFields(); var _1c88=_1c87.keys(); for(var index=0;index<_1c88.length;index++){ _1c85.appendChild(createHiddenFormField(_1c88[index],_1c87.get(_1c88[index]))); } document.body.appendChild(_1c85); return _1c85; }; HiddenIframeDispatcherEntry.prototype._createHiddenIframe=function(){ var oCV=this.getViewer(); var _1c8b=this.getIframeId(); var _1c8c=document.getElementById(_1c8b); if(_1c8c){ _1c8c.parentNode.parentNode.removeChild(_1c8c.parentNode); } var div=document.createElement("div"); div.style.position="absolute"; div.style.left="0px"; div.style.top="0px"; div.style.display="none"; document.body.appendChild(div); div.innerHTML=""; _1c8c=document.getElementById(_1c8b); var _1c8e=this; var func=function(){ HiddenIframeDispatcherEntry.handleIframeLoad(_1c8e); }; if(_1c8c.attachEvent){ _1c8c.attachEvent("onload",func); }else{ _1c8c.addEventListener("load",func,true); } }; HiddenIframeDispatcherEntry.hideIframe=function(cvId){ var _1c91=document.getElementById(HiddenIframeDispatcherEntry.IFRAME_ID_PREFIX+cvId); if(_1c91){ _1c91.parentNode.style.display="none"; } }; HiddenIframeDispatcherEntry.showIframeContentsInWindow=function(cvId){ var _1c93=document.getElementById(HiddenIframeDispatcherEntry.IFRAME_ID_PREFIX+cvId); if(!_1c93){ return; } var html=_1c93.contentWindow.document.getElementsByTagName("html")[0].innerHTML; var _1c95=window.open("","","height=400,width=500"); if(_1c95){ _1c95.document.write(""+html+""); } }; HiddenIframeDispatcherEntry.handleIframeLoad=function(_1c96){ if(!_1c96){ return; } var _1c97=document.getElementById(_1c96.getIframeId()); if(!_1c97){ return; } var oCV=_1c97.contentWindow.window.gaRV_INSTANCES?_1c97.contentWindow.window.gaRV_INSTANCES[0]:null; var _1c99=oCV?oCV.getStatus():null; if(_1c99=="complete"){ _1c96.onComplete(); } if(_1c99=="working"){ _1c96.onWorking(); } if(_1c99=="prompting"){ _1c96.onPrompting(); } if(!oCV||_1c99=="fault"||_1c99==""){ _1c96.onFault(); } }; HiddenIframeDispatcherEntry.prototype.onFault=function(){ this._iframeRequestComplete(); HiddenIframeDispatcherEntry.showIframeContentsInWindow(this.getViewer().getId()); }; HiddenIframeDispatcherEntry.prototype.onPrompting=function(){ this._iframeRequestComplete(); if(this.m_httpRequestConfig){ var _1c9a=this.m_httpRequestConfig.getReportStatusCallback("prompting"); if(typeof _1c9a=="function"){ _1c9a(); } } HiddenIframeDispatcherEntry.showIframeContentsInWindow(this.getViewer().getId()); }; HiddenIframeDispatcherEntry.prototype.onComplete=function(){ this._iframeRequestComplete(); if(this.m_httpRequestConfig){ var _1c9b=this.m_httpRequestConfig.getReportStatusCallback("complete"); if(typeof _1c9b=="function"){ _1c9b(); } } var _1c9c=document.getElementById(this.getIframeId()); if(typeof _1c9c.contentWindow.detachLeavingRV=="function"){ _1c9c.contentWindow.detachLeavingRV(); } var _1c9d=_1c9c.parentNode; _1c9d.style.display="none"; if(this.getCallbacks()&&this.getCallbacks()["complete"]){ HiddenIframeDispatcherEntry.executeCallback(this.getCallbacks()["complete"]); } }; HiddenIframeDispatcherEntry.prototype.cancelRequest=function(_1c9e){ this._iframeRequestComplete(); if(!this.m_bCancelCalled){ this.m_bCancelCalled=true; var _1c9f=document.getElementById(this.getIframeId()); if(!_1c9f){ return; } var oCV=_1c9f.contentWindow[getCognosViewerObjectString(this.getViewer().getId())]; if(oCV){ oCV.cancel(); } } }; HiddenIframeDispatcherEntry.executeCallback=function(_1ca1){ if(_1ca1){ var _1ca2=GUtil.generateCallback(_1ca1.method,_1ca1.params,_1ca1.object); _1ca2(); } }; HiddenIframeDispatcherEntry.getIframe=function(cvId){ var _1ca4=document.getElementById(HiddenIframeDispatcherEntry.IFRAME_ID_PREFIX+cvId); return _1ca4; }; function ReportInfoDispatcherEntry(oCV){ ReportInfoDispatcherEntry.baseConstructor.call(this,oCV); if(oCV){ this.setCallbacks({"complete":{"object":this,"method":this.onComplete},"prompting":{"object":this,"method":this.onPrompting}}); this.getRequestHandler().setFaultDialog(new ModalFaultDialog(oCV)); } }; ReportInfoDispatcherEntry.prototype=new AsynchJSONDispatcherEntry(); ReportInfoDispatcherEntry.baseConstructor=AsynchJSONDispatcherEntry; ReportInfoDispatcherEntry.prototype.initializeAction=function(_1ca6){ this.setKey(_1ca6.getActionKey()); this.setCanBeQueued(_1ca6.canBeQueued()); this.m_action=_1ca6; }; ReportInfoDispatcherEntry.prototype.getAction=function(){ return this.m_action; }; ReportInfoDispatcherEntry.prototype.prepareRequest=function(){ var _1ca7=new ActionFormFields(this); _1ca7.addFormFields(); }; ReportInfoDispatcherEntry.prototype.onComplete=function(_1ca8,arg1){ if(this.m_oCV.getViewerDispatcher().queueIsEmpty()==true){ var _1caa=this.m_action.getOnCompleteCallback(); _1caa(_1ca8); } }; ReportInfoDispatcherEntry.prototype.onPrompting=function(_1cab,arg1){ var _1cad=this.m_action.getOnPromptingCallback(); _1cad(_1cab); }; ReportInfoDispatcherEntry.prototype.onPostEntryComplete=function(){ var oCV=this.getViewer(); if(oCV&&oCV.getViewerWidget()){ var _1caf=oCV.getViewerWidget(); _1caf.getLoadManager().processQueue(); } }; function ModifyReportDispatcherEntry(oCV){ ModifyReportDispatcherEntry.baseConstructor.call(this,oCV); this.m_action=null; if(oCV){ this.m_viewerWidget=oCV.getViewerWidget(); 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.onPrompting}}); } }; ModifyReportDispatcherEntry.prototype=new AsynchDataDispatcherEntry(); ModifyReportDispatcherEntry.baseConstructor=AsynchDataDispatcherEntry; ModifyReportDispatcherEntry.prototype.parent=AsynchDataDispatcherEntry.prototype; ModifyReportDispatcherEntry.prototype.initializeAction=function(_1cb1){ this.setKey(_1cb1.getActionKey()); this.setCanBeQueued(_1cb1.canBeQueued()); this.m_action=_1cb1; }; ModifyReportDispatcherEntry.prototype.getAction=function(){ return this.m_action; }; ModifyReportDispatcherEntry.prototype.prepareRequest=function(){ if(this.m_viewerWidget){ DispatcherEntry.addWidgetInfoToFormFields(this.m_viewerWidget,this); } var _1cb2=new ActionFormFields(this); _1cb2.addFormFields(); if(this.m_viewerWidget){ this.addFormField("cv.id",this.m_viewerWidget.getViewerId()); } this.addFormField("keepIterators","true"); this.addFormField("run.prompt",this.m_action.getPromptOption()); if(this.m_action.reuseQuery()===true){ this.addFormField("reuseResults","true"); }else{ if(this.m_action.reuseGetParameter()===true){ this.addFormField("reuseResults","paramInfo"); } } if(this.m_action.keepRAPCache()===false&&this.m_viewerWidget){ this.m_viewerWidget.clearRAPCache(); } if(this.m_action.reuseConversation()===true){ this.addFormField("cv.reuseConversation","true"); } if(this.m_action.isUndoable()&&this.m_action.getUndoRedoQueue()){ this.m_action.getUndoRedoQueue().initUndoObj({"tooltip":this.m_action.getUndoHint(),"saveSpec":this.m_action.saveSpecForUndo()}); } if(this.getViewer().getCurrentlySelectedTab()&&!this.formFieldExists("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup")){ this.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",this.getViewer().getCurrentlySelectedTab()); } this.getViewer().clearTabs(); }; ModifyReportDispatcherEntry.prototype.onComplete=function(_1cb3,arg1){ if(this.getRequestHandler()){ this.getRequestHandler().onComplete(_1cb3); } }; ModifyReportDispatcherEntry.prototype.onPrompting=function(_1cb5){ if(this.getRequestHandler()){ this.getRequestHandler().onPrompting(_1cb5); } }; ModifyReportDispatcherEntry.prototype.onWorking=function(_1cb6,arg1){ this.parent.onWorking.call(this,_1cb6,arg1); var _1cb8=_1cb6.getResponseState(); if(this.getRequestHandler()){ this.getRequestHandler().updateViewerState(_1cb8); } }; dojo.provide("ModalInfoMessageDialog"); dojo.declare("ModalInfoMessageDialog",null,{sMessage:"",sDescription:"",sTitle:"",constructor:function(args){ dojo.safeMixin(this,args); },getMessage:function(){ return this.sMessage; },getDescription:function(){ return this.sDescription; },getTitle:function(){ return this.sTitle; },show:function(){ dojo["require"]("bux.dialogs.InformationDialog"); var _1cba=new bux.dialogs.InformationDialog({title:this.getTitle(),sMainMessage:this.getMessage(),sDescription:this.getDescription(),sInfoIconClass:"bux-informationDialog-info-icon"}); _1cba.show(); }}); function CCognosViewerSaveReport(_1cbb,_1cbc){ this.m_cognosViewer=_1cbb; this.m_params=null; this.dashboardToSaveIn=_1cbc.cm$storeID; this.m_doSaveAsOnFault=false; }; CCognosViewerSaveReport.prototype.canSave=function(_1cbd){ return (this.doSaveAs()||_1cbd&&_1cbd.indexOf("write")!==-1); }; CCognosViewerSaveReport.prototype.isSavedOutput=function(){ var _1cbe=this.m_cognosViewer.envParams["ui.action"]; return (typeof _1cbe!=="undefined"&&_1cbe==="view"); }; CCognosViewerSaveReport.prototype.doSaveAs=function(){ var _1cbf=(this.m_doSaveAsOnFault||!this.m_cognosViewer.envParams["savedReportName"]||!this.isSameDashboard()); return _1cbf; }; CCognosViewerSaveReport.prototype.isSameDashboard=function(){ var _1cc0=(this.m_cognosViewer.envParams["ui.object"].indexOf(this.dashboardToSaveIn)!==-1); return _1cc0; }; CCognosViewerSaveReport.prototype.getUIAction=function(){ return (this.doSaveAs()?"saveInDashboard":"updateSavedReport"); }; CCognosViewerSaveReport.prototype.populateRequestParams=function(_1cc1){ _1cc1.addFormField("ui.action",this.getUIAction()); _1cc1.addFormField("cv.ignoreState","true"); _1cc1.addFormField("dashboard-id",this.dashboardToSaveIn); _1cc1.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; } _1cc1.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 _1cc3=this.m_cognosViewer; var _1cc4=this.getViewerWidget(); var _1cc5={"complete":{"object":_1cc4,"method":_1cc4.handleWidgetSaveDone},"fault":{"object":this,"method":this.onFault}}; var _1cc6=new AsynchJSONDispatcherEntry(_1cc3); _1cc6.setCallbacks(_1cc5); this.populateRequestParams(_1cc6); _1cc3.dispatchRequest(_1cc6); }; CCognosViewerSaveReport.prototype.onFault=function(_1cc7,arg1){ var _1cc9=this.m_cognosViewer; var _1cca=this.getViewerWidget(); var _1ccb=_1cc7.getSoapFault(); var _1ccc=XMLHelper_FindChildByTagName(_1ccb,"Fault",true); if(this.ifIsEmptySelectionFault(_1ccc)){ this.handleEmptySelectionFault(); return; } var _1ccd=_1ccb.createElement("allowRetry"); _1ccd.appendChild(_1ccb.createTextNode("false")); _1ccc.appendChild(_1ccd); var _1cce=XMLBuilderSerializeNode(_1ccc); _1cc9.setSoapFault(_1cce); _1cca.handleFault(); var _1ccf={"status":false}; _1cca.iContext.iEvents.fireEvent("com.ibm.bux.widget.save.done",null,_1ccf); }; CCognosViewerSaveReport.prototype.ifIsEmptySelectionFault=function(_1cd0){ if(_1cd0){ var _1cd1=XMLHelper_FindChildByTagName(_1cd0,"errorCode",true); if(_1cd1){ var _1cd2=XMLHelper_GetText(_1cd1,false); return (_1cd2==="cmEmptySelection"); } } return false; }; CCognosViewerSaveReport.prototype.handleEmptySelectionFault=function(){ delete (this.m_cognosViewer.envParams["savedReportName"]); this.m_doSaveAsOnFault=true; this.dispatchRequest(); }; SAVE_REPORT_TYPE={reportView:"application/x-ibmcognos_v5reportview+xml",report:"application/x-ibmcognos_v5report+xml"}; function ViewerIWidgetSave(_1cd3,_1cd4){ this.m_ViewerWidget=_1cd3; this.m_payload=_1cd4; this._setIsSavedDashboard(); }; ViewerIWidgetSave.prototype.setDoCWCopy=function(value){ this._doCWCopy=value; }; ViewerIWidgetSave.prototype._getSavedReport=function(){ var _1cd6=this._getWidgetAttributeValue("savedReportPath"); if(!_1cd6){ _1cd6=this._getWidgetAttributeValue("savedReportName"); } return _1cd6; }; ViewerIWidgetSave.prototype._setIsSavedDashboard=function(){ var _1cd7=this._getSavedReport(); this._bIsSavedDashboard=(_1cd7!==null&&_1cd7!==undefined&&_1cd7.length!==0); }; ViewerIWidgetSave.prototype._isSavedDashboard=function(){ return this._bIsSavedDashboard; }; ViewerIWidgetSave.prototype.canSave=function(_1cd8){ return (this._doSaveNewOrSaveAs()||_1cd8&&_1cd8.indexOf("write")!==-1||this.m_ViewerWidget.isDropped()); }; ViewerIWidgetSave.prototype.isSavedOutput=function(){ var _1cd9=this.m_cognosViewer.envParams["ui.action"]; return (typeof _1cd9!=="undefined"&&_1cd9==="view"); }; ViewerIWidgetSave.prototype._doSaveNewOrSaveAs=function(){ var _1cda=(this.m_payload.operation==="save"&&!this._isSavedDashboard())||(this.m_payload.operation==="saveAs"); return _1cda; }; ViewerIWidgetSave.prototype._getWidgetAttributeValue=function(_1cdb){ return this._getViewerWidget().getAttributeValue(_1cdb); }; ViewerIWidgetSave.prototype._getEnvParam=function(_1cdc){ return this._getViewerWidget().getEnvParam(_1cdc); }; ViewerIWidgetSave.prototype._getViewerWidget=function(){ return this.m_ViewerWidget; }; ViewerIWidgetSave.prototype._isLimitedInteractiveMode=function(){ return this._getViewerWidget().isLimitedInteractiveMode(); }; ViewerIWidgetSave.prototype._getDefaultReportName=function(){ return this._getEnvParam("ui.name"); }; ViewerIWidgetSave.prototype._getReportSpec=function(){ return this._getEnvParam("ui.spec"); }; ViewerIWidgetSave.prototype._getCurrentReportIsReportView=function(){ return (this._getEnvParam("ui.objectClass")==="reportView"); }; ViewerIWidgetSave.prototype.doGetSavePropertiesFromServer=function(){ this.delayedLoadingContext=this._getViewerWidget().getLoadManager().getDelayedLoadingContext(); if(this._getEnvParam("delayedLoadingExecutionParams")){ return true; } return (this.delayedLoadingContext&&this.delayedLoadingContext.getPromptValues()!==null); }; ViewerIWidgetSave.prototype.getSavePropertiesFromServer=function(){ var oCV=this._getViewerWidget().getViewerObject(); var _1cde=new JSONDispatcherEntry(oCV); var _1cdf=this._getViewerWidget(); _1cde.setCallbacks({customArguments:[this.m_payload],complete:{"object":_1cdf,"method":_1cdf.handleGetSavePropertiesFromServerResponse}}); this._addRequestOptions(_1cde); _1cde.sendRequest(); }; ViewerIWidgetSave.prototype._addRequestOptions=function(_1ce0){ _1ce0.addFormField("ui.action","noOp"); _1ce0.addFormField("bux","true"); _1ce0.addFormField("cv.responseFormat","IWidgetSavePropertiesJSON"); if(this._getEnvParam("delayedLoadingExecutionParams")){ _1ce0.addFormField("delayedLoadingExecutionParams",this._getEnvParam("delayedLoadingExecutionParams")); }else{ _1ce0.addFormField("ui.conversation",this._getViewerWidget().getViewerObject().getConversation()); } var _1ce1=this.delayedLoadingContext.getPromptValues(); for(var _1ce2 in _1ce1){ _1ce0.addFormField(_1ce2,_1ce1[_1ce2]); } }; ViewerIWidgetSave.prototype._getExecutionParameters=function(){ return this._getViewerWidget().getViewerObject().getExecutionParameters(); }; ViewerIWidgetSave.prototype._setExecutionParameters=function(body){ var _1ce4=this._getExecutionParameters(); var doc=XMLBuilderLoadXMLFromString(_1ce4); if(!doc.documentElement){ return; } var root=XMLBuilderCreateXMLDocument("root"); var _1ce7=root.createElement("parameters"); XMLBuilderSetAttributeNodeNS(_1ce7,"xmlns:SOAP-ENC","http://schemas.xmlsoap.org/soap/encoding/"); XMLBuilderSetAttributeNodeNS(_1ce7,"xsi:type","bus:parameterValueArrayProp","http://www.w3.org/2001/XMLSchema-instance"); XMLBuilderSetAttributeNodeNS(_1ce7,"xmlns:bus","http://developer.cognos.com/schemas/bibus/3/"); XMLBuilderSetAttributeNodeNS(_1ce7,"xmlns:xs","http://www.w3.org/2001/XMLSchema"); root.documentElement.appendChild(_1ce7); var _1ce8=XMLHelper_FindChildrenByTagName(doc.documentElement,"item",false); var _1ce9=root.createElement("value"); XMLBuilderSetAttributeNodeNS(_1ce9,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance"); _1ce7.appendChild(_1ce9); var _1cea=_1ce8.length; for(var i=0;i<_1ce8.length;i++){ var eName=XMLHelper_FindChildByTagName(_1ce8[i],"name",false); if(eName&&eName.childNodes[0].nodeValue.indexOf("credential:")!==-1){ _1cea--; continue; } _1ce9.appendChild(_1ce8[i]); } XMLBuilderSetAttributeNodeNS(_1ce9,"SOAP-ENC:arrayType","bus:parameterValue["+_1cea+"]","http://schemas.xmlsoap.org/soap/encoding/"); body.parameters=XMLBuilderSerializeNode(_1ce7); }; ViewerIWidgetSave.prototype._setSourceObject=function(_1ced,_1cee){ var _1cef=(_1cee===true)?this._getEnvParam("ui.object"):this._getEnvParam("originalReport"); if(_1cef){ _1ced.sourceObject=_1cef; } }; ViewerIWidgetSave.prototype._setReportTypeToReportView=function(_1cf0){ _1cf0.type=SAVE_REPORT_TYPE.reportView; }; ViewerIWidgetSave.prototype._setReportTypeToReport=function(_1cf1){ _1cf1.type=SAVE_REPORT_TYPE.report; }; ViewerIWidgetSave.prototype._setReportSpec=function(body){ body.specification=this._getReportSpec(); }; ViewerIWidgetSave.prototype._setResourceForSave=function(_1cf3){ if(!this._getCurrentReportIsReportView()&&!this._isLimitedInteractiveMode()){ this._setReportSpec(_1cf3.body); this._setReportTypeToReport(_1cf3); } return _1cf3; }; ViewerIWidgetSave.prototype._setResourceForCopy=function(_1cf4){ this._setReportSpec(_1cf4.body); this._setReportTypeToReport(_1cf4); return _1cf4; }; ViewerIWidgetSave.prototype._setResourceForSaveNew=function(_1cf5){ var _1cf6=false; if(this._getEnvParam("originalReport")==null){ _1cf6=true; } this._setSourceObject(_1cf5,_1cf6); if(this._isLimitedInteractiveMode()){ this._setReportTypeToReportView(_1cf5); }else{ this._setReportTypeToReport(_1cf5); this._setReportSpec(_1cf5.body); } return _1cf5; }; ViewerIWidgetSave.prototype._setResourceForSaveAs=function(_1cf7){ if(this._getCurrentReportIsReportView()){ this._setReportTypeToReportView(_1cf7); this._setSourceObject(_1cf7); }else{ if(this._isLimitedInteractiveMode()){ this._setReportTypeToReportView(_1cf7); this._setSourceObject(_1cf7,true); }else{ this._setReportTypeToReport(_1cf7); this._setSourceObject(_1cf7,true); this._setReportSpec(_1cf7.body); } } return _1cf7; }; ViewerIWidgetSave.prototype._getResource=function(){ var _1cf8={}; if(this._doCWCopy===true){ _1cf8.copyOnCreate=true; } _1cf8.body={}; var _1cf9=(this.m_payload.operation==="save"); var _1cfa=(this.m_payload.operation==="copy"); if(_1cfa){ this._setResourceForCopy(_1cf8); }else{ if(_1cf9){ this._setResourceForSave(_1cf8); }else{ if(this._isSavedDashboard()){ this._setResourceForSaveAs(_1cf8); }else{ this._setResourceForSaveNew(_1cf8); } } } this._setExecutionParameters(_1cf8.body); if(!_1cfa){ _1cf8.itemSetUpdate={name:"savedReportPath",type:"searchPath"}; } return _1cf8; }; ViewerIWidgetSave.prototype._getWidgetId=function(){ return this._getViewerWidget().getWidgetId(); }; ViewerIWidgetSave.prototype.getPayload=function(){ var _1cfb={}; _1cfb.resource=new Array(); _1cfb.widgetId=this._getWidgetId(); _1cfb.resource.push(this._getResource()); return _1cfb; }; dojo.provide("viewer.dialogs.SelectBusinessProcess"); dojo.require("bux.dialogs.BaseCustomContentDialog"); dojo.require("bux.layout.TableContainer"); dojo.require("dijit.form.NumberTextBox"); dojo.require("dijit.form.Button"); dojo.declare("viewer.dialogs.SelectBusinessProcess",bux.dialogs.BaseCustomContentDialog,{sTitle:null,sLabel:null,okHandler:null,cancelHanlder:null,buildRendering:function(){ this.aButtonsSpec=[{label:RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_START_BUTTON_LABEL,action:dojo.hitch(this,this.onOK),type:"button"},{label:RV_RES.CANCEL,action:dojo.hitch(this,this.onCancel),type:"button"}]; this.inherited(arguments); if(!this.BPMProcessesInfo||this.BPMProcessesInfo.length===0){ this._buxBaseDialog._aButtonObjects[0].set("disabled",true); } },startup:function(){ this.updateTitle(this.sTitle); this.inherited(arguments); this.set("role","group"); var _1cfc=new bux.layout.TableContainer({classname:"bux-InformationDialog buxFilterConfigDiscreteValuesTable"},this.contentContainer); var row=new bux.layout.TableContainerRow({classname:"bux-dialog-label",parentContainer:_1cfc}); var cell=new bux.layout.TableContainerCell({parentContainer:row}); this.generateSelectProcessSection(cell); cell.addContent(document.createElement("br")); this.generateViewInputValuesSection(cell); cell.addContent(document.createElement("br")); },addDivContainer:function(_1cff,sID,sRole){ var div=document.createElement("div"); dojo.attr(div,{"class":"buxFilterConfigFilterValue","aria-labelledby":sID,role:sRole}); _1cff.addContent(div); return div; },generateSelectProcessSection:function(_1d03){ var _1d04=this.id+"_selectProcess_a11ylabel"; this.addTableDescription(_1d03,this.sLabel,_1d04); var div=this.addDivContainer(_1d03,_1d04,"radiogroup"); var _1d06=new bux.layout.TableContainer({classname:"buxFilterConfigFilterValueTable"}); dojo.style(_1d06.domNode,"width","325px"); this.addSelectProcessTableHeader(_1d06); if(!this.BPMProcessesInfo||this.BPMProcessesInfo.length===0){ this.addEmptySelectProcessTableContent(_1d06); }else{ this.addSelectProcessTableContent(_1d06); } div.appendChild(_1d06.domNode); },addSelectProcessTableHeader:function(_1d07){ var _1d08=new bux.layout.TableContainerRow({classname:"buxFilterConfigFilterValueTableHeaderRow",parentContainer:_1d07}); var _1d09=new bux.layout.TableContainerCell({classname:"buxListHeader buxFilterConfigFilterValueTableHeaderLeft",width:"25px",parentContainer:_1d08}); var _1d0a=new bux.layout.TableContainerCell({classname:"buxListHeader buxFilterConfigFilterValueTableHeader",width:"300px",parentContainer:_1d08}); _1d0a.addContent(document.createTextNode(RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_TABLE_HEADER)); },addEmptySelectProcessTableContent:function(_1d0b){ var _1d0c=this.id+"_processItemsRow_label_none"; var _1d0d=new bux.layout.TableContainerRow({parentContainer:_1d0b}); dojo.attr(_1d0d.domNode,{id:this.id+"_processItemsRow_none","aria-labelledby":_1d0c,tabindex:0}); var _1d0e=this.createA11yLabel(RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_NO_PROCESS_A11Y,_1d0c,true); _1d0d.domNode.appendChild(_1d0e); var cell=new bux.layout.TableContainerCell({parentContainer:_1d0d}); cell.set("colspan",2); cell.addContent(this.createLabelElement(RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_NO_PROCESS)); },addSelectProcessTableContent:function(_1d10){ for(var i=0;i