Author: theute
Date: 2011-08-18 16:04:11 -0400 (Thu, 18 Aug 2011)
New Revision: 7179
Modified:
epp/portal/branches/EPP_5_2_Branch/
epp/portal/branches/EPP_5_2_Branch/component/
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/container/UIContainer.gtmpl
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/container/UIToolbarContainer.gtmpl
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortalComposer.gtmpl
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainerForm.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
Log:
JBEPP-1089 Show Status of Finish button is not correct in Edition page when don't do
anything on this page
Property changes on: epp/portal/branches/EPP_5_2_Branch
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795:5868
/portal/branches/branch-GTNPORTAL-1592:4894
/portal/branches/branch-GTNPORTAL-1643:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731:5622,5668
/portal/branches/branch-GTNPORTAL-1745:5765
/portal/branches/branch-GTNPORTAL-1822:5943,5952
/portal/branches/branch-GTNPORTAL-1832:6030,6063
/portal/branches/branch-GTNPORTAL-1872:6400,6551
/portal/branches/branch-GTNPORTAL-1921:6603
/portal/branches/branch-GTNPORTAL-1963:6904,6915-6916
/portal/branches/decoupled-webos:6214-6243
/portal/branches/gatein-management:6920-6958
/portal/branches/global-portlet-metadata:6298-6384
/portal/branches/site-describability:6171-6235
/portal/trunk:4891,5744,5822,5943,6168,6196,6201-6203,6205-6206,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042,7061
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795:5868
/portal/branches/branch-GTNPORTAL-1537:4700
/portal/branches/branch-GTNPORTAL-1592:4894
/portal/branches/branch-GTNPORTAL-1643:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731:5622,5668
/portal/branches/branch-GTNPORTAL-1745:5765
/portal/branches/branch-GTNPORTAL-1822:5943,5952
/portal/branches/branch-GTNPORTAL-1832:6030,6063
/portal/branches/branch-GTNPORTAL-1872:6400,6551
/portal/branches/branch-GTNPORTAL-1921:6603
/portal/branches/branch-GTNPORTAL-1963:6904,6915-6916
/portal/branches/decoupled-webos:6214-6243
/portal/branches/gatein-management:6920-6958
/portal/branches/global-portlet-metadata:6298-6384
/portal/branches/site-describability:6171-6235
/portal/trunk:4891,5744,5822,5943,6168,6196,6201-6203,6205-6206,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042,7061
Property changes on: epp/portal/branches/EPP_5_2_Branch/component
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component:5868
/portal/branches/branch-GTNPORTAL-1592/component:4894
/portal/branches/branch-GTNPORTAL-1643/component:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component:5622,5668
/portal/branches/branch-GTNPORTAL-1745/component:5765
/portal/branches/branch-GTNPORTAL-1822/component:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component:6603
/portal/branches/branch-GTNPORTAL-1963/component:6904,6915-6916
/portal/trunk/component:4891,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6292,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042,7061
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component:5868
/portal/branches/branch-GTNPORTAL-1537/component:4700
/portal/branches/branch-GTNPORTAL-1592/component:4894
/portal/branches/branch-GTNPORTAL-1643/component:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component:5622,5668
/portal/branches/branch-GTNPORTAL-1745/component:5765
/portal/branches/branch-GTNPORTAL-1822/component:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component:6603
/portal/branches/branch-GTNPORTAL-1963/component:6904,6915-6916
/portal/trunk/component:4891,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6292,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042,7061
Modified:
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js 2011-08-18
19:06:18 UTC (rev 7178)
+++
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js 2011-08-18
20:04:11 UTC (rev 7179)
@@ -196,6 +196,38 @@
DragDrop.dropCallback = function(dndEvent) {
this.origDragObjectStyle.setProperties(dndEvent.dragObject.style, false) ;
+
+ var hasChanged = true;
+ //When press esc key, we want to cancel the dragdrop, but now it only works with FF
+ if (dndEvent.backupMouseEvent && dndEvent.backupMouseEvent.keyCode == 27
&& eXo.core.Browser.isFF()) {
+ hasChanged = false;
+ }
+ //When dragObject is outside
+ var targetElement = dndEvent.foundTargetObject;
+ if(!targetElement || targetElement.foundIndex == null) {
+ hasChanged = false;
+ }
+ //When dragobject is next to preview object (position is not changed)
+ if(!dndEvent.dragObject.isAddingNewly) {
+ var DOMUtil = eXo.core.DOMUtil;
+ var previewClass = "DragAndDropPreview";
+ var previewTagName = "div";
+ var previewSibling = dndEvent.dragObject;
+ if (dndEvent.dragObject.parentNode.tagName.toLowerCase() == "td") {
+ previewSibling = dndEvent.dragObject.parentNode;
+ previewClass = "PreviewTDBlock";
+ previewTagName = "td";
+ }
+ var tempObj = DOMUtil.findNextElementByTagName(previewSibling, previewTagName);
+ if (tempObj != null && tempObj.className == previewClass) {
+ hasChanged = false;
+ } else {
+ tempObj = DOMUtil.findPreviousElementByTagName(previewSibling, previewTagName);
+ if (tempObj != null && tempObj.className == previewClass) {
+ hasChanged = false;
+ }
+ }
+ }
if(dndEvent.foundTargetObject != null || (dndEvent.backupMouseEvent &&
dndEvent.backupMouseEvent.keyCode != 27)) {
eXo.portal.PortalDragDrop.doDropCallback(dndEvent) ;
@@ -219,7 +251,9 @@
previewBlock = previewTD = null;
eXo.portal.isInDragging = false;
- eXo.portal.UIPortal.changeComposerSaveButton();
+ if (hasChanged) {
+ eXo.portal.UIPortal.changeComposerSaveButton();
+ }
// fix bug WEBOS-196
dndEvent.dragObject.style.width = "auto" ;
};
Modified:
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl 2011-08-18
19:06:18 UTC (rev 7178)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl 2011-08-18
20:04:11 UTC (rev 7179)
@@ -263,7 +263,7 @@
%>
<div class="PortletIcon $portletIcon"><%=hasPermission
? title : _ctx.appRes("UIPortlet.label.protectedContent")%></div>
<%if(hasPermission) {%>
- <a
href="<%=uicomponent.event("EditPortlet","$uicomponent.id")%>;eXo.portal.UIPortal.changeComposerSaveButton()"
class="EditPortletPropertiesIcon"
title="<%=_ctx.appRes("UIPortlet.tooltip.editPortlet");%>"></a>
+ <a
href="<%=uicomponent.event("EditPortlet","$uicomponent.id")%>;"
class="EditPortletPropertiesIcon"
title="<%=_ctx.appRes("UIPortlet.tooltip.editPortlet");%>"></a>
<a
href="<%=uicomponent.event("DeleteComponent","$uicomponent.id")%>"
class="DeletePortletIcon"
title="<%=_ctx.appRes("UIPortlet.tooltip.deletePortlet");%>"></a>
<%}%>
</div>
Modified:
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/container/UIContainer.gtmpl
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/container/UIContainer.gtmpl 2011-08-18
19:06:18 UTC (rev 7178)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/container/UIContainer.gtmpl 2011-08-18
20:04:11 UTC (rev 7179)
@@ -42,9 +42,9 @@
<div class="VIEW-CONTAINER VIEW-BLOCK">
<%} %>
<%if(hasPermission) {%>
- <div class="UIRowContainer <%=(portalMode !=
UIPortalApplication.NORMAL_MODE && uicomponent.getChildren().size() == 0) ?
"EmptyContainer" : ""%>">
- <div>
- <%uicomponent.renderChildren();%>
+ <div>
+ <div class="UIRowContainer <%=(portalMode !=
UIPortalApplication.NORMAL_MODE && uicomponent.getChildren().size() == 0) ?
"EmptyContainer" : ""%>">
+ <%uicomponent.renderChildren();%>
</div>
</div>
<%} else out.print("<div
class='ProtectedContent'>"+_ctx.appRes("UIPortlet.label.protectedContent")+"</div>");%>
@@ -72,7 +72,7 @@
%>
<div class="ContainerIcon"><%=hasPermission ? strTitle :
_ctx.appRes("UIPortlet.label.protectedContent")%></div>
<%if(hasPermission) {%>
- <a
href="<%=uicomponent.event("EditContainer")%>;eXo.portal.UIPortal.changeComposerSaveButton()"
class="EditContainerIcon"
title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
+ <a
href="<%=uicomponent.event("EditContainer")%>"
class="EditContainerIcon"
title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
<a
href="<%=uicomponent.event("DeleteComponent")%>"
class="DeleteContainerIcon"
title="<%=_ctx.appRes("UIContainer.tooltip.closeContainer")%>"><span></span></a>
<%}%>
Modified:
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl 2011-08-18
19:06:18 UTC (rev 7178)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl 2011-08-18
20:04:11 UTC (rev 7179)
@@ -73,7 +73,7 @@
%>
<div class="ContainerIcon
DefaultContainer16x16Icon"><%=hasPermission ? strTitle :
_ctx.appRes("UIPortlet.label.protectedContent")%></div>
<%if(hasPermission) {%>
- <a
href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>;eXo.portal.UIPortal.changeComposerSaveButton()"
class="EditContainerIcon"
title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
+ <a
href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>"
class="EditContainerIcon"
title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
<a
href="<%=uicomponent.event("DeleteComponent","$uicomponent.id")%>"
class="DeleteContainerIcon"
title="<%=_ctx.appRes("UIContainer.tooltip.closeContainer")%>"><span></span></a>
<%}%>
</div>
Modified:
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl 2011-08-18
19:06:18 UTC (rev 7178)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl 2011-08-18
20:04:11 UTC (rev 7179)
@@ -73,7 +73,7 @@
%>
<div class="ContainerIcon
DefaultContainer16x16Icon"><%=hasPermission ? strTitle :
_ctx.appRes("UIPortlet.label.protectedContent")%></div>
<%if(hasPermission) {%>
- <a
href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>;eXo.portal.UIPortal.changeComposerSaveButton()"
class="EditContainerIcon"
title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
+ <a
href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>"
class="EditContainerIcon"
title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
<a
href="<%=uicomponent.event("DeleteComponent","$uicomponent.id")%>"
class="DeleteContainerIcon"
title="<%=_ctx.appRes("UIContainer.tooltip.closeContainer")%>"><span></span></a>
<%}%>
</div>
Modified:
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/container/UIToolbarContainer.gtmpl
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/container/UIToolbarContainer.gtmpl 2011-08-18
19:06:18 UTC (rev 7178)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/container/UIToolbarContainer.gtmpl 2011-08-18
20:04:11 UTC (rev 7179)
@@ -70,7 +70,7 @@
%>
<div class="ContainerIcon
DefaultContainer16x16Icon"><%=hasPermission ? strTitle :
_ctx.appRes("UIPortlet.label.protectedContent")%></div>
<%if(hasPermission) {%>
- <a
href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>;eXo.portal.UIPortal.changeComposerSaveButton()"
class="EditContainerIcon"
title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
+ <a
href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>;"
class="EditContainerIcon"
title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
<a
href="<%=uicomponent.event("DeleteComponent","$uicomponent.id")%>"
class="DeleteContainerIcon"
title="<%=_ctx.appRes("UIContainer.tooltip.closeContainer")%>"><span></span></a>
<%}%>
</div>
Modified:
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortalComposer.gtmpl
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortalComposer.gtmpl 2011-08-18
19:06:18 UTC (rev 7178)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortalComposer.gtmpl 2011-08-18
20:04:11 UTC (rev 7179)
@@ -52,7 +52,7 @@
<tr>
<td>
- <div onclick="<%= uicomponent.event("ViewProperties")
%>;eXo.portal.UIPortal.changeComposerSaveButton()" class="ActionButton
SimpleStyle1">
+ <div onclick="<%= uicomponent.event("ViewProperties")
%>;" class="ActionButton SimpleStyle1">
<div class="ButtonLeft">
<div class="ButtonRight">
<div class="ButtonMiddle">
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java 2011-08-18
19:06:18 UTC (rev 7178)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java 2011-08-18
20:04:11 UTC (rev 7179)
@@ -397,6 +397,7 @@
}
PortalRequestContext pcontext =
(PortalRequestContext)event.getRequestContext();
+
pcontext.getJavascriptManager().addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
pcontext.addUIComponentToUpdateByAjax(uiMaskWorkspace);
UIPortalApplication uiPortalApp =
uiPortlet.getAncestorOfType(UIPortalApplication.class);
UIWorkingWorkspace uiWorkingWS =
uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainerForm.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainerForm.java 2011-08-18
19:06:18 UTC (rev 7178)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainerForm.java 2011-08-18
20:04:11 UTC (rev 7179)
@@ -143,6 +143,7 @@
UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
UIWorkingWorkspace uiWorkingWS =
uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
+
pcontext.getJavascriptManager().addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
pcontext.ignoreAJAXUpdateOnPortlets(true);
Util.showComponentLayoutMode(UIContainer.class);
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java 2011-08-18
19:06:18 UTC (rev 7178)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java 2011-08-18
20:04:11 UTC (rev 7179)
@@ -281,7 +281,7 @@
PortalRequestContext pcontext = Util.getPortalRequestContext();
UIMaskWorkspace uiMaskWS =
uiPortalApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
uiMaskWS.setUIComponent(null);
- uiMaskWS.setShow(false);
+ uiMaskWS.setShow(false);
pcontext.addUIComponentToUpdateByAjax(uiMaskWS);
UIPage uiPage = uiPageForm.getUIPage();
@@ -355,6 +355,7 @@
try{
PortalDataMapper.toUIPage(uiPage, page);
+
pcontext.getJavascriptManager().addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
} catch(NoSuchDataException de){
uiPortalApp.addMessage(new
ApplicationMessage("UIPageForm.msg.notExistOrDeleted", null,
ApplicationMessage.ERROR));
UIPortalComposer uiPortalComposer =
(UIPortalComposer)uiPortalApp.findComponentById("UIPageEditor");
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2011-08-18
19:06:18 UTC (rev 7178)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2011-08-18
20:04:11 UTC (rev 7179)
@@ -348,7 +348,12 @@
UIMaskWorkspace uiMaskWorkspace = uiForm.getParent();
uiMaskWorkspace.setUIComponent(null);
- event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWorkspace);
+ WebuiRequestContext rContext = event.getRequestContext();
+ if (!uiForm.getId().equals("CreatePortal"))
+ {
+
rContext.getJavascriptManager().addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
+ }
+ rContext.addUIComponentToUpdateByAjax(uiMaskWorkspace);
}
}