/* *+------------------------------------------------------------------------+ *| 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 ViewerA11YHelper(_1){ this.m_oCV=_1; }; ViewerA11YHelper.prototype.onFocus=function(_2){ var _3=getCrossBrowserNode(_2); _3=ViewerA11YHelper.findChildOfTableCell(_3); this.updateCellAccessibility(_3,false); }; ViewerA11YHelper.prototype.onKeyDown=function(_4){ _4=(_4)?_4:((event)?event:null); var _5=getCrossBrowserNode(_4); if(ViewerA11YHelper.isTableCell(_5)){ for(var i=0;i<_5.childNodes.length;i++){ if(_5.childNodes[i].nodeName.toLowerCase()=="span"){ _5=_5.childNodes[i]; break; } } } if(!this.isValidNodeToSelect(_5)){ return true; } _5=ViewerA11YHelper.findChildOfTableCell(_5); if(_5){ if(_4.keyCode=="39"){ if(this.m_oCV.getState()&&this.m_oCV.getState().getFindState()&&_4.ctrlKey&&_4.shiftKey){ this.m_oCV.executeAction("FindNext"); }else{ this.moveRight(_5); } return stopEventBubble(_4); }else{ if(_4.keyCode=="37"){ this.moveLeft(_5); return stopEventBubble(_4); }else{ if(_4.keyCode=="38"){ this.moveUp(_5); return stopEventBubble(_4); }else{ if(_4.keyCode=="40"){ this.moveDown(_5); return stopEventBubble(_4); }else{ if(_4.keyCode=="13"){ if(this.m_oCV.isBux){ if(this.m_oCV.getViewerWidget().isSelectionFilterEnabled()){ this.m_oCV.getViewerWidget().preprocessPageClicked(false,_4); if(this.m_oCV.getSelectionController().pageClicked(_4)!==false){ this.m_oCV.JAWSTalk(RV_RES.IDS_JS_SELECTION_FILTER_INFO_JAWS); this.m_oCV.getViewerWidget().updateToolbar(); } }else{ this.m_oCV.getSelectionController().pageClicked(_4); var _7=this.m_oCV.getActionFactory().load("Selection"); _7.onKeyDown(_4); } this.m_oCV.getViewerWidget().onSelectionChange(); }else{ this.m_oCV.de(_4); } }else{ if(_4.keyCode=="32"){ if(this.m_oCV.isBux){ this.m_oCV.getViewerWidget().preprocessPageClicked(false); if(this.m_oCV.getSelectionController().pageClicked(_4)!==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(_4); } return stopEventBubble(_4); }else{ if(_4.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 _8=this.m_oCV.getActionFactory().load("Delete"); if(!this.m_oCV.isBlacklisted("Delete")&&_8.canDelete()){ _8.execute(); return stopEventBubble(_4); } } }else{ if(this.m_oCV.isBux&&_4.ctrlKey==true&&_4.shiftKey==true&&_4.keyCode=="49"){ var _9=this.m_oCV.getSelectionController().getSelectionObjectFactory().getLayoutElementId(_5); if(_9!=""){ _9=_9.split(this.m_oCV.getId())[0]; var _a=-1; var _b=this.m_oCV.getRAPReportInfo(); if(_b){ var _c=_b.getContainer(_9); if(typeof _c.layoutIndex!="undefined"){ _a=_c.layoutIndex; } } var _d=document.getElementById("infoBarHeaderButton"+_a+this.m_oCV.getId()); if(_d!==null){ this.m_oCV.setCurrentNodeFocus(getCrossBrowserNode(_4)); _d.focus(); } } return stopEventBubble(_4); }else{ if(!this.m_oCV.isBux&&_4.shiftKey==true&&_4.keyCode=="121"){ var _e=this.m_oCV; var _f=function(){ if(typeof _4.clientX=="undefined"||typeof _4.clientY=="undefined"){ var _10=clientToScreenCoords(_4.target,document.body); _4.clientX=_10.leftCoord; _4.clientY=_10.topCoord; } _e.dcm(_4,true); }; if(isFF()){ setTimeout(_f,0); }else{ _f.call(); } return stopEventBubble(_4); }else{ if(this.m_oCV.isBux&&(_4.keyCode=="93"||(_4.shiftKey==true&&_4.keyCode=="121"))){ var _11=this.m_oCV.getViewerWidget(); var _12=this.m_oCV.getSelectionController(); _11.preprocessPageClicked(true); _12.pageClicked(_4); _11.updateToolbar(); _11.onContextMenu(_4); } } } } } } } } } } } }; ViewerA11YHelper.prototype.isValidNodeToSelect=function(_13){ return this.getValidNodeToSelect(_13)?true:false; }; ViewerA11YHelper.prototype.getValidNodeToSelect=function(_14){ if(_14&&_14.style&&_14.style.visibility!="hidden"&&_14.style.display!="none"){ var _15=_14.nodeName.toLowerCase(); if((_15=="span"&&(!_14.getAttribute("class")||_14.getAttribute("class").indexOf("expandButton")===-1))||(_15=="div"&&_14.getAttribute("flashchartcontainer")=="true")||(_15=="div"&&_14.getAttribute("chartcontainer")=="true")||(_15=="img"&&(!_14.id||_14.id.indexOf("sortimg")!==0))){ return _14; } if(ViewerA11YHelper.isSemanticNode(_14)){ var _16=_14.childNodes&&_14.childNodes.length?_14.childNodes[0]:null; if(_16){ return this.getValidNodeToSelect(_16); } } } return null; }; ViewerA11YHelper.isSemanticNode=function(_17){ if(!ViewerA11YHelper.isSemanticNode._semanticNodeNames){ ViewerA11YHelper.isSemanticNode._semanticNodeNames=["strong","em","h1","h2","h3","h4","h5","h6"]; } var _18=_17.nodeName.toLowerCase(); for(var i=0;i1){ var _2e=_2b.rowSpan; for(var _2f=1;_2f<_2e;_2f++){ _2d=_2d.nextSibling; } } var _30=false; while(_2d){ if(_2d.nextSibling){ _2d=_2d.nextSibling; }else{ if(_2b.nextSibling&&!_30){ _2d=_2d.parentNode.firstChild; _30=true; _2c++; }else{ return false; } } if(this.doMoveUpDown(_2d,_2c)){ return true; } } return false; }; ViewerA11YHelper.prototype.moveUp=function(_31){ var _32=ViewerA11YHelper.getTableCell(_31); _32=this.getPfMainOutputCell(_32); var _33=_32.parentNode; var _34=this.getColumnIndex(_32); _34+=this.getColSpanFromRowSpans(_32); var _35=false; while(_33){ if(_33.previousSibling){ _33=_33.previousSibling; }else{ if(_32.previousSibling&&!_35){ _33=_33.parentNode.lastChild; _35=true; _34--; }else{ return false; } } if(this.doMoveUpDown(_33,_34)){ return true; } } return false; }; ViewerA11YHelper.prototype.getNextNonTextSibling=function(_36){ while(_36.nextSibling){ _36=_36.nextSibling; if(_36.nodeName.toLowerCase()!="#text"){ return _36; } } if(ViewerA11YHelper.isSemanticNode(_36.parentNode)){ return this.getNextNonTextSibling(_36.parentNode); } return null; }; ViewerA11YHelper.prototype.doMoveUpDown=function(_37,_38){ if(_37!=null){ var _39=_37.firstChild; var pos=this.getColSpanFromRowSpans(_39); while(_39){ if(pos==_38){ return this.moveToTDFromTheRight(_39); }else{ if(pos>_38){ break; } } var _3b=0; if(_39.colSpan){ _3b=_39.colSpan; }else{ _3b++; } pos+=_3b; _39=_39.nextSibling; } } }; ViewerA11YHelper.prototype.moveToTDFromTheRight=function(td){ td=this.getPfVisibleCell(td); var _3d=td.childNodes; for(var _3e=_3d.length-1;_3e>=0;_3e--){ var _3f=this.getValidNodeToSelect(_3d[_3e]); if(_3f){ if(_3f.childNodes&&_3f.childNodes[0]&&_3f.childNodes[0].nodeName.toLowerCase()=="span"){ _3f=_3f.childNodes[0]; } if(_3f.tabIndex!=-1&&_3f.tabIndex!=0){ _3f.tabIndex=-1; } this.setFocusToNode(_3f); return true; } } return false; }; ViewerA11YHelper.prototype.moveToTD=function(td){ td=this.getPfVisibleCell(td); var _41=td.childNodes; for(var _42=0;_42<_41.length;_42++){ var _43=this.getValidNodeToSelect(_41[_42]); if(_43){ if(_43.childNodes&&_43.childNodes[0]&&_43.childNodes[0].nodeName.toLowerCase()=="span"){ _43=_43.childNodes[0]; } if(_43.tabIndex!=-1&&_43.tabIndex!=0){ _43.tabIndex=-1; } this.setFocusToNode(_43); return true; } } return false; }; ViewerA11YHelper.prototype.setFocusToNode=function(_44){ this.m_oCV.setCurrentNodeFocus(_44); this.updateCellAccessibility(_44,false); _44.focus(); if(this.m_oCV.m_pinFreezeManager){ var _45=this.m_oCV.m_pinFreezeManager.nodeToContainer(_44); if(_45){ _45.updateScroll(_44); } } }; ViewerA11YHelper.prototype.getPfMainOutputCell=function(_46){ var _47=null; var _48=_46.getAttribute("pfslid"); if(_48){ var lid=PinFreezeContainer.getLidFromSlid(_48); if(lid&&this.m_oCV.m_pinFreezeManager){ lid=this.m_oCV.m_pinFreezeManager.removeNamespace(lid); var _4a=this.m_oCV.m_pinFreezeManager.getContainer(lid); if(_4a){ _47=_4a.getMain(_46); } } } return _47?_47:_46; }; ViewerA11YHelper.prototype.getPreviousNonTextSibling=function(_4b){ while(_4b.previousSibling){ _4b=_4b.previousSibling; if(_4b.nodeName.toLowerCase()!="#text"){ return _4b; } } if(ViewerA11YHelper.isSemanticNode(_4b.parentNode)){ return this.getPreviousNonTextSibling(_4b.parentNode); } return null; }; ViewerA11YHelper.prototype.getColumnIndex=function(_4c){ var _4d=0; while(_4c.previousSibling){ _4c=_4c.previousSibling; if(_4c.rowSpan==1){ if(_4c.colSpan){ _4d+=_4c.colSpan; }else{ _4d++; } } } return _4d; }; ViewerA11YHelper.prototype.getPfVisibleCell=function(_4e){ var _4f=null; var _50=_4e.getAttribute("pfslid"); if(_50){ var lid=PinFreezeContainer.getLidFromSlid(_50); if(lid&&this.m_oCV.m_pinFreezeManager){ lid=this.m_oCV.m_pinFreezeManager.removeNamespace(lid); var _52=this.m_oCV.m_pinFreezeManager.getContainer(lid); if(_52){ _4f=_52.getCopy(_4e); } } } return _4f?_4f:_4e; }; ViewerA11YHelper.prototype.updateCellAccessibility=function(_53,_54){ if(!_53){ return false; } var _55=false; var _56=false; var _57=false; var _58=_53.getAttribute("ctx")!=null?_53:_53.parentNode; if(_53.getAttribute("flashChartContainer")!="true"){ if(_58.getAttribute("ctx")!=null){ if(this.m_oCV.isBux){ var _59=this.m_oCV.getAction("DrillUpDown"); _59.updateDrillability(this.m_oCV,_58); _55=_59.canDrillDown(); _56=_59.canDrillUp(); }else{ var _5a=_58.getAttribute("ctx"); var _5b=_5a.indexOf(":")==-1?_5a:_5a.substring(0,_5a.indexOf(":")); var _5c=this.m_oCV.getSelectionController(); _55=_5c.canDrillDown(_5b); _56=_5c.canDrillUp(_5b); } } _57=_53.parentNode.getAttribute("dtTargets")?true:false; } var _5d=_53.nodeName.toLowerCase()=="img"; var _5e=_53.parentNode.getAttribute("type")=="columnTitle"; if(!_5d&&(_54||((_53.getAttribute("aria-labelledby")!=null||_5e||this.m_oCV.isAccessibleMode())))){ var _5f=""; if(_53.parentNode.getAttribute("cc")=="true"){ _5f+=" "+RV_RES.IDS_JS_CROSSTAB_CORNER; } if(_53.innerHTML.length===0){ _53.innerHTML=" "; _5f+=" "+RV_RES.IDS_JS_EMPTY_CELL; } if(_55&&_56){ _5f+=" "+RV_RES.IDS_JS_DRILL_DOWN_UP_JAWS; }else{ if(_55){ _5f+=" "+RV_RES.IDS_JS_DRILL_DOWN_JAWS; }else{ if(_56){ _5f+=" "+RV_RES.IDS_JS_DRILL_UP_JAWS; } } } if(_57){ _5f+=" "+RV_RES.IDS_JS_DRILL_THROUGH_JAWS; } if(_53.altText&&_53.altText.length>0){ _5f=_53.altText; }else{ if(_53.getAttribute("flashChartContainer")=="true"){ _5f=RV_RES.IDS_JS_CHART_IMAGE; } } if(this.m_oCV.isBux){ var _60=_53.previousSibling; if(_60){ var wid=_60.getAttribute("widgetid"); if(wid&&wid.indexOf("comment")){ _5f+=" "+RV_RES.IDS_JS_ANNOTATION_JAWS; } } if(_53.getAttribute("rp_name")||_53.parentNode.getAttribute("rp_name")){ _5f+=" "+RV_RES.IDS_JS_LABEL_HAS_BEEN_RENAMED; } if(_53.nextSibling&&_53.nextSibling.getAttribute("class")=="sortIconVisible"){ _5f+=" "+_53.nextSibling.getAttribute("alt"); } } if(_5f.length>0){ this.addAriaLabelledByOnCell(_53,_5f); } } if(_56||_55||_57){ this.addDrillAccessibilityAttributes(_53,_57); } if(_53.attachEvent){ _53.attachEvent("onblur",this.onBlur); }else{ _53.addEventListener("blur",this.onBlur,false); } if((isIE()&&_53.getAttribute("tabIndex")!=0)||_5d){ _53.setAttribute("modifiedTabIndex","true"); _53.setAttribute("oldTabIndex",_53.getAttribute("tabIndex")); _53.setAttribute("tabIndex",0); } }; ViewerA11YHelper.prototype.addAriaLabelledByOnCell=function(_62,_63){ var _64=0; var _65=_62; while(_65.previousSibling){ _64++; _65=_65.previousSibling; } var _66=_62.getAttribute("ariaHiddenSpanId"); if(_66&&document.getElementById(_66)){ document.getElementById(_66).innerHTML=_63; }else{ if(!_62.parentNode.id&&!_62.id){ _62.parentNode.id=Math.random(); } var _67=document.createElement("span"); _67.style.visibility="hidden"; _67.style.display="none"; _67.id=(_62.id==""?_62.parentNode.id:_62.id)+"_"+_64; _67.innerHTML=_63; _62.parentNode.appendChild(_67); var _68=""; if(_62.getAttribute("aria-labelledby")!=null){ _68+=_62.getAttribute("aria-labelledby"); }else{ if(_62.id==""){ _62.id=_62.parentNode.id+"_main_"+_64; } _68+=_62.id; } _68+=" "+_67.id; _62.setAttribute("aria-labelledby",_68); _62.setAttribute("ariaHiddenSpanId",_67.id); } }; ViewerA11YHelper.prototype.addDrillAccessibilityAttributes=function(_69,_6a){ if(!_69.getAttribute("oldClassName")){ if(!_6a){ _69.setAttribute("oldClassName",_69.className); _69.className="dl "+_69.className; } if(!_69.getAttribute("role")){ _69.setAttribute("role","link"); } } }; ViewerA11YHelper.prototype.onBlur=function(evt){ var _6c=null; if(isIE()){ _6c=getNodeFromEvent(evt,true); }else{ _6c=this; } _6c=ViewerA11YHelper.findChildOfTableCell(_6c); if(_6c){ if(_6c.getAttribute("oldClassName")){ _6c.className=_6c.getAttribute("oldClassName"); _6c.removeAttribute("oldClassName"); } if(_6c.getAttribute("modifiedTabIndex")=="true"){ _6c.removeAttribute("modifiedTabIndex"); _6c.removeAttribute("tabIndex"); if(_6c.getAttribute("oldTabIndex")){ _6c.setAttribute("tabIndex",_6c.getAttribute("oldTabIndex")); } _6c.removeAttribute("oldTabIndex"); } var _6d=_6c.getAttribute("ariaHiddenSpanId"); if(_6d){ var _6e=document.getElementById(_6d); if(_6e){ _6e.innerHTML=""; } } } }; ViewerA11YHelper.prototype.getColSpanFromRowSpans=function(_6f){ var _70=0; var _71=_6f.parentNode; var _72=0; while(_71){ var _73=_71.firstChild; var _74=this.getColumnCount(_71)-_72; while(_73&&_73.rowSpan>1&&_74>0&&_73!=_6f){ _70+=_73.colSpan; _73=_73.nextSibling; _74--; } if(_71.childNodes.length>_72){ _72=this.getColumnCount(_71); } _71=_71.previousSibling; } return _70; }; ViewerA11YHelper.prototype.getColumnCount=function(_75){ var _76=0; var _77=_75.firstChild; while(_77){ _76+=_77.colSpan; _77=_77.nextSibling; } return _76; }; ViewerA11YHelper.prototype.addLabelledByForItemsOutsideOfContainers=function(){ if(!this.m_oCV.isAccessibleMode()){ return; } var _78=document.getElementById("RVContent"+this.m_oCV.getId()); if(!_78){ return; } var _79=getElementsByAttribute(_78,"span","tabindex","0"); if(!_79){ return; } for(var i=0;i<_79.length;i++){ var _7b=_79[i]; this.updateCellAccessibility(_7b,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 _7d; try{ _7d=getCognosViewerSCObjectRef(this.getCV().getId()); } catch(e){ _7d=null; } return _7d; }; CDrillManager.prototype.getSelectedObject=function(){ var _7e=this.getSelectionController(); if(_7e==null){ return null; } var _7f=null; var _80=null; if(_7e.hasSelectedChartNodes()){ _80=_7e.getSelectedChartNodes(); }else{ _80=_7e.getSelections(); } if(_80&&_80.length==1){ _7f=_80[0]; } return _7f; }; 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(_81){ if(typeof _81=="undefined"){ _81=this.getSelectedObject(); } if(_81==null){ return false; } var _82=_81.getMuns(); var _83=""; for(var _84=0;_84<_82.length&&_83=="";++_84){ if(typeof _82[_84][0]!="undefined"){ _83+=_82[_84][0]; } } return (_83!=""); }; CDrillManager.prototype.getRefQuery=function(){ var _85=""; var _86=this.getSelectedObject(); if(_86==null){ return ""; } var _87=_86.getRefQueries(); for(var i=0;i<_87.length;i++){ if(_87[i]!=null){ for(var j=0;j<_87[i].length;j++){ if(_87[i][j]!=null&&_87[i][j]!=""){ return _87[i][j]; } } } } return _85; }; CDrillManager.prototype.isIsolated=function(){ var _8a=this.getSelectionController(); if(_8a==null||_8a.getDrillUpDownEnabled()==false){ return false; } var _8b=this.getSelectedObject(); if(_8b==null){ return false; } if(_8b instanceof CSelectionChartObject&&_8a!=null){ var _8c=_8b.getArea(); if(_8c!=null){ var _8d=_8c.getAttribute("isolated"); if(typeof _8d!="undefined"&&_8d!=null&&_8d=="true"){ return true; } } }else{ var _8e=_8b.getCellRef(); if(typeof _8e=="object"&&_8e!=null){ var _8f=_8e.getElementsByTagName("span"); if(_8f!=null&&typeof _8f!="undefined"&&_8f.length>0){ var _90=_8f[0].getAttribute("isolated"); if(_90!=null&&_90!="undefined"&&_90=="true"){ return true; } } } } return false; }; CDrillManager.prototype.getDrillOption=function(_91){ var _92=this.getSelectionController(); if(_92==null||_92.getDrillUpDownEnabled()==false||typeof _91=="undefined"){ return false; } var _93=this.getSelectedObject(); if(_93==null){ return false; } if(this.isIsolated()){ if(_91=="drillDown"){ return false; }else{ if(_91=="drillUp"){ return true; } } } if(_91=="drillDown"){ if(_93 instanceof CSelectionChartObject&&_92!=null){ var _94=_93.getArea(); if(_94!=null){ var _95=_94.getAttribute("isChartTitle"); if(typeof _95!="undefined"&&_95!=null&&_95=="true"){ return false; } } } } var _96=_93.getDrillOptions(); var _97=(typeof DrillContextMenuHelper!=="undefined"&&DrillContextMenuHelper.needsDrillSubMenu(this.m_oCV)); for(var idx=0;idx<_96.length;++idx){ var _99=(_97)?_96[idx].length:1; for(var _9a=0;_9a<_99;++_9a){ var _9b=_96[idx][_9a]; if(_9b=="3"){ return true; }else{ if(_91=="drillUp"&&_9b=="1"){ return true; }else{ if(_91=="drillDown"&&_9b=="2"){ return true; } } } } } return false; }; CDrillManager.prototype.canDrillThrough=function(){ var _9c=this.getSelectionController(); if(_9c==null||_9c.getModelDrillThroughEnabled()==false){ return false; } return true; }; CDrillManager.prototype.singleClickDrillEvent=function(evt,app){ var _9f=this.getSelectionController(); if(_9f!=null){ if(this.getCV().bCanUseCognosViewerSelection==true){ _9f.pageClicked(evt); } } var _a0=getCrossBrowserNode(evt); try{ if(_a0.className&&_a0.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(_a5,_a6,_a7,_a8){ var _a9=[]; var _aa=this.getSelectedObject(); if(_aa==null){ return _a9; } if(typeof _a6=="undefined"){ _a6=true; } var _ab=_aa.getDataItems(); var _ac=_aa.getMuns(); var _ad=_aa.getDimensionalItems("lun"); var _ae=_aa.getDimensionalItems("hun"); var _af=_aa.getDrillOptions(); if(typeof _ab=="undefined"||typeof _ac=="undefined"||typeof _af=="undefined"||_ac==null||_ab==null||_af==null){ return _a9; } if(_ac.length!=_ab.length){ return _a9; } var _b0=_ac.length; for(var _b1=0;_b1<_b0;++_b1){ if(_ab[_b1].length!=0){ var _b2=(_a8)?this.findUserSelectedDrillItem(_a8,_ab[_b1]):0; if(_b2<0){ continue; } if((_a7===true)||this.getDrillOption(_a5)){ if(_ac[_b1][_b2]==""||_a9.toString().indexOf(_ac[_b1][_b2],0)==-1){ _a9[_a9.length]=_ab[_b1][_b2]; _a9[_a9.length]=_ac[_b1][_b2]; if(_a6===true){ _a9[_a9.length]=_ad[_b1][_b2]; _a9[_a9.length]=_ae[_b1][_b2]; } } } } } return _a9; }; CDrillManager.prototype.findUserSelectedDrillItem=function(_b3,_b4){ for(var _b5=0;_b5<_b4.length;++_b5){ if(_b3==_b4[_b5]){ return _b5; } } return -1; }; CDrillManager.prototype.getModelDrillThroughContext=function(_b6){ var _b7=""; if(this.canDrillThrough()===true){ if(typeof gUseNewSelectionContext=="undefined"){ var _b8=""; if(typeof getConfigFrame!="undefined"){ _b8=decodeURIComponent(getConfigFrame().cfgGet("PackageBase")); }else{ if(this.getCV().getModelPath()!==""){ _b8=this.getCV().getModelPath(); } } _b7=getViewerSelectionContext(this.getSelectionController(),new CSelectionContext(_b8)); }else{ var _b9=new CParameterValues(); var _ba=this.getSelectionController(); if(_ba){ var _bb=_ba.getAllSelectedObjects(); for(var _bc=0;_bc<_bb.length;++_bc){ var _bd=_bb[_bc]; var _be=_bd.getMuns(); var _bf=_bd.getMetadataItems(); var _c0=_bd.getUseValues(); for(var _c1=0;_c1<_bf.length;++_c1){ for(var idx=0;idx<_bf[_c1].length;++idx){ if(_bf[_c1][idx]==null||_bf[_c1][idx]==""){ continue; } var _c3=_bf[_c1][idx]; var _c4; if(_be[_c1][idx]!=null&&_be[_c1][idx]!=""){ _c4=_be[_c1][idx]; }else{ _c4=_c0[_c1][idx]; } var _c5=_c0[_c1][idx]; _b9.addSimpleParmValueItem(_c3,_c4,_c5,"true"); } } } } var _c6=_b6.XMLBuilderCreateXMLDocument("context"); _b7=_b9.generateXML(_b6,_c6); } } return _b7; }; CDrillManager.prototype.rvDrillUp=function(_c7){ this.getCV().executeAction("DrillUp",_c7); }; CDrillManager.prototype.rvDrillDown=function(_c8){ this.getCV().executeAction("DrillDown",_c8); }; CDrillManager.prototype.rvBuildXMLDrillParameters=function(_c9,_ca){ var _cb=this.getDrillParameters(_c9,true,false,_ca); if(_cb.length==0){ return drillParams; } return this.buildDrillParametersSpecification(_cb); }; CDrillManager.prototype.buildDrillParametersSpecification=function(_cc){ var _cd=""; var idx=0; while(idx<_cc.length){ _cd+=""; _cd+=""; _cd+=sXmlEncode(_cc[idx++]); _cd+=""; _cd+=""; _cd+=sXmlEncode(_cc[idx++]); _cd+=""; _cd+=""; _cd+=sXmlEncode(_cc[idx++]); _cd+=""; _cd+=""; _cd+=sXmlEncode(_cc[idx++]); _cd+=""; _cd+=""; } _cd+=""; return _cd; }; CDrillManager.prototype.getAuthoredDrillsForCurrentSelection=function(){ var _cf=null; var _d0=this.getAuthoredDrillThroughTargets(); if(_d0.length>0){ var _d1=""; for(var _d2=0;_d2<_d0.length;++_d2){ _d1+=eval("\""+_d0[_d2]+"\""); } _d1+=""; var cv=this.getCV(); var _d4=cv.getAction("AuthoredDrill"); var _d5=cv.getDrillTargets(); if(_d5.length>0){ _cf=_d4.getAuthoredDrillThroughContext(_d1,_d5); } } return _cf; }; CDrillManager.prototype.getAuthoredDrillsForGotoPage=function(){ var _d6=""; var _d7=this.getAuthoredDrillsForCurrentSelection(); if(_d7){ _d6=XMLBuilderSerializeNode(_d7); } return _d6; }; CDrillManager.prototype.launchGoToPage=function(_d8,_d9){ var _da=this.getSelectionController(); if((_da!=null&&_da.getModelDrillThroughEnabled()==true)||(typeof _d8!="undefined"&&_d8!=null&&_d8!="")){ var _db=this.getAuthoredDrillsForGotoPage(); var _dc=this.getModelDrillThroughContext(self); var _dd=document.getElementById("drillForm"); if(_dd!=null){ document.body.removeChild(_dd); } _dd=document.createElement("form"); var _de=this.getCVId(); var _df=document.forms["formWarpRequest"+_de]; _dd.setAttribute("id","drillForm"); _dd.setAttribute("name","drillForm"); _dd.setAttribute("target",_df.getAttribute("target")); _dd.setAttribute("method","post"); _dd.setAttribute("action",_df.getAttribute("action")); _dd.style.display="none"; document.body.appendChild(_dd); if(this.getCV().getModelPath()!==""){ _dd.appendChild(createHiddenFormField("modelPath",this.getCV().getModelPath())); } if(typeof _df["ui.object"]!="undefined"&&_df["ui.object"].value!=""){ _dd.appendChild(createFormField("drillSource",_df["ui.object"].value)); }else{ if(typeof this.getCV().envParams["ui.spec"]!="undefined"){ _dd.appendChild(createFormField("sourceSpecification",this.getCV().envParams["ui.spec"])); } } if(_db!=""){ _dd.appendChild(createHiddenFormField("m","portal/drillthrough.xts")); _dd.appendChild(createFormField("invokeGotoPage","true")); _dd.appendChild(createFormField("m","portal/drillthrough.xts")); _dd.appendChild(createFormField("modelDrillEnabled",_da.getModelDrillThroughEnabled())); if(typeof gUseNewSelectionContext=="undefined"){ _dd.appendChild(createFormField("newSelectionContext","true")); } }else{ if(typeof gUseNewSelectionContext=="undefined"){ _dd.appendChild(createHiddenFormField("m","portal/goto2.xts")); }else{ _dd.appendChild(createHiddenFormField("m","portal/goto.xts")); } } _dd.appendChild(createHiddenFormField("b_action","xts.run")); _dd.appendChild(createHiddenFormField("drillTargets",_db)); if(typeof gUseNewSelectionContext=="undefined"){ _dd.appendChild(createHiddenFormField("drillContext",_dc)); }else{ _dd.appendChild(createHiddenFormField("modeledDrillthru",_dc)); } _dd.appendChild(createHiddenFormField("errURL","javascript:window.close();")); if(typeof _d9!="undefined"&&_d9==true){ _dd.appendChild(this.createFormField("directLaunch","true")); } var _e0=""; if(this.getCV().envParams["ui.routingServerGroup"]){ _e0=this.getCV().envParams["ui.routingServerGroup"]; } _dd.appendChild(createHiddenFormField("ui.routingServerGroup",_e0)); if(this.getCV().getExecutionParameters()!=""){ _dd.appendChild(createHiddenFormField("encExecutionParameters",this.getCV().getExecutionParameters())); } if(_df.lang&&_df.lang.value!=""){ _dd.appendChild(createHiddenFormField("lang",_df.lang.value)); } if(!this.getCV()||!this.getCV().launchGotoPageForIWidgetMobile(drillForm)){ if(typeof this.getCV().launchGotoPage==="function"){ this.getCV().launchGotoPage(_dd); }else{ var _e1="winNAT_"+(new Date()).getTime(); var _e2=this.getCV().getWebContentRoot()+"/rv/blankDrillWin.html?cv.id="+_de; window.open(_e2,_e1,"toolbar,location,status,menubar,resizable,scrollbars=1"); _dd.target=_e1; } } } }; CDrillManager.prototype.buildSearchPageXML=function(_e3,pkg,_e5,_e6,_e7,_e8,_e9){ var _ea=null; if(typeof _e3.XMLElement=="function"){ _ea=_e3.XMLBuilderCreateXMLDocument("cognosSearch"); _e3.XMLBuilderSetAttributeNodeNS(_ea.documentElement,"xmlns:cs","http://developer.cognos.com/schemas/cs/1/"); var _eb=_ea.createElement("package"); if(typeof pkg=="string"&&pkg!==""){ _eb.appendChild(_ea.createTextNode(pkg)); } _ea.documentElement.appendChild(_eb); var _ec=_ea.createElement("model"); if(typeof _e5=="string"&&_e5!==""){ _ec.appendChild(_ea.createTextNode(_e5)); } _ea.documentElement.appendChild(_ec); var _ed=_ea.createElement("selectedContext"); _e3.XMLBuilderSetAttributeNodeNS(_ed,"xmlns:xs","http://www.w3.org/2001/XMLSchema"); _e3.XMLBuilderSetAttributeNodeNS(_ed,"xmlns:bus","http://developer.cognos.com/schemas/bibus/3/"); _e3.XMLBuilderSetAttributeNodeNS(_ed,"SOAP-ENC:arrayType","bus:parameterValue[]","http://schemas.xmlsoap.org/soap/encoding/"); _e3.XMLBuilderSetAttributeNodeNS(_ed,"xmlns:xsd","http://www.w3.org/2001/XMLSchema"); _e3.XMLBuilderSetAttributeNodeNS(_ed,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance"); _ea.documentElement.appendChild(_ed); for(var _ee in _e6){ var _ef=_ea.createElement("item"); _e3.XMLBuilderSetAttributeNodeNS(_ef,"xsi:type","bus:parameterValue","http://www.w3.org/2001/XMLSchema-instance"); var _f0=_e3.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:name",_ea); _e3.XMLBuilderSetAttributeNodeNS(_f0,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance"); _f0.appendChild(_ea.createTextNode(_e6[_ee].name)); var _f1=_e3.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:value",_ea); _e3.XMLBuilderSetAttributeNodeNS(_f1,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance"); _e3.XMLBuilderSetAttributeNodeNS(_f1,"SOAP-ENC:arrayType","bus:parmValueItem[]","http://schemas.xmlsoap.org/soap/encoding/"); for(var j=0;j<_e6[_ee].values.length;j++){ var _f3=_ea.createElement("item"); _e3.XMLBuilderSetAttributeNodeNS(_f3,"xsi:type","bus:simpleParmValueItem","http://www.w3.org/2001/XMLSchema-instance"); var _f4=_e3.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:use",_ea); _e3.XMLBuilderSetAttributeNodeNS(_f4,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance"); _f4.appendChild(_ea.createTextNode(_e6[_ee].values[j][0])); var _f5=_e3.XMLBuilderCreateElementNS("http://developer.cognos.com/schemas/bibus/3/","bus:display",_ea); _e3.XMLBuilderSetAttributeNodeNS(_f5,"xsi:type","xs:string","http://www.w3.org/2001/XMLSchema-instance"); var _f6=_e6[_ee].values[j][1]==null?"":_e6[_ee].values[j][1]; _f5.appendChild(_ea.createTextNode(_f6)); _f3.appendChild(_f4); _f3.appendChild(_f5); _f1.appendChild(_f3); } _ef.appendChild(_f0); _ef.appendChild(_f1); _ed.appendChild(_ef); } var _f7=_ea.createElement("defaultMeasure"); _ea.documentElement.appendChild(_f7); _e8.buildXML(_e3,_ea,"data"); var _f8=_ea.createElement("filter"); _ea.documentElement.appendChild(_f8); } return _ea; }; CDrillManager.prototype.openSearchPage=function(_f9,_fa){ this.getModelDrillThroughContext(self); var _fb=document.getElementById("searchPage"); if(_fb!=null){ document.body.removeChild(_fb); } _fb=document.createElement("form"); _fb.setAttribute("id","searchPage"); _fb.setAttribute("name","searchPage"); _fb.setAttribute("method","post"); _fb.setAttribute("target",_fb.name); _fb.setAttribute("action",this.getCV().getGateway()+"/gosearch"); _fb.style.display="none"; document.body.appendChild(_fb); _fb.appendChild(createHiddenFormField("csn.action","search")); _fb.appendChild(createHiddenFormField("csn.drill",_fa)); var _fc=window.open("",_fb.name,"directories=no,location=no,status=no,toolbar=no,resizable=yes,scrollbars=yes,top=100,left=100,height=480,width=640"); _fc.focus(); _fb.submit(); }; CDrillManager.prototype.launchSearchPage=function(){ var _fd=this.getSelectionController(); var _fe=document.forms["formWarpRequest"+this.getCVId()]; var _ff=this.determineSelectionsForSearchPage(_fd); var _100=this.getSearchContextDataSpecfication(_fd); var _101=this.buildSearchPageXML(self,_fe.packageBase.value,this.getCV().getModelPath(),_ff,[],_100,[]); this.openSearchPage(_fe.packageBase.value,XMLBuilderSerializeNode(_101)); }; CDrillManager.prototype.qsDrillDown=function(){ if(!this.canDrillDown()){ getConfigFrame().dlgGenericSelectionMessage(false); return; } var _102="DD:"; this.qsSendDrillCommand(_102); }; CDrillManager.prototype.qsDrillUp=function(){ if(!this.canDrillUp()){ getConfigFrame().dlgGenericSelectionMessage(false); return; } var _103="DU:"; this.qsSendDrillCommand(_103); }; CDrillManager.prototype.qsSendDrillCommand=function(_104){ var _105; if(_104=="DU:"){ _105="drillUp"; }else{ _105="drillDown"; } var _106=this.getDrillParameters(_105,false,false); if(_106.length==0){ getConfigFrame().dlgGenericSelectionMessage(false); return; } for(var idx=0;idx<_106.length;++idx){ _104+=getConfigFrame().escapeParam(_106[idx]); if(idx+1<_106.length){ _104+=","; } } getConfigFrame().sendCmd(_104,"",true); }; CDrillManager.prototype.qsLaunchGoToPage=function(_108){ var _109=this.getSelectionController(); if(_109!=null&&_109.getModelDrillThroughEnabled()==true){ var _10a=this.getModelDrillThroughContext(cf); if(_10a==""){ getConfigFrame().dlgGenericSelectionMessage(false); return; } var _10b=document.getElementById("gotoPage"); if(_10b!=null){ document.body.removeChild(_10b); } _10b=document.createElement("form"); _10b.setAttribute("id","gotoPage"); _10b.setAttribute("name","gotoPage"); _10b.setAttribute("method","post"); _10b.style.display="none"; document.body.appendChild(_10b); var _10c=getConfigFrame(); _10b.appendChild(this.createFormField("objpath",decodeURIComponent(_10c.cfgGet("PackageBase")))); if(typeof gUseNewSelectionContext=="undefined"){ _10b.appendChild(this.createFormField("m","portal/goto2.xts")); }else{ _10b.appendChild(this.createFormField("m","portal/goto.xts")); } _10b.appendChild(this.createFormField("b_action","xts.run")); if(typeof gUseNewSelectionContext=="undefined"){ _10b.appendChild(this.createFormField("drillContext",_10a)); }else{ _10b.appendChild(this.createFormField("modeledDrillthru",_10a)); } if(typeof getConfigFrame().routingServerGroup!="undefined"){ _10b.appendChild(this.createFormField("ui.routingServerGroup",getConfigFrame().routingServerGroup)); } if(typeof _108!="undefined"&&_108==true){ _10b.appendChild(this.createFormField("directLaunch","true")); } var _10d=_10c.goApplicationManager.getReportManager().getParameterManager().getExecutionParameters(); if(_10d){ _10b.appendChild(this.createFormField("encExecutionParameters",_10d)); } var _10e="winNAT_"+(new Date()).getTime(); var _10f=this.getCV().getWebContentRoot()+"/rv/blankDrillWin.html?cv.id="+this.getCVId(); window.open(_10f,_10e,"toolbar,location,status,menubar,resizable,scrollbars=1"); _10b.target=_10e; } }; CDrillManager.prototype.qsLaunchSearchPage=function(){ var cf=getConfigFrame(); var _111=goWindowManager.getSelectionController(); var _112=this.determineSelectionsForSearchPage(_111); var _113=this.getSearchContextDataSpecfication(_111); var _114=decodeURIComponent(cf.cfgGet("PackageBase")); var _115=this.buildSearchPageXML(cf,_114,decodeURIComponent(cf.cfgGet("cmLastModel")),_112,[],_113,[]); this.openSearchPage(_114,cf.XMLBuilderSerializeNode(_115)); }; CDrillManager.prototype.determineSelectionsForSearchPage=function(_116){ var _117=new CtxArrayPlaceHolder(); var _118=_116.getAllSelectedObjects(); for(var i=0;i<_118.length;i++){ var _11a=_118[i].getColumnName(); if(!this.containsByIndiceInArray(_117,_11a)){ _117[_11a]={}; _117[_11a].name=_11a; _117[_11a].values=[]; } var idx0=""; var muns=_118[i].getMuns(); if(muns!=null&&muns.length>0){ idx0=muns[0][0]; } var idx1=_118[i].getDisplayValues()[0]; if(!(this.containsInArray(_117[_11a].values,0,idx0)&&this.containsInArray(_117[_11a].values,1,idx1))){ _117[_11a].values[_117[_11a].values.length]=[idx0,idx1]; } } return _117; }; CDrillManager.prototype.getSearchContextDataSpecfication=function(_11e){ var _11f=new CParameterValues(); var _120=_11e.getCCDManager(); var _121=_120.m_cd; for(var _122 in _121){ var _123=_120.GetUsage(_122); if(_123!="2"){ var _124=_120.GetRDIValue(_122); var _125=_120.GetDisplayValue(_122); _11f.addSimpleParmValueItem(_124,_124,_125,"true"); } } return _11f; }; 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,_12e){ var _12f=document.createElement("input"); _12f.setAttribute("type","hidden"); _12f.setAttribute("name",name); _12f.setAttribute("value",_12e); return (_12f); }; CDrillManager.prototype.getAuthoredDrillThroughTargets=function(){ var _130=[]; var _131=this.getSelectionController(); var _132=null; if(_131!=null){ if(_131.getSelectedColumnIds().length==1){ var _133=_131.getSelections(); for(var _134=0;_134<_133.length;++_134){ var _135=_133[_134]; _132=_135.getCellRef(); while(_132){ if(_132.getAttribute("dtTargets")!=null){ _130.push(""+_132.getAttribute("dtTargets")+""); break; }else{ if(_132.getAttribute("onclick")!=null){ var _136=_132.getAttribute("onclick"); var _137=null; if(_136.indexOf("doSingleDrillThrough")!=-1){ _137=_136.replace("doSingleDrillThrough","this.buildRvTargetsForSingleDrillThrough"); }else{ if(_136.indexOf("doMultipleDrillThrough")!=-1){ _137=_136.replace("doMultipleDrillThrough","this.buildRvTargetsForMultipleDrillThrough"); } } if(_137!=null){ var _138=eval(_137); if(_138!=null){ _130.push(_138); break; } } } } _132=XMLHelper_GetFirstChildElement(_132); } } }else{ if(_131.hasSelectedChartNodes()){ var _139=_131.getSelectedChartNodes(); var _13a=_139[0]; _132=_13a.getArea(); if(_132.getAttribute("dtTargets")!=null){ _130.push(""+_132.getAttribute("dtTargets")+""); } }else{ if(_131.getSelectedDrillThroughImage()!=null){ var _13b=_131.getSelectedDrillThroughImage(); if(_13b&&_13b.getAttribute("dtTargets")!=null){ _130.push(""+_13b.getAttribute("dtTargets")+""); } }else{ if(_131.getSelectDrillThroughSingleton()!=null){ var _13c=_131.getSelectDrillThroughSingleton(); if(_13c&&_13c.getAttribute("dtTargets")!=null){ _130.push(""+_13c.getAttribute("dtTargets")+""); } } } } } } return _130; }; CDrillManager.prototype.getDrillThroughParameters=function(_13d,evt){ if(typeof _13d=="undefined"){ _13d="query"; } var _13f=[]; if(typeof evt!="undefined"){ var _140=getCrossBrowserNode(evt,true); try{ while(_140){ if(typeof _140.getAttribute!="undefined"&&_140.getAttribute("dtTargets")){ _13f.push(""+_140.getAttribute("dtTargets")+""); break; } _140=_140.parentNode; } } catch(e){ return false; } }else{ var oCV=this.getCV(); var _142=oCV.getDrillMgr(); var _143=_142.getSelectionController(); if(_143!=null){ var _144=null; if(_143.hasSelectedChartNodes()){ var _145=_143.getSelectedChartNodes(); var _146=_145[0]; _144=_146.getArea(); } if(_144!=null){ _13f.push(""+_144.getAttribute("dtTargets")+""); }else{ _13f=this.getAuthoredDrillThroughTargets(); } } } if(_13f.length>0){ var _147=""; for(var _148=0;_148<_13f.length;++_148){ _147+=eval("\""+_13f[_148]+"\""); } _147+=""; var _149=this.getCV().getAction("AuthoredDrill"); if(_13d=="query"){ _149.populateContextMenu(_147); this.showOtherMenuItems(); }else{ if(this.getCV().envParams["cv.id"]=="AA"){ this.getCV().m_viewerFragment.raiseAuthoredDrillClickEvent(); }else{ _149.execute(_147); } } return true; }else{ if(_13d=="query"){ this.showOtherMenuItems(); return true; }else{ return false; } } }; CDrillManager.prototype.executeAuthoredDrill=function(_14a){ var _14b=decodeURIComponent(_14a); var _14c=this.getCV().getAction("AuthoredDrill"); _14c.executeDrillTarget(_14b); }; CDrillManager.prototype.doesMoreExist=function(_14d){ for(var i=0;i<_14d.getNumItems();i++){ var _14f=_14d.get(i); if(_14f!=null){ if((_14f instanceof CMenuItem)&&(_14f.getLabel()==RV_RES.RV_MORE)&&(_14f.getAction()==this.getCVObjectRef()+".getDrillMgr().launchGoToPage();")){ return true; } } } return false; }; CDrillManager.prototype.showOtherMenuItems=function(){ var cv=this.getCV(); var _151=cv.rvMainWnd; var _152=_151.getToolbarControl(); var _153=null; var _154=null; if(typeof _152!="undefined"&&_152!=null){ _153=_152.getItem("goto"); if(_153){ _154=_153.getMenu(); } } var _155=_151.getContextMenu(); var _156=_151.getUIHide(); var _157=null; if(typeof _155!="undefined"&&_155!=null&&_155.getGoToMenuItem()){ _157=_155.getGoToMenuItem().getMenu(); } var _158=null; var _159=this.getSelectionController(); if(_154!=null){ if(this.doesMoreExist(_154)==false){ if(typeof gMenuSeperator!="undefined"&&_154.getNumItems()>0&&(cv.bCanUseCognosViewerIndexSearch||_156.indexOf(" RV_TOOLBAR_BUTTONS_GOTO_RELATED_LINKS ")==-1)){ _154.add(gMenuSeperator); } var _15a=new CMenuItem(_154,RV_RES.RV_MORE,this.getCVObjectRef()+".getDrillMgr().launchGoToPage();","",gMenuItemStyle,cv.getWebContentRoot(),cv.getSkin()); if(_156.indexOf(" RV_TOOLBAR_BUTTONS_GOTO_RELATED_LINKS ")!=-1){ _15a.hide(); }else{ if(_159==null||_159.getModelDrillThroughEnabled()==false){ _15a.disable(); } } } } if(_157!=null){ if(typeof gMenuSeperator!="undefined"&&_157.getNumItems()>0&&(cv.bCanUseCognosViewerIndexSearch||_156.indexOf(" RV_CONTEXT_MENU_GOTO_RELATED_LINKS ")==-1)){ _157.add(gMenuSeperator); } var _15b=new CMenuItem(_157,RV_RES.RV_MORE,this.getCVObjectRef()+".getDrillMgr().launchGoToPage();","",gMenuItemStyle,cv.getWebContentRoot(),cv.getSkin()); if(_156.indexOf(" RV_CONTEXT_MENU_GOTO_RELATED_LINKS ")!=-1){ _15b.hide(); }else{ if(_159==null||_159.getModelDrillThroughEnabled()==false){ _15b.disable(); } } } if(_158!=null&&_159!=null){ var _15c=_159.getAllSelectedObjects(); if(_15c==null||_15c.length===0){ _158.disable(); } } if(_154!=null){ _154.draw(); if(_154.isVisible()){ _154.show(); } } if(_157!=null){ _157.draw(); if(_157.isVisible()){ _157.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 _15f=this.getSelectionController(); if(_15f!=null){ var _160=_15f.getSelectionObjectFactory().getSelectionChartObject(node); if(_160!=null){ var _161=_160.getDrillOptions(); for(var idx=0;idx<_161.length;++idx){ var _163=_161[idx][0]; if((node.getAttribute("isChartTitle")==="true"&&_163=="1")||_163=="3"||_163=="2"){ node.className="dl "+node.className; node.setAttribute("href","#"); break; } } } } } }; CDrillManager.prototype.buildRvTargetsForSingleDrillThrough=function(_164){ if(typeof _164=="undefined"||_164==null){ return null; } var _165=this.getCV().getDrillTargets(); if(!_165||_165.length==0){ return null; } var _166=_164[0][0]; if(typeof _166=="undefined"||_166==null){ return null; } var _167=_165[_166]; if(typeof _167=="undefined"||_167==null){ return null; } var _168=""; return ""+_168+""; }; CDrillManager.prototype.buildRvTargetsForMultipleDrillThrough=function(_169){ if(typeof _169=="undefined"||_169==null){ return null; } var _16a=this.getCV().getDrillTargets(); if(!_16a||_16a.length==0){ return null; } var _16b=""; for(var _16c=0;_16c<_169.length;++_16c){ var _16d=_169[_16c]; if(_16d.length<2){ continue; } var _16e=_16d[0]; if(typeof _16e=="undefined"||_16e==null){ continue; } var _16f=_16d[1]; if(typeof _16f=="undefined"||_16f==null){ continue; } var _170=_16a[_16e]; if(typeof _170=="undefined"||_170==null){ continue; } if(_16f===null||_16f===""){ _16f=_170.getLabel(); } _16b+=""; } if(_16b.length>0){ return ""+_16b+""; } return null; }; function CImageMapHighlight(map,_172){ this.m_webContentRoot=_172; 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(_174){ this.m_sFillColour=(!_174)?this.m_sDefaultFillColour:_174; }; CImageMapHighlight.prototype.getFillColour=function(){ return this.m_sFillColour; }; CImageMapHighlight.prototype.setStrokeColour=function(_175){ this.m_sStrokeColour=(!_175)?this.m_sDefaultStrokeColour:_175; }; 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 _178=null; var _179=null; var _17a=map.nextSibling; while(_17a){ if(_17a.tagName=="DIV"){ var _17b=_17a.firstChild; while(_17b){ if((_17b.tagName=="SPAN"||_17b.tagName=="DIV")&&_17b.getAttribute("chartcontainer")=="true"){ _179=_17b; break; } _17b=_17b.nextSibling; } } if(_179){ break; } _17a=_17a.nextSibling; } if(_179){ var _17c=_179.children; var _17d=_17c.length; for(var i=0;i<_17d;i++){ var el=_17c[i]; if(el.tagName=="IMG"&&el.getAttribute("rsvpchart")=="true"&&el.getAttribute("usemap")=="#"+map.name){ _178=el; break; } } } return _178; }; CImageMapHighlight.prototype._AREA_ID="aid"; CImageMapHighlight.prototype._setMapAreasId=function(){ var _180=this.m_map.getAttribute("lid")+"_"; var _181=this.m_map.childNodes; var _182=_181.length; for(var i=0;i<_182;i++){ var a=_181[i]; var id=_180+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 _188=area.getAttribute(this._AREA_ID); if(_188===null){ this.initialize(area.parentNode); _188=area.getAttribute(this._AREA_ID); } return _188+this.getFillColour(); }; CImageMapHighlight.prototype.getAreaFromId=function(_189){ return this.m_areaNodes[_189]; }; CImageMapHighlight.prototype.highlightArea=function(area,_18b){ var _18c=this.getAreaId(area); if(!_18b){ var _18d=this.m_visibleAreas; var _18e=_18d.length; for(var i=0;i<_18e;i++){ if(_18c!=_18d[i]){ this.hideAreaById(_18d[i]); } } this.m_visibleAreas=[]; } this._highlightArea(area); }; CImageMapHighlight.prototype.highlightAreas=function(_190,_191){ if(!_191){ this.hideAllAreas(); } this._highlightAreas(_190); }; CImageMapHighlight.prototype._highlightAreas=function(_192){ var _193=_192.length; for(var i=0;i<_193;i++){ this._highlightArea(_192[i]); } }; CImageMapHighlight.prototype._highlightArea=function(area){ var _196=this.getAreaId(area); if(!this.highlightAreaExists(_196)){ var _197=this.createHighlight(area); if(_197){ this.m_areas[_196]=_197; _197.style.visibility="visible"; area.setAttribute("highlighted","true"); } }else{ if(this.m_areas[_196].style.visibility=="hidden"){ this.m_areas[_196].style.visibility="visible"; area.setAttribute("highlighted","true"); } } this.m_visibleAreas.push(_196); }; CImageMapHighlight.prototype.highlightAreaExists=function(_198){ return this.m_areas[_198]?true:false; }; CImageMapHighlight.prototype.hideAreaById=function(_199){ if(this.m_areas[_199]&&this.m_areas[_199].style.visibility){ this.m_areas[_199].style.visibility="hidden"; } }; CImageMapHighlight.prototype.hideAreas=function(_19a){ var _19b=_19a.length; for(var i=0;i<_19b;i++){ this.hideArea(_19a[i]); } }; CImageMapHighlight.prototype.hideArea=function(area){ this.hideAreaById(this.getAreaId(area)); area.setAttribute("highlighted","false"); }; CImageMapHighlight.prototype.hideAllAreas=function(){ var _19e=this.m_visibleAreas; var _19f=_19e.length; for(var i=0;i<_19f;i++){ this.hideAreaById(_19e[i]); var _1a1=this.getAreaFromId(_19e[i]); if(_1a1){ _1a1.setAttribute("highlighted","false"); } } this.m_visibleAreas=[]; }; CImageMapHighlight.prototype.isAreaHighlighted=function(area){ var _1a3=this.getAreaId(area); return this.m_areas[_1a3]&&this.m_areas[_1a3].style.visibility=="visible"; }; CImageMapHighlight.prototype.removeAreaHighlights=function(_1a4){ }; CImageMapHighlight.prototype.removeAllAreaHighlights=function(){ }; CImageMapHighlight.prototype.destroy=function(area){ this.removeAllAreaHighlights(); }; CImageMapHighlight.prototype.createHighlightElement=function(_1a6,_1a7){ var doc=_1a6.ownerDocument; if(!this.m_divCanvas){ for(var _1a9=this.m_img.parentNode;_1a9;_1a9=_1a9.parentNode){ if((_1a9.nodeName=="DIV")&&(_1a9.getAttribute("sSpecName")=="block")){ var _1aa=doc.defaultView.getComputedStyle(_1a9,null); var _1ab=_1aa.overflow; if((_1ab=="auto")||(_1ab=="scroll")&&(_1aa.position!="relative")){ _1a9.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 _1ac=doc.createElementNS("http://www.w3.org/2000/svg","polyline"); var _1ad=_1a6.getAttribute("coords"); _1ac.setAttribute("points",_1a6.getAttribute("coords")+" "+_1ad.substr(0,_1ad.indexOf(",",_1ad.indexOf(",")+1))); _1ac.style.position="absolute"; _1ac.style.top="0px"; _1ac.style.left="0px"; _1ac.style.visibility="hidden"; _1ac.setAttribute("stroke",_1a7?"#F7CB83":this.getStrokeColour()); _1ac.setAttribute("stroke-width",(_1a6.getAttribute("type")=="legendLabel")?"1pt":"1.75pt"); _1ac.setAttribute("fill",_1a7?"#F7E1BC":this.getFillColour()); _1ac.setAttribute("fill-opacity","0.4"); this.m_divCanvas.appendChild(_1ac); return _1ac; }; CImageMapHighlight.prototype.f_copyStyle=function(_1ae,_1af){ var a=["margin","marginTop","marginRight","marginBottom","marginLeft","border","borderTop","borderRight","borderBottom","borderLeft"]; var _1b1=a.length; for(var i=0;i<_1b1;i++){ var _1b3=a[i]; var _1b4=_1ae.style[_1b3]; if(_1b4){ _1af.style[_1b3]=_1b4; } } }; function CSelectionXml(_1b5,_1b6,_1b7){ this.queries={}; this.burstContext=_1b5||""; this.expressionLocale=_1b6||""; this.contentLocale=_1b7||""; }; 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 _1b9=sc.getAllSelectedObjects(); for(var s=0;s<_1b9.length;++s){ var _1bb=_1b9[s]; var _1bc=_1bb.getSelectedContextIds(); var muns=_1bb.getMuns(); var _1be=muns.length; var _1bf=new SC_SingleSelection(); _1bf.layoutElementId=_1bb.getLayoutElementId(); var _1c0=null; for(var i=0;i<_1be;++i){ var j,_1c3,_1c4; if(i===0&&_1be===1){ for(j=0;j0){ var _217=this.CanModifyWatchRule(); for(var sub=0;sub0){ _21f.add(gMenuSeperator); } if(!this.m_bAllowAnnotations||!this.m_bCanCreateAnnotations){ menu.disable(); } var _222; var bidi=isViewerBidiEnabled()?BidiUtils.getInstance():null; for(var i=0;i<_221;i++){ var _225=this.m_annotations[i].defaultName; _222=_225.length>60?_225.substring(0,60)+"...":_225; if(isViewerBidiEnabled()){ _222=bidi.btdInjectUCCIntoStr(_222,getViewerBaseTextDirection()); } var _226=Boolean(this.m_annotations[i].permissions.read); var _227=Boolean(this.m_annotations[i].permissions.write); var _228=Boolean(this.m_annotations[i].permissions.traverse)&&Boolean(this.m_annotations[i].permissions.write); var _229="javascript:"+this.m_cv.getObjectId()+".getSubscriptionManager().ViewAnnotation("+i+");"; var _22a="javascript:alert('Permission denied')"; _229=_226?_229:_22a; if(i>0&&this.m_annotations[i].layoutElementId!=this.m_annotations[i-1].layoutElementId){ _21f.add(gMenuSeperator); } var _22b="/rv/images/action_comment.gif"; if(this.m_annotations[i].layoutElementId!=""){ _22b="/rv/images/action_subscribe.gif"; } menu=new CMenuItem(_21f,_222,_229,_21d+_22b,gMenuItemStyle,_21d,_21e); var _22c=menu.createCascadedMenu(gMenuStyle); var _22d=new CInfoPanel("300px",_21d,_22c.getId()+"_comments"); _22d.setParent(_22c); _225=this.m_annotations[i].defaultName; var _22e=_225.length>60?_225.substring(0,60)+"...":_225; if(isViewerBidiEnabled()){ _22e=bidi.btdInjectUCCIntoStr(_22e,getViewerBaseTextDirection()); } _22d.addProperty(RV_RES.RV_VIEW_COMMENT_NAME,html_encode(_22e)); _22d.addSpacer(4); var cmnt=this.m_annotations[i].description; var _230=cmnt.length>590?cmnt.substring(0,590)+"...":cmnt; if(isViewerBidiEnabled()){ _230=bidi.btdInjectUCCIntoStr(_230,getViewerBaseTextDirection()); } _22d.addProperty(RV_RES.RV_VIEW_COMMENT_CONTENTS,replaceNewLine(html_encode(_230))); _22d.addSpacer(4); var _231=this.m_annotations[i].modificationTime; if(isViewerBidiEnabled()){ _231=bidi.btdInjectUCCIntoStr(_231,getViewerBaseTextDirection()); } _22d.addProperty(RV_RES.RV_VIEW_COMMENT_MODTIME,_231); var _232=this.m_annotations[i].owner.defaultName; if(isViewerBidiEnabled()){ _232=bidi.btdInjectUCCIntoStr(_232,getViewerBaseTextDirection()); } _22d.addProperty(RV_RES.RV_VIEW_COMMENT_OWNER,_232); _22c.add(_22d); if(_227||_228){ _22c.add(gMenuSeperator); } new CMenuItem(_22c,RV_RES.RV_VIEW_COMMENT,this.m_cv.getObjectId()+".getSubscriptionManager().ViewAnnotation("+i+");",_21d+"/rv/images/action_comment_view.gif",gMenuItemStyle,_21d,_21e); if(_227){ new CMenuItem(_22c,RV_RES.RV_MODIFY_WATCH_RULE,this.m_cv.getObjectId()+".getSubscriptionManager().ModifyAnnotation("+i+");",_21d+"/rv/images/action_comment_modify.gif",gMenuItemStyle,_21d,_21e); } if(_228){ new CMenuItem(_22c,RV_RES.RV_DELETE_WATCH_RULE,this.m_cv.getObjectId()+".getSubscriptionManager().DeleteAnnotation("+i+");",_21d+"/rv/images/action_comment_delete.gif",gMenuItemStyle,_21d,_21e); } } _21f.setForceCallback(false); _21f.draw(); if(_21f.isVisible()){ _21f.show(); } _21f.setForceCallback(true); }; CSubscriptionManager.prototype.AddNotification=function(){ alert(this.m_sAlertNewVersionConfirm); var oCV=this.getViewer(); var _234=new DataDispatcherEntry(oCV); _234.setKey("subscriptionManager"); _234.addFormField("ui.action","addNotification"); _234.addFormField("cv.responseFormat","data"); this.addCommonFormFields(_234); oCV.dispatchRequest(_234); }; CSubscriptionManager.prototype.DeleteNotification=function(){ alert(RV_RES.RV_DO_NOT_ALERT_NEW_VERSION_CONFIRM); var oCV=this.getViewer(); var _236=new DataDispatcherEntry(oCV); _236.setKey("subscriptionManager"); _236.addFormField("ui.action","deleteNotification"); _236.addFormField("cv.responseFormat","data"); this.addCommonFormFields(_236); oCV.dispatchRequest(_236); }; CSubscriptionManager.prototype.NewAnnotation=function(){ var oFWR=document.forms["formWarpRequest"+this.m_cv.getId()]; var _238=oFWR["ui.object"].value; var form=GUtil.createHiddenForm("subscriptionForm","post",this.m_cv.getId(),CSubscriptionManager.k_SubscriptionWizardName); GUtil.createFormField(form,"ui.object",_238); 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 _23a=this.m_cv.getWebContentRoot()+"/rv/blankSubscriptionWin.html?cv.id="+this.m_cv.getId(); window.open(_23a,form.target,this.m_windowOptions); }; CSubscriptionManager.prototype.ViewAnnotation=function(idx){ var sub=this.m_annotations[idx]; var _23d=sub.searchPath; var form=GUtil.createHiddenForm("subscriptionForm","post",this.m_cv.getId(),CSubscriptionManager.k_SubscriptionWizardName); GUtil.createFormField(form,"ui.object",_23d); GUtil.createFormField(form,"b_action","xts.run"); GUtil.createFormField(form,"m","rv/annotation1.xts"); GUtil.createFormField(form,"backURL","javascript:window.close();"); var _23f=this.m_cv.getWebContentRoot()+"/rv/blankSubscriptionWin.html?cv.id="+this.m_cv.getId(); window.open(_23f,form.target,this.m_windowOptions); }; CSubscriptionManager.prototype.ModifyAnnotation=function(idx){ var sub=this.m_annotations[idx]; var _242=this.m_annotations[idx].searchPath; if(sub&&_242){ var form=GUtil.createHiddenForm("subscriptionForm","post",this.m_cv.getId(),CSubscriptionManager.k_SubscriptionWizardName); GUtil.createFormField(form,"ui.object",_242); 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 _244=this.m_cv.getWebContentRoot()+"/rv/blankSubscriptionWin.html?cv.id="+this.m_cv.getId(); window.open(_244,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 _248=new DataDispatcherEntry(oCV); _248.setKey("subscriptionManager"); _248.addFormField("ui.action","deleteAnnotation"); _248.addFormField("cv.responseFormat","data"); this.addCommonFormFields(_248,sub.searchPath); oCV.dispatchRequest(_248); } }; CSubscriptionManager.prototype.NewSubscription=function(){ var sc=this.m_cv.getSelectionController(); var oFWR=document.forms["formWarpRequest"+this.m_cv.getId()]; var _24b=oFWR.reRunObj.value; if(_24b&&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 _24e=new CSelectionXml(fWR["ui.burstID"].value,fWR["ui.contentLocale"].value,fWR["ui.outputLocale"].value); _24e.BuildSelectionFromController(sc); GUtil.createFormField(form,"rv.selectionSpecXML",_24e.toXml()); GUtil.createFormField(form,"rv.periodicalProducer",_24b); GUtil.createFormField(form,"b_action","xts.run"); GUtil.createFormField(form,"m","subscribe/conditional_subscribe1.xts"); GUtil.createFormField(form,"backURL","javascript:window.close();"); var _24f=this.m_cv.getWebContentRoot()+"/rv/blankSubscriptionWin.html?cv.id="+this.m_cv.getId(); window.open(_24f,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 _253=new DataDispatcherEntry(oCV); _253.setKey("subscriptionManager"); _253.addFormField("ui.action","deleteSubscription"); _253.addFormField("cv.responseFormat","data"); this.addCommonFormFields(_253,sub.searchPath); oCV.dispatchRequest(_253); } }; 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 _257=this.m_cv.getWebContentRoot()+"/rv/blankSubscriptionWin.html?cv.id="+this.m_cv.getId(); window.open(_257,form.target,"toolbar,location,status,menubar,resizable,scrollbars=1"); } }; CSubscriptionManager.prototype.OpenSubscriptionMenu=function(){ var oCV=this.getViewer(); var _259=new JSONDispatcherEntry(oCV); _259.setKey("subscriptionManager"); _259.addFormField("ui.action","getSubscriptionInfo"); _259.addFormField("cv.responseFormat","subscriptionManager"); this.addCommonFormFields(_259); _259.setCallbacks({"complete":{"object":this,"method":this.OpenSubscriptionMenuResponse}}); oCV.dispatchRequest(_259); }; CSubscriptionManager.prototype.OpenAnnotationMenu=function(){ var oCV=this.getViewer(); var _25b=new JSONDispatcherEntry(oCV); _25b.setKey("subscriptionManager"); _25b.addFormField("ui.action","getAnnotationInfo"); _25b.addFormField("cv.responseFormat","getAnnotations"); var _25c=oCV.envParams["ui.object"]; this.addCommonFormFields(_25b,_25c?_25c:""); _25b.setCallbacks({"complete":{"object":this,"method":this.OpenAnnotationMenuResponse}}); oCV.dispatchRequest(_25b); }; CSubscriptionManager.prototype.OpenAnnotationMenuResponse=function(_25d){ if(this.Initialize(_25d)){ this.UpdateAnnotationMenu(); }else{ this.ClearAnnotationMenu(); } }; CSubscriptionManager.prototype.OpenSubscriptionMenuResponse=function(_25e){ if(this.Initialize(_25e)){ this.UpdateSubscribeMenu(); }else{ this.AddEmptySubscriptionMenuItem(); } }; CSubscriptionManager.prototype.addCommonFormFields=function(_25f,_260){ if(_260&&_260!=""){ _25f.addFormField("ui.object",_260); }else{ var _261=document["formWarpRequest"+this.getViewer().getId()]; if(_261&&_261["reRunObj"]){ _25f.addFormField("ui.object",_261["reRunObj"].value); } } if(_25f.getFormField("ui.action")=="getSubscriptionInfo"){ _25f.addFormField("initialized",this.m_bInitialized?"true":"false"); } _25f.addFormField("cv.id",this.getViewer().getId()); }; CSubscriptionManager.prototype.AddEmptySubscriptionMenuItem=function(){ var _262=this.getStandaloneViewerToolbarControl(); if(_262){ var _263=_262.getItem("watchNewVersions"); if(_263){ _263.getMenu().clear(); } var _264=this.m_cv.getWebContentRoot(); var _265=this.m_cv.getSkin(); var _266=_263.getMenu(); var _267=new CMenuItem(_266,RV_RES.RV_NO_WATCH_RULES,"","",gMenuItemStyle,_264,_265); _267.disable(); _266.setForceCallback(false); _266.draw(); if(_266.isVisible()){ _266.show(); } _266.setForceCallback(true); } }; CSubscriptionManager.prototype.ClearSubscriptionMenu=function(){ var _268=this.getStandaloneViewerToolbarControl(); if(_268){ var _269=_268.getItem("watchNewVersions"); if(_269){ _269.getMenu().clear(); } } }; CSubscriptionManager.prototype.ClearAnnotationMenu=function(){ var _26a=this.getStandaloneViewerToolbarControl(); if(_26a){ var _26b=_26a.getItem("addAnnotations"); if(_26b){ _26b.getMenu().clear(); } } }; CSubscriptionManager.prototype.ClearContextAnnotationMenu=function(){ var _26c=this.getStandaloneViewerContextMenu(); if(_26c){ var _26d=_26c.getFindCommentMenuItem(); if(_26d){ _26d.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(_26e){ this.m_sContextId=_26e; }; CSelectionMetadata.prototype.getContextId=function(){ return this.m_sContextId; }; CSelectionMetadata.prototype.setRefQuery=function(_26f){ this.m_refQuery=_26f; }; CSelectionMetadata.prototype.getRefQuery=function(){ return this.m_refQuery; }; CSelectionMetadata.prototype.setDataItem=function(_270){ this.m_sDataItem=_270; }; CSelectionMetadata.prototype.getDataItem=function(){ return this.m_sDataItem; }; CSelectionMetadata.prototype.setMetadataModelItem=function(_271){ this.m_sMetadataModelItem=_271; }; CSelectionMetadata.prototype.getMetadataModelItem=function(){ return this.m_sMetadataModelItem; }; CSelectionMetadata.prototype.setUseValue=function(_272){ this.m_sUseValue=_272; }; CSelectionMetadata.prototype.getUseValue=function(){ return this.m_sUseValue; }; CSelectionMetadata.prototype.setUseValueType=function(_273){ this.m_sUseValueType=_273; }; CSelectionMetadata.prototype.setType=function(_274){ this.m_sType=_274; }; CSelectionMetadata.prototype.getType=function(){ var _275=null; switch(this.m_sUseValueType){ case 25: case 27: case 30: case 32: _275="memberUniqueName"; break; case 26: _275="memberCaption"; break; case 1: case 55: case 56: _275="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: _275=parseInt(this.m_sUseValueType,10); break; } return _275; }; CSelectionMetadata.prototype.getUseValueType=function(){ if(this.m_sType==null){ this.m_sType=this.getType(); } return this.m_sType; }; CSelectionMetadata.prototype.setDisplayValue=function(_276){ this.m_sDisplayValue=_276; }; CSelectionMetadata.prototype.getDisplayValue=function(){ return this.m_sDisplayValue; }; CSelectionMetadata.prototype.setUsage=function(_277){ this.m_sUsage=_277; }; 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(_27a,_27b){ this.m_axisIndex=_27b; this.m_index=0; this.m_selectionObject=_27a; }; CSelectionMetadataIterator.prototype.getSelectionAxis=function(){ var _27c=null; if(typeof this.m_selectionObject=="object"&&this.m_axisIndex0){ for(var _288=0;_288<_287.length;++_288){ var _289=_287[_288]; var _28a=_289.getSelectedContextIds(); var _28b=[]; for(var item=0;item<_28a.length;++item){ var _28d=_28a[item].join(":"); _28b.push(_28d); } _286.push(_28b.join("::")); } } return _286; }; function getViewerSelectionContext(_28e,_28f,_290){ var _291=_290==true?_28e.getAllSelectedObjectsWithUniqueCTXIDs():_28e.getAllSelectedObjects(); if(_291!=null&&_291.length>0){ for(var _292=0;_292<_291.length;++_292){ var _293={}; var _294=new CAxisSelectionIterator(_291[_292]); if(_294.hasNext()){ var _295=_294.next(); if(_295.hasNext()){ var _296=_295.next(); var _297=_296.getContextId(); _293[_297]=true; var _298=_28f.addSelectedCell(_296.getDataItem(),_296.getMetadataModelItem(),_296.getUseValue(),_296.getUseValueType(),_296.getDisplayValue(),_296.getUsage(),{"queryName":_296.getRefQuery()}); if(_296.getHun()!=null){ _298.addProperty("HierarchyUniqueName",_296.getHun()); } if(_296.getDun()!=null){ _298.addProperty("DimensionUniqueName",_296.getDun()); } while(_295.hasNext()){ _296=_295.next(); _297=_296.getContextId(); if(typeof _293[_297]=="undefined"||_297===""){ _293[_297]=true; var _299=_298.addDefiningCell(_296.getDataItem(),_296.getMetadataModelItem(),_296.getUseValue(),_296.getUseValueType(),_296.getDisplayValue(),_296.getUsage(),{"queryName":_296.getRefQuery()}); if(_296.getHun()!=null){ _299.addProperty("HierarchyUniqueName",_296.getHun()); } if(_296.getDun()!=null){ _299.addProperty("DimensionUniqueName",_296.getDun()); } } } while(_294.hasNext()){ _295=_294.next(); var _29a=_298; while(_295.hasNext()){ _296=_295.next(); _297=_296.getContextId(); if(typeof _293[_297]=="undefined"||_297===""){ _293[_297]=true; _29a=_29a.addDefiningCell(_296.getDataItem(),_296.getMetadataModelItem(),_296.getUseValue(),_296.getUseValueType(),_296.getDisplayValue(),_296.getUsage(),{"queryName":_296.getRefQuery()}); if(_296.getHun()!=null){ _29a.addProperty("HierarchyUniqueName",_296.getHun()); } if(_296.getDun()!=null){ _29a.addProperty("DimensionUniqueName",_296.getDun()); } } } } } } } } var _29b=_28f.toString(); if(window.gViewerLogger){ window.gViewerLogger.log("Selection context",_29b,"xml"); } return _29b; }; 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 _29c=new bux.layout.TableContainer({classname:"bux-InformationDialog"},this.contentContainer); var cell=null,row=null; if(this.sDescription){ row=new bux.layout.TableContainerRow({parentContainer:_29c}); 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:_29c}); 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(_29f,_2a0){ if(_29f&&_29f[0]&&_29f[0].label===RV_RES.IDS_JS_OK){ _29f[0].set("disabled",_2a0); } },isValid:function(){ var _2a1=this.validator(this.get("displayedValue"),this.get("constraints")); this._setOKBtnDisabled(this.oDlgBtns,!_2a1); return _2a1; }}); if(this.sContentLocale!=null){ dojo.requireLocalization("dojo.cldr","number",this.sContentLocale); this._calculationField.constraints={locale:this.sContentLocale}; } var _2a2=document.createElement("label"); _2a2.appendChild(document.createTextNode(this.sLabel)); _2a2.setAttribute("for",this._calculationField.id); cell.addContent(_2a2); row=new bux.layout.TableContainerRow({parentContainer:_29c}); 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(_2a3,_2a4,_2a5,_2a6,_2a7,_2a8){ dojo["require"]("bux.dialogs.InformationDialog"); var _2a9=new bux.dialogs.Confirm(_2a3,_2a4,_2a5,dojo.hitch(_2a7,_2a8,_2a7),_2a6); return _2a9; }; 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 _2aa=new bux.layout.TableContainer({classname:"bux-InformationDialog"},this.contentContainer); var row=new bux.layout.TableContainerRow({parentContainer:_2aa}); var cell=new bux.layout.TableContainerCell({classname:"bux-dialog-label",parentContainer:row}); this.createSnapshotsControl(); var _2ad=document.createElement("label"); _2ad.appendChild(document.createTextNode(this.sLabel)); _2ad.setAttribute("for",this._snapshots.id); cell.addContent(_2ad); row=new bux.layout.TableContainerRow({parentContainer:_2aa}); cell=new bux.layout.TableContainerCell({classname:"bux-dialog-field",parentContainer:row}); cell.addContent(this._snapshots); },onOK:function(){ this.inherited(arguments); var _2ae=this._snapshots.selectedIndex; var _2af=this._snapshots.options[_2ae]; this.okHandler(_2af.getAttribute("storeID"),_2af.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 _2b0=XMLHelper_FindChildByTagName(this.cmResponse,"result",true); var _2b1=XMLHelper_FindChildrenByTagName(_2b0,"item",false); for(var _2b2=0;_2b2<_2b1.length;_2b2++){ var _2b3=_2b1[_2b2]; var _2b4=XMLHelper_GetText(XMLHelper_FindChildByTagName(_2b3,"creationTime_localized",true)); var _2b5=XMLHelper_FindChildByTagName(_2b3,"storeID",true); var _2b6=XMLHelper_GetText(XMLHelper_FindChildByTagName(_2b5,"value",true)); var _2b7=XMLHelper_FindChildByTagName(_2b3,"creationTime",true); var _2b8=XMLHelper_GetText(XMLHelper_FindChildByTagName(_2b7,"value",true)); this._snapshots.options[_2b2]=new Option(_2b4,_2b8); this._snapshots.options[_2b2].setAttribute("storeID",_2b6); if(this.currentSnapshotCreationTime==_2b8){ this._snapshots.options[_2b2].selected=true; } } }}); function CognosViewerAction(){ this.m_oCV=null; }; CognosViewerAction.prototype.setRequestParms=function(_2b9){ }; 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(_2bf){ return _2bf; }; CognosViewerAction.prototype.addAdditionalOptions=function(_2c0){ }; 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 _2c2=""; if(this.m_oCV!=null){ if(typeof this.m_oCV.envParams["reportpart_id"]!="undefined"){ _2c2=this.m_oCV.envParams["reportpart_id"]; }else{ if(typeof this.m_oCV.envParams["ui.name"]!="undefined"){ _2c2=this.m_oCV.envParams["ui.name"]; } } } return _2c2; }; CognosViewerAction.prototype.getContainerId=function(_2c3){ var _2c4=""; if(_2c3&&_2c3.getAllSelectedObjects){ var _2c5=_2c3.getAllSelectedObjects(); if(_2c5){ var _2c6=_2c5[0]; if(_2c6&&_2c6.getLayoutElementId){ _2c4=this.removeNamespace(_2c6.getLayoutElementId()); } } } return _2c4; }; CognosViewerAction.prototype.removeNamespace=function(_2c7){ var _2c8=_2c7; try{ if(_2c7!=""){ var _2c9=_2c7.indexOf(this.m_oCV.getId()); if(_2c9!=-1){ _2c7=_2c7.replace(this.m_oCV.getId(),""); } } return _2c7; } catch(e){ return _2c8; } }; 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 _2ca=-1; if(this.m_oCV!=null&&this.m_oCV.getSelectionController()!=null){ _2ca=this.m_oCV.getSelectionController().getSelections().length; } return _2ca; }; CognosViewerAction.prototype.buildDynamicMenuItem=function(_2cb,_2cc){ _2cb.action={name:"LoadMenu",payload:{action:_2cc}}; _2cb.items=[{"name":"loading","label":RV_RES.GOTO_LOADING,iconClass:"loading"}]; return _2cb; }; CognosViewerAction.prototype.createCognosViewerDispatcherEntry=function(_2cd){ var oReq=new ViewerDispatcherEntry(this.getCognosViewer()); oReq.addFormField("ui.action",_2cd); this.preProcess(); if(this.doAddActionContext()===true){ var _2cf=this.addActionContext(); oReq.addFormField("cv.actionContext",_2cf); if(window.gViewerLogger){ window.gViewerLogger.log("Action context",_2cf,"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 _2d0=this.getCognosViewer().getViewerWidget(); if(_2d0){ var _2d1={"modified":true}; _2d0.fireEvent("com.ibm.bux.widget.modified",null,_2d1); } } catch(e){ } }; CognosViewerAction.prototype.showCustomCursor=function(evt,id,_2d4){ var _2d5=document.getElementById(id); if(_2d5==null){ _2d5=document.createElement("span"); _2d5.className="customCursor"; _2d5.setAttribute("id",id); document.body.appendChild(_2d5); } var _2d6=""; _2d5.innerHTML=_2d6; _2d5.style.position="absolute"; _2d5.style.left=(evt.clientX+15)+"px"; _2d5.style.top=(evt.clientY+15)+"px"; _2d5.style.display="inline"; }; CognosViewerAction.prototype.hideCustomCursor=function(id){ var _2d8=document.getElementById(id); if(_2d8!=null){ _2d8.style.display="none"; } }; CognosViewerAction.prototype.selectionHasContext=function(){ var _2d9=this.getCognosViewer().getSelectionController().getAllSelectedObjects(); var _2da=false; if(_2d9!=null&&_2d9.length>0){ for(var i=0;i<_2d9.length;i++){ if(_2d9[i].hasContextInformation()){ _2da=true; break; } } } return _2da; }; CognosViewerAction.prototype.isInteractiveDataContainer=function(_2dc){ var _2dd=false; if(typeof _2dc!="undefined"&&_2dc!=null){ var id=_2dc.toLowerCase(); _2dd=id=="crosstab"||id=="list"||this.getCognosViewer().getRAPReportInfo().isChart(id); } return _2dd; }; CognosViewerAction.prototype.getSelectedContainerId=function(){ var _2df=this.getCognosViewer(); var _2e0=_2df.getSelectionController(); var _2e1=null; if(_2e0!=null&&typeof _2e0!="undefined"){ _2e1=this.getContainerId(_2e0); } return _2e1; }; CognosViewerAction.prototype.getSelectedReportInfo=function(){ var _2e2=this.getCognosViewer(); var _2e3=this.getSelectedContainerId(); var _2e4=this.getReportInfo(_2e3); if(_2e4==null){ var _2e5=_2e2.getRAPReportInfo(); if(_2e5.getContainerCount()==1){ _2e4=_2e5.getContainerFromPos(0); } } return _2e4; }; CognosViewerAction.prototype.getReportInfo=function(_2e6){ var _2e7=null; if(_2e6!=null&&_2e6.length>0){ var _2e8=this.getCognosViewer(); var _2e9=_2e8.getRAPReportInfo(); _2e7=_2e9.getContainer(_2e6); } return _2e7; }; CognosViewerAction.prototype.isSelectionOnChart=function(){ var _2ea=this.getCognosViewer(); if(_2ea.getSelectionController().hasSelectedChartNodes()){ return true; } var _2eb=this.getContainerId(_2ea.getSelectionController()); if(typeof _2eb!="undefined"){ var _2ec=this.getReportInfo(_2eb); if(_2ec!=null&&_2ec.displayTypeId){ var _2ed=_2ec.displayTypeId.toLowerCase(); return _2ea.getRAPReportInfo().isChart(_2ed); } } return false; }; CognosViewerAction.prototype.ifContainsInteractiveDataContainer=function(){ var _2ee=this.getCognosViewer().getRAPReportInfo(); if(_2ee){ return _2ee.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 _2f0=[]; var _2f1=document.getElementById("rt"+this.m_oCV.getId()); if(_2f1!=null){ _2f0=getElementsByAttribute(_2f1,"*","lid"); } return _2f0; }; CognosViewerAction.prototype.addClientContextData=function(_2f2){ var _2f3=this.m_oCV.getSelectionController(); if(typeof _2f3!="undefined"&&_2f3!=null&&typeof _2f3.getCCDManager!="undefined"&&_2f3.getCCDManager()!=null){ var _2f4=_2f3.getCCDManager(); return (""+xml_encode(_2f4.MetadataToJSON())+""+""+xml_encode(_2f4.ContextDataSubsetToJSON(_2f2))+""); } return ""; }; CognosViewerAction.prototype.getDataItemInfoMap=function(){ var _2f5=this.m_oCV.getSelectionController(); if(typeof _2f5!="undefined"&&_2f5!=null&&typeof _2f5.getCCDManager!="undefined"&&_2f5.getCCDManager()!=null){ var _2f6=_2f5.getCCDManager(); return (""+xml_encode(_2f6.DataItemInfoToJSON())+""); } return ""; }; CognosViewerAction.prototype.getRAPLayoutTag=function(_2f7){ var _2f8=null; if(typeof _2f7=="object"&&_2f7!=null){ _2f8=_2f7.getAttribute("rap_layout_tag"); } return _2f8; }; CognosViewerAction.prototype.addMenuItemChecked=function(_2f9,_2fa,_2fb){ if(_2f9){ if(this.getCognosViewer().isHighContrast()){ _2fa["class"]="menuItemSelected"; } _2fa.iconClass="menuItemChecked"; }else{ if(_2fb&&_2fb.length>0){ _2fa.iconClass=_2fb; } } }; CognosViewerAction.prototype.gatherFilterInfoBeforeAction=function(_2fc){ var _2fd=this.getCognosViewer().getViewerWidget(); _2fd.filterRequiredAction=_2fc; _2fd.clearRAPCache(); _2fd.fireEvent("com.ibm.bux.widget.action",null,{action:"canvas.filters"}); }; CognosViewerAction.prototype.addClientSideUndo=function(_2fe,_2ff){ var _300=GUtil.generateCallback(_2fe.doUndo,_2ff,_2fe); var _301=GUtil.generateCallback(_2fe.doRedo,_2ff,_2fe); this.getUndoRedoQueue().addClientSideUndo({"tooltip":_2fe.getUndoHint(),"undoCallback":_300,"redoCallback":_301}); this.getCognosViewer().getViewerWidget().updateToolbar(); }; CognosViewerAction.prototype.isValidMenuItem=function(){ var _302=this.getCognosViewer(); var _303=_302.getViewerWidget(); if(this.isPromptWidget()){ return false; } return true; }; CognosViewerAction.prototype.isPositiveInt=function(_304){ if(typeof _304==="undefined"||_304===null){ return false; } var _305=parseInt(_304,10); return _304&&_305===+_304&&_305>0&&_304.indexOf(".")==-1; }; CognosViewerAction.prototype.buildActionResponseObject=function(_306,code,msg){ return {"status":_306,"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(_309){ _309.addFormField("cv.responseFormat","asynchDetailMIMEAttachment"); _309.addFormField("bux",this.m_oCV.getViewerWidget()?"true":"false"); _309.addFormField("cv.id",this.m_oCV.envParams["cv.id"]); }; LineageAction.prototype.getSelectionOptions=function(_30a){ var _30b=this.m_oCV.getSelectionController(); var _30c=getSelectionContextIds(_30b); _30a.addFormField("context.format","initializer"); _30a.addFormField("context.type","reportService"); _30a.addFormField("context.selection","metadata,"+_30c.toString()); }; LineageAction.prototype.getPrimaryRequestOptions=function(_30d){ _30d.addFormField("specificationType","metadataServiceLineageSpecification"); _30d.addFormField("ui.action","runLineageSpecification"); _30d.addFormField("ui.object",this.m_oCV.envParams["ui.object"]); }; LineageAction.prototype.getSecondaryRequestOptions=function(_30e){ _30e.addFormField("ui.conversation",this.m_oCV.getConversation()); _30e.addFormField("m_tracking",this.m_oCV.getTracking()); _30e.addFormField("ui.action","lineage"); }; LineageAction.prototype.updateMenu=function(_30f){ if(!this.getCognosViewer().bCanUseLineage){ return ""; } _30f.disabled=!this.selectionHasContext(); return _30f; }; LineageAction.prototype.execute=function(){ var oCV=this.getCognosViewer(); var _311=new AsynchDataDispatcherEntry(oCV); this.getCommonOptions(_311); this.getSelectionOptions(_311); if(oCV.getConversation()==""){ this.getPrimaryRequestOptions(_311); }else{ this.getSecondaryRequestOptions(_311); } _311.setCallbacks({"complete":{"object":this,"method":this.handleLineageResponse}}); if(!oCV.m_viewerFragment){ _311.setRequestIndicator(oCV.getRequestIndicator()); var _312=new WorkingDialog(oCV); _312.setSimpleWorkingDialogFlag(true); _311.setWorkingDialog(_312); } oCV.dispatchRequest(_311); }; LineageAction.prototype.handleLineageResponse=function(_313){ var oCV=this.getCognosViewer(); oCV.loadExtra(); oCV.setStatus(_313.getAsynchStatus()); oCV.setConversation(_313.getConversation()); oCV.setTracking(_313.getTracking()); var _315=null; if(typeof MDSRV_CognosConfiguration!="undefined"){ _315=new MDSRV_CognosConfiguration(); var _316=""; if(this.m_oCV.envParams["metadataInformationURI"]){ _316=this.m_oCV.envParams["metadataInformationURI"]; } _315.addProperty("lineageURI",_316); _315.addProperty("gatewayURI",this.m_oCV.getGateway()); } var _317=this.m_oCV.envParams["ui.object"]; var _318=getViewerSelectionContext(this.m_oCV.getSelectionController(),new CSelectionContext(_317)); var _319=new MDSRV_LineageFragmentContext(_315,_318); _319.setExecutionParameters(this.m_oCV.getExecutionParameters()); if(typeof _317=="string"){ _319.setReportPath(_317); } _319.setReportLineage(_313.getResult()); _319.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(_31a){ if(typeof _31a!="undefined"){ this.m_reuseConversation=_31a; } 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 _31b=new ModifyReportDispatcherEntry(this.m_oCV); _31b.initializeAction(this); return _31b; }; ModifyReportAction.prototype.isSelectSingleMember=function(_31c){ var _31d=this.m_oCV.getRAPReportInfo(); var _31e=_31c.getDataItems(); if(_31d&&_31e.length>0){ var _31f=this.getContainerId(this.m_oCV.getSelectionController()); var _320=_31d.getItemInfo(_31f,_31e[0][0]); if(_320.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 _322=this.createActionDispatcherEntry(); this.addAdditionalOptions(_322); oCV.dispatchRequest(_322); }else{ var _323=this.createCognosViewerDispatcherEntry("modifyReport"); _323.setCallbacks({"complete":{"object":this,"method":this.updateReportSpecCallback}}); oCV.dispatchRequest(_323); } this.fireModifiedReportEvent(); }; ModifyReportAction.prototype.updateReportSpecCallback=function(_324){ var _325=_324.getResponseState(); var _326=new RequestHandler(this.m_oCV); _326.updateViewerState(_325); if(!this.m_bUndoAdded){ this.m_bUndoAdded=true; var _327=this.getUndoRedoQueue(); if(_327){ _327.initUndoObj({"tooltip":this.getUndoHint(),"saveSpec":true}); _327.add({"reportUpdated":true}); } var _328=this.getCognosViewer().getViewerWidget(); if(_328){ _328.updateToolbar(); } } }; ModifyReportAction.prototype.addActionContext=function(){ var _329=""; var _32d=this.getContainerId(_32b); if(_32d!=""){ _32c+=""+xml_encode(_32d)+""; } _32c+=this.getRTStateInfo(); _32c+=this.getSelectionContext(); var _32e=this.addActionContextAdditionalParms(); if(_32e!=null&&_32e!="undefined"){ _32c+=_32e; } _32c+=""; if(this.updateInfoBar()){ _32c+=this.getGetInfoActionContext(); } return _32c; }; ModifyReportAction.prototype.getGetInfoActionContext=function(){ return ""; }; ModifyReportAction.prototype.getRTStateInfo=function(){ var _32f=this.getCognosViewer().getViewerWidget(); if(_32f&&_32f.getBUXRTStateInfoMap){ var _330=_32f.getBUXRTStateInfoMap(); return _330?_330:""; } return ""; }; ModifyReportAction.prototype.createEmptyMenuItem=function(){ return {name:"None",label:"(empty)",iconClass:"",action:null,items:null}; }; ModifyReportAction.prototype.getStateFromResponse=function(_331){ var _332=null; if(_331&&typeof _331!="undefined"&&_331.responseText&&typeof _331.responseText!="undefined"&&_331.responseText.length>0){ var _333=XMLBuilderLoadXMLFromString(_331.responseText); var _334=_333.getElementsByTagName("state"); if(_334!=null&&_334.length>0){ try{ if(typeof _334[0].text!="undefined"){ _332=eval("("+_334[0].text+")"); }else{ _332=eval("("+_334[0].textContent+")"); } } catch(e){ if(typeof console!="undefined"&&console&&console.log){ console.log(e); } } } } return _332; }; ModifyReportAction.prototype.getSelectedCellTags=function(){ var _335=""; var _336=this.getCognosViewer().getSelectionController().getSelections(); for(var i=0;i<_336.length;++i){ var _338=_336[i].getCellRef(); var _339=_336[i].getDataItems()[0]; if(typeof _339=="undefined"||_339==null){ _339=""; } var tag=this.getRAPLayoutTag(_338); if(tag!=null){ _335+=""+xml_encode(tag)+""+xml_encode(_339)+""; }else{ _335+=""+xml_encode(_339)+""; } } if(_335!=""){ _335=""+_335+""; } return _335; }; ModifyReportAction.prototype.getIsNumericFromReportInfo=function(_33b){ var _33c=this.getSelectedReportInfo(); if(_33c!=null&&typeof _33c.itemInfo!="undefined"){ for(var item=0;item<_33c.itemInfo.length;++item){ if(_33b==_33c.itemInfo[item].item&&typeof _33c.itemInfo[item].numeric!="undefined"){ return (_33c.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(_33f){ try{ return _33f.getAllSelectedObjects().length>0; } catch(e){ return false; } }; CognosViewerCalculation.prototype.getDisplayValueFromSelection=function(_340){ var _341=""; if(!_340){ return _341; } if(_340.getLayoutType()=="columnTitle"){ _341=_340.getDisplayValues()[0]; }else{ if(_340.getLayoutType()=="datavalue"){ var _342=this.m_oCV.getAction("CognosViewer"); var _343=this.m_oCV.getSelectionController(); var _344=_342.getContainerId(_343); _341=_340.getDataItemDisplayValue(_342.getReportInfo(_344)); } } if(_341.indexOf("+")!=-1||_341.indexOf("-")!=-1||_341.indexOf("*")!=-1||_341.indexOf("/")!=-1){ _341="("+_341+")"; } return _341; }; CognosViewerCalculation.prototype.getCalcSymbol=function(){ }; CognosViewerCalculation.prototype.getMenuItemString=function(_345){ var _346=this.getCognosViewer(); var _347=_346.getSelectionController(); var _348=""; var _349,_34a; if(_345){ try{ var _34b=_347.getAllSelectedObjects().length; if(_34b==1){ _349=_347.getAllSelectedObjects()[0]; if(this.m_bFlipSelection){ _348=RV_RES.IDS_JS_CALCULATE_NUMBER+" "+this.getCalcSymbol()+" "+this.getDisplayValueFromSelection(_349); }else{ _348=this.getDisplayValueFromSelection(_349)+" "+this.getCalcSymbol()+" "+RV_RES.IDS_JS_CALCULATE_NUMBER; } }else{ if(this.m_bFlipSelection){ _34b--; for(_34a=_34b;_34a>=0;_34a--){ _349=_347.getAllSelectedObjects()[_34a]; if(_34a!=_34b){ _348+=" "+this.getCalcSymbol()+" "; } _348+=this.getDisplayValueFromSelection(_349); } }else{ for(_34a=0;_34a<_34b;_34a++){ _349=_347.getAllSelectedObjects()[_34a]; if(_34a>0){ _348+=" "+this.getCalcSymbol()+" "; } _348+=this.getDisplayValueFromSelection(_349); } } } } catch(e){ _348=this.getCalcSymbol(); } }else{ _348=this.getCalcSymbol(); } return _348; }; function PercentDifferenceCalculation(){ }; PercentDifferenceCalculation.prototype=new CognosViewerCalculation(); PercentDifferenceCalculation.prototype.validSelectionLength=function(_34c){ try{ return _34c.getAllSelectedObjects().length==2; } catch(e){ return false; } }; PercentDifferenceCalculation.prototype.getMenuItemString=function(_34d){ var _34e=this.getCognosViewer().getSelectionController(); var _34f=RV_RES.IDS_JS_CALCULATE_PERCENT_DIFFERENCE; if(_34d){ try{ var _350=_34e.getAllSelectedObjects().length; _34f+=" ("; for(var _351=0;_351<_350;_351++){ var _352=_34e.getAllSelectedObjects()[_351]; if(_351>0){ _34f+=", "; } _34f+=this.getDisplayValueFromSelection(_352); } _34f+=")"; } catch(e){ } } return _34f; }; function PercentDifferenceCalculationSwapOrder(){ this.m_bFlipSelection=true; }; PercentDifferenceCalculationSwapOrder.prototype=new PercentDifferenceCalculation(); PercentDifferenceCalculationSwapOrder.prototype.getMenuItemString=function(_353){ var _354=this.getCognosViewer().getSelectionController(); var _355=RV_RES.IDS_JS_CALCULATE_PERCENT_DIFFERENCE; if(_353){ try{ var _356=_354.getAllSelectedObjects().length; _355+=" ("; _356--; for(var _357=_356;_357>=0;_357--){ var _358=_354.getAllSelectedObjects()[_357]; if(_357<_356){ _355+=", "; } _355+=this.getDisplayValueFromSelection(_358); } _355+=")"; } catch(e){ } } return _355; }; 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(_359){ try{ var _35a=_359.getAllSelectedObjects().length; return _35a>0&&_35a<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(_35b){ try{ var _35c=_35b.getAllSelectedObjects().length; return (_35c>0&&_35c<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 _35d=this.getCognosViewer().getSelectionController(); var _35e=_35d.getSelections(); if(_35e.length>1){ var tmp={}; for(var i=0;i<_35e.length;++i){ var _361=_35e[i].getColumnRef(); if(typeof tmp[_361]=="undefined"){ tmp[_361]=1; }else{ return false; } } } return _35d.selectionsHaveCalculationMetadata(); }; CalculationAction.prototype.crosstabRules=function(){ var _362=this.getCognosViewer().getSelectionController(); if(!_362.areSelectionsColumnRowTitles()){ return false; } if(_362.isRelational()){ if(!this.relationalCrosstabRules(_362)){ return false; } }else{ if(!this.olapCrosstabRules(_362)){ return false; } } return true; }; CalculationAction.prototype.relationalCrosstabRules=function(_363){ return _363.selectionsHaveCalculationMetadata(); }; CalculationAction.prototype.olapCrosstabRules=function(_364){ if(!_364.selectionsHaveCalculationMetadata()){ return false; } if(!this.sameDimension(_364)){ return (typeof this.m_oCV.aQoSFunctions!="undefined")&&this.m_oCV.aQoSFunctions.toString().indexOf("MULTIPLE_MEASURE_DIMENSION_CALCULATIONS")!=-1&&_364.selectionsAreMeasures(); }else{ if(this.sameHierarchy(_364)){ 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(_365){ try{ var dim=""; var _367=_365.getAllSelectedObjects().length; for(var _368=0;_368<_367;_368++){ if(dim.length==0){ dim=_365.getAllSelectedObjects()[_368].getDimensionalItems("dun")[0][0]; }else{ if(dim!=_365.getAllSelectedObjects()[_368].getDimensionalItems("dun")[0][0]){ return false; } } } return true; } catch(e){ return false; } }; CalculationAction.prototype.sameHierarchy=function(_369){ try{ var dim=""; var _36b=_369.getAllSelectedObjects().length; for(var _36c=0;_36c<_36b;_36c++){ if(dim.length==0){ dim=_369.getAllSelectedObjects()[_36c].getDimensionalItems("hun")[0][0]; }else{ if(dim!=_369.getAllSelectedObjects()[_36c].getDimensionalItems("hun")[0][0]){ return false; } } } return true; } catch(e){ return false; } }; CalculationAction.prototype.addActionContextAdditionalParms=function(){ var _36d=""; if(this.m_constant!=null){ _36d+=""+xml_encode(this.m_constant)+""; if(this.m_swapSelectionOrder){ _36d+=""; } } if(this.m_defaultName!=""){ _36d+=""+xml_encode(this.m_defaultName)+""; } return _36d; }; CalculationAction.prototype.setRequestParms=function(_36e){ if(_36e!=null){ if(typeof _36e.constant!=null){ this.m_constant=_36e.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 _370=""+this.m_constant; var _371=this.getCognosViewer().envParams["contentDecimalSeparator"]; if(typeof _371!="undefined"&&_371!=null&&_371!="."){ _370=_370.replace(".",_371); } this.m_defaultName=this.m_defaultName.replace(RV_RES.IDS_JS_CALCULATE_NUMBER,_370); } } catch(e){ this.m_defaultName=""; } }; CalculationAction.prototype.preProcess=function(){ var _372=this.getNumberOfSelections(); this.buildDefaultName(); if(this.m_swapSelectionOrder&&_372==2){ var _373=this.getCognosViewer().getSelectionController(); var sel1=_373.getAllSelectedObjects()[0]; var sel2=_373.getAllSelectedObjects()[1]; _373.m_aSelectedObjects=[sel2,sel1]; } }; CalculationAction.prototype.isFactCellOnCrosstabOrEmpty=function(){ var _376=this.m_oCV.getSelectionController(); var _377=_376.getAllSelectedObjects(); if(_377!=null&&typeof _377!="undefined"){ if(_377.length==0){ return true; }else{ var _378=_377[0]; if(_376.getDataContainerType()=="crosstab"&&_378.getLayoutType()=="datavalue"){ return true; } } } return false; }; CalculationAction.prototype.isSummaryOrAggregateCell=function(){ var _379=this.m_oCV.getSelectionController(); var _37a=_379.getAllSelectedObjects(); if(_37a!=null&&typeof _37a!="undefined"){ var _37b; var _37c=/\b(ol|il)\b/; for(var i=0;i<_37a.length;i++){ _37b=_37a[i].getCellRef(); if(_37b!=null&&typeof _37b!="undefined"){ if(_37a[i].getLayoutType()=="summary"||(_37b!=null&&_37c.test(_37b.className))){ return true; } } _37b=null; } } return false; }; CalculationAction.prototype.isLastSelectionSingleDimensionNested=function(){ var _37e=this.m_oCV.getSelectionController(); var _37f=_37e.getAllSelectedObjects(); if(_37f!=null&&typeof _37f!="undefined"&&_37f.length){ var _380=_37f[_37f.length-1]; var _381=_380.getDimensionalItems("dun")[0]; if(_381&&_381.length&&_381[0]){ for(var _382=1;_382<_381.length;++_382){ if(_381[_382]===_381[0]){ return true; } } } } return false; }; CalculationAction.prototype.areCalculationsPossible=function(){ var _383=this.getCognosViewer().getSelectionController(); if(this.isFactCellOnCrosstabOrEmpty()){ return false; } if(this.isSelectionOnChart()){ return false; } if(this.isSummaryOrAggregateCell()){ return false; } if(!_383.selectionsInSameDataContainer()){ return false; } if(_383.getDataContainerType()=="list"){ return this.listRules(_383); }else{ if(_383.getDataContainerType()=="crosstab"&&!this.isLastSelectionSingleDimensionNested()){ return this.crosstabRules(_383); } } return false; }; CalculationAction.prototype.updateMenu=function(_384,_385){ _384.visible=this.ifContainsInteractiveDataContainer(); if(!_384.visible){ return _384; } if(!this.areCalculationsPossible()){ return this.toggleMenu(_384,false); } this.toggleMenu(_384,true); if(this.m_oCV.aQoSFunctions){ _384=this.buildCalculationMenuItemsAgainstSelection(_384); }else{ _384=this.buildDynamicMenuItem(_384,"Calculation"); } return _384; }; CalculationAction.prototype.toggleMenu=function(_386,_387){ if(_387){ _386.iconClass="calculate"; _386.disabled=false; }else{ _386.iconClass="calculateDisabled"; _386.disabled=true; } return _386; }; CalculationAction.prototype.buildMenu=function(_388,_389){ _388.visible=this.ifContainsInteractiveDataContainer(); if(!_388.visible){ return _388; } if(!this.areCalculationsPossible()){ return this.toggleMenu(_388,false); } this.toggleMenu(_388,true); var _38a=this.getCognosViewer(); if(typeof _38a.aQoSFunctions=="undefined"){ this.fetchQoS(_388,_389,(typeof _389=="undefined")?false:true); } if(typeof _38a.aQoSFunctions!="undefined"){ return this.buildCalculationMenuItemsAgainstSelection(_388); } }; CalculationAction.prototype.fetchQoS=function(_38b,_38c,_38d){ var _38e={customArguments:[_38b,_38c],"complete":{"object":this,"method":this.handleQoSResponse}}; var _38f=new AsynchJSONDispatcherEntry(this.m_oCV); _38f.setCallbacks(_38e); _38f.addFormField("ui.action","getQualityOfService"); _38f.addFormField("parameterValues",this.m_oCV.getExecutionParameters()); _38f.addFormField("bux","true"); _38f.addNonEmptyStringFormField("modelPath",this.m_oCV.getModelPath()); _38f.addDefinedFormField("metaDataModelModificationTime",this.m_oCV.envParams["metaDataModelModificationTime"]); if(!_38d){ _38f.forceSynchronous(); } this.m_oCV.dispatchRequest(_38f); }; CalculationAction.prototype.handleQoSResponse=function(_390,_391,_392){ this.m_oCV.aQoSFunctions=_390.getResult(); this.buildCalculationMenuItemsAgainstSelection(_391,_392); if(typeof _392=="function"){ _392(); } }; CalculationAction.prototype.buildCalculationMenuItemsAgainstSelection=function(_393,_394){ var _395=this.m_oCV.aBuxCalculations; var _396=[]; for(var _397=0;_397<_395.length;_397++){ var calc=this.m_oCV.getCalculation(_395[_397]); if(this.m_oCV.aQoSFunctions==null||typeof this.m_oCV.aQoSFunctions=="undefined"){ _393.disabled=true; _393.iconClass="calculate"; _393.items=null; return _393; } if(calc&&calc.validSelectionLength(this.getCognosViewer().getSelectionController())&&this.m_oCV.aQoSFunctions.toString().indexOf(_395[_397])!=-1){ var _399={}; _399.name=_395[_397]; _399.label=calc.getMenuItemString(true); _399.action={}; var _39a=""; if(_395[_397].indexOf("SwapOrder")!=-1){ _39a=_395[_397].substring(0,_395[_397].indexOf("SwapOrder")); }else{ _39a=_395[_397]; } _399.iconClass=_39a; if(this.getNumberOfSelections()==1){ _399.action.name="ConstantOperandCalculation"; _399.action.payload=_395[_397]; }else{ _399.action.name=_395[_397]; _399.action.payload=""; } if(_399.action.name=="PercentDifferenceCalculation"){ _396.push({separator:true}); } _399.items=null; _396.push(_399); } } if(_396.length==0){ this.toggleMenu(_393,false); _396.push({name:"None",label:RV_RES.IDS_JS_CALCULATION_SELECT_DATA,iconClass:"",action:null,items:null}); }else{ this.toggleMenu(_393,true); } _393.items=_396; return _393; }; 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(_39b){ this.m_action=_39b; }; ConstantOperandCalculationAction.prototype.execute=function(){ var _39c=getCognosViewerObjectString(this.m_oCV.getId()); var _39d=this.m_action; var _39e=this.m_oCV.getCalculation(_39d); var _39f=_39e.getMenuItemString(true); var _3a0=RV_RES.IDS_JS_CALCULATE_ENTER_NUMBER_TITLE; var _3a1=RV_RES.IDS_JS_CALCULATE_ENTER_NUMBER_DESCRIPTION; _3a1=_3a1.substring(0,_3a1.indexOf("{0}"))+_39f+_3a1.substring(_3a1.indexOf("{0}")+3); var _3a2=RV_RES.IDS_JS_CALCULATE_ENTER_NUMBER; var _3a3=this.m_oCV.envParams["contentLocale"]; var _3a4=new viewer.dialogs.CalculationDialog({sTitle:_3a0,sLabel:_3a2,sDescription:_3a1,sContentLocale:_3a3,okHandler:function(_3a5){ window[_39c].executeAction(_39d,{constant:_3a5}); },cancelHandler:function(){ }}); _3a4.startup(); window.setTimeout(function(){ _3a4.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(_3a6){ if(_3a6.type!=null&&typeof _3a6.type!="undefined"){ this.m_sType=_3a6.type; if(_3a6.id!=null&&typeof _3a6.id!="undefined"){ this.m_sId=_3a6.id; } if(_3a6.item!=null&&typeof _3a6.item!="undefined"){ this.m_sItem=_3a6.item; } if(_3a6.details){ this.m_jsonDetails=_3a6.details; } if(_3a6.formattedNumber!=null&&typeof _3a6.formattedNumber!="undefined"){ this.m_sFormattedNumber=_3a6.formattedNumber; } if(_3a6.formattedEndNumber!=null&&typeof _3a6.formattedEndNumber!="undefined"){ this.m_sFormattedEndNumber=_3a6.formattedEndNumber; } }else{ this.m_sType=_3a6; } }; FilterAction.prototype.addActionContextAdditionalParms=function(){ var _3a7=""+this.m_sType+""; if(this.m_sId!=null&&typeof this.m_sId!="undefined"){ _3a7+=(""+xml_encode(this.m_sId)+""); } if(this.m_sItem!=null&&typeof this.m_sItem!="undefined"&&this.m_sItem!=""){ _3a7+=(""+xml_encode(this.m_sItem)+""); } if(this.m_jsonDetails&&this.m_jsonDetails!=""){ _3a7+="
"+xml_encode(this.m_jsonDetails)+"
"; } if(this.m_sFormattedNumber!=null&&typeof this.m_sFormattedNumber!="undefined"&&this.m_sFormattedNumber!=""){ _3a7+=(""+this.m_sFormattedNumber+""); } if(this.m_sFormattedEndNumber!=null&&typeof this.m_sFormattedEndNumber!="undefined"&&this.m_sFormattedEndNumber!=""){ _3a7+=(""+this.m_sFormattedEndNumber+""); } return _3a7; }; FilterAction.prototype.buildSelectedItemsString=function(_3a8){ var _3a9=""; var _3aa=_3a8.length; var _3ab=_3aa>5?5:_3aa; for(var _3ac=0;_3ac<_3aa;++_3ac){ var _3ad=this.getItemLabel(_3a8[_3ac]); if(typeof _3ad=="undefined"||_3ad==""){ return ""; } if((_3ac)<_3ab){ _3a9+=_3ad; } if((_3ac+1)<_3ab){ _3a9+=", "; } } if(_3aa>5){ _3a9+=", ++"; } return _3a9; }; FilterAction.prototype.getItemLabel=function(_3ae){ var _3af=_3ae.getDisplayValues()[0]; if(typeof _3af=="undefined"){ _3af=_3ae.getUseValues()[0][0]; } return _3af; }; FilterAction.prototype.toggleMenu=function(_3b0,_3b1){ if(_3b1){ _3b0.iconClass="filter"; _3b0.disabled=false; }else{ _3b0.iconClass="filterDisabled"; _3b0.disabled=true; } return _3b0; }; FilterAction.prototype.updateMenu=function(_3b2){ _3b2.visible=(this.ifContainsInteractiveDataContainer()&&!this.detailFilteringIsDisabled()); var _3b3=_3b2; if(_3b2.visible){ var _3b4=(this.m_oCV.getSelectionController().getAllSelectedObjects().length>0||this.isSelectionFilterable()||this.isRemoveAllValid()); if(!_3b4){ _3b3=this.toggleMenu(_3b2,false); }else{ this.buildMenu(_3b2); if(_3b2.disabled==true){ _3b3=this.toggleMenu(_3b2,false); }else{ _3b3=this.buildDynamicMenuItem(_3b2,"Filter"); } } } return _3b3; }; FilterAction.prototype.detailFilteringIsDisabled=function(){ var _3b5=this.getCognosViewer().getRAPReportInfo(); if(_3b5){ return _3b5.isDetailFilteringDisabled(); } return false; }; FilterAction.prototype.buildMenu=function(_3b6){ _3b6.visible=(this.ifContainsInteractiveDataContainer()&&!this.detailFilteringIsDisabled()); if(!_3b6.visible){ return _3b6; } var _3b7=this.isSelectionFilterable(); this.toggleMenu(_3b6,_3b7); var _3b8=[]; var _3b9=false; var _3ba=false; var _3bb=this.m_oCV.getSelectionController(); var _3bc=_3bb.getAllSelectedObjects(); if(_3bc.length>0&&_3bb.selectionsInSameDataContainer()&&_3bb.selectionsFromSameDataItem()){ var _3bd=_3bc[0].getDataItems()[0][0]; if(_3b7){ _3b9=this.addFilterValueActionsToMenu(_3bb,_3b8,_3bd); } if(this.isRemoveItemFilterValid(_3bd)){ if(_3b9==true){ _3b8.push({separator:true}); _3ba=true; } var _3be=this.getRefDataItemLabel(_3bd); _3b8.push({name:"RemoveFilterFor",label:RV_RES.IDS_JS_REMOVE_FILTER_FOR+" "+enforceTextDir(_3be),iconClass:"",action:{name:"Filter",payload:"remove"},items:null}); } } if(this.isRemoveAllValid()==true){ if(_3b9&&!_3ba){ _3b8.push({separator:true}); } _3b8.push({name:"RemoveAllFiltersForWidget",label:RV_RES.IDS_JS_REMOVE_ALL_FILTERS_FOR_WIDGET,iconClass:"",action:{name:"Filter",payload:"removeAllForWidget"},items:null}); } if(_3b8.length==0){ return this.toggleMenu(_3b6,false); }else{ _3b6.items=_3b8; this.toggleMenu(_3b6,true); return _3b6; } }; FilterAction.prototype.getRefDataItemLabel=function(_3bf){ var _3c0=_3bf; var _3c1=this.m_oCV.getRAPReportInfo(); if(_3c1){ var _3c2=_3c1.getFilterObject(_3bf,true); if(_3c2){ _3c0=_3c2.itemLabel; } } return _3c0; }; FilterAction.prototype.addFilterValueActionsToMenu=function(_3c3,_3c4,_3c5){ var _3c6=_3c3.getAllSelectedObjectsWithUniqueCTXIDs(); var _3c7=_3c6.length; var sel=0; if(_3c6[0].m_dataContainerType=="list"){ for(sel=0;sel<_3c6.length;++sel){ if(_3c6[sel].m_sLayoutType=="columnTitle"){ _3c7=0; break; } } } if(_3c7==0){ return false; } var _3c9=this.buildSelectedItemsString(_3c6); if(_3c9==""){ if(_3c7==1&&_3c6[0].getLayoutType()=="datavalue"){ _3c9=RV_RES.IDS_JS_NULL; _3c4.push({name:"InFilter",label:CViewerCommon.getMessage(RV_RES.IDS_JS_FILTER_INCLUDE,_3c9),iconClass:"",action:{name:"Filter",payload:"in"},items:null}); _3c4.push({name:"NotInFilter",label:CViewerCommon.getMessage(RV_RES.IDS_JS_FILTER_EXCLUDE,_3c9),iconClass:"",action:{name:"Filter",payload:"not"},items:null}); } }else{ if(_3c3.selectionsAreDateTime()||(_3c3.selectionsHaveCalculationMetadata()&&!_3c3.selectionsNonMeasureWithMUN())){ for(sel=0;sel<_3c7;++sel){ if(_3c6[sel].m_sLayoutType=="columnTitle"){ return false; } } if(_3c7==1){ if(_3c6[0].getUseValues()[0][0]){ _3c4.push({name:"LessFilter",label:RV_RES.IDS_JS_FILTER_LESS_THAN+" "+_3c9,iconClass:"",action:{name:"Filter",payload:{type:"lessThan",formattedNumber:_3c9}},items:null}); _3c4.push({name:"LessEqualFilter",label:RV_RES.IDS_JS_FILTER_LESS_THAN_EQUAL+" "+_3c9,iconClass:"",action:{name:"Filter",payload:{type:"lessThanEqual",formattedNumber:_3c9}},items:null}); _3c4.push({name:"GreaterEqualFilter",label:RV_RES.IDS_JS_FILTER_GREATER_THAN_EQUAL+" "+_3c9,iconClass:"",action:{name:"Filter",payload:{type:"greaterThanEqual",formattedNumber:_3c9}},items:null}); _3c4.push({name:"GreaterFilter",label:RV_RES.IDS_JS_FILTER_GREATER_THAN+" "+_3c9,iconClass:"",action:{name:"Filter",payload:{type:"greaterThan",formattedNumber:_3c9}},items:null}); } }else{ if(_3c7==2){ if(_3c6[0].getUseValues()[0][0]&&_3c6[1].getUseValues()[0][0]){ var _3ca=this.getItemLabel(_3c6[0]); var _3cb=this.getItemLabel(_3c6[1]); _3c4.push({name:"BetweenFilter",label:CViewerCommon.getMessage(RV_RES.IDS_JS_FILTER_BETWEEN,[_3ca,_3cb]),iconClass:"",action:{name:"Filter",payload:{type:"between",formattedNumber:_3ca,formattedEndNumber:_3cb}},items:null}); _3c4.push({name:"NotBetweenFilter",label:CViewerCommon.getMessage(RV_RES.IDS_JS_FILTER_NOT_BETWEEN,[_3ca,_3cb]),iconClass:"",action:{name:"Filter",payload:{type:"notBetween",formattedNumber:_3ca,formattedEndNumber:_3cb}},items:null}); } }else{ return false; } } }else{ var _3cc=_3c3.getDataContainerType(); if(_3cc=="crosstab"&&_3c6[0].getLayoutType()=="columnTitle"){ if(this.isSelectSingleMember(_3c6[0])==true){ return false; } } _3c4.push({name:"InFilter",label:CViewerCommon.getMessage(RV_RES.IDS_JS_FILTER_INCLUDE,enforceTextDir(_3c9)),iconClass:"",action:{name:"Filter",payload:"in"},items:null}); _3c4.push({name:"NotInFilter",label:CViewerCommon.getMessage(RV_RES.IDS_JS_FILTER_EXCLUDE,enforceTextDir(_3c9)),iconClass:"",action:{name:"Filter",payload:"not"},items:null}); } } return true; }; FilterAction.prototype.isRemoveAllValid=function(){ var _3cd=this.m_oCV.getRAPReportInfo(); if(_3cd){ return _3cd.containsFilters(); } return false; }; FilterAction.prototype.isRemoveItemFilterValid=function(_3ce){ var _3cf=this.getContainerId(this.m_oCV.getSelectionController()); var _3d0=this.m_oCV.getRAPReportInfo(); if(_3cf!=null&&_3d0){ var _3d1=_3d0.getFilterObjectFromContainer(_3cf,_3ce,false); return _3d1?true:false; } return false; }; FilterAction.prototype.isSelectionFilterable=function(){ var _3d2=this.m_oCV.getSelectionController(); var _3d3=_3d2.getAllSelectedObjects(); if(_3d3.length>0){ var _3d4=_3d3[0].getCellRef(); if(_3d4&&_3d4.getAttribute&&_3d4.getAttribute("no_data_item_column")==="true"){ return false; } if(_3d2.hasSelectedChartNodes()){ var _3d5=false; if(_3d2.selectionsAreDateTime()||(_3d2.selectionsHaveCalculationMetadata()&&!_3d2.selectionsNonMeasureWithMUN())){ _3d5=true; } for(var sel=0;sel<_3d3.length;++sel){ if(_3d3[sel].getLayoutType()){ if(_3d3[sel].getLayoutType().match("Title$")=="Title"){ return false; } if(_3d5&&_3d3[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(_3d7){ this.m_requestParms=_3d7; }; GetFilterInfoAction.prototype.runReport=function(){ return false; }; GetFilterInfoAction.prototype.updateInfoBar=function(){ return false; }; GetFilterInfoAction.prototype.fireModifiedReportEvent=function(){ }; GetFilterInfoAction.prototype.buildActionContextAdditionalParmsXML=function(){ var _3d8=XMLBuilderCreateXMLDocument("item"); var _3d9=_3d8.documentElement; for(var parm in this.m_requestParms){ if(this.m_requestParms.hasOwnProperty(parm)){ var _3db=_3d8.createElement(parm); _3db.appendChild(_3d8.createTextNode(this.m_requestParms[parm])); _3d9.appendChild(_3db); } } return _3d8; }; GetFilterInfoAction.prototype.addActionContextAdditionalParms=function(){ if(this.m_requestParms===null){ return ""; } return XMLBuilderSerializeNode(this.buildActionContextAdditionalParmsXML()); }; GetFilterInfoAction.prototype.createFilterInfoDispatcherEntry=function(){ var _3dc=new ReportInfoDispatcherEntry(this.m_oCV); _3dc.initializeAction(this); return _3dc; }; GetFilterInfoAction.prototype.execute=function(){ this.getCognosViewer().setKeepFocus(this.keepFocusOnWidget()); var _3dd=this.createFilterInfoDispatcherEntry(); this.m_oCV.dispatchRequest(_3dd); 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 _3de=this.buildActionContextAdditionalParmsXML(); var _3df=_3de.documentElement; for(var parm in this.m_requestParms){ if(parm=="name"){ var _3e1=this.m_oCV.getSelectionController(); if(typeof _3e1!="undefined"&&typeof _3e1.getCCDManager()!="undefined"){ var _3e2=_3e1.getCCDManager().GetPageMinMaxForRDI(this.m_requestParms[parm]); if(typeof _3e2!="undefined"){ var _3e3=_3de.createElement("pageMin"); _3e3.appendChild(_3de.createTextNode(_3e2.pageMin)); var _3e4=_3de.createElement("pageMax"); _3e4.appendChild(_3de.createTextNode(_3e2.pageMax)); _3df.appendChild(_3e3); _3df.appendChild(_3e4); } if(this.m_oCV.isSinglePageReport()==true){ var _3e5=_3de.createElement("singlePageReport"); _3df.appendChild(_3e5); } } break; } } var _3e6=XMLBuilderSerializeNode(_3de); return (_3e6+this.addClientContextData(3)); }; GetFilterValuesAction.prototype.getOnCompleteCallback=function(){ var _3e7=this.getCognosViewer(); var _3e8=_3e7.getViewerWidget(); var _3e9=this.m_requestParms; var _3ea=function(_3eb){ _3e8.handleGetFilterValuesResponse(_3eb,_3e9); }; return _3ea; }; 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 _3ec=this.getCognosViewer(); var _3ed=_3ec.getViewerWidget(); var _3ee=function(_3ef){ _3ed.handleGetFilterableItemsResponse(_3ef); }; return _3ee; }; 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 _3f0=eval("("+this.m_requestParams+")"); if(_3f0.clientId!==null){ return this.m_sAction+_3f0.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(_3f1){ this.m_requestParams=_3f1.filterPayload; this.m_drillResetHUN=_3f1.drillResetHUN; this.m_isFacet=_3f1.isFacet; if(_3f1.forceCleanup){ this.m_sForceCleanup=_3f1.forceCleanup; } }; UpdateDataFilterAction.prototype.forceRunSpecRequest=function(){ return this.m_bForceRunSpec; }; UpdateDataFilterAction.prototype.preProcessContextValues=function(){ var _3f2=[]; var _3f3=dojo.fromJson(this.m_requestParams); if(_3f3&&_3f3["com.ibm.widget.context"]&&(_3f3["com.ibm.widget.context"]["values"]||_3f3["com.ibm.widget.context"]["ranges"])){ var _3f4=this.m_oCV.m_RAPReportInfo; var _3f5=_3f4.getContainers(); if(!_3f5){ _3f2; } var key=""; var _3f7=""; if(_3f3["com.ibm.widget.context"]["values"]){ key="values"; _3f7=_3f3["com.ibm.widget.context"]["values"]; }else{ key="ranges"; _3f7=_3f3["com.ibm.widget.context"]["ranges"]; } var _3f8=_3f4.collectSliderSetFromReportInfo(); for(dataItem in _3f7){ if(_3f4&&_3f4.isReferenced(dataItem)){ var _3f9=dojo.clone(_3f3); var _3fa={}; _3fa[dataItem]=_3f3["com.ibm.widget.context"][key][dataItem]; _3f9["com.ibm.widget.context"][key]=_3fa; if(_3f3["com.ibm.widget.context.bux.selectValueControl"]&&_3f3["com.ibm.widget.context.bux.selectValueControl"]["selectValueControl"]&&_3f3["com.ibm.widget.context.bux.selectValueControl"]["selectValueControl"]["itemSpecification"]){ var _3fb={}; _3f9["com.ibm.widget.context.bux.selectValueControl"]["selectValueControl"]["itemSpecification"]={}; var _3fc=document.forms["formWarpRequest"+this.m_oCV.getId()].packageBase.value; for(modelItem in _3f3["com.ibm.widget.context.bux.selectValueControl"]["selectValueControl"]["itemSpecification"]){ if(modelItem.indexOf(_3fc)!=-1){ _3fb[dataItem]=_3f3["com.ibm.widget.context.bux.selectValueControl"]["selectValueControl"]["itemSpecification"][modelItem][dataItem]; if(_3fb[dataItem]){ _3f9["com.ibm.widget.context.bux.selectValueControl"]["selectValueControl"]["itemSpecification"][modelItem]=_3fb; break; } } } } var _3fd=_3f7[dataItem]&&key!=="ranges"?_3f7[dataItem].length:0; if(this.checkIfFilterExpressionChanged(dataItem,_3f3.clientId,_3fd,_3f8)){ this.m_bForceRunSpec=true; } _3f2.push(dojo.toJson(_3f9)); } } }else{ _3f2.push(dojo.toJson(_3f3)); } return _3f2; }; UpdateDataFilterAction.prototype.checkIfFilterExpressionChanged=function(_3fe,_3ff,_400,_401){ if(!_401||!_401[_3ff]||_401[_3ff].name!=_3fe){ return true; } var _402=_401[_3ff].values?_401[_3ff].values.length:0; if(_400==_402){ return false; } return (_400===1)!==(_402===1); }; UpdateDataFilterAction.prototype.addActionContext=function(){ var _403="0){ _403+=this._getDrillResetActionContext(); } if(this.m_sForceCleanup){ _403+=""+dojo.toJson(this.m_sForceCleanup)+""; } var _405; var _406=(this.m_requestParams.charAt(0)==="<"); if(this.m_isFacet||_406){ _405=[this.m_requestParams]; }else{ _405=this.preProcessContextValues(); } for(var idx=0;idx<_405.length;++idx){ var _408=_405[idx]; _403+=""+_404; _403+=(_406)?_408:xml_encode(_408); if(idx>0){ _403+="true"; } if(!this.m_isFacet){ _403+=this.addClientContextData(3); } _403+=""; _403+=""; _403+=""; } _403+=""; return _403; }; UpdateDataFilterAction.prototype._getDrillResetActionContext=function(){ var _409=new DrillResetAction(); _409.setCognosViewer(this.getCognosViewer()); var _40a={drilledResetHUNs:this.m_drillResetHUN}; _409.setRequestParms(_40a); _409.setUpdateInfoBar(false); var _40b=_409.getReportActionContext(); return _40b; }; function CognosViewerSort(_40c,oCV){ this.m_oCV=oCV; if(_40c){ this.m_oEvent=_40c; this.m_oNode=getCrossBrowserNode(_40c,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 _40f=getCognosViewerSCObjectRef(this.m_oCV.getId()); _40f.selectSingleDomNode(this.m_oNode.parentNode); var _410=this.getSortAction(); _410.setCognosViewer(this.m_oCV); _410.execute(); if(window.gViewerLogger){ window.gViewerLogger.addContextInfo(_40f); } }; CognosViewerSort.prototype.getSortAction=function(){ var _411=this.m_oCV.getAction("Sort"); var _412=this.m_oNode.getAttribute("sortOrder"); if(_412.indexOf("nosort")!=-1){ _411.setRequestParms({order:"ascending",type:"value"}); }else{ if(_412.indexOf("ascending")!=-1){ _411.setRequestParms({order:"descending",type:"value"}); }else{ if(_412.indexOf("descending")!=-1){ _411.setRequestParms({order:"none",type:"value"}); } } } return _411; }; 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 _413=this.getCurrentSortFromSelection(); if(this.m_sortType==="value"&&_413.indexOf("sortByValue")===-1){ return false; }else{ if(this.m_sortType==="label"&&_413.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(_414){ this.m_sortOrder=_414.order; this.m_sortType=_414.type; if(_414.id!=null&&typeof _414.id!="undefined"){ this.m_sId=_414.id; } if(_414.item!=null&&typeof _414.item!="undefined"){ this.m_sItem=_414.item; } }; SortAction.prototype.addActionContextAdditionalParms=function(){ var _415=this.m_oCV.getSelectionController(); var _416=""+this.m_sortOrder+""; if(this.m_sortType=="label"){ _416+=""; } if(this.getContainerId(_415)==""&&this.m_sId!=null&&typeof this.m_sId!="undefined"&&this.m_sId!=""){ _416+=(""+xml_encode(this.m_sId)+""); } if(this.m_sItem!=null&&typeof this.m_sItem!="undefined"&&this.m_sItem!=""){ _416+=(""+xml_encode(this.m_sItem)+""); } _416+=this.addClientContextData(3); _416+=this.getSelectedCellTags(); return _416; }; SortAction.prototype.toggleMenu=function(_417,_418){ if(_418){ _417.iconClass="sort"; _417.disabled=false; }else{ _417.iconClass="sortDisabled"; _417.disabled=true; } return _417; }; SortAction.prototype.updateMenu=function(_419){ _419.visible=this.ifContainsInteractiveDataContainer(); if(!_419.visible){ return _419; } this.buildMenu(_419); if(_419.disabled==true){ return this.toggleMenu(_419,false); } return this.buildDynamicMenuItem(this.toggleMenu(_419,true),"Sort"); }; SortAction.prototype.buildSelectedItemsString=function(_41a,_41b,_41c){ try{ var _41d=_41a[_41a.length-1]; if(_41b){ var _41e=_41d.getDisplayValues()[0]; if(typeof _41e=="undefined"){ _41e=_41d.getUseValues()[0][0]; } return _41e; }else{ return _41d.getDataItemDisplayValue(_41c); } } catch(e){ if(console&&console.log){ console.log(e); } } }; SortAction.prototype.buildMenu=function(_41f){ _41f.visible=this.ifContainsInteractiveDataContainer(); if(!_41f.visible){ return _41f; } if(!this.isSelectionSortable()){ return this.toggleMenu(_41f,false); } _41f=this.toggleMenu(_41f,true); var _420=[]; var _421=this.m_oCV.getSelectionController(); var _422=_421.getAllSelectedObjects(); if(_422.length==1&&_422[0].isHomeCell()==false){ var _423=_421.getDataContainerType(); var _424=this.getContainerId(_421); var _425=this.getReportInfo(_424); if(_423==""&&!this.isSelectionOnChart()&&_422[0].getLayoutType()=="section"){ if(_425!=null){ _423=_425.displayTypeId; } } var _426,_427,_428; var _429=this.getCurrentSortFromSelection(); var _42a=this.isSelectionOnChart(); var _42b=_429.indexOf("sortByValue")!=-1; var _42c=_429.indexOf("sortByValueAscending")!=-1; var _42d=_429.indexOf("sortByValueDescending")!=-1; var _42e=this.m_oCV.isIWidgetMobile(); if(_423=="list"){ var _42f={name:"SortAscending",label:RV_RES.IDS_JS_SORT_ASCENDING,action:{name:"Sort",payload:{order:"ascending",type:"value"}},items:null}; this.addMenuItemChecked(_42c,_42f,"sortAscending"); _420.push(_42f); var _430={name:"SortDescending",label:RV_RES.IDS_JS_SORT_DESCENDING,action:{name:"Sort",payload:{order:"descending",type:"value"}},items:null}; this.addMenuItemChecked(_42d,_430,"sortDescending"); _420.push(_430); var _431={name:"DontSort",label:RV_RES.IDS_JS_DONT_SORT,action:{name:"Sort",payload:{order:"none",type:"value"}},items:null}; this.addMenuItemChecked(!_42b,_431,"sortNone"); _420.push(_431); }else{ if(_423=="crosstab"||_42a){ if(_422[0].getLayoutType()=="columnTitle"||_42a){ _426=this.m_oCV.getRAPReportInfo(); if(this.canSortByValueOnCrosstab(_422[0],_426)){ _427=RV_RES.IDS_JS_SORT_BY_VALUE; if(_42a){ _428=this.buildSelectedItemsString(_422,true,_425); if(typeof _428!=="undefined"){ _427+=":"+_428; } } var _432={name:"SortByValue",label:_427,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(_42b,_432); this.addMenuItemChecked(_42c,_432.items[0],"sortAscending"); this.addMenuItemChecked(_42d,_432.items[1],"sortDescending"); this.addMenuItemChecked(!_42b,_432.items[2],"sortNone"); if(_42e){ _432.flatten=true; } _420.push(_432); } if(this.canSortByLabelOnCrosstab(_422[0])){ _427=RV_RES.IDS_JS_SORT_BY_LABEL; if(_42a){ _428=this.buildSelectedItemsString(_422,false,_425); if(typeof _428!=="undefined"){ _427+=":"+_428; } } var _433={name:"SortByLabel",label:_427,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 _434=_429.indexOf("sortByLabel")!=-1; this.addMenuItemChecked(_434,_433); this.addMenuItemChecked(_429.indexOf("sortByLabelAscending")!=-1,_433.items[0],"sortAscending"); this.addMenuItemChecked(_429.indexOf("sortByLabelDescending")!=-1,_433.items[1],"sortDescending"); this.addMenuItemChecked(!_434,_433.items[2],"sortNone"); if(_42e){ _433.flatten=true; } _420.push(_433); } } } } } if(_420.length==0){ this.toggleMenu(_41f,false); }else{ if(_42e){ if(_423=="crosstab"||_42a){ _41f.useChildrenItems=true; }else{ _41f.flatten=true; } } _41f.items=_420; this.toggleMenu(_41f,true); } return _41f; }; SortAction.prototype.isSelectionSortable=function(){ var _435=this.m_oCV.getSelectionController(); var _436=_435.getAllSelectedObjects(); if(_436.length==1){ var _437=_436[0]; if(_435.getDataContainerType()=="crosstab"&&_437.getLayoutType()=="datavalue"){ return false; } if(_435.hasSelectedChartNodes()){ var node=_437.getArea(); if(node.nodeName=="AREA"||node.nodeName=="IMG"){ return _436[0].getLayoutType()=="ordinalAxisLabel"||_436[0].getLayoutType()=="legendLabel"; } }else{ var data=_437.getDataItems(); if(_437.getCellRef().getAttribute("type")=="datavalue"&&!(data&&data.length)){ return false; } var _43a=_437.getCellRef(); if(_43a.getAttribute("no_data_item_column")==="true"){ return false; } if(_43a.getAttribute("canSort")!="false"){ return true; } } } return false; }; SortAction.prototype.getCurrentSortFromSelection=function(){ var _43b=this.getContainerId(this.m_oCV.getSelectionController()); var _43c=this.m_oCV.getRAPReportInfo(); var _43d=""; if(_43b!=""&&_43c){ var _43e=_43c.getContainer(_43b); if(typeof _43e.sort!="undefined"){ var _43f=this.m_oCV.getSelectionController(); var _440=_43f.getAllSelectedObjects(); if(_440.length==1){ var _441=_440[0].getDataItems(); if(_441.length<1){ return _43d; } var _442=_441[0][0]; for(var _443=0;_443<_43e.sort.length;++_443){ var _444=_43e.sort[_443]; if(typeof _444.labels=="string"&&_444.labels==_442){ _43d+=_444.order=="descending"?"sortByLabelDescending":"sortByLabelAscending"; } if(typeof _444.valuesOf=="string"&&(_444.valuesOf==_442||this.isSortedValueOnRenamedColumn(_440[0],_444))){ _43d+=_444.order=="descending"?"sortByValueDescending":"sortByValueAscending"; }else{ if(_444.valuesOf instanceof Array){ var _445=true; for(var _446=0;_446<_444.valuesOf.length;++_446){ if(_446<_440[0].m_contextIds[0].length){ var ctx=_440[0].m_contextIds[0][_446]; var _448=_43f.getDisplayValue(ctx); var _449=this.findItemLabel(_43e,_444.valuesOf[_446].item); if(_449!=_448){ _445=false; break; } } } if(_445){ _43d+=_444.valuesOf[0].order=="descending"?"sortByValueDescending":"sortByValueAscending"; } } } } } } } return _43d; }; SortAction.prototype.isSortedValueOnRenamedColumn=function(_44a,_44b){ if(_44b&&_44a){ return (_44b.valuesOf===_44a.getColumnRP_Name()&&_44a.getLayoutType()==="columnTitle"); } }; SortAction.prototype.findItemLabel=function(_44c,item){ var _44e=_44c.itemInfo; if(_44e){ for(var i=0;i<_44e.length;i++){ if(_44e[i].item===item){ if(_44e[i].itemLabel){ return _44e[i].itemLabel; } break; } } } return item; }; SortAction.prototype.canSortByValueOnCrosstab=function(_450,_451){ var _452=this.m_oCV.getSelectionController(); var _453=this.getContainerId(this.m_oCV.getSelectionController()); if(_452.isRelational()==true){ return false; } if(_452.selectionsHaveCalculationMetadata()&&this.selectedObjectIsLeaf(_453,_450,_451)){ var _454=_450.getMuns()[0]; for(var _455=0;_455<_454.length;++_455){ if(_454[_455]!=null&&_454[_455].indexOf("uuid:")>=0){ return false; } } return true; } return false; }; SortAction.prototype.selectedObjectIsLeaf=function(_456,_457,_458){ if(_458){ var _459=_457.getDataItems(); if(_459!=null&&typeof _459!="undefined"&&_459.length>0){ var _45a=_458.getDrillability(_456,_459[0][0]); if(_45a){ return _45a.leaf==true; } } } return false; }; SortAction.prototype.canSortByLabelOnCrosstab=function(_45b){ var _45c=this.m_oCV.getSelectionController(); var _45d=_45c.getAllSelectedObjects(); if(_45d.length==1){ var _45b=_45d[0]; if(this.isSelectSingleMember(_45b)==false){ if(_45c.selectionsNonMeasureWithMUN()||!_45c.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 _45f=window.viewerCWAContainer?true:false; if(!window.viewerCWAContainer){ this.createCWAContainer(); } this.addWindowEventListeners(); this.buildBUAObjects(); window.viewerCWAContainer.show(); if(_45f){ window.BUAEvent("appReady"); } }; EditContentAction.prototype.createCWAContainer=function(){ this.deleteCWAContainer(); var _460=this.createCWAIFrame(); var _461=this.createBlocker(); window.viewerCWAContainer={"type":"iframe","containerDiv":_460,"blocker":_461,"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 _462=dojo.window.getBox(); this.containerDiv.style.height=_462.h-this.iframePadding+"px"; this.containerDiv.style.width=_462.w-this.iframePadding+"px"; }}; }; EditContentAction.prototype.deleteCWAContainer=function(){ var _463=window.viewerCWAContainer; if(_463){ _463.hide(); document.body.removeChild(_463.containerDiv); document.body.removeChild(_463.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 _464=document.createElement("div"); _464.className="buaContainer"; document.body.appendChild(_464); var _465=document.createElement("iframe"); _465.setAttribute("id","buaIframe"); _465.setAttribute("src",this.getWebContent()+"/pat/rsapp.htm"); _465.setAttribute("name","buaIframe"); _465.setAttribute("frameborder","0"); _465.className="buaIframe"; _464.appendChild(_465); return _464; }; EditContentAction.prototype.createBlocker=function(){ var _466=document.createElement("div"); _466.setAttribute("id","reportBlocker"); _466.setAttribute("name","reportBlocker"); _466.setAttribute("tabIndex","1"); _466.className="reportBlocker"; document.body.appendChild(_466); return _466; }; 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 _467=this.getViewerIWidget(); if(_467!==null){ var _468=_467.getAttributeValue("gateway"); if(_468){ window.RSParameters["cv.gateway"]=_468; } var _469=_467.getAttributeValue("webcontent"); if(_469){ window.RSParameters["cv.webcontent"]=_469; } } this.addExtraLaunchParameters(window.RSParameters); }; EditContentAction.prototype.getBUAIframe=function(){ return document.getElementById("buaIframe"); }; EditContentAction.prototype.getBUAWindow=function(){ var _46a=null; var _46b=this.getBUAIframe(); if(_46b!==null){ _46a=_46b.contentWindow; } return _46a; }; EditContentAction.prototype.setReportSettings=function(){ var oCV=this.getCognosViewer(); var _46d=oCV.getViewerWidget(); _46d.fireEvent("com.ibm.bux.widget.getDisplayTitle",null,{callback:function(_46e){ window.CVEditContentActionInstance.openReportWithBUA(_46e); }}); }; EditContentAction.prototype.openReportWithBUA=function(_46f){ var _470=this.m_oCV.envParams["ui.spec"].indexOf(""); if(_470==-1){ _470=0; }else{ _470="".length; } var _471=this.m_oCV.envParams["ui.spec"].substr(_470,this.m_oCV.envParams["ui.spec"].length); var _472={"displayName":xml_decode(_46f),"parameterValues":this.m_oCV.getExecutionParameters(),"reportXML":_471,"showOpenTransition":false}; if(this.ifPassTrackingtoBUA()){ _472.tracking=this.m_oCV.getTracking(); } var _473=this.getBUAWindow(); _473.Application.SetBUAContext(_472); }; 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(_474){ }; EditContentAction.prototype.runUpdatedReportFromBUA=function(){ var _475=this.getBUAWindow(); var _476=this.m_oCV.envParams["ui.spec"]; var _477=_475.Application.GetBUAContext(); if(_477.isSpecModified){ this.m_oCV.envParams["ui.spec"]=_477.reportXML; this.m_oCV.setTracking(_477.tracking); this.m_oCV.setExecutionParameters(_477.parameterValues); this._invokeRedrawAction(_476); } }; EditContentAction.prototype._invokeRedrawAction=function(_478){ this.getUndoRedoQueue().setOriginalSpec(_478); var _479=this.m_oCV.getAction("Redraw"); _479.setSpecUpdated(true); this.m_oCV.getViewerWidget().setPromptParametersRetrieved(false); _479.execute(); }; EditContentAction.prototype.ifPassTrackingtoBUA=function(){ if(this.m_oCV.getRAPReportInfo()){ return this.m_oCV.getRAPReportInfo().getPassTrackingtoBUA(); } return true; }; EditContentAction.prototype.setRequestParms=function(_47a){ EditContentAction.superclass.setRequestParms(_47a); if(_47a){ if(_47a.preferencesChanged){ this.preferencesChanged=_47a.preferencesChanged; } if(_47a.MissingMemberRecoveryMode){ this._oMissingMemberRecoveryMode=_47a.MissingMemberRecoveryMode; } } }; EditContentAction.prototype.runUpdatedReportFromBUA_MissingMemberRecoveryMode=function(){ var _47b=this.getBUAWindow(); var _47c=this.m_oCV.envParams["ui.spec"]; var _47d=_47b.Application.GetBUAContext(); this.m_oCV.setTracking(_47d.tracking); this.m_oCV.envParams["ui.spec"]=_47d.reportXML; this.m_oCV.setExecutionParameters(_47d.parameterValues); if(this._oMissingMemberRecoveryMode&&this._oMissingMemberRecoveryMode.oFaultDialog){ this._oMissingMemberRecoveryMode.oFaultDialog.hide(); } this._invokeRedrawAction(_47c); }; 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 _47e=window.viewerCWAContainer; if(_47e){ _47e.resize(); } }; function BUAEvent(_47f){ var _480=window.CVEditContentActionInstance; switch(_47f){ case "appReady": _480.setReportSettings(); break; case "donePressed": _480.hideCWAContainer(); if(_480._oMissingMemberRecoveryMode){ _480.runUpdatedReportFromBUA_MissingMemberRecoveryMode(); }else{ _480.runUpdatedReportFromBUA(); } break; case "cancelPressed": _480.cancelPressed(); _480.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(_481){ this.parent.setRequestParms.call(this,_481); this._packageSearchPath=_481.packageSearchPath; this._viewerIWidget=_481.viewerIWidget; this._webContentRoot=_481.webContentRoot; this._gateway=_481.gateway; this._capabilitiesXml=_481.capabilitiesXml; this._cafContextId=_481.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 _482={"showOpenTransition":false,"model":this._packageSearchPath}; var _483=this.getBUAWindow(); _483.Application.SetBUAContext(_482); }; NewReportAction.prototype.addExtraLaunchParameters=function(_484){ _484.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 _485=this.getViewerIWidget(); _485.setAttributeValue("reportCreatedInCW","true"); var _486=this.getBUAWindow().Application.GetBUAContext(); _485.setNewReportInfo({"ui.spec":_486.reportXML,"m_tracking":_486.tracking?_486.tracking:"","parameterValues":_486.parameterValues?_486.parameterValues:""}); _485.onLoad(); }; function AuthoredDrillAction(){ this.m_drillTargetSpecification=""; }; AuthoredDrillAction.prototype=new CognosViewerAction(); AuthoredDrillAction.prototype.setRequestParms=function(_487){ this.m_drillTargetSpecification=_487; }; AuthoredDrillAction.prototype.executeDrillTarget=function(_488){ var _489=XMLHelper_GetFirstChildElement(XMLBuilderLoadXMLFromString(_488)); var _48a=encodeURIComponent(_489.getAttribute("bookmarkRef")); var _48b=_489.getAttribute("path"); var _48c=this._shouldShowInNewWindow(_489); var oCV=this.getCognosViewer(); if((_48a!==null&&_48a!=="")&&(_48b===null||_48b==="")){ var _48e=_489.getAttribute("bookmarkPage"); if(_48e&&_48e!==""){ oCV.executeAction("GotoPage",{"pageNumber":_48e,"anchorName":_48a}); }else{ document.location="#"+_48a; } }else{ var _48f=""; if(_48c){ _48f="_blank"; } var _490=[]; var _491=[]; _491.push("obj"); _491.push(_48b); _490[_490.length]=_491; var _492=false; var _493,_494,_495,_496,sNil; var _498=XMLHelper_FindChildrenByTagName(_489,"drillParameter",false); for(var _499=0;_499<_498.length;++_499){ _493=[]; _494=_498[_499]; _495=_494.getAttribute("value"); _496=_494.getAttribute("name"); if(_495!==null&&_495!==""){ _493.push("p_"+_496); _493.push(this.buildSelectionChoicesSpecification(_494)); } sNil=_494.getAttribute("nil"); if(sNil!==null&&sNil!==""){ _493.push("p_"+_496); _493.push(this.buildSelectionChoicesNilSpecification()); } if(_493.length>0){ _490[_490.length]=_493; } if(!_492){ var _49a=_494.getAttribute("propertyToPass"); _492=(_49a&&_49a.length>0)?true:false; } } var _49b=_489.getAttribute("method"); var _49c=_489.getAttribute("outputFormat"); var _49d=_489.getAttribute("outputLocale"); var _49e=_489.getAttribute("prompt"); var _49f=_489.getAttribute("dynamicDrill"); var _4a0=this.getXMLNodeAsString(_489,"parameters"); var _4a1=this.getXMLNodeAsString(_489,"objectPaths"); var _4a2=oCV.getId(); var _4a3=document.forms["formWarpRequest"+_4a2]; var _4a4=oCV.getAdvancedServerProperty("VIEWER_JS_CALL_FORWARD_DRILLTHROUGH_TO_SELF"); if((!_4a4||_4a4.toLowerCase()!=="false")&&_49e!="true"&&this.isSameReport(_4a3,_48b)&&this.isSameReportFormat(_49c)&&!_48c&&!_492){ var _4a5=new ViewerDispatcherEntry(oCV); _4a5.addFormField("ui.action","forward"); if(oCV!==null&&typeof oCV.rvMainWnd!="undefined"){ oCV.rvMainWnd.addCurrentReportToReportHistory(); var _4a6=oCV.rvMainWnd.saveReportHistoryAsXML(); _4a5.addFormField("cv.previousReports",_4a6); } for(_499=0;_499<_498.length;++_499){ _493=[]; _494=_498[_499]; _495=_494.getAttribute("value"); _496=_494.getAttribute("name"); sNil=_494.getAttribute("nil"); if((sNil===null||sNil==="")&&(_495===null||_495==="")){ _493.push("p_"+_496); _493.push(this.buildSelectionChoicesNilSpecification()); } if(_493.length>0){ _490[_490.length]=_493; } } for(_499=1;_499<_490.length;_499++){ _4a5.addFormField(_490[_499][0],_490[_499][1]); } _4a5.addFormField("_drillThroughToSelf","true"); if(oCV.m_tabsPayload&&oCV.m_tabsPayload.tabs){ _4a5.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",oCV.m_tabsPayload.tabs[0].id); } oCV.setUsePageRequest(true); oCV.dispatchRequest(_4a5); if(typeof oCV.m_viewerFragment=="undefined"){ var _4a7=getCognosViewerObjectRefAsString(_4a2); setTimeout(_4a7+".getRequestIndicator().show()",10); } }else{ doSingleDrill(_48f,_490,_49b,_49c,_49d,_48a,_4a0,_4a1,this.getCognosViewer().getId(),_49e,_49f); } } }; AuthoredDrillAction.prototype._shouldShowInNewWindow=function(_4a8){ return _4a8.getAttribute("showInNewWindow")=="true"; }; AuthoredDrillAction.prototype.isSameReport=function(_4a9,_4aa){ if(_4a9["ui.object"]&&_4aa==_4a9["ui.object"].value){ return true; } return false; }; AuthoredDrillAction.prototype.isSameReportFormat=function(_4ab){ var _4ac=this.getCognosViewer().envParams["run.outputFormat"]; if(_4ac){ if(_4ab==_4ac){ return true; }else{ if(_4ac=="HTML"&&_4ab=="HTMLFragment"){ return true; } } } return false; }; AuthoredDrillAction.prototype.getXMLNodeAsString=function(_4ad,_4ae){ var sXML=""; if(_4ad!=null){ var node=XMLHelper_FindChildByTagName(_4ad,_4ae,false); if(node!=null){ sXML=XMLBuilderSerializeNode(node); } } return sXML; }; AuthoredDrillAction.prototype.execute=function(_4b1){ if(this.m_drillTargetSpecification!=""){ this.executeDrillTarget(this.m_drillTargetSpecification); }else{ if(typeof _4b1!="undefined"){ var _4b2=this.getCognosViewer().getDrillTargets(); var _4b3=this.getAuthoredDrillThroughContext(_4b1,_4b2); var _4b4=_4b3.childNodes; if(_4b4.length==1){ this.executeDrillTarget(XMLBuilderSerializeNode(_4b4[0])); }else{ doMultipleDrills(XMLBuilderSerializeNode(_4b3),this.getCognosViewer().getId()); } } } }; AuthoredDrillAction.prototype.showDrillTargets=function(_4b5){ var _4b6=""; for(var _4b7=0;_4b7<_4b5.length;++_4b7){ var _4b8=_4b5[_4b7]; _4b6+=""; var _4b9=_4b8.getAttribute("label"); _4b6+=""; _4b6+=sXmlEncode(_4b9); _4b6+=""; var _4ba=_4b8.getAttribute("path"); _4b6+=""; _4b6+=sXmlEncode(_4ba); _4b6+=""; var _4bb=_4b8.getAttribute("method"); _4b6+=""; _4b6+=sXmlEncode(_4bb); _4b6+=""; var _4bc=_4b8.getAttribute("outputFormat"); _4b6+=""; _4b6+=sXmlEncode(_4bc); _4b6+=""; var _4bd="parent."+this.getTargetReportRequestString(_4b8); _4b6+=""; _4b6+=sXmlEncode(_4bd); _4b6+=""; _4b6+=""; } _4b6+=""; }; AuthoredDrillAction.prototype.populateContextMenu=function(_4be){ var _4bf=this.getCognosViewer(); var _4c0=_4bf.rvMainWnd.getToolbarControl(); var _4c1=null; if(typeof _4c0!="undefined"&&_4c0!=null){ var _4c2=_4c0.getItem("goto"); if(_4c2){ _4c1=_4c2.getMenu(); } } var _4c3=_4bf.rvMainWnd.getContextMenu(); var _4c4=null; if(typeof _4c3!="undefined"&&_4c3!=null){ _4c4=_4c3.getGoToMenuItem().getMenu(); } if(_4c1!=null||_4c4!=null){ var _4c5=this.getCognosViewer().getDrillTargets(); var _4c6=this.getAuthoredDrillThroughContext(_4be,_4c5); var _4c7=_4c6.childNodes; if(_4c7.length>0){ for(var _4c8=0;_4c8<_4c7.length;++_4c8){ var _4c9=_4c7[_4c8]; var _4ca=getCognosViewerObjectRefAsString(this.getCognosViewer().getId())+".m_oDrillMgr.executeAuthoredDrill(\""+encodeURIComponent(XMLBuilderSerializeNode(_4c9))+"\");"; var _4cb=this.getTargetReportIconPath(_4c9); var _4cc=_4c9.getAttribute("label"); if(isViewerBidiEnabled()){ var bidi=BidiUtils.getInstance(); _4cc=bidi.btdInjectUCCIntoStr(_4cc,getViewerBaseTextDirection()); } if(_4c1!=null){ new CMenuItem(_4c1,_4cc,_4ca,_4cb,gMenuItemStyle,_4bf.getWebContentRoot(),_4bf.getSkin()); } if(_4c4!=null){ new CMenuItem(_4c4,_4cc,_4ca,_4cb,gMenuItemStyle,_4bf.getWebContentRoot(),_4bf.getSkin()); } } } } }; AuthoredDrillAction.prototype.buildSelectionChoicesNilSpecification=function(){ return ""; }; AuthoredDrillAction.prototype.buildSelectionChoicesSpecification=function(_4ce){ var _4cf=""; var _4d0=_4ce.getAttribute("value"); if(_4d0!=null){ var _4d1=_4ce.getAttribute("propertyToPass"); _4cf+="")!=-1){ _4cf+=_4d0.substring(_4d0.indexOf("")+15); }else{ if(_4d0!=""){ _4cf+="=_4f4.length){ continue; } var _4ff=_4f4[_4fe]; if(typeof _4ff!="object"){ continue; } _4fb.setAttribute("outputFormat",_4ff.getOutputFormat()); _4fb.setAttribute("outputLocale",_4ff.getOutputLocale()); _4fb.setAttribute("prompt",_4ff.getPrompt()); _4fb.setAttribute("dynamicDrill",_4ff.isDynamicDrillThrough()?"true":"false"); var _500=_4f8[_4fa].getAttribute("label"); if(_500===null||_500===""){ _500=_4ff.getLabel(); } _4fb.setAttribute("label",_500); _4fb.setAttribute("path",_4ff.getPath()); _4fb.setAttribute("showInNewWindow",_4ff.getShowInNewWindow()); _4fb.setAttribute("method",_4ff.getMethod()); var _501=_4f7; var _502=""; var _503=_4ff.getParameterProperties(); if(typeof _503!="undefined"&&_503!=null&&_503!=""){ _502=XMLHelper_GetFirstChildElement(XMLBuilderLoadXMLFromString(_4ff.getParameterProperties())); } while(_501){ var _504=_501.childNodes[_4fa].childNodes; for(var _505=0;_505<_504.length;++_505){ var _506=_504[_505].cloneNode(true); if(_502){ var _507=this.getPropertyToPass(_506.getAttribute("name"),_502); if(_507!=null&&_507!=""){ _506.setAttribute("propertyToPass",_507); } } _4fb.appendChild(_506); } _501=_501.nextSibling; } var _508=""; var _509=""; var _50a=_508+_4ff.getParameters()+_509; var _50b=XMLBuilderLoadXMLFromString(_50a); var _50c=XMLHelper_GetFirstChildElement(XMLHelper_GetFirstChildElement(_50b)); if(_50c){ _4fb.appendChild(_50c.cloneNode(true)); } var _50d=_508+_4ff.getObjectPaths()+_509; var _50e=XMLBuilderLoadXMLFromString(_50d); _50c=XMLHelper_GetFirstChildElement(XMLHelper_GetFirstChildElement(_50e)); if(_50c){ _4fb.appendChild(_50c.cloneNode(true)); } } return XMLHelper_GetFirstChildElement(_4f9); }; 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(_50f){ this.m_requestParams=_50f; }; ChangeDisplayTypeAction.prototype.addActionContextAdditionalParms=function(){ this._cleaerPinAndFreeze(); var _510=false; if(this.m_requestParams.bestVisualization){ _510=true; }else{ if(((this.m_requestParams.targetType.targetType==undefined)||(this.m_requestParams.targetType.targetType=="undefined"))&&(this.m_requestParams.targetType.templateId==undefined)){ var _511=eval("("+this.m_requestParams.targetType+")"); }else{ var _511=this.m_requestParams.targetType; } } var _512=this.m_oCV.getViewerWidget().findContainerDiv(); var _513=""; if(_512){ _513=""+(parseInt(_512.style.width,10)-ResizeChartAction.PADDING.getWidth())+"px"+""+(parseInt(_512.style.height,10)-ResizeChartAction.PADDING.getHeight())+"px"; } var _514=""; if(_510){ _514+="true"; _514+=this.getDataItemInfoMap(); }else{ _514+=""; _514+=_511.targetType; _514+=""; if(_511.templateId){ _514+=""; _514+=((_511.templateId)?_511.templateId:""); _514+=""; _514+=""; _514+=((_511.variationId)?_511.variationId:""); _514+=""; _514+=this.getDataItemInfoMap(); } _514+=""; } _514+=_513; _514+=this.addClientContextData(3); return (_514); }; ChangeDisplayTypeAction.prototype._cleaerPinAndFreeze=function(){ var _515=this.m_oCV.getPinFreezeManager(); if(_515){ var _516=this.getContainerId(this.m_oCV.getSelectionController()); _515.clearPinInfo(_516); } }; ChangeDisplayTypeAction.prototype.updateMenu=function(_517){ var _518=this.getCognosViewer().getRAPReportInfo(); _517.visible=(_518)?_518.containsInteractiveDataContainer():_517.visible; if(!_517.visible){ return _517; } var _519=this.getSelectedReportInfo(); _517.disabled=(_519==null||_519.displayTypeId==null||!this.isInteractiveDataContainer(_519.displayTypeId)); if(_517.disabled){ _517.iconClass="chartTypesDisabled"; return _517; } _517.iconClass="chartTypes"; return this.buildDynamicMenuItem(_517,"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(_51a){ var _51b=""; _51b+=""; _51b+=""; _51b+=this.getDataItemInfoMap(); _51b+=""; _51b+=_51a; _51b+=""; _51b+=this.addClientContextData(3); _51b+=""; _51b+=""; return _51b; }; ChangeDisplayTypeAction.prototype.fetchSuggestedDisplayTypes=function(_51c){ var oCV=this.getCognosViewer(); var _51e=new AsynchJSONDispatcherEntry(oCV); _51e.addFormField("ui.action","getInfoFromReportSpec"); _51e.addFormField("bux","true"); _51e.addFormField("ui.object",oCV.envParams["ui.object"]); _51e.addFormField("cv.actionContext",this.getActionContextString(_51c)); _51e.addDefinedFormField("ui.spec",oCV.envParams["ui.spec"]); _51e.addNonEmptyStringFormField("modelPath",oCV.getModelPath()); if(_51c=="undefined"){ _51e.setCallbacks({"complete":{"object":this,"method":this.handleSuggestedDisplayTypesResponse}}); }else{ _51e.setCallbacks({"complete":{"object":this,"method":this.handleSuggestedDisplayVariationsResponse}}); } oCV.dispatchRequest(_51e); }; ChangeDisplayTypeAction.prototype.handleSuggestedDisplayTypesResponse=function(_51f){ var _520=this.getCognosViewer(); var _521=_520.getViewerWidget(); this.addSuggestedDisplayTypesMenuItems(_51f.getResult()); }; ChangeDisplayTypeAction.prototype.addSuggestedDisplayTypesMenuItems=function(_522){ var _523=this.getCognosViewer().findToolbarItem("ChangeDisplayType"); if(_523){ _523.open=false; } var _524=[]; var _525=this.getSelectedReportInfo(); var _526=undefined; for(var x=0;x<_522.containers.length;x++){ if(_525.container==_522.containers[x].container){ _526=_522.containers[x]; break; } } if(_526==undefined){ return; } var _528=_526.suggestedDisplayTypes.length<=this.m_iMAX_NUM_SUGGESTED_DISPLAY_TYPES?_526.suggestedDisplayTypes.length:this.m_iMAX_NUM_SUGGESTED_DISPLAY_TYPES; _524.push({title:RV_RES.IDS_JS_CHANGE_DISPLAY_RECOMMENDED}); _524.push({separator:true}); for(var i=0;i<_528;i++){ _524.push({name:_526.suggestedDisplayTypes[i].name,label:_526.suggestedDisplayTypes[i].title,description:_526.suggestedDisplayTypes[i].description,iconClass:_526.suggestedDisplayTypes[i].iconClass,action:{name:"ChangeDisplayType",payload:{targetType:{templateId:_526.suggestedDisplayTypes[i].templateId},label:_526.suggestedDisplayTypes[i].title}},items:null}); } _524.push({separator:true}); _524.push({name:"ChangeDisplayMore",label:RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_MORE,iconClass:"ChartTypeOther",action:{name:"InvokeChangeDisplayTypeDialog",payload:{}},items:null}); _523.open=true; _523.items=_524; var _52a=[]; _52a.push(_523); this.getCognosViewer().getViewerWidget().fireEvent("com.ibm.bux.widgetchrome.toolbar.update",null,_52a); return _524; }; ChangeDisplayTypeAction.prototype.buildMenu=function(_52b){ var _52c=this.getCognosViewer().getRAPReportInfo(); _52b.visible=(_52c)?_52c.containsInteractiveDataContainer():_52b.visible; if(!_52b.visible){ return _52b; } var _52d=this.getSelectedReportInfo(); _52b.disabled=(_52d==null||_52d.displayTypeId==null||!this.isInteractiveDataContainer(_52d.displayTypeId)); if(_52b.disabled){ _52b.iconClass="chartTypesDisabled"; }else{ _52b.iconClass="chartTypes"; var _52e=this.getCognosViewer().getAdvancedServerProperty("VIEWER_JS_enableVisCoach"); if(_52e!=="false"&&(typeof _52d.suggestedDisplayTypesEnabled!="undefined")&&(_52d.suggestedDisplayTypesEnabled!=null)&&(_52d.suggestedDisplayTypesEnabled=="true")){ this.fetchSuggestedDisplayTypes("undefined"); return this.buildDynamicMenuItem(_52b,"ChangeDisplayType"); }else{ _52b.items=[]; var isV2=(_52d.displayTypeId.match("v2_")!=null||_52d.displayTypeId=="crosstab"||_52d.displayTypeId=="list"); if(isV2){ _52b.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}); _52b.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}); _52b.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}); _52b.items.push({name:"ChangeDisplayPie",label:RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_PIE,iconClass:"ChartTypePie",action:{name:"ChangeDisplayType",payload:{targetType:"v2_pie"}},items:null}); _52b.items.push({name:"ChangeDisplayCrosstab",label:RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_CROSSTAB,iconClass:"ChartTypeCrosstab",action:{name:"ChangeDisplayType",payload:{targetType:"Crosstab"}},items:null}); _52b.items.push({name:"ChangeDisplayList",label:RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_LIST,iconClass:"ChartTypeList",action:{name:"ChangeDisplayType",payload:{targetType:"List"}},items:null}); _52b.items.push({name:"ChangeDisplayMore",label:RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_MORE,iconClass:"ChartTypeOther",action:{name:"InvokeChangeDisplayTypeDialog",payload:""},items:null}); }else{ _52b.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}); _52b.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}); _52b.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}); _52b.items.push({name:"ChangeDisplayPie",label:RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_PIE,iconClass:"ChartTypePie",action:{name:"ChangeDisplayType",payload:{targetType:"pie_flat"}},items:null}); _52b.items.push({name:"ChangeDisplayCrosstab",label:RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_CROSSTAB,iconClass:"ChartTypeCrosstab",action:{name:"ChangeDisplayType",payload:{targetType:"Crosstab"}},items:null}); _52b.items.push({name:"ChangeDisplayList",label:RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_LIST,iconClass:"ChartTypeList",action:{name:"ChangeDisplayType",payload:{targetType:"List"}},items:null}); _52b.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 _52b.items){ _52b.items[i].action.payload={targetType:_52b.items[i].action.payload}; _52b.items[i].action.payload.targetType.label=_52b.items[i].label; } } return _52b; }; function ChangeDisplayVariationsAction(){ }; ChangeDisplayVariationsAction.prototype=new CognosViewerAction(); function ChangeDisplayVariationsAction(){ this.m_requestParams=null; }; ChangeDisplayVariationsAction.prototype.setRequestParms=function(_531){ this.m_requestParams=_531; }; ChangeDisplayVariationsAction.prototype.execute=function(){ var _532=this.m_requestParams.groupId; var _533=this.getCognosViewer(); var _534=this.getSelectedReportInfo(); if(_534){ var _535=_533.getViewerWidget(); if(typeof _534.suggestedDisplayVariations=="undefined"){ var _536=new AsynchJSONDispatcherEntry(this.m_oCV); _536.setCallbacks({"complete":{"object":this,"method":this.handleResponse}}); _536.setRequestIndicator(_533.getRequestIndicator()); _536.addFormField("ui.action","getInfoFromReportSpec"); _536.addFormField("bux","true"); _536.addNonEmptyStringFormField("modelPath",this.m_oCV.getModelPath()); _536.addFormField("ui.object",this.m_oCV.envParams["ui.object"]); _536.addDefinedFormField("ui.spec",this.m_oCV.envParams["ui.spec"]); _536.addFormField("cv.actionContext",this.addActionContext(_532)); _533.dispatchRequest(_536); }else{ _535.updateDisplayTypeDialogVariations(_534.possibleDisplayTypes,_534.suggestedDisplayVariations); } } }; ChangeDisplayVariationsAction.prototype.handleResponse=function(_537){ var _538=this.getCognosViewer(); var _539=_538.getViewerWidget(); var _53a=_537.getResult(); for(var i in _53a.containers){ var _53c=this.getReportInfo(_53a.containers[i].container); _53c.possibleDisplayTypes=_53a.containers[i].possibleDisplayTypes; _53c.variationGroups=_53a.containers[i].variationGroups; } var _53d=this.getSelectedReportInfo(); _539.updateDisplayTypeDialogVariations(_53d.possibleDisplayTypes,_53d.variationGroups); }; ChangeDisplayVariationsAction.prototype.addActionContext=function(_53e){ var _53f=""; _53f+=""; _53f+=""; _53f+=this.getDataItemInfoMap(); _53f+=this.addClientContextData(3); _53f+=""; _53f+=_53e; _53f+=""; _53f+=""; _53f+=""; return _53f; }; 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 _540=this.getLayoutComponents(); for(var _541=0;_541<_540.length;++_541){ var _542=_540[_541]; if(_542.getAttribute("flashChart")!=null){ if(this.m_palette==""){ _542.setPalette("Flow"); }else{ _542.setPalette(this.m_palette); } } } } }; ChangePaletteAction.prototype.updateRunReport=function(){ this.m_runReport=true; var _543=document.getElementById("rt"+this.m_oCV.getId()); if(_543!=null){ var _544=getElementsByAttribute(_543,"*","chartcontainer","true"); if(_544.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(_545){ if(typeof _545=="string"){ this.m_palette=_545; if(this.m_oCV!=null&&typeof this.m_oCV!="undefined"){ this.m_oCV.m_sPalette=_545; } } }; ChangePaletteAction.prototype.addActionContextAdditionalParms=function(){ if(this.m_palette!=""){ return ""+this.m_palette+""; } return ""; }; ChangePaletteAction.prototype.updateMenu=function(_546){ _546.visible=this.ifContainsInteractiveDataContainer(); if(!_546.visible){ return _546; } var _547=this.getSelectedReportInfo(); if(_547!=null&&_547.displayTypeId.indexOf("Chart")>=0){ _546.disabled=false; return _546; } _546.disabled=true; return _546; }; 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(_549){ var _54a=document.getElementById("rt"+this.getCognosViewer().getId()); var _54b=_549; var _54c=0; var _54d=0; while(_54b!=_54a){ _54c+=_54b.offsetTop; _54d+=_54b.offsetLeft; _54b=_54b.offsetParent; } return {left:_54d,top:_54c}; }; DragDropAction.prototype.showDragDropCaret=function(evt,cell,_550){ var _551=document.getElementById("VDDC"+this.getCognosViewer().getId()); if(_551==null){ _551=document.createElement("span"); _551.setAttribute("id","VDDC"+this.getCognosViewer().getId()); _551.className="dropCaret"; if(_551.attachEvent){ _551.attachEvent("onmousemove",stopEventBubble); }else{ _551.addEventListener("mousemove",stopEventBubble,false); } _551.style.width="8px"; _551.innerHTML=""; _550.appendChild(_551); } var _552=this.getOffsetCoords(_550); _551.style.top=(_552.top-1)+"px"; var _553; if(typeof evt.offsetX=="undefined"){ _553=evt.layerX; }else{ _552=this.getOffsetCoords(evt.srcElement); _553=evt.offsetX+_552.left; } _552=this.getOffsetCoords(cell); var _554=_552.left+(cell.clientWidth/2); this.m_insertBefore=(_553<_554); _551.style.height=_550.clientHeight+"px"; if(this.m_insertBefore==false){ _551.style.left=(_552.left+cell.clientWidth+1)+"px"; }else{ _551.style.left=_552.left+"px"; } _551.style.display="inline"; }; DragDropAction.prototype.showDragDropIndicators=function(evt){ if(this.m_target!=null){ var cell=this.m_target.getCellRef(); var _557=cell; while(_557.getAttribute("lid")==null){ _557=_557.parentNode; } this.showDragDropCaret(evt,cell,_557); } }; DragDropAction.prototype.showDragDropToolTip=function(evt){ var _559=""; if(this.canDrop()==true){ _559="/rv/images/cursor_move.gif"; }else{ _559="/rv/images/cursor_nodrop.gif"; } this.showCustomCursor(evt,"viewerTooltipSpan",_559); }; DragDropAction.prototype.canMove=function(){ if(this.m_oCV.isBlacklisted("Move")){ return false; } var _55a=this.getCognosViewer().getSelectionController(); this.m_source=_55a.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 _55c=getNodeFromEvent(evt); var _55d=this.getCognosViewer().getSelectionController(); this.m_target=_55d.buildSelectionObject(_55c,evt); this.showDragDropToolTip(evt); if(this.canDrop()){ this.showDragDropIndicators(evt); }else{ this.hideDropIndicators(); } }; DragDropAction.prototype.hideDropIndicators=function(){ var _55e=document.getElementById("VDDC"+this.getCognosViewer().getId()); if(_55e!=null){ _55e.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 _561=true; var _562; var _563=parseInt(this.m_source[0].getColumnRef(),10); var last=_563; var _565=true; for(var _566=0;_5660&&_562!==last+1){ _565=false; break; } last=_562; } if(_565){ var _567=parseInt(this.m_target.getColumnRef(),10); _567+=this.m_insertBefore?0:1; if(_567>=_563&&_567<=last+1){ _561=false; } } if(_561){ this.execute(); } } }; DragDropAction.prototype.addActionContextAdditionalParms=function(){ var tag=this.m_insertBefore==true?"before":"after"; var _569=this.m_target.getCellRef(); var _56a=this.getRAPLayoutTag(_569); _56a=(_56a!=null)?_56a:this.m_target.getColumnName(); return this.getSelectedCellTags()+"<"+tag+">"+xml_encode(_56a)+""; }; function DragDropAction_isDragging(evt){ var _56c=window.oCVDragDropObject; if(_56c){ var _56d=evt.clientX; var _56e=evt.clientY; var _56f=_56c.x; var _570=_56c.y; if((_56d>=(_56f+2))||(_56d<=(_56f-2))||(_56e>=(_570+2))||(_56e<=(_570-2))){ _56c.dragging=true; } return _56c.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(_573){ if(_573){ this.m_userSelectedDrillItem=_573.userSelectedDrillItem; } }; DrillAction.prototype.setKeepFocusOnWidget=function(_574){ this.m_bKeepFocusOnWidget=_574; }; DrillAction.prototype.keepFocusOnWidget=function(){ if(typeof this.m_bKeepFocusOnWidget!="undefined"){ return this.m_bKeepFocusOnWidget; } return true; }; DrillAction.prototype.getDrillabilityForItemFromReportInfo=function(_575){ if(!this.m_oCV){ return null; } var _576=this.m_oCV.getRAPReportInfo(); if(!_576){ return null; } var _577=_576.getContainers(); for(var _578 in _577){ var _579=_576.getDrillability(_578); if(_579[_575]){ return _579[_575]; } } return null; }; DrillAction.prototype.onDoubleClick=function(evt){ this.execute(); }; DrillAction.prototype.preProcess=function(){ if(typeof this.m_drillSpec==="undefined"||this.m_drillSpec===null){ var _57b=this.generateDrillSpecObjects(); if(!_57b){ return null; } var _57c=this.getCognosViewer(); var _57d=_57c.getViewerWidget(); if(_57d){ var _57e=_57c.getModelPath(); _57d.getWidgetContextManager().raiseDrillEvent(_57b,this.m_sAction,_57e); } } }; DrillAction.prototype.generateDrillSpecObjects=function(){ try{ var _57f=[]; var oCV=this.getCognosViewer(); var _581=oCV.getDrillMgr(); var _582=oCV.getSelectionController(); var _583=true; var _584=_581.getDrillParameters(this.m_drillOption,true,_583,this.m_userSelectedDrillItem); if(_584.length===0){ return null; } var _585=_581.getSelectedObject(); if(_584.length>3*4&&(_585.getDataContainerType()=="crosstab"||_585.getLayoutType()=="chartElement")){ _584.length=3*4; } var _586=_581.getSelectedObject().getSelectedContextIds(); for(var i=0,_588=0;_588<_586.length&&i<_584.length;++_588){ var _589=_586[_588][0]; var _58a=_582.getRefDataItem(_589); var sMUN=_582.getMun(_589); var _58c=_582.getDisplayValue(_589); if(_582.getDrillFlagForMember(_589)===0){ i=i+4; continue; } var _58d={"dataItem":_584[i++],"mun":_584[i++],"lun":_584[i++],"hun":_584[i++]}; if(_58a!=""&&_58c!=""){ if(_58d.dataItem===_58a){ _58d.displayValue=_58c; } } var _58e=_582.getUsageInfo(_589); _58d.isMeasure=(_58e==="2")?"true":"false"; var _58f=false; if(sMUN!=""&&_58e!="2"){ var _590=this.getDrillabilityForItemFromReportInfo(_58a); if((_590!=null&&_590.disableDown==true)||this.m_oCV.getSelectionController().getDrillFlagForMember(_589)==1){ _58f=true; } } if(_58f){ if(_58d.dataItem===_58a){ _58d.summary="true"; } } _57f.push(_58d); } return (_57f.length>0)?_57f: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 _593=XMLBuilderLoadXMLFromString(this.m_drillSpec); var _594=_593.firstChild; var _595=getCognosViewerSCObjectRef(oCV.getId()); _595.m_aSelectedObjects=[]; if(_595.hasSelectedChartNodes()){ _595.clearSelectionData(); } var _596=XMLHelper_FindChildrenByTagName(_594,"DrillGroup",false); for(var _597=0;_597<_596.length;++_597){ var _598=XMLHelper_FindChildByTagName(_596[_597],"MUN",false); var sMun=XMLHelper_GetText(_598); var sLun=""; var sHun=""; var _59c=""; var _59d=""; var _59e=XMLHelper_FindChildByTagName(_596[_597],"DisplayValue",false); if(_59e!=null){ _59c=XMLHelper_GetText(_59e); } var _59f=XMLHelper_FindChildByTagName(_596[_597],"LUN",false); if(_59f!=null){ sLun=XMLHelper_GetText(_59f); } var _5a0=XMLHelper_FindChildByTagName(_596[_597],"HUN",false); if(_5a0!=null){ sHun=XMLHelper_GetText(_5a0); } var _5a1=XMLHelper_FindChildByTagName(_596[_597],"Summary",false); if(_5a1!=null){ _59d=XMLHelper_GetText(_5a1); } this.selectObject(sMun,sLun,sHun,_59c,_59d,_595); } } catch(e){ return false; } return (_595.m_aSelectedObjects.length>0); }; DrillAction.prototype.parseDrillSpecObjects=function(_5a2){ if(this.useReportInfoSelection()){ return this.parseDrillSpecObjectsWithReportInfo(_5a2); } try{ var oCV=this.getCognosViewer(); if(oCV.getStatus()!=="complete"||oCV.getConversation()===""){ return false; } this.m_drillSpec=""; var _5a4=getCognosViewerSCObjectRef(oCV.getId()); _5a4.m_aSelectedObjects=[]; if(_5a4.hasSelectedChartNodes()){ _5a4.clearSelectionData(); } for(var i in _5a2){ var _5a6=_5a2[i]; var _5a7=(_5a6.summary)?_5a6.summary:""; var _5a8=true; this.selectObject(_5a6.mun,_5a6.lun,_5a6.hun,_5a6.displayValue,_5a7,_5a4,_5a8); } } catch(e){ return false; } return (_5a4.m_aSelectedObjects.length>0); }; DrillAction.prototype.getDrillabilityForCtxValue=function(_5a9){ if(console&&console.log){ console.log("Required method, getDrillabilityForCtxValue, not implemented."); } }; DrillAction.prototype.setDrillabilityForSelectObject=function(_5aa){ this.drillability=this.getDrillabilityForCtxValue(_5aa); }; 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,_5ae,_5af,_5b0,_5b1){ var _5b2=sHun; var _5b3=sLun; var _5b4=sMun; var _5b5=false; var _5b6=_5b0.getCtxIdFromMun(sMun); var _5b7=_5b6; if(_5b6===""){ var _5b8=_5b0.replaceNamespaceForSharedTM1DimensionOnly(sLun,sHun,sMun); _5b3=_5b8.lun; _5b2=_5b8.hun; if(_5b2!==sHun){ _5b4=this._replaceNamespace(sMun,_5b2); } _5b5=(_5b1==true); _5b6=_5b0.getCtxIdFromMetaData(_5b3,_5b2,_5b5); if(_5b6===""){ return false; } } this.setDrillabilityForSelectObject(_5b6); if((_5b5==true)||(this.m_sAction=="DrillDown"&&this.canDrillDown())||(this.m_sAction=="DrillUp"&&this.canDrillUp())){ var _5b9=_5b0.getSelections().length; _5b0.selectObject(_5b4,_5b3,_5b2,_5b5); var _5ba=_5b0.getSelections(); if(_5b7===""&&_5ba.length>_5b9){ var _5bb=_5ba[_5ba.length-1].m_aMuns; _5bb[_5bb.length]=[]; _5bb[_5bb.length-1].push(_5b4); var _5bc=_5ba[_5ba.length-1].m_aDisplayValues; _5bc.push(_5ae); _5ba[_5ba.length-1].useDisplayValueFromObject=true; } if(_5af=="true"){ _5ba=_5b0.getSelections(); _5ba[_5ba.length-1].onSummary=true; } } }; DrillAction.prototype._replaceNamespace=function(mun,_5be){ var _5bf=null; if(_5be){ var _5c0=_5be.substr(0,_5be.indexOf("].[")+1); if(mun&&_5c0&&!(mun.match("^"+_5c0))){ var _5c1=mun.indexOf("].["); _5bf=_5c0+mun.substr(_5c1+1,mun.length); } } return _5bf||mun; }; DrillAction.prototype.addActionContextAdditionalParms=function(){ var _5c2=""; var _5c3=(this.useReportInfoSelection())?this.m_aDrillSelectedObjects:this.getCognosViewer().getSelectionController().getSelections(); var _5c4=null; for(var i=0;i<_5c3.length;++i){ if(_5c3[i].onSummary){ _5c4=(this.useReportInfoSelection())?_5c3[i].item:_5c3[i].getDataItems()[0][0]; _5c2+=""+xml_encode(_5c4)+""; } } if(_5c2!=""){ _5c2=""+_5c2+""; } if(this.m_userSelectedDrillItem){ _5c2+=(""+this.m_userSelectedDrillItem+""); } if(this.m_useMARequest===true){ _5c2=_5c2+"false"; _5c2=_5c2+"false"; } _5c2+=this.addClientContextData(3); return _5c2; }; DrillAction.prototype.getDrillOptionsAsString=function(){ var _5c6=this.getViewerWidget(); var _5c7=""; if(_5c6){ _5c7=""+_5c6.getDrillOptions().addSummaryMembers+""; _5c7=_5c7+""+_5c6.getDrillOptions().backwardsCompatible+""; } return _5c7; }; DrillAction.prototype.getItemInfo=function(_5c8,_5c9){ var _5ca=_5c8.getRAPReportInfo(); if(!_5ca){ return null; } var _5cb=_5ca.getContainers(); for(var _5cc in _5cb){ var _5cd=_5ca.getItemInfo(_5cc); if(_5cd[_5c9]){ return _5cd[_5c9]; } } return null; }; DrillAction.prototype.isSelectionFilterEnabled=function(){ var _5ce=this.getViewerWidget(); if(!_5ce){ return false; } return _5ce.isSelectionFilterEnabled(); }; DrillAction.prototype.getHierarchyHasExpandedSet=function(_5cf,_5d0){ var _5d1=this.getItemInfo(_5cf,_5d0); return (_5d1&&_5d1.hierarchyHasExpandedMembers); }; DrillAction.prototype.getIsRSDrillParent=function(_5d2,_5d3){ var _5d4=this.getItemInfo(_5d2,_5d3); return (_5d4&&_5d4.isRSDrillParent); }; DrillAction.prototype.setUseReportInfoSelection=function(_5d5){ this.m_bUseReportInfoSelection=_5d5; }; DrillAction.prototype.useReportInfoSelection=function(){ return this.m_bUseReportInfoSelection; }; DrillAction.prototype.parseDrillSpecObjectsWithReportInfo=function(_5d6){ try{ var _5d7=this.m_oCV.getRAPReportInfo(); if(!_5d7){ return null; } this.m_drillSpec=""; this.m_aDrillSelectedObjects=[]; for(var i in _5d6){ this.populateSelectObjectWithReportInfo(_5d6[i],_5d7); } } catch(e){ return false; } return (this.m_aDrillSelectedObjects.length>0); }; DrillAction.prototype.populateSelectObjectWithReportInfo=function(_5d9,_5da){ var _5db=_5da.getItemDetails(_5d9.dataItem,_5d9.hun); if(!_5db){ _5db=_5da.getItemDetailsByHun(_5d9.hun); if(!_5db){ return null; } } if(_5d9.mun){ _5db.mun=_5d9.mun; } if(_5d9.lun){ _5db.lun=_5d9.lun; } if(_5d9.displayValue){ _5db.displayValue=_5d9.displayValue; } if(_5d9.isMeasure==="true"){ _5db.isMeasure=true; } if(_5d9.summary==="true"){ _5db.onSummary=true; } this.m_aDrillSelectedObjects.push(_5db); }; 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 _5dc=""; for(var idx in this.m_aDrillSelectedObjects){ var obj=this.m_aDrillSelectedObjects[idx]; _5dc+=""; _5dc+=(""+obj.item+""+""+obj.displayValue+""+""+obj.lid+""+""+obj.queryName+""); if(obj.mun){ _5dc+=(""+obj.mun+""); _5dc+=("memberUniqueName"); } if(obj.hun){ _5dc+=(""+obj.hun+""); } var _5df=(obj.isMeasure)?"measure":"nonMeasure"; _5dc+=(""+_5df+""); _5dc+=""; } return (""+_5dc+""); }; 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(_5e0,_5e1){ this.m_oCV=_5e0; var _5e2=_5e1.getAttribute("ctx"); this.drillability=0; if(_5e2){ var _5e3=_5e2.split("::"); if(_5e3&&_5e3.length>0){ if(_5e3.length>2){ this.drillability=this.getDrillabilityForIntersection(_5e3[1].split(":")[0],_5e3[2].split(":")[0]); }else{ if(_5e3.length===2){ this.drillability=this.getDrillabilityForCtxValue(_5e3[1].split(":")[0]); }else{ this.drillability=this.getDrillabilityForCtxValue(_5e3[0].split(":")[0]); } } } } if(this.isDefaultDrillUp(_5e1)){ 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 _5e4=this.m_oCV.getSelectionController(); var _5e5=_5e4.getAllSelectedObjects(); this.drillability=0; if(_5e5!=null&&typeof _5e5!="undefined"&&_5e5.length==1&&_5e5[0].m_contextIds!=null){ if(_5e5[0].getLayoutType()=="section"){ this.drillability=0; }else{ if(_5e5[0].m_contextIds.length==0){ this.drillability=0; }else{ if(typeof DrillContextMenuHelper!=="undefined"&&DrillContextMenuHelper.needsDrillSubMenu(this.m_oCV)){ this.drillability=this.getDrillabilityForAll(_5e5[0].m_contextIds); }else{ if(_5e5[0].m_contextIds.length>2){ this.drillability=this.getDrillabilityForIntersection(_5e5[0].m_contextIds[1][0],_5e5[0].m_contextIds[2][0]); }else{ this.drillability=this.getDrillabilityForCtxValue(_5e5[0].m_contextIds[0][0]); } } } } } return this.drillability; }; DrillUpDownAction.prototype.getDrillabilityForCtxValue=function(_5e6){ var _5e7=0; var _5e8=this.m_oCV.getSelectionController(); var _5e9=_5e8.getRefDataItem(_5e6); if(this.getHierarchyHasExpandedSet(this.m_oCV,_5e9)&&this.getIsRSDrillParent(this.m_oCV,_5e9)){ _5e7=1; return _5e7; } if(_5e8.getMun(_5e6)!==""&&_5e8.getUsageInfo(_5e6)!=="2"){ _5e7=(+_5e8.getDrillFlagForMember(_5e6)); var _5ea=this.getDrillabilityForItemFromReportInfo(_5e8.getRefDataItem(_5e6)); if(_5ea!=null){ if(_5ea.disableDown==true||_5ea.isolated==true){ if(_5e7==1||_5e7>=3||_5ea.isolated==true){ _5e7=1; }else{ _5e7=0; } } if(_5ea.disableUp==true){ if(_5e7>=2){ _5e7=2; }else{ _5e7=0; } } } } return _5e7; }; DrillUpDownAction.prototype.getDrillabilityForIntersection=function(_5eb,_5ec){ var _5ed=this.getDrillabilityForCtxValue(_5eb); return this.mergeDrillability(_5ed,_5ec); }; DrillUpDownAction.prototype.getDrillabilityForAll=function(_5ee){ var _5ef=(_5ee.length>=2)?1:0; var _5f0; if(_5ee.length==2){ _5f0=1; }else{ if(_5ee.length>2){ _5f0=2; }else{ _5f0=0; } } var _5f1=0; for(var iDim=_5ef;iDim<=_5f0;++iDim){ for(var _5f3=0;_5f3<_5ee[iDim].length;++_5f3){ _5f1=this.mergeDrillability(_5f1,_5ee[iDim][_5f3]); } } return _5f1; }; DrillUpDownAction.prototype.mergeDrillability=function(_5f4,_5f5){ var _5f6=this.getDrillabilityForCtxValue(_5f5); if(_5f4==_5f6){ return _5f4; } if(_5f4>_5f6){ var temp=_5f4; _5f4=_5f6; _5f6=temp; } if(_5f4==1&&_5f6==2){ return 3; } return _5f6; }; DrillUpDownAction.prototype.hasPermission=function(){ if(this.m_oCV){ if(this.m_oCV.isDrillBlackListed()){ return false; } var _5f8=this.m_oCV.envParams; if(_5f8){ return !(this.m_oCV.isLimitedInteractiveMode()||(_5f8["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(_5f9){ if(this.drillability==1||this.drillability==4||(_5f9&&_5f9.getAttribute("ischarttitle")==="true")){ return true; }else{ return false; } }; DrillUpDownAction.prototype.doOnMouseOver=function(evt){ if(this.drillability>0&&!this.getCognosViewer().isLimitedInteractiveMode()){ var _5fb=getCtxNodeFromEvent(evt); this.addDrillableClass(_5fb); if(evt.toElement&&evt.toElement.nodeName&&evt.toElement.nodeName.toLowerCase()=="img"){ this.addDrillableClass(evt.toElement); } } }; DrillUpDownAction.prototype.doOnMouseOut=function(evt){ var _5fd=getCtxNodeFromEvent(evt); if(_5fd){ this.removeDrillableClass(_5fd); 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 _601=getCtxNodeFromEvent(evt); if(_601!=null){ this.removeDrillableClass(_601); } } }; 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 _604=node.className; _604=_604.replace(new RegExp("(\\s|^)"+this.getHoverClassName()+"(\\s|$)")," "); node.className=_604.replace(/^\s*/,"").replace(/\s*$/,""); }; function DrillUpDownOrThroughAction(){ this.m_hasAuthoredDrillTargets=false; this.m_canDrillUpDown=false; }; DrillUpDownOrThroughAction.prototype=new DrillUpDownAction(); DrillUpDownOrThroughAction.prototype.init=function(_605,_606){ if(this.getCognosViewer()){ var _607=this.getCognosViewer().getViewerWidget(); if(_607&&_607.isSelectionFilterEnabled()){ return; }else{ if(this.m_oCV.isDrillBlackListed()){ return; } } } this.m_hasAuthoredDrillTargets=_605; this.m_canDrillUpDown=_606; }; DrillUpDownOrThroughAction.prototype.updateDrillabilityInfo=function(_608,_609){ if(this.m_canDrillUpDown){ return this.updateDrillability(_608,_609); } return null; }; DrillUpDownOrThroughAction.prototype.onMouseOver=function(evt){ if(this.m_hasAuthoredDrillTargets){ var _60b=getCtxNodeFromEvent(evt); if(_60b){ this.addDrillableClass(_60b); 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 _60d=getCtxNodeFromEvent(evt); if(_60d){ this.removeDrillableClass(_60d); 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 _60f=getCrossBrowserNode(evt); if(_60f){ var _610=this.m_oCV.getSelectionController(); return _610.getSelectedChartImageFromChartArea(_60f); } }; DrillUpDownOrThroughAction.prototype._set_chartImage_drillThroughCursor_IE=function(_611,evt){ if(dojo.isIE||dojo.isTrident){ var oImg=this._getDrillThroughChartImage_from_chartArea(evt); if(oImg){ oImg.style.cursor=_611; } } }; 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(_614){ _614.visible=this.ifContainsInteractiveDataContainer(); if(!_614.visible){ return _614; } this.updateDrillabilityFromSelections(); if(!this.canDrillDown()){ _614.disabled=true; }else{ _614.disabled=false; DrillContextMenuHelper.updateDrillMenuItems(_614,this.m_oCV,this.m_sAction); } return _614; }; 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(_615){ _615.visible=this.ifContainsInteractiveDataContainer(); if(!_615.visible){ return _615; } this.updateDrillabilityFromSelections(); if(!this.canDrillUp()){ _615.disabled=true; }else{ _615.disabled=false; DrillContextMenuHelper.updateDrillMenuItems(_615,this.m_oCV,this.m_sAction); } return _615; }; 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 _616=this.m_oCV.getSelectionController().getAllSelectedObjects(); if(_616.length>0){ for(var i=0;i<_616.length;++i){ var _618=_616[i]; var _619=_618.getCellRef(); if(!_618.hasContextInformation()||_618.isHomeCell()||(_618.getLayoutType()!="columnTitle"&&_618.getDataContainerType()!="list")||_619.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(_61a){ _61a.visible=this.ifContainsInteractiveDataContainer(); if(!_61a.visible){ return _61a; } _61a.disabled=!this.canDelete(); return _61a; }; DeleteAction.prototype.addActionContextAdditionalParms=function(){ return this.getSelectedCellTags(); }; function UndoableClientActionBase(){ }; UndoableClientActionBase.prototype=new CognosViewerAction(); UndoableClientActionBase.prototype.setContainerId=function(_61b){ this.m_sContainerId=_61b; }; UndoableClientActionBase.prototype.doRedo=function(_61c){ this.setContainerId(_61c); this.execute(); }; UndoableClientActionBase.prototype.doUndo=function(_61d){ factory=this.getCognosViewer().getActionFactory(); var _61e=factory.load(this.getUndoClass()); _61e.setContainerId(_61d); _61e.execute(); }; UndoableClientActionBase.prototype.getSelectedContainerId=function(){ var _61f=this.m_oCV.getSelectionController().getAllSelectedObjects(); if(_61f&&_61f.length){ var lid=_61f[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 _621=this.m_sContainerId?this.m_sContainerId:this.getSelectedCrosstabContainerId(); if(_621){ this.m_oCV.getSelectionController().resetSelections(); this.m_oCV.getPinFreezeManager().freezeContainerRowHeadings(_621); this.addClientSideUndo(this,[_621]); } }; FreezeRowHeadingsAction.prototype.getUndoHint=function(){ return RV_RES.IDS_JS_FREEZEROWHEADINGS; }; FreezeRowHeadingsAction.prototype.getUndoClass=function(){ return "UnfreezeRowHeadings"; }; FreezeRowHeadingsAction.prototype.getSelectedCrosstabContainerLid=function(){ var _622=this.m_oCV.getSelectionController().getAllSelectedObjects(); if(_622&&_622.length&&_622[0].getDataContainerType()=="crosstab"){ var lid=(_622[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 _625=this.m_oCV.getPinFreezeManager(); if(_625){ var _626=this.getSelectedCrosstabContainerId(); if(_626){ if(!_625.hasFrozenRowHeadings(_626)&&_625.getValidSelectedContainerId(false)){ return true; } } } return false; }; FreezeRowHeadingsAction.prototype.updateMenu=function(_627){ _627.visible=this.canFreezeRowHeadings(); return _627; }; function UnfreezeRowHeadingsAction(){ }; UnfreezeRowHeadingsAction.prototype=new UndoableClientActionBase(); UnfreezeRowHeadingsAction.superclass=UndoableClientActionBase.prototype; UnfreezeRowHeadingsAction.prototype.execute=function(){ if(this.m_oCV.getPinFreezeManager()){ var _628=document.getElementById("CVReport"+this.m_oCV.getId()); var _629=this.m_sContainerId?this.m_sContainerId:this.getSelectedContainerId(); this.m_oCV.getSelectionController().resetSelections(); this.m_oCV.getPinFreezeManager().unfreezeContainerRowHeadings(_629,_628); this.addClientSideUndo(this,[_629]); } }; 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(_62a){ _62a.visible=this.areRowHeadingsFrozen(); return _62a; }; function FreezeColumnHeadingsAction(){ }; FreezeColumnHeadingsAction.prototype=new UndoableClientActionBase(); FreezeColumnHeadingsAction.superclass=UndoableClientActionBase.prototype; FreezeColumnHeadingsAction.prototype.execute=function(){ var _62b=this.m_sContainerId?this.m_sContainerId:this.getSelectedCrosstabOrListContainerId(); if(_62b){ this.m_oCV.getSelectionController().resetSelections(); this.m_oCV.getPinFreezeManager().freezeContainerColumnHeadings(_62b); this.addClientSideUndo(this,[_62b]); } }; FreezeColumnHeadingsAction.prototype.getUndoHint=function(){ return RV_RES.IDS_JS_FREEZECOLUMNHEADINGS; }; FreezeColumnHeadingsAction.prototype.getUndoClass=function(){ return "UnfreezeColumnHeadings"; }; FreezeColumnHeadingsAction.prototype.getSelectedCrosstabOrListContainerLid=function(){ var _62c=this.m_oCV.getSelectionController().getAllSelectedObjects(); if(_62c&&_62c.length&&(_62c[0].getDataContainerType()=="crosstab"||_62c[0].getDataContainerType()=="list")){ var lid=(_62c[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 _62f=this.m_oCV.getPinFreezeManager(); if(_62f){ var _630=this.getSelectedCrosstabOrListContainerId(); if(_630){ if(!_62f.hasFrozenColumnHeadings(_630)&&_62f.getValidSelectedContainerId(true)){ return true; } } return false; } }; FreezeColumnHeadingsAction.prototype.updateMenu=function(_631){ _631.visible=this.canFreezeColumnHeadings(); return _631; }; function UnfreezeColumnHeadingsAction(){ }; UnfreezeColumnHeadingsAction.prototype=new UndoableClientActionBase(); UnfreezeColumnHeadingsAction.superclass=UndoableClientActionBase.prototype; UnfreezeColumnHeadingsAction.prototype.execute=function(){ if(this.m_oCV.getPinFreezeManager()){ var _632=document.getElementById("CVReport"+this.m_oCV.getId()); var _633=this.m_sContainerId?this.m_sContainerId:this.getSelectedContainerId(); this.m_oCV.getSelectionController().resetSelections(); this.m_oCV.getPinFreezeManager().unfreezeContainerColumnHeadings(_633,_632); this.addClientSideUndo(this,[_633]); } }; 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(_634){ _634.visible=this.areColumnHeadingsFrozen(); return _634; }; function GlossaryAction(){ }; GlossaryAction.prototype=new CognosViewerAction(); GlossaryAction.prototype.execute=function(){ var _635=this.getCognosViewer(); _635.loadExtra(); var _636=_635.getSelectionController(); var _637=_636.getAllSelectedObjects(); if(_637.length>0){ var _638=null; if(typeof MDSRV_CognosConfiguration!="undefined"){ _638=new MDSRV_CognosConfiguration(); var _639=""; if(_635.envParams["glossaryURI"]){ _639=_635.envParams["glossaryURI"]; } _638.addProperty("glossaryURI",_639); _638.addProperty("gatewayURI",_635.getGateway()); } var _63a=_635.envParams["ui.object"]; var _63b=getViewerSelectionContext(_636,new CSelectionContext(_63a)); var _63c=new MDSRV_BusinessGlossary(_638,_63b); _63c.open(); } }; GlossaryAction.prototype.updateMenu=function(_63d){ if(!this.getCognosViewer().bCanUseGlossary){ return ""; } var _63e=this.selectionHasContext(); if(!_63e||this.getCognosViewer().envParams["glossaryURI"]==null||this.getCognosViewer().envParams["glossaryURI"]==""){ _63d.disabled=true; }else{ _63d.disabled=false; } return _63d; }; 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(_63f){ _63f.visible=this.ifContainsInteractiveDataContainer(); if(!_63f.visible){ return _63f; } var _640=this.m_oCV.getSelectionController(); var _641=_640.getAllSelectedObjects(); if(_641.length===0||_640.getDataContainerType()!="list"){ return this.disableMenuItem(_63f); } if(_641[0].getCellRef().getAttribute("no_data_item_column")==="true"){ return this.disableMenuItem(_63f); } var _642=!_640.isRelational(); for(var _643=0;_643<_641.length;++_643){ if(_640.getUsageInfo(_641[_643].getSelectedContextIds()[0][0])==_640.c_usageMeasure&&(_642||_641[_643].getLayoutType()==="summary")){ return this.disableMenuItem(_63f); } } _63f.disabled=false; _63f.iconClass="group"; return _63f; }; GroupAction.prototype.disableMenuItem=function(_644){ _644.disabled=true; _644.iconClass="groupDisabled"; return _644; }; 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(_645){ this.m_action=_645.action; this.m_sFrom=(_645.from)?_645.from:this.FROM_TOOLBAR; }; LoadMenuAction.prototype.execute=function(){ var _646=this.m_oCV.getActionFactory(); var _647=_646.load(this.m_action); var _648=this.getMenuSpec(); var _649=GUtil.generateCallback(this.buildMenuCallback,[_648],this); _648=_647.buildMenu(_648,_649); if(_648!=null){ this.buildMenuCallback(_648); } }; LoadMenuAction.prototype.buildMenuCallback=function(_64a){ _64a.open=true; _64a.action=null; this.fireEvent(_64a); }; LoadMenuAction.prototype.getMenuSpec=function(){ var oCV=this.m_oCV; var _64c=this.m_sFrom; if(!_64c||!oCV){ return null; } var _64d=null; var _64e=null; switch(_64c){ case this.FROM_TOOLBAR: _64d=oCV.getToolbar(); break; case this.FROM_TOOLBAR_BLUEDOTMENU: _64d=oCV.findBlueDotMenu(); break; case this.FROM_CONTEXTMENU_MOREACTIONS: _64d=oCV.findToolbarItem("MoreActions",oCV.getContextMenu()); break; } if(_64d){ _64e=oCV.findToolbarItem(this.m_action,_64d); } if(_64e){ _64e.from=_64c; } return _64e; }; LoadMenuAction.prototype.fireEvent=function(_64f){ var _650=[]; if(_64f){ _650.push(_64f); } var _651=this.m_oCV.getViewerWidget(); var _652=_64f.from; switch(_652){ case this.FROM_TOOLBAR: case this.FROM_TOOLBAR_BLUEDOTMENU: _651.fireEvent(this.TOOLBAR_UPDATE_EVENT,null,_650); break; case this.FROM_CONTEXTMENU_MOREACTIONS: _651.fireEvent(this.CONTEXTMENU_UPDATE_EVENT,null,_650); break; } }; function MoveAction(){ this.m_sAction="Reorder"; }; MoveAction.prototype=new DragDropAction(); MoveAction.prototype.setRequestParms=function(_653){ this.m_order=_653.order; }; MoveAction.prototype.canMoveLeftRight=function(_654){ var _655=this.m_oCV.getSelectionController(); if(_655&&_655.getAllSelectedObjects().length==1){ var _656=_655.getAllSelectedObjects()[0].getCellRef(); if(_654=="right"&&_656.nextSibling){ return true; }else{ if(_654=="left"&&_656.previousSibling){ return true; } } } return false; }; MoveAction.prototype.updateMenu=function(_657){ if(!this.canMove()){ _657=""; }else{ var _658=this.m_oCV.getSelectionController(); if(_658&&_658.getAllSelectedObjects().length>1){ _657.disabled=true; _657.items=null; }else{ _657.disabled=false; _657.items=[]; _657.items.push({disabled:!this.canMoveLeftRight("left"),name:"Move",label:RV_RES.IDS_JS_LEFT,iconClass:"moveLeft",action:{name:"Move",payload:{order:"left"}},items:null}); _657.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 _657; }; MoveAction.prototype.addActionContextAdditionalParms=function(){ var _659=this.getCognosViewer().getSelectionController(); var _65a=null; if(this.m_order=="right"){ _65a=_659.getAllSelectedObjects()[0].getCellRef().nextSibling; }else{ _65a=_659.getAllSelectedObjects()[0].getCellRef().previousSibling; } var _65b=_659.buildSelectionObject(_65a,null); var tag=this.m_order=="right"?"after":"before"; var _65d=this.getRAPLayoutTag(_65a); _65d=(_65d!=null)?_65d:_65b.getColumnName(); return this.getSelectedCellTags()+"<"+tag+">"+xml_encode(_65d)+""; }; function RefreshViewAction(){ this.m_bCanvasRefreshEvent=false; }; RefreshViewAction.prototype=new CognosViewerAction(); RefreshViewAction.prototype.addCommonOptions=function(_65e){ var _65f=this.getCognosViewer().getViewerWidget(); if(this.m_bCanvasRefreshEvent&&_65f.getSavedOutputSearchPath()!=null){ _65e.addFormField("ui.savedOutputSearchPath",encodeURIComponent(_65f.getSavedOutputSearchPath())); }else{ _65f.setSavedOutputsCMResponse(null); _65f.setSavedOutputSearchPath(null); } _65e.addFormField("run.outputFormat","HTML"); _65e.addFormField("widget.reloadToolbar","true"); _65f.clearPropertiesDialog(); var _660=document.getElementById("formWarpRequest"+this.getCognosViewer().getId()); _65e.addFormField("ui.object",_660["reRunObj"].value); }; RefreshViewAction.prototype.execute=function(){ var _661=this.createCognosViewerDispatcherEntry("buxDropReportOnCanvas"); this.addCommonOptions(_661); var oCV=this.getCognosViewer(); var _663=oCV.getViewerWidget(); if(oCV.getCurrentlySelectedTab()&&_663.getSavedOutput()){ oCV.setKeepTabSelected(oCV.getCurrentlySelectedTab()); } this.getCognosViewer().dispatchRequest(_661); }; RefreshViewAction.prototype.doAddActionContext=function(){ return false; }; RefreshViewAction.prototype.updateMenu=function(_664){ _664.disabled=false; var oCV=this.getCognosViewer(); if(oCV){ var _666=oCV.getViewerWidget(); if(_666&&_666.getSavedOutputSearchPath()!=null){ _664.disabled=true; } } return _664; }; 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 _667=this.getSelectedCellTags(); return (_667+""+xml_encode(this.m_prevLabel)+""+""+xml_encode(this.m_newLabel)+""); }; RenameDataItemAction.prototype.onMouseOver=function(evt){ var _669=getCtxNodeFromEvent(evt); _669.style.cursor=this.canRename()?"text":"default"; }; RenameDataItemAction.prototype.onMouseOut=function(evt){ var _66b=getCtxNodeFromEvent(evt); _66b.style.cursor="default"; }; RenameDataItemAction.prototype.onDoubleClick=function(evt){ if(this.canRename()){ var _66d=getCtxNodeFromEvent(evt); this.insertTextArea(_66d); } }; RenameDataItemAction.prototype.canRename=function(){ if(this.m_oCV.isBlacklisted("RenameFromContextMenu")){ return false; } var _66e=this.m_oCV.getSelectionController(); var _66f=_66e.getAllSelectedObjects().length; if(_66f==1&&!this.m_oCV.isLimitedInteractiveMode()){ var _670=_66e.getAllSelectedObjects()[0]; if(_670.hasContextInformation()){ var _671=_670.getSelectedContextIds()[0][0]; var _672=_670.getCellRef(); return this.checkRenamableConditions(_670,_672,_671,_66e); } } return false; }; RenameDataItemAction.prototype.checkRenamableConditions=function(_673,_674,_675,_676){ if(_673.isHomeCell()){ return false; } if(_673.getLayoutType()=="columnTitle"&&_676.selectionsHaveCalculationMetadata()){ if(_673.getDataContainerType()=="crosstab"&&!_676.areSelectionsMeasureOrCalculation()){ return false; } return true; } if(_673.getLayoutType()=="columnTitle"&&_673.getDataContainerType()=="crosstab"){ return false; } if(_673.getLayoutType()!="columnTitle"){ return false; } if(_674.getAttribute("cc")=="true"){ return false; } if(_674.getAttribute("CTNM")!=null&&_676.getMun(_675)!=""){ return false; } return true; }; RenameDataItemAction.prototype.insertTextArea=function(_677){ var _678=document.createElement("label"); _678.style.height="1px"; _678.style.width="1px"; _678.style.overflow="hidden"; _678.style.position="absolute"; _678.style.left="0px"; _678.style.top="-500px"; _678.setAttribute("for","rename"+this.m_oCV.getId()); _678.id="renameLabel"+this.m_oCV.getId(); _678.innerHTML=RV_RES.IDS_JS_RENAME_LABEL; var _679=document.createElement("input"); _679.id="rename"+this.m_oCV.getId(); _679.name="rename"+this.m_oCV.getId(); _679.type="text"; _679.value=_677.childNodes[0].nodeValue; _679.style.backgroundColor="transparent"; _679.style.borderWidth="0px"; _679.style.padding="0px"; _679.style.margin="0px"; _679.setAttribute("role","textbox"); _679.setAttribute("aria-labelledby","renameLabel"+this.m_oCV.getId()); var _67a=_677.parentNode.scrollWidth-10; var _67b=_677.parentNode.firstChild; while(_67b){ if(_67b!=_677){ _67a-=_67b.scrollWidth; } _67b=_67b.nextSibling; } _679.style.width=_67a+"px"; _679.ctxNode=_677; _679.action=this; _679.originalLabel=_677.childNodes[0].nodeValue; if(isIE()){ _679.style.fontFamily=_677.currentStyle.fontFamily; _679.style.fontSize=_677.currentStyle.fontSize; _679.style.fontStyle=_677.currentStyle.fontStyle; _679.style.fontVariant=_677.currentStyle.fontVariant; _679.style.fontWeight=_677.currentStyle.fontWeight; _679.attachEvent("onblur",this.onBlur); _679.attachEvent("onkeydown",this.onKeyDown); _679.style.overflow="hidden"; }else{ _679.style.font="inherit"; _679.addEventListener("blur",this.onBlur,false); _679.addEventListener("keydown",this.onKeyDown,false); _679.style.overflow="visible"; } _677.innerHTML=""; _677.appendChild(_678); _677.appendChild(_679); _679.focus(); _679.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 _680=node.ctxNode; var _681=node.action; var _682=node.value!=""?node.value:node.innerHTML; _681.updateLabel(_680,_682,node.originalLabel); }; RenameDataItemAction.prototype.onKeyDown=function(evt){ var _684=""; var node=getNodeFromEvent(evt); if(evt.keyCode=="13"){ _684=node.value!=""?node.value:node.originalLabel; }else{ if(evt.keyCode=="27"){ _684=node.originalLabel; } } if(_684!=""){ var _686=node.ctxNode; var _687=node.action; _687.updateLabel(_686,_684,node.originalLabel); return stopEventBubble(evt); }else{ return true; } }; RenameDataItemAction.prototype.updateLabel=function(_688,_689,_68a){ this.m_newLabel=_689; this.m_prevLabel=_68a; _688.innerHTML=""; _688.appendChild(document.createTextNode(_689)); var _68b=this.m_oCV.getSelectionController(); if(_68b!=null&&_689!=_68a){ var _68c=new CSelectionObjectFactory(_68b); this.m_containerId=this.removeNamespace(_68c.getLayoutElementId(_688)); var _68d=_68c.getSelectionObject(_688.parentNode); _68b.m_aSelectedObjects[0]=_68d; var _68e=_68d.getCellRef().getElementsByTagName("span"); var span=null; if(_68e){ for(var i=0;i<_68e.length;i++){ span=_68e[i]; if(span.getAttribute("ctx")!=null&&span.style.visibility!="hidden"){ span.focus(); break; } } } this.execute(); } }; RenameDataItemAction.prototype.buildUrl=function(){ var _691="b_action=cognosViewer&ui.action=modifyReport&cv.responseFormat=xml"; var _692=this.addActionContext(); _691+="&cv.actionContext="+encodeURIComponent(_692); if(window.gViewerLogger){ window.gViewerLogger.log("Action context",_692,"xml"); } _691+="&ui.object="+encodeURIComponent(this.m_oCV.envParams["ui.object"]); if(typeof this.m_oCV.envParams["ui.spec"]!="undefined"){ _691+="&ui.spec="+encodeURIComponent(this.m_oCV.envParams["ui.spec"]); } if(typeof this.m_oCV.getModelPath()!=""){ _691+="&modelPath="+encodeURIComponent(this.m_oCV.getModelPath()); } return _691; }; RenameDataItemAction.prototype.keepRAPCache=function(){ return false; }; RenameDataItemAction.prototype.reuseQuery=function(){ return true; }; function RenameFromContextMenuAction(){ }; RenameFromContextMenuAction.prototype=new RenameDataItemAction(); RenameFromContextMenuAction.prototype.canRename=function(_693){ if(!_693||_693.hasContextInformation()==false){ return false; } var _694=this.m_oCV.getSelectionController(); var _695=_693.getSelectedContextIds()[0][0]; var _696=_693.getCellRef(); return this.checkRenamableConditions(_693,_696,_695,_694); }; RenameFromContextMenuAction.prototype.updateMenu=function(_697){ _697.visible=this.ifContainsInteractiveDataContainer(); if(!_697.visible){ return _697; } var _698=this.m_oCV.getSelectionController(); var _699=_698.getAllSelectedObjects().length; if(_699!=1){ for(var _69a=0;_69a<_699;_69a++){ if(!this.canRename(_698.getAllSelectedObjects()[_69a])){ return ""; } } _697.disabled=true; }else{ if(!this.canRename(_698.getAllSelectedObjects()[0])){ _697=""; }else{ _697.disabled=false; } } return _697; }; RenameFromContextMenuAction.prototype.getSpanFromCellRef=function(_69b){ var _69c=_69b.getElementsByTagName("span"); var span=null; if(_69c){ for(var i=0;i<_69c.length;i++){ span=_69c[i]; if(span.getAttribute("ctx")!=null&&span.style.visibility!="hidden"){ break; } } } return span; }; RenameFromContextMenuAction.prototype.execute=function(){ var _69f=this.m_oCV.getSelectionController().getAllSelectedObjects()[0].getCellRef(); if(_69f){ var span=this.getSpanFromCellRef(_69f); var _6a1=this.m_oCV.getAction("RenameDataItem"); _6a1.insertTextArea(span); } }; function ResetToOriginalAction(){ }; ResetToOriginalAction.prototype=new CognosViewerAction(); ResetToOriginalAction.prototype.updateMenu=function(_6a2){ var _6a3=this.getCognosViewer().envParams.baseReportAvailable; _6a2.disabled=(_6a3==="false")?true:_6a2.disabled; return _6a2; }; ResetToOriginalAction.prototype.execute=function(){ var _6a4=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); _6a4.startup(); _6a4.show(); }; ResetToOriginalAction.prototype.executeAction=function(_6a5){ this.gatherFilterInfoBeforeAction("ResetToOriginal"); ChangePaletteAction.reset(this.getCognosViewer()); }; ResetToOriginalAction.prototype.dispatchRequest=function(_6a6){ var _6a7=this.getCognosViewer(); var _6a8=_6a7.getViewerWidget(); _6a8.reset(); var _6a9=_6a8.getAttributeValue("originalReport"); if(!_6a9){ var _6aa=_6a8.getSavedItem(); if(_6a8.isSavedReport(_6a9,_6aa)){ _6a9=_6aa; } } var _6ab=_6a8.getAttributeValue("originalReportPart"); var _6ac=_6a7.envParams["cv.objectPermissions"]; var _6ad=_6a7.envParams["bpmRestURI"]; var _6ae=_6a7.envParams["glossaryURI"]; var _6af=_6a7.envParams["metadataInformationURI"]; var _6b0=_6a7.envParams["ui.routingServerGroup"]; delete _6a7.envParams; _6a7.envParams={}; _6a7.envParams["ui.object"]=_6a9; _6a7.envParams["originalReport"]=_6a9; _6a7.envParams["bux"]="true"; _6a7.envParams["cv.objectPermissions"]=_6ac; _6a7.envParams["ui.routingServerGroup"]=_6b0; if(_6ad){ _6a7.envParams["bpmRestURI"]=_6ad; } if(_6ae){ _6a7.envParams["glossaryURI"]=_6ae; } if(_6af){ _6a7.envParams["metadataInformationURI"]=_6af; } var _6b1=this.createCognosViewerDispatcherEntry("resetToOriginal"); _6b1.addFormField("run.outputFormat","HTML"); _6b1.addFormField("widget.reloadToolbar","true"); _6b1.addFormField("ui.reportDrop","true"); _6a7.resetbHasPromptFlag(); _6b1.addFormField("widget.forceGetParameters","true"); if(_6a6!=""){ _6b1.addFormField("cv.updateDataFilters",_6a6); } _6b1.addFormField("run.prompt","false"); var _6b2=(_6ab&&_6ab.length>0); if(_6b2){ _6b1.addFormField("reportpart_id",_6ab); } _6a7.hideReportInfo(); _6a7.dispatchRequest(_6b1); this.fireModifiedReportEvent(); }; ResetToOriginalAction.prototype.doAddActionContext=function(){ return false; }; ResetToOriginalAction.prototype.canShowMenuInGlobalArea=function(){ return true; }; ResetToOriginalAction.prototype.isValidMenuItem=function(){ var _6b3=this.getCognosViewer(); var _6b4=_6b3.getViewerWidget(); if(_6b4.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(_6b5){ if(_6b5&&_6b5.resize){ this.m_width=parseInt(_6b5.resize.w,10)-ResizeChartAction.PADDING.getWidth(); this.m_height=parseInt(_6b5.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 _6b6=this.getLayoutComponents(); if(_6b6&&_6b6.length>0){ for(var i=0;i<_6b6.length;++i){ if(_6b6[i].nodeName==="IMG"||_6b6[0].getAttribute("flashChart")!==null){ this.m_oChart=_6b6[i]; break; } } if(this.m_oChart&&this.isNewSizeDifferent()){ if(_6b6[0].getAttribute("flashChart")!==null){ this.m_bRunReport=false; this.resizeFlashChart(); }else{ this.m_bRunReport=true; this.resizeChart(); } } } } }; ResizeChartAction.prototype.isActionApplicable=function(){ var _6b8=this.m_oCV.getRAPReportInfo(); if(_6b8&&_6b8.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 _6ba=""; var size=this.getNewChartSize(); _6ba+=""+size.h+"px"; _6ba+=""+size.w+"px"; return _6ba; }; ResizeChartAction.prototype.isNewSizeDifferent=function(){ var _6bc=(this.m_oChart.getAttribute("flashChart")!==null); var _6bd=_6bc?this.m_oChart.getAttribute("width"):this.m_oChart.style.width; var _6be=_6bc?this.m_oChart.getAttribute("height"):this.m_oChart.style.height; if(!_6bd||_6bd==""){ _6bd=this.m_oChart.width; _6be=this.m_oChart.height; } return parseInt(_6bd,10)!=this.m_width||parseInt(_6be,10)!=this.m_height; }; ResizeChartAction.prototype.getNewChartSize=function(){ var _6bf=this.m_oChart; var _6c0=0; var _6c1=0; var _6c2=0; var _6c3=0; var _6c4=0; var _6c5=0; var _6c6=0; var _6c7=0; var _6c8=0; var _6c9=0; var _6ca=0; var _6cb=0; require(["dojo/dom-style"],function(_6cc){ _6c0=_6cc.get(_6bf,"marginLeft"); _6c1=_6cc.get(_6bf,"marginRight"); _6c2=_6cc.get(_6bf,"marginTop"); _6c3=_6cc.get(_6bf,"marginBottom"); _6c4=_6cc.get(_6bf,"borderLeftWidth"); _6c5=_6cc.get(_6bf,"borderRightWidth"); _6c6=_6cc.get(_6bf,"borderTopWidth"); _6c7=_6cc.get(_6bf,"borderBottomWidth"); _6c8=_6cc.get(_6bf,"paddingLeft"); _6c9=_6cc.get(_6bf,"paddingRight"); _6ca=_6cc.get(_6bf,"paddingTop"); _6cb=_6cc.get(_6bf,"paddingBottom"); }); this.m_width-=_6c4+_6c5+_6c0+_6c1+_6c8+_6c9; this.m_height-=_6c6+_6c7+_6c2+_6c3+_6ca+_6cb; if(this.m_keepRatio){ var _6cd=parseInt(this.m_oChart.style.width,10)/parseInt(this.m_oChart.style.height,10); var _6ce=_6cd*this.m_height; if(_6ce>this.m_width){ this.m_height=this.m_width/_6cd; } var _6cf=this.m_width/_6cd; if(_6cf>this.m_height){ this.m_width=this.m_height*_6cd; } } return {w:this.m_width,h:this.m_height}; }; function RetryRequestAction(){ this.m_lastActionParams=null; }; RetryRequestAction.prototype=new CognosViewerAction(); RetryRequestAction.prototype.setRequestParms=function(_6d0){ this.m_lastActionParams=_6d0; }; RetryRequestAction.prototype.execute=function(){ if(this.m_lastActionParams){ var _6d1=new ViewerDispatcherEntry(this.m_oCV); var _6d2=this.m_lastActionParams.keys(); for(var _6d3=0;_6d3<_6d2.length;_6d3++){ _6d1.addFormField(_6d2[_6d3],this.m_lastActionParams.get(_6d2[_6d3])); } _6d1.addFormField("cv.responseFormat","data"); _6d1.addFormField("widget.reloadToolbar","true"); _6d1.addNonEmptyStringFormField("limitedInteractiveMode",this.m_oCV.envParams["limitedInteractiveMode"]); this.m_oCV.dispatchRequest(_6d1); 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(_6d4){ if(!_6d4){ return; } this.m_promptValues=_6d4.promptValues; this.m_clearCascadeParamsList=_6d4.clearCascadeParamsList; }; RunReportAction.prototype.setSendParameterValues=function(_6d5){ this.m_sendParameterValues=_6d5; }; RunReportAction.prototype.reuseQuery=function(){ return this.m_reuseQuery; }; RunReportAction.prototype.setReuseQuery=function(_6d6){ this.m_reuseQuery=_6d6; }; RunReportAction.prototype.getPromptOption=function(){ return "false"; }; RunReportAction.prototype.canBeQueued=function(){ return false; }; RunReportAction.prototype.getAction=function(_6d7){ return _6d7?"run":"runSpecification"; }; RunReportAction.prototype.addAdditionalOptions=function(_6d8){ this._addCommonOptions(_6d8); this._addRunOptionsFromProperties(_6d8); this._addClearCascadeParams(_6d8); this._addPromptValuesToRequest(_6d8); }; RunReportAction.prototype._addClearCascadeParams=function(oReq){ if(!this.m_clearCascadeParamsList||this.m_clearCascadeParamsList.length==0){ return; } var _6da=this.m_clearCascadeParamsList.length; for(var i=0;i<_6da;i++){ oReq.addFormField("c"+this.m_clearCascadeParamsList[i],"1"); } }; RunReportAction.prototype._addPromptValuesToRequest=function(_6dc){ if(!this.m_promptValues){ return; } _6dc.addFormField("sharedPromptRequest","true"); for(var _6dd in this.m_promptValues){ _6dc.addFormField(_6dd,this.m_promptValues[_6dd]); } }; RunReportAction.prototype._addCommonOptions=function(oReq){ var _6df=this.getCognosViewer().isLimitedInteractiveMode(); if(typeof this.m_action==="undefined"){ this.m_action=this.getAction(_6df); } oReq.addFormField("run.prompt",this.getPromptOption()); oReq.addFormField("ui.action",this.m_action); if(_6df){ 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 _6e1=this.getCognosViewer().getViewerWidget().getProperties(); if(_6e1.getRowsPerPage()!=null){ oReq.addFormField("run.verticalElements",_6e1.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(_6e5){ return _6e5?"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(_6e6){ this.m_payload=_6e6; }; GetParametersAction.prototype.addRequestOptions=function(_6e7){ _6e7.addFormField("asynch.alwaysIncludePrimaryRequest","false"); _6e7.addFormField("ui.action","getParameters"); _6e7.addFormField("ui.spec",this.m_oCV.envParams["ui.spec"]); _6e7.addFormField("ui.object",this.m_oCV.envParams["ui.object"]); _6e7.addFormField("isPrimaryPromptWidget",this.isPrimaryPromptWidget?"true":"false"); _6e7.addFormField("parameterValues",this.m_oCV.getExecutionParameters()); if(this.m_oCV.envParams["bux"]=="true"){ _6e7.addFormField("bux","true"); } }; GetParametersAction.prototype.execute=function(){ var oCV=this.getCognosViewer(); var _6e9=new AsynchJSONDispatcherEntry(oCV); _6e9.setCallbacks({"complete":{"object":this,"method":this.handleGetParametersResponse}}); this.addRequestOptions(_6e9); if(oCV.getActiveRequest()){ this.m_requestFormFieldsCopy=oCV.getActiveRequest().getFormFields(); } _6e9.sendRequest(); }; GetParametersAction.prototype.handleGetParametersResponse=function(_6ea){ try{ var _6eb=_6ea.getResult(); var _6ec=_6eb.xml; var _6ed=this.getCognosViewer(); var _6ee=_6ed.getViewerWidget(); if(typeof _6ec!="undefined"&&_6ec!=null){ var _6ef=xml_decode(_6ec); this.m_oCV.envParams["reportPrompts"]=_6ef; if(this.isPrimaryPromptWidget){ this.m_oCV.raisePromptEvent(_6ef,this.m_requestFormFieldsCopy); }else{ _6ee.sharePrompts(this.m_payload); } } if(typeof _6ee!="undefined"){ _6ee.promptParametersRetrieved=true; var _6f0=_6ee.getButtonFromSavedToolbarButtons("Reprompt"); if(typeof _6f0!="undefined"&&_6f0!=null){ var _6f1=_6ed.findBlueDotMenu(); if(_6ed.addedButtonToToolbar(_6f1,_6f0.button,"Refresh",_6f0.position)){ _6ed.resetbHasPromptFlag(); _6ee.updateToolbar(); } _6ee.removeFromSavedToolbarButtons("Reprompt"); } } } catch(e){ } }; function RepromptAction(){ this.m_repromptAction=null; }; RepromptAction.prototype=new CognosViewerAction(); RepromptAction.superclass=CognosViewerAction.prototype; RepromptAction.prototype.updateMenu=function(_6f2){ var oCV=this.getCognosViewer(); _6f2.visible=(!this.isPromptWidget()&&oCV.hasPrompt()); if(!_6f2.visible){ _6f2.save=true; }else{ delete _6f2.save; } return _6f2; }; RepromptAction.prototype.setRequestParms=function(_6f4){ RepromptAction.superclass.setRequestParms(_6f4); if(_6f4&&_6f4["preferencesChanged"]){ this["preferencesChanged"]=_6f4["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(_6f7){ _6f7.addFormField("run.outputFormat","HTML"); _6f7.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 _6fa=this.getCognosViewer().getSelectionController(); _6fa.pageHover(evt); } }; SelectionAction.prototype.onMouseOut=function(evt){ if(DragDropAction_isDragging(evt)==false){ var _6fc=this.getCognosViewer().getSelectionController(); _6fc.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 _700=oCV.getViewerWidget(); if(oCV.isDrillBlackListed()||(_700&&_700.isSelectionFilterEnabled())){ return false; } if(evt.button==0||evt.button==1||evt.keyCode=="13"){ var _701=getCtxNodeFromEvent(evt); if(_701!=null){ var _702=this.m_oCV.getSelectionController(); var _703=_701.getAttribute("type")!=null?_701:_701.parentNode; var type=_703.getAttribute("type"); var _705=_701.getAttribute("ctx"); _705=_705.split("::")[0].split(":")[0]; if((_703.getAttribute("CTNM")!=null||type=="datavalue")&&_702.getMun(_705)!=""){ var _706=_702.getAllSelectedObjects(); for(var _707=0;_707<_706.length;++_707){ var _708=_706[_707]; if(_708.getCellRef()==_701.parentNode){ if(_706.length>1){ _702.clearSelectedObjects(); _702.addSelectionObject(_708); } var _709=this.m_oCV.getActionFactory(); var _70a=_709.load("DrillUpDown"); _70a.updateDrillability(this.m_oCV,_701); if(_70a.drillability>0&&this.hasPermission()){ _70a.execute(); return true; } } } } } } return false; }; SelectionAction.prototype.executeDrillThrough=function(evt){ var _70c=this.getCognosViewer().getViewerWidget(); if(_70c&&_70c.isSelectionFilterEnabled()){ return; } var _70d=this.getCognosViewer().getDrillMgr(); return _70d.getDrillThroughParameters("execute",evt); }; SelectionAction.prototype.pageClicked=function(evt){ var _70f=false; var _710=evt.which?evt.which==1:evt.button==1; var _711=new CognosViewerSort(evt,this.m_oCV); var _712,_713=getCrossBrowserNode(evt); try{ _712=(_713&&_713.className)||""; } catch(ex){ _712=""; } var oCV=this.getCognosViewer(); var _715=null; if(_710&&_711.isSort(evt)&&!oCV.isLimitedInteractiveMode()&&!oCV.isBlacklisted("Sort")){ _711.execute(); }else{ if(_710&&_712.indexOf("expandButton")>-1){ var _716=_713; if(_712.indexOf("expandButtonCaption")>-1){ _716=_716.parentNode; _712=_716.className; } _715=getCognosViewerSCObjectRef(this.m_oCV.getId()); _715.selectSingleDomNode(_716.parentNode); var _717; if(_712.indexOf("collapse")===-1){ _717=new ExpandMemberAction(); }else{ _717=new CollapseMemberAction(); } _717.setCognosViewer(oCV); _717.execute(); }else{ _715=this.m_oCV.getSelectionController(); if(this.executeDrillUpDown(evt)===false){ var _718=this.m_oCV.getViewerWidget(); if(_718.isSelectionFilterEnabled()){ if(_710||evt.keyCode===13){ _718.preprocessPageClicked(false,evt); }else{ _718.preprocessPageClicked(true); } } if(_715.pageClicked(evt)!=false){ this.m_oCV.getViewerWidget().updateToolbar(); _715.resetAllowHorizontalDataValueSelection(); } setNodeFocus(evt); } if(_710||evt.keyCode===13){ _70f=this.executeDrillThrough(evt); } if(_710&&this.m_oCV.getViewerWidget()&&this.m_oCV.getViewerWidget().onSelectionChange){ this.m_oCV.getViewerWidget().onSelectionChange(); } } } return _70f; }; SelectionAction.prototype.mouseActionInvolvesSelection=function(evt){ var _71a=evt.which?evt.which==1:evt.button==1; var _71b=new CognosViewerSort(evt,this.m_oCV); if(_71a&&_71b.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,_71e){ var ret=false; if(!_71e&&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 _722=this.m_oCV; var _723=_722.getViewerWidget(); if(_722.isDrillBlackListed()||(_723&&_723.isSelectionFilterEnabled())){ return; } if(_722.getStatus()=="complete"){ var _724=_722.getDrillMgr(); var _725="DrillDown"; var _726="DrillDown"; var _727=false; var _728=false; if(_724!=null){ if(!this.hasPermission()){ return true; } var _729=_724.getSelectedObject(); if(_729==null||(_729.m_dataContainerType=="list"&&_729.m_sLayoutType=="columnTitle")){ return true; } var _72a=_729.getDrillOptions(); if(typeof _72a=="undefined"||_72a==null||!_72a.length){ return true; } _727=_724.canDrillDown(); if(!_727){ _728=_724.canDrillUp(); if(_728){ _725="DrillUp"; _726="DrillUp"; } } if(_727||_728){ _722.executeAction(_725,_726); } }else{ return true; } } }; function SelectionFilterSwitchAction(){ this.m_sAction="SelectionFilterSwitch"; }; SelectionFilterSwitchAction.prototype=new CognosViewerAction(); SelectionFilterSwitchAction.prototype.updateMenu=function(_72b){ if(this.getCognosViewer().getViewerWidget().isSelectionFilterEnabled()){ _72b.disabled=false; _72b.checked=true; _72b.iconClass="selectionFilterEnabled"; _72b.label=RV_RES.IDS_JS_SELECTION_FILTER_SWITCH_DISABLE; }else{ _72b.disabled=false; _72b.checked=false; _72b.iconClass="selectionFilter"; _72b.label=RV_RES.IDS_JS_SELECTION_FILTER_SWITCH; } return _72b; }; SelectionFilterSwitchAction.prototype.execute=function(){ var oCV=this.getCognosViewer(); var _72d=oCV.getViewerWidget(); var _72e=_72d.isSelectionFilterEnabled(); if(_72e){ if(_72d.selectionFilterSent()){ _72d.clearSelectionFilter(); } } _72d.toggleSelectionFilterSwitch(); _72d.updateToolbar(); _72d.onContextMenu({}); if(!_72e){ if(_72d.somethingSelected()){ _72d.broadcastSelectionFilter(); } } _72d.updateDrillThroughLinks(); _72d.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(_730){ this.m_sharePromptParameters=_730.parameters; this.m_action="forward"; }; SharePromptAction.prototype.parsePromptParameters=function(){ var _731=false; var _732=this.getReportParameterNodes(); if(_732){ var _733=this.m_sharePromptParameters; var _734={}; var _735=[]; for(var i in _733){ var _737=_733[i].parmName; var _738=_733[i].modelItem; var _739=null; var _73a=null; var _73b=false; var _73c={}; for(var j in _732){ var _73e=_732[j].getAttribute("parameterName"); var _73f=_732[j].getAttribute("modelItem"); if((typeof _73e!=="undefined"&&_73e===_737)||(typeof _73f!=="undefined"&&_738!=="undefined"&&_738!==""&&_73f===_738&&!this.arrayContains(_735,_73f))){ _731=true; _739="p_"+_73e; _73a=this.getSharedPromptValue(_733[i],_732[j]); if(_73e===_737){ _734[_739]=_73a; _735.push(_73f); _73b=false; break; }else{ _73c[_739]=_73a; _73b=true; } } } if(_73b){ for(var x in _73c){ _734[x]=_73c[x]; } } } if(_731){ this.m_bAbortAction=false; this.m_promptValues=_734; } } return _731; }; SharePromptAction.prototype.getSharedPromptValue=function(_741,_742){ var _743=null; var _744=_741.parmValue; var _745=this._isPromptParamMultiValued(_741.multivalued,_744); var _746=new RegExp(/^<)/); var _748=_747.exec(_744); _743=_748[1]+"/selectChoices>"; }else{ _743=_744; } return _743; }; SharePromptAction.prototype.arrayContains=function(_749,_74a){ var _74b=false; for(var i=0;i<_749.length;i++){ if(_749[i]===_74a){ _74b=true; break; } } return _74b; }; SharePromptAction.prototype.getPromptValues=function(){ if(!this.m_promptValues){ this.parsePromptParameters(); } return this.m_promptValues; }; SharePromptAction.prototype._isPromptParamMultiValued=function(_74d,_74e){ var _74f=false; if(_74d!="undefined"&&_74d){ _74f=true; }else{ var _750=new RegExp(/^\s*0&&_754.childNodes[0].nodeName==="parsererror")){ var _755=_754.firstChild; var _756=XMLHelper_FindChildByTagName(_755,"reportParameters",true); _752=XMLHelper_FindChildrenByTagName(_756,"reportParameter",false); } } } catch(e){ } return _752; }; SharePromptAction.prototype.executePrompt=function(){ if(this.getPromptValues()!==null){ this.execute(); return true; } return false; }; function SnapshotsAction(){ }; SnapshotsAction.prototype=new CognosViewerAction(); SnapshotsAction.prototype.updateMenu=function(_757){ var _758=this.m_oCV.getViewerWidget(); _757.disabled=(_758.getAttributeValue("reportCreatedInCW")=="true")||(_758.getAttributeValue("fromReportPart")=="true")||(this.m_oCV.envParams["reportpart_id"]&&this.m_oCV.envParams["reportpart_id"].length)>0?true:false; _757.visible=!this.isPromptWidget(); return _757; }; SnapshotsAction.prototype.execute=function(){ var oCV=this.getCognosViewer(); var _75a=oCV.getViewerWidget(); if(_75a.getSavedOutputsCMResponse()==null){ this.queryCMForSavedOutputs({"complete":{"object":this,"method":this.handleQueryResponse}}); }else{ if(typeof _75a.savedOutputMenuUpdated!="undefined"&&_75a.savedOutputMenuUpdated==false){ this.populateMenu(true); _75a.savedOutputMenuUpdated=true; } } }; SnapshotsAction.prototype.queryCMForSavedOutputs=function(_75b){ var oCV=this.getCognosViewer(); var _75d=oCV.getViewerWidget(); var _75e=""; var _75f=document.getElementById("formWarpRequest"+oCV.getId()); if(oCV.envParams["originalReport"]){ _75e=oCV.envParams["originalReport"]; }else{ if(_75f&&_75f["reRunObj"]!=null&&_75f["reRunObj"].value.length>0){ _75e=_75f["reRunObj"].value; }else{ _75e=oCV.envParams["ui.object"]; } } _75e+="/reportVersion/*[@format='HTML' or @format='XHTML']/.."; var _760=""+""+xml_encode(_75e)+""+""+"searchPath"+"creationTime"+"storeID"+""+""+""+"creationTime"+"descending"+""+""+""; var _761=new DataDispatcherEntry(oCV); _761.addFormField("ui.action","CMRequest"); _761.addFormField("cv.responseFormat","CMRequest"); _761.addFormField("ui.object",_75e); _761.addFormField("CMRequest",_760); _761.setCallbacks(_75b); oCV.dispatchRequest(_761); }; SnapshotsAction.prototype.setSavedOutputsCMResponse=function(_762){ var oCV=this.getCognosViewer(); var _764=oCV.getViewerWidget(); var _765=XMLBuilderLoadXMLFromString(_762.getResult()); _764.setSavedOutputsCMResponse(_765); }; SnapshotsAction.prototype.handleQueryResponse=function(_766){ this.setSavedOutputsCMResponse(_766); 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(_769){ var oCV=this.getCognosViewer(); var _76b=oCV.getViewerWidget(); var _76c=oCV.envParams["ui.action"]; var _76d=_76b.savedOutputsCMResponse; var root=oCV.findBlueDotMenu(); root.open=_769; var _76f=oCV.findToolbarItem("Snapshots",root); var _770=XMLHelper_FindChildByTagName(_76d,"result",true); var _771=XMLHelper_FindChildrenByTagName(_770,"item",false); var _772=[]; var _773=null; var _774=null; var _775=null; var _776; if(this.canShowLiveMenuItem()){ _776=(_76c!="view"&&_76c!="buxView"&&oCV.getStatus()!=="fault"); _775={name:"live",label:RV_RES.IDS_JS_SNAPSHOTS_LIVE,action:_776?{}:{name:"RunSavedOutputReport",payload:{}},items:null}; this.addMenuItemChecked(_776,_775); _772.push(_775); if(_771.length>0){ _772.push({separator:true}); } } if(_771.length>0){ var _777=this.getMenuItemActionClassHandler(); var _778=[]; for(var _779=0;_779<_771.length;_779++){ if(_779<5){ var _77a=_771[_779]; var _77b=XMLHelper_GetText(XMLHelper_FindChildByTagName(_77a,"creationTime_localized",true)); _77b=enforceTextDir(_77b); var _77c=XMLHelper_FindChildByTagName(_77a,"storeID",true); var _77d=XMLHelper_GetText(XMLHelper_FindChildByTagName(_77c,"value",true)); var _77e=XMLHelper_FindChildByTagName(_77a,"creationTime",true); var _77f=XMLHelper_GetText(XMLHelper_FindChildByTagName(_77e,"value",true)); if(_773==null){ _773=_77f; _774=_77d; } _776=(_76c=="view"||_76c=="buxView")&&oCV.envParams["creationTime"]==_77f&&_76b.getSavedOutputSearchPath()!=null; _775={name:"savedOutput",label:_77b,action:_776?{}:{name:_777,payload:{obj:_77d,creationTime:_77f,mostRecent:false}},items:null}; this.addMenuItemChecked(_776,_775); _778.push(_775); }else{ _778.push({name:"viewAllSnapshots",label:RV_RES.IDS_JS_VIEW_ALL_SNAPSHOTS,action:{name:"ViewAllSnapshots",payload:{}},items:null}); break; } } _776=false; if(_76b.getSavedOutputSearchPath()==null&&(_76c=="view"||_76c=="buxView")){ _776=true; } _775={name:"savedOutput",label:RV_RES.IDS_JS_MOST_RECENT_SNAPSHOT,action:_776?{}:{name:_777,payload:{obj:_774,creationTime:_773,mostRecent:true}},items:null}; this.addMenuItemChecked(_776,_775); _772.push(_775); _772.push({separator:true}); _772=_772.concat(_778); } _76f.open=_769; _76f.items=_772; var _780=[]; _780.push(_76f); _76b.fireEvent("com.ibm.bux.widgetchrome.toolbar.update",null,_780); }; SnapshotsAction.prototype.resetMenu=function(_781){ var oCV=this.getCognosViewer(); var _783=oCV.getViewerWidget(); var root=oCV.findBlueDotMenu(); var _785=oCV.findToolbarItem("Snapshots",root); if(_785){ _785.open=false; var _786=[{name:"loadng",label:RV_RES.GOTO_LOADING,iconClass:"loading"}]; _785.items=_786; var _787=[_785]; _783.fireEvent("com.ibm.bux.widgetchrome.toolbar.update",null,_787); } }; 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 _788=this.m_oCV.getRAPReportInfo(); if(_788){ return (_788.getContainerCount()==1); } return false; }; SwapRowsAndColumnsAction.prototype.isSelectedObject_SupportedChartOrCrosstab=function(){ var _789=this.getSelectedReportInfo(); return (_789&&!SwapRowsAndColumnsAction.M_oDisplayTypeIsUnsupported[_789.displayTypeId]); }; SwapRowsAndColumnsAction.prototype.isCurrentObject_singlePart_SupportedChartOrCrosstab=function(){ var _78a=this.m_oCV.getRAPReportInfo(); if(_78a){ if(_78a.getContainerCount()===1){ var _78b=_78a.getContainerFromPos(0).displayTypeId; if(_78b&&!SwapRowsAndColumnsAction.M_oDisplayTypeIsUnsupported[_78b]){ return true; } } } return false; }; SwapRowsAndColumnsAction.prototype.keepRAPCache=function(){ return false; }; SwapRowsAndColumnsAction.prototype.updateMenu=function(_78c){ _78c.visible=this.ifContainsInteractiveDataContainer(); if(!_78c.visible){ return _78c; } _78c.disabled=!this.canSwap(); _78c.iconClass=_78c.disabled?"disabledSwap":"swap"; return _78c; }; function UndoRedoAction(){ }; UndoRedoAction.prototype=new CognosViewerAction(); UndoRedoAction.prototype.dispatchRequest=function(_78d,_78e){ var _78f=null; var _790=null; var _791=this.getUndoRedoQueue(); if(_78e=="Undo"){ _790=_791.moveBack(); }else{ _790=_791.moveForward(); } if(_78e=="Undo"&&_790&&_790.undoCallback){ _790.undoCallback(); this.getCognosViewer().getViewerWidget().updateToolbar(); }else{ if(_78e=="Redo"&&_790&&_790.redoCallback){ _790.redoCallback(); this.getCognosViewer().getViewerWidget().updateToolbar(); }else{ var _792=this.getCognosViewer().getViewerWidget().getProperties(); if(_792&&_790.widgetProperties){ _792.doUndo(_790.widgetProperties); } var _78f=new ViewerDispatcherEntry(this.getCognosViewer()); if(typeof _790.spec!="undefined"){ _78f.addFormField("ui.action","undoRedo"); _78f.addFormField("ui.spec",_790.spec); _78f.addFormField("executionParameters",_790.parameters); }else{ _78f.addFormField("ui.action","undoRedo"); _78f.addFormField("ui.conversation",_790.conversation); } if(typeof _790.hasAVSChart!="undefined"){ _78f.addFormField("hasAVSChart",_790.hasAVSChart); } if(_792&&_792.getRowsPerPage()!=null){ _78f.addFormField("run.verticalElements",_792.getRowsPerPage()); } if(_78d!=""){ _78f.addFormField("cv.updateDataFilters",_78d); } if(typeof _790.infoBar=="string"){ _78f.addFormField("rap.reportInfo",_790.infoBar); }else{ _78f.addFormField("rap.reportInfo","{}"); } _78f.addFormField("run.prompt","false"); _78f.setCallbacks({"closeErrorDlg":{"object":_791,"method":_791.handleCancel}}); this.getCognosViewer().dispatchRequest(_78f); } } 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(_793){ _793.visible=this.getCognosViewer().isLimitedInteractiveMode()?true:this.ifContainsInteractiveDataContainer(); if(!_793.visible){ return _793; } if(this.getUndoRedoQueue().getPosition()>0){ _793.iconClass="undo"; _793.disabled=false; }else{ _793.iconClass="undoDisabled"; _793.disabled=true; } _793.label=this.getUndoRedoQueue().getUndoTooltip(); return _793; }; function RedoAction(){ this.m_sAction="Redo"; }; RedoAction.prototype=new UndoRedoAction(); RedoAction.prototype.updateMenu=function(_794){ _794.visible=this.getCognosViewer().isLimitedInteractiveMode()?true:this.ifContainsInteractiveDataContainer(); if(!_794.visible){ return _794; } if(this.getUndoRedoQueue().getPosition()<(this.getUndoRedoQueue().getLength()-1)){ _794.iconClass="redo"; _794.disabled=false; }else{ _794.iconClass="redoDisabled"; _794.disabled=true; } _794.label=this.getUndoRedoQueue().getRedoTooltip(); return _794; }; function ViewAllSnapshotsAction(){ }; ViewAllSnapshotsAction.prototype=new SnapshotsAction(); ViewAllSnapshotsAction.prototype.updateMenu=function(_795){ var oCV=this.getCognosViewer(); var _797=oCV.getViewerWidget(); if(_797.m_bNoSavedOutputs==true){ _795.disabled=true; } return _795; }; ViewAllSnapshotsAction.prototype.execute=function(){ if(!this.getCognosViewer().getViewerWidget().getSavedOutputsCMResponse()){ this.queryCMForSavedOutputs({"complete":{"object":this,"method":this.handleQueryResponse}}); }else{ this.showDialog(); } }; ViewAllSnapshotsAction.prototype.handleQueryResponse=function(_798){ this.setSavedOutputsCMResponse(_798); this.showDialog(); }; ViewAllSnapshotsAction.prototype.showDialog=function(){ var oCV=this.getCognosViewer(); var _79a=oCV.getViewerWidget(); var _79b=_79a.getSavedOutputsCMResponse(); var _79c=null; var _79d=null; if(_79b){ _79c=XMLHelper_FindChildByTagName(_79b,"result",true); if(_79c){ _79d=XMLHelper_FindChildrenByTagName(_79c,"item",false); } } if(!_79b||!_79d||_79d.length==0){ _79a.m_bNoSavedOutputs=true; var _79e=new WarningMessageDialog(oCV,RV_RES.IDS_JS_NO_SAVED_OUTPUTS); _79e.renderInlineDialog(); }else{ var _79f=getCognosViewerObjectString(this.m_oCV.getId()); var _7a0=RV_RES.IDS_JS_SELECT_SNAPSHOT_DIALOG_TITLE; var _7a1=RV_RES.IDS_JS_SELECT_SNAPSHOT_DIALOG_DESC; var _7a2=this.getCognosViewer().envParams["creationTime"]; this.selectSnapshotDialog=new viewer.dialogs.SelectSnapshot({sTitle:_7a0,sLabel:_7a1,cmResponse:_79b,currentSnapshotCreationTime:_7a2,okHandler:function(_7a3,_7a4){ window[_79f].executeAction("ViewSavedOutput",{obj:_7a3,creationTime:_7a4}); },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(_7a5){ if(this.getNumberOfSelections()==1){ var _7a6=this.getCellRef(); if(_7a6.getAttribute("rp_name")){ var _7a7=[]; _7a7.push({name:"originalLabel",label:_7a6.getAttribute("rp_name"),iconClass:"",action:null,items:null}); _7a5.items=_7a7; return _7a5; } } return ""; }; function ViewSavedOutputAction(){ this.m_obj=""; this.creationTime=""; this.m_mostRecent=false; }; ViewSavedOutputAction.prototype=new CognosViewerAction(); ViewSavedOutputAction.prototype.addAdditionalRequestParms=function(_7a8){ }; ViewSavedOutputAction.prototype.setRequestParms=function(_7a9){ this.m_obj=_7a9.obj; this.creationTime=_7a9.creationTime; this.m_mostRecent=_7a9.mostRecent; }; ViewSavedOutputAction.prototype.updateMenu=function(){ var _7aa=this.getCognosViewer().getAction("Snapshots"); _7aa.populateMenu(false); }; ViewSavedOutputAction.prototype.execute=function(){ var _7ab=this.getCognosViewer(); var _7ac=_7ab.getViewerWidget(); if(_7ab.getStatus()==="fault"){ _7ac.clearErrorDlg(); } _7ab.getViewerWidget().setPromptParametersRetrieved(false); _7ab.envParams["reportPrompts"]=""; var _7ad=_7ab.envParams["ui.action"]; var _7ae=document.getElementById("formWarpRequest"+_7ab.getId()); if(_7ad=="view"&&_7ae&&_7ae.reRunObj&&_7ae.reRunObj.value){ _7ab.envParams["ui.reRunObj"]=_7ae["reRunObj"].value; }else{ if(_7ad!="view"){ _7ab.envParams["ui.reRunObj"]=_7ab.envParams["ui.object"]; } } var _7af="storeID('"+this.m_obj+"')"; _7ab.envParams["ui.action"]="buxView"; _7ab.envParams["ui.object"]=_7ab.envParams["ui.reRunObj"]; _7ab.envParams["creationTime"]=this.creationTime; if(this.m_mostRecent===true){ _7ac.setSavedOutputSearchPath(null); }else{ _7ac.setSavedOutputSearchPath(_7af); } this.updateMenu(); this.getUndoRedoQueue().clearQueue(); _7ab.getViewerWidget().clearPropertiesDialog(); if(_7ab.getCurrentlySelectedTab()&&_7ac.getSavedOutput()){ _7ab.setKeepTabSelected(_7ab.getCurrentlySelectedTab()); } this.dispatchRequest(_7af); this.fireModifiedReportEvent(); }; ViewSavedOutputAction.prototype.dispatchRequest=function(_7b0){ 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",_7b0); 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(_7b1,arg1){ this.m_oCV.setTracking(""); this.m_oCV.setConversation(""); this.m_request.onComplete(_7b1,arg1); }; function WatchNewVersionsAction(){ this.m_requestParms={subAction:""}; }; WatchNewVersionsAction.prototype=new CognosViewerAction(); WatchNewVersionsAction.prototype.setRequestParms=function(_7b3){ this.m_requestParms=_7b3; }; WatchNewVersionsAction.prototype.execute=function(){ var _7b4=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": _7b4.DeleteNotification(); break; case "AddNotification": _7b4.AddNotification(); break; case "NewSubscription": _7b4.NewSubscription(); break; case "ModifySubscription": _7b4.ModifySubscription(this.m_requestParms.subscriptionId); break; case "DeleteSubscription": _7b4.DeleteSubscription(this.m_requestParms.subscriptionId); break; } }; WatchNewVersionsAction.prototype.closeMenu=function(){ var _7b5=this.m_oCV.findToolbarItem("WatchNewVersions"); this.resetMenu(_7b5); var _7b6=getCognosViewerObjectRefAsString(this.m_oCV.getId()); setTimeout(_7b6+".getViewerWidget().fireEvent(\"com.ibm.bux.widgetchrome.toolbar.update\", null, ["+_7b6+".findToolbarItem(\"WatchNewVersions\")]);",1); }; WatchNewVersionsAction.prototype.resetMenu=function(_7b7){ _7b7.open=false; _7b7.action={name:"WatchNewVersions",payload:{subAction:"loadMenu",contextMenu:false}}; _7b7.closeAction=null; var _7b8=[]; _7b8.push({name:"loadng",label:RV_RES.GOTO_LOADING,iconClass:"loading"}); _7b7.items=_7b8; }; WatchNewVersionsAction.prototype.updateMenu=function(_7b9){ var _7ba=_7b9.items; var _7bb=this.m_oCV.getSubscriptionManager(); if(!_7ba||_7ba.length===0){ _7b9.visible=_7bb.CanCreateNewWatchRule(); _7b9.disabled=!(_7bb.IsValidSelectionForNewRule()); }else{ this.resetMenu(_7b9); } return _7b9; }; WatchNewVersionsAction.prototype.loadMenu=function(_7bc){ var _7bd=this.m_oCV.getSubscriptionManager(); var cvId=this.m_oCV.getId(); var oCV=this.m_oCV; var _7c0=new JSONDispatcherEntry(oCV); _7c0.addFormField("ui.action","getSubscriptionInfo"); _7c0.addFormField("cv.responseFormat","subscriptionManager"); _7c0.addFormField("contextMenu",_7bc==true?"true":"false"); _7bd.addCommonFormFields(_7c0,""); _7c0.setCallbacks({"complete":{"object":this,"method":this.openSubscriptionMenuResponse}}); oCV.dispatchRequest(_7c0); }; WatchNewVersionsAction.prototype.openSubscriptionMenuResponse=function(_7c1){ var _7c2=this.m_oCV.getSubscriptionManager(); _7c2.Initialize(_7c1); var _7c3=[]; _7c2.ClearSubscriptionMenu(); var _7c4=false; if(_7c2.CanGetNotified()){ if(_7c2.m_sQueryNotificationResponse=="on"){ _7c3.push({name:"DeleteNotification",label:RV_RES.RV_DO_NOT_ALERT_NEW_VERSION,iconClass:"deleteNotification",action:{name:"WatchNewVersions",payload:{subAction:"DeleteNotification"}},items:null}); _7c4=true; }else{ if(_7c2.m_sQueryNotificationResponse=="off"&&_7c2.m_sEmail!=""){ _7c3.push({name:"AddNotification",label:RV_RES.RV_ALERT_NEW_VERSION,iconClass:"addNotification",action:{name:"WatchNewVersions",payload:{subAction:"AddNotification"}},items:null}); _7c4=true; } } } if(_7c2.CanCreateNewWatchRule()){ if(_7c4){ _7c3.push({separator:true}); } var _7c5={name:"NewSubscription",label:RV_RES.RV_NEW_WATCH_RULE,iconClass:"newSubscription",action:{name:"WatchNewVersions",payload:{subAction:"NewSubscription"}},items:null}; if(!_7c2.IsValidSelectionForNewRule()){ _7c5.disabled=true; } _7c3.push(_7c5); _7c4=true; } var _7c6=""; if(typeof this.m_oCV.UIBlacklist!="undefined"){ _7c6=this.m_oCV.UIBlacklist; } if(_7c6.indexOf(" RV_TOOLBAR_BUTTONS_RULES ")==-1){ if(_7c2.m_aWatchRules&&_7c2.m_aWatchRules.length>0){ if(_7c4){ _7c3.push({separator:true}); } var _7c7=_7c2.CanModifyWatchRule(); for(var sub=0;sub<_7c2.m_aWatchRules.length;++sub){ var menu={name:"WatchRule"+sub,label:_7c2.m_aWatchRules[sub].name,iconClass:"watchRule",action:null,items:[]}; if(_7c7&&_7c6.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(_7c6.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}); } _7c3.push(menu); } } } if(_7c3.length===0){ _7c3.push({name:"NoWatchRules",label:RV_RES.RV_NO_WATCH_RULES,iconClass:"",action:null,items:null,disabled:true}); } var _7ca=this.m_oCV.findToolbarItem("WatchNewVersions"); if(_7ca){ _7ca.items=_7c3; _7ca.action=null; _7ca.open=true; _7ca.closeAction={name:"WatchNewVersions",payload:{subAction:"close"}}; var _7cb=[]; _7cb.push(_7ca); this.m_oCV.getViewerWidget().fireEvent("com.ibm.bux.widgetchrome.toolbar.update",null,_7cb); } }; function RunSavedOutputReportAction(){ }; RunSavedOutputReportAction.prototype=new CognosViewerAction(); RunSavedOutputReportAction.prototype.updateMenu=function(_7cc){ var _7cd=this.m_oCV.envParams["ui.action"]; var _7ce=(_7cd!="view"&&_7cd!="buxView"&&this.m_oCV.getStatus()!=="fault"); this.addMenuItemChecked(_7ce,_7cc); return _7cc; }; RunSavedOutputReportAction.prototype.dispatchRequest=function(_7cf){ var _7d0=this.getCognosViewer(); if(_7d0.envParams["savedReportName"]){ delete _7d0.envParams["savedReportName"]; } if(_7d0.getStatus()==="fault"){ var _7d1=this.getCognosViewer().getViewerWidget(); _7d1.clearErrorDlg(); } var _7d2=_7d0.envParams["ui.action"]; var _7d3=document.getElementById("formWarpRequest"+_7d0.getId()); if(_7d0.envParams["ui.reRunObj"]){ _7d0.envParams["ui.object"]=_7d0.envParams["ui.reRunObj"]; }else{ if(_7d2=="view"&&_7d3&&typeof _7d3["reRunObj"]!="undefined"&&_7d3["reRunObj"]!=null&&_7d3["reRunObj"].value.length>0){ _7d0.envParams["ui.object"]=_7d3["reRunObj"].value; } } var oReq=new ViewerDispatcherEntry(_7d0); oReq.addFormField("ui.action","bux"); oReq.addFormField("widget.runFromSavedOutput","true"); oReq.addFormField("ui.object",_7d0.envParams["ui.object"]); oReq.addFormField("run.outputFormat","HTML"); oReq.addFormField("ui.primaryAction",""); oReq.addFormField("widget.reloadToolbar","true"); oReq.addDefinedNonNullFormField("cv.objectPermissions",_7d0.envParams["cv.objectPermissions"]); oReq.addDefinedNonNullFormField("run.prompt",_7d0.envParams["promptOnRerun"]); oReq.addDefinedNonNullFormField("limitedInteractiveMode",_7d0.envParams["limitedInteractiveMode"]); oReq.addDefinedNonNullFormField("widget.globalPromptInfo",_7d0.getViewerWidget().getGlobalPromptsInfo()); oReq.addDefinedNonNullFormField("baseReportSearchPath",_7d0.envParams["baseReportSearchPath"]); oReq.addNonEmptyStringFormField("cv.updateDataFilters",_7cf); _7d0.getViewerWidget().clearPropertiesDialog(); _7d0.preparePromptValues(oReq); _7d0.dispatchRequest(oReq); this.fireModifiedReportEvent(); _7d0.envParams["ui.action"]="run"; }; RunSavedOutputReportAction.prototype.execute=function(){ this.gatherFilterInfoBeforeAction("RunSavedOutputReport"); }; function InvokeChangeDisplayTypeDialogAction(){ }; InvokeChangeDisplayTypeDialogAction.prototype=new CognosViewerAction(); InvokeChangeDisplayTypeDialogAction.prototype.execute=function(){ var _7d5=this.getCognosViewer(); var _7d6=this.getSelectedReportInfo(); if(_7d6){ var _7d7=_7d5.getViewerWidget(); var _7d8=false; if(_7d6.suggestedDisplayTypesEnabled==true){ _7d8=(typeof _7d6.possibleDisplayTypes=="undefined")||(typeof _7d6.suggestedDisplayTypes=="undefined")?true:false; }else{ _7d8=(typeof _7d6.possibleDisplayTypes=="undefined"); } if(_7d8){ var _7d9=new AsynchJSONDispatcherEntry(this.m_oCV); _7d9.setCallbacks({"complete":{"object":this,"method":this.handleResponse}}); _7d9.setRequestIndicator(_7d5.getRequestIndicator()); _7d9.addFormField("ui.action","getInfoFromReportSpec"); _7d9.addFormField("bux","true"); _7d9.addNonEmptyStringFormField("modelPath",this.m_oCV.getModelPath()); _7d9.addFormField("ui.object",this.m_oCV.envParams["ui.object"]); _7d9.addDefinedFormField("ui.spec",this.m_oCV.envParams["ui.spec"]); _7d9.addFormField("cv.actionContext",this.addActionContext()); _7d9.addFormField("ui.conversation",encodeURIComponent(this.m_oCV.getConversation())); _7d5.dispatchRequest(_7d9); }else{ _7d7.invokeDisplayTypeDialog(_7d6.possibleDisplayTypes,_7d6.suggestedDisplayTypes); } } }; InvokeChangeDisplayTypeDialogAction.prototype.handleResponse=function(_7da){ var _7db=this.getCognosViewer(); var _7dc=_7db.getViewerWidget(); var _7dd=_7da.getResult(); for(var i in _7dd.containers){ var _7df=this.getReportInfo(_7dd.containers[i].container); _7df.possibleDisplayTypes=_7dd.containers[i].possibleDisplayTypes; _7df.suggestedDisplayTypes=_7dd.containers[i].suggestedDisplayTypes; } var _7e0=this.getSelectedReportInfo(); _7dc.invokeDisplayTypeDialog(_7e0.possibleDisplayTypes,_7e0.suggestedDisplayTypes); }; InvokeChangeDisplayTypeDialogAction.prototype.addActionContext=function(){ var _7e1=""; _7e1+=""; _7e1+=""; _7e1+=""; _7e1+=this.getDataItemInfoMap(); _7e1+=this.addClientContextData(3); _7e1+=""; _7e1+=""; return _7e1; }; InvokeChangeDisplayTypeDialogAction.prototype.updateMenu=function(_7e2){ var _7e3=this.getCognosViewer().getRAPReportInfo(); _7e2.visible=_7e3.containsInteractiveDataContainer(); if(!_7e2.visible){ return _7e2; } var _7e4=this.getSelectedReportInfo(); _7e2.disabled=(_7e4==null||_7e4.displayTypeId==null||!this.isInteractiveDataContainer(_7e4.displayTypeId)); if(_7e2.disabled){ _7e2.iconClass="chartTypesDisabled"; return _7e2; } _7e2.iconClass="chartTypes"; return _7e2; }; function GotoAction(){ }; GotoAction.prototype=new CognosViewerAction(); GotoAction.prototype.execute=function(){ var _7e5=this.m_oCV.getDrillMgr(); _7e5.launchGoToPage(); }; GotoAction.prototype.updateMenu=function(_7e6){ var _7e7=[]; var _7e8=this.m_oCV.getDrillTargets(); var _7e9=this.m_oCV.getDrillMgr(); var _7ea=_7e9.getAuthoredDrillThroughTargets(); if(_7ea.length>0){ var _7eb=""; for(var _7ec=0;_7ec<_7ea.length;++_7ec){ _7eb+=eval("\""+_7ea[_7ec]+"\""); } _7eb+=""; var _7ed=this.m_oCV.getAction("AuthoredDrill"); var _7ee=_7ed.getAuthoredDrillThroughContext(_7eb,_7e8); var _7ef=_7ee.childNodes; if(_7ef.length>0){ for(var _7f0=0;_7f0<_7ef.length;++_7f0){ var _7f1=_7ef[_7f0]; var _7f2=this.getTargetReportIconClass(_7f1); var _7f3=_7f1.getAttribute("label"); _7e7.push({name:"AuthoredDrill",label:_7f3,iconClass:_7f2,action:{name:"AuthoredDrill",payload:XMLBuilderSerializeNode(_7f1)},items:null}); } } } if(_7e7.length>0){ _7e7.push({separator:true}); } var _7f4=false; if(this.m_oCV.getSelectionController()==null||this.m_oCV.getSelectionController().getModelDrillThroughEnabled()==false){ _7f4=true; } _7e7.push({name:"Goto",disabled:_7f4,label:RV_RES.RV_MORE,iconClass:"",action:{name:"Goto",payload:""},items:null}); if(this.m_oCV.isIWidgetMobile()){ _7e6.flatten="true"; } _7e6.items=_7e7; return _7e6; }; GotoAction.prototype.getTargetReportIconClass=function(_7f5){ var _7f6=""; var _7f7=_7f5.getAttribute("method"); switch(_7f7){ case "edit": _7f6="editContent"; break; case "execute": _7f6="runReport"; break; case "view": var _7f8=_7f5.getAttribute("outputFormat"); switch(_7f8){ case "HTML": case "XHTML": case "HTMLFragment": _7f6="html"; break; case "PDF": _7f6="pdf"; break; case "XML": _7f6="xml"; break; case "CSV": _7f6="csv"; break; case "XLS": _7f6="excel2000"; break; case "SingleXLS": _7f6="excelSingleSheet"; break; case "XLWA": _7f6="excel2002"; break; case "spreadsheetML": _7f6="excel2007"; break; case "xlsxData": _7f6="excel2007"; break; } break; } return _7f6; }; function AnnotationAction(){ }; AnnotationAction.prototype=new CognosViewerAction(); AnnotationAction.prototype.updateMenu=function(_7f9){ var _7fa=this.m_oCV.getViewerWidget(); var _7fb=this.m_oCV.aBuxAnnotations; var _7fc=[]; for(var _7fd=0;_7fd<_7fb.length;_7fd++){ var ann=eval("new "+_7fb[_7fd]+"()"); ann.setCognosViewer(this.m_oCV); if(ann&&ann.isEnabled(_7f9.placeType)){ var _7ff={}; _7ff.name=_7fb[_7fd]; _7ff.label=ann.getMenuItemString(_7fa.getAttributeValue("itemName")); _7ff.action={}; _7ff.action.name=_7fb[_7fd]; _7ff.action.payload=""; _7ff.items=null; _7ff.iconClass=ann.getMenuItemIconClass(); _7fc.push(_7ff); } } _7f9.items=_7fc; _7f9.disabled=!(_7f9.items&&_7f9.items.length); if(_7f9.disabled){ _7f9.iconClass="disabledAnnotation"; }else{ _7f9.iconClass="annotation"; } return _7f9; }; AnnotationAction.prototype.execute=function(){ var _800=this.getCognosViewer(); var _801=_800.getSelectionController(); var _802=_801.getSelections(); if(_802&&_802.length==1){ var _803=_800.getViewerWidget(); if(_803){ this.executeAction(_800,_803,_802[0]); } } }; AnnotationAction.prototype.executeAction=function(_804,_805,_806){ }; function DeleteWidgetAnnotationAction(){ }; DeleteWidgetAnnotationAction.prototype=new AnnotationAction(); DeleteWidgetAnnotationAction.prototype.execute=function(){ var _807=this.getCognosViewer(); var _808=_807.getViewerWidget(); if(_808){ _808.getAnnotationHelper().deleteWidgetComment(); } }; function EditWidgetAnnotationAction(){ }; EditWidgetAnnotationAction.prototype=new AnnotationAction(); EditWidgetAnnotationAction.prototype.execute=function(){ var _809=this.getCognosViewer(); var _80a=_809.getViewerWidget(); if(_80a){ window.setTimeout(function(){ _80a.getAnnotationHelper().editWidgetComment(); },0); } }; function NewWidgetAnnotationAction(){ }; NewWidgetAnnotationAction.prototype=new AnnotationAction(); NewWidgetAnnotationAction.prototype.execute=function(){ var _80b=this.getCognosViewer(); var _80c=_80b.getViewerWidget(); if(_80c){ _80c.getAnnotationHelper().addWidgetComment(); } }; function DeleteAnnotationAction(){ }; DeleteAnnotationAction.prototype=new AnnotationAction(); DeleteAnnotationAction.prototype.executeAction=function(_80d,_80e,_80f){ if(_80d&&_80e&&_80f){ var _810=_80f.getCellRef(); var _811=_80d.findCtx(_810); _80e.getAnnotationHelper().deleteComment(_811); } }; function EditAnnotationAction(){ }; EditAnnotationAction.prototype=new AnnotationAction(); EditAnnotationAction.prototype.executeAction=function(_812,_813,_814){ if(_812&&_813&&_814){ var _815=_814.getCellRef(); var _816=_812.findCtx(_815); window.setTimeout(function(){ _813.getAnnotationHelper().editComment(_816); },0); } }; function NewAnnotationAction(){ }; NewAnnotationAction.prototype=new AnnotationAction(); NewAnnotationAction.prototype.executeAction=function(_817,_818,_819){ if(_817&&_818&&_819){ var _81a=_819.getCellRef(); var _81b=_817.findCtx(_81a); var _81c=_819.getDisplayValues()[0]; window.setTimeout(function(){ _818.getAnnotationHelper().addComment(_81b,_81c); },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(_81d){ _81d.addFormField("cv.responseFormat","CMRequest"); _81d.setCallbacks({"complete":{"object":this,"method":this.handleQueryResponse}}); }; ViewActiveReportAction.prototype.handleQueryResponse=function(_81e){ var _81f=this.m_oCV.getViewerWidget(); _81f.showLoading(); var _820=XMLBuilderLoadXMLFromString(_81e.getResult()); var _821=XMLHelper_FindChildByTagName(_820,"storeID",true); var _822=XMLHelper_GetText(XMLHelper_FindChildByTagName(_821,"value",true)); var _823=dojo.byId(this.m_oCV.getViewerWidget().getIFrameId()); _823.src=this.m_oCV.getGateway()+"/output/cm/"+_822+"/"; }; function RefreshActiveReportAction(){ this.m_sAction="RefreshActiveReport"; }; RefreshActiveReportAction.prototype=new CognosViewerAction(); RefreshActiveReportAction.prototype.execute=function(){ var _824=this.m_oCV.getViewerWidget(); var _825=dojo.byId(_824.getIFrameId()); var _826=_825.src; _825.src=_826; _824.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(_827,_828){ 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 _829="false"; var _82a="cognosViewer"; this.addFormField("b_action",_82a); 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 _82b=this.m_oCV.envParams["ui.spec"]; var _82c=this.m_oCV.getConversation(); this.addFormField("ui.action","export"); this.addFormField("ui.conversation",_82c); this.addFormField("run.prompt",_829); this.addFormField("asynch.attachmentEncoding","base64"); this.addFormField("run.outputEncapsulation","URLQueryString"); this.addFormField("ui.spec",_82b); 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 _82d=this.m_oCV.getViewerWidget(); if(_82d!=null){ dojo.when(_82d.getWidgetStoreID(),dojo.hitch(this,function(_82e){ if(typeof _82e!="undefined"&&_82e!=null){ this.addFormField("widgetStoreID",_82e); } })); var _82f=_82d.getAttributeValue("gateway"); if(_82f){ this.addFormField("cv.gateway",_82f); } var _830=_82d.getAttributeValue("webcontent"); if(_830){ this.addFormField("cv.webcontent",_830); } } this.addFormField("rap.parametersInfo",CViewerCommon.buildParameterValuesSpec(this.m_oCV)); }; ExportAction.prototype.insertSpecializedFormElements=function(_831){ 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(_833,_834){ this.oRequest.addFormField(_833,_834); }; 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 _835=location.protocol+"//"+location.host+this.m_oCV.m_sGateway; this.nForm.setAttribute("action",_835); }; PrintAsPDFAction.prototype.sendRequest=function(){ var _836=this.m_oCV.getId(); var _837="get"+this.m_format+_836; this.nForm.setAttribute("id",_837); this.nForm.setAttribute("name",_837); this.nForm.setAttribute("target",this.m_format+"Window"+_836); document.body.appendChild(this.nForm); var _838=this.nForm.getAttribute("target"); window.open("",_838,"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(_839,_83a){ this.nForm.appendChild(createHiddenFormField(_839,_83a)); }; 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(_83b){ var _83c=this._getItemInfo(_83b); return (_83c&&_83c.canExpand); }; ExpandCollapseMemberAction.prototype._isExpanded=function(_83d){ var sMUN=this._getSelectedMUN(_83d); if(!sMUN){ return false; } var _83f=this._getItemInfo(_83d); return (_83f&&_83f.expandedMembers&&_83f.expandedMembers[sMUN]===true); }; ExpandCollapseMemberAction.prototype._getSelectedMUN=function(_840){ var sMun=null; var _842=_840.getMuns(); if(_842&&_842.length>0&&_842[0].length>0){ sMun=_842[0][0]; } return sMun; }; ExpandCollapseMemberAction.prototype._getDataItem=function(_843){ if(!_843){ return null; } var _844=null; var _845=_843.getDataItems(); if(_845&&_845.length>0&&_845[0].length>0){ _844=_845[0][0]; } return _844; }; ExpandCollapseMemberAction.prototype._getItemInfo=function(_846){ var _847=this._getDataItem(_846); if(!_847){ return null; } var _848=this.removeNamespace(_846.getLayoutElementId()); this.m_RAPReportInfo=this.m_oCV.getRAPReportInfo(); this.m_itemInfo=this.m_RAPReportInfo.getItemInfo(_848,_847); this.m_sPreviousDataItem=_847; return this.m_itemInfo; }; ExpandCollapseMemberAction.prototype._alwaysCanExpandCollapse=function(_849){ var _84a=this._getItemInfo(_849); return (_84a&&_84a.alwaysCanExpandCollapse); }; ExpandCollapseMemberAction.prototype._canShowMenu=function(_84b){ var _84c=this._getFirstSelectedObject(_84b); return (_84c&&this._hasMUN(_84c)&&this._isCrosstab(_84c)&&this._isOnEdge(_84c)&&!_84b.areSelectionsMeasureOrCalculation()); }; ExpandCollapseMemberAction.prototype._getCtxId=function(_84d){ var _84e=_84d.getCellRef(); if(_84e&&_84e.getAttribute){ var _84f=_84e.getAttribute("ctx"); if(_84f){ _84f=_84f.split("::")[0].split(":")[0]; return _84f; } } return ""; }; ExpandCollapseMemberAction.prototype._hasMUN=function(_850){ var _851=_850.getMuns(); return _851.length>0?true:false; }; ExpandCollapseMemberAction.prototype._isCrosstab=function(_852){ return _852.getDataContainerType()==="crosstab"?true:false; }; ExpandCollapseMemberAction.prototype._isOnEdge=function(_853){ return _853.getLayoutType()==="columnTitle"?true:false; }; ExpandCollapseMemberAction.prototype.keepRAPCache=function(){ return false; }; ExpandCollapseMemberAction.prototype.updateMenu=function(_854){ var _855=this.m_oCV.getSelectionController(); _854.visible=this._canShowMenu(_855); if(!_854.visible){ return _854; } _854.disabled=!this._canEnableMenu(_855); return _854; }; ExpandCollapseMemberAction.prototype._canEnableMenu=function(_856){ return true; }; ExpandCollapseMemberAction.prototype._getFirstSelectedObject=function(_857){ var _858=_857.getAllSelectedObjects(); if(_858.length>0){ return _858[0]; } return null; }; ExpandCollapseMemberAction.prototype._isSingleSelection=function(_859){ var _85a=_859.getAllSelectedObjects(); return (_85a.length===1); }; ExpandCollapseMemberAction.prototype.addActionContextAdditionalParms=function(){ var _85b=this.getCognosViewer().getSelectionController(); var _85c=this._getFirstSelectedObject(_85b); var sPUN=_85b.getPun(this._getCtxId(_85c)); if(sPUN){ sPUN=""+sXmlEncode(sPUN)+""; } var _85e=""; if(this.m_sExpandCollapseType){ _85e=""+this.m_sExpandCollapseType+""; } return this.getSelectedCellTags()+sPUN+_85e; }; 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(_85f){ if(!this._isSingleSelection(_85f)){ return false; } var _860=this._getFirstSelectedObject(_85f); if(this._alwaysCanExpandCollapse(_860)){ return true; } var _861=this._getCtxId(_860); var _862=true; if(_85f.getDrillUpDownEnabled()===true){ _862=_85f.canDrillDown(_861); } return (_862&&this._getCanExpand(_860)&&!this._isExpanded(_860)); }; 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(_863){ if(this._isSingleSelection(_863)&&!this._isExpanded()){ return true; } return false; }; CollapseMemberAction.prototype._canEnableMenu=function(_864){ var _865=this._getFirstSelectedObject(_864); if(this._alwaysCanExpandCollapse(_865)){ return true; } return (this._isSingleSelection(_864)&&this._isExpanded(_865)); }; 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 _866=this; var _867=new viewer.dialogs.ClipboardDialog({sTitle:RV_RES.IDS_JS_CLIPBOARD,okHandler:function(_868){ _866.executeAction(_868); },cancelHandler:function(){ }}); _867.startup(); window.setTimeout(function(){ _867.show(); },0); }; OpenReportFromClipboardAction.prototype.openReportForIE=function(){ var _869=window.clipboardData.getData("Text"); this.executeAction(_869); }; OpenReportFromClipboardAction.prototype.getDeleteEnvParamsList=function(){ var _86a=["modelPath","packageBase","rapReportInfo","rap.state"]; return _86a; }; OpenReportFromClipboardAction.prototype.deleteEnvParams=function(){ var _86b=this.m_cv.envParams; var _86c=this.getDeleteEnvParamsList(); for(var _86d in _86c){ if(_86b[_86c[_86d]]){ delete _86b[_86c[_86d]]; } } }; OpenReportFromClipboardAction.prototype.cleanUpCognosViewer=function(){ this.m_cv.setExecutionParameters(""); this.m_cv.setConversation(""); this.deleteEnvParams(); }; OpenReportFromClipboardAction.prototype.getRequestParams=function(){ var _86e={"run.outputFormat":"HTML","cv.id":this.m_cv.getId(),"widget.reloadToolbar":"true","openReportFromClipboard":"true","ui.reportDrop":"true"}; var _86f=this.m_cv.getViewerWidget().getGlobalPromptsInfo(); if(_86f!=null){ _86e["widget.globalPromptInfo"]=_86f; } if(this.m_filters!=""){ _86e["cv.updateDataFilters"]=this.m_filters; } var _870=["cv.objectPermissions","limitedInteractiveMode"]; for(var _871 in _870){ var _872=_870[_871]; var _873=this.m_cv.envParams[_872]; if(_873){ _86e[_872]=_873; } } return _86e; }; OpenReportFromClipboardAction.prototype.addAdditionalOptions=function(_874){ var _875=this.getRequestParams(); for(var _876 in _875){ _874.addFormField(_876,_875[_876]); } }; OpenReportFromClipboardAction.prototype.executeAction=function(_877){ this.m_cv=this.getCognosViewer(); this.m_cv.envParams["ui.spec"]=_877; this.gatherFilterInfoBeforeAction("OpenReportFromClipboard"); ChangePaletteAction.reset(this.getCognosViewer()); }; OpenReportFromClipboardAction.prototype.dispatchRequest=function(_878){ this.m_cv=this.getCognosViewer(); var _879=this.m_cv.getViewerWidget(); _879.reset(); this.m_filters=_878; this.cleanUpCognosViewer(); var _87a=this.createCognosViewerDispatcherEntry(this.m_action); this.m_cv.hideReportInfo(); this.m_cv.dispatchRequest(_87a); 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(_87c){ _87c.visible=this.hasEnvUISpec(); return _87c; }; SaveAsReportAction.prototype.hasEnvUISpec=function(){ if(this.m_oCV){ var _87d=this.m_oCV.envParams["ui.spec"]; return (_87d&&_87d.length>0); } return false; }; SaveAsReportAction.prototype.doSaveAs=function(_87e){ dojo["require"]("bux.dialogs.FileDialog"); dojo["require"]("bux.iwidget.canvas.ReportIOHandler"); this.m_cv=this.getCognosViewer(); var _87f=_87e; var _880=this.m_cv.envParams["ui.objectClass"]; var _881=this.onSaveCallback; var _882=this.afterSaveCallback; var _883={filter:"content-report",title:RV_RES.IDS_JS_SAVE_AS_FDG_TITLE,sMainActionButtonLabel:RV_RES.IDS_JS_OK,"class":"bux-fileDialog"}; var _884=new bux.iwidget.canvas.ReportIOHandler(_87f,_880,_881,_882,_883); _884._doSaveAs(); }; function BusinessProcessAction(){ }; BusinessProcessAction.prototype=new CognosViewerAction(); BusinessProcessAction.prototype.updateMenu=function(_885){ var _886=this.getCognosViewer().envParams["bpmRestURI"]; _885.visible=(_886?true:false); if(_885.visible){ _885.disabled=!this._hasAnyContextInSelectedObjects(); } return _885; }; BusinessProcessAction.prototype._initBPMGateway=function(){ var _887=this.getCognosViewer(); this.m_BPMGateway=_887.envParams["bpmRestURI"]; var _888=this.m_BPMGateway.length; if(this.m_BPMGateway[_888-1]!=="/"){ this.m_BPMGateway+="/"; } }; BusinessProcessAction.prototype.execute=function(){ this._initBPMGateway(); var _889=this._getBPMProcesses(); }; BusinessProcessAction.prototype._getBPMProcesses=function(){ var _88a={complete:{object:this,method:this.handleGetBPMProcessSuccess},fault:{object:this,method:this.handleGetBPMProcessFail}}; var url=this.m_BPMGateway+"exposed/process"; var _88c=this._createBPMServerRequest("GET",_88a,url); _88c.sendRequest(); }; BusinessProcessAction.prototype._createBPMServerRequest=function(_88d,_88e,url,_890){ var _891=new XmlHttpObject(); _891.init(_88d,this._rewriteURL(url)); _891.setCallbacks(_88e); _891.setHeaders({Accept:"application/json"}); if(_890){ for(var i in _890){ _891.addFormField(_890[i].name,_890[i].value); } } return _891; }; 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(_894){ var _895=RV_RES.IDS_JS_BUSINESS_PROCESS_GET_PROCESSES_FAIL_MSG; var _896=_894.getResponseText(); this._showErrorMessage(_895,_896); }; BusinessProcessAction.prototype.handleGetBPMProcessSuccess=function(_897){ var _898=_897.getResponseText(); if(!_898){ return; } var _899=dojo.fromJson(_898); var _89a=this._getBusinessProcessesInfo(_899.data.exposedItemsList); this._showDialog(_89a); }; BusinessProcessAction.prototype._getBusinessProcessesInfo=function(_89b){ if(!_89b){ return; } var _89c=_89b.length; var _89d=new Array(); var _89e={}; for(var i=0;i<_89c;i++){ var _8a0=_89b[i].display; var _8a1=_89b[i].itemID; var _8a2=_89b[i].processAppID; if(_8a0&&!_89e[_8a0]&&_8a1&&_8a2){ _89e[_8a0]=true; _89d.push({sCaption:_8a0,sBPD_ID:_8a1,sProcessAppID:_8a2}); } } return _89d; }; BusinessProcessAction.prototype._showDialog=function(_8a3){ var _8a4=this; var _8a5=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:_8a3,bpAction:_8a4}); _8a5.startup(); _8a5.show(); }; BusinessProcessAction.prototype.getInputParameter=function(_8a6){ var obj=null; var _8a8=this.getCognosViewer(); var _8a9=_8a8.getSelectionController(); var _8aa=_8a9.getSelectedObjectsJsonContext(); if(_8aa){ var _8ab=_8aa; if(_8a6){ _8ab=dojo.toJson(_8ab); } obj={"cognosParameter":_8ab}; } return obj; }; BusinessProcessAction.prototype.startProcess=function(_8ac,_8ad,_8ae){ var _8af={customArguments:[_8ae],complete:{object:this,method:this.handleGetStartProcessSuccessResponse},fault:{object:this,method:this.handleGetStartProcessFailResponse}}; var url=this.m_BPMGateway+"process"; var _8b1=new Array(); _8b1.push({name:"action",value:"start"}); _8b1.push({name:"parts",value:"data"}); if(_8ac){ _8b1.push({name:"bpdId",value:_8ac}); } if(_8ad){ _8b1.push({name:"processAppId",value:_8ad}); } var _8b2=this.getInputParameter(true); if(_8b2){ _8b1.push({name:"params",value:dojo.toJson(_8b2)}); } var _8b3=this._createBPMServerRequest("POST",_8af,url,_8b1); _8b3.sendRequest(); }; BusinessProcessAction.prototype.handleGetStartProcessSuccessResponse=function(_8b4,_8b5){ var _8b6=_8b4.getResponseText(); if(_8b6){ var _8b7=dojo.fromJson(_8b6); if(_8b7.status==="200"){ var sMsg=CViewerCommon.getMessage(RV_RES.IDS_JS_BUSINESS_PROCESS_START_PROCESS_SUCCEED_MSG,_8b5); var _8b9=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}); _8b9.show(); } } }; BusinessProcessAction.prototype.handleGetStartProcessFailResponse=function(_8ba,_8bb){ var _8bc=_8ba.getResponseXml(); if(_8bc&&_8bc.documentElement){ this._handleXMLErrorResponse(_8bc,_8bb); return; } var _8bd=CViewerCommon.getMessage(RV_RES.IDS_JS_BUSINESS_PROCESS_START_PROCESS_FAILED_MSG,_8bb); var _8be=_8ba.getResponseText(); try{ var _8bf=dojo.fromJson(_8be); _8be=_8bf.Data.errorMessage; } catch(err){ } this._showErrorMessage(_8bd,_8be); }; BusinessProcessAction.prototype._handleXMLErrorResponse=function(_8c0,_8c1){ var _8c2=XMLHelper_FindChildrenByTagName(_8c0,"error"); var _8c3=""; var _8c4=""; if(_8c2){ _8c3=XMLHelper_FindChildrenByTagName(_8c2,"message").childNodes[0].nodeValue; _8c4=XMLHelper_FindChildrenByTagName(_8c2,"detail").childNodes[0].nodeValue; }else{ _8c3=CViewerCommon.getMessage(RV_RES.IDS_JS_BUSINESS_PROCESS_START_PROCESS_FAILED_MSG,_8c1); } this._showErrorMessage(_8c3,_8c4); }; BusinessProcessAction.prototype._showErrorMessage=function(_8c5,_8c6){ var _8c7=new ModalFaultMessageDialog(_8c5,_8c6); _8c7.show(); }; BusinessProcessAction.prototype._hasAnyContextInSelectedObjects=function(){ var _8c8=false; var _8c9=this.m_oCV.getSelectionController(); var _8ca=_8c9.getAllSelectedObjects(); for(var i=0;i<_8ca.length;i++){ var _8cc=_8ca[i].getSelectedContextIds(); if(_8cc&&_8cc.length>0){ _8c8=true; break; } } return _8c8; }; 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(_8cd){ this.m_aDrilledResetHUNs=_8cd.drilledResetHUNs; this.m_sharePromptValues=_8cd.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 _8cf in this.m_sharePromptValues){ oReq.addFormField(_8cf,this.m_sharePromptValues[_8cf]); } } }; DrillResetAction.prototype.addActionContextAdditionalParms=function(){ var _8d0=""; for(var i=0;i"; } _8d0+=""; _8d0+="resetDimension"; return _8d0; }; DrillResetAction.prototype.setUpdateInfoBar=function(_8d2){ this.m_updateInfoBar=_8d2; }; 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(_8d5){ if(!_8d5||!_8d5.callback){ return; } this.m_callbackMethod=_8d5.callback.method; this.m_callbackObject=_8d5.callback.object; }; RemoveAllDataFilterAction.prototype.createJSONDispatcherEntry=function(_8d6){ var oReq=new JSONDispatcherEntry(this.getCognosViewer()); oReq.addFormField("ui.action",_8d6); var _8d8=this.addActionContext(); oReq.addFormField("cv.actionContext",_8d8); if(window.gViewerLogger){ window.gViewerLogger.log("Action context",_8d8,"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 _8d9=""; var _8db="{ \"removeAll\" :\"true\"}"; _8d9+=xml_encode(_8db); _8d9+=""; _8d9+=""; return _8d9; }; RemoveAllDataFilterAction.prototype.executeCallback=function(_8dc){ var _8dd=GUtil.generateCallback(this.m_callbackMethod,[_8dc],this.m_callbackObject); _8dd(); }; RemoveAllDataFilterAction.prototype.handleServerResponse=function(_8de){ if(_8de&&_8de.getJSONResponseObject()){ this.executeCallback(_8de.getJSONResponseObject().reportSpec); } }; RemoveAllDataFilterAction.prototype.execute=function(){ var oCV=this.getCognosViewer(); if(!oCV.getRAPReportInfo().hasSlider()){ this.executeCallback(oCV.envParams["ui.spec"]); }else{ var _8e0=this.createJSONDispatcherEntry("modifyReport"); _8e0.setCallbacks({"complete":{"object":this,"method":this.handleServerResponse}}); oCV.dispatchRequest(_8e0); } }; CCognosViewer.prototype.loadExtra=function(){ }; function DrillContextMenuHelper(){ }; DrillContextMenuHelper.updateDrillMenuItems=function(_8e1,oCV,_8e3){ var _8e4=[]; if(DrillContextMenuHelper.needsDrillSubMenu(oCV)){ var _8e5=oCV.getSelectionController(); var _8e6=_8e5.getAllSelectedObjects(); var _8e7=_8e6[0]; if(_8e7.getUseValues().length>1&&typeof RV_RES!="undefined"){ var _8e8={name:_8e3,label:RV_RES.RV_DRILL_DEFAULT,action:{name:_8e3,payload:{}}}; _8e4.push(_8e8); } var _8e9=(_8e7.getUseValues().length>1)?1:0; var _8ea=_8e7.getUseValues().length-1; _8ea=(_8ea>2)?2:_8ea; for(var iDim=_8e9;iDim<=_8ea;++iDim){ DrillContextMenuHelper.addSubMenuItem(_8e3,_8e4,_8e7,iDim,0); } var _8ec=false; for(var iDim=_8e9;iDim<=_8ea;++iDim){ for(var _8ed=1;_8ed<_8e7.getUseValues()[iDim].length;++_8ed){ if(_8ec==false){ _8e4.push({separator:true}); _8ec=true; } DrillContextMenuHelper.addSubMenuItem(_8e3,_8e4,_8e7,iDim,_8ed); } } } DrillContextMenuHelper.completeDrillMenu(_8e3,_8e4,_8e1); }; DrillContextMenuHelper.needsDrillSubMenu=function(oCV){ var _8ef=(oCV&&oCV.getSelectionController()); if(_8ef){ var _8f0=_8ef.getAllSelectedObjects(); if(_8f0.length==1&&_8f0[0].isHomeCell&&_8f0[0].isHomeCell()==false){ var _8f1=_8f0[0].isSelectionOnVizChart(); if(!_8f1){ var _8f2=oCV.getAdvancedServerProperty("VIEWER_JS_ENABLE_DRILL_SUBMENU"); _8f1=(_8f2=="charts"&&_8ef.hasSelectedChartNodes()); } if(_8f1){ var _8f3=_8f0[0]; return (_8f1&&_8f3.getUseValues()&&(_8f3.getUseValues().length>1||_8f3.getUseValues()[0].length>1)); } } } return false; }; DrillContextMenuHelper.addSubMenuItem=function(_8f4,_8f5,_8f6,iDim,_8f8){ var _8f9=_8f6.getDrillOptions()[iDim][_8f8]; if(DrillContextMenuHelper.isOptionDrillable(_8f4,_8f9)){ var _8fa=DrillContextMenuHelper.getItemValue(_8f6,iDim,_8f8); if(_8fa){ var _8fb=_8f6.getDataItems()[iDim][_8f8]; var _8fc={name:_8f4,label:_8fa,action:{name:_8f4,payload:{userSelectedDrillItem:_8fb}}}; _8f5.push(_8fc); } } }; DrillContextMenuHelper.completeDrillMenu=function(_8fd,_8fe,_8ff){ if(_8fe.length>0){ _8ff.items=_8fe; }else{ _8ff.items=null; if(_8ff.action==null){ _8ff.action={name:_8fd,action:{name:_8fd}}; } } }; DrillContextMenuHelper.isOptionDrillable=function(_900,_901){ return (_901>=3||(_900=="DrillDown"&&_901==2)||(_900=="DrillUp"&&_901==1)); }; DrillContextMenuHelper.getItemValue=function(_902,iDim,_904){ var _905=(_904==0)?_902.getDisplayValues()[iDim]:null; return ((_905)?_905:_902.getUseValues()[iDim][_904]); }; 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 _906=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:_906}); 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(_909){ var _90a=[]; for(var j in this.m_displayTypeDialogDefinition){ var _90c=this.m_displayTypeDialogDefinition[j]; var _90d={}; _90d.image=this.m_displayTypeDialogDefinition[j].image; _90d.label=this.m_displayTypeDialogDefinition[j].label; _90d.options=[]; var _90e=_90c.options; for(var k in _90e){ var _910=_90e[k]; for(var i in _909){ var _912=_909[i]; if(_910.value===_912){ var _913={label:_910.label,Description:_910.Description,image:_910.image,value:"{targetType:'"+_910.value+"', label:'"+_910.label+"'}"}; _90d.options.push(_913); } } } if(_90d.options.length>0){ _90a.push(_90d); } } return _90a; }}); function ActionFormFields(_914){ this.m_dispatcherEntry=_914; this.m_oCV=_914.getViewer(); }; ActionFormFields.prototype.addFormFields=function(){ var _915=this.m_dispatcherEntry; var _916=_915.getAction(); _916.preProcess(); _915.addFormField("ui.action","modifyReport"); if(this.m_oCV.getModelPath()!==""){ _915.addFormField("modelPath",this.m_oCV.getModelPath()); if(typeof this.m_oCV.envParams["metaDataModelModificationTime"]!="undefined"){ _915.addFormField("metaDataModelModificationTime",this.m_oCV.envParams["metaDataModelModificationTime"]); } } if(_916.doAddActionContext()===true){ var _917=_916.addActionContext(); _915.addFormField("cv.actionContext",_917); if(window.gViewerLogger){ window.gViewerLogger.log("Action context",_917,"xml"); } } var _918=this.m_oCV.envParams["bux"]=="true"; if(_918){ _915.addFormField("cv.showFaultPage","false"); }else{ _915.addFormField("cv.showFaultPage","true"); } _915.addFormField("ui.object",this.m_oCV.envParams["ui.object"]); _915.addDefinedFormField("ui.spec",this.m_oCV.envParams["ui.spec"]); _915.addDefinedFormField("modelPath",this.m_oCV.envParams["modelPath"]); _915.addDefinedFormField("packageBase",this.m_oCV.envParams["packageBase"]); _915.addDefinedFormField("rap.state",this.m_oCV.envParams["rap.state"]); _915.addDefinedFormField("rap.reportInfo",this.m_oCV.envParams["rapReportInfo"]); _915.addDefinedFormField("ui.primaryAction",this.m_oCV.envParams["ui.primaryAction"]); _915.addNonNullFormField("cv.debugDirectory",this.m_oCV.envParams["cv.debugDirectory"]); _915.addNonNullFormField("ui.objectClass",this.m_oCV.envParams["ui.objectClass"]); _915.addNonNullFormField("bux",this.m_oCV.envParams["bux"]); _915.addNonNullFormField("baseReportModificationTime",this.m_oCV.envParams["baseReportModificationTime"]); _915.addNonNullFormField("originalReport",this.m_oCV.envParams["originalReport"]); var _919=this.m_oCV.getFlashChartOption(); if(_919!=null){ _915.addFormField("savedFlashChartOption",_919); if(_919&&_916!=null&&typeof (_916.m_requestParams)!="undefined"&&typeof (_916.m_requestParams.targetType)!="undefined"){ var _91a=false; var _91b=null; if(typeof (_916.m_requestParams.targetType.targetType)!="undefined"){ _91b=_916.m_requestParams.targetType.targetType; }else{ _91b=_916.m_requestParams.targetType; } if(_91b.match("v2_")!=null||_91b.match("_v2")!=null){ _91a=true; }else{ var _91c=this.m_oCV.getRAPReportInfo(); var _91d=_916.getSelectedReportInfo(); if(_91c&&_91d){ var _91e=_91c.getDisplayTypes(_91d.container); if(_91e.match("v2_")!=null||_91e.match("_v2")!=null){ _91a=true; } } } _915.addFormField("hasAVSChart",_91a); }else{ _915.addFormField("hasAVSChart",this.m_oCV.hasAVSChart()); } } var sEP=this.m_oCV.getExecutionParameters(); if(sEP){ _915.addFormField("executionParameters",encodeURIComponent(sEP)); } _915.addFormField("ui.conversation",encodeURIComponent(this.m_oCV.getConversation())); _915.addFormField("m_tracking",encodeURIComponent(this.m_oCV.getTracking())); var sCAF=this.m_oCV.getCAFContext(); if(sCAF){ _915.addFormField("ui.cafcontextid",sCAF); } if(_916.forceRunSpecRequest()){ _915.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 _925=this; var _926=this.getRequestHandler().getRequestIndicator(); var _927=this.getRequestHandler().getWorkingDialog(); window.getViewerConfiguration=function(){ var _928={"httpRequestCallbacks":{"reportStatus":{"complete":function(){ _925.onComplete(); },"working":function(){ _925.onWorking(); },"prompting":function(){ _925.onPrompting(); }}}}; return _928; }; } }; HiddenIframeDispatcherEntry.prototype.setIframeId=function(id){ this._iframeId=id; }; HiddenIframeDispatcherEntry.prototype.getIframeId=function(){ return this._iframeId; }; HiddenIframeDispatcherEntry.prototype._createForm=function(_92a){ var oCV=this.getViewer(); var _92c=HiddenIframeDispatcherEntry.FORM_NAME+oCV.getId(); var _92d=document.getElementById(_92c); if(_92d){ _92d.parentNode.removeChild(_92d); _92d=null; } var _92e=location.protocol+"//"+location.host+oCV.m_sGateway; _92d=document.createElement("form"); _92d.setAttribute("method","post"); _92d.setAttribute("action",_92e); _92d.setAttribute("target",this.getIframeId()); _92d.setAttribute("id",_92c); _92d.style.display="none"; var _92f=this.getRequest().getFormFields(); var _930=_92f.keys(); for(var _931=0;_931<_930.length;_931++){ _92d.appendChild(createHiddenFormField(_930[_931],_92f.get(_930[_931]))); } document.body.appendChild(_92d); return _92d; }; HiddenIframeDispatcherEntry.prototype._createHiddenIframe=function(){ var oCV=this.getViewer(); var _933=this.getIframeId(); var _934=document.getElementById(_933); if(_934){ _934.parentNode.parentNode.removeChild(_934.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=""; _934=document.getElementById(_933); var _936=this; var func=function(){ HiddenIframeDispatcherEntry.handleIframeLoad(_936); }; if(_934.attachEvent){ _934.attachEvent("onload",func); }else{ _934.addEventListener("load",func,true); } }; HiddenIframeDispatcherEntry.hideIframe=function(cvId){ var _939=document.getElementById(HiddenIframeDispatcherEntry.IFRAME_ID_PREFIX+cvId); if(_939){ _939.parentNode.style.display="none"; } }; HiddenIframeDispatcherEntry.showIframeContentsInWindow=function(cvId){ var _93b=document.getElementById(HiddenIframeDispatcherEntry.IFRAME_ID_PREFIX+cvId); if(!_93b){ return; } var html=_93b.contentWindow.document.getElementsByTagName("html")[0].innerHTML; var _93d=window.open("","","height=400,width=500"); if(_93d){ _93d.document.write(""+html+""); } }; HiddenIframeDispatcherEntry.handleIframeLoad=function(_93e){ if(!_93e){ return; } var _93f=document.getElementById(_93e.getIframeId()); if(!_93f){ return; } var oCV=_93f.contentWindow.window.gaRV_INSTANCES?_93f.contentWindow.window.gaRV_INSTANCES[0]:null; var _941=oCV?oCV.getStatus():null; if(_941=="complete"){ _93e.onComplete(); } if(_941=="working"){ _93e.onWorking(); } if(_941=="prompting"){ _93e.onPrompting(); } if(!oCV||_941=="fault"||_941==""){ _93e.onFault(); } }; HiddenIframeDispatcherEntry.prototype.onFault=function(){ this._iframeRequestComplete(); HiddenIframeDispatcherEntry.showIframeContentsInWindow(this.getViewer().getId()); }; HiddenIframeDispatcherEntry.prototype.onPrompting=function(){ this._iframeRequestComplete(); if(this.m_httpRequestConfig){ var _942=this.m_httpRequestConfig.getReportStatusCallback("prompting"); if(typeof _942=="function"){ _942(); } } HiddenIframeDispatcherEntry.showIframeContentsInWindow(this.getViewer().getId()); }; HiddenIframeDispatcherEntry.prototype.onComplete=function(){ this._iframeRequestComplete(); if(this.m_httpRequestConfig){ var _943=this.m_httpRequestConfig.getReportStatusCallback("complete"); if(typeof _943=="function"){ _943(); } } var _944=document.getElementById(this.getIframeId()); if(typeof _944.contentWindow.detachLeavingRV=="function"){ _944.contentWindow.detachLeavingRV(); } var _945=_944.parentNode; _945.style.display="none"; if(this.getCallbacks()&&this.getCallbacks()["complete"]){ HiddenIframeDispatcherEntry.executeCallback(this.getCallbacks()["complete"]); } }; HiddenIframeDispatcherEntry.prototype.cancelRequest=function(_946){ this._iframeRequestComplete(); if(!this.m_bCancelCalled){ this.m_bCancelCalled=true; var _947=document.getElementById(this.getIframeId()); if(!_947){ return; } var oCV=_947.contentWindow[getCognosViewerObjectString(this.getViewer().getId())]; if(oCV){ oCV.cancel(); } } }; HiddenIframeDispatcherEntry.executeCallback=function(_949){ if(_949){ var _94a=GUtil.generateCallback(_949.method,_949.params,_949.object); _94a(); } }; HiddenIframeDispatcherEntry.getIframe=function(cvId){ var _94c=document.getElementById(HiddenIframeDispatcherEntry.IFRAME_ID_PREFIX+cvId); return _94c; }; 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(_94e){ this.setKey(_94e.getActionKey()); this.setCanBeQueued(_94e.canBeQueued()); this.m_action=_94e; }; ReportInfoDispatcherEntry.prototype.getAction=function(){ return this.m_action; }; ReportInfoDispatcherEntry.prototype.prepareRequest=function(){ var _94f=new ActionFormFields(this); _94f.addFormFields(); }; ReportInfoDispatcherEntry.prototype.onComplete=function(_950,arg1){ if(this.m_oCV.getViewerDispatcher().queueIsEmpty()==true){ var _952=this.m_action.getOnCompleteCallback(); _952(_950); } }; ReportInfoDispatcherEntry.prototype.onPrompting=function(_953,arg1){ var _955=this.m_action.getOnPromptingCallback(); _955(_953); }; ReportInfoDispatcherEntry.prototype.onPostEntryComplete=function(){ var oCV=this.getViewer(); if(oCV&&oCV.getViewerWidget()){ var _957=oCV.getViewerWidget(); _957.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(_959){ this.setKey(_959.getActionKey()); this.setCanBeQueued(_959.canBeQueued()); this.m_action=_959; }; ModifyReportDispatcherEntry.prototype.getAction=function(){ return this.m_action; }; ModifyReportDispatcherEntry.prototype.prepareRequest=function(){ if(this.m_viewerWidget){ DispatcherEntry.addWidgetInfoToFormFields(this.m_viewerWidget,this); } var _95a=new ActionFormFields(this); _95a.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(_95b,arg1){ if(this.getRequestHandler()){ this.getRequestHandler().onComplete(_95b); } }; ModifyReportDispatcherEntry.prototype.onPrompting=function(_95d){ if(this.getRequestHandler()){ this.getRequestHandler().onPrompting(_95d); } }; ModifyReportDispatcherEntry.prototype.onWorking=function(_95e,arg1){ this.parent.onWorking.call(this,_95e,arg1); var _960=_95e.getResponseState(); if(this.getRequestHandler()){ this.getRequestHandler().updateViewerState(_960); } }; 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 _962=new bux.dialogs.InformationDialog({title:this.getTitle(),sMainMessage:this.getMessage(),sDescription:this.getDescription(),sInfoIconClass:"bux-informationDialog-info-icon"}); _962.show(); }}); function CCognosViewerSaveReport(_963,_964){ this.m_cognosViewer=_963; this.m_params=null; this.dashboardToSaveIn=_964.cm$storeID; this.m_doSaveAsOnFault=false; }; CCognosViewerSaveReport.prototype.canSave=function(_965){ return (this.doSaveAs()||_965&&_965.indexOf("write")!==-1); }; CCognosViewerSaveReport.prototype.isSavedOutput=function(){ var _966=this.m_cognosViewer.envParams["ui.action"]; return (typeof _966!=="undefined"&&_966==="view"); }; CCognosViewerSaveReport.prototype.doSaveAs=function(){ var _967=(this.m_doSaveAsOnFault||!this.m_cognosViewer.envParams["savedReportName"]||!this.isSameDashboard()); return _967; }; CCognosViewerSaveReport.prototype.isSameDashboard=function(){ var _968=(this.m_cognosViewer.envParams["ui.object"].indexOf(this.dashboardToSaveIn)!==-1); return _968; }; CCognosViewerSaveReport.prototype.getUIAction=function(){ return (this.doSaveAs()?"saveInDashboard":"updateSavedReport"); }; CCognosViewerSaveReport.prototype.populateRequestParams=function(_969){ _969.addFormField("ui.action",this.getUIAction()); _969.addFormField("cv.ignoreState","true"); _969.addFormField("dashboard-id",this.dashboardToSaveIn); _969.addNonEmptyStringFormField("executionParameters",this.m_cognosViewer.m_sParameters); for(var _96a in this.m_cognosViewer.envParams){ if(_96a.indexOf("frag-")==0||_96a=="cv.actionState"||_96a=="ui.primaryAction"||_96a=="dashboard"||_96a=="ui.action"||_96a=="cv.responseFormat"||_96a=="b_action"){ continue; } _969.addFormField(_96a,this.m_cognosViewer.envParams[_96a]); } }; CCognosViewerSaveReport.prototype.getCognosViewer=function(){ return this.m_cognosViewer; }; CCognosViewerSaveReport.prototype.getViewerWidget=function(){ return this.getCognosViewer().getViewerWidget(); }; CCognosViewerSaveReport.prototype.dispatchRequest=function(){ var _96b=this.m_cognosViewer; var _96c=this.getViewerWidget(); var _96d={"complete":{"object":_96c,"method":_96c.handleWidgetSaveDone},"fault":{"object":this,"method":this.onFault}}; var _96e=new AsynchJSONDispatcherEntry(_96b); _96e.setCallbacks(_96d); this.populateRequestParams(_96e); _96b.dispatchRequest(_96e); }; CCognosViewerSaveReport.prototype.onFault=function(_96f,arg1){ var _971=this.m_cognosViewer; var _972=this.getViewerWidget(); var _973=_96f.getSoapFault(); var _974=XMLHelper_FindChildByTagName(_973,"Fault",true); if(this.ifIsEmptySelectionFault(_974)){ this.handleEmptySelectionFault(); return; } var _975=_973.createElement("allowRetry"); _975.appendChild(_973.createTextNode("false")); _974.appendChild(_975); var _976=XMLBuilderSerializeNode(_974); _971.setSoapFault(_976); _972.handleFault(); var _977={"status":false}; _972.iContext.iEvents.fireEvent("com.ibm.bux.widget.save.done",null,_977); }; CCognosViewerSaveReport.prototype.ifIsEmptySelectionFault=function(_978){ if(_978){ var _979=XMLHelper_FindChildByTagName(_978,"errorCode",true); if(_979){ var _97a=XMLHelper_GetText(_979,false); return (_97a==="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(_97b,_97c){ this.m_ViewerWidget=_97b; this.m_payload=_97c; this._setIsSavedDashboard(); }; ViewerIWidgetSave.prototype.setDoCWCopy=function(_97d){ this._doCWCopy=_97d; }; ViewerIWidgetSave.prototype._getSavedReport=function(){ var _97e=this._getWidgetAttributeValue("savedReportPath"); if(!_97e){ _97e=this._getWidgetAttributeValue("savedReportName"); } return _97e; }; ViewerIWidgetSave.prototype._setIsSavedDashboard=function(){ var _97f=this._getSavedReport(); this._bIsSavedDashboard=(_97f!==null&&_97f!==undefined&&_97f.length!==0); }; ViewerIWidgetSave.prototype._isSavedDashboard=function(){ return this._bIsSavedDashboard; }; ViewerIWidgetSave.prototype.canSave=function(_980){ return (this._doSaveNewOrSaveAs()||_980&&_980.indexOf("write")!==-1||this.m_ViewerWidget.isDropped()); }; ViewerIWidgetSave.prototype.isSavedOutput=function(){ var _981=this.m_cognosViewer.envParams["ui.action"]; return (typeof _981!=="undefined"&&_981==="view"); }; ViewerIWidgetSave.prototype._doSaveNewOrSaveAs=function(){ var _982=(this.m_payload.operation==="save"&&!this._isSavedDashboard())||(this.m_payload.operation==="saveAs"); return _982; }; ViewerIWidgetSave.prototype._getWidgetAttributeValue=function(_983){ return this._getViewerWidget().getAttributeValue(_983); }; ViewerIWidgetSave.prototype._getEnvParam=function(_984){ return this._getViewerWidget().getEnvParam(_984); }; 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 _986=new JSONDispatcherEntry(oCV); var _987=this._getViewerWidget(); _986.setCallbacks({customArguments:[this.m_payload],complete:{"object":_987,"method":_987.handleGetSavePropertiesFromServerResponse}}); this._addRequestOptions(_986); _986.sendRequest(); }; ViewerIWidgetSave.prototype._addRequestOptions=function(_988){ _988.addFormField("ui.action","noOp"); _988.addFormField("bux","true"); _988.addFormField("cv.responseFormat","IWidgetSavePropertiesJSON"); if(this._getEnvParam("delayedLoadingExecutionParams")){ _988.addFormField("delayedLoadingExecutionParams",this._getEnvParam("delayedLoadingExecutionParams")); }else{ _988.addFormField("ui.conversation",this._getViewerWidget().getViewerObject().getConversation()); } var _989=this.delayedLoadingContext.getPromptValues(); for(var _98a in _989){ _988.addFormField(_98a,_989[_98a]); } }; ViewerIWidgetSave.prototype._getExecutionParameters=function(){ return this._getViewerWidget().getViewerObject().getExecutionParameters(); }; ViewerIWidgetSave.prototype._setExecutionParameters=function(body){ var _98c=this._getExecutionParameters(); var doc=XMLBuilderLoadXMLFromString(_98c); if(!doc.documentElement){ return; } var root=XMLBuilderCreateXMLDocument("root"); var _98f=root.createElement("parameters"); XMLBuilderSetAttributeNodeNS(_98f,"xmlns:SOAP-ENC","http://schemas.xmlsoap.org/soap/encoding/"); XMLBuilderSetAttributeNodeNS(_98f,"xsi:type","bus:parameterValueArrayProp","http://www.w3.org/2001/XMLSchema-instance"); XMLBuilderSetAttributeNodeNS(_98f,"xmlns:bus","http://developer.cognos.com/schemas/bibus/3/"); XMLBuilderSetAttributeNodeNS(_98f,"xmlns:xs","http://www.w3.org/2001/XMLSchema"); root.documentElement.appendChild(_98f); var _990=XMLHelper_FindChildrenByTagName(doc.documentElement,"item",false); var _991=root.createElement("value"); XMLBuilderSetAttributeNodeNS(_991,"xsi:type","SOAP-ENC:Array","http://www.w3.org/2001/XMLSchema-instance"); _98f.appendChild(_991); var _992=_990.length; for(var i=0;i<_990.length;i++){ var _994=XMLHelper_FindChildByTagName(_990[i],"name",false); if(_994&&_994.childNodes[0].nodeValue.indexOf("credential:")!==-1){ _992--; continue; } _991.appendChild(_990[i]); } XMLBuilderSetAttributeNodeNS(_991,"SOAP-ENC:arrayType","bus:parameterValue["+_992+"]","http://schemas.xmlsoap.org/soap/encoding/"); body.parameters=XMLBuilderSerializeNode(_98f); }; ViewerIWidgetSave.prototype._setSourceObject=function(_995,_996){ var _997=(_996===true)?this._getEnvParam("ui.object"):this._getEnvParam("originalReport"); if(_997){ _995.sourceObject=_997; } }; ViewerIWidgetSave.prototype._setReportTypeToReportView=function(_998){ _998.type=SAVE_REPORT_TYPE.reportView; }; ViewerIWidgetSave.prototype._setReportTypeToReport=function(_999){ _999.type=SAVE_REPORT_TYPE.report; }; ViewerIWidgetSave.prototype._setReportSpec=function(body){ body.specification=this._getReportSpec(); }; ViewerIWidgetSave.prototype._setResourceForSave=function(_99b){ if(!this._getCurrentReportIsReportView()&&!this._isLimitedInteractiveMode()){ this._setReportSpec(_99b.body); this._setReportTypeToReport(_99b); } return _99b; }; ViewerIWidgetSave.prototype._setResourceForCopy=function(_99c){ this._setReportSpec(_99c.body); this._setReportTypeToReport(_99c); return _99c; }; ViewerIWidgetSave.prototype._setResourceForSaveNew=function(_99d){ var _99e=false; if(this._getEnvParam("originalReport")==null){ _99e=true; } this._setSourceObject(_99d,_99e); if(this._isLimitedInteractiveMode()){ this._setReportTypeToReportView(_99d); }else{ this._setReportTypeToReport(_99d); this._setReportSpec(_99d.body); } return _99d; }; ViewerIWidgetSave.prototype._setResourceForSaveAs=function(_99f){ if(this._getCurrentReportIsReportView()){ this._setReportTypeToReportView(_99f); this._setSourceObject(_99f); }else{ if(this._isLimitedInteractiveMode()){ this._setReportTypeToReportView(_99f); this._setSourceObject(_99f,true); }else{ this._setReportTypeToReport(_99f); this._setSourceObject(_99f,true); this._setReportSpec(_99f.body); } } return _99f; }; ViewerIWidgetSave.prototype._getResource=function(){ var _9a0={}; if(this._doCWCopy===true){ _9a0.copyOnCreate=true; } _9a0.body={}; var _9a1=(this.m_payload.operation==="save"); var _9a2=(this.m_payload.operation==="copy"); if(_9a2){ this._setResourceForCopy(_9a0); }else{ if(_9a1){ this._setResourceForSave(_9a0); }else{ if(this._isSavedDashboard()){ this._setResourceForSaveAs(_9a0); }else{ this._setResourceForSaveNew(_9a0); } } } this._setExecutionParameters(_9a0.body); if(!_9a2){ _9a0.itemSetUpdate={name:"savedReportPath",type:"searchPath"}; } return _9a0; }; ViewerIWidgetSave.prototype._getWidgetId=function(){ return this._getViewerWidget().getWidgetId(); }; ViewerIWidgetSave.prototype.getPayload=function(){ var _9a3={}; _9a3.resource=new Array(); _9a3.widgetId=this._getWidgetId(); _9a3.resource.push(this._getResource()); return _9a3; }; 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 _9a4=new bux.layout.TableContainer({classname:"bux-InformationDialog buxFilterConfigDiscreteValuesTable"},this.contentContainer); var row=new bux.layout.TableContainerRow({classname:"bux-dialog-label",parentContainer:_9a4}); 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(_9a7,sID,_9a9){ var div=document.createElement("div"); dojo.attr(div,{"class":"buxFilterConfigFilterValue","aria-labelledby":sID,role:_9a9}); _9a7.addContent(div); return div; },generateSelectProcessSection:function(_9ab){ var _9ac=this.id+"_selectProcess_a11ylabel"; this.addTableDescription(_9ab,this.sLabel,_9ac); var div=this.addDivContainer(_9ab,_9ac,"radiogroup"); var _9ae=new bux.layout.TableContainer({classname:"buxFilterConfigFilterValueTable"}); dojo.style(_9ae.domNode,"width","325px"); this.addSelectProcessTableHeader(_9ae); if(!this.BPMProcessesInfo||this.BPMProcessesInfo.length===0){ this.addEmptySelectProcessTableContent(_9ae); }else{ this.addSelectProcessTableContent(_9ae); } div.appendChild(_9ae.domNode); },addSelectProcessTableHeader:function(_9af){ var _9b0=new bux.layout.TableContainerRow({classname:"buxFilterConfigFilterValueTableHeaderRow",parentContainer:_9af}); var _9b1=new bux.layout.TableContainerCell({classname:"buxListHeader buxFilterConfigFilterValueTableHeaderLeft",width:"25px",parentContainer:_9b0}); var _9b2=new bux.layout.TableContainerCell({classname:"buxListHeader buxFilterConfigFilterValueTableHeader",width:"300px",parentContainer:_9b0}); _9b2.addContent(document.createTextNode(RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_TABLE_HEADER)); },addEmptySelectProcessTableContent:function(_9b3){ var _9b4=this.id+"_processItemsRow_label_none"; var _9b5=new bux.layout.TableContainerRow({parentContainer:_9b3}); dojo.attr(_9b5.domNode,{id:this.id+"_processItemsRow_none","aria-labelledby":_9b4,tabindex:0}); var _9b6=this.createA11yLabel(RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_NO_PROCESS_A11Y,_9b4,true); _9b5.domNode.appendChild(_9b6); var cell=new bux.layout.TableContainerCell({parentContainer:_9b5}); cell.set("colspan",2); cell.addContent(this.createLabelElement(RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_NO_PROCESS)); },addSelectProcessTableContent:function(_9b8){ for(var i=0;i