portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smi...@apache.org
Subject svn commit: r553983 - in /portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget: PageEditor.js PageEditor.src.js
Date Fri, 06 Jul 2007 18:30:00 GMT
Author: smilek
Date: Fri Jul  6 11:29:59 2007
New Revision: 553983

URL: http://svn.apache.org/viewvc?view=rev&rev=553983
Log:
added destroy override to support ajaxPageNavigation mode

Modified:
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.js
    portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.src.js

Modified: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.js?view=diff&rev=553983&r1=553982&r2=553983
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.js (original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.js Fri Jul 
6 11:29:59 2007
@@ -118,363 +118,380 @@
 }
 this.show();
 this.editPageSyncPortletActions();
-},deletePortlet:function(_1d,_1e){
-this.deletePortletDialog.portletEntityId=_1d;
-this.deletePortletDialog.portletTitle=_1e;
-this.deletePortletTitle.innerHTML=_1e;
+},editPageDestroy:function(){
+if(this.pageEditorWidgets!=null){
+for(var i=0;i<this.pageEditorWidgets.length;i++){
+this.pageEditorWidgets[i].destroy();
+this.pageEditorWidgets[i]=null;
+}
+}
+if(this.deletePortletDialog!=null){
+this.deletePortletDialog.destroy();
+}
+if(this.deleteLayoutDialog!=null){
+this.deleteLayoutDialog.destroy();
+}
+if(this.columnSizeDialog!=null){
+this.columnSizeDialog.destroy();
+}
+this.destroy();
+},deletePortlet:function(_1e,_1f){
+this.deletePortletDialog.portletEntityId=_1e;
+this.deletePortletDialog.portletTitle=_1f;
+this.deletePortletTitle.innerHTML=_1f;
 this.deletePortletDialog.show();
-},deletePortletConfirmed:function(_1f){
-var _20=new jetspeed.widget.RemovePortletContentManager(_1f,this);
-_20.getContent();
-},deleteLayout:function(_21){
-this.deleteLayoutDialog.layoutId=_21;
-this.deleteLayoutDialog.layoutTitle=_21;
-this.deleteLayoutTitle.innerHTML=_21;
+},deletePortletConfirmed:function(_20){
+var _21=new jetspeed.widget.RemovePortletContentManager(_20,this);
+_21.getContent();
+},deleteLayout:function(_22){
+this.deleteLayoutDialog.layoutId=_22;
+this.deleteLayoutDialog.layoutTitle=_22;
+this.deleteLayoutTitle.innerHTML=_22;
 this.deleteLayoutDialog.show();
 },deleteLayoutConfirmed:function(){
-var _22=new jetspeed.widget.RemoveLayoutContentManager(this.deleteLayoutDialog.layoutId,this);
-_22.getContent();
-},openColumnSizesEditor:function(_23){
-var _24=null;
-if(_23!=null){
-_24=jetspeed.page.layouts[_23];
-}
-if(_24!=null&&_24.columnSizes!=null&&_24.columnSizes.length>0){
-var _25=5;
-var _26=0;
-for(var i=0;i<_25;i++){
-var _28=this.columnSizeDialog["spinner"+i];
-var _29=this["spinner"+i+"Field"];
-if(i<_24.columnSizes.length){
-_28.setValue(_24.columnSizes[i]);
-_29.style.display="block";
-_28.show();
-_26++;
+var _23=new jetspeed.widget.RemoveLayoutContentManager(this.deleteLayoutDialog.layoutId,this);
+_23.getContent();
+},openColumnSizesEditor:function(_24){
+var _25=null;
+if(_24!=null){
+_25=jetspeed.page.layouts[_24];
+}
+if(_25!=null&&_25.columnSizes!=null&&_25.columnSizes.length>0){
+var _26=5;
+var _27=0;
+for(var i=0;i<_26;i++){
+var _29=this.columnSizeDialog["spinner"+i];
+var _2a=this["spinner"+i+"Field"];
+if(i<_25.columnSizes.length){
+_29.setValue(_25.columnSizes[i]);
+_2a.style.display="block";
+_29.show();
+_27++;
 }else{
-_29.style.display="none";
-_28.hide();
+_2a.style.display="none";
+_29.hide();
 }
 }
-this.columnSizeDialog.layoutId=_23;
-this.columnSizeDialog.columnCount=_26;
+this.columnSizeDialog.layoutId=_24;
+this.columnSizeDialog.columnCount=_27;
 this.columnSizeDialog.show();
 }
-},columnSizeConfirmed:function(_2a,_2b){
-if(_2a!=null&&_2b!=null&&_2b.length>0){
-var _2c=jetspeed.page.layouts[_2a];
-var _2d=null;
-if(_2c!=null){
-_2d=_2c.name;
-}
+},columnSizeConfirmed:function(_2b,_2c){
+if(_2b!=null&&_2c!=null&&_2c.length>0){
+var _2d=jetspeed.page.layouts[_2b];
+var _2e=null;
 if(_2d!=null){
-var _2e="";
-for(var i=0;i<_2b.length;i++){
+_2e=_2d.name;
+}
+if(_2e!=null){
+var _2f="";
+for(var i=0;i<_2c.length;i++){
 if(i>0){
-_2e+=",";
+_2f+=",";
 }
-_2e+=_2b[i]+"%";
+_2f+=_2c[i]+"%";
 }
-var _30=new jetspeed.widget.UpdateFragmentContentManager(_2a,_2d,_2e,this);
-_30.getContent();
+var _31=new jetspeed.widget.UpdateFragmentContentManager(_2b,_2e,_2f,this);
+_31.getContent();
 }
 }
 },refreshPage:function(){
 dojo.lang.setTimeout(this,this._doRefreshPage,10);
 },_doRefreshPage:function(){
-var _31=jetspeed.page.getPageUrl();
-_31=jetspeed.url.addQueryParameter(_31,"editPage","true",true);
-window.location.href=_31.toString();
+var _32=jetspeed.page.getPageUrl();
+_32=jetspeed.url.addQueryParameter(_32,"editPage","true",true);
+window.location.href=_32.toString();
 },editModeNormal:function(){
-var _32=jetspeed.page.getPortletArray();
-for(var i=0;i<_32.length;i++){
-var _34=_32[i].getPortletWindow();
-if(_34!=null){
-_34.restoreFromMinimizeWindowTemporarily();
+var _33=jetspeed.page.getPortletArray();
+for(var i=0;i<_33.length;i++){
+var _35=_33[i].getPortletWindow();
+if(_35!=null){
+_35.restoreFromMinimizeWindowTemporarily();
 }
 }
 if(this.layoutEditPaneWidgets!=null){
 for(var i=0;i<this.layoutEditPaneWidgets.length;i++){
-var _35=this.layoutEditPaneWidgets[i];
-if(_35.layoutMoveContainer!=null){
-_35.layoutMoveContainer.domNode.style.display="none";
+var _36=this.layoutEditPaneWidgets[i];
+if(_36.layoutMoveContainer!=null){
+_36.layoutMoveContainer.domNode.style.display="none";
 }
 }
 }
 },editModeLayoutMove:function(){
-var _36=jetspeed.page.getPortletArray();
-for(var i=0;i<_36.length;i++){
-var _38=_36[i].getPortletWindow();
-if(_38!=null){
-_38.minimizeWindowTemporarily();
+var _37=jetspeed.page.getPortletArray();
+for(var i=0;i<_37.length;i++){
+var _39=_37[i].getPortletWindow();
+if(_39!=null){
+_39.minimizeWindowTemporarily();
 }
 }
 if(this.layoutEditPaneWidgets!=null){
 for(var i=0;i<this.layoutEditPaneWidgets.length;i++){
-var _39=this.layoutEditPaneWidgets[i];
-if(!_39.isRootLayout&&_39.layoutMoveContainer!=null){
-_39.layoutMoveContainer.domNode.style.display="block";
+var _3a=this.layoutEditPaneWidgets[i];
+if(!_3a.isRootLayout&&_3a.layoutMoveContainer!=null){
+_3a.layoutMoveContainer.domNode.style.display="block";
 }
 }
 }
 }});
-jetspeed.widget.EditPageGetThemesContentManager=function(_3a,_3b,_3c,_3d,_3e,_3f){
-this.pageEditorWidget=_3a;
-var _40=new Array();
-if(_3b){
-_40.push(["pageDecorations"]);
-}
+jetspeed.widget.EditPageGetThemesContentManager=function(_3b,_3c,_3d,_3e,_3f,_40){
+this.pageEditorWidget=_3b;
+var _41=new Array();
 if(_3c){
-_40.push(["portletDecorations"]);
+_41.push(["pageDecorations"]);
 }
 if(_3d){
-_40.push(["layouts"]);
+_41.push(["portletDecorations"]);
 }
 if(_3e){
-_40.push(["desktopPageDecorations","pageDecorations"]);
+_41.push(["layouts"]);
 }
 if(_3f){
-_40.push(["desktopPortletDecorations","portletDecorations"]);
+_41.push(["desktopPageDecorations","pageDecorations"]);
+}
+if(_40){
+_41.push(["desktopPortletDecorations","portletDecorations"]);
 }
-this.getThemeTypes=_40;
+this.getThemeTypes=_41;
 this.getThemeTypeNextIndex=0;
 };
 jetspeed.widget.EditPageGetThemesContentManager.prototype={getContent:function(){
 if(this.getThemeTypes!=null&&this.getThemeTypes.length>this.getThemeTypeNextIndex){
-var _41="?action=getthemes&type="+this.getThemeTypes[this.getThemeTypeNextIndex][0]+"&format=json";
-var _42=jetspeed.url.basePortalUrl()+jetspeed.url.path.AJAX_API+_41;
-var _43=new jetspeed.om.Id("getthemes",{});
-var _44={};
-_44.url=_42;
-_44.mimetype="text/json";
-jetspeed.url.retrieveContent(_44,this,_43,jetspeed.debugContentDumpIds);
+var _42="?action=getthemes&type="+this.getThemeTypes[this.getThemeTypeNextIndex][0]+"&format=json";
+var _43=jetspeed.url.basePortalUrl()+jetspeed.url.path.AJAX_API+_42;
+var _44=new jetspeed.om.Id("getthemes",{});
+var _45={};
+_45.url=_43;
+_45.mimetype="text/json";
+jetspeed.url.retrieveContent(_45,this,_44,jetspeed.debugContentDumpIds);
 }else{
 this.pageEditorWidget.editPageBuild();
 }
-},notifySuccess:function(_45,_46,_47){
+},notifySuccess:function(_46,_47,_48){
 if(jetspeed.page.themeDefinitions==null){
 jetspeed.page.themeDefinitions={};
 }
-var _48=((this.getThemeTypes[this.getThemeTypeNextIndex].length>1)?this.getThemeTypes[this.getThemeTypeNextIndex][1]:this.getThemeTypes[this.getThemeTypeNextIndex][0]);
-jetspeed.page.themeDefinitions[_48]=_45;
+var _49=((this.getThemeTypes[this.getThemeTypeNextIndex].length>1)?this.getThemeTypes[this.getThemeTypeNextIndex][1]:this.getThemeTypes[this.getThemeTypeNextIndex][0]);
+jetspeed.page.themeDefinitions[_49]=_46;
 this.getThemeTypeNextIndex++;
 this.getContent();
-},notifyFailure:function(_49,_4a,_4b,_4c){
-dojo.raise("EditPageGetThemesContentManager notifyFailure url: "+_4b+" type: "+_49+jetspeed.url.formatBindError(_4a));
+},notifyFailure:function(_4a,_4b,_4c,_4d){
+dojo.raise("EditPageGetThemesContentManager notifyFailure url: "+_4c+" type: "+_4a+jetspeed.url.formatBindError(_4b));
 }};
-jetspeed.widget.RemovePageContentManager=function(_4d){
-this.pageEditorWidget=_4d;
+jetspeed.widget.RemovePageContentManager=function(_4e){
+this.pageEditorWidget=_4e;
 };
 jetspeed.widget.RemovePageContentManager.prototype={getContent:function(){
-var _4e="?action=updatepage&method=remove";
-var _4f=jetspeed.url.basePortalUrl()+jetspeed.url.path.AJAX_API+jetspeed.page.getPath()+_4e;
-var _50=new jetspeed.om.Id("updatepage-remove-page",{});
-var _51={};
-_51.url=_4f;
-_51.mimetype="text/xml";
-jetspeed.url.retrieveContent(_51,this,_50,jetspeed.debugContentDumpIds);
-},notifySuccess:function(_52,_53,_54){
-if(jetspeed.url.checkAjaxApiResponse(_53,_52,true,"updatepage-remove-page")){
-var _55=jetspeed.page.makePageUrl("/");
-_55+="?"+jetspeed.id.PAGE_EDITOR_INITIATE_PARAMETER+"=true";
-window.location.href=_55;
+var _4f="?action=updatepage&method=remove";
+var _50=jetspeed.url.basePortalUrl()+jetspeed.url.path.AJAX_API+jetspeed.page.getPath()+_4f;
+var _51=new jetspeed.om.Id("updatepage-remove-page",{});
+var _52={};
+_52.url=_50;
+_52.mimetype="text/xml";
+jetspeed.url.retrieveContent(_52,this,_51,jetspeed.debugContentDumpIds);
+},notifySuccess:function(_53,_54,_55){
+if(jetspeed.url.checkAjaxApiResponse(_54,_53,true,"updatepage-remove-page")){
+var _56=jetspeed.page.makePageUrl("/");
+_56+="?"+jetspeed.id.PAGE_EDITOR_INITIATE_PARAMETER+"=true";
+window.location.href=_56;
 }
-},notifyFailure:function(_56,_57,_58,_59){
-dojo.raise("RemovePageContentManager notifyFailure url: "+_58+" type: "+_56+jetspeed.url.formatBindError(_57));
+},notifyFailure:function(_57,_58,_59,_5a){
+dojo.raise("RemovePageContentManager notifyFailure url: "+_59+" type: "+_57+jetspeed.url.formatBindError(_58));
 }};
-jetspeed.widget.AddPageContentManager=function(_5a,_5b,_5c,_5d,_5e,_5f,_60){
-this.pageRealPath=_5a;
-this.pagePath=_5b;
-this.pageName=_5c;
-if(_5d==null){
+jetspeed.widget.AddPageContentManager=function(_5b,_5c,_5d,_5e,_5f,_60,_61){
+this.pageRealPath=_5b;
+this.pagePath=_5c;
+this.pageName=_5d;
+if(_5e==null){
 if(jetspeed.page.themeDefinitions!=null&&jetspeed.page.themeDefinitions.layouts!=null&&jetspeed.page.themeDefinitions.layouts.length>0&&jetspeed.page.themeDefinitions.layouts[0]!=null&&jetspeed.page.themeDefinitions.layouts[0].length==2){
-_5d=jetspeed.page.themeDefinitions.layouts[0][1];
+_5e=jetspeed.page.themeDefinitions.layouts[0][1];
 }
 }
-this.layoutName=_5d;
-this.pageTitle=_5e;
-this.pageShortTitle=_5f;
-this.pageEditorWidget=_60;
+this.layoutName=_5e;
+this.pageTitle=_5f;
+this.pageShortTitle=_60;
+this.pageEditorWidget=_61;
 };
 jetspeed.widget.AddPageContentManager.prototype={getContent:function(){
 if(this.pageRealPath!=null&&this.pageName!=null){
-var _61="?action=updatepage&method=add&path="+escape(this.pageRealPath)+"&name="+escape(this.pageName);
+var _62="?action=updatepage&method=add&path="+escape(this.pageRealPath)+"&name="+escape(this.pageName);
 if(this.layoutName!=null){
-_61+="&defaultLayout="+escape(this.layoutName);
+_62+="&defaultLayout="+escape(this.layoutName);
 }
 if(this.pageTitle!=null){
-_61+="&title="+escape(this.pageTitle);
+_62+="&title="+escape(this.pageTitle);
 }
 if(this.pageShortTitle!=null){
-_61+="&short-title="+escape(this.pageShortTitle);
+_62+="&short-title="+escape(this.pageShortTitle);
 }
-var _62=jetspeed.url.basePortalUrl()+jetspeed.url.path.AJAX_API+_61;
-var _63=new jetspeed.om.Id("updatepage-add-page",{});
-var _64={};
-_64.url=_62;
-_64.mimetype="text/xml";
-jetspeed.url.retrieveContent(_64,this,_63,jetspeed.debugContentDumpIds);
-}
-},notifySuccess:function(_65,_66,_67){
-if(jetspeed.url.checkAjaxApiResponse(_66,_65,true,"updatepage-add-page")){
-var _68=jetspeed.page.makePageUrl(this.pagePath);
-if(!dojo.string.endsWith(_68,".psml",true)){
-_68+=".psml";
+var _63=jetspeed.url.basePortalUrl()+jetspeed.url.path.AJAX_API+_62;
+var _64=new jetspeed.om.Id("updatepage-add-page",{});
+var _65={};
+_65.url=_63;
+_65.mimetype="text/xml";
+jetspeed.url.retrieveContent(_65,this,_64,jetspeed.debugContentDumpIds);
+}
+},notifySuccess:function(_66,_67,_68){
+if(jetspeed.url.checkAjaxApiResponse(_67,_66,true,"updatepage-add-page")){
+var _69=jetspeed.page.makePageUrl(this.pagePath);
+if(!dojo.string.endsWith(_69,".psml",true)){
+_69+=".psml";
 }
-_68+="?"+jetspeed.id.PAGE_EDITOR_INITIATE_PARAMETER+"=true";
-window.location.href=_68;
+_69+="?"+jetspeed.id.PAGE_EDITOR_INITIATE_PARAMETER+"=true";
+window.location.href=_69;
 }
-},notifyFailure:function(_69,_6a,_6b,_6c){
-dojo.raise("AddPageContentManager notifyFailure url: "+_6b+" type: "+_69+jetspeed.url.formatBindError(_6a));
+},notifyFailure:function(_6a,_6b,_6c,_6d){
+dojo.raise("AddPageContentManager notifyFailure url: "+_6c+" type: "+_6a+jetspeed.url.formatBindError(_6b));
 }};
-jetspeed.widget.MoveLayoutContentManager=function(_6d,_6e,_6f,row,_71){
-this.layoutId=_6d;
-this.moveToLayoutId=_6e;
-this.column=_6f;
+jetspeed.widget.MoveLayoutContentManager=function(_6e,_6f,_70,row,_72){
+this.layoutId=_6e;
+this.moveToLayoutId=_6f;
+this.column=_70;
 this.row=row;
-this.pageEditorWidget=_71;
+this.pageEditorWidget=_72;
 };
 jetspeed.widget.MoveLayoutContentManager.prototype={getContent:function(){
 if(this.layoutId!=null&&this.moveToLayoutId!=null){
-var _72="?action=moveabs&id="+this.layoutId+"&layoutid="+this.moveToLayoutId;
+var _73="?action=moveabs&id="+this.layoutId+"&layoutid="+this.moveToLayoutId;
 if(this.column!=null){
-_72+="&col="+this.column;
+_73+="&col="+this.column;
 }
 if(this.row!=null){
-_72+="&row="+this.row;
+_73+="&row="+this.row;
 }
-var _73=jetspeed.url.basePortalUrl()+jetspeed.url.path.AJAX_API+jetspeed.page.getPath()+_72;
-var _74=new jetspeed.om.Id("moveabs-layout",this.layoutId);
-var _75={};
-_75.url=_73;
-_75.mimetype="text/xml";
-jetspeed.url.retrieveContent(_75,this,_74,jetspeed.debugContentDumpIds);
+var _74=jetspeed.url.basePortalUrl()+jetspeed.url.path.AJAX_API+jetspeed.page.getPath()+_73;
+var _75=new jetspeed.om.Id("moveabs-layout",this.layoutId);
+var _76={};
+_76.url=_74;
+_76.mimetype="text/xml";
+jetspeed.url.retrieveContent(_76,this,_75,jetspeed.debugContentDumpIds);
 }
-},notifySuccess:function(_76,_77,_78){
-if(jetspeed.url.checkAjaxApiResponse(_77,_76,true,"moveabs-layout")){
+},notifySuccess:function(_77,_78,_79){
+if(jetspeed.url.checkAjaxApiResponse(_78,_77,true,"moveabs-layout")){
 }
-},notifyFailure:function(_79,_7a,_7b,_7c){
-dojo.raise("MoveLayoutContentManager notifyFailure url: "+_7b+" type: "+_79+jetspeed.url.formatBindError(_7a));
+},notifyFailure:function(_7a,_7b,_7c,_7d){
+dojo.raise("MoveLayoutContentManager notifyFailure url: "+_7c+" type: "+_7a+jetspeed.url.formatBindError(_7b));
 }};
-jetspeed.widget.UpdateFragmentContentManager=function(_7d,_7e,_7f,_80){
-this.layoutId=_7d;
-this.layoutName=_7e;
-this.layoutSizes=_7f;
-this.pageEditorWidget=_80;
+jetspeed.widget.UpdateFragmentContentManager=function(_7e,_7f,_80,_81){
+this.layoutId=_7e;
+this.layoutName=_7f;
+this.layoutSizes=_80;
+this.pageEditorWidget=_81;
 };
 jetspeed.widget.UpdateFragmentContentManager.prototype={getContent:function(){
 if(this.layoutId!=null){
-var _81="?action=updatepage&method=update-fragment&id="+this.layoutId;
+var _82="?action=updatepage&method=update-fragment&id="+this.layoutId;
 if(this.layoutName!=null){
-_81+="&layout="+escape(this.layoutName);
+_82+="&layout="+escape(this.layoutName);
 }
 if(this.layoutSizes!=null){
-_81+="&sizes="+escape(this.layoutSizes);
+_82+="&sizes="+escape(this.layoutSizes);
 }
-var _82=jetspeed.url.basePortalUrl()+jetspeed.url.path.AJAX_API+jetspeed.page.getPath()+_81;
-var _83=new jetspeed.om.Id("updatepage-update-fragment",{});
-var _84={};
-_84.url=_82;
-_84.mimetype="text/xml";
-jetspeed.url.retrieveContent(_84,this,_83,jetspeed.debugContentDumpIds);
+var _83=jetspeed.url.basePortalUrl()+jetspeed.url.path.AJAX_API+jetspeed.page.getPath()+_82;
+var _84=new jetspeed.om.Id("updatepage-update-fragment",{});
+var _85={};
+_85.url=_83;
+_85.mimetype="text/xml";
+jetspeed.url.retrieveContent(_85,this,_84,jetspeed.debugContentDumpIds);
 }
-},notifySuccess:function(_85,_86,_87){
-if(jetspeed.url.checkAjaxApiResponse(_86,_85,true,"updatepage-update-fragment")){
+},notifySuccess:function(_86,_87,_88){
+if(jetspeed.url.checkAjaxApiResponse(_87,_86,true,"updatepage-update-fragment")){
 this.pageEditorWidget.refreshPage();
 }
-},notifyFailure:function(_88,_89,_8a,_8b){
-dojo.raise("UpdateFragmentContentManager notifyFailure url: "+_8a+" type: "+_88+jetspeed.url.formatBindError(_89));
+},notifyFailure:function(_89,_8a,_8b,_8c){
+dojo.raise("UpdateFragmentContentManager notifyFailure url: "+_8b+" type: "+_89+jetspeed.url.formatBindError(_8a));
 }};
-jetspeed.widget.UpdatePageInfoContentManager=function(_8c,_8d,_8e){
-this.refreshPage=((_8e.editorInitiatedFromDesktop)?true:false);
-this.layoutDecorator=_8c;
-this.portletDecorator=_8d;
-this.pageEditorWidget=_8e;
+jetspeed.widget.UpdatePageInfoContentManager=function(_8d,_8e,_8f){
+this.refreshPage=((_8f.editorInitiatedFromDesktop)?true:false);
+this.layoutDecorator=_8d;
+this.portletDecorator=_8e;
+this.pageEditorWidget=_8f;
 };
 jetspeed.widget.UpdatePageInfoContentManager.prototype={getContent:function(){
-var _8f="?action=updatepage&method=info";
+var _90="?action=updatepage&method=info";
 if(this.layoutDecorator!=null){
-_8f+="&layout-decorator="+escape(this.layoutDecorator);
+_90+="&layout-decorator="+escape(this.layoutDecorator);
 }
 if(this.portletDecorator!=null){
-_8f+="&portlet-decorator="+escape(this.portletDecorator);
+_90+="&portlet-decorator="+escape(this.portletDecorator);
 }
-var _90=jetspeed.url.basePortalUrl()+jetspeed.url.path.AJAX_API+jetspeed.page.getPath()+_8f;
-var _91=new jetspeed.om.Id("updatepage-info",{});
-var _92={};
-_92.url=_90;
-_92.mimetype="text/xml";
-jetspeed.url.retrieveContent(_92,this,_91,jetspeed.debugContentDumpIds);
-},notifySuccess:function(_93,_94,_95){
-if(jetspeed.url.checkAjaxApiResponse(_94,_93,true,"updatepage-info")){
+var _91=jetspeed.url.basePortalUrl()+jetspeed.url.path.AJAX_API+jetspeed.page.getPath()+_90;
+var _92=new jetspeed.om.Id("updatepage-info",{});
+var _93={};
+_93.url=_91;
+_93.mimetype="text/xml";
+jetspeed.url.retrieveContent(_93,this,_92,jetspeed.debugContentDumpIds);
+},notifySuccess:function(_94,_95,_96){
+if(jetspeed.url.checkAjaxApiResponse(_95,_94,true,"updatepage-info")){
 if(this.refreshPage){
 this.pageEditorWidget.refreshPage();
 }
 }
-},notifyFailure:function(_96,_97,_98,_99){
-dojo.raise("UpdatePageInfoContentManager notifyFailure url: "+_98+" type: "+_96+jetspeed.url.formatBindError(_97));
+},notifyFailure:function(_97,_98,_99,_9a){
+dojo.raise("UpdatePageInfoContentManager notifyFailure url: "+_99+" type: "+_97+jetspeed.url.formatBindError(_98));
 }};
-jetspeed.widget.RemovePortletContentManager=function(_9a,_9b){
-this.portletEntityId=_9a;
-this.pageEditorWidget=_9b;
+jetspeed.widget.RemovePortletContentManager=function(_9b,_9c){
+this.portletEntityId=_9b;
+this.pageEditorWidget=_9c;
 };
 jetspeed.widget.RemovePortletContentManager.prototype={getContent:function(){
 if(this.portletEntityId!=null){
-var _9c="?action=remove&id="+this.portletEntityId;
-var _9d=jetspeed.url.basePortalUrl()+jetspeed.url.path.AJAX_API+jetspeed.page.getPath()+_9c;
-var _9e=new jetspeed.om.Id("removeportlet",{});
-var _9f={};
-_9f.url=_9d;
-_9f.mimetype="text/xml";
-jetspeed.url.retrieveContent(_9f,this,_9e,jetspeed.debugContentDumpIds);
+var _9d="?action=remove&id="+this.portletEntityId;
+var _9e=jetspeed.url.basePortalUrl()+jetspeed.url.path.AJAX_API+jetspeed.page.getPath()+_9d;
+var _9f=new jetspeed.om.Id("removeportlet",{});
+var _a0={};
+_a0.url=_9e;
+_a0.mimetype="text/xml";
+jetspeed.url.retrieveContent(_a0,this,_9f,jetspeed.debugContentDumpIds);
 }
-},notifySuccess:function(_a0,_a1,_a2){
-if(jetspeed.url.checkAjaxApiResponse(_a1,_a0,true,"removeportlet")){
+},notifySuccess:function(_a1,_a2,_a3){
+if(jetspeed.url.checkAjaxApiResponse(_a2,_a1,true,"removeportlet")){
 this.pageEditorWidget.refreshPage();
 }
-},notifyFailure:function(_a3,_a4,_a5,_a6){
-dojo.raise("RemovePortletContentManager notifyFailure url: "+_a5+" type: "+_a3+jetspeed.url.formatBindError(_a4));
+},notifyFailure:function(_a4,_a5,_a6,_a7){
+dojo.raise("RemovePortletContentManager notifyFailure url: "+_a6+" type: "+_a4+jetspeed.url.formatBindError(_a5));
 }};
-jetspeed.widget.RemoveLayoutContentManager=function(_a7,_a8){
-this.layoutId=_a7;
-this.pageEditorWidget=_a8;
+jetspeed.widget.RemoveLayoutContentManager=function(_a8,_a9){
+this.layoutId=_a8;
+this.pageEditorWidget=_a9;
 };
 jetspeed.widget.RemoveLayoutContentManager.prototype={getContent:function(){
 if(this.layoutId!=null){
-var _a9="?action=updatepage&method=remove-fragment&id="+this.layoutId;
-var _aa=jetspeed.url.basePortalUrl()+jetspeed.url.path.AJAX_API+jetspeed.page.getPath()+_a9;
-var _ab=new jetspeed.om.Id("removelayout",{});
-var _ac={};
-_ac.url=_aa;
-_ac.mimetype="text/xml";
-jetspeed.url.retrieveContent(_ac,this,_ab,jetspeed.debugContentDumpIds);
+var _aa="?action=updatepage&method=remove-fragment&id="+this.layoutId;
+var _ab=jetspeed.url.basePortalUrl()+jetspeed.url.path.AJAX_API+jetspeed.page.getPath()+_aa;
+var _ac=new jetspeed.om.Id("removelayout",{});
+var _ad={};
+_ad.url=_ab;
+_ad.mimetype="text/xml";
+jetspeed.url.retrieveContent(_ad,this,_ac,jetspeed.debugContentDumpIds);
 }
-},notifySuccess:function(_ad,_ae,_af){
-if(jetspeed.url.checkAjaxApiResponse(_ae,_ad,true,"removeportlet")){
+},notifySuccess:function(_ae,_af,_b0){
+if(jetspeed.url.checkAjaxApiResponse(_af,_ae,true,"removeportlet")){
 this.pageEditorWidget.refreshPage();
 }
-},notifyFailure:function(_b0,_b1,_b2,_b3){
-dojo.raise("RemoveLayoutContentManager notifyFailure url: "+_b2+" type: "+_b0+jetspeed.url.formatBindError(_b1));
+},notifyFailure:function(_b1,_b2,_b3,_b4){
+dojo.raise("RemoveLayoutContentManager notifyFailure url: "+_b3+" type: "+_b1+jetspeed.url.formatBindError(_b2));
 }};
-jetspeed.widget.AddLayoutContentManager=function(_b4,_b5,_b6){
-this.parentLayoutId=_b4;
-this.layoutName=_b5;
-this.pageEditorWidget=_b6;
+jetspeed.widget.AddLayoutContentManager=function(_b5,_b6,_b7){
+this.parentLayoutId=_b5;
+this.layoutName=_b6;
+this.pageEditorWidget=_b7;
 };
 jetspeed.widget.AddLayoutContentManager.prototype={getContent:function(){
 if(this.parentLayoutId!=null){
-var _b7="?action=updatepage&method=add-fragment&layoutid="+this.parentLayoutId+(this.layoutName!=null?("&layout="+this.layoutName):"");
-var _b8=jetspeed.url.basePortalUrl()+jetspeed.url.path.AJAX_API+jetspeed.page.getPath()+_b7;
-var _b9=new jetspeed.om.Id("addlayout",{});
-var _ba={};
-_ba.url=_b8;
-_ba.mimetype="text/xml";
-jetspeed.url.retrieveContent(_ba,this,_b9,jetspeed.debugContentDumpIds);
+var _b8="?action=updatepage&method=add-fragment&layoutid="+this.parentLayoutId+(this.layoutName!=null?("&layout="+this.layoutName):"");
+var _b9=jetspeed.url.basePortalUrl()+jetspeed.url.path.AJAX_API+jetspeed.page.getPath()+_b8;
+var _ba=new jetspeed.om.Id("addlayout",{});
+var _bb={};
+_bb.url=_b9;
+_bb.mimetype="text/xml";
+jetspeed.url.retrieveContent(_bb,this,_ba,jetspeed.debugContentDumpIds);
 }
-},notifySuccess:function(_bb,_bc,_bd){
-if(jetspeed.url.checkAjaxApiResponse(_bc,_bb,true,"addportlet")){
+},notifySuccess:function(_bc,_bd,_be){
+if(jetspeed.url.checkAjaxApiResponse(_bd,_bc,true,"addportlet")){
 this.pageEditorWidget.refreshPage();
 }
-},notifyFailure:function(_be,_bf,_c0,_c1){
-dojo.raise("AddLayoutContentManager notifyFailure url: "+_c0+" type: "+_be+jetspeed.url.formatBindError(_bf));
+},notifyFailure:function(_bf,_c0,_c1,_c2){
+dojo.raise("AddLayoutContentManager notifyFailure url: "+_c1+" type: "+_bf+jetspeed.url.formatBindError(_c0));
 }};
 

Modified: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.src.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.src.js?view=diff&rev=553983&r1=553982&r2=553983
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.src.js (original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PageEditor.src.js Fri Jul
 6 11:29:59 2007
@@ -209,7 +209,24 @@
             this.show();
             this.editPageSyncPortletActions();
         },
-
+        editPageDestroy: function()
+        {
+            if ( this.pageEditorWidgets != null )
+            {
+                for ( var i = 0 ; i < this.pageEditorWidgets.length ; i++ )
+                {
+                    this.pageEditorWidgets[i].destroy();
+                    this.pageEditorWidgets[i] = null;
+                }
+            }
+            if ( this.deletePortletDialog != null )
+                this.deletePortletDialog.destroy();
+            if ( this.deleteLayoutDialog != null )
+                this.deleteLayoutDialog.destroy();
+            if ( this.columnSizeDialog != null )
+                this.columnSizeDialog.destroy();
+            this.destroy();
+        },
 
         // methods
 



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message