[gatein-commits] gatein SVN: r2371 - in portal/trunk/web/portal/src/main/webapp: WEB-INF/conf/uiconf/portal/webui/container and 1 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Mar 26 08:40:59 EDT 2010


Author: trong.tran
Date: 2010-03-26 08:40:57 -0400 (Fri, 26 Mar 2010)
New Revision: 2371

Added:
   portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl
Modified:
   portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_de.properties
   portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
   portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_es.properties
   portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties
   portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_it.properties
   portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ja.properties
   portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ne.properties
   portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_nl.properties
   portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
   portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/container/ContainerConfigOption.groovy
Log:
GTNPORTAL-397 Create a new columns container template called "Autofit Columns Layout" which will not divide columns equally

Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_de.properties
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_de.properties	2010-03-26 10:10:33 UTC (rev 2370)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_de.properties	2010-03-26 12:40:57 UTC (rev 2371)
@@ -128,6 +128,7 @@
 
 ContainerOptions.Category.row=Reihenlayout
 ContainerOptions.Category.column=Spaltenlayout
+ContainerOptions.Category.autofitColumn=Autofit Columns Layout
 ContainerOptions.Category.tabs=Registerkartenlayout
 ContainerOptions.Category.mix=Kombiniertes Layout
 
@@ -138,6 +139,9 @@
 ContainerOptions.Item.twoColumns=Zwei Spalten
 ContainerOptions.Item.threeColumns=Drei Spalten
 ContainerOptions.Item.threeToolbarColumns=Drei Werkzeugleisten-Spalten
+ContainerOptions.Item.autofitOneColumns=Autofit One Column
+ContainerOptions.Item.autofitTwoColumns=Autofit Two Columns
+ContainerOptions.Item.autofitThreeColumns=Autofit Three Columns
 ContainerOptions.Item.twoTabs=Zwei Registerkarten
 ContainerOptions.Item.threeTabs=Drei Registerkarten
 ContainerOptions.Item.twoColumnsOneRow=Zwei Spalten, Eine Reihe

Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties	2010-03-26 10:10:33 UTC (rev 2370)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties	2010-03-26 12:40:57 UTC (rev 2371)
@@ -128,6 +128,7 @@
 
 ContainerOptions.Category.row=Rows Layout
 ContainerOptions.Category.column=Columns Layout
+ContainerOptions.Category.autofitColumn=Autofit Columns Layout
 ContainerOptions.Category.tabs=Tabs Layout
 ContainerOptions.Category.mix=Mixed Layout
 
@@ -138,6 +139,9 @@
 ContainerOptions.Item.twoColumns=Two Columns
 ContainerOptions.Item.threeColumns=Three Columns
 ContainerOptions.Item.threeToolbarColumns=Three Toolbar Columns
+ContainerOptions.Item.autofitOneColumns=Autofit One Column
+ContainerOptions.Item.autofitTwoColumns=Autofit Two Columns
+ContainerOptions.Item.autofitThreeColumns=Autofit Three Columns
 ContainerOptions.Item.twoTabs=Two Tabs
 ContainerOptions.Item.threeTabs=Three Tabs
 ContainerOptions.Item.twoColumnsOneRow=Two Columns, One Row

Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_es.properties
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_es.properties	2010-03-26 10:10:33 UTC (rev 2370)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_es.properties	2010-03-26 12:40:57 UTC (rev 2371)
@@ -128,6 +128,7 @@
 
 ContainerOptions.Category.row=Distribuci\u00f3n de Filas
 ContainerOptions.Category.column=Distribuci\u00f3n de Columnas
+ContainerOptions.Category.autofitColumn=Autofit Columns Layout
 ContainerOptions.Category.tabs=Distribuci\u00f3n de Tabs
 ContainerOptions.Category.mix=Distribuci\u00f3n Mixta
 
@@ -138,6 +139,9 @@
 ContainerOptions.Item.twoColumns=Dos Columnas
 ContainerOptions.Item.threeColumns=Tres Columnas
 ContainerOptions.Item.threeToolbarColumns=Barra de Herramientas de Tres Columnas
+ContainerOptions.Item.autofitOneColumns=Autofit One Column
+ContainerOptions.Item.autofitTwoColumns=Autofit Two Columns
+ContainerOptions.Item.autofitThreeColumns=Autofit Three Columns
 ContainerOptions.Item.twoTabs=Dos Tabs
 ContainerOptions.Item.threeTabs=Tres Tabs
 ContainerOptions.Item.twoColumnsOneRow=Dos Columnas, Una Fila

Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties	2010-03-26 10:10:33 UTC (rev 2370)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties	2010-03-26 12:40:57 UTC (rev 2371)
@@ -115,6 +115,7 @@
 
 ContainerOptions.Category.row=Rows Layout
 ContainerOptions.Category.column=Columns Layout
+ContainerOptions.Category.autofitColumn=Autofit Columns Layout
 ContainerOptions.Category.tabs=Tabs Layout
 ContainerOptions.Category.mix=Mixed Layout
 
@@ -125,6 +126,9 @@
 ContainerOptions.Item.twoColumns=Two Columns
 ContainerOptions.Item.threeColumns=Three Columns
 ContainerOptions.Item.threeToolbarColumns=Three Toolbar Columns
+ContainerOptions.Item.autofitOneColumns=Autofit One Column
+ContainerOptions.Item.autofitTwoColumns=Autofit Two Columns
+ContainerOptions.Item.autofitThreeColumns=Autofit Three Columns
 ContainerOptions.Item.twoTabs=Two Tabs
 ContainerOptions.Item.threeTabs=Three Tabs
 ContainerOptions.Item.twoColumnsOneRow=Two Columns, One Row

Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_it.properties
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_it.properties	2010-03-26 10:10:33 UTC (rev 2370)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_it.properties	2010-03-26 12:40:57 UTC (rev 2371)
@@ -128,6 +128,7 @@
 
 ContainerOptions.Category.row=Layout delle Righe
 ContainerOptions.Category.column=Layout delle Colonne
+ContainerOptions.Category.autofitColumn=Autofit Columns Layout
 ContainerOptions.Category.tabs=Layout dei Tab
 ContainerOptions.Category.mix=Layout Vari
 
@@ -138,6 +139,9 @@
 ContainerOptions.Item.twoColumns=Due Colonne
 ContainerOptions.Item.threeColumns=Tre Colonne
 ContainerOptions.Item.threeToolbarColumns=Tre Colonne Toolbar
+ContainerOptions.Item.autofitOneColumns=Autofit One Column
+ContainerOptions.Item.autofitTwoColumns=Autofit Two Columns
+ContainerOptions.Item.autofitThreeColumns=Autofit Three Columns
 ContainerOptions.Item.twoTabs=Due Tab
 ContainerOptions.Item.threeTabs=Tre Tab
 ContainerOptions.Item.twoColumnsOneRow=Due Colonne, Una Riga

Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ja.properties
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ja.properties	2010-03-26 10:10:33 UTC (rev 2370)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ja.properties	2010-03-26 12:40:57 UTC (rev 2371)
@@ -128,6 +128,7 @@
 
 ContainerOptions.Category.row=\u884c\u30ec\u30a4\u30a2\u30a6\u30c8
 ContainerOptions.Category.column=\u5217\u30ec\u30a4\u30a2\u30a6\u30c8
+ContainerOptions.Category.autofitColumn=Autofit Columns Layout
 ContainerOptions.Category.tabs=\u30bf\u30d6\u30ec\u30a4\u30a2\u30a6\u30c8
 ContainerOptions.Category.mix=\u30df\u30c3\u30af\u30b9\u30ec\u30a4\u30a2\u30a6\u30c8
 
@@ -138,6 +139,9 @@
 ContainerOptions.Item.twoColumns=2\u5217
 ContainerOptions.Item.threeColumns=3\u5217
 ContainerOptions.Item.threeToolbarColumns=3\u30c4\u30fc\u30eb\u30d0\u30fc\u5217
+ContainerOptions.Item.autofitOneColumns=Autofit One Column
+ContainerOptions.Item.autofitTwoColumns=Autofit Two Columns
+ContainerOptions.Item.autofitThreeColumns=Autofit Three Columns
 ContainerOptions.Item.twoTabs=2\u30bf\u30d6
 ContainerOptions.Item.threeTabs=3\u30bf\u30d6
 ContainerOptions.Item.twoColumnsOneRow=2\u5217\u30011\u884c

Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ne.properties
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ne.properties	2010-03-26 10:10:33 UTC (rev 2370)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ne.properties	2010-03-26 12:40:57 UTC (rev 2371)
@@ -128,6 +128,7 @@
 
 ContainerOptions.Category.row=\u0930\u094b\u091c \u0922\u093e\u091a\u093e
 ContainerOptions.Category.column=\u0915\u094b\u0932\u0941\u092e\u0915\u094b \u0922\u093e\u091a\u093e
+ContainerOptions.Category.autofitColumn=Autofit Columns Layout
 ContainerOptions.Category.tabs=\u091f\u094d\u092f\u093e\u092c\u094d\u0938\u094d\u0915\u094b \u0922\u093e\u091a\u093e
 ContainerOptions.Category.mix=\u092e\u093f\u0938\u094d\u0930\u093f\u0924 \u0922\u093e\u091a\u093e
 
@@ -138,6 +139,9 @@
 ContainerOptions.Item.twoColumns=\u0968 \u0915\u094b\u0932\u0941\u092e\u094d\u0938\u094d
 ContainerOptions.Item.threeColumns=\u0969 \u0915\u094b\u0932\u0941\u092e\u094d\u0938\u094d
 ContainerOptions.Item.threeToolbarColumns=\u0969 \u091f\u0941\u0932\u092c\u093e\u0930 \u0915\u094b\u0932\u0941\u092e\u094d\u0938\u094d
+ContainerOptions.Item.autofitOneColumns=Autofit One Column
+ContainerOptions.Item.autofitTwoColumns=Autofit Two Columns
+ContainerOptions.Item.autofitThreeColumns=Autofit Three Columns
 ContainerOptions.Item.twoTabs=\u0968 \u091f\u094d\u092f\u093e\u092c\u094d\u0938
 ContainerOptions.Item.threeTabs=\u0969 \u091f\u094d\u092f\u093e\u092c\u094d\u0938
 ContainerOptions.Item.twoColumnsOneRow=\u0968 \u0915\u094b\u0932\u0941\u092e\u094d\u0938\u094d, \u0967 \u0930\u094b

Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_nl.properties
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_nl.properties	2010-03-26 10:10:33 UTC (rev 2370)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_nl.properties	2010-03-26 12:40:57 UTC (rev 2371)
@@ -128,6 +128,7 @@
 
 ContainerOptions.Category.row=Rijen lay-out
 ContainerOptions.Category.column=Kolommen lay-out
+ContainerOptions.Category.autofitColumn=Autofit Columns Layout
 ContainerOptions.Category.tabs=Tabbladen lay-out
 ContainerOptions.Category.mix=Gemixte lay-out
 
@@ -138,6 +139,9 @@
 ContainerOptions.Item.twoColumns=2 kolommen
 ContainerOptions.Item.threeColumns=3 kolommen
 ContainerOptions.Item.threeToolbarColumns=3 werkbalk kolommen
+ContainerOptions.Item.autofitOneColumns=Autofit One Column
+ContainerOptions.Item.autofitTwoColumns=Autofit Two Columns
+ContainerOptions.Item.autofitThreeColumns=Autofit Three Columns
 ContainerOptions.Item.twoTabs=2 tabbladen
 ContainerOptions.Item.threeTabs=3 tabbladen
 ContainerOptions.Item.twoColumnsOneRow=2 kolommen en 1 rij

Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties	2010-03-26 10:10:33 UTC (rev 2370)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties	2010-03-26 12:40:57 UTC (rev 2371)
@@ -109,6 +109,7 @@
 
 ContainerOptions.Category.row=Rows Layout
 ContainerOptions.Category.column=Columns Layout
+ContainerOptions.Category.autofitColumn=Autofit Columns Layout
 ContainerOptions.Category.tabs=Tabs Layout
 ContainerOptions.Category.mix=Mixed Layout
 
@@ -119,6 +120,9 @@
 ContainerOptions.Item.twoColumns=Two Columns
 ContainerOptions.Item.threeColumns=Three Columns
 ContainerOptions.Item.threeToolbarColumns=Three Toolbar Columns
+ContainerOptions.Item.autofitOneColumns=Autofit One Column
+ContainerOptions.Item.autofitTwoColumns=Autofit Two Columns
+ContainerOptions.Item.autofitThreeColumns=Autofit Three Columns
 ContainerOptions.Item.twoTabs=Two Tabs
 ContainerOptions.Item.threeTabs=Three Tabs
 ContainerOptions.Item.twoColumnsOneRow=Two Columns, One Row

Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/container/ContainerConfigOption.groovy
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/container/ContainerConfigOption.groovy	2010-03-26 10:10:33 UTC (rev 2370)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/container/ContainerConfigOption.groovy	2010-03-26 12:40:57 UTC (rev 2371)
@@ -69,6 +69,27 @@
         "</container>",
         "ThreeColumnContainerLayout")) ;
   templates.add(column);  
+
+  SelectItemCategory autofitColumn = new SelectItemCategory("autofitColumn") ;
+    autofitColumn.addSelectItemOption(new SelectItemOption("autofitOneColumns","" +
+        "<container template=\"system:/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl\">" +
+        "  <container template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\"></container>" +
+        "</container>", 
+        "OneRowContainerLayout")) ;
+    autofitColumn.addSelectItemOption(new SelectItemOption("autofitTwoColumns",
+        "<container template=\"system:/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl\">" +
+        "  <container template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\"></container>" +
+        "  <container template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\"></container>" +
+        "</container>",
+        "TwoColumnContainerLayout")) ;
+    autofitColumn.addSelectItemOption(new SelectItemOption("autofitThreeColumns",
+        "<container template=\"system:/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl\">" +
+        "  <container template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\"></container>" +
+        "  <container template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\"></container>" +
+        "  <container template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\"></container>" +
+        "</container>",
+        "ThreeColumnContainerLayout")) ;
+  templates.add(autofitColumn);  
   
   SelectItemCategory tabs = new SelectItemCategory("tabs") ;
     tabs.addSelectItemOption(new SelectItemOption("twoTabs",

Added: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl	                        (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl	2010-03-26 12:40:57 UTC (rev 2371)
@@ -0,0 +1,98 @@
+<%	
+	import org.exoplatform.commons.utils.ExpressionUtil;
+	import org.exoplatform.portal.webui.workspace.UIPortalApplication;
+	
+	def rcontext = _ctx.getRequestContext(); 
+	ResourceBundle res = rcontext.getApplicationResourceBundle(); 
+	
+	UIPortalApplication uiPortalApp = rcontext.getUIApplication();
+	boolean hasPermission = uicomponent.hasPermission();
+	if(!uiPortalApp.isEditing() && !hasPermission) return;
+	
+	/** Trim the prefix UIContainer- if any, this hardcoded part is needed to update nested container via Ajax */
+	String componentId = uicomponent.getId();
+	if(componentId.startsWith("UIContainer-")){
+		uicomponent.setId(componentId.substring("UIContainer-".length()));
+	}
+	
+%>
+<div class="UIContainer <%=uiPortalApp.isEditing()?"EdittingContainer":""%> <%=hasPermission?"":"ProtectedContainer"%>" 
+				id="UIContainer-${uicomponent.id}" 
+				onmouseover="eXo.portal.UIPortal.blockOnMouseOver(event, this, true);" 
+				onmouseout="eXo.portal.UIPortal.blockOnMouseOver(event, this, false);">
+	<div class="NormalContainerBlock">
+		<div class="LeftContainerBlock">
+			<div class="RightContainerBlock UIComponentBlock">
+			
+				<% 
+					int portalMode = uiPortalApp.getModeState();
+					String style = "";
+					String width	= uicomponent.getWidth();
+					String height	= uicomponent.getHeight();
+					if(width != null) style += "width:"+width+";";
+					if(height != null) style += "height:"+height+";";
+					if(portalMode == uiPortalApp.CONTAINER_BLOCK_EDIT_MODE || portalMode == uiPortalApp.APP_BLOCK_EDIT_MODE){
+				%>
+				<div class="LAYOUT-CONTAINER LAYOUT-BLOCK">
+				<%} else {%>
+				<div class="VIEW-CONTAINER VIEW-BLOCK">
+				<%} %>
+					<div id="$uicomponent.id">
+						<%if(hasPermission) {%>		
+						<table class="UITableColumnContainer" style="margin: 0px auto; $style">
+							<tr class="TRContainer">
+								<% for(uiChild in uicomponent.getChildren()) {%>
+									<td class="${uiChild.id}TDContainer TDContainer"><% uicomponent.renderUIComponent(uiChild) %></td>
+								<% } %>
+						 </tr>
+						</table>
+						<%} else {print "<div class='ProtectedContent'>"+_ctx.appRes("UIPortlet.label.protectedContent")+"</div>";}%>
+					</div>		
+				</div>
+				<%/*Debug On IE	-----For DND */%>
+				
+				<%if(portalMode != UIPortalApplication.NORMAL_MODE){%>
+				<div class="EDITION-BLOCK EDITION-CONTAINER" style="display: none;">
+					<div style="position: relative;">
+						<div style="position: absolute; top: -86px;">
+							
+							<div class="NewLayer" style="display: none; visibility: hidden;"><span></span></div>
+							<div class="CONTROL-CONTAINER CONTROL-BLOCK" style="position: absolute; top: -6px;">
+								<%/*Begin InfoBar*/%>
+								 <div class="UIInfoBar">
+									<div class="BlueRoundedStyle">
+										<div class="LeftBar">
+											<div class="RightBar">
+												<div class="MiddleBar">
+													<div class="FixHeight">
+														<div class="DragControlArea" title="<%=_ctx.appRes("UIContainer.tooltip.drag")%>" onmousedown="eXo.portal.PortalDragDrop.init.call(this,event);"><span></span></div>
+														<% 
+															String strTitle = uicomponent.getTitle() != null ?
+																		ExpressionUtil.getExpressionValue(res, uicomponent.getTitle()) :
+																		_ctx.appRes("UIContainer.title.Container");
+														%>
+														<div class="ContainerIcon DefaultContainer16x16Icon"><%=hasPermission ? strTitle : _ctx.appRes("UIPortlet.label.protectedContent")%></div>
+														<%if(hasPermission) {%>
+															<a href="<%=uicomponent.event("DeleteComponent","$uicomponent.id")%>" class="DeleteContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.closeContainer")%>"><span></span></a>
+															<a href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>;eXo.portal.UIPortal.changeComposerSaveButton()" class="EditContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
+														<%}%>
+														<div class="ClearBoth"><span></span></div>
+													</div>
+												</div>
+											</div>
+										</div>
+									</div>
+								</div>
+								<%/*End InfoBar*/ %>
+							</div>
+							
+						</div>
+					</div>
+				</div>
+				<%} %>
+				
+			</div>
+		</div>
+	</div>	
+	
+</div>
\ No newline at end of file



More information about the gatein-commits mailing list