Return-Path: Delivered-To: apmail-portals-jetspeed-dev-archive@www.apache.org Received: (qmail 96966 invoked from network); 26 Oct 2007 00:00:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Oct 2007 00:00:58 -0000 Received: (qmail 19273 invoked by uid 500); 26 Oct 2007 00:00:44 -0000 Delivered-To: apmail-portals-jetspeed-dev-archive@portals.apache.org Received: (qmail 19253 invoked by uid 500); 26 Oct 2007 00:00:44 -0000 Mailing-List: contact jetspeed-dev-help@portals.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jetspeed Developers List" Delivered-To: mailing list jetspeed-dev@portals.apache.org Received: (qmail 19223 invoked by uid 99); 26 Oct 2007 00:00:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Oct 2007 17:00:43 -0700 X-ASF-Spam-Status: No, hits=-97.2 required=10.0 tests=ALL_TRUSTED,WEIRD_QUOTING X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Oct 2007 00:00:54 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D34301A984A; Thu, 25 Oct 2007 17:00:33 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r588402 [2/3] - in /portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/desktop: core.js core.src.js Date: Fri, 26 Oct 2007 00:00:33 -0000 To: jetspeed-dev@portals.apache.org From: smilek@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071026000033.D34301A984A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/desktop/core.js URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/desktop/core.js?rev=588402&r1=588401&r2=588402&view=diff ============================================================================== --- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/desktop/core.js (original) +++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/javascript/jetspeed/desktop/core.js Thu Oct 25 17:00:32 2007 @@ -30,7 +30,7 @@ jetspeed.prefs.portletDecorationsRootUrl=jetspeed.url.basePortalDesktopUrl()+djConfig.jetspeed.portletDecorationsPath; } return jetspeed.prefs.portletDecorationsRootUrl; -},portletSelectorWindowTitle:"Portlet Selector",portletSelectorWindowIcon:"text-x-script.png",portletSelectorBounds:{x:20,y:20,width:400,height:600},windowActionButtonMax:5,windowActionButtonTooltip:true,windowIconEnabled:true,windowIconPath:"/images/portlets/small/",windowTitlebar:true,windowResizebar:true,windowDecoration:"tigris",pageActionButtonTooltip:true,getPortletDecorationBaseUrl:function(_1){ +},portletSelectorWindowTitle:"Portlet Selector",portletSelectorWindowIcon:"text-x-script.png",portletSelectorBounds:{x:20,y:20,width:400,height:600},windowActionButtonMax:5,windowActionButtonTooltip:true,windowIconEnabled:true,windowIconPath:"/images/portlets/small",windowTitlebar:true,windowResizebar:true,windowDecoration:"tigris",pageActionButtonTooltip:true,getPortletDecorationBaseUrl:function(_1){ return jetspeed.prefs.getPortletDecorationsRootUrl()+"/"+_1; },getActionLabel:function(_2,_3,_4,_5){ if(_2==null){ @@ -182,7 +182,6 @@ _8.page.retrievePsml(); if(_8.UAie6){ _8.ui.windowResizeMgr.init(window,_8.docBody); -}else{ } }; jetspeed.updatePage=function(_1c,_1d){ @@ -671,7 +670,7 @@ } if(_89==null){ try{ -_84.url.loadingIndicatorShow("loadpageeditor"); +_84.url.loadingIndicatorShow("loadpageeditor",true); _89=dojo.widget.createWidget("jetspeed:PageEditor",{widgetId:_84.id.PG_ED_WID,editorInitiatedFromDesktop:_87}); var _8a=document.getElementById(_84.id.COLUMNS); _8a.insertBefore(_89.domNode,_8a.firstChild); @@ -690,7 +689,7 @@ for(var _8c in _8b){ var _8d=_8b[_8c]; if(_8d){ -_8d.editPageInitiate(_86); +_8d.editPageInitiate(_84,_86); } } } @@ -779,6 +778,7 @@ this.portlet_tiled_high_z=10; this.portlet_untiled_high_z=-1; this.menus=[]; +this.loadedScriptUris={}; if(_a8!=null){ this.tooltipMgr=_a8; }else{ @@ -936,6 +936,7 @@ } this.maximizedOnInit=null; } +dojo.lang.setTimeout(_c6.url,_c6.url.loadingIndicatorStepPreload,1800); },_parsePSML:function(_d1){ var _d2=jetspeed; var _d3=dojo; @@ -1407,77 +1408,94 @@ return this.columns[this.colFirstNormI]; } return null; -},getPortletCurColRow:function(_16a,_16b,_16c){ +},columnEmptyCheck:function(_16a){ +if(!_16a||!_16a.getAttribute){ +return; +} +var _16b=_16a.getAttribute("columnindex"); +if(!_16b||_16b.length==0){ +return; +} +var _16c=_16a.getAttribute("layoutid"); +if(_16c==null||_16c.length==0){ +var _16d=_16a.childNodes; +if(!_16d||_16d.length==0){ +_16a.style.height="1px"; +}else{ +_16a.style.height=""; +} +} +},getPortletCurColRow:function(_16e,_16f,_170){ if(!this.columns||this.columns.length==0){ return null; } -var _16d=null; -var _16e=((_16a!=null)?true:false); -var _16f=0; -var _170=null; var _171=null; -var _172=0; -var _173=false; -for(var _174=0;_174_172){ -_172=(_178+1); -} -if(_16a==null||_17e==_16a){ -var _17f={layout:_171,column:_175.getLayoutColumnIndex(),row:_178,columnObj:_175}; -if(!_173){ -_17f.layout=_170.clonedFromRootId; +var _172=((_16e!=null)?true:false); +var _173=0; +var _174=null; +var _175=null; +var _176=0; +var _177=false; +for(var _178=0;_178_176){ +_176=(_17c+1); +} +if(_16e==null||_182==_16e){ +var _183={layout:_175,column:_179.getLayoutColumnIndex(),row:_17c,columnObj:_179}; +if(!_177){ +_183.layout=_174.clonedFromRootId; } -if(_16a!=null){ -_16d=_17f; +if(_16e!=null){ +_171=_183; break; }else{ -if(_16c!=null){ -var _180=this.getPWinFromNode(_17e); -if(_180==null){ -_17a.raise("PortletWindow not found for node"); +if(_170!=null){ +var _184=this.getPWinFromNode(_182); +if(_184==null){ +_17e.raise("PortletWindow not found for node"); }else{ -var _181=_180.portlet; -if(_181==null){ -_17a.raise("PortletWindow for node has null portlet: "+_180.widgetId); +var _185=_184.portlet; +if(_185==null){ +_17e.raise("PortletWindow for node has null portlet: "+_184.widgetId); }else{ -_16c[_181.getId()]=_17f; +_170[_185.getId()]=_183; } } } @@ -1485,122 +1503,122 @@ } } } -if(_16d!=null){ +if(_171!=null){ break; } } -return _16d; +return _171; },_getPortletArrayByZIndex:function(){ -var _182=jetspeed; -var _183=this.getPortletArray(); -if(!_183){ -return _183; -} -var _184=[]; -for(var i=0;i<_183.length;i++){ -if(!_183[i].getProperty(_182.id.PP_WINDOW_POSITION_STATIC)){ -_184.push(_183[i]); -} -} -_184.sort(this._portletZIndexCompare); -return _184; -},_portletZIndexCompare:function(_186,_187){ -var _188=null; -var _189=null; -var _18a=null; -_18a=_186.getSavedWinState(); -_188=_18a.zIndex; -_18a=_187.getSavedWinState(); -_189=_18a.zIndex; -if(_188&&!_189){ +var _186=jetspeed; +var _187=this.getPortletArray(); +if(!_187){ +return _187; +} +var _188=[]; +for(var i=0;i<_187.length;i++){ +if(!_187[i].getProperty(_186.id.PP_WINDOW_POSITION_STATIC)){ +_188.push(_187[i]); +} +} +_188.sort(this._portletZIndexCompare); +return _188; +},_portletZIndexCompare:function(_18a,_18b){ +var _18c=null; +var _18d=null; +var _18e=null; +_18e=_18a.getSavedWinState(); +_18c=_18e.zIndex; +_18e=_18b.getSavedWinState(); +_18d=_18e.zIndex; +if(_18c&&!_18d){ return -1; }else{ -if(_189&&!_188){ +if(_18d&&!_18c){ return 1; }else{ -if(_188==_189){ +if(_18c==_18d){ return 0; } } } -return (_188-_189); +return (_18c-_18d); },getPortletArray:function(){ if(!this.portlets){ return null; } -var _18b=[]; -for(var _18c in this.portlets){ -var _18d=this.portlets[_18c]; -_18b.push(_18d); +var _18f=[]; +for(var _190 in this.portlets){ +var _191=this.portlets[_190]; +_18f.push(_191); } -return _18b; +return _18f; },getPortletIds:function(){ if(!this.portlets){ return null; } -var _18e=[]; -for(var _18f in this.portlets){ -var _190=this.portlets[_18f]; -_18e.push(_190.getId()); +var _192=[]; +for(var _193 in this.portlets){ +var _194=this.portlets[_193]; +_192.push(_194.getId()); } -return _18e; -},getPortletByName:function(_191){ -if(this.portlets&&_191){ -for(var _192 in this.portlets){ -var _193=this.portlets[_192]; -if(_193.name==_191){ -return _193; +return _192; +},getPortletByName:function(_195){ +if(this.portlets&&_195){ +for(var _196 in this.portlets){ +var _197=this.portlets[_196]; +if(_197.name==_195){ +return _197; } } } return null; -},getPortlet:function(_194){ -if(this.portlets&&_194){ -return this.portlets[_194]; +},getPortlet:function(_198){ +if(this.portlets&&_198){ +return this.portlets[_198]; } return null; -},getPWinFromNode:function(_195){ -var _196=null; -if(this.portlets&&_195){ -for(var _197 in this.portlets){ -var _198=this.portlets[_197]; -var _199=_198.getPWin(); -if(_199!=null){ -if(_199.domNode==_195){ -_196=_199; +},getPWinFromNode:function(_199){ +var _19a=null; +if(this.portlets&&_199){ +for(var _19b in this.portlets){ +var _19c=this.portlets[_19b]; +var _19d=_19c.getPWin(); +if(_19d!=null){ +if(_19d.domNode==_199){ +_19a=_19d; break; } } } } -return _196; -},putPortlet:function(_19a){ -if(!_19a){ +return _19a; +},putPortlet:function(_19e){ +if(!_19e){ return; } if(!this.portlets){ this.portlets=[]; } -this.portlets[_19a.entityId]=_19a; +this.portlets[_19e.entityId]=_19e; this.portlet_count++; -},putPWin:function(_19b){ -if(!_19b){ +},putPWin:function(_19f){ +if(!_19f){ return; } -var _19c=_19b.widgetId; -if(!_19c){ +var _1a0=_19f.widgetId; +if(!_1a0){ dojo.raise("PortletWindow id is null"); } -this.portlet_windows[_19c]=_19b; +this.portlet_windows[_1a0]=_19f; this.portlet_window_count++; -},getPWin:function(_19d){ -if(this.portlet_windows&&_19d){ -var pWin=this.portlet_windows[_19d]; +},getPWin:function(_1a1){ +if(this.portlet_windows&&_1a1){ +var pWin=this.portlet_windows[_1a1]; if(pWin==null){ var jsId=jetspeed.id; -pWin=this.portlet_windows[jsId.PW_ID_PREFIX+_19d]; +pWin=this.portlet_windows[jsId.PW_ID_PREFIX+_1a1]; if(pWin==null){ -var p=this.getPortlet(_19d); +var p=this.getPortlet(_1a1); if(p!=null){ pWin=this.portlet_windows[p.properties[jsObj.id.PP_WIDGET_ID]]; } @@ -1609,322 +1627,322 @@ return pWin; } return null; -},getPWins:function(_1a1){ -var _1a2=this.portlet_windows; +},getPWins:function(_1a5){ +var _1a6=this.portlet_windows; var pWin; -var _1a4=[]; -for(var _1a5 in _1a2){ -pWin=_1a2[_1a5]; -if(pWin&&(!_1a1||pWin.portlet)){ -_1a4.push(pWin); +var _1a8=[]; +for(var _1a9 in _1a6){ +pWin=_1a6[_1a9]; +if(pWin&&(!_1a5||pWin.portlet)){ +_1a8.push(pWin); } } -return _1a4; -},getPWinTopZIndex:function(_1a6){ -var _1a7=0; -if(_1a6){ -_1a7=this.portlet_tiled_high_z+1; -this.portlet_tiled_high_z=_1a7; +return _1a8; +},getPWinTopZIndex:function(_1aa){ +var _1ab=0; +if(_1aa){ +_1ab=this.portlet_tiled_high_z+1; +this.portlet_tiled_high_z=_1ab; }else{ if(this.portlet_untiled_high_z==-1){ this.portlet_untiled_high_z=200; } -_1a7=this.portlet_untiled_high_z+1; -this.portlet_untiled_high_z=_1a7; +_1ab=this.portlet_untiled_high_z+1; +this.portlet_untiled_high_z=_1ab; } -return _1a7; +return _1ab; },getPWinHighZIndex:function(){ return Math.max(this.portlet_tiled_high_z,this.portlet_untiled_high_z); -},displayAllPWins:function(_1a8,_1a9){ +},displayAllPWins:function(_1ac,_1ad){ return; },onBrowserWindowResize:function(){ -var _1aa=jetspeed; -if(_1aa.UAie6){ -var _1ab=this.portlet_windows; +var _1ae=jetspeed; +if(_1ae.UAie6){ +var _1af=this.portlet_windows; var pWin; -for(var _1ad in _1ab){ -pWin=_1ab[_1ad]; +for(var _1b1 in _1af){ +pWin=_1af[_1b1]; pWin.onBrowserWindowResize(); } if(this.editMode){ -var _1ae=dojo.widget.byId(_1aa.id.PG_ED_WID); -if(_1ae!=null){ -_1ae.onBrowserWindowResize(); +var _1b2=dojo.widget.byId(_1ae.id.PG_ED_WID); +if(_1b2!=null){ +_1b2.onBrowserWindowResize(); } } } -},regPWinIFrameCover:function(_1af){ -if(!_1af){ +},regPWinIFrameCover:function(_1b3){ +if(!_1b3){ return; } -this.iframeCoverByWinId[_1af.widgetId]=true; -},unregPWinIFrameCover:function(_1b0){ -if(!_1b0){ +this.iframeCoverByWinId[_1b3.widgetId]=true; +},unregPWinIFrameCover:function(_1b4){ +if(!_1b4){ return; } -delete this.iframeCoverByWinId[_1b0.widgetId]; -},displayAllPWinIFrameCovers:function(_1b1,_1b2){ -var _1b3=this.portlet_windows; -var _1b4=this.iframeCoverByWinId; -if(!_1b3||!_1b4){ +delete this.iframeCoverByWinId[_1b4.widgetId]; +},displayAllPWinIFrameCovers:function(_1b5,_1b6){ +var _1b7=this.portlet_windows; +var _1b8=this.iframeCoverByWinId; +if(!_1b7||!_1b8){ return; } -for(var _1b5 in _1b4){ -if(_1b5==_1b2){ +for(var _1b9 in _1b8){ +if(_1b9==_1b6){ continue; } -var pWin=_1b3[_1b5]; -var _1b7=(pWin&&pWin.iframesInfo?pWin.iframesInfo.iframeCover:null); -if(_1b7){ -_1b7.style.display=(_1b1?"none":"block"); -} -} -},createLayoutInfo:function(_1b8){ -var _1b9=dojo; -var _1ba=null; -var _1bb=null; -var _1bc=null; -var _1bd=null; -var _1be=document.getElementById(_1b8.id.DESKTOP); -if(_1be!=null){ -_1ba=_1b8.ui.getLayoutExtents(_1be,null,_1b9,_1b8); -} -var _1bf=document.getElementById(_1b8.id.COLUMNS); -if(_1bf!=null){ -_1bb=_1b8.ui.getLayoutExtents(_1bf,null,_1b9,_1b8); +var pWin=_1b7[_1b9]; +var _1bb=(pWin&&pWin.iframesInfo?pWin.iframesInfo.iframeCover:null); +if(_1bb){ +_1bb.style.display=(_1b5?"none":"block"); +} +} +},createLayoutInfo:function(_1bc){ +var _1bd=dojo; +var _1be=null; +var _1bf=null; +var _1c0=null; +var _1c1=null; +var _1c2=document.getElementById(_1bc.id.DESKTOP); +if(_1c2!=null){ +_1be=_1bc.ui.getLayoutExtents(_1c2,null,_1bd,_1bc); +} +var _1c3=document.getElementById(_1bc.id.COLUMNS); +if(_1c3!=null){ +_1bf=_1bc.ui.getLayoutExtents(_1c3,null,_1bd,_1bc); } if(this.columns){ for(var i=0;i=0&&_1cc=0&&_1d0=0)?this.columns[_1d1]:null); -},getDescendantCols:function(_1d2){ +var _1d5=this.getColIndexForNode(node); +return ((_1d5!=null&&_1d5>=0)?this.columns[_1d5]:null); +},getDescendantCols:function(_1d6){ var dMap={}; -if(_1d2==null){ +if(_1d6==null){ return dMap; } for(var i=0;i0){ -var _1ee=_1e8.prefs; -var jsUI=_1e8.ui; -var _1f0=_1ea.event; -var _1f1=_1e8.page.tooltipMgr; +var _1f1=_1ee.byId(jsId.PAGE_CONTROLS); +if(_1f1!=null&&_1ef!=null&&_1ef.length>0){ +var _1f2=_1ec.prefs; +var jsUI=_1ec.ui; +var _1f4=_1ee.event; +var _1f5=_1ec.page.tooltipMgr; if(this.actionButtons==null){ this.actionButtons={}; this.actionButtonTooltips=[]; } -var _1f2=this.actionButtonTooltips; -for(var i=0;i<_1eb.length;i++){ -var _1ec=_1eb[i]; -var _1f4=document.createElement("div"); -_1f4.className="portalPageActionButton"; -_1f4.style.backgroundImage="url("+_1ee.getLayoutRootUrl()+"/images/desktop/"+_1ec+".gif)"; -_1f4.actionName=_1ec; -this.actionButtons[_1ec]=_1f4; -_1ed.appendChild(_1f4); -jsUI.evtConnect("after",_1f4,"onclick",this,"pageActionButtonClick",_1f0); -if(_1ee.pageActionButtonTooltip){ -var _1f5=null; -if(_1ee.desktopActionLabels!=null){ -_1f5=_1ee.desktopActionLabels[_1ec]; +var _1f6=this.actionButtonTooltips; +for(var i=0;i<_1ef.length;i++){ +var _1f0=_1ef[i]; +var _1f8=document.createElement("div"); +_1f8.className="portalPageActionButton"; +_1f8.style.backgroundImage="url("+_1f2.getLayoutRootUrl()+"/images/desktop/"+_1f0+".gif)"; +_1f8.actionName=_1f0; +this.actionButtons[_1f0]=_1f8; +_1f1.appendChild(_1f8); +jsUI.evtConnect("after",_1f8,"onclick",this,"pageActionButtonClick",_1f4); +if(_1f2.pageActionButtonTooltip){ +var _1f9=null; +if(_1f2.desktopActionLabels!=null){ +_1f9=_1f2.desktopActionLabels[_1f0]; } -if(_1f5==null||_1f5.length==0){ -_1f5=_1ea.string.capitalize(_1ec); +if(_1f9==null||_1f9.length==0){ +_1f9=_1ee.string.capitalize(_1f0); } -_1f2.push(_1f1.addNode(_1f4,_1f5,true,null,null,null,_1e8,jsUI,_1f0)); +_1f6.push(_1f5.addNode(_1f8,_1f9,true,null,null,null,_1ec,jsUI,_1f4)); } } } },_destroyPageControls:function(){ -var _1f6=jetspeed; +var _1fa=jetspeed; if(this.actionButtons){ -for(var _1f7 in this.actionButtons){ -var _1f8=this.actionButtons[_1f7]; -if(_1f8){ -_1f6.ui.evtDisconnect("after",_1f8,"onclick",this,"pageActionButtonClick"); +for(var _1fb in this.actionButtons){ +var _1fc=this.actionButtons[_1fb]; +if(_1fc){ +_1fa.ui.evtDisconnect("after",_1fc,"onclick",this,"pageActionButtonClick"); } } } -var _1f9=dojo.byId(_1f6.id.PAGE_CONTROLS); -if(_1f9!=null&&_1f9.childNodes&&_1f9.childNodes.length>0){ -for(var i=(_1f9.childNodes.length-1);i>=0;i--){ -dojo.dom.removeNode(_1f9.childNodes[i]); +var _1fd=dojo.byId(_1fa.id.PAGE_CONTROLS); +if(_1fd!=null&&_1fd.childNodes&&_1fd.childNodes.length>0){ +for(var i=(_1fd.childNodes.length-1);i>=0;i--){ +dojo.dom.removeNode(_1fd.childNodes[i]); } } -_1f6.page.tooltipMgr.removeNodes(this.actionButtonTooltips); +_1fa.page.tooltipMgr.removeNodes(this.actionButtonTooltips); this.actionButtonTooltips=null; this.actionButtons==null; },pageActionButtonClick:function(evt){ @@ -1932,30 +1950,30 @@ return; } this.pageActionProcess(evt.target.actionName,evt); -},pageActionProcess:function(_1fc){ -var _1fd=jetspeed; -if(_1fc==null){ +},pageActionProcess:function(_200){ +var _201=jetspeed; +if(_200==null){ return; } -if(_1fc==_1fd.id.ACT_ADDPORTLET){ +if(_200==_201.id.ACT_ADDPORTLET){ this.addPortletInitiate(); }else{ -if(_1fc==_1fd.id.ACT_EDIT){ -_1fd.editPageInitiate(_1fd); +if(_200==_201.id.ACT_EDIT){ +_201.editPageInitiate(_201); }else{ -if(_1fc==_1fd.id.ACT_VIEW){ -_1fd.editPageTerminate(_1fd); +if(_200==_201.id.ACT_VIEW){ +_201.editPageTerminate(_201); }else{ -var _1fe=this.getPageAction(_1fc); -alert("pageAction "+_1fc+" : "+_1fe); -if(_1fe==null){ +var _202=this.getPageAction(_200); +alert("pageAction "+_200+" : "+_202); +if(_202==null){ return; } -if(_1fe.url==null){ +if(_202.url==null){ return; } -var _1ff=_1fd.url.basePortalUrl()+_1fd.url.path.DESKTOP+"/"+_1fe.url; -_1fd.pageNavigate(_1ff); +var _203=_201.url.basePortalUrl()+_201.url.path.DESKTOP+"/"+_202.url; +_201.pageNavigate(_203); } } } @@ -1964,94 +1982,94 @@ return null; } return this.actions[name]; -},addPortletInitiate:function(_201,_202){ -var _203=jetspeed; -if(!_202){ -_202=escape(this.getPagePathAndQuery()); -}else{ -_202=escape(_202); -} -var _204=_203.url.basePortalUrl()+_203.url.path.DESKTOP+"/system/customizer/selector.psml?jspage="+_202; -if(_201!=null){ -_204+="&jslayoutid="+escape(_201); -} -_203.changeActionForPortlet(this.rootFragmentId,null,_203.id.ACT_EDIT,new jetspeed.om.PageChangeActionCL(_204)); -},setPageModePortletActions:function(_205){ -if(_205==null||_205.actions==null){ +},addPortletInitiate:function(_205,_206){ +var _207=jetspeed; +if(!_206){ +_206=escape(this.getPagePathAndQuery()); +}else{ +_206=escape(_206); +} +var _208=_207.url.basePortalUrl()+_207.url.path.DESKTOP+"/system/customizer/selector.psml?jspage="+_206; +if(_205!=null){ +_208+="&jslayoutid="+escape(_205); +} +_207.changeActionForPortlet(this.rootFragmentId,null,_207.id.ACT_EDIT,new jetspeed.om.PageChangeActionCL(_208)); +},setPageModePortletActions:function(_209){ +if(_209==null||_209.actions==null){ return; } var jsId=jetspeed.id; -if(_205.actions[jsId.ACT_REMOVEPORTLET]==null){ -_205.actions[jsId.ACT_REMOVEPORTLET]={id:jsId.ACT_REMOVEPORTLET}; +if(_209.actions[jsId.ACT_REMOVEPORTLET]==null){ +_209.actions[jsId.ACT_REMOVEPORTLET]={id:jsId.ACT_REMOVEPORTLET}; } -},getPageUrl:function(_207){ -if(this.pageUrl!=null&&!_207){ +},getPageUrl:function(_20b){ +if(this.pageUrl!=null&&!_20b){ return this.pageUrl; } var jsU=jetspeed.url; -var _209=jsU.path.SERVER+((_207)?jsU.path.PORTAL:jsU.path.DESKTOP)+this.getPath(); -var _20a=jsU.parse(_209); -var _20b=null; +var _20d=jsU.path.SERVER+((_20b)?jsU.path.PORTAL:jsU.path.DESKTOP)+this.getPath(); +var _20e=jsU.parse(_20d); +var _20f=null; if(this.pageUrlFallback!=null){ -_20b=jsU.parse(this.pageUrlFallback); +_20f=jsU.parse(this.pageUrlFallback); }else{ -_20b=jsU.parse(window.location.href); +_20f=jsU.parse(window.location.href); } -if(_20a!=null&&_20b!=null){ -var _20c=_20b.query; -if(_20c!=null&&_20c.length>0){ -var _20d=_20a.query; -if(_20d!=null&&_20d.length>0){ -_209=_209+"&"+_20c; +if(_20e!=null&&_20f!=null){ +var _210=_20f.query; +if(_210!=null&&_210.length>0){ +var _211=_20e.query; +if(_211!=null&&_211.length>0){ +_20d=_20d+"&"+_210; }else{ -_209=_209+"?"+_20c; +_20d=_20d+"?"+_210; } } } -if(!_207){ -this.pageUrl=_209; +if(!_20b){ +this.pageUrl=_20d; } -return _209; +return _20d; },getPagePathAndQuery:function(){ if(this.pagePathAndQuery!=null){ return this.pagePathAndQuery; } var jsU=jetspeed.url; -var _20f=this.getPath(); -var _210=jsU.parse(_20f); -var _211=null; +var _213=this.getPath(); +var _214=jsU.parse(_213); +var _215=null; if(this.pageUrlFallback!=null){ -_211=jsU.parse(this.pageUrlFallback); +_215=jsU.parse(this.pageUrlFallback); }else{ -_211=jsU.parse(window.location.href); +_215=jsU.parse(window.location.href); } -if(_210!=null&&_211!=null){ -var _212=_211.query; -if(_212!=null&&_212.length>0){ -var _213=_210.query; -if(_213!=null&&_213.length>0){ -_20f=_20f+"&"+_212; +if(_214!=null&&_215!=null){ +var _216=_215.query; +if(_216!=null&&_216.length>0){ +var _217=_214.query; +if(_217!=null&&_217.length>0){ +_213=_213+"&"+_216; }else{ -_20f=_20f+"?"+_212; +_213=_213+"?"+_216; } } } -this.pagePathAndQuery=_20f; -return _20f; -},getPageDirectory:function(_214){ -var _215="/"; -var _216=(_214?this.getRealPath():this.getPath()); -if(_216!=null){ -var _217=_216.lastIndexOf("/"); -if(_217!=-1){ -if((_217+1)<_216.length){ -_215=_216.substring(0,_217+1); +this.pagePathAndQuery=_213; +return _213; +},getPageDirectory:function(_218){ +var _219="/"; +var _21a=(_218?this.getRealPath():this.getPath()); +if(_21a!=null){ +var _21b=_21a.lastIndexOf("/"); +if(_21b!=-1){ +if((_21b+1)<_21a.length){ +_219=_21a.substring(0,_21b+1); }else{ -_215=_216; +_219=_21a; } } } -return _215; +return _219; },equalsPageUrl:function(url){ if(url==this.getPath()){ return true; @@ -2060,15 +2078,15 @@ return true; } return false; -},makePageUrl:function(_219){ -if(!_219){ -_219=""; +},makePageUrl:function(_21d){ +if(!_21d){ +_21d=""; } var jsU=jetspeed.url; -if(!jsU.urlStartsWithHttp(_219)){ -return jsU.path.SERVER+jsU.path.DESKTOP+_219; +if(!jsU.urlStartsWithHttp(_21d)){ +return jsU.path.SERVER+jsU.path.DESKTOP+_21d; } -return _219; +return _21d; },getName:function(){ return this.name; },getPath:function(){ @@ -2084,35 +2102,35 @@ },getPortletDecorator:function(){ return this.portletDecorator; }}); -jetspeed.om.Column=function(_21b,_21c,size,_21e,_21f){ -this.layoutColumnIndex=_21b; -this.layoutId=_21c; +jetspeed.om.Column=function(_21f,_220,size,_222,_223){ +this.layoutColumnIndex=_21f; +this.layoutId=_220; this.size=size; -this.pageColumnIndex=new Number(_21e); -if(typeof _21f!="undefined"){ -this.layoutActionsDisabled=_21f; +this.pageColumnIndex=new Number(_222); +if(typeof _223!="undefined"){ +this.layoutActionsDisabled=_223; } -this.id="jscol_"+_21e; +this.id="jscol_"+_222; this.domNode=null; }; -dojo.lang.extend(jetspeed.om.Column,{styleClass:jetspeed.id.COL_CLASS+(jetspeed.UAie6?" ie6desktopColumn":""),styleLayoutClass:jetspeed.id.COL_CLASS+(jetspeed.UAie6?" ie6desktopColumn ":" ")+jetspeed.id.COL_LAYOUTHEADER_CLASS,layoutColumnIndex:null,layoutId:null,size:null,pageColumnIndex:null,layoutActionsDisabled:false,domNode:null,columnContainer:false,layoutHeader:false,createColumn:function(_220){ -var _221=this.styleClass; -var _222=this.pageColumnIndex; -if(this.isStartOfColumnSet()&&_222>0){ -_221+=" desktopColumnClear-PRIVATE"; -} -var _223=document.createElement("div"); -_223.setAttribute("columnindex",_222); -_223.style.width=this.size+"%"; +dojo.lang.extend(jetspeed.om.Column,{styleClass:jetspeed.id.COL_CLASS+(jetspeed.UAie6?" ie6desktopColumn":""),styleLayoutClass:jetspeed.id.COL_CLASS+(jetspeed.UAie6?" ie6desktopColumn ":" ")+jetspeed.id.COL_LAYOUTHEADER_CLASS,layoutColumnIndex:null,layoutId:null,size:null,pageColumnIndex:null,layoutActionsDisabled:false,domNode:null,columnContainer:false,layoutHeader:false,createColumn:function(_224){ +var _225=this.styleClass; +var _226=this.pageColumnIndex; +if(this.isStartOfColumnSet()&&_226>0){ +_225+=" desktopColumnClear-PRIVATE"; +} +var _227=document.createElement("div"); +_227.setAttribute("columnindex",_226); +_227.style.width=this.size+"%"; if(this.layoutHeader){ -_221=this.styleLayoutClass; -_223.setAttribute("layoutid",this.layoutId); +_225=this.styleLayoutClass; +_227.setAttribute("layoutid",this.layoutId); } -_223.className=_221; -_223.id=this.getId(); -this.domNode=_223; -if(_220!=null){ -_220.appendChild(_223); +_227.className=_225; +_227.id=this.getId(); +this.domNode=_227; +if(_224!=null){ +_224.appendChild(_227); } },containsNode:function(node){ return ((this.domNode!=null&&node!=null&&this.domNode==node.parentNode)?true:false); @@ -2138,455 +2156,458 @@ },getPageColumnIndex:function(){ return this.pageColumnIndex; }}); -jetspeed.om.Portlet=function(_226,_227,_228,_229,_22a,_22b,_22c,_22d){ -this.name=_226; -this.entityId=_227; -this.properties=_229; -this.actions=_22a; +jetspeed.om.Portlet=function(_22a,_22b,_22c,_22d,_22e,_22f,_230,_231){ +this.name=_22a; +this.entityId=_22b; +this.properties=_22d; +this.actions=_22e; jetspeed.page.setPageModePortletActions(this); -this.currentActionState=_22b; -this.currentActionMode=_22c; -if(_228){ -this.contentRetriever=_228; +this.currentActionState=_22f; +this.currentActionMode=_230; +if(_22c){ +this.contentRetriever=_22c; } this.layoutActionsDisabled=false; -if(typeof _22d!="undefined"){ -this.layoutActionsDisabled=_22d; +if(typeof _231!="undefined"){ +this.layoutActionsDisabled=_231; } }; dojo.lang.extend(jetspeed.om.Portlet,{name:null,entityId:null,isPortlet:true,pageColumnIndex:null,contentRetriever:new jetspeed.om.PortletContentRetriever(),windowFactory:null,lastSavedWindowState:null,initialize:function(){ -var _22e=jetspeed; -var jsId=_22e.id; +var _232=jetspeed; +var jsId=_232.id; if(!this.properties[jsId.PP_WIDGET_ID]){ this.properties[jsId.PP_WIDGET_ID]=jsId.PW_ID_PREFIX+this.entityId; } if(!this.properties[jsId.PP_CONTENT_RETRIEVER]){ this.properties[jsId.PP_CONTENT_RETRIEVER]=this.contentRetriever; } -var _230=this.properties[jsId.PP_WINDOW_POSITION_STATIC]; -if(_22e.prefs.windowTiling){ -if(_230=="true"){ -_230=true; +var _234=this.properties[jsId.PP_WINDOW_POSITION_STATIC]; +if(_232.prefs.windowTiling){ +if(_234=="true"){ +_234=true; }else{ -if(_230=="false"){ -_230=false; +if(_234=="false"){ +_234=false; }else{ -if(_230!=true&&_230!=false){ -_230=true; +if(_234!=true&&_234!=false){ +_234=true; } } } }else{ -_230=false; +_234=false; } -this.properties[jsId.PP_WINDOW_POSITION_STATIC]=_230; -var _231=this.properties[jsId.PP_WINDOW_HEIGHT_TO_FIT]; -if(_231=="true"){ -_231=true; +this.properties[jsId.PP_WINDOW_POSITION_STATIC]=_234; +var _235=this.properties[jsId.PP_WINDOW_HEIGHT_TO_FIT]; +if(_235=="true"){ +_235=true; }else{ -if(_230=="false"){ -_231=false; +if(_234=="false"){ +_235=false; }else{ -if(_231!=true&&_231!=false){ -_231=true; +if(_235!=true&&_235!=false){ +_235=true; } } } -this.properties[jsId.PP_WINDOW_HEIGHT_TO_FIT]=_231; -var _232=this.properties[jsId.PP_WINDOW_TITLE]; -if(!_232&&this.name){ +this.properties[jsId.PP_WINDOW_HEIGHT_TO_FIT]=_235; +var _236=this.properties[jsId.PP_WINDOW_TITLE]; +if(!_236&&this.name){ var re=(/^[^:]*:*/); -_232=this.name.replace(re,""); -this.properties[jsId.PP_WINDOW_TITLE]=_232; +_236=this.name.replace(re,""); +this.properties[jsId.PP_WINDOW_TITLE]=_236; } -},postParseAnnotateHtml:function(_234){ -var _235=jetspeed; -var _236=_235.portleturl; -if(_234){ -var _237=_234; -var _238=_237.getElementsByTagName("form"); -var _239=_235.debug.postParseAnnotateHtml; -var _23a=_235.debug.postParseAnnotateHtmlDisableAnchors; +},postParseAnnotateHtml:function(_238){ +var _239=jetspeed; +var _23a=_239.portleturl; if(_238){ -for(var i=0;i<_238.length;i++){ -var _23c=_238[i]; -var _23d=_23c.action; -var _23e=_236.parseContentUrl(_23d); -var _23f=_23e.operation; -if(_23f==_236.PORTLET_REQUEST_ACTION||_23f==_236.PORTLET_REQUEST_RENDER){ -var _240=_236.genPseudoUrl(_23e,true); -_23c.action=_240; -var _241=new _235.om.ActionRenderFormBind(_23c,_23e.url,_23e.portletEntityId,_23f); -if(_239){ -dojo.debug("postParseAnnotateHtml ["+this.entityId+"] adding FormBind ("+_23f+") for form with action: "+_23d); -} -}else{ -if(_23d==null||_23d.length==0){ -var _241=new _235.om.ActionRenderFormBind(_23c,null,this.entityId,null); -if(_239){ +var _23b=_238; +var _23c=_23b.getElementsByTagName("form"); +var _23d=_239.debug.postParseAnnotateHtml; +var _23e=_239.debug.postParseAnnotateHtmlDisableAnchors; +if(_23c){ +for(var i=0;i<_23c.length;i++){ +var _240=_23c[i]; +var _241=_240.action; +var _242=_23a.parseContentUrl(_241); +var _243=_242.operation; +if(_243==_23a.PORTLET_REQUEST_ACTION||_243==_23a.PORTLET_REQUEST_RENDER){ +var _244=_23a.genPseudoUrl(_242,true); +_240.action=_244; +var _245=new _239.om.ActionRenderFormBind(_240,_242.url,_242.portletEntityId,_243); +if(_23d){ +dojo.debug("postParseAnnotateHtml ["+this.entityId+"] adding FormBind ("+_243+") for form with action: "+_241); +} +}else{ +if(_241==null||_241.length==0){ +var _245=new _239.om.ActionRenderFormBind(_240,null,this.entityId,null); +if(_23d){ dojo.debug("postParseAnnotateHtml ["+this.entityId+"] form action attribute is empty - adding FormBind with expectation that form action will be set via script"); } }else{ -if(_239){ -dojo.debug("postParseAnnotateHtml ["+this.entityId+"] form action attribute doesn't match annotation criteria, leaving as is: "+_23d); +if(_23d){ +dojo.debug("postParseAnnotateHtml ["+this.entityId+"] form action attribute doesn't match annotation criteria, leaving as is: "+_241); } } } } } -var _242=_237.getElementsByTagName("a"); -if(_242){ -for(var i=0;i<_242.length;i++){ -var _243=_242[i]; -var _244=_243.href; -var _23e=_236.parseContentUrl(_244); -var _245=null; -if(!_23a){ -_245=_236.genPseudoUrl(_23e); +var _246=_23b.getElementsByTagName("a"); +if(_246){ +for(var i=0;i<_246.length;i++){ +var _247=_246[i]; +var _248=_247.href; +var _242=_23a.parseContentUrl(_248); +var _249=null; +if(!_23e){ +_249=_23a.genPseudoUrl(_242); } -if(!_245){ -if(_239){ -dojo.debug("postParseAnnotateHtml ["+this.entityId+"] leaving href as is: "+_244); +if(!_249){ +if(_23d){ +dojo.debug("postParseAnnotateHtml ["+this.entityId+"] leaving href as is: "+_248); } }else{ -if(_245==_244){ -if(_239){ -dojo.debug("postParseAnnotateHtml ["+this.entityId+"] href parsed and regenerated identically: "+_244); +if(_249==_248){ +if(_23d){ +dojo.debug("postParseAnnotateHtml ["+this.entityId+"] href parsed and regenerated identically: "+_248); } }else{ -if(_239){ -dojo.debug("postParseAnnotateHtml ["+this.entityId+"] href parsed, replacing: "+_244+" with: "+_245); +if(_23d){ +dojo.debug("postParseAnnotateHtml ["+this.entityId+"] href parsed, replacing: "+_248+" with: "+_249); } -_243.href=_245; +_247.href=_249; } } } } } },getPWin:function(){ -var _246=jetspeed; -var _247=this.properties[_246.id.PP_WIDGET_ID]; -if(_247){ -return _246.page.getPWin(_247); +var _24a=jetspeed; +var _24b=this.properties[_24a.id.PP_WIDGET_ID]; +if(_24b){ +return _24a.page.getPWin(_24b); } return null; -},getCurWinState:function(_248){ -var _249=null; +},getCurWinState:function(_24c){ +var _24d=null; try{ -var _24a=this.getPWin(); -if(!_24a){ +var _24e=this.getPWin(); +if(!_24e){ return null; } -_249=_24a.getCurWinStateForPersist(_248); -if(!_248){ -if(_249.layout==null){ -_249.layout=this.lastSavedWindowState.layout; +_24d=_24e.getCurWinStateForPersist(_24c); +if(!_24c){ +if(_24d.layout==null){ +_24d.layout=this.lastSavedWindowState.layout; } } } catch(e){ dojo.raise("portlet.getCurWinState "+jetspeed.formatError(e)); } -return _249; +return _24d; },getSavedWinState:function(){ if(!this.lastSavedWindowState){ dojo.raise("Portlet not initialized: "+this.name); } return this.lastSavedWindowState; -},getInitialWinDims:function(_24b,_24c){ -var _24d=jetspeed; -var jsId=_24d.id; -if(!_24b){ -_24b={}; +},getInitialWinDims:function(_24f,_250){ +var _251=jetspeed; +var jsId=_251.id; +if(!_24f){ +_24f={}; } -var _24f=this.properties[jsId.PP_WINDOW_POSITION_STATIC]; -var _250=this.properties[jsId.PP_WINDOW_HEIGHT_TO_FIT]; -_24b[jsId.PP_WINDOW_POSITION_STATIC]=_24f; -_24b[jsId.PP_WINDOW_HEIGHT_TO_FIT]=_250; -var _251=this.properties["width"]; -if(!_24c&&_251!=null&&_251>0){ -_24b.width=Math.floor(_251); +var _253=this.properties[jsId.PP_WINDOW_POSITION_STATIC]; +var _254=this.properties[jsId.PP_WINDOW_HEIGHT_TO_FIT]; +_24f[jsId.PP_WINDOW_POSITION_STATIC]=_253; +_24f[jsId.PP_WINDOW_HEIGHT_TO_FIT]=_254; +var _255=this.properties["width"]; +if(!_250&&_255!=null&&_255>0){ +_24f.width=Math.floor(_255); }else{ -if(_24c){ -_24b.width=-1; +if(_250){ +_24f.width=-1; } } -var _252=this.properties["height"]; -if(!_24c&&_252!=null&&_252>0){ -_24b.height=Math.floor(_252); +var _256=this.properties["height"]; +if(!_250&&_256!=null&&_256>0){ +_24f.height=Math.floor(_256); }else{ -if(_24c){ -_24b.height=-1; +if(_250){ +_24f.height=-1; } } -if(!_24f||!_24d.prefs.windowTiling){ -var _253=this.properties["x"]; -if(!_24c&&_253!=null&&_253>=0){ -_24b.left=Math.floor(((_253>0)?_253:0)); +if(!_253||!_251.prefs.windowTiling){ +var _257=this.properties["x"]; +if(!_250&&_257!=null&&_257>=0){ +_24f.left=Math.floor(((_257>0)?_257:0)); }else{ -if(_24c){ -_24b.left=-1; +if(_250){ +_24f.left=-1; } } -var _254=this.properties["y"]; -if(!_24c&&_254!=null&&_254>=0){ -_24b.top=Math.floor(((_254>0)?_254:0)); +var _258=this.properties["y"]; +if(!_250&&_258!=null&&_258>=0){ +_24f.top=Math.floor(((_258>0)?_258:0)); }else{ -_24b.top=-1; +_24f.top=-1; } -var _255=this._getInitialZIndex(_24c); -if(_255!=null){ -_24b.zIndex=_255; +var _259=this._getInitialZIndex(_250); +if(_259!=null){ +_24f.zIndex=_259; } } -return _24b; -},_initWinState:function(_256,_257){ -var _258=jetspeed; -var _259=(_256?_256:{}); -this.getInitialWinDims(_259,_257); -if(_258.debug.initWinState){ -var _25a=this.properties[_258.id.PP_WINDOW_POSITION_STATIC]; -if(!_25a||!_258.prefs.windowTiling){ -dojo.debug("initWinState ["+this.entityId+"] z="+_259.zIndex+" x="+_259.left+" y="+_259.top+" width="+_259.width+" height="+_259.height); +return _24f; +},_initWinState:function(_25a,_25b){ +var _25c=jetspeed; +var _25d=(_25a?_25a:{}); +this.getInitialWinDims(_25d,_25b); +if(_25c.debug.initWinState){ +var _25e=this.properties[_25c.id.PP_WINDOW_POSITION_STATIC]; +if(!_25e||!_25c.prefs.windowTiling){ +dojo.debug("initWinState ["+this.entityId+"] z="+_25d.zIndex+" x="+_25d.left+" y="+_25d.top+" width="+_25d.width+" height="+_25d.height); }else{ -dojo.debug("initWinState ["+this.entityId+"] column="+_259.column+" row="+_259.row+" width="+_259.width+" height="+_259.height); +dojo.debug("initWinState ["+this.entityId+"] column="+_25d.column+" row="+_25d.row+" width="+_25d.width+" height="+_25d.height); } } -this.lastSavedWindowState=_259; -return _259; -},_getInitialZIndex:function(_25b){ -var _25c=null; -var _25d=this.properties["z"]; -if(!_25b&&_25d!=null&&_25d>=0){ -_25c=Math.floor(_25d); +this.lastSavedWindowState=_25d; +return _25d; +},_getInitialZIndex:function(_25f){ +var _260=null; +var _261=this.properties["z"]; +if(!_25f&&_261!=null&&_261>=0){ +_260=Math.floor(_261); }else{ -if(_25b){ -_25c=-1; +if(_25f){ +_260=-1; } } -return _25c; -},_getChangedWindowState:function(_25e){ +return _260; +},_getChangedWindowState:function(_262){ var jsId=jetspeed.id; -var _260=this.getSavedWinState(); -if(_260&&dojo.lang.isEmpty(_260)){ -_260=null; -_25e=false; -} -var _261=this.getCurWinState(_25e); -var _262=_261[jsId.PP_WINDOW_POSITION_STATIC]; -var _263=!_262; -if(!_260){ -var _264={state:_261,positionChanged:true,extendedPropChanged:true}; -if(_263){ -_264.zIndexChanged=true; -} -return _264; -} -var _265=false; -var _266=false; -var _267=false; -var _268=false; -for(var _269 in _261){ -if(_261[_269]!=_260[_269]){ -if(_269==jsId.PP_WINDOW_POSITION_STATIC||_269==jsId.PP_WINDOW_HEIGHT_TO_FIT){ -_265=true; -_267=true; -_266=true; -}else{ -if(_269=="zIndex"){ -if(_263){ -_265=true; -_268=true; -} -}else{ -_265=true; -_266=true; -} -} +var _264=this.getSavedWinState(); +if(_264&&dojo.lang.isEmpty(_264)){ +_264=null; +_262=false; +} +var _265=this.getCurWinState(_262); +var _266=_265[jsId.PP_WINDOW_POSITION_STATIC]; +var _267=!_266; +if(!_264){ +var _268={state:_265,positionChanged:true,extendedPropChanged:true}; +if(_267){ +_268.zIndexChanged=true; +} +return _268; +} +var _269=false; +var _26a=false; +var _26b=false; +var _26c=false; +for(var _26d in _265){ +if(_265[_26d]!=_264[_26d]){ +if(_26d==jsId.PP_WINDOW_POSITION_STATIC||_26d==jsId.PP_WINDOW_HEIGHT_TO_FIT){ +_269=true; +_26b=true; +_26a=true; +}else{ +if(_26d=="zIndex"){ +if(_267){ +_269=true; +_26c=true; +} +}else{ +_269=true; +_26a=true; +} +} +} +} +if(_269){ +var _268={state:_265,positionChanged:_26a,extendedPropChanged:_26b}; +if(_267){ +_268.zIndexChanged=_26c; +} +return _268; +} +return null; +},getPortletUrl:function(_26e){ +var _26f=jetspeed; +var _270=_26f.url; +var _271=null; +if(_26e&&_26e.url){ +_271=_26e.url; +}else{ +if(_26e&&_26e.formNode){ +var _272=_26e.formNode.getAttribute("action"); +if(_272){ +_271=_272; +} +} +} +if(_271==null){ +_271=_270.basePortalUrl()+_270.path.PORTLET+_26f.page.getPath(); +} +if(!_26e.dontAddQueryArgs){ +_271=_270.parse(_271); +_271=_270.addQueryParameter(_271,"entity",this.entityId,true); +_271=_270.addQueryParameter(_271,"portlet",this.name,true); +_271=_270.addQueryParameter(_271,"encoder","desktop",true); +if(_26e.jsPageUrl!=null){ +var _273=_26e.jsPageUrl.query; +if(_273!=null&&_273.length>0){ +_271=_271.toString()+"&"+_273; } } -if(_265){ -var _264={state:_261,positionChanged:_266,extendedPropChanged:_267}; -if(_263){ -_264.zIndexChanged=_268; } -return _264; -} -return null; -},getPortletUrl:function(_26a){ -var _26b=jetspeed; -var _26c=_26b.url; -var _26d=null; -if(_26a&&_26a.url){ -_26d=_26a.url; -}else{ -if(_26a&&_26a.formNode){ -var _26e=_26a.formNode.getAttribute("action"); if(_26e){ -_26d=_26e; -} -} -} -if(_26d==null){ -_26d=_26c.basePortalUrl()+_26c.path.PORTLET+_26b.page.getPath(); -} -if(!_26a.dontAddQueryArgs){ -_26d=_26c.parse(_26d); -_26d=_26c.addQueryParameter(_26d,"entity",this.entityId,true); -_26d=_26c.addQueryParameter(_26d,"portlet",this.name,true); -_26d=_26c.addQueryParameter(_26d,"encoder","desktop",true); -if(_26a.jsPageUrl!=null){ -var _26f=_26a.jsPageUrl.query; -if(_26f!=null&&_26f.length>0){ -_26d=_26d.toString()+"&"+_26f; -} +_26e.url=_271.toString(); } +return _271; +},_submitAjaxApi:function(_274,_275,_276){ +var _277=jetspeed; +var _278="?action="+_274+"&id="+this.entityId+_275; +var _279=_277.url.basePortalUrl()+_277.url.path.AJAX_API+_277.page.getPath()+_278; +var _27a="text/xml"; +var _27b=new _277.om.Id(_274,this.entityId); +_27b.portlet=this; +_277.url.retrieveContent({url:_279,mimetype:_27a},_276,_27b,_277.debugContentDumpIds); +},submitWinState:function(_27c,_27d){ +var _27e=jetspeed; +var jsId=_27e.id; +if(!_27e.page.getPageAction(jsId.ACT_EDIT)){ +return; } -if(_26a){ -_26a.url=_26d.toString(); -} -return _26d; -},_submitAjaxApi:function(_270,_271,_272){ -var _273=jetspeed; -var _274="?action="+_270+"&id="+this.entityId+_271; -var _275=_273.url.basePortalUrl()+_273.url.path.AJAX_API+_273.page.getPath()+_274; -var _276="text/xml"; -var _277=new _273.om.Id(_270,this.entityId); -_277.portlet=this; -_273.url.retrieveContent({url:_275,mimetype:_276},_272,_277,null); -},submitWinState:function(_278,_279){ -var _27a=jetspeed; -var jsId=_27a.id; -var _27c=null; -if(_279){ -_27c={state:this._initWinState(null,true)}; -}else{ -_27c=this._getChangedWindowState(_278); -} -if(_27c){ -var _27d=_27c.state; -var _27e=_27d[jsId.PP_WINDOW_POSITION_STATIC]; -var _27f=_27d[jsId.PP_WINDOW_HEIGHT_TO_FIT]; var _280=null; -if(_27c.extendedPropChanged){ -var _281=jsId.PP_PROP_SEPARATOR; -var _282=jsId.PP_PAIR_SEPARATOR; -_280=jsId.PP_STATICPOS+_281+_27e.toString(); -_280+=_282+jsId.PP_FITHEIGHT+_281+_27f.toString(); -_280=escape(_280); +if(_27d){ +_280={state:this._initWinState(null,true)}; +}else{ +_280=this._getChangedWindowState(_27c); } -var _283=""; +if(_280){ +var _281=_280.state; +var _282=_281[jsId.PP_WINDOW_POSITION_STATIC]; +var _283=_281[jsId.PP_WINDOW_HEIGHT_TO_FIT]; var _284=null; -if(_27e){ -_284="moveabs"; -if(_27d.column!=null){ -_283+="&col="+_27d.column; +if(_280.extendedPropChanged){ +var _285=jsId.PP_PROP_SEPARATOR; +var _286=jsId.PP_PAIR_SEPARATOR; +_284=jsId.PP_STATICPOS+_285+_282.toString(); +_284+=_286+jsId.PP_FITHEIGHT+_285+_283.toString(); +_284=escape(_284); } -if(_27d.row!=null){ -_283+="&row="+_27d.row; +var _287=""; +var _288=null; +if(_282){ +_288="moveabs"; +if(_281.column!=null){ +_287+="&col="+_281.column; } -if(_27d.layout!=null){ -_283+="&layoutid="+_27d.layout; +if(_281.row!=null){ +_287+="&row="+_281.row; } -if(_27d.height!=null){ -_283+="&height="+_27d.height; +if(_281.layout!=null){ +_287+="&layoutid="+_281.layout; +} +if(_281.height!=null){ +_287+="&height="+_281.height; } }else{ -_284="move"; -if(_27d.zIndex!=null){ -_283+="&z="+_27d.zIndex; +_288="move"; +if(_281.zIndex!=null){ +_287+="&z="+_281.zIndex; } -if(_27d.width!=null){ -_283+="&width="+_27d.width; +if(_281.width!=null){ +_287+="&width="+_281.width; } -if(_27d.height!=null){ -_283+="&height="+_27d.height; +if(_281.height!=null){ +_287+="&height="+_281.height; } -if(_27d.left!=null){ -_283+="&x="+_27d.left; +if(_281.left!=null){ +_287+="&x="+_281.left; } -if(_27d.top!=null){ -_283+="&y="+_27d.top; +if(_281.top!=null){ +_287+="&y="+_281.top; } } -if(_280!=null){ -_283+="&"+jsId.PP_DESKTOP_EXTENDED+"="+_280; +if(_284!=null){ +_287+="&"+jsId.PP_DESKTOP_EXTENDED+"="+_284; } -this._submitAjaxApi(_284,_283,new _27a.om.MoveApiCL(this,_27d)); -if(!_278&&!_279){ -if(!_27e&&_27c.zIndexChanged){ -var _285=_27a.page.getPortletArray(); -if(_285&&(_285.length-1)>0){ -for(var i=0;i<_285.length;i++){ -var _287=_285[i]; -if(_287&&_287.entityId!=this.entityId){ -if(!_287.properties[_27a.id.PP_WINDOW_POSITION_STATIC]){ -_287.submitWinState(true); +this._submitAjaxApi(_288,_287,new _27e.om.MoveApiCL(this,_281)); +if(!_27c&&!_27d){ +if(!_282&&_280.zIndexChanged){ +var _289=_27e.page.getPortletArray(); +if(_289&&(_289.length-1)>0){ +for(var i=0;i<_289.length;i++){ +var _28b=_289[i]; +if(_28b&&_28b.entityId!=this.entityId){ +if(!_28b.properties[_27e.id.PP_WINDOW_POSITION_STATIC]){ +_28b.submitWinState(true); } } } } }else{ -if(_27e){ +if(_282){ } } } } -},retrieveContent:function(_288,_289,_28a){ -if(_288==null){ -_288=new jetspeed.om.PortletCL(this,_28a,_289); +},retrieveContent:function(_28c,_28d,_28e){ +if(_28c==null){ +_28c=new jetspeed.om.PortletCL(this,_28e,_28d); } -if(!_289){ -_289={}; +if(!_28d){ +_28d={}; } -var _28b=this; -_28b.getPortletUrl(_289); -this.contentRetriever.getContent(_289,_288,_28b,jetspeed.debugContentDumpIds); -},setPortletContent:function(_28c,_28d,_28e){ -var _28f=this.getPWin(); -if(_28e!=null&&_28e.length>0){ -this.properties[jetspeed.id.PP_WINDOW_TITLE]=_28e; -if(_28f&&!this.loadingIndicatorIsShown()){ -_28f.setPortletTitle(_28e); +var _28f=this; +_28f.getPortletUrl(_28d); +this.contentRetriever.getContent(_28d,_28c,_28f,jetspeed.debugContentDumpIds); +},setPortletContent:function(_290,_291,_292){ +var _293=this.getPWin(); +if(_292!=null&&_292.length>0){ +this.properties[jetspeed.id.PP_WINDOW_TITLE]=_292; +if(_293&&!this.loadingIndicatorIsShown()){ +_293.setPortletTitle(_292); } } -if(_28f){ -_28f.setPortletContent(_28c,_28d); +if(_293){ +_293.setPortletContent(_290,_291); } },loadingIndicatorIsShown:function(){ var jsId=jetspeed.id; -var _291=this._getLoadingActionLabel(jsId.ACT_LOAD_RENDER); -var _292=this._getLoadingActionLabel(jsId.ACT_LOAD_ACTION); -var _293=this._getLoadingActionLabel(jsId.ACT_LOAD_UPDATE); -var _294=this.getPWin(); -if(_294&&(_291||_292)){ -var _295=_294.getPortletTitle(); -if(_295&&(_295==_291||_295==_292)){ +var _295=this._getLoadingActionLabel(jsId.ACT_LOAD_RENDER); +var _296=this._getLoadingActionLabel(jsId.ACT_LOAD_ACTION); +var _297=this._getLoadingActionLabel(jsId.ACT_LOAD_UPDATE); +var _298=this.getPWin(); +if(_298&&(_295||_296)){ +var _299=_298.getPortletTitle(); +if(_299&&(_299==_295||_299==_296)){ return true; } } return false; -},_getLoadingActionLabel:function(_296){ -var _297=null; +},_getLoadingActionLabel:function(_29a){ +var _29b=null; if(jetspeed.prefs!=null&&jetspeed.prefs.desktopActionLabels!=null){ -_297=jetspeed.prefs.desktopActionLabels[_296]; -if(_297!=null&&_297.length==0){ -_297=null; +_29b=jetspeed.prefs.desktopActionLabels[_29a]; +if(_29b!=null&&_29b.length==0){ +_29b=null; } } -return _297; -},loadingIndicatorShow:function(_298){ -if(_298&&!this.loadingIndicatorIsShown()){ -var _299=this._getLoadingActionLabel(_298); -var _29a=this.getPWin(); -if(_29a&&_299){ -_29a.setPortletTitle(_299); +return _29b; +},loadingIndicatorShow:function(_29c){ +if(_29c&&!this.loadingIndicatorIsShown()){ +var _29d=this._getLoadingActionLabel(_29c); +var _29e=this.getPWin(); +if(_29e&&_29d){ +_29e.setPortletTitle(_29d); } } },loadingIndicatorHide:function(){ -var _29b=this.getPWin(); -if(_29b){ -_29b.setPortletTitle(this.properties[jetspeed.id.PP_WINDOW_TITLE]); +var _29f=this.getPWin(); +if(_29f){ +_29f.setPortletTitle(this.properties[jetspeed.id.PP_WINDOW_TITLE]); } },getId:function(){ return this.entityId; @@ -2594,30 +2615,30 @@ return this.properties[name]; },getProperties:function(){ return this.properties; -},renderAction:function(_29d,_29e){ -var _29f=jetspeed; -var _2a0=_29f.url; -var _2a1=null; -if(_29d!=null){ -_2a1=this.getAction(_29d); -} -var _2a2=_29e; -if(_2a2==null&&_2a1!=null){ -_2a2=_2a1.url; -} -if(_2a2==null){ -return; -} -var _2a3=_2a0.basePortalUrl()+_2a0.path.PORTLET+"/"+_2a2+_29f.page.getPath(); -if(_29d!=_29f.id.ACT_PRINT){ -this.retrieveContent(null,{url:_2a3}); -}else{ -var _2a4=_29f.page.getPageUrl(); -_2a4=_2a0.addQueryParameter(_2a4,"jsprintmode","true"); -_2a4=_2a0.addQueryParameter(_2a4,"jsaction",escape(_2a1.url)); -_2a4=_2a0.addQueryParameter(_2a4,"jsentity",this.entityId); -_2a4=_2a0.addQueryParameter(_2a4,"jslayoutid",this.lastSavedWindowState.layout); -window.open(_2a4.toString(),"jsportlet_print","status,scrollbars,resizable,menubar"); +},renderAction:function(_2a1,_2a2){ +var _2a3=jetspeed; +var _2a4=_2a3.url; +var _2a5=null; +if(_2a1!=null){ +_2a5=this.getAction(_2a1); +} +var _2a6=_2a2; +if(_2a6==null&&_2a5!=null){ +_2a6=_2a5.url; +} +if(_2a6==null){ +return; +} +var _2a7=_2a4.basePortalUrl()+_2a4.path.PORTLET+"/"+_2a6+_2a3.page.getPath(); +if(_2a1!=_2a3.id.ACT_PRINT){ +this.retrieveContent(null,{url:_2a7}); +}else{ +var _2a8=_2a3.page.getPageUrl(); +_2a8=_2a4.addQueryParameter(_2a8,"jsprintmode","true"); +_2a8=_2a4.addQueryParameter(_2a8,"jsaction",escape(_2a5.url)); +_2a8=_2a4.addQueryParameter(_2a8,"jsentity",this.entityId); +_2a8=_2a4.addQueryParameter(_2a8,"jslayoutid",this.lastSavedWindowState.layout); +window.open(_2a8.toString(),"jsportlet_print","status,scrollbars,resizable,menubar"); } },getAction:function(name){ if(this.actions==null){ @@ -2628,27 +2649,27 @@ return this.currentActionState; },getCurrentActionMode:function(){ return this.currentActionMode; -},updateActions:function(_2a6,_2a7,_2a8){ -if(_2a6){ -this.actions=_2a6; +},updateActions:function(_2aa,_2ab,_2ac){ +if(_2aa){ +this.actions=_2aa; }else{ this.actions={}; } -this.currentActionState=_2a7; -this.currentActionMode=_2a8; +this.currentActionState=_2ab; +this.currentActionMode=_2ac; this.syncActions(); },syncActions:function(){ -var _2a9=jetspeed; -_2a9.page.setPageModePortletActions(this); -var _2aa=this.getPWin(); -if(_2aa){ -_2aa.actionBtnSync(_2a9,_2a9.id); +var _2ad=jetspeed; +_2ad.page.setPageModePortletActions(this); +var _2ae=this.getPWin(); +if(_2ae){ +_2ae.actionBtnSync(_2ad,_2ad.id); } }}); -jetspeed.om.ActionRenderFormBind=function(form,url,_2ad,_2ae){ +jetspeed.om.ActionRenderFormBind=function(form,url,_2b1,_2b2){ dojo.io.FormBind.call(this,{url:url,formNode:form}); -this.entityId=_2ad; -this.submitOperation=_2ae; +this.entityId=_2b1; +this.submitOperation=_2b2; this.formSubmitInProgress=false; }; dojo.inherits(jetspeed.om.ActionRenderFormBind,dojo.io.FormBind); @@ -2672,40 +2693,40 @@ form.submit=function(){ form.onsubmit(); }; -},eventConfMgr:function(_2b1){ -var fn=(_2b1)?"disconnect":"connect"; -var _2b3=dojo.event; +},eventConfMgr:function(_2b5){ +var fn=(_2b5)?"disconnect":"connect"; +var _2b7=dojo.event; var form=this.form; -_2b3[fn]("after",form,"onsubmit",this,"submit",null); +_2b7[fn]("after",form,"onsubmit",this,"submit",null); for(var i=0;i0){ +if(_2dd>0){ this._loading(false); -dojo.raise("Cannot interpret portlet url in action response: "+_2d1); -_2d6=null; +dojo.raise("Cannot interpret portlet url in action response: "+_2d5); +_2da=null; } } } } -if(_2d6!=null){ -if(_2d5.debug.doRenderDoAction){ -dojo.debug("PortletActionCL starting portlet-renderer with renderUrl="+_2d6); +if(_2da!=null&&!_2d9.noActionRender){ +if(_2d9.debug.doRenderDoAction){ +dojo.debug("PortletActionCL starting portlet-renderer with renderUrl="+_2da); } -var _2da=new jetspeed.PortletRenderer(false,false,false,_2d6,true); -_2da.renderAll(); +var _2de=new jetspeed.PortletRenderer(false,false,false,_2da,true); +_2de.renderAll(); }else{ this._loading(false); } -if(!_2d7&&this.portlet){ -_2d5.getActionsForPortlet(this.portlet.entityId); +if(!_2db&&this.portlet){ +_2d9.getActionsForPortlet(this.portlet.entityId); } if(this.formbind!=null){ this.formbind.isFormSubmitInProgress(false); } -},notifyFailure:function(type,_2dc,_2dd,_2de){ +},notifyFailure:function(type,_2e0,_2e1,_2e2){ this._loading(false); if(this.formbind!=null){ this.formbind.isFormSubmitInProgress(false); } -dojo.raise("PortletActionCL notifyFailure type: "+type+jetspeed.formatError(_2dc)); +dojo.raise("PortletActionCL notifyFailure type: "+type+jetspeed.formatError(_2e0)); }}; jetspeed.om.MenuOption=function(){ }; dojo.lang.extend(jetspeed.om.MenuOption,{navigateTo:function(){ if(this.isLeaf()){ -var _2df=this.getUrl(); -if(_2df){ +var _2e3=this.getUrl(); +if(_2e3){ if(!jetspeed.prefs.ajaxPageNavigation){ -jetspeed.pageNavigate(_2df,this.getTarget()); +jetspeed.pageNavigate(_2e3,this.getTarget()); }else{ -jetspeed.updatePage(_2df); +jetspeed.updatePage(_2e3); } } } @@ -2898,10 +2923,10 @@ dojo.lang.extend(jetspeed.om.MenuOptionSeparator,{isSeparator:function(){ return true; }}); -jetspeed.om.Menu=function(_2e0,_2e1){ +jetspeed.om.Menu=function(_2e4,_2e5){ this._is_parsed=false; -this.name=_2e0; -this.type=_2e1; +this.name=_2e4; +this.type=_2e5; }; dojo.inherits(jetspeed.om.Menu,jetspeed.om.MenuOption); dojo.lang.extend(jetspeed.om.Menu,{setParsed:function(){ @@ -2910,26 +2935,26 @@ return this._is_parsed; },getName:function(){ return this.name; -},addOption:function(_2e2){ -if(!_2e2){ +},addOption:function(_2e6){ +if(!_2e6){ return; } if(!this.options){ this.options=new Array(); } -this.options.push(_2e2); +this.options.push(_2e6); },getOptions:function(){ var tAry=new Array(); return (this.options?tAry.concat(this.options):tAry); -},getOptionByIndex:function(_2e4){ +},getOptionByIndex:function(_2e8){ if(!this.hasOptions()){ return null; } -if(_2e4==0||_2e4>0){ -if(_2e4>=this.options.length){ +if(_2e8==0||_2e8>0){ +if(_2e8>=this.options.length){ dojo.raise("Menu.getOptionByIndex index out of bounds"); }else{ -return this.options[_2e4]; +return this.options[_2e8]; } } },hasOptions:function(){ @@ -2943,8 +2968,8 @@ return false; } for(var i=0;i1){ +var _2f7=node.getElementsByTagName("js"); +if(!_2f7||_2f7.length>1){ dojo.raise("Expected one in menu xml"); } -var _2f4=_2f3[0].childNodes; -for(var i=0;i<_2f4.length;i++){ -var _2f6=_2f4[i]; -if(_2f6.nodeType!=1){ +var _2f8=_2f7[0].childNodes; +for(var i=0;i<_2f8.length;i++){ +var _2fa=_2f8[i]; +if(_2fa.nodeType!=1){ continue; } -var _2f7=_2f6.nodeName; -if(_2f7=="menu"){ +var _2fb=_2fa.nodeName; +if(_2fb=="menu"){ if(menu!=null){ dojo.raise("Expected one root in menu xml"); } -menu=this.parseMenuObject(_2f6,new jetspeed.om.Menu()); +menu=this.parseMenuObject(_2fa,new jetspeed.om.Menu()); } } if(menu!=null){ if(menu.name==null){ -menu.name==_2f0; +menu.name==_2f4; } if(menu.type==null){ -menu.type=_2f1; +menu.type=_2f5; } } return menu; },parseMenuObject:function(node,mObj){ -var _2fa=null; -var _2fb=node.childNodes; -for(var i=0;i<_2fb.length;i++){ -var _2fd=_2fb[i]; -if(_2fd.nodeType!=1){ +var _2fe=null; +var _2ff=node.childNodes; +for(var i=0;i<_2ff.length;i++){ +var _301=_2ff[i]; +if(_301.nodeType!=1){ continue; } -var _2fe=_2fd.nodeName; -if(_2fe=="menu"){ +var _302=_301.nodeName; +if(_302=="menu"){ if(mObj.isLeaf()){ dojo.raise("Unexpected nested "); }else{ -mObj.addOption(this.parseMenuObject(_2fd,new jetspeed.om.Menu())); +mObj.addOption(this.parseMenuObject(_301,new jetspeed.om.Menu())); } }else{ -if(_2fe=="option"){ +if(_302=="option"){ if(mObj.isLeaf()){ dojo.raise("Unexpected nested