Skip to content
This repository has been archived by the owner on Apr 8, 2019. It is now read-only.

Commit

Permalink
GTNPORTAL-3279 Display PageBody as disabled as site header and footer
Browse files Browse the repository at this point in the history
when editing a page in full preview
  • Loading branch information
ppalaga committed Oct 31, 2013
1 parent eeda8d9 commit 3f84a5f
Show file tree
Hide file tree
Showing 16 changed files with 179 additions and 137 deletions.
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2009 eXo Platform SAS.
*
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
Expand All @@ -20,7 +20,7 @@

.UIWorkingWorkspace {
margin: 0px;

/*
* minh.js.exo
* bug : right click with IE7 in ECM
Expand All @@ -37,14 +37,18 @@
background: #DEDFDF;
}

.UIWorkingWorkspace .UIPageBody .VIEW-PAGEBODY{
.UIWorkingWorkspace .UIPageBody .VIEW-PAGEBODY {
background: #b5b6b6;
-moz-border-radius:0px 0px 9px 9px;
-webkit-border-radius:0px 0px 9px 9px;
border-radius:0px 0px 9px 9px;
padding: 0px 8px 8px;
}


.UIWorkingWorkspace .UIPageBody .VIEW-PAGEBODY.SelfDisabledChildrenEnabled {
background: rgba(181, 182, 182, 0.4);
}

.MaskLayer {
background: black;
text-align: center;
Expand All @@ -54,7 +58,7 @@

.WarningLayer {
width: 300px; height: 100px;
line-height: 100px;
line-height: 100px;
text-align: center;
position: absolute;
opacity: 0.5 !important;
Expand Down
Expand Up @@ -3,6 +3,7 @@
import org.exoplatform.web.application.JavascriptManager;
import org.gatein.common.text.EntityEncoder;
import org.exoplatform.commons.utils.HTMLEntityEncoder;
import org.exoplatform.portal.webui.workspace.UIPortalApplication.EditMode;

import javax.portlet.WindowState;

Expand All @@ -11,7 +12,7 @@
UIPortalApplication uiPortalApp = rcontext.getUIApplication();
boolean hasAccessPermission = uicomponent.hasAccessPermission();
if(!uiPortalApp.isEditing() && !hasAccessPermission) return;
int portalMode = uiPortalApp.getModeState();
EditMode editMode = uiPortalApp.getEditMode();

JavascriptManager jsmanager = rcontext.getJavascriptManager();

Expand All @@ -27,7 +28,7 @@
<div class="UIPortlet <%=hasAccessPermission?"":"ProtectedPortlet"%>" id="$id" style="top: 0px; left:0px;">
<div class="UIComponentBlock">

<%if(portalMode == uiPortalApp.CONTAINER_BLOCK_EDIT_MODE || portalMode == uiPortalApp.APP_BLOCK_EDIT_MODE) { %>
<%if (editMode == EditMode.BLOCK) { %>
<div class="LAYOUT-BLOCK LAYOUT-PORTLET">
<div class="PortletLayoutDecorator">
<%/*Begin Middle Portlet Layout Decorator*/%>
Expand All @@ -51,7 +52,7 @@
<%
}

if(portalMode != uiPortalApp.CONTAINER_BLOCK_EDIT_MODE && portalMode != uiPortalApp.APP_BLOCK_EDIT_MODE) {
if (editMode != EditMode.BLOCK) {
if(uicomponent.getShowInfoBar()) {
if(title == null || title.trim().length() < 1)
title = portletId;
Expand Down Expand Up @@ -136,7 +137,7 @@
<div class="MiddleDecoratorLeft">
<div class="MiddleDecoratorRight">
<div class="MiddleDecoratorCenter">
<div id="<%=portalMode == UIPortalApplication.NORMAL_MODE ? portletId : "EditMode-"+ portletId%>" style="width: 100%">
<div id="<%=editMode == EditMode.NO_EDIT ? portletId : "EditMode-"+ portletId%>" style="width: 100%">
<div class="PORTLET-FRAGMENT UIResizableBlock UIApplication" style="width: 100%; height: $windowHeight;">
<%
if(windowState != WindowState.MINIMIZED) {
Expand Down Expand Up @@ -176,7 +177,7 @@
cssStyle += "height: "+ windowHeight +";";
}
%>
<div id="<%=portalMode == UIPortalApplication.NORMAL_MODE ? portletId : "EditMode-"+ portletId%>">
<div id="<%=editMode == EditMode.NO_EDIT ? portletId : "EditMode-"+ portletId%>">
<div class="PORTLET-FRAGMENT" style="${cssStyle}">
<%
if(hasAccessPermission)
Expand All @@ -195,7 +196,7 @@
}
}
if(uiPortalApp.isEditing()) {
if(portalMode != uiPortalApp.CONTAINER_BLOCK_EDIT_MODE && portalMode != uiPortalApp.APP_BLOCK_EDIT_MODE) {
if (editMode != EditMode.BLOCK) {
%>
</div>
<%} %>
Expand Down
Expand Up @@ -3,6 +3,7 @@
import org.exoplatform.portal.webui.workspace.UIPortalApplication;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.commons.utils.HTMLEntityEncoder;
import org.exoplatform.portal.webui.workspace.UIPortalApplication.EditMode;

def rcontext = _ctx.getRequestContext();
ResourceBundle res = rcontext.getApplicationResourceBundle();
Expand All @@ -11,6 +12,8 @@
boolean hasAccessPermission = uicomponent.hasAccessPermission();
if(!uiPortalApp.isEditing() && !hasAccessPermission) return;

EditMode editMode = uiPortalApp.getEditMode();

String cssStyle = "";
String uiComponentWidth = uicomponent.getWidth();
String uiComponentHeight = uicomponent.getHeight();
Expand Down Expand Up @@ -43,23 +46,22 @@
%> <div class="NormalContainerBlock UIComponentBlock">

<%
int portalMode = uiPortalApp.getModeState();
if(portalMode == uiPortalApp.CONTAINER_BLOCK_EDIT_MODE || portalMode == UIPortalApplication.APP_BLOCK_EDIT_MODE){
if (editMode == EditMode.BLOCK){
%>
<div class="LAYOUT-CONTAINER LAYOUT-BLOCK">
<%} else {%>
<div class="VIEW-CONTAINER VIEW-BLOCK">
<%} %>
<%if(hasAccessPermission) {%>
<div>
<div class="UIRowContainer <%=(portalMode != UIPortalApplication.NORMAL_MODE && uicomponent.getChildren().size() == 0) ? "EmptyContainer" : ""%>">
<div class="UIRowContainer <%=(editMode != EditMode.NO_EDIT && uicomponent.getChildren().size() == 0) ? "EmptyContainer" : ""%>">
<%uicomponent.renderChildren();%>
</div>
</div>
<%} else out.print("<div class='ProtectedContent'>"+_ctx.appRes("UIPortlet.label.protectedContent")+"</div>");%>
</div>

<%if(portalMode != UIPortalApplication.NORMAL_MODE){%>
<%if (editMode != EditMode.NO_EDIT) {%>
<div class="EDITION-BLOCK EDITION-CONTAINER" style="position: relative; display: none;">

<div style="position: absolute; top: -86px;">
Expand Down Expand Up @@ -87,7 +89,7 @@
<div style="position: relative; width: 100%">
<div class="UIPopupCategory" style="display: none;">
<div class="PopupCategoryDecorator">

<a class="CategoryItem" href="javascript:void(0);" onclick="<%= 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>
Expand All @@ -102,7 +104,7 @@
</div>
<a href="javascript:void(0);" onclick="<%=uicomponent.event("EditContainer")%>" class="EditIcon" title="<%=_ctx.appRes("UIColumnContainer.tooltip.editContainer")%>"><span></span></a>
<a href="javascript:void(0);" onclick="<%=uicomponent.event("DeleteComponent")%>" class="DeleteIcon" title="<%=_ctx.appRes("UIColumnContainer.tooltip.closeContainer")%>"><span></span></a>

<%}%>

</div>
Expand Down
Expand Up @@ -2,13 +2,15 @@
import org.exoplatform.commons.utils.ExpressionUtil;
import org.exoplatform.portal.webui.workspace.UIPortalApplication;
import org.exoplatform.commons.utils.HTMLEntityEncoder;
import org.exoplatform.portal.webui.workspace.UIPortalApplication.EditMode;

def rcontext = _ctx.getRequestContext();
ResourceBundle res = rcontext.getApplicationResourceBundle();

UIPortalApplication uiPortalApp = rcontext.getUIApplication();
boolean hasAccessPermission = uicomponent.hasAccessPermission();
if(!uiPortalApp.isEditing() && !hasAccessPermission) return;
EditMode editMode = uiPortalApp.getEditMode();

String cssStyle = "";
String uiComponentWidth = uicomponent.getWidth();
Expand Down Expand Up @@ -42,23 +44,22 @@
%>
<div class="NormalContainerBlock UIComponentBlock">
<%
int portalMode = uiPortalApp.getModeState();
if(portalMode == uiPortalApp.CONTAINER_BLOCK_EDIT_MODE || portalMode == uiPortalApp.APP_BLOCK_EDIT_MODE){
if (editMode == EditMode.BLOCK) {
%>
<div class="LAYOUT-CONTAINER LAYOUT-BLOCK">
<%} else {%>
<div class="VIEW-CONTAINER VIEW-BLOCK">
<%} %>
<%if(hasAccessPermission) {%>
<div>
<div class="UIRowContainer <%=(portalMode != UIPortalApplication.NORMAL_MODE && uicomponent.getChildren().size() == 0) ? "EmptyContainer" : ""%>">
<div class="UIRowContainer <%=(editMode != EditMode.NO_EDIT && uicomponent.getChildren().size() == 0) ? "EmptyContainer" : ""%>">
<%uicomponent.renderChildren();%>
</div>
</div>
<%} else out.print("<div class='ProtectedContent'>"+_ctx.appRes("UIPortlet.label.protectedContent")+"</div>");%>
</div>

<%if(portalMode != UIPortalApplication.NORMAL_MODE){%>
<%if (editMode != EditMode.NO_EDIT) {%>
<div class="EDITION-BLOCK EDITION-CONTAINER" style="display: none;position: relative;">
<div style="position: absolute; top: -86px;">
<div class="NewLayer" style="display: none; visibility: hidden;"><span></span></div>
Expand Down
Expand Up @@ -3,13 +3,15 @@
import org.exoplatform.portal.webui.workspace.UIPortalApplication;
import org.exoplatform.web.application.JavascriptManager;
import org.exoplatform.commons.utils.HTMLEntityEncoder;
import org.exoplatform.portal.webui.workspace.UIPortalApplication.EditMode;

def rcontext = _ctx.getRequestContext();
ResourceBundle res = rcontext.getApplicationResourceBundle();

UIPortalApplication uiPortalApp = rcontext.getUIApplication();
boolean hasAccessPermission = uicomponent.hasAccessPermission();
if(!uiPortalApp.isEditing() && !hasAccessPermission) return;
EditMode editMode = uiPortalApp.getEditMode();

/** Trim the prefix UIContainer- if any, this hardcoded part is needed to update nested container via Ajax */
String componentId = uicomponent.getId();
Expand Down Expand Up @@ -43,13 +45,11 @@
%>
<div class="NormalContainerBlock 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){
String width = uicomponent.getWidth();
String height = uicomponent.getHeight();
if (height != null) style += "height:"+height+";";
if (editMode == EditMode.BLOCK) {
%>
<div class="LAYOUT-CONTAINER LAYOUT-BLOCK">
<%} else {%>
Expand All @@ -69,7 +69,7 @@
</div>
<%/*Debug On IE -----For DND */%>

<%if(portalMode != UIPortalApplication.NORMAL_MODE){%>
<%if (editMode != EditMode.NO_EDIT) {%>
<div class="EDITION-BLOCK EDITION-CONTAINER" style="display: none;position: relative;">
<div style="position: absolute; top: -86px;">
<div class="NewLayer" style="display: none; visibility: hidden;"><span></span></div>
Expand Down
Expand Up @@ -3,13 +3,15 @@
import org.exoplatform.portal.webui.workspace.UIPortalApplication;
import org.exoplatform.web.application.JavascriptManager;
import org.exoplatform.commons.utils.HTMLEntityEncoder;
import org.exoplatform.portal.webui.workspace.UIPortalApplication.EditMode;

def rcontext = _ctx.getRequestContext();
ResourceBundle res = rcontext.getApplicationResourceBundle();

UIPortalApplication uiPortalApp = rcontext.getUIApplication();
boolean hasAccessPermission = uicomponent.hasAccessPermission();
if(!uiPortalApp.isEditing() && !hasAccessPermission) return;
EditMode editMode = uiPortalApp.getEditMode();

/** Trim the prefix UIContainer- if any, this hardcoded part is needed to update nested container via Ajax */
String componentId = uicomponent.getId();
Expand Down Expand Up @@ -37,13 +39,12 @@
%>
<div class="NormalContainerBlock 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){
String width = uicomponent.getWidth();
String height = uicomponent.getHeight();
if (width != null) style += "width:"+width+";";
if (height != null) style += "height:"+height+";";
if (editMode == EditMode.BLOCK) {
%>
<div class="LAYOUT-CONTAINER LAYOUT-BLOCK">
<%} else {%>
Expand All @@ -63,7 +64,7 @@
</div>
<%/*Debug On IE -----For DND */%>

<%if(portalMode != UIPortalApplication.NORMAL_MODE){%>
<%if(editMode != EditMode.NO_EDIT){%>
<div class="EDITION-BLOCK EDITION-CONTAINER" style="display: none; position: relative;">
<div style="position: absolute; top: -86px;">
<div class="NewLayer" style="display: none; visibility: hidden;"><span></span></div>
Expand Down
Expand Up @@ -3,13 +3,15 @@
import org.exoplatform.portal.webui.workspace.UIPortalApplication;
import org.exoplatform.web.application.JavascriptManager;
import org.exoplatform.commons.utils.HTMLEntityEncoder;
import org.exoplatform.portal.webui.workspace.UIPortalApplication.EditMode;

def rcontext = _ctx.getRequestContext();
ResourceBundle res = rcontext.getApplicationResourceBundle();

UIPortalApplication uiPortalApp = rcontext.getUIApplication();
boolean hasAccessPermission = uicomponent.hasAccessPermission();
if(!uiPortalApp.isEditing() && !hasAccessPermission) return;
EditMode editMode = uiPortalApp.getEditMode();

/** Trim the prefix UIContainer- if any, this hardcoded part is needed to update nested container via Ajax */
String componentId = uicomponent.getId();
Expand Down Expand Up @@ -37,13 +39,12 @@
%>
<div class="NormalContainerBlock 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){
String width = uicomponent.getWidth();
String height = uicomponent.getHeight();
if (width != null) style += "width:"+width+";";
if (height != null) style += "height:"+height+";";
if (editMode == EditMode.BLOCK) {
%>
<div class="LAYOUT-CONTAINER LAYOUT-BLOCK">
<%} else {%>
Expand All @@ -63,7 +64,7 @@
</div>
<%/*Debug On IE -----For DND */%>

<%if(portalMode != UIPortalApplication.NORMAL_MODE){%>
<%if (editMode != EditMode.NO_EDIT) {%>
<div class="EDITION-BLOCK EDITION-CONTAINER" style="display: none;position: relative;">
<div style="position: absolute; top: -86px;">
<div class="NewLayer" style="display: none; visibility: hidden;"><span></span></div>
Expand Down

0 comments on commit 3f84a5f

Please sign in to comment.