Author: nscavell
Date: 2012-01-23 21:52:00 -0500 (Mon, 23 Jan 2012)
New Revision: 8308
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UINavigationNodeSelector.java
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
Log:
JBEPP-1402: possible to clone or copy system nodes in edit navigation
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UINavigationNodeSelector.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UINavigationNodeSelector.java 2012-01-24
02:48:02 UTC (rev 8307)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UINavigationNodeSelector.java 2012-01-24
02:52:00 UTC (rev 8308)
@@ -595,6 +595,12 @@
String nodeID = context.getRequestParameter(UIComponent.OBJECTID);
TreeNode node = uiNodeSelector.findNode(nodeID);
+ if (Visibility.SYSTEM.equals(node.getVisibility()))
+ {
+ UIApplication uiApp = context.getUIApplication();
+ uiApp.addMessage(new
ApplicationMessage("UINavigationNodeSelector.msg.systemnode-copyclone", null));
+ return;
+ }
try
{
node = rebaseNode(node, Scope.ALL, uiNodeSelector);
@@ -662,7 +668,9 @@
UINavigationNodeSelector uiNodeSelector =
event.getSource().getAncestorOfType(UINavigationNodeSelector.class);
TreeNode currNode = uiNodeSelector.getCopyNode();
String nodeID =
event.getRequestContext().getRequestParameter(UIComponent.OBJECTID);
- if (currNode != null && currNode.getId().equals(nodeID))
+ if (currNode == null)
+ return;
+ else if (currNode.getId().equals(nodeID))
currNode.setCloneNode(true);
if (currNode.getI18nizedLabels() == null)
Modified:
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2012-01-24
02:48:02 UTC (rev 8307)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2012-01-24
02:52:00 UTC (rev 8308)
@@ -1063,6 +1063,7 @@
###############################################################################
# org.exoplatform.portal.webui.navigation.UINavigationNodeSelector #
###############################################################################
+UINavigationNodeSelector.msg.systemnode-copyclone=Cannot copy or clone a system node.
UINavigationNodeSelector.msg.systemnode-delete=Cannot delete a system node
UINavigationNodeSelector.msg.systemnode-move=Cannot cut a system node
UINavigationNodeSelector.msg.copiedNode.deleted=Bufferred node has been deleted
Modified:
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties 2012-01-24
02:48:02 UTC (rev 8307)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties 2012-01-24
02:52:00 UTC (rev 8308)
@@ -1001,6 +1001,7 @@
###############################################################################
# org.exoplatform.portal.webui.navigation.UINavigationNodeSelector #
###############################################################################
+UINavigationNodeSelector.msg.systemnode-copyclone=Không thể sao chép hoặc nhân bản một
node hệ thống
UINavigationNodeSelector.msg.systemnode-delete=Không thể xóa một node hệ thống
UINavigationNodeSelector.msg.systemnode-move=Không thể di chuyển một node hệ thống
Show replies by date