Author: truong.le
Date: 2009-11-09 03:56:38 -0500 (Mon, 09 Nov 2009)
New Revision: 524
Added:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationRegistryEditMode.java
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/GroupPortalConfigListener.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationOrganizer.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationRegistryPortlet.java
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/ApplicationRegistryPortlet_ar.xml
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/ApplicationRegistryPortlet_en.properties
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/ApplicationRegistryPortlet_en.xml
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/ApplicationRegistryPortlet_ru.properties
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/ApplicationRegistryPortlet_uk.properties
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/ApplicationRegistryPortlet_vi.xml
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/applicationregistry/webui/component/UIApplicationOrganizer.gtmpl
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/applicationregistry/webui/component/UIApplicationRegistryPortlet.gtmpl
Log:
GTNPORTAL-149: the Auto Import function should be optional by portlet preference
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/GroupPortalConfigListener.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/GroupPortalConfigListener.java 2009-11-09
08:50:57 UTC (rev 523)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/GroupPortalConfigListener.java 2009-11-09
08:56:38 UTC (rev 524)
@@ -30,6 +30,7 @@
import org.exoplatform.services.jcr.ext.registry.RegistryService;
import org.exoplatform.services.organization.Group;
import org.exoplatform.services.organization.GroupEventListener;
+import org.exoplatform.services.organization.GroupHandler;
import org.exoplatform.services.organization.OrganizationService;
/**
@@ -45,11 +46,11 @@
ExoContainer container = ExoContainerContext.getCurrentContainer();
UserPortalConfigService portalConfigService =
(UserPortalConfigService)container.getComponentInstanceOfType(UserPortalConfigService.class);
+ String groupId = group.getId().trim();
// Remove all descendant navigations
removeGroupNavigation(group, portalConfigService);
-
- String groupId = group.getId().trim();
+
portalConfigService.removeUserPortalConfig(PortalConfig.GROUP_TYPE, groupId);
}
@@ -142,7 +143,11 @@
private void removeGroupNavigation(Group group, UserPortalConfigService
portalConfigService) throws Exception
{
- Collection<String> descendantGroups = getDescendantGroups(group);
+ ExoContainer container = ExoContainerContext.getCurrentContainer();
+ OrganizationService orgService =
+
(OrganizationService)container.getComponentInstanceOfType(OrganizationService.class);
+ GroupHandler groupHandler = orgService.getGroupHandler();
+ Collection<String> descendantGroups = getDescendantGroups(group,
groupHandler);
PageNavigation navigation = null;
for (String childGroup : descendantGroups)
{
@@ -152,17 +157,14 @@
}
}
- private Collection<String> getDescendantGroups(Group group) throws Exception
+ private Collection<String> getDescendantGroups(Group group, GroupHandler
groupHandler) throws Exception
{
- ExoContainer container = ExoContainerContext.getCurrentContainer();
- OrganizationService orgService =
-
(OrganizationService)container.getComponentInstanceOfType(OrganizationService.class);
- Collection<Group> groupCollection =
orgService.getGroupHandler().findGroups(group);
+ Collection<Group> groupCollection = groupHandler.findGroups(group);
Collection<String> col = new ArrayList<String>();
for (Group childGroup : groupCollection)
{
col.add(childGroup.getId());
- col.addAll(getDescendantGroups(childGroup));
+ col.addAll(getDescendantGroups(childGroup, groupHandler));
}
return col;
}
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationOrganizer.java
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationOrganizer.java 2009-11-09
08:50:57 UTC (rev 523)
+++
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationOrganizer.java 2009-11-09
08:56:38 UTC (rev 524)
@@ -27,6 +27,7 @@
import org.exoplatform.portal.webui.portal.UIPortal;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
+import org.exoplatform.webui.application.portlet.PortletRequestContext;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIApplication;
@@ -37,6 +38,8 @@
import java.util.List;
+import javax.portlet.PortletPreferences;
+
/**
* Created by The eXo Platform SAS
* Author : Pham Thanh Tung
@@ -193,6 +196,13 @@
}
}
}
+
+ public boolean isShowImport()
+ {
+ PortletRequestContext pcontext =
(PortletRequestContext)WebuiRequestContext.getCurrentInstance();
+ PortletPreferences pref = pcontext.getRequest().getPreferences();
+ return Boolean.parseBoolean(pref.getValue("showImport",
"true"));
+ }
public void processRender(WebuiRequestContext context) throws Exception
{
Added:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationRegistryEditMode.java
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationRegistryEditMode.java
(rev 0)
+++
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationRegistryEditMode.java 2009-11-09
08:56:38 UTC (rev 524)
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.exoplatform.applicationregistry.webui.component;
+
+import org.exoplatform.portal.webui.util.Util;
+import org.exoplatform.portal.webui.workspace.UIPortalApplication;
+import org.exoplatform.webui.application.WebuiRequestContext;
+import org.exoplatform.webui.application.portlet.PortletRequestContext;
+import org.exoplatform.webui.config.annotation.ComponentConfig;
+import org.exoplatform.webui.config.annotation.EventConfig;
+import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
+import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.EventListener;
+import org.exoplatform.webui.form.UIForm;
+import org.exoplatform.webui.form.UIFormCheckBoxInput;
+
+import javax.portlet.PortletMode;
+import javax.portlet.PortletPreferences;
+
+/**
+ * @author <a href="mailto:truong.le@exoplatform.com">Truong
Le</a>
+ * @version $Id$
+ *
+ */
+@ComponentConfig(lifecycle = UIFormLifecycle.class,
+ template = "system:/groovy/webui/form/UIFormWithTitle.gtmpl",
+ events = {@EventConfig(listeners =
UIApplicationRegistryEditMode.SaveActionListener.class)}
+ )
+
+public class UIApplicationRegistryEditMode extends UIForm
+{
+ public static final String SHOW_IMPORT = "showImport";
+
+ public UIApplicationRegistryEditMode() throws Exception
+ {
+ PortletRequestContext pcontext =
(PortletRequestContext)WebuiRequestContext.getCurrentInstance();
+ PortletPreferences pref = pcontext.getRequest().getPreferences();
+ boolean isShowImport =
Boolean.parseBoolean(pref.getValue(SHOW_IMPORT,"true"));
+ addUIFormInput(new UIFormCheckBoxInput<Boolean>(SHOW_IMPORT, SHOW_IMPORT,
isShowImport).setValue(isShowImport));
+ }
+
+ static public class SaveActionListener extends
EventListener<UIApplicationRegistryEditMode>
+ {
+
+ @Override
+ public void execute(Event<UIApplicationRegistryEditMode> event) throws
Exception
+ {
+ // TODO Auto-generated method stub
+ UIApplicationRegistryEditMode uiForm = event.getSource();
+ boolean isShowImport = uiForm.getUIFormCheckBoxInput(SHOW_IMPORT).isChecked();
+ PortletRequestContext pcontext =
(PortletRequestContext)WebuiRequestContext.getCurrentInstance();
+ PortletPreferences pref = pcontext.getRequest().getPreferences();
+ pref.setValue(SHOW_IMPORT, Boolean.toString(isShowImport));
+ pref.store();
+ UIPortalApplication portalApp = Util.getUIPortalApplication();
+ if (portalApp.getModeState() == UIPortalApplication.NORMAL_MODE)
+ pcontext.setApplicationMode(PortletMode.VIEW);
+
+ }
+
+ }
+}
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationRegistryPortlet.java
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationRegistryPortlet.java 2009-11-09
08:50:57 UTC (rev 523)
+++
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationRegistryPortlet.java 2009-11-09
08:56:38 UTC (rev 524)
@@ -36,6 +36,7 @@
addChild(UIApplicationOrganizer.class, null, null).setRendered(true);
addChild(UIPortletManagement.class, null, null).setRendered(false);
addChild(UIGadgetManagement.class, null, null).setRendered(false);
+ addChild(UIApplicationRegistryEditMode.class,null,null).setRendered(false);
}
@Override
Modified:
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/ApplicationRegistryPortlet_ar.xml
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/ApplicationRegistryPortlet_ar.xml 2009-11-09
08:50:57 UTC (rev 523)
+++
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/ApplicationRegistryPortlet_ar.xml 2009-11-09
08:56:38 UTC (rev 524)
@@ -63,7 +63,7 @@
<UIOrganizer>
<label>
<addCategory>أضف فئة</addCategory>
- <autoImport>استيراد</autoImport>
+ <autoImport>إستيراد تطبيقات</autoImport>
<categories>الفئات</categories>
</label>
<title>
@@ -84,7 +84,18 @@
<applicationNoExist>.هذه الخدمة لم تعد في قاعدة
البيانات</applicationNoExist>
</msg>
</UIOrganizer>
+
<!--
+ ##org.exoplatform.applicationregistry.webui.component.UIApplicationRegistryEditMode
+ -->
+ <UIApplicationRegistryEditMode>
+ <title>Import Applications</title>
+ <label>
+ <showImport>Change Show Import</showImport>
+ </label>
+ </UIApplicationRegistryEditMode>
+
+ <!--
##org.exoplatform.applicationregistry.webui.component.UIApplicationInfo
-->
<UIPermissionForm>
Modified:
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/ApplicationRegistryPortlet_en.properties
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/ApplicationRegistryPortlet_en.properties 2009-11-09
08:50:57 UTC (rev 523)
+++
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/ApplicationRegistryPortlet_en.properties 2009-11-09
08:56:38 UTC (rev 524)
@@ -31,7 +31,7 @@
## org.exoplatform.applicationregistry.webui.component.UIApplicationOrganizer
UIOrganizer.label.addCategory=Add Category
-UIOrganizer.label.autoImport=Auto Import
+UIOrganizer.label.autoImport=Import Applications
UIOrganizer.label.categories=Categories
UIOrganizer.title.editCategory=Edit Category
UIOrganizer.title.addApplication=Add application to category
@@ -47,6 +47,9 @@
UIOrganizer.msg.categoryNoExist=This category is no longer in database.
UIOrganizer.msg.applicationNoExist=This application is no longer in database.
+## org.exoplatform.applicationregistry.webui.component.UIApplicationRegistryEditMode
+UIApplicationRegistryEditMode.title=Import Applications
+UIApplicationRegistryEditMode.label.showImport=Change Show Import
##org.exoplatform.applicationregistry.webui.component.UIApplicationInfo
UIPermissionForm.label.UIListPermissionSelector=
Modified:
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/ApplicationRegistryPortlet_en.xml
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/ApplicationRegistryPortlet_en.xml 2009-11-09
08:50:57 UTC (rev 523)
+++
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/ApplicationRegistryPortlet_en.xml 2009-11-09
08:56:38 UTC (rev 524)
@@ -63,7 +63,7 @@
<UIOrganizer>
<label>
<addCategory>Add Category</addCategory>
- <autoImport>Auto Import</autoImport>
+ <autoImport>Import Applications</autoImport>
<categories>Categories</categories>
</label>
<title>
@@ -84,7 +84,18 @@
<applicationNoExist>This application is no longer in
database.</applicationNoExist>
</msg>
</UIOrganizer>
+
<!--
+ ##org.exoplatform.applicationregistry.webui.component.UIApplicationRegistryEditMode
+ -->
+ <UIApplicationRegistryEditMode>
+ <title>Import Applications</title>
+ <label>
+ <showImport>Change Show Import</showImport>
+ </label>
+ </UIApplicationRegistryEditMode>
+
+ <!--
##org.exoplatform.applicationregistry.webui.component.UIApplicationInfo
-->
<UIPermissionForm>
Modified:
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/ApplicationRegistryPortlet_ru.properties
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/ApplicationRegistryPortlet_ru.properties 2009-11-09
08:50:57 UTC (rev 523)
+++
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/ApplicationRegistryPortlet_ru.properties 2009-11-09
08:56:38 UTC (rev 524)
@@ -31,7 +31,7 @@
## org.exoplatform.applicationregistry.webui.component.UIApplicationOrganizer
UIOrganizer.label.addCategory=Добавить категорию
-UIOrganizer.label.autoImport=Автоматический импорт
+UIOrganizer.label.autoImport=\u0418\u043C\u043F\u043E\u0440\u0442
\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0439
UIOrganizer.label.categories=Категории
UIOrganizer.title.editCategory=Изменить категорию
UIOrganizer.title.addApplication=Добавить приложение в категорию
@@ -47,6 +47,10 @@
UIOrganizer.msg.categoryNoExist=Эта категория удалена из базы данных.
UIOrganizer.msg.applicationNoExist=Это приложение удалено из базы данных.
+## org.exoplatform.applicationregistry.webui.component.UIApplicationRegistryEditMode
+UIApplicationRegistryEditMode.title=Import Applications
+UIApplicationRegistryEditMode.label.showImport=Change Show Import
+
##org.exoplatform.applicationregistry.webui.component.UIApplicationInfo
UIPermissionForm.label.UIListPermissionSelector=
Modified:
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/ApplicationRegistryPortlet_uk.properties
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/ApplicationRegistryPortlet_uk.properties 2009-11-09
08:50:57 UTC (rev 523)
+++
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/ApplicationRegistryPortlet_uk.properties 2009-11-09
08:56:38 UTC (rev 524)
@@ -31,7 +31,7 @@
## org.exoplatform.applicationregistry.webui.component.UIApplicationOrganizer
UIOrganizer.label.addCategory=Додати категорію
-UIOrganizer.label.autoImport=Авто імпорт
+UIOrganizer.label.autoImport=\u0406\u043C\u043F\u043E\u0440\u0442\u0443\u0439\u0442\u0435
\u0414\u043E\u0434\u0430\u0442\u043A\u0438
UIOrganizer.label.categories=Категорії
UIOrganizer.title.editCategory=Редагувати категорію
UIOrganizer.title.addApplication=Додати програму до категорії
@@ -47,6 +47,10 @@
UIOrganizer.msg.categoryNoExist=Ця категорія не існує у базі даних.
UIOrganizer.msg.applicationNoExist=Це застосування не існує у базі даних.
+## org.exoplatform.applicationregistry.webui.component.UIApplicationRegistryEditMode
+UIApplicationRegistryEditMode.title=Import Applications
+UIApplicationRegistryEditMode.label.showImport=Change Show Import
+
##org.exoplatform.applicationregistry.webui.component.UIApplicationInfo
UIPermissionForm.label.UIListPermissionSelector=
Modified:
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/ApplicationRegistryPortlet_vi.xml
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/ApplicationRegistryPortlet_vi.xml 2009-11-09
08:50:57 UTC (rev 523)
+++
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/ApplicationRegistryPortlet_vi.xml 2009-11-09
08:56:38 UTC (rev 524)
@@ -84,7 +84,18 @@
<applicationNoExist>Ứng dụng này không còn tồn tại trong cơ sở dữ
liệu.</applicationNoExist>
</msg>
</UIOrganizer>
+
<!--
+ ##org.exoplatform.applicationregistry.webui.component.UIApplicationRegistryEditMode
+ -->
+ <UIApplicationRegistryEditMode>
+ <title>Import Applications</title>
+ <label>
+ <showImport>Change Show Import</showImport>
+ </label>
+ </UIApplicationRegistryEditMode>
+
+ <!--
##org.exoplatform.applicationregistry.webui.component.UIApplicationInfo
-->
<UIPermissionForm>
Modified: portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml 2009-11-09 08:50:57
UTC (rev 523)
+++ portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml 2009-11-09 08:56:38
UTC (rev 524)
@@ -227,6 +227,10 @@
<mime-type>text/html</mime-type>
<portlet-mode>help</portlet-mode>
</supports>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>edit</portlet-mode>
+ </supports>
<supported-locale>en</supported-locale>
<resource-bundle>locale.portlet.exoadmin.ApplicationRegistryPortlet</resource-bundle>
@@ -234,8 +238,8 @@
<title>Application Registry Portlet</title>
<short-title>Registry</short-title>
<keywords>Administration</keywords>
- </portlet-info>
-
+ </portlet-info>
+
<security-role-ref>
<role-name>admin</role-name>
<role-link>admin</role-link>
Modified:
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/applicationregistry/webui/component/UIApplicationOrganizer.gtmpl
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/applicationregistry/webui/component/UIApplicationOrganizer.gtmpl 2009-11-09
08:50:57 UTC (rev 523)
+++
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/applicationregistry/webui/component/UIApplicationOrganizer.gtmpl 2009-11-09
08:56:38 UTC (rev 524)
@@ -7,7 +7,9 @@
<div class="UIOrganizerManagement" id="$uicomponent.id">
<div class="UIControlbar">
<div class="IconControl AddCategoryIcon" onclick="<%=
uicomponent.event("AddCategory")
%>"><%=_ctx.appRes("UIOrganizer.label.addCategory")%></div>
- <div class="IconControl ImportIcon" onclick="<%=
uicomponent.event("ImportAllApplications")
%>"><%=_ctx.appRes("UIOrganizer.label.autoImport")%></div>
+ <% if(uicomponent.isShowImport()) { %>
+ <div class="IconControl ImportIcon" onclick="<%=
uicomponent.event("ImportAllApplications")
%>"><%=_ctx.appRes("UIOrganizer.label.autoImport")%></div>
+ <% } %>
<div class="ClearBoth"><span></span></div>
</div>
Modified:
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/applicationregistry/webui/component/UIApplicationRegistryPortlet.gtmpl
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/applicationregistry/webui/component/UIApplicationRegistryPortlet.gtmpl 2009-11-09
08:50:57 UTC (rev 523)
+++
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/applicationregistry/webui/component/UIApplicationRegistryPortlet.gtmpl 2009-11-09
08:56:38 UTC (rev 524)
@@ -1,56 +1,70 @@
<%
+ import
org.exoplatform.applicationregistry.webui.component.UIApplicationRegistryEditMode;
+ import javax.portlet.PortletMode ;
+
String cssClass;
%>
<div class="UIApplicationRegistryPortlet"
id="$uicomponent.id">
- <div style="height:0px"><div style="width: 790px;"
><span style="display: none;"></span></div></div>
- <div
- style="!width: expression(this.previousSibling.offsetWidth - 22 + 'px');
min-width: 790px; padding: 10px;">
- <div class="UIToolbar">
- <div class="BlueLargeToolbar">
- <div class="ToolbarContainer">
- <div class="LeftToolbar">
- <div class="RightToolbar">
- <div class="MiddleToolbar">
-
- <div class="ManagementIconContainer">
- <%
- cssClass = "ItemButton";
- if(uicomponent.getChild(0).isRendered()) cssClass = "ItemButton
SelectItemButton";
- %>
- <div onclick="<%=uicomponent.event("ViewChild",
"UIApplicationOrganizer")%>" class="$cssClass">
- <div class="LablelIcon
OrganizeIcon"><span></span></div>
- <a href="javascript:void(0);"
class="ButtonLabel"><%=_ctx.appRes("UIToolbar.label.organize")%></a>
+ <%if( _ctx.getRequestContext().getApplicationMode() == PortletMode.VIEW) {%>
+ <div style="height:0px"><div style="width: 790px;"
><span style="display: none;"></span></div></div>
+ <div
+ style="!width: expression(this.previousSibling.offsetWidth - 22 + 'px');
min-width: 790px; padding: 10px;">
+ <div class="UIToolbar">
+ <div class="BlueLargeToolbar">
+ <div class="ToolbarContainer">
+ <div class="LeftToolbar">
+ <div class="RightToolbar">
+ <div class="MiddleToolbar">
+
+ <div class="ManagementIconContainer">
+ <%
+ cssClass = "ItemButton";
+ if(uicomponent.getChild(0).isRendered()) cssClass = "ItemButton
SelectItemButton";
+ %>
+ <div onclick="<%=uicomponent.event("ViewChild",
"UIApplicationOrganizer")%>" class="$cssClass">
+ <div class="LablelIcon
OrganizeIcon"><span></span></div>
+ <a href="javascript:void(0);"
class="ButtonLabel"><%=_ctx.appRes("UIToolbar.label.organize")%></a>
+ </div>
+ <div
class="HorizontalSeparator"><span></span></div>
+ <%
+ cssClass = "ItemButton";
+ if(uicomponent.getChild(1).isRendered()) cssClass = "ItemButton
SelectItemButton";
+ %>
+ <div onclick="<%=uicomponent.event("ViewChild",
"UIPortletManagement")%>" class="$cssClass">
+ <div class="LablelIcon
PorletIcon"><span></span></div>
+ <a href="javascript:void(0);"
class="ButtonLabel"><%=_ctx.appRes("UIToolbar.label.portlet")%></a>
+ </div>
+ <div
class="HorizontalSeparator"><span></span></div>
+ <%
+ cssClass = "ItemButton";
+ if(uicomponent.getChild(2).isRendered()) cssClass = "ItemButton
SelectItemButton";
+ %>
+ <div onclick="<%=uicomponent.event("ViewChild",
"UIGadgetManagement")%>" class="$cssClass">
+ <div class="LablelIcon
GadgetIcon"><span></span></div>
+ <a href="javascript:void(0)"
class="ButtonLabel"><%=_ctx.appRes("UIToolbar.label.gadget")%></a>
+ </div>
+ <div class="ClearLeft"><span></span></div>
</div>
- <div
class="HorizontalSeparator"><span></span></div>
- <%
- cssClass = "ItemButton";
- if(uicomponent.getChild(1).isRendered()) cssClass = "ItemButton
SelectItemButton";
- %>
- <div onclick="<%=uicomponent.event("ViewChild",
"UIPortletManagement")%>" class="$cssClass">
- <div class="LablelIcon
PorletIcon"><span></span></div>
- <a href="javascript:void(0);"
class="ButtonLabel"><%=_ctx.appRes("UIToolbar.label.portlet")%></a>
- </div>
- <div
class="HorizontalSeparator"><span></span></div>
- <%
- cssClass = "ItemButton";
- if(uicomponent.getChild(2).isRendered()) cssClass = "ItemButton
SelectItemButton";
- %>
- <div onclick="<%=uicomponent.event("ViewChild",
"UIGadgetManagement")%>" class="$cssClass">
- <div class="LablelIcon
GadgetIcon"><span></span></div>
- <a href="javascript:void(0)"
class="ButtonLabel"><%=_ctx.appRes("UIToolbar.label.gadget")%></a>
- </div>
- <div class="ClearLeft"><span></span></div>
+
</div>
-
</div>
</div>
</div>
</div>
</div>
+
+ <div class="PortletContainer">
+ <%
+ uicomponent.renderChildren();
+ %>
</div>
-
- <div class="PortletContainer">
- <%uicomponent.renderChildren();%>
- </div>
- </div>
+ </div>
+ <%} else {
+ for(inputEntry in uicomponent.getChildren()) {
+ if (inputEntry instanceof UIApplicationRegistryEditMode) {
+ uicomponent.renderUIComponent(inputEntry);
+ }
+ }
+ }
+ %>
</div>
\ No newline at end of file