Author: ndkhoiits
Date: 2010-12-02 03:58:55 -0500 (Thu, 02 Dec 2010)
New Revision: 5452
Modified:
portal/branches/branch-GTNPORTAL-1700/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js
portal/branches/branch-GTNPORTAL-1700/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/container/ContainerConfigOption.groovy
portal/branches/branch-GTNPORTAL-1700/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl
Log:
GTNPORTAL-1711 Autofit column layout should work properly
Modified:
portal/branches/branch-GTNPORTAL-1700/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js
===================================================================
---
portal/branches/branch-GTNPORTAL-1700/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js 2010-12-02
08:48:41 UTC (rev 5451)
+++
portal/branches/branch-GTNPORTAL-1700/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js 2010-12-02
08:58:55 UTC (rev 5452)
@@ -365,13 +365,6 @@
return dropableTargets;
}
- //temporary use for autofit table column container
- if (dragBlock && dragBlock.parentNode.tagName.toLowerCase() == "td")
{
- var uiTableContainer = eXo.core.DOMUtil.findAncestorByClass(dragBlock,
"UIContainer");
- dropableTargets.push(uiTableContainer);
- return dropableTargets;
- }
-
var uiWorkingWorkspace = document.getElementById("UIWorkingWorkspace") ;
var pagebody = document.getElementById("UIPageBody");
if(eXo.portal.portalMode && pagebody) {
@@ -388,15 +381,6 @@
if(DOMUtil.hasClass(uiContainers[i], "ProtectedContainer")) continue;
if (DOMUtil.hasClass(uiContainers[i], "UITableColumnContainer")) continue;
- //temporary use for auto-fit column container
- //Not a target If this is a auto-fit column container
- var foundUIComponent = new eXo.portal.UIPortalComponent(uiContainers[i]) ;
- if(eXo.portal.portalMode % 2) uiComponentLayout = foundUIComponent.getLayoutBlock()
;
- else uiComponentLayout = foundUIComponent.getViewBlock();
- var componentIdElement = DOMUtil.getChildrenByTagName(uiComponentLayout,
"div")[0] ;
- var layoutTypeElement = DOMUtil.getChildrenByTagName(componentIdElement,
"table")[0] ;
- if (layoutTypeElement) continue;
-
dropableTargets.push(uiContainers[i]) ;
}
return dropableTargets ;
Modified:
portal/branches/branch-GTNPORTAL-1700/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/container/ContainerConfigOption.groovy
===================================================================
---
portal/branches/branch-GTNPORTAL-1700/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/container/ContainerConfigOption.groovy 2010-12-02
08:48:41 UTC (rev 5451)
+++
portal/branches/branch-GTNPORTAL-1700/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/container/ContainerConfigOption.groovy 2010-12-02
08:58:55 UTC (rev 5452)
@@ -70,22 +70,22 @@
autofitColumn.addSelectItemOption(new
SelectItemOption("autofitOneColumns","" +
"<container
template=\"system:/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl\">"
+
" <factory-id>TableColumnContainer</factory-id>" +
- " <container
template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\"></container>"
+
+ " <container
template=\"system:/groovy/portal/webui/container/UIColumnContainer.gtmpl\"><factory-id>ColumnContainer</factory-id></container>"
+
"</container>",
"OneRowContainerLayout")) ;
autofitColumn.addSelectItemOption(new
SelectItemOption("autofitTwoColumns",
"<container
template=\"system:/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl\">"
+
" <factory-id>TableColumnContainer</factory-id>" +
- " <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/UIColumnContainer.gtmpl\"><factory-id>ColumnContainer</factory-id></container>"
+
+ " <container
template=\"system:/groovy/portal/webui/container/UIColumnContainer.gtmpl\"><factory-id>ColumnContainer</factory-id></container>"
+
"</container>",
"TwoColumnContainerLayout")) ;
autofitColumn.addSelectItemOption(new
SelectItemOption("autofitThreeColumns",
"<container
template=\"system:/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl\">"
+
" <factory-id>TableColumnContainer</factory-id>" +
- " <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
template=\"system:/groovy/portal/webui/container/UIColumnContainer.gtmpl\"><factory-id>ColumnContainer</factory-id></container>"
+
+ " <container
template=\"system:/groovy/portal/webui/container/UIColumnContainer.gtmpl\"><factory-id>ColumnContainer</factory-id></container>"
+
+ " <container
template=\"system:/groovy/portal/webui/container/UIColumnContainer.gtmpl\"><factory-id>ColumnContainer</factory-id></container>"
+
"</container>",
"ThreeColumnContainerLayout")) ;
templates.add(autofitColumn);
Modified:
portal/branches/branch-GTNPORTAL-1700/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl
===================================================================
---
portal/branches/branch-GTNPORTAL-1700/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl 2010-12-02
08:48:41 UTC (rev 5451)
+++
portal/branches/branch-GTNPORTAL-1700/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl 2010-12-02
08:58:55 UTC (rev 5452)
@@ -16,7 +16,7 @@
}
%>
-<div class="UIContainer
<%=uiPortalApp.isEditing()?"EdittingContainer":""%>
<%=hasPermission?"":"ProtectedContainer"%>"
+<div class="UIContainer UITableColumnContainer
<%=uiPortalApp.isEditing()?"EdittingContainer":""%>
<%=hasPermission?"":"ProtectedContainer"%>"
id="${uicomponent.id}"
onmouseover="eXo.portal.UIPortal.blockOnMouseOver(event, this, true);"
onmouseout="eXo.portal.UIPortal.blockOnMouseOver(event, this, false);">
@@ -39,10 +39,10 @@
<%} %>
<div>
<%if(hasPermission) {%>
- <table class="UITableColumnContainer" style="margin: 0px auto;
$style">
+ <table class="UITableColumn" margin: 0px auto; $style">
<tr class="TRContainer">
<% for(uiChild in uicomponent.getChildren()) {%>
- <td class="${uiChild.id}TDContainer TDContainer"><%
uicomponent.renderUIComponent(uiChild) %></td>
+ <td class="${uiChild.id}TDContainer" <% if(uiChild.getWidth()) {
%> width="<%= uiChild.getWidth(); %>" <% } %>><%
uicomponent.renderUIComponent(uiChild) %></td>
<% } %>
</tr>
</table>
@@ -65,16 +65,16 @@
<div class="RightBar">
<div class="MiddleBar">
<div class="FixHeight ClearFix">
- <div class="DragControlArea"
title="<%=_ctx.appRes("UIContainer.tooltip.drag")%>"
onmousedown="eXo.portal.PortalDragDrop.init.call(this,event);"><span></span></div>
+ <div class="DragControlArea"
title="<%=_ctx.appRes("UITableColumnContainer.title.DragControlArea")%>"
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");
+ _ctx.appRes("UITableColumnContainer.title.Container");
%>
<div class="ContainerIcon
DefaultContainer16x16Icon"><%=hasPermission ? strTitle :
_ctx.appRes("UIPortlet.label.protectedContent")%></div>
<%if(hasPermission) {%>
- <a
href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>"
class="EditContainerIcon"
title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
- <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")%>"
class="EditContainerIcon"
title="<%=_ctx.appRes("UITableColumnContainer.tooltip.editContainer")%>"><span></span></a>
+ <a
href="<%=uicomponent.event("DeleteComponent","$uicomponent.id")%>"
class="DeleteContainerIcon"
title="<%=_ctx.appRes("UITableColumnContainer.tooltip.closeContainer")%>"><span></span></a>
<%}%>
</div>
</div>
Show replies by date