Author: theute
Date: 2011-08-18 16:46:44 -0400 (Thu, 18 Aug 2011)
New Revision: 7181
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:
Rolling back for now
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-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
+ /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
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-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
+ /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
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
20:12:46 UTC (rev 7180)
+++
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js 2011-08-18
20:46:44 UTC (rev 7181)
@@ -196,38 +196,6 @@
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) ;
@@ -251,9 +219,7 @@
previewBlock = previewTD = null;
eXo.portal.isInDragging = false;
- if (hasChanged) {
- eXo.portal.UIPortal.changeComposerSaveButton();
- }
+ 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
20:12:46 UTC (rev 7180)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl 2011-08-18
20:46:44 UTC (rev 7181)
@@ -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")%>;"
class="EditPortletPropertiesIcon"
title="<%=_ctx.appRes("UIPortlet.tooltip.editPortlet");%>"></a>
+ <a
href="<%=uicomponent.event("EditPortlet","$uicomponent.id")%>;eXo.portal.UIPortal.changeComposerSaveButton()"
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
20:12:46 UTC (rev 7180)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/container/UIContainer.gtmpl 2011-08-18
20:46:44 UTC (rev 7181)
@@ -42,9 +42,9 @@
<div class="VIEW-CONTAINER VIEW-BLOCK">
<%} %>
<%if(hasPermission) {%>
- <div>
- <div class="UIRowContainer <%=(portalMode !=
UIPortalApplication.NORMAL_MODE && uicomponent.getChildren().size() == 0) ?
"EmptyContainer" : ""%>">
- <%uicomponent.renderChildren();%>
+ <div class="UIRowContainer <%=(portalMode !=
UIPortalApplication.NORMAL_MODE && uicomponent.getChildren().size() == 0) ?
"EmptyContainer" : ""%>">
+ <div>
+ <%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")%>"
class="EditContainerIcon"
title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
+ <a
href="<%=uicomponent.event("EditContainer")%>;eXo.portal.UIPortal.changeComposerSaveButton()"
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
20:12:46 UTC (rev 7180)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl 2011-08-18
20:46:44 UTC (rev 7181)
@@ -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")%>"
class="EditContainerIcon"
title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
+ <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("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
20:12:46 UTC (rev 7180)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl 2011-08-18
20:46:44 UTC (rev 7181)
@@ -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")%>"
class="EditContainerIcon"
title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
+ <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("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
20:12:46 UTC (rev 7180)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/container/UIToolbarContainer.gtmpl 2011-08-18
20:46:44 UTC (rev 7181)
@@ -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")%>;"
class="EditContainerIcon"
title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
+ <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("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
20:12:46 UTC (rev 7180)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortalComposer.gtmpl 2011-08-18
20:46:44 UTC (rev 7181)
@@ -52,7 +52,7 @@
<tr>
<td>
- <div onclick="<%= uicomponent.event("ViewProperties")
%>;" class="ActionButton SimpleStyle1">
+ <div onclick="<%= uicomponent.event("ViewProperties")
%>;eXo.portal.UIPortal.changeComposerSaveButton()" 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
20:12:46 UTC (rev 7180)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java 2011-08-18
20:46:44 UTC (rev 7181)
@@ -397,7 +397,6 @@
}
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
20:12:46 UTC (rev 7180)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainerForm.java 2011-08-18
20:46:44 UTC (rev 7181)
@@ -143,7 +143,6 @@
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
20:12:46 UTC (rev 7180)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java 2011-08-18
20:46:44 UTC (rev 7181)
@@ -35,8 +35,6 @@
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.webui.application.UIPortlet;
import org.exoplatform.portal.webui.container.UIContainer;
-import org.exoplatform.portal.webui.portal.UIPortal;
-import org.exoplatform.portal.webui.portal.UIPortalComponent;
import org.exoplatform.portal.webui.portal.UIPortalComposer;
import org.exoplatform.portal.webui.util.PortalDataMapper;
import org.exoplatform.portal.webui.util.Util;
@@ -85,8 +83,6 @@
protected UIFormInputSet uiPermissionSetting;
protected UIFormSelectBox groupIdSelectBox = null;
-
- protected UIFormSelectBox portalIdSelectBox = null;
protected UIFormStringInput ownerIdInput = null;
@@ -103,6 +99,14 @@
List<SelectItemOption<String>> ownerTypes = new
ArrayList<SelectItemOption<String>>();
ownerTypes.add(new SelectItemOption<String>(PortalConfig.USER_TYPE));
+ UserPortalConfig userPortalConfig =
+ configService.getUserPortalConfig(pcontext.getPortalOwner(),
pcontext.getRemoteUser());
+ ExoContainer container = ExoContainerContext.getCurrentContainer();
+ UserACL acl = (UserACL)container.getComponentInstanceOfType(UserACL.class);
+ if (acl.hasEditPermission(userPortalConfig.getPortalConfig()))
+ {
+ ownerTypes.add(new SelectItemOption<String>(PortalConfig.PORTAL_TYPE));
+ }
ownerIdInput = new UIFormStringInput(OWNER_ID, OWNER_ID, null);
ownerIdInput.setEditable(false).setValue(pcontext.getRemoteUser());
@@ -142,27 +146,6 @@
//TODO: This following line is fixed for bug PORTAL-2127
uiListPermissionSelector.getChild(UIFormPopupWindow.class).setId("UIPageFormPopupGroupMembershipSelector");
- List<String> portals = configService.getAllPortalNames();
- Collections.sort(portals);
- List<SelectItemOption<String>> portalsItem = new
ArrayList<SelectItemOption<String>>();
- ExoContainer container = ExoContainerContext.getCurrentContainer();
- UserACL acl = (UserACL)container.getComponentInstanceOfType(UserACL.class);
- for (String p : portals)
- {
- UserPortalConfig userPortalConfig = configService.getUserPortalConfig(p,
pcontext.getRemoteUser());
- if (acl.hasEditPermission(userPortalConfig.getPortalConfig()))
- {
- portalsItem.add(new SelectItemOption<String>(p));
- }
- }
- if(portalsItem.size() > 0)
- {
- ownerTypes.add(new SelectItemOption<String>(PortalConfig.PORTAL_TYPE));
- portalIdSelectBox = new UIFormSelectBox(OWNER_ID, OWNER_ID, portalsItem);
- portalIdSelectBox.setOnChange("ChangeOwnerId");
- portalIdSelectBox.setParent(uiSettingSet);
- }
-
List<String> groups =
configService.getMakableNavigations(pcontext.getRemoteUser(), true);
if (groups.size() > 0)
{
@@ -177,7 +160,6 @@
groupIdSelectBox.setOnChange("ChangeOwnerId");
groupIdSelectBox.setParent(uiSettingSet);
}
-
setActions(new String[]{"Save", "Close"});
}
@@ -219,6 +201,11 @@
uiTemplate.setValue(uiPage.getFactoryId());
}
+ public void setEditPermission(String per)
+ {
+
+ }
+
public void invokeSetBindingBean(Object bean) throws Exception
{
String ownerType = getUIFormSelectBox("ownerType").getValue();
@@ -281,7 +268,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();
@@ -300,43 +287,6 @@
applications.add(PortalDataMapper.buildModelObject(uiPortlet));
}
- if (Page.DESKTOP_PAGE.equals(uiPage.getFactoryId()) &&
!Page.DESKTOP_PAGE.equals(page.getFactoryId()))
- {
- page.setShowMaxWindow(false);
- uiPage.getChildren().clear();
- page.setChildren(applications);
-
- PortalDataMapper.toUIPage(uiPage, page);
- if (page.getChildren() == null)
- page.setChildren(new ArrayList<ModelObject>());
-
- pcontext.setFullRender(true);
- UIWorkingWorkspace uiWorkingWS =
uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
- pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
-
pcontext.getJavascriptManager().addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
- return;
- }
-
- if (Page.DESKTOP_PAGE.equals(page.getFactoryId()))
- {
- uiPage.getChildren().clear();
- page.setChildren(applications);
-
- PortalDataMapper.toUIPage(uiPage, page);
- if (page.getChildren() == null)
- page.setChildren(new ArrayList<ModelObject>());
-
- UIPortalToolPanel toolPanel = Util.getUIPortalToolPanel();
- toolPanel.setShowMaskLayer(true);
- pcontext.setFullRender(true);
- UIWorkingWorkspace uiWorkingWS =
uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
- pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
-
pcontext.getJavascriptManager().addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
- DataStorage dataService =
uiPageForm.getApplicationComponent(DataStorage.class);
- dataService.save(page);
- return;
- }
-
List<UIComponent> uiChildren = uiPage.getChildren();
if (uiChildren == null)
{
@@ -355,7 +305,6 @@
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");
@@ -366,6 +315,7 @@
}
uiPage.setStorageId(storageId);
+ // if(page.getTemplate() == null) page.setTemplate(uiPage.getTemplate()) ;
if (page.getChildren() == null)
page.setChildren(new ArrayList<ModelObject>());
}
@@ -411,28 +361,12 @@
if (PortalConfig.PORTAL_TYPE.equals(ownerType))
{
list.remove(2);
- list.add(2, uiForm.portalIdSelectBox);
- String portalIdSelected = uiForm.portalIdSelectBox.getValue();
- String[] accessPermissions = {};
- String editPermission = "";
-
- UserPortalConfigService service =
uiForm.getApplicationComponent(UserPortalConfigService.class);
- UserPortalConfig userConfig =
service.getUserPortalConfig(portalIdSelected, prContext.getRemoteUser());
- if (userConfig != null)
- {
- PortalConfig config = userConfig.getPortalConfig();
- accessPermissions = config.getAccessPermissions();
- editPermission = config.getEditPermission();
- }
- else
- {
- UIPortal uiPortal =
Util.getUIPortalApplication().getCachedUIPortal(ownerType, portalIdSelected);
- accessPermissions = uiPortal.getAccessPermissions();
- editPermission = uiPortal.getEditPermission();
- }
-
-
uiForm.findFirstComponentOfType(UIListPermissionSelector.class).setValue(accessPermissions);
-
uiForm.findFirstComponentOfType(UIPermissionSelector.class).setValue(editPermission);
+ list.add(2, uiForm.ownerIdInput);
+ uiForm.ownerIdInput.setValue(prContext.getPortalOwner());
+ uiForm.findFirstComponentOfType(UIListPermissionSelector.class).setValue(
+ Util.getUIPortal().getAccessPermissions());
+ uiForm.findFirstComponentOfType(UIPermissionSelector.class).setValue(
+ Util.getUIPortal().getEditPermission());
}
else
{
@@ -456,33 +390,13 @@
public void execute(Event<UIPageForm> event) throws Exception
{
UIPageForm uiForm = event.getSource();
- UIFormSelectBox uiSelectBox = uiForm.getUIFormSelectBox(OWNER_TYPE);
- String ownerType = uiSelectBox.getValue();
- if(PortalConfig.PORTAL_TYPE.equals(ownerType)) {
- String[] accessPermissions = {};
- String editPermission = "";
- String portalIdSelected = uiForm.portalIdSelectBox.getValue();
- UserPortalConfigService service =
uiForm.getApplicationComponent(UserPortalConfigService.class);
- UserPortalConfig userConfig = service.getUserPortalConfig(portalIdSelected,
Util.getPortalRequestContext().getRemoteUser());
- if (userConfig != null)
- {
- PortalConfig config = userConfig.getPortalConfig();
- accessPermissions = config.getAccessPermissions();
- editPermission = config.getEditPermission();
-
uiForm.findFirstComponentOfType(UIListPermissionSelector.class).setValue(accessPermissions);
-
uiForm.findFirstComponentOfType(UIPermissionSelector.class).setValue(editPermission);
- }
- }
- else
- {
- String groupIdSelected = uiForm.groupIdSelectBox.getValue();
- groupIdSelected = groupIdSelected.startsWith("/") ? groupIdSelected
: "/" + groupIdSelected;
- String permission = "*:" + groupIdSelected;
- uiForm.findFirstComponentOfType(UIListPermissionSelector.class).setValue(new
String[]{permission});
- UserACL userACL = uiForm.getApplicationComponent(UserACL.class);
- permission = userACL.getMakableMT() + ":" + groupIdSelected;
-
uiForm.findFirstComponentOfType(UIPermissionSelector.class).setValue(permission);
- }
+ String groupIdSelected = uiForm.groupIdSelectBox.getValue();
+ groupIdSelected = groupIdSelected.startsWith("/") ? groupIdSelected :
"/" + groupIdSelected;
+ String permission = "*:" + groupIdSelected;
+ uiForm.findFirstComponentOfType(UIListPermissionSelector.class).setValue(new
String[]{permission});
+ UserACL userACL = uiForm.getApplicationComponent(UserACL.class);
+ permission = userACL.getMakableMT() + ":" + groupIdSelected;
+
uiForm.findFirstComponentOfType(UIPermissionSelector.class).setValue(permission);
event.getRequestContext().addUIComponentToUpdateByAjax(uiForm.getParent());
}
}
@@ -492,6 +406,13 @@
public void execute(Event<UIGroupMembershipSelector> event) throws Exception
{
UIPageForm uiForm = event.getSource().getAncestorOfType(UIPageForm.class);
+ /*if
(!uiForm.getUIStringInput(OWNER_TYPE).getValue().equals(PortalConfig.GROUP_TYPE))
+ return;
+ String editPer =
uiForm.findFirstComponentOfType(UIPermissionSelector.class).getValue();
+ if (editPer == null || editPer.length() < 1)
+ return;
+ String group = editPer.substring(editPer.indexOf("/") + 1);
+ uiForm.ownerIdInput.setValue(group);*/
event.getRequestContext().addUIComponentToUpdateByAjax(uiForm.getParent());
}
}
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
20:12:46 UTC (rev 7180)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2011-08-18
20:46:44 UTC (rev 7181)
@@ -348,12 +348,7 @@
UIMaskWorkspace uiMaskWorkspace = uiForm.getParent();
uiMaskWorkspace.setUIComponent(null);
- WebuiRequestContext rContext = event.getRequestContext();
- if (!uiForm.getId().equals("CreatePortal"))
- {
-
rContext.getJavascriptManager().addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
- }
- rContext.addUIComponentToUpdateByAjax(uiMaskWorkspace);
+ event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWorkspace);
}
}