Author: haint
Date: 2011-10-27 22:37:49 -0400 (Thu, 27 Oct 2011)
New Revision: 7899
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIWorkingWorkspace.java
Log:
GTNPORTAL-2240 Remove unused EditCurrentPage action listener of UIMainActionListener
class
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java 2011-10-27
18:11:18 UTC (rev 7898)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java 2011-10-28
02:37:49 UTC (rev 7899)
@@ -57,59 +57,6 @@
*/
public class UIMainActionListener
{
-
- static public class EditCurrentPageActionListener extends
EventListener<UIWorkingWorkspace>
- {
- public void execute(Event<UIWorkingWorkspace> event) throws Exception
- {
- UIPortalApplication uiApp = Util.getUIPortalApplication();
- UIWorkingWorkspace uiWorkingWS = event.getSource();
-
- // check edit permission for page
- UIPageBody pageBody = uiWorkingWS.findFirstComponentOfType(UIPageBody.class);
- UIPage uiPage = (UIPage)pageBody.getUIComponent();
- if (uiPage == null)
- {
- uiApp.addMessage(new
ApplicationMessage("UIPageBrowser.msg.PageNotExist", null));
- return;
- }
- Page page = PortalDataMapper.toPageModel(uiPage);
-
- UserACL userACL = uiApp.getApplicationComponent(UserACL.class);
- if (!userACL.hasEditPermission(page))
- {
- uiApp.addMessage(new
ApplicationMessage("UIPortalManagement.msg.Invalid-EditPage-Permission",
null));
- return;
- }
-
- uiWorkingWS.setRenderedChild(UIEditInlineWorkspace.class);
-
- UIPortalComposer portalComposer =
-
uiWorkingWS.findFirstComponentOfType(UIPortalComposer.class).setRendered(true);
- portalComposer.setComponentConfig(UIPortalComposer.class,
UIPortalComposer.UIPAGE_EDITOR);
- portalComposer.setId(UIPortalComposer.UIPAGE_EDITOR);
- portalComposer.setShowControl(true);
- portalComposer.setEditted(false);
- portalComposer.setCollapse(false);
-
- UIPortalToolPanel uiToolPanel =
uiWorkingWS.findFirstComponentOfType(UIPortalToolPanel.class);
- uiToolPanel.setShowMaskLayer(false);
- uiApp.setModeState(UIPortalApplication.APP_BLOCK_EDIT_MODE);
-
- // We clone the edited UIPage object, that is required for Abort action
- UIPageFactory clazz = UIPageFactory.getInstance(page.getFactoryId());
- UIPage newUIPage = clazz.createUIPage(null);
- PortalDataMapper.toUIPage(newUIPage, page);
- uiToolPanel.setWorkingComponent(newUIPage);
-
- // Remove current UIPage from UIPageBody
- pageBody.setUIComponent(null);
-
- event.getRequestContext().addUIComponentToUpdateByAjax(uiWorkingWS);
- Util.getPortalRequestContext().ignoreAJAXUpdateOnPortlets(true);
- }
- }
-
static public class PageCreationWizardActionListener extends
EventListener<UIWorkingWorkspace>
{
public void execute(Event<UIWorkingWorkspace> event) throws Exception
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIWorkingWorkspace.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIWorkingWorkspace.java 2011-10-27
18:11:18 UTC (rev 7898)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIWorkingWorkspace.java 2011-10-28
02:37:49 UTC (rev 7899)
@@ -40,7 +40,6 @@
@ComponentConfig(id = "UIWorkingWorkspace", template =
"system:/groovy/portal/webui/workspace/UIWorkingWorkspace.gtmpl", events = {
@EventConfig(listeners = UIMainActionListener.CreatePortalActionListener.class),
- @EventConfig(listeners = UIMainActionListener.EditCurrentPageActionListener.class),
@EventConfig(listeners =
UIMainActionListener.PageCreationWizardActionListener.class),
@EventConfig(listeners = UIMainActionListener.EditBackgroundActionListener.class),
@EventConfig(listeners = UIMainActionListener.EditInlineActionListener.class)})