Author: phuong_vu
Date: 2011-12-01 05:33:02 -0500 (Thu, 01 Dec 2011)
New Revision: 8184
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
Log:
GTNPORTAL-2307 Alert message if save UIPortalForm as soon as finish page or portal
editing
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
===================================================================
---
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js 2011-12-01
10:03:22 UTC (rev 8183)
+++
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js 2011-12-01
10:33:02 UTC (rev 8184)
@@ -373,8 +373,12 @@
if(eXo.portal.hasEditted == false) {
var uiWorkingWS = document.getElementById("UIWorkingWorkspace");
var portalComposer = eXo.core.DOMUtil.findFirstDescendantByClass(uiWorkingWS,
"div", "UIPortalComposer");
+ if (!portalComposer) return;
+
var saveButton = eXo.core.DOMUtil.findFirstDescendantByClass(portalComposer,
"a", "SaveButton");
- if(saveButton) eXo.core.DOMUtil.replaceClass(saveButton, "SaveButton",
"EdittedSaveButton");
+ if (saveButton) {
+ eXo.core.DOMUtil.replaceClass(saveButton, "SaveButton",
"EdittedSaveButton");
+ }
ajaxAsyncGetRequest(eXo.env.server.createPortalURL(portalComposer.id,
"ChangeEdittedState", true));
}
};
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2011-12-01
10:03:22 UTC (rev 8183)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2011-12-01
10:33:02 UTC (rev 8184)
@@ -358,7 +358,7 @@
UIMaskWorkspace uiMaskWorkspace = uiForm.getParent();
uiMaskWorkspace.setUIComponent(null);
WebuiRequestContext rContext = event.getRequestContext();
- if (!uiForm.getId().equals("CreatePortal"))
+ if (!uiForm.getId().equals("CreatePortal") &&
uiPortalApp.getModeState() != UIPortalApplication.NORMAL_MODE)
{
rContext.getJavascriptManager().addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
}
Show replies by date