Author: hfnukal
Date: 2011-03-22 09:03:31 -0400 (Tue, 22 Mar 2011)
New Revision: 6110
Modified:
epp/portal/branches/EPP_5_1_Branch/
epp/portal/branches/EPP_5_1_Branch/packaging/profiles.xml
epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java
Log:
JBEPP-568:
Property changes on: epp/portal/branches/EPP_5_1_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-1700:5348,5445
/portal/branches/branch-GTNPORTAL-1731:5668
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795:5868
/portal/branches/branch-GTNPORTAL-1592:4894
/portal/branches/branch-GTNPORTAL-1643:5002
/portal/branches/branch-GTNPORTAL-1700:5348,5445
/portal/branches/branch-GTNPORTAL-1731:5668
Modified: epp/portal/branches/EPP_5_1_Branch/packaging/profiles.xml
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/packaging/profiles.xml 2011-03-22 10:37:23 UTC (rev
6109)
+++ epp/portal/branches/EPP_5_1_Branch/packaging/profiles.xml 2011-03-22 13:03:31 UTC (rev
6110)
@@ -29,7 +29,7 @@
ex: On Windows 'c:/AS'
ex: On Linux '/home/user/AS'
-->
-
<exo.projects.directory.dependencies>REPLACE_WITH_YOUR_OWN_DIRECTORY</exo.projects.directory.dependencies>
+
<exo.projects.directory.dependencies>/opt/AS</exo.projects.directory.dependencies>
<!--
If you want that the server is deployed always at the same place (not in
packaging/pkg/target/<server> dir)
Uncomment and Replace with the directory you prefer
Modified:
epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java
===================================================================
---
epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java 2011-03-22
10:37:23 UTC (rev 6109)
+++
epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java 2011-03-22
13:03:31 UTC (rev 6110)
@@ -26,7 +26,6 @@
import org.exoplatform.portal.config.model.PageNode;
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.mop.Visibility;
-import org.exoplatform.portal.webui.navigation.ParentChildPair;
import org.exoplatform.portal.webui.page.UIPage;
import org.exoplatform.portal.webui.page.UIPageNodeForm;
import org.exoplatform.portal.webui.portal.UIPortalComposer;
@@ -448,7 +447,6 @@
uiToolPanel.setWorkingComponent(UIPage.class, null);
UIPage uiPage = (UIPage)uiToolPanel.getUIComponent();
- WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
if(selectPage.getTitle() == null)
selectPage.setTitle(selectedPageNode.getLabel());
@@ -536,46 +534,48 @@
{
public void execute(Event<UIRightClickPopupMenu> event) throws Exception
{
- String uri = event.getRequestContext().getRequestParameter(UIComponent.OBJECTID);
- WebuiRequestContext pcontext = event.getRequestContext();
- UIApplication uiApp = pcontext.getUIApplication();
- UINavigationNodeSelector uiNodeSelector =
event.getSource().getAncestorOfType(UINavigationNodeSelector.class);
- UINavigationManagement uiManagement = uiNodeSelector.getParent();
- Class<?>[] childrenToRender = new
Class<?>[]{UINavigationNodeSelector.class};
- uiManagement.setRenderedChildrenOfTypes(childrenToRender);
- event.getRequestContext().addUIComponentToUpdateByAjax(uiManagement);
+ String uri =
event.getRequestContext().getRequestParameter(UIComponent.OBJECTID);
+ WebuiRequestContext pcontext = event.getRequestContext();
+ UIApplication uiApp = pcontext.getUIApplication();
+ UINavigationNodeSelector uiNodeSelector =
event.getSource().getAncestorOfType(UINavigationNodeSelector.class);
+ UINavigationManagement uiManagement = uiNodeSelector.getParent();
+ Class<?>[] childrenToRender = new
Class<?>[]{UINavigationNodeSelector.class};
+ uiManagement.setRenderedChildrenOfTypes(childrenToRender);
+ event.getRequestContext().addUIComponentToUpdateByAjax(uiManagement);
- PageNavigation nav = uiNodeSelector.getEdittedNavigation();
- if (nav == null)
- {
- return;
- }
-
- PageNode[] pageNodes = PageNavigationUtils.searchPageNodesByUri(nav, uri);
- if (pageNodes == null)
- {
- return;
- }
-
- for (PageNode pageNode : pageNodes) {
- if(pageNode != null && pageNode.isSystem()) {
- uiApp.addMessage(new
ApplicationMessage("UINavigationNodeSelector.msg.systemnode-move", null));
- return;
- }
- }
-
- TreeNodeData selectedNode = new TreeNodeData(nav, pageNodes[0], pageNodes[1]);
- selectedNode.setDeleteNode(false);
- uiNodeSelector.setCopyNode(selectedNode);
- event.getSource().setActions(
- new String[]{"AddNode", "EditPageNode",
"EditSelectedNode", "CopyNode", "CloneNode",
"CutNode",
- "PasteNode", "DeleteNode", "MoveUp",
"MoveDown"});
+ PageNavigation nav = uiNodeSelector.getEdittedNavigation();
+ if (nav == null)
+ {
+ return;
+ }
- if (uiNodeSelector.getCopyNode() == null)
- {
- return;
- }
- uiNodeSelector.getCopyNode().setDeleteNode(true);
+ ParentChildPair parentChildPair =
PageNavigationUtils.searchParentChildPairByUri(nav, uri);
+ if (parentChildPair == null)
+ {
+ return;
+ }
+
+ PageNode parentNode = parentChildPair.getParentNode();
+ PageNode childNode = parentChildPair.getChildNode();
+
+ if (childNode != null && childNode.isSystem())
+ {
+ uiApp.addMessage(new
ApplicationMessage("UINavigationNodeSelector.msg.systemnode-move", null));
+ return;
+ }
+
+ TreeNodeData selectedNode = new TreeNodeData(nav, parentNode, childNode);
+ selectedNode.setDeleteNode(false);
+ uiNodeSelector.setCopyNode(selectedNode);
+ event.getSource().setActions(
+ new String[]{"AddNode", "EditPageNode",
"EditSelectedNode", "CopyNode", "CloneNode",
"CutNode",
+ "PasteNode", "DeleteNode", "MoveUp",
"MoveDown"});
+
+ if (uiNodeSelector.getCopyNode() == null)
+ {
+ return;
+ }
+ uiNodeSelector.getCopyNode().setDeleteNode(true);
}
}