[gatein-commits] gatein SVN: r826 - in portal/trunk: web/portal/src/main/webapp/groovy/portal/webui/page and 1 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Nov 26 23:07:02 EST 2009


Author: tan_pham_dinh
Date: 2009-11-26 23:07:01 -0500 (Thu, 26 Nov 2009)
New Revision: 826

Modified:
   portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIWizard/Stylesheet.css
   portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/page/UIWizardPageSetInfo.gtmpl
   portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java
Log:
GTNPORTAL-290: Remove PageNodeSelecter in UIPageCreationWizard with User Navigation

Modified: portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIWizard/Stylesheet.css
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIWizard/Stylesheet.css	2009-11-27 04:00:25 UTC (rev 825)
+++ portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIWizard/Stylesheet.css	2009-11-27 04:07:01 UTC (rev 826)
@@ -194,6 +194,11 @@
 	float: left; /* orientation=lt */
 	float: right; /* orientation=rt */
 	width: 240px;
+}
+
+.UIWizard .UIWizardPageSetInfo .NoPageSelecter .SelectedPageInfo {
+	margin-left: auto; /* orientation=lt */
+	margin-right: auto; /* orientation=rt */
 }
 
 .UIWizard .UIWizardPageSetInfo .SelectedPageInfo {

Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/page/UIWizardPageSetInfo.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/page/UIWizardPageSetInfo.gtmpl	2009-11-27 04:00:25 UTC (rev 825)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/page/UIWizardPageSetInfo.gtmpl	2009-11-27 04:07:01 UTC (rev 826)
@@ -7,13 +7,16 @@
 	PageNode pageNode = uicomponent.getSelectedPageNode();
 	String nodeName = ""; 	
 	if(pageNode!=null ) nodeName = "/"+pageNode.getResolvedLabel();
+	boolean isNoSelecter = !uicomponent.getChild(UIPageNodeSelector.class).isRendered();
 %>
 <div class="UIWizardPageSetInfo">
 	<%uiform.begin()%>
-	<div class="OverflowContainer">
+	<div class="OverflowContainer <%=isNoSelecter ? "NoPageSelecter" : ""%>">
+		<%if(!isNoSelecter) {%>
 		<div class="PageNodeContainer">
 			<% uicomponent.renderChild(UIPageNodeSelector.class); %>
 		</div>
+		<%}%>
 		<div class="SelectedPageInfo">
 			<div class="PageInfoContainer">
 				<div class="PageNodeInfo">

Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java	2009-11-27 04:00:25 UTC (rev 825)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java	2009-11-27 04:07:01 UTC (rev 826)
@@ -70,12 +70,15 @@
 
    public UIPageCreationWizard() throws Exception
    {
-      addChild(UIWizardPageSetInfo.class, null, null).setRendered(false);
+      UIWizardPageSetInfo uiPageInfo = addChild(UIWizardPageSetInfo.class, null, null).setRendered(false);
       addChild(UIWizardPageSelectLayoutForm.class, null, null).setRendered(false);
       addChild(UIPagePreview.class, null, null).setRendered(false);
       setNumberSteps(NUMBER_OF_STEPs);
       viewStep(FIRST_STEP);
       setShowWelcomeComponent(false);
+      boolean isUserNav = Util.getUIPortal().getSelectedNavigation().getOwnerType().equals(PortalConfig.USER_TYPE);
+      if (isUserNav)
+         uiPageInfo.getChild(UIPageNodeSelector.class).setRendered(false);
    }
 
    private void saveData() throws Exception
@@ -120,7 +123,7 @@
       {
          pageNav.addNode(pageNode);
       }
-      pageNav.setModifier(RequestContext.<WebuiRequestContext>getCurrentInstance().getRemoteUser());
+      pageNav.setModifier(RequestContext.<WebuiRequestContext> getCurrentInstance().getRemoteUser());
       uiNodeSelector.selectPageNodeByUri(pageNode.getUri());
 
       service.create(page);
@@ -181,7 +184,7 @@
 
          uiWizard.updateWizardComponent();
          uiWizard.viewStep(FIRST_STEP);
-         
+
          uiWizard.setShowActions(true);
 
          UIWorkingWorkspace uiWorkingWS = uiWizard.getAncestorOfType(UIWorkingWorkspace.class);
@@ -225,8 +228,7 @@
          if (navigation == null)
          {
             uiPortalApp.addMessage(new ApplicationMessage("UIPageCreationWizard.msg.notSelectedPageNavigation",
-               new String[]{}));
-            ;
+               new String[]{}));;
             uiWizard.viewStep(FIRST_STEP);
             return;
          }



More information about the gatein-commits mailing list