[gatein-commits] gatein SVN: r7036 - in epp/portal/branches/EPP_5_2_Branch/web: portal/src/main/webapp/groovy/portal/webui/container and 1 other directory.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue Aug 9 19:38:03 EDT 2011
Author: hfnukal
Date: 2011-08-09 19:38:02 -0400 (Tue, 09 Aug 2011)
New Revision: 7036
Added:
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPortalComponent/background/ArrowDown.gif
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/container/UIColumnContainer.gtmpl
Log:
JBEPP-1055 The navigation import should be configurable some modes for particular requirement.
Added: epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPortalComponent/background/ArrowDown.gif
===================================================================
(Binary files differ)
Property changes on: epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPortalComponent/background/ArrowDown.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/container/UIColumnContainer.gtmpl
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/container/UIColumnContainer.gtmpl (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/container/UIColumnContainer.gtmpl 2011-08-09 23:38:02 UTC (rev 7036)
@@ -0,0 +1,131 @@
+<%
+ import org.exoplatform.commons.utils.ExpressionUtil;
+ import org.exoplatform.portal.webui.workspace.UIPortalApplication;
+ import org.exoplatform.webui.core.UIComponent;
+ //import org.exoplatform.webui.config.Event;
+
+ def rcontext = _ctx.getRequestContext();
+ ResourceBundle res = rcontext.getApplicationResourceBundle();
+
+ UIPortalApplication uiPortalApp = rcontext.getUIApplication();
+ boolean hasPermission = uicomponent.hasPermission();
+ if(!uiPortalApp.isEditing() && !hasPermission) return;
+
+ String cssStyle = "";
+ String uiComponentWidth = uicomponent.getWidth();
+ String uiComponentHeight = uicomponent.getHeight();
+ if(uiComponentWidth != null || uiComponentHeight != null) cssStyle = "style=\"";
+ if(uiComponentHeight != null) cssStyle += "height: "+uiComponentHeight+";"
+ if(cssStyle.length() > 0) cssStyle += "\"";
+
+ /** 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 UIColumnContainer <%=uiPortalApp.isEditing()?"EdittingContainer":""%> <%=hasPermission?"": "ProtectedContainer"%>"
+ id="${uicomponent.id}" ${cssStyle}
+ 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();
+ if(portalMode == uiPortalApp.CONTAINER_BLOCK_EDIT_MODE || portalMode == UIPortalApplication.APP_BLOCK_EDIT_MODE){
+ %>
+ <div class="LAYOUT-CONTAINER LAYOUT-BLOCK">
+ <%} else {%>
+ <div class="VIEW-CONTAINER VIEW-BLOCK">
+ <%} %>
+ <%if(hasPermission) {%>
+ <div class="UIRowContainer <%=(portalMode != UIPortalApplication.NORMAL_MODE && uicomponent.getChildren().size() == 0) ? "EmptyContainer" : ""%>">
+ <div>
+ <%uicomponent.renderChildren();%>
+ </div>
+ </div>
+ <%} else out.print("<div class='ProtectedContent'>"+_ctx.appRes("UIPortlet.label.protectedContent")+"</div>");%>
+ </div>
+
+ <%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 ClearFix">
+ <div class="DragControlArea" title="<%=_ctx.appRes("UIColumnContainer.title.DragControlArea")%>" onmousedown="eXo.portal.PortalDragDrop.init.call(this,event);"><span></span></div>
+ <%
+ String showCategory = "eXo.webui.UIPopupSelectCategory.show(this, event)";
+ String strTitle = uicomponent.getTitle() != null ?
+ ExpressionUtil.getExpressionValue(res, uicomponent.getTitle()) :
+ _ctx.appRes("UIColumnContainer.title.Container");
+ %>
+ <div class="ContainerIcon"><%=hasPermission ? strTitle : _ctx.appRes("UIPortlet.label.protectedContent")%></div>
+ <%if(hasPermission) {%>
+ <div class="ControlIcon ArrowDownIcon" onclick="$showCategory" title="<%= _ctx.appRes("UIColumnContainer.tooltip.insertColumn") %>">
+ <% /*Begin Popup Menu*/ %>
+ <div style="position: relative; width: 100%">
+ <div class="UIPopupCategory" style="display: none;">
+ <div class="PopupCategoryDecorator">
+ <div class="PopupCategoryTL">
+ <div class="PopupCategoryTR">
+ <div class="PopupCategoryTC"><span></span></div>
+ </div>
+ </div>
+ <div class="PopupCategoryML">
+ <div class="PopupCategoryMR">
+ <div class="PopupCategoryMC">
+ <a class="CategoryItem" href="<%= uicomponent.event("InsertColumn", org.exoplatform.portal.webui.container.UIColumnContainer.INSERT_BEFORE) %>" title="<%= _ctx.appRes("UIColumnContainer.tooltip.insertLeft") %>">
+ <div class="CategoryItemLabel"><%= _ctx.appRes("UIColumnContainer.label.insertLeft") %></div>
+ </a>
+ <a class="CategoryItem" href="<%= uicomponent.event("InsertColumn", org.exoplatform.portal.webui.container.UIColumnContainer.INSERT_AFTER) %>" title="<%= _ctx.appRes("UIColumnContainer.tooltip.insertRight") %>">
+ <div class="CategoryItemLabel"><%= _ctx.appRes("UIColumnContainer.label.insertRight") %></div>
+ </a>
+ </div>
+ </div>
+ </div>
+ <div class="PopupCategoryBL">
+ <div class="PopupCategoryBR">
+ <div class="PopupCategoryBC"><span></span></div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <% /*End Popup Menu*/ %>
+ </div>
+ <a href="<%=uicomponent.event("EditContainer")%>;eXo.portal.UIPortal.changeComposerSaveButton()" class="EditContainerIcon" title="<%=_ctx.appRes("UIColumnContainer.tooltip.editContainer")%>"><span></span></a>
+ <a href="<%=uicomponent.event("DeleteComponent")%>" class="DeleteContainerIcon" title="<%=_ctx.appRes("UIColumnContainer.tooltip.closeContainer")%>"><span></span></a>
+
+ <%}%>
+
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <%/*End InfoBar*/ %>
+ </div>
+
+ </div>
+ </div>
+ </div>
+ <%} %>
+
+ </div>
+ </div>
+ </div>
+</div>
+
More information about the gatein-commits
mailing list