From do-not-reply at jboss.org Thu Apr 1 05:15:17 2010 Content-Type: multipart/mixed; boundary="===============7294275485502312405==" MIME-Version: 1.0 From: do-not-reply at jboss.org To: gatein-commits at lists.jboss.org Subject: [gatein-commits] gatein SVN: r2438 - portal/branches/EPP_5_0_Branch/web/portal/src/main/webapp/groovy/portal/webui/container. Date: Thu, 01 Apr 2010 05:15:17 -0400 Message-ID: <201004010915.o319FHgU023903@svn01.web.mwc.hst.phx2.redhat.com> --===============7294275485502312405== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: thomas.heute(a)jboss.com Date: 2010-04-01 05:15:16 -0400 (Thu, 01 Apr 2010) New Revision: 2438 Added: portal/branches/EPP_5_0_Branch/web/portal/src/main/webapp/groovy/portal/= webui/container/UITableAutofitColumnContainer.gtmpl Log: JBEPP-203: Blank zone when user put permission on Container in a page / Con= tent should be filled up automatically Added: portal/branches/EPP_5_0_Branch/web/portal/src/main/webapp/groovy/por= tal/webui/container/UITableAutofitColumnContainer.gtmpl =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- portal/branches/EPP_5_0_Branch/web/portal/src/main/webapp/groovy/portal= /webui/container/UITableAutofitColumnContainer.gtmpl = (rev 0) +++ portal/branches/EPP_5_0_Branch/web/portal/src/main/webapp/groovy/portal= /webui/container/UITableAutofitColumnContainer.gtmpl 2010-04-01 09:15:16 UT= C (rev 2438) @@ -0,0 +1,98 @@ +<% = + import org.exoplatform.commons.utils.ExpressionUtil; + import org.exoplatform.portal.webui.workspace.UIPortalApplication; + = + def rcontext =3D _ctx.getRequestContext(); = + ResourceBundle res =3D rcontext.getApplicationResourceBundle(); = + = + UIPortalApplication uiPortalApp =3D rcontext.getUIApplication(); + boolean hasPermission =3D 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 =3D uicomponent.getId(); + if(componentId.startsWith("UIContainer-")){ + uicomponent.setId(componentId.substring("UIContainer-".length())); + } + = +%> +
<%=3DhasPermission?"":"ProtectedContainer"%>" = + id=3D"UIContainer-${uicomponent.id}" = + onmouseover=3D"eXo.portal.UIPortal.blockOnMouseOver(event, this, true)= ;" = + onmouseout=3D"eXo.portal.UIPortal.blockOnMouseOver(event, this, false)= ;"> +
+
+
+ = + <% = + int portalMode =3D uiPortalApp.getModeState(); + String style =3D ""; + String width =3D uicomponent.getWidth(); + String height =3D uicomponent.getHeight(); + if(width !=3D null) style +=3D "width:"+width+";"; + if(height !=3D null) style +=3D "height:"+height+";"; + if(portalMode =3D=3D uiPortalApp.CONTAINER_BLOCK_EDIT_MODE || portalM= ode =3D=3D uiPortalApp.APP_BLOCK_EDIT_MODE){ + %> +
+ <%} else {%> +
+ <%} %> +
+ <%if(hasPermission) {%> = + + + <% for(uiChild in uicomponent.getChildren()) {%> + + <% } %> + +
<% uicomponent= .renderUIComponent(uiChild) %>
+ <%} else {print "
"+_ctx.appRes("UIPo= rtlet.label.protectedContent")+"
";}%> +
= +
+ <%/*Debug On IE -----For DND */%> + = + <%if(portalMode !=3D UIPortalApplication.NORMAL_MODE){%> +
+
+ = +
+ <%/*Begin InfoBar*/%> +
+
+
+
+
+
+
" onmousedown=3D"eXo.portal.PortalDragDrop.init.c= all(this,event);">
+ <% = + String strTitle =3D uicomponent.getTitle() !=3D null ? + ExpressionUtil.getExpressionValue(res, uicomponent.getTi= tle()) : + _ctx.appRes("UIContainer.title.Container"); + %> +
<%=3D= hasPermission ? strTitle : _ctx.appRes("UIPortlet.label.protectedContent")%= >
+ <%if(hasPermission) {%> + " class=3D"DeleteContainerIcon" title=3D"<%=3D_ctx.appRes("UIC= ontainer.tooltip.closeContainer")%>"> + ;eXo.portal.UIPortal.changeComposerSaveButton()" class=3D"EditCo= ntainerIcon" title=3D"<%=3D_ctx.appRes("UIContainer.tooltip.editContainer")= %>"> + <%}%> +
+
+
+
+
+
+
+ <%/*End InfoBar*/ %> +
+ = +
+
+
+ <%} %> + = +
+
+
= + = +
\ No newline at end of file --===============7294275485502312405==--