Author: tan_pham_dinh
Date: 2010-03-11 05:44:04 -0500 (Thu, 11 Mar 2010)
New Revision: 2159
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIGroupNavigationManagement.java
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UISiteManagement.gtmpl
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java
Log:
GTNPORTAL-866: Show wrong in UI Trees in Edit Navigation when add/edit node(page)
Remove 'delete portal' button with default portal in SiteManagement
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIGroupNavigationManagement.java
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIGroupNavigationManagement.java 2010-03-11
10:33:17 UTC (rev 2158)
+++
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIGroupNavigationManagement.java 2010-03-11
10:44:04 UTC (rev 2159)
@@ -25,6 +25,7 @@
import org.exoplatform.portal.config.UserACL;
import org.exoplatform.portal.config.UserPortalConfigService;
import org.exoplatform.portal.config.model.PageNavigation;
+import org.exoplatform.portal.config.model.PageNode;
import org.exoplatform.portal.webui.navigation.UIAddGroupNavigation;
import org.exoplatform.portal.webui.navigation.UINavigationManagement;
import org.exoplatform.portal.webui.navigation.UINavigationNodeSelector;
@@ -356,6 +357,12 @@
ArrayList<PageNavigation> navis = new ArrayList<PageNavigation>();
navis.add(selectedNavigation);
selector.initNavigations(navis);
+
+ if (uiPageNodeForm.getSelectedParent() instanceof PageNode)
+ {
+ PageNode selectedParent = (PageNode)uiPageNodeForm.getSelectedParent();
+ selector.selectPageNodeByUri(selectedParent.getUri());
+ }
//selector.removeChild(UIRightClickPopupMenu.class);
uiNavigationPopup.setUIComponent(pageManager);
uiNavigationPopup.setWindowSize(400, 400);
Modified:
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UISiteManagement.gtmpl
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UISiteManagement.gtmpl 2010-03-11
10:33:17 UTC (rev 2158)
+++
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UISiteManagement.gtmpl 2010-03-11
10:44:04 UTC (rev 2159)
@@ -3,10 +3,13 @@
import org.exoplatform.webui.form.UIForm;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
+ import org.exoplatform.portal.config.UserPortalConfigService;
String[] actions = uicomponent.getActions();
uicomponent.loadPortalConfigs();
def rcontext = _ctx.getRequestContext();
+ def userPortalConfigService =
uicomponent.getApplicationComponent(UserPortalConfigService.class);
+ def defaultPortalName = userPortalConfigService.getDefaultPortal();
%>
<div class="UISiteManagement UIManagement"
id="<%=uicomponent.getId();%>">
<%
@@ -23,7 +26,10 @@
<a href="<%=uicomponent.event("EditPortalLayout",
portalConfig.getName());%>"
class="EditLayoutIcon"><%=_ctx.appRes("UISiteManagement.label.editLayout")%></a>
<a href="<%=uicomponent.event("EditNavigation",
portalConfig.getName());%>"
class="EditNavIcon"><%=_ctx.appRes("UISiteManagement.label.editNav")%></a>
<a
href="javascript:ajaxGet(eXo.env.server.createPortalURL('UIPortal',
'EditPortalProperties', true,
[{name:'portalName',value:'<%=portalConfig.getName()%>'}]))"
class="EditNavIcon"><%=_ctx.appRes("UISiteManagement.label.editPortalProp")%></a>
- <a href="<%=uicomponent.url("DeletePortal",
portalConfig.getName());%>"
class="DeleteIcon"><%=_ctx.appRes("UISiteManagement.label.deletePortal")%></a>
+
+ <% if(defaultPortalName != null &&
!defaultPortalName.equals(portalConfig.getName())) {%>
+ <a href="<%=uicomponent.url("DeletePortal",
portalConfig.getName());%>"
class="DeleteIcon"><%=_ctx.appRes("UISiteManagement.label.deletePortal")%></a>
+ <% } %>
</td>
</tr>
</table>
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java 2010-03-11
10:33:17 UTC (rev 2158)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java 2010-03-11
10:44:04 UTC (rev 2159)
@@ -539,7 +539,7 @@
uiNodeForm.setOwnerType(uiNodeSelector.getSelectedNavigation().getOwnerType());
uiNodeForm.setValues(selectedNode);
- uiNodeForm.setSelectedParent(obj);
+ uiNodeForm.setSelectedParent(selectedNode);
uiManagementPopup.setWindowSize(800, 500);
event.getRequestContext().addUIComponentToUpdateByAjax(uiManagementPopup.getParent());
}
Show replies by date