gatein SVN: r2468 - in components/wsrp/trunk/admin-gui/src/main/webapp/jsf: producer and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-04-02 09:00:21 -0400 (Fri, 02 Apr 2010)
New Revision: 2468
Modified:
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumerTemplate.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumers.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/editConsumer.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producer.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producerTemplate.xhtml
Log:
- GTNWSRP-15, GTNWSRP-18: Use commandButton where needed instead of commandLink. Downside: now looks weird, stylesheet must be tweaked.
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumerTemplate.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumerTemplate.xhtml 2010-04-02 12:57:17 UTC (rev 2467)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumerTemplate.xhtml 2010-04-02 13:00:21 UTC (rev 2468)
@@ -40,7 +40,8 @@
<div class="LeftTab">
<div class="RightTab">
<div class="MiddleTab">
- #{i18n.nav_tabs_consumers}
+ <h:commandLink id="consumersTab" action="consumers"
+ value="#{i18n.nav_tabs_consumers}"/>
</div>
</div>
</div>
@@ -88,23 +89,15 @@
<div class="ButtonLeft">
<div class="ButtonRight">
<div class="ButtonMiddle">
- <h:commandLink id="createConsumerButton"
- action="#{consumersMgr.createConsumer}"
- value="#{i18n.consumers_create_submit}"/>
+ <h:commandButton id="createConsumerButton"
+ action="#{consumersMgr.createConsumer}"
+ value="#{i18n.consumers_create_submit}"/>
</div>
</div>
</div>
</td>
</tr>
</table>
-
- <ui:remove>
- <webui:commandButton id="createConsumerButton"
- action="createConsumer"
- backingBean="#{consumersMgr}"
- value="#{i18n.consumers_create_submit}"/>
- <h:message for="consumerName" errorClass="portlet-msg-error"/>
- </ui:remove>
</h:form>
</div>
</div>
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumers.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumers.xhtml 2010-04-02 12:57:17 UTC (rev 2467)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumers.xhtml 2010-04-02 13:00:21 UTC (rev 2468)
@@ -102,18 +102,14 @@
<div class="ButtonLeft">
<div class="ButtonRight">
<div class="ButtonMiddle">
- <h:commandLink id="reloadConsumersButton" action="#{consumersMgr.reload}"
- value="#{i18n.consumers_table_reload}"/>
+ <h:commandButton id="reloadConsumersButton" action="#{consumersMgr.reload}"
+ value="#{i18n.consumers_table_reload}"/>
</div>
</div>
</div>
</td>
</tr>
</table>
- <ui:remove><webui:commandButton id="reloadConsumersButton" value="#{i18n.consumers_table_reload}"
- action="reload"
- backingBean="#{consumersMgr}"/></ui:remove>
-
</h:form>
</ui:define>
</ui:decorate>
\ No newline at end of file
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/editConsumer.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/editConsumer.xhtml 2010-04-02 12:57:17 UTC (rev 2467)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/editConsumer.xhtml 2010-04-02 13:00:21 UTC (rev 2468)
@@ -258,9 +258,9 @@
<div class="ButtonLeft">
<div class="ButtonRight">
<div class="ButtonMiddle">
- <h:commandLink id="refresh-cons-link" action="#{consumer.refreshConsumer}"
- value="#{i18n.edit_consumer_refresh}"
- title="#{i18n.edit_consumer_refresh_title}"/>
+ <h:commandButton id="refresh-cons-link" action="#{consumer.refreshConsumer}"
+ value="#{i18n.edit_consumer_refresh}"
+ title="#{i18n.edit_consumer_refresh_title}"/>
</div>
</div>
</div>
@@ -269,7 +269,7 @@
<div class="ButtonLeft">
<div class="ButtonRight">
<div class="ButtonMiddle">
- <h:commandLink id="list-cons-link" action="#{consumersMgr.listConsumers}"
+ <h:commandLink id="list-cons-link" action="#{consumersMgr.listConsumers}" immediate="true"
value="#{i18n.edit_consumer_cancel}"/>
</div>
</div>
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producer.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producer.xhtml 2010-04-02 12:57:17 UTC (rev 2467)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producer.xhtml 2010-04-02 13:00:21 UTC (rev 2468)
@@ -144,8 +144,8 @@
<div class="ButtonLeft">
<div class="ButtonRight">
<div class="ButtonMiddle">
- <h:commandLink id="reg-save" action="#{producer.save}"
- value="#{i18n.producer_config_save}"/>
+ <h:commandButton id="reg-save" action="#{producer.save}"
+ value="#{i18n.producer_config_save}"/>
</div>
</div>
</div>
@@ -154,8 +154,8 @@
<div class="ButtonLeft">
<div class="ButtonRight">
<div class="ButtonMiddle">
- <h:commandLink id="reg-reload" action="#{producer.reloadConfiguration}"
- value="#{i18n.producer_config_cancel}"/>
+ <h:commandButton id="reg-reload" action="#{producer.reloadConfiguration}"
+ value="#{i18n.producer_config_cancel}"/>
</div>
</div>
</div>
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producerTemplate.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producerTemplate.xhtml 2010-04-02 12:57:17 UTC (rev 2467)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producerTemplate.xhtml 2010-04-02 13:00:21 UTC (rev 2468)
@@ -53,7 +53,8 @@
<div class="LeftTab">
<div class="RightTab">
<div class="MiddleTab">
- #{i18n.nav_tabs_producer_config}
+ <h:commandLink id="producer-link" value="#{i18n.nav_tabs_producer_config}"
+ action="producer"/>
</div>
</div>
</div>
14 years, 9 months
gatein SVN: r2467 - in portal/trunk: web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/container and 4 other directories.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2010-04-02 08:57:17 -0400 (Fri, 02 Apr 2010)
New Revision: 2467
Added:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UITabContainer.java
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/container/ContainerConfigOption.groovy
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIContainer.gtmpl
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITabContainer.gtmpl
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIToolbarContainer.gtmpl
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainer.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainerActionListener.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/util/PortalDataMapper.java
Log:
GTNPORTAL-421 Fix bugs and improve code related to Drag & Drop in editing layout
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js 2010-04-02 12:52:13 UTC (rev 2466)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js 2010-04-02 12:57:17 UTC (rev 2467)
@@ -52,17 +52,17 @@
var properties = ["top", eXo.core.I18n.isLT() ? "left" : "right", "zIndex", "opacity", "filter", "position"] ;
this.origDragObjectStyle.copyProperties(properties, dragObject.style) ;
- var isComponent = !!DOMUtil.findFirstDescendantByClass(dragObject, "div", "UIComponentBlock");
+ var isAddingNewly = !DOMUtil.findFirstDescendantByClass(dragObject, "div", "UIComponentBlock");
var uiWorkingWS = document.getElementById("UIWorkingWorkspace");
- PortalDragDrop.positionRootObj = isComponent ? uiWorkingWS :
+ PortalDragDrop.positionRootObj = !isAddingNewly ? uiWorkingWS :
DOMUtil.findFirstDescendantByClass(uiWorkingWS, "div", "UIPortalComposer");
var originalDragObjectTop = Browser.findPosYInContainer(dragObject, PortalDragDrop.positionRootObj);
var originalDragObjectLeft = Browser.findPosXInContainer(dragObject, PortalDragDrop.positionRootObj);
PortalDragDrop.deltaYDragObjectAndMouse = Browser.findMouseRelativeY(dragObject, e);
PortalDragDrop.deltaXDragObjectAndMouse = Browser.findMouseRelativeX(dragObject, e);
- if(!isComponent) {
+ if(isAddingNewly) {
var contentContainer = DOMUtil.findAncestorByClass(dragObject, "PopupContent");
originalDragObjectTop -= contentContainer.scrollTop;
PortalDragDrop.deltaYDragObjectAndMouse += contentContainer.scrollTop;
@@ -72,13 +72,15 @@
PortalDragDrop.backupDragObjectWidth = dragObject.offsetWidth ;
/*Case: dragObject out of UIPortal*/
- if(!isComponent) {
+
+ if(isAddingNewly) {
var cloneObject = dragObject.cloneNode(true) ;
dragObject.parentNode.insertBefore(cloneObject, dragObject) ;
cloneObject.style.opacity = 0.5 ;
cloneObject.style.filter = "alpha(opacity=50)" ;
cloneObject.style.width = PortalDragDrop.backupDragObjectWidth + "px" ;
dndEvent.dragObject = cloneObject ;
+ dndEvent.dragObject.isAddingNewly = isAddingNewly;
} else {
previewBlock = PortalDragDrop.createPreview();
dragObject.parentNode.insertBefore(previewBlock, dragObject);
@@ -90,8 +92,7 @@
if(newLayer) newLayer.style.width = "300px";
}
}
- dragObject.isComponent = isComponent;
-
+ dragObject.isAddingNewly = isAddingNewly;
dragObject = dndEvent.dragObject;
dragObject.style.position = "absolute" ;
if(eXo.core.I18n.isLT()) dragObject.style.left = originalDragObjectLeft + "px" ;
@@ -110,11 +111,11 @@
if(dndEvent.foundTargetObject.className == "UIPage") {
uiComponentLayout = DOMUtil.findFirstDescendantByClass(dndEvent.foundTargetObject, "div", "VIEW-PAGE");
} else if(dndEvent.foundTargetObject.className == "UIPortal") {
- if(eXo.portal.portalMode%2) uiComponentLayout = DOMUtil.findFirstDescendantByClass(dndEvent.foundTargetObject, "div", "LAYOUT-PORTAL") ;
+ if(eXo.portal.portalMode % 2) uiComponentLayout = DOMUtil.findFirstDescendantByClass(dndEvent.foundTargetObject, "div", "LAYOUT-PORTAL") ;
else uiComponentLayout = DOMUtil.findFirstDescendantByClass(dndEvent.foundTargetObject, "div", "VIEW-PORTAL");
} else {
var foundUIComponent = new eXo.portal.UIPortalComponent(dndEvent.foundTargetObject) ;
- if(eXo.portal.portalMode%2) uiComponentLayout = foundUIComponent.getLayoutBlock() ;
+ if(eXo.portal.portalMode % 2) uiComponentLayout = foundUIComponent.getLayoutBlock() ;
else uiComponentLayout = foundUIComponent.getViewBlock();
uiComponentLayout.style.height = "auto";
}
@@ -178,10 +179,9 @@
dndEvent.foundTargetObject.foundIndex = insertPosition ;
/* Insert preview block */
- var tdBlock = document.createElement("td");
- tdBlock.id = tdBlock.className = "PreviewTDBlock";
- tdBlock.appendChild(previewBlock);
- previewTD = tdBlock;
+ previewTD = document.createElement("td");
+ previewTD.id = previewTD.className = "PreviewTDBlock";
+ previewTD.appendChild(previewBlock);
if(insertPosition >= 0) {
trContainer.insertBefore(previewTD, listComponent[insertPosition]) ;
} else {
@@ -199,12 +199,12 @@
if(dndEvent.dragObject.parentNode.nodeName.toLowerCase() == "td") {
dndEvent.dragObject.parentNode.style.width = "auto";
}
- if(!dndEvent.dragObject.isComponent) {
+ if(dndEvent.dragObject.isAddingNewly) {
dndEvent.dragObject.parentNode.removeChild(dndEvent.dragObject) ;
}
}
- if(dndEvent.dragObject.isComponent) {
+ if(!dndEvent.dragObject.isAddingNewly) {
var componentBlock = eXo.core.DOMUtil.findFirstDescendantByClass(dndEvent.dragObject, "div", "UIComponentBlock") ;
var editBlock = eXo.core.DOMUtil.findFirstChildByClass(componentBlock, "div", "EDITION-BLOCK");
if(editBlock) editBlock.style.display = "none";
@@ -229,12 +229,15 @@
var clickObject = this;
var componentBlock = DOMUtil.findAncestorByClass(clickObject, "UIComponentBlock") ;
+ //Check if it is dragging the object existing in the current layout or from the popup composer to add newly
if(componentBlock != null) {
var dragBlock = eXo.portal.UIPortal.findUIComponentOf(componentBlock) ;
DragDrop.init(eXo.portal.PortalDragDrop.findDropableTargets(dragBlock), clickObject, dragBlock, e) ;
} else {
var dragBlock = DOMUtil.findAncestorByClass(clickObject, "DragObjectPortlet") ;
+ //TODO: Seems the dragBlock is always null
if(dragBlock) {
+ eXo.debug("The dragBlock is not null");
DragDrop.init(eXo.portal.PortalDragDrop.findDropableTargets(dragBlock), clickObject, dragBlock, e) ;
} else {
DragDrop.init(eXo.portal.PortalDragDrop.findDropableTargets(dragBlock), clickObject, clickObject, e) ;
@@ -242,20 +245,25 @@
}
};
+/**
+ * Perform following works after dropping :
+ *
+ * 1. Remove the dragging object if any
+ * 2. Send an request to server side to update the changes
+ */
PortalDragDrop.prototype.doDropCallback = function(dndEvent) {
var srcElement = dndEvent.dragObject ;
var targetElement = dndEvent.foundTargetObject;
if(!targetElement) {
- if(!dndEvent.dragObject.isComponent) {
+ if(dndEvent.dragObject.isAddingNewly) {
dndEvent.dragObject.parentNode.removeChild(dndEvent.dragObject) ;
}
dndEvent.dragObject.style.width = "auto";
return;
}
- var newComponent = false;
- if(srcElement.isComponent && (targetElement.foundIndex != null)) {
+ if(!srcElement.isAddingNewly && (targetElement.foundIndex != null)) {
if(eXo.portal.PortalDragDrop.layoutTypeElementNode != null) {
eXo.portal.PortalDragDrop.divRowContainerAddChild(srcElement, targetElement, targetElement.foundIndex) ;
} else {
@@ -263,17 +271,16 @@
eXo.portal.PortalDragDrop.tableColumnContainerAddChild(srcElement, targetElement, targetElement.foundIndex) ;
}
}
-
- if(!dndEvent.dragObject.isComponent) {
- dndEvent.dragObject.parentNode.removeChild(dndEvent.dragObject) ;
- newComponent = true;
+
+ if(srcElement.isAddingNewly) {
+ eXo.core.DOMUtil.removeElement(srcElement) ;
}
var params = [
- {name: "srcID", value: (srcElement.id.replace(/^UIPortlet-/, "")).replace(/^UIContainer-/,"")},
+ {name: "srcID", value: (srcElement.id.replace(/^UIPortlet-/, ""))},
{name: "targetID", value: targetElement.id.replace(/^.*-/, "")},
{name: "insertPosition", value: targetElement.foundIndex},
- {name: "newComponent", value: newComponent}
+ {name: "isAddingNewly", value: srcElement.isAddingNewly}
] ;
try {
@@ -285,23 +292,28 @@
ajaxGet(eXo.env.server.createPortalURL("UIPortal", "MoveChild", true, params)) ;
};
-/* Find components in dropable target */
+/**
+ * Return an array of droppable target objects
+ *
+ * @param the dragging object
+ */
PortalDragDrop.prototype.findDropableTargets = function(dragBlock) {
var DOMUtil = eXo.core.DOMUtil;
var dropableTargets = new Array() ;
var uiWorkingWorkspace = document.getElementById("UIWorkingWorkspace") ;
- var uiPortal = DOMUtil.findFirstDescendantByClass(uiWorkingWorkspace, "div", "UIPortal") ;
var pagebody = document.getElementById("UIPageBody");
- var uiContainers = DOMUtil.findDescendantsByClass(uiWorkingWorkspace, "div", "UIContainer") ;
if(eXo.portal.portalMode && pagebody) {
+ var uiPortal = DOMUtil.findFirstDescendantByClass(uiWorkingWorkspace, "div", "UIPortal") ;
dropableTargets.push(uiPortal) ;
} else {
var uiPage = DOMUtil.findFirstDescendantByClass(uiWorkingWorkspace, "div", "UIPage") ;
if(uiPage) dropableTargets.push(uiPage) ;
}
+
+ var uiContainers = DOMUtil.findDescendantsByClass(uiWorkingWorkspace, "div", "UIContainer") ;
for(var i = 0; i < uiContainers.length; i++) {
- if (DOMUtil.hasAncestor(uiContainers[i], dragBlock)) continue;
+ if(DOMUtil.hasAncestor(uiContainers[i], dragBlock)) continue;
if(DOMUtil.hasClass(uiContainers[i], "ProtectedContainer")) continue;
dropableTargets.push(uiContainers[i]) ;
}
@@ -324,6 +336,12 @@
}
};
+/**
+ * Return a most suiable position among the <code>components</code> objects
+ * that the dragging object should be at
+ *
+ * @param layout {string} the layout type which is "row" or "column"
+ */
PortalDragDrop.prototype.findInsertPosition = function(components, dragObject, layout) {
if(layout == "row") {
for(var i = 0; i < components.length; i++) {
@@ -349,6 +367,9 @@
}
};
+/**
+ * Create a div block which show the preview block
+ */
PortalDragDrop.prototype.createPreview = function(layoutType) {
var previewBlock = document.createElement("div") ;
previewBlock.className = "DragAndDropPreview" ;
@@ -356,25 +377,38 @@
return previewBlock;
};
-PortalDragDrop.prototype.divRowContainerAddChild = function(insertBlock, targetElement, insertPosition) {
+/**
+ * Add the <code>srcElement</code> dragging object to a container.
+ * If the dragging object is a column then let remove it from the table column container
+ */
+PortalDragDrop.prototype.divRowContainerAddChild = function(srcElement, targetElement, insertPosition) {
var listComponent = eXo.core.DragDrop.dndEvent.foundTargetObject.listComponentInTarget ;
var uiRowContainer = eXo.core.DOMUtil.findFirstDescendantByClass(targetElement, "div", "UIRowContainer") ;
- insertBlock.style.width = "auto" ;
+ srcElement.style.width = "auto" ;
+ var parentNode = srcElement.parentNode;
if(insertPosition >= 0) {
- uiRowContainer.insertBefore(insertBlock, listComponent[insertPosition]) ;
+ uiRowContainer.insertBefore(srcElement, listComponent[insertPosition]) ;
} else {
- uiRowContainer.appendChild(insertBlock) ;
+ uiRowContainer.appendChild(srcElement) ;
}
+
+ if(parentNode.nodeName.toLowerCase() == "td") {
+ eXo.core.DOMUtil.removeElement(parentNode) ;
+ }
};
-PortalDragDrop.prototype.tableColumnContainerAddChild = function(insertBlock, targetElement, insertPosition) {
+/**
+ * Add the <code>srcElement</code> to be a column of the <code>targetElement</code> table column container
+ * at the position <code>insertPosition</code>
+ */
+PortalDragDrop.prototype.tableColumnContainerAddChild = function(srcElement, targetElement, insertPosition) {
var listComponent = eXo.core.DragDrop.dndEvent.foundTargetObject.listComponentInTarget ;
var DOMUtil = eXo.core.DOMUtil ;
var trContainer = DOMUtil.findFirstDescendantByClass(targetElement, "tr", "TRContainer") ;
var tdInserted = document.createElement('td') ;
- tdInserted.appendChild(insertBlock) ;
+ tdInserted.appendChild(srcElement) ;
if(insertPosition >= 0) {
trContainer.insertBefore(tdInserted, listComponent[insertPosition]) ;
@@ -382,7 +416,7 @@
trContainer.appendChild(tdInserted) ;
}
- insertBlock.style.width = "auto" ;
+ srcElement.style.width = "auto" ;
if(eXo.portal.PortalDragDrop.parentDragObject.nodeName.toLowerCase() == "td") {
DOMUtil.removeElement(eXo.portal.PortalDragDrop.parentDragObject) ;
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js 2010-04-02 12:52:13 UTC (rev 2466)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js 2010-04-02 12:57:17 UTC (rev 2467)
@@ -421,6 +421,10 @@
}
} ;
+/**
+ * Return the closest container of the element.
+ * It might be one of these : UIPortlet, UIContainer, UIPageBody, UIPortal
+ */
UIPortal.prototype.findUIComponentOf = function(element) {
var DOMUtil = eXo.core.DOMUtil;
var parent = element.parentNode ;
@@ -503,7 +507,11 @@
UIPortal.prototype.removeComponent = function(componentId) {
var comp = document.getElementById(componentId);
var viewPage = eXo.core.DOMUtil.findAncestorByClass(comp, "VIEW-PAGE");
- eXo.core.DOMUtil.removeElement(comp);
+
+ //Check if the removing component is a column
+ if (comp.parentNode.nodeName.toUpperCase() == "TD") eXo.core.DOMUtil.removeElement(comp.parentNode);
+ else eXo.core.DOMUtil.removeElement(comp);
+
if(viewPage && eXo.portal.UIPortal.getUIContainers().length == 0
&& eXo.portal.UIPortal.getUIPortlets().length == 0) {
viewPage.style.paddingTop = "50px" ;
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-04-02 12:52:13 UTC (rev 2466)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/container/ContainerConfigOption.groovy 2010-04-02 12:57:17 UTC (rev 2467)
@@ -45,17 +45,20 @@
SelectItemCategory column = new SelectItemCategory("column") ;
column.addSelectItemOption(new SelectItemOption("oneColumns","" +
"<container template=\"system:/groovy/portal/webui/container/UITableColumnContainer.gtmpl\">" +
+ " <factory-id>TableColumnContainer</factory-id>" +
" <container template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\"></container>" +
"</container>",
"OneRowContainerLayout")) ;
column.addSelectItemOption(new SelectItemOption("twoColumns",
"<container template=\"system:/groovy/portal/webui/container/UITableColumnContainer.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>",
"TwoColumnContainerLayout")) ;
column.addSelectItemOption(new SelectItemOption("threeColumns",
"<container template=\"system:/groovy/portal/webui/container/UITableColumnContainer.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>" +
@@ -63,6 +66,7 @@
"ThreeColumnContainerLayout")) ;
column.addSelectItemOption(new SelectItemOption("threeToolbarColumns",
"<container template=\"system:/groovy/portal/webui/container/UIToolbarContainer.gtmpl\">" +
+ " <factory-id>TableColumnContainer</factory-id>" +
" <container id=\"StarToolBarPortelt\" template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\"></container>" +
" <container id=\"UserToolBarPortelt\" template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\"></container>" +
" <container id=\"AdminToolBarPortelt\" template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\"></container>" +
@@ -73,17 +77,20 @@
SelectItemCategory autofitColumn = new SelectItemCategory("autofitColumn") ;
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>",
"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>",
"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>" +
@@ -127,6 +134,7 @@
"<container template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\">" +
" <container template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\"></container>" +
" <container template=\"system:/groovy/portal/webui/container/UITableColumnContainer.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>" +
@@ -136,6 +144,7 @@
"<container template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\">" +
" <container template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\"></container>" +
" <container template=\"system:/groovy/portal/webui/container/UITableColumnContainer.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>" +
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIContainer.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIContainer.gtmpl 2010-04-02 12:52:13 UTC (rev 2466)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIContainer.gtmpl 2010-04-02 12:57:17 UTC (rev 2467)
@@ -26,7 +26,7 @@
%>
<div class="UIContainer <%=uiPortalApp.isEditing()?"EdittingContainer":""%> <%=hasPermission?"": "ProtectedContainer"%>"
- id="UIContainer-${uicomponent.id}" ${cssStyle}
+ id="${uicomponent.id}" ${cssStyle}
onmouseover="eXo.portal.UIPortal.blockOnMouseOver(event, this, true);"
onmouseout="eXo.portal.UIPortal.blockOnMouseOver(event, this, false);">
<div class="NormalContainerBlock">
@@ -41,13 +41,13 @@
<%} else {%>
<div class="VIEW-CONTAINER VIEW-BLOCK">
<%} %>
- <div id="$uicomponent.id">
- <%if(hasPermission) {%>
+ <%if(hasPermission) {%>
<div class="UIRowContainer">
+ <div>
<%uicomponent.renderChildren();%>
+ </div>
</div>
<%} else out.print("<div class='ProtectedContent'>"+_ctx.appRes("UIPortlet.label.protectedContent")+"</div>");%>
- </div>
</div>
<%if(portalMode != UIPortalApplication.NORMAL_MODE){%>
@@ -72,8 +72,8 @@
%>
<div class="ContainerIcon"><%=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>
+ <a href="<%=uicomponent.event("DeleteComponent")%>" class="DeleteContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.closeContainer")%>"><span></span></a>
+ <a href="<%=uicomponent.event("EditContainer")%>;eXo.portal.UIPortal.changeComposerSaveButton()" class="EditContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
<%}%>
<div class="ClearBoth"><span></span></div>
</div>
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITabContainer.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITabContainer.gtmpl 2010-04-02 12:52:13 UTC (rev 2466)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITabContainer.gtmpl 2010-04-02 12:57:17 UTC (rev 2467)
@@ -36,7 +36,7 @@
String id = uicomponent.getId();
%>
<% if(children != null && children.size() > 0) { %>
-<div class="UITabContainer">
+<div class="UITabContainer" id="$id">
<div class="UIHorizontalTabs">
<div class="LeftHorizontalTabs">
<div class="RightHorizontalTabs">
Modified: 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 2010-04-02 12:52:13 UTC (rev 2466)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl 2010-04-02 12:57:17 UTC (rev 2467)
@@ -17,7 +17,7 @@
%>
<div class="UIContainer <%=uiPortalApp.isEditing()?"EdittingContainer":""%> <%=hasPermission?"":"ProtectedContainer"%>"
- id="UIContainer-${uicomponent.id}"
+ id="${uicomponent.id}"
onmouseover="eXo.portal.UIPortal.blockOnMouseOver(event, this, true);"
onmouseout="eXo.portal.UIPortal.blockOnMouseOver(event, this, false);">
<div class="NormalContainerBlock">
@@ -37,7 +37,7 @@
<%} else {%>
<div class="VIEW-CONTAINER VIEW-BLOCK">
<%} %>
- <div id="$uicomponent.id">
+ <div>
<%if(hasPermission) {%>
<table class="UITableColumnContainer" style="margin: 0px auto; $style">
<tr class="TRContainer">
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl 2010-04-02 12:52:13 UTC (rev 2466)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl 2010-04-02 12:57:17 UTC (rev 2467)
@@ -17,7 +17,7 @@
%>
<div class="UIContainer <%=uiPortalApp.isEditing()?"EdittingContainer":""%> <%=hasPermission?"":"ProtectedContainer"%>"
- id="UIContainer-${uicomponent.id}"
+ id="${uicomponent.id}"
onmouseover="eXo.portal.UIPortal.blockOnMouseOver(event, this, true);"
onmouseout="eXo.portal.UIPortal.blockOnMouseOver(event, this, false);">
<div class="NormalContainerBlock">
@@ -37,7 +37,7 @@
<%} else {%>
<div class="VIEW-CONTAINER VIEW-BLOCK">
<%} %>
- <div id="$uicomponent.id">
+ <div>
<%if(hasPermission) {%>
<table class="UITableColumnContainer" style="table-layout: fixed; margin: 0px auto; $style">
<tr class="TRContainer">
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIToolbarContainer.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIToolbarContainer.gtmpl 2010-04-02 12:52:13 UTC (rev 2466)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIToolbarContainer.gtmpl 2010-04-02 12:57:17 UTC (rev 2467)
@@ -13,7 +13,7 @@
%>
<div class="UIContainer UIToolbarContainer <%=uiPortalApp.isEditing()?"EdittingContainer":""%> <%=hasPermission?"": "ProtectedContainer"%>"
- id="UIContainer-${uicomponent.id}"
+ id="${uicomponent.id}"
onmouseover="eXo.portal.UIPortal.blockOnMouseOver(event, this, true);"
onmouseout="eXo.portal.UIPortal.blockOnMouseOver(event, this, false);">
<div class="NormalContainerBlock">
@@ -33,7 +33,7 @@
<%} else {%>
<div class="VIEW-CONTAINER ToolbarContainer VIEW-BLOCK">
<%} %>
- <div id="$uicomponent.id">
+ <div>
<%if(hasPermission) {%>
<div class="UITableColumnContainer" style="margin: 0px auto; $style">
<div class="TRContainer" style="zoom: 100%;">
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainer.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainer.java 2010-04-02 12:52:13 UTC (rev 2466)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainer.java 2010-04-02 12:57:17 UTC (rev 2467)
@@ -19,30 +19,19 @@
package org.exoplatform.portal.webui.container;
-import org.exoplatform.portal.webui.container.UIContainerActionListener.EditContainerActionListener;
import org.exoplatform.portal.webui.portal.UIPortalComponent;
import org.exoplatform.portal.webui.portal.UIPortalComponentActionListener.DeleteComponentActionListener;
import org.exoplatform.webui.config.annotation.ComponentConfig;
-import org.exoplatform.webui.config.annotation.ComponentConfigs;
import org.exoplatform.webui.config.annotation.EventConfig;
-import org.exoplatform.webui.core.UIComponent;
-import org.exoplatform.webui.event.Event;
-import org.exoplatform.webui.event.EventListener;
-import java.util.List;
-
/**
* May 19, 2006
*/
-@ComponentConfigs({
- @ComponentConfig(events = {@EventConfig(listeners = UIContainerActionListener.EditContainerActionListener.class),
- @EventConfig(listeners = DeleteComponentActionListener.class, confirm = "UIContainer.deleteContainer")}),
- @ComponentConfig(id = "TabContainer", template = "system:/groovy/portal/webui/container/UITabContainer.gtmpl", events = {
- @EventConfig(listeners = EditContainerActionListener.class),
- @EventConfig(listeners = DeleteComponentActionListener.class, confirm = "UIContainer.deleteContainer"),
- @EventConfig(listeners = UIContainer.SelectTabActionListener.class)})})
+@ComponentConfig(events = {@EventConfig(listeners = UIContainerActionListener.EditContainerActionListener.class),
+ @EventConfig(listeners = DeleteComponentActionListener.class, confirm = "UIContainer.deleteContainer")})
public class UIContainer extends UIPortalComponent
{
+ public static final String TABLE_COLUMN_CONTAINER = "TableColumnContainer";
/** Storage id. */
private String storageId;
@@ -84,29 +73,4 @@
{
this.description = desc;
}
-
- static public class SelectTabActionListener extends EventListener<UIContainer>
- {
- public void execute(Event<UIContainer> event) throws Exception
- {
- String objectId = event.getRequestContext().getRequestParameter(OBJECTID);
- UIContainer container = event.getSource();
- UIComponent goal = container.findComponentById(objectId);
- if (goal == null)
- {
- return;
- }
- UIContainer parent = goal.getParent();
- List<UIComponent> children = parent.getChildren();
- for (UIComponent child : children)
- {
- if (child.getId().equals(objectId))
- {
- child.setRendered(true);
- continue;
- }
- child.setRendered(false);
- }
- }
- }
}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainerActionListener.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainerActionListener.java 2010-04-02 12:52:13 UTC (rev 2466)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainerActionListener.java 2010-04-02 12:57:17 UTC (rev 2467)
@@ -23,7 +23,6 @@
import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.portal.webui.workspace.UIMaskWorkspace;
import org.exoplatform.portal.webui.workspace.UIPortalApplication;
-import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
@@ -40,29 +39,14 @@
{
UIContainer uiContainer = event.getSource();
- String id = event.getRequestContext().getRequestParameter(UIComponent.OBJECTID);
-
UIPortal uiPortal = Util.getUIPortal();
UIPortalApplication uiApp = uiPortal.getAncestorOfType(UIPortalApplication.class);
UIMaskWorkspace uiMaskWS = uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
UIContainerForm containerForm = uiMaskWS.createUIComponent(UIContainerForm.class, null, null);
- if (uiContainer.getId().equals(id))
- {
- containerForm.setValues(uiContainer);
- }
- else
- {
- if (uiContainer.getChildById(id) != null)
- {
- containerForm.setValues((UIContainer)uiContainer.getChildById(id));
- }
- else
- return;
- }
+ containerForm.setValues(uiContainer);
uiMaskWS.setUIComponent(containerForm);
uiMaskWS.setShow(true);
event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWS);
- // Util.updateUIApplication(event);
}
}
}
Added: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UITabContainer.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UITabContainer.java (rev 0)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UITabContainer.java 2010-04-02 12:57:17 UTC (rev 2467)
@@ -0,0 +1,72 @@
+/**
+ * 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
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.webui.container;
+
+import org.exoplatform.portal.webui.container.UIContainerActionListener.EditContainerActionListener;
+import org.exoplatform.portal.webui.portal.UIPortalComponentActionListener.DeleteComponentActionListener;
+import org.exoplatform.webui.config.annotation.ComponentConfig;
+import org.exoplatform.webui.config.annotation.EventConfig;
+import org.exoplatform.webui.core.UIComponent;
+import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.EventListener;
+
+import java.util.List;
+
+/**
+ * May 19, 2006
+ */
+@ComponentConfig(template = "system:/groovy/portal/webui/container/UITabContainer.gtmpl", events = {
+ @EventConfig(listeners = EditContainerActionListener.class),
+ @EventConfig(listeners = DeleteComponentActionListener.class, confirm = "UIContainer.deleteContainer"),
+ @EventConfig(listeners = UITabContainer.SelectTabActionListener.class)})
+public class UITabContainer extends UIContainer
+{
+ public static final String TAB_CONTAINER = "TabContainer";
+
+ public UITabContainer()
+ {
+ super();
+ }
+
+ static public class SelectTabActionListener extends EventListener<UITabContainer>
+ {
+ public void execute(Event<UITabContainer> event) throws Exception
+ {
+ String objectId = event.getRequestContext().getRequestParameter(OBJECTID);
+ UITabContainer container = event.getSource();
+ UIComponent goal = container.findComponentById(objectId);
+ if (goal == null)
+ {
+ return;
+ }
+ UITabContainer parent = goal.getParent();
+ List<UIComponent> children = parent.getChildren();
+ for (UIComponent child : children)
+ {
+ if (child.getId().equals(objectId))
+ {
+ child.setRendered(true);
+ continue;
+ }
+ child.setRendered(false);
+ }
+ }
+ }
+}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java 2010-04-02 12:52:13 UTC (rev 2466)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java 2010-04-02 12:57:17 UTC (rev 2467)
@@ -21,7 +21,6 @@
import org.exoplatform.portal.account.UIAccountSetting;
import org.exoplatform.portal.application.PortalRequestContext;
-import org.exoplatform.portal.config.UserPortalConfigService;
import org.exoplatform.portal.config.model.PageNavigation;
import org.exoplatform.portal.config.model.PageNode;
import org.exoplatform.portal.config.model.PortalConfig;
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java 2010-04-02 12:52:13 UTC (rev 2466)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java 2010-04-02 12:57:17 UTC (rev 2467)
@@ -19,8 +19,6 @@
package org.exoplatform.portal.webui.portal;
-import java.util.List;
-
import org.exoplatform.application.registry.Application;
import org.exoplatform.portal.application.PortalRequestContext;
import org.exoplatform.portal.config.UserACL;
@@ -34,6 +32,7 @@
import org.exoplatform.portal.webui.application.UIApplicationList;
import org.exoplatform.portal.webui.application.UIPortlet;
import org.exoplatform.portal.webui.container.UIContainerList;
+import org.exoplatform.portal.webui.container.UITabContainer;
import org.exoplatform.portal.webui.login.UILogin;
import org.exoplatform.portal.webui.login.UIResetPassword;
import org.exoplatform.portal.webui.page.UIPage;
@@ -58,10 +57,13 @@
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
+import java.util.List;
+
/** Author : Nhu Dinh Thuan nhudinhthuan(a)yahoo.com Jun 14, 2006 */
public class UIPortalComponentActionListener
{
-
+ private final static String UI_PORTLET_PREFIX = "UIPortlet-";
+
static public class ViewChildActionListener extends EventListener<UIContainer>
{
public void execute(Event<UIContainer> event) throws Exception
@@ -88,29 +90,22 @@
static public class DeleteComponentActionListener extends EventListener<UIComponent>
{
- private final static String UI_CONTAINER_PREFIX = "UIContainer-";
-
- private final static String UI_PORTLET_PREFIX = "UIPortlet-";
-
public void execute(Event<UIComponent> event) throws Exception
{
- String id = event.getRequestContext().getRequestParameter(UIComponent.OBJECTID);
- UIComponent uiComponent = event.getSource();
- UIPortalComponent uiParent = (UIPortalComponent)uiComponent.getParent();
- UIComponent uiRemoveComponent = uiParent.findComponentById(id);
+ UIComponent uiComponentTobeRemoved = event.getSource();
+ String id = uiComponentTobeRemoved.getId();
UIPortalApplication uiApp = Util.getUIPortalApplication();
- if (uiRemoveComponent.findFirstComponentOfType(UIPageBody.class) != null)
+ if (uiComponentTobeRemoved.findFirstComponentOfType(UIPageBody.class) != null)
{
uiApp.addMessage(new ApplicationMessage("UIPortalApplication.msg.deletePageBody", new Object[]{},
ApplicationMessage.WARNING));
return;
}
- uiParent.removeChildById(id);
UIPortalComposer portalComposer = uiApp.findFirstComponentOfType(UIPortalComposer.class);
portalComposer.setEditted(true);
- UIPage uiPage = uiParent.getAncestorOfType(UIPage.class);
+ UIPage uiPage = uiComponentTobeRemoved.getAncestorOfType(UIPage.class);
if (uiPage != null && uiPage.getMaximizedUIPortlet() != null)
{
if (id.equals(uiPage.getMaximizedUIPortlet().getId()))
@@ -140,128 +135,66 @@
}
}
}
- Util.showComponentLayoutMode(uiRemoveComponent.getClass());
+ Util.showComponentLayoutMode(uiComponentTobeRemoved.getClass());
PortalRequestContext pcontext = (PortalRequestContext)event.getRequestContext();
- // Case1: current component is a portlet
- if (uiComponent instanceof UIPortlet)
+ org.exoplatform.portal.webui.container.UIContainer uiParent = uiComponentTobeRemoved.getParent();
+ if (UITabContainer.TAB_CONTAINER.equals(uiParent.getFactoryId()))
{
- removeComponent(id, UI_PORTLET_PREFIX, pcontext);
- return;
- }
-
- // Case 2: current component is a container
- if (uiComponent instanceof org.exoplatform.portal.webui.container.UIContainer)
- {
- org.exoplatform.portal.webui.container.UIContainer topAncestor =
- getTopBlockContainer((org.exoplatform.portal.webui.container.UIContainer)uiParent);
-
- /**
- * topAncestor is null if the uiParent is either UIPortal or UIPage,
- * that happens when our container is a simple container
+ /*
+ * Check if it is removing the last tab then we will remove the TabContainer as well
+ *
+ * Indeed, a TabContainer is nested into a normal container so
+ * we should remove the its parent instead of itself when we delete the last tab
*/
- if (topAncestor == null)
+ if (uiParent.getChildren().size() == 1)
{
- removeComponent(id, UI_CONTAINER_PREFIX, pcontext);
- return;
+ uiComponentTobeRemoved = uiParent.getParent();
}
- /** Case of nested container like tab container, mixed container */
else
{
- String topAncestorId = topAncestor.getId();
-
- /** If the topAncestor has no child, then it is removed */
- if (topAncestor.getChildren().size() == 0)
- {
- /** Update server-side */
- UIContainer parentOfTopAncestor = topAncestor.getParent();
- parentOfTopAncestor.removeChildById(topAncestorId);
-
- /** Update client side */
- if (topAncestorId.startsWith(UI_CONTAINER_PREFIX))
- {
- topAncestorId = topAncestorId.substring(UI_CONTAINER_PREFIX.length());
- topAncestor.setId(topAncestorId);
- }
- removeComponent(topAncestorId, UI_CONTAINER_PREFIX, pcontext);
- return;
- }
-
- /**
- * If the uiParent is not the topAncestor and having no child,
- * then it is removed
- */
- if (uiParent.getChildren().size() == 0)
- {
- /** Update server-side */
- UIContainer itsParent = uiParent.getParent();
- itsParent.removeChildById(uiParent.getId());
- }
-
- /**
- * Update the topAncestor by Ajax
- */
- if (!topAncestorId.startsWith(UI_CONTAINER_PREFIX))
- {
- topAncestor.setId(UI_CONTAINER_PREFIX + topAncestorId);
- }
- pcontext.addUIComponentToUpdateByAjax(topAncestor);
+ removeUIComponent(uiComponentTobeRemoved, pcontext, true);
return;
}
}
-
+ else if (org.exoplatform.portal.webui.container.UIContainer.TABLE_COLUMN_CONTAINER.equals(uiParent.getFactoryId()))
+ {
+ if (uiParent.getChildren().size() == 1)
+ {
+ uiComponentTobeRemoved = uiParent;
+ }
+ }
+
+ removeUIComponent(uiComponentTobeRemoved, pcontext, false);
}
- /** Add Javascript script to remove component */
- private void removeComponent(String componentId, String componentType, PortalRequestContext pcontext)
- {
- String scriptRemovingComponent = scriptRemovingComponent(componentId, componentType);
- JavascriptManager jsManager = pcontext.getJavascriptManager();
- jsManager.addJavascript(scriptRemovingComponent);
- jsManager.addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
- }
-
- private String scriptRemovingComponent(String componentId, String prefix)
- {
+ }
+
+ /**
+ * Remove an UIComponent from server side and
+ * adding removing behaviors in javascript to clients if necessary
+ */
+ private static void removeUIComponent(UIComponent uiComponent, PortalRequestContext pcontext, boolean isUpdate)
+ {
+ UIContainer uiParent = uiComponent.getParent();
+ uiParent.getChildren().remove(uiComponent);
+
+ JavascriptManager jsManager = pcontext.getJavascriptManager();
+ if(isUpdate) {
+ pcontext.addUIComponentToUpdateByAjax(uiParent);
+ } else {
StringBuffer buffer = new StringBuffer();
buffer.append("eXo.portal.UIPortal.removeComponent('");
- buffer.append(prefix);
- buffer.append(componentId);
- buffer.append("');");
- return buffer.toString();
- }
-
- /**
- * Returns the top ancestor( of type
- * org.exoplatform.portal.webui.container.UIContainer but not of type
- * UIPortal or UIPage) of a given container
- */
- private static org.exoplatform.portal.webui.container.UIContainer getTopBlockContainer(
- org.exoplatform.portal.webui.container.UIContainer container)
- {
- if (container instanceof UIPortal || container instanceof UIPage)
+ if (uiComponent instanceof UIPortlet)
{
- return null;
+ buffer.append(UI_PORTLET_PREFIX);
}
- org.exoplatform.portal.webui.container.UIContainer topAncestor = container;
- org.exoplatform.portal.webui.container.UIContainer intermediateCont;
- try
- {
- intermediateCont = topAncestor.getParent();
- while (intermediateCont != null && !(intermediateCont instanceof UIPortal)
- && !(intermediateCont instanceof UIPage))
- {
- topAncestor = intermediateCont;
- intermediateCont = topAncestor.getParent();
- }
- }
- catch (ClassCastException ex)
- {
-
- }
- return topAncestor;
+ buffer.append(uiComponent.getId());
+ buffer.append("');");
+ jsManager.addJavascript(buffer.toString());
}
+ jsManager.addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
}
static public class MoveChildActionListener extends EventListener<UIContainer>
@@ -281,7 +214,7 @@
}
boolean newComponent = false;
- String paramNewComponent = pcontext.getRequestParameter("newComponent");
+ String paramNewComponent = pcontext.getRequestParameter("isAddingNewly");
if (paramNewComponent != null)
newComponent = Boolean.valueOf(paramNewComponent).booleanValue();
@@ -401,7 +334,7 @@
return;
}
- UIContainer uiParent = uiSource.getParent();
+ org.exoplatform.portal.webui.container.UIContainer uiParent = uiSource.getParent();
if (uiParent == uiTarget)
{
int currentIdx = uiTarget.getChildren().indexOf(uiSource);
@@ -420,9 +353,31 @@
uiTarget.getChildren().add(position, uiSource);
return;
}
- uiParent.getChildren().remove(uiSource);
+
uiTarget.getChildren().add(position, uiSource);
uiSource.setParent(uiTarget);
+
+ if (UITabContainer.TAB_CONTAINER.equals(uiParent.getFactoryId()))
+ {
+ if (uiParent.getChildren().size() == 1)
+ {
+ removeUIComponent(uiParent.getParent(), pcontext, false);
+ }
+ else
+ {
+ uiParent.getChildren().remove(uiSource);
+ pcontext.addUIComponentToUpdateByAjax(uiParent);
+ }
+ }
+ else if (org.exoplatform.portal.webui.container.UIContainer.TABLE_COLUMN_CONTAINER.equals(uiParent
+ .getFactoryId()) && uiParent.getChildren().size() == 1)
+ {
+ removeUIComponent(uiParent, pcontext, false);
+ }
+ else
+ {
+ uiParent.getChildren().remove(uiSource);
+ }
}
}
@@ -454,12 +409,12 @@
if (token == null)
{
WebuiRequestContext requestContext = event.getRequestContext();
- requestContext.getUIApplication().addMessage(
- new ApplicationMessage("UIForgetPassword.msg.expration", null));
+ requestContext.getUIApplication()
+ .addMessage(new ApplicationMessage("UIForgetPassword.msg.expration", null));
requestContext.addUIComponentToUpdateByAjax(uiPortal.getParent());
return;
}
-
+
UIPortalApplication uiApp = uiPortal.getAncestorOfType(UIPortalApplication.class);
UIMaskWorkspace uiMaskWS = uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/util/PortalDataMapper.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/util/PortalDataMapper.java 2010-04-02 12:52:13 UTC (rev 2466)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/util/PortalDataMapper.java 2010-04-02 12:57:17 UTC (rev 2467)
@@ -34,6 +34,7 @@
import org.exoplatform.portal.webui.application.UIGadget;
import org.exoplatform.portal.webui.application.UIPortlet;
import org.exoplatform.portal.webui.container.UIContainer;
+import org.exoplatform.portal.webui.container.UITabContainer;
import org.exoplatform.portal.webui.page.UIPage;
import org.exoplatform.portal.webui.page.UIPageBody;
import org.exoplatform.portal.webui.page.UISiteBody;
@@ -406,8 +407,16 @@
else if (model instanceof Container)
{
Container container = (Container)model;
- UIContainer uiTempContainer =
- uiContainer.createUIComponent(context, UIContainer.class, container.getFactoryId(), null);
+ UIContainer uiTempContainer ;
+ if(UITabContainer.TAB_CONTAINER.equals(container.getFactoryId()))
+ {
+ uiTempContainer = uiContainer.createUIComponent(context, UITabContainer.class, null, null);
+ }
+ else
+ {
+ uiTempContainer = uiContainer.createUIComponent(context, UIContainer.class, null, null);
+ }
+
toUIContainer(uiTempContainer, (Container)model, dashboard);
uiComponent = uiTempContainer;
}
14 years, 9 months
gatein SVN: r2466 - components/wsrp/trunk.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-04-02 08:52:13 -0400 (Fri, 02 Apr 2010)
New Revision: 2466
Modified:
components/wsrp/trunk/UpdateWSRPForGateIn.sh
Log:
- Relaxed version regular expression.
Modified: components/wsrp/trunk/UpdateWSRPForGateIn.sh
===================================================================
--- components/wsrp/trunk/UpdateWSRPForGateIn.sh 2010-04-02 10:05:03 UTC (rev 2465)
+++ components/wsrp/trunk/UpdateWSRPForGateIn.sh 2010-04-02 12:52:13 UTC (rev 2466)
@@ -34,7 +34,7 @@
export CURRENT_WSRP=`grep -m 1 ".*<version>\(.*\)<\/version>.*" pom.xml | sed -n -e 's/.*<version>\(.*\)<\/.*/\1/p'`
# extract the current version of WSRP module from existing files
-DEPLOYED_WSRP=`ls $GATEIN_EAR_HOME/lib/wsrp* | sed -n '1 s/.*\/.*-\([0-9]\.[0-9].[0-9]-.*-.*\).jar/\1/p'`
+DEPLOYED_WSRP=`ls $GATEIN_EAR_HOME/lib/wsrp* | sed -n '1 s/.*\/.*-\([0-9]\.[0-9].[0-9].*\).jar/\1/p'`
echo Deployed WSRP version: \'$DEPLOYED_WSRP\'
echo Current WSRP version in project POM: \'$CURRENT_WSRP\'
14 years, 9 months
gatein SVN: r2465 - in portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin: webui/component/UIBarDecorator/UIInfoBar and 1 other directory.
by do-not-reply@jboss.org
Author: thuy.nguyen
Date: 2010-04-02 06:05:03 -0400 (Fri, 02 Apr 2010)
New Revision: 2465
Modified:
portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPortalComponent/Stylesheet.css
portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIInfoBar/Stylesheet.css
Log:
PORTAL-422: Bug JS: Error displaying in Portlet Icon
Modified: portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPortalComponent/Stylesheet.css
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPortalComponent/Stylesheet.css 2010-04-02 10:02:06 UTC (rev 2464)
+++ portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPortalComponent/Stylesheet.css 2010-04-02 10:05:03 UTC (rev 2465)
@@ -51,8 +51,8 @@
}
.UIPortlet .EditPortletPropertiesIcon {
- float: right; /* orientation=lt */
- float: left; /* orientation=rt */
+ float: left; /* orientation=lt */
+ float: right; /* orientation=rt */
width: 20px; height: 20px;
background: url('background/Pen.gif') no-repeat top;
margin: 4px 0px 0px 5px; /* orientation=lt */
@@ -60,8 +60,8 @@
}
.UIPortlet .DeletePortletIcon {
- float: right; /* orientation=lt */
- float: left; /* orientation=rt */
+ float: left; /* orientation=lt */
+ float: right; /* orientation=rt */
width: 20px; height:20px;
background: url('background/Close.gif') no-repeat bottom;
margin: 0px 0px 0px 2px; /* orientation=lt */
@@ -139,24 +139,6 @@
_height: 86px;
}
-.UIContainer .EditPortletPropertiesIcon {
- float: right; /* orientation=lt */
- float: left; /* orientation=rt */
- width: 20px; height: 20px;
- background: url('background/Pen.png') no-repeat top;
- margin: 2px 0px 0px 5px; /* orientation=lt */
- margin: 2px 5px 0px 0px; /* orientation=rt */
-}
-
-.UIContainer .DeletePortletIcon {
- float: right; /* orientation=lt */
- float: left; /* orientation=rt */
- width: 20px; height:20px;
- background: url('background/close.png') no-repeat bottom;
- margin: 1px 0px 0px 2px; /* orientation=lt */
- margin: 1px 2px 0px 0px; /* orientation=rt */
-}
-
.UIContainer .NewLayer {
background: #93c0e2;
filter: alpha(opacity=40);
@@ -200,8 +182,8 @@
}
.UIContainer .EditContainerIcon {
- float: right; /* orientation=lt */
- float: left; /* orientation=rt */
+ float: left; /* orientation=lt */
+ float: right; /* orientation=rt */
width: 22px; height: 16px;
background: url('background/Pen.gif') no-repeat top;
margin: 4px 2px 0px 0px; /* orientation=lt */
@@ -209,8 +191,8 @@
}
.UIContainer .DeleteContainerIcon {
- float: right; /* orientation=lt */
- float: left; /* orientation=rt */
+ float: left; /* orientation=lt */
+ float: right; /* orientation=rt */
width: 22px; height: 16px;
background: url('background/Close.gif') no-repeat bottom;
margin: 4px 0px 0px 0px; /* orientation=lt */
Modified: portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIInfoBar/Stylesheet.css
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIInfoBar/Stylesheet.css 2010-04-02 10:02:06 UTC (rev 2464)
+++ portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIInfoBar/Stylesheet.css 2010-04-02 10:05:03 UTC (rev 2465)
@@ -80,7 +80,6 @@
.UIInfoBar .BlueRoundedStyle .FixHeight {
height: 26px;
- *width: 270px;
white-space: nowrap;
}
14 years, 9 months
gatein SVN: r2464 - in portal/trunk/testsuite: selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design and 1 other directory.
by do-not-reply@jboss.org
Author: arthurpeltier
Date: 2010-04-02 06:02:06 -0400 (Fri, 02 Apr 2010)
New Revision: 2464
Added:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_12_02_007_EditCurrentPortalWithNoOneForEditRight.html
Modified:
portal/trunk/testsuite/GateIn_v3.0_MainFucntions_TestDefinition.ods
Log:
GTNPORTAL-775 : * Created Test "POR_12_002_007"
Modified: portal/trunk/testsuite/GateIn_v3.0_MainFucntions_TestDefinition.ods
===================================================================
(Binary files differ)
Added: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_12_02_007_EditCurrentPortalWithNoOneForEditRight.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_12_02_007_EditCurrentPortalWithNoOneForEditRight.html (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_12_02_007_EditCurrentPortalWithNoOneForEditRight.html 2010-04-02 10:02:06 UTC (rev 2464)
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>Test_POR_12_02_007_EditCurrentPortalWithNoOneForEditRight</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_POR_12_02_007_EditCurrentPortalWithNoOneForEditRight</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/private/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Edit Current Portal With No one For Edit Right</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>username</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>root</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>gtn</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Site Editor</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Site Editor</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Layout</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Layout</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>- Change Portal Properties -</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Portal Properties</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Portal Properties</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>UIPortalForm</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[contains(@onclick,"submitEvent('UIPortalForm','SelectTab','&objectId=PermissionSetting")]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyElementPresent</td>
+ <td>link=Edit Permission Setting</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Permission Setting</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>- Delete all edit permissions -</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyElementPresent</td>
+ <td>link=Delete Permission</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Delete Permission</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>- Verify Pop-up alert presence -</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@class='PopupMessage']</td>
+ <td>The "editPermission" list can not be empty.</td>
+</tr>
+<tr>
+ <td>verifyElementPresent</td>
+ <td>//div[@class='PopupMessage']</td>
+ <td>The "editPermission" list can not be empty.</td>
+</tr>
+<tr>
+ <td>verifyElementPresent</td>
+ <td>link=OK</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=OK</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyElementPresent</td>
+ <td>link=Cancel</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Cancel</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>UIPortalComposer</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPortalComposer']/div[1]//a[1]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>- Sign Out -</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
14 years, 9 months
gatein SVN: r2463 - portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIToolbar.
by do-not-reply@jboss.org
Author: thuy.nguyen
Date: 2010-04-02 05:45:50 -0400 (Fri, 02 Apr 2010)
New Revision: 2463
Modified:
portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIToolbar/Stylesheet.css
Log:
GTNPORTAL-20: Content in form doesn't match it
Modified: portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIToolbar/Stylesheet.css
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIToolbar/Stylesheet.css 2010-04-02 08:28:27 UTC (rev 2462)
+++ portal/trunk/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIToolbar/Stylesheet.css 2010-04-02 09:45:50 UTC (rev 2463)
@@ -74,7 +74,9 @@
color: #7E9BC9;
font-weight: bold;
padding: 0px 3px 0px 3px;
- cursor: pointer;
+ cursor: pointer;
+ white-space: nowrap;
+ overflow: hidden;
}
.UIToolbar .LargeToolbar a:hover{
@@ -98,7 +100,7 @@
float: right; /* orientation=rt */
padding-top: 3px;
cursor: pointer;
- width: 120px;
+ width: 130px;
}
.UIToolbar .LargeToolbar .GroupButton {
@@ -106,7 +108,7 @@
float: right; /* orientation=rt */
padding-top: 3px;
cursor: pointer;
- width: 130px;
+ width: 140px;
}
.UIToolbar .LargeToolbar .MembershipButton {
@@ -114,7 +116,7 @@
float: right; /* orientation=rt */
padding-top: 3px;
cursor: pointer;
- width: 170px;
+ width: 180px;
}
.UIToolbar .LargeToolbar .ButtonLabel {
14 years, 9 months
gatein SVN: r2462 - in portal/trunk: web/eXoResources/src/main/webapp/WEB-INF and 1 other directory.
by do-not-reply@jboss.org
Author: kien_nguyen
Date: 2010-04-02 04:28:27 -0400 (Fri, 02 Apr 2010)
New Revision: 2462
Modified:
portal/trunk/portlet/web/src/main/webapp/WEB-INF/gatein-resources.xml
portal/trunk/portlet/web/src/main/webapp/WEB-INF/portlet.xml
portal/trunk/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml
Log:
GTNPORTAL-891 remove call two portlet with the same name and remove some classes and configuration file that don't be used in project
Modified: portal/trunk/portlet/web/src/main/webapp/WEB-INF/gatein-resources.xml
===================================================================
--- portal/trunk/portlet/web/src/main/webapp/WEB-INF/gatein-resources.xml 2010-04-02 02:52:52 UTC (rev 2461)
+++ portal/trunk/portlet/web/src/main/webapp/WEB-INF/gatein-resources.xml 2010-04-02 08:28:27 UTC (rev 2462)
@@ -51,18 +51,7 @@
<portlet-name>NavigationPortlet</portlet-name>
<skin-name>Default</skin-name>
<css-path>/skin/portal/webui/component/UINavigationPortlet/DefaultStylesheet.css</css-path>
- </portlet-skin>
-
-
- <!-- PortalNavigationPortlet skins -->
-
- <portlet-skin>
- <application-name>web</application-name>
- <portlet-name>PortalNavigationPortlet2</portlet-name>
- <skin-name>Default</skin-name>
- <css-path>/skin/portal/webui/component/UIPortalNavigationPortlet/DefaultStylesheet.css</css-path>
- </portlet-skin>
-
+ </portlet-skin>
<!-- SiteMapPortlet skins -->
Modified: portal/trunk/portlet/web/src/main/webapp/WEB-INF/portlet.xml
===================================================================
--- portal/trunk/portlet/web/src/main/webapp/WEB-INF/portlet.xml 2010-04-02 02:52:52 UTC (rev 2461)
+++ portal/trunk/portlet/web/src/main/webapp/WEB-INF/portlet.xml 2010-04-02 08:28:27 UTC (rev 2462)
@@ -201,38 +201,6 @@
</portlet>
<portlet>
- <description xml:lang="EN">Portal Navigation Portlet</description>
- <portlet-name>PortalNavigationPortlet2</portlet-name>
- <display-name xml:lang="EN">Portal Navigation Portlet</display-name>
- <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
-
- <init-param>
- <name>webui.configuration</name>
- <value>/WEB-INF/conf/portlet/web/PortalNavigationPortlet/webui/configuration.xml</value>
- </init-param>
-
- <expiration-cache>0</expiration-cache>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>help</portlet-mode>
- </supports>
- <supported-locale>en</supported-locale>
- <resource-bundle>locale.portlet.portal.PortalNavigationPortlet</resource-bundle>
- <portlet-info>
- <title>Portal Navigation Portlet</title>
- <short-title>Portal Navigation Portlet</short-title>
- <keywords>System</keywords>
- </portlet-info>
- <portlet-preferences>
- <preference>
- <name>useAJAX</name>
- <value>false</value>
- <read-only>false</read-only>
- </preference>
- </portlet-preferences>
- </portlet>
-
- <portlet>
<description xml:lang="EN">SiteMap Portlet</description>
<portlet-name>SiteMapPortlet</portlet-name>
<display-name xml:lang="EN">Site Map Portlet</display-name>
Modified: portal/trunk/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml 2010-04-02 02:52:52 UTC (rev 2461)
+++ portal/trunk/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml 2010-04-02 08:28:27 UTC (rev 2462)
@@ -297,10 +297,6 @@
<js-path>/javascript/eXo/portal/UIPortalNavigation.js</js-path>
</param>
<param>
- <js-module>eXo.portal.UIPortalNavigation2</js-module>
- <js-path>/javascript/eXo/portal/UIPortalNavigation2.js</js-path>
- </param>
- <param>
<js-module>eXo.portal.UIMaskWorkspace</js-module>
<js-path>/javascript/eXo/portal/UIMaskWorkspace.js</js-path>
</param>
@@ -316,4 +312,4 @@
<js-path>/javascript/eXo/webui/UIPortlet.js</js-path>
</param>
</javascript>
-</gatein-resources>
\ No newline at end of file
+</gatein-resources>
14 years, 9 months
gatein SVN: r2461 - in portal/trunk/web: eXoResources/src/main/webapp/javascript/eXo/webui and 1 other directories.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2010-04-01 22:52:52 -0400 (Thu, 01 Apr 2010)
New Revision: 2461
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UINotification.js
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/workspace/UIPortalApplication.gtmpl
Log:
Logging ability with Javascript in developing mode
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UINotification.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UINotification.js 2010-04-01 22:00:42 UTC (rev 2460)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UINotification.js 2010-04-02 02:52:52 UTC (rev 2461)
@@ -84,7 +84,6 @@
if (elapsed > this.slideAniLen)
this.endSlide(objectName);
else {
- var before = "before:" + this.object[objectName].id + "-" + this.object[objectName].style.height + "-";
var d =Math.round(elapsed / this.slideAniLen * this.endHeight[objectName]);
if(this.dir[objectName] == "up")
d = this.endHeight[objectName] - d;
@@ -161,16 +160,16 @@
var UIMessageContent = document.createElement('div');
this.totalCurrentMessage++;
- this.flagNoti[currMessageBoxId] = flag;
- if(!flag) {
+ this.flagNoti[currMessageBoxId] = !flag;
+ if(flag) {
this.importantNoti[this.numImptNoti] = currMessageBoxId;
this.numImptNoti++;
}
UIMessageContent.id = currMessageBoxId;
- UIMessageContent.style.height = "75px";
+ UIMessageContent.style.height = "35px";
UIMessageContent.style.display = "none";
UIMessageContent.className = "Item";
- UIMessageContent.innerHTML = "<div id='UIMessageContent'>" + messageContent + "</div>";
+ UIMessageContent.innerHTML = "<div>" + messageContent + "</div>";
var UINotification = document.getElementById("UINotification");
if (UINotification == null) {
document.body.appendChild(document.createElement('div')).id = "UINotification";
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo.js 2010-04-01 22:00:42 UTC (rev 2460)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo.js 2010-04-02 02:52:52 UTC (rev 2461)
@@ -132,3 +132,11 @@
window.clearTimeout(eXo.session.itvObj) ;
eXo.session.itvObj = null ;
} ;
+
+eXo.debug = function(message) {
+ if(!eXo.developing) return;
+ if(eXo.webui.UINotification) {
+ message = "DEBUG: " + message;
+ eXo.webui.UINotification.addMessage(message);
+ }
+}
\ No newline at end of file
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/workspace/UIPortalApplication.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/workspace/UIPortalApplication.gtmpl 2010-04-01 22:00:42 UTC (rev 2460)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/workspace/UIPortalApplication.gtmpl 2010-04-02 02:52:52 UTC (rev 2461)
@@ -56,9 +56,12 @@
<%if(org.exoplatform.commons.utils.PropertyManager.isDevelopping()) {
for(path in scriptsPaths) { %>
<script type="text/javascript" src="<%=path%>"></script>
- <% }
- } else {
- %>
+ <%}%>
+ <script type="text/javascript">
+ eXo.developing = true ;
+ </script>
+
+ <%} else {%>
<script type="text/javascript" src="<%=docBase%>/javascript/merged.js"></script>
<%}%>
<script type="text/javascript">
14 years, 9 months
gatein SVN: r2460 - components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-04-01 18:00:42 -0400 (Thu, 01 Apr 2010)
New Revision: 2460
Modified:
components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/RegistrationEndpoint.java
Log:
- GTNWSRP-14: For some reason, deregister was not implemented correctly.
Modified: components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/RegistrationEndpoint.java
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/RegistrationEndpoint.java 2010-04-01 21:39:12 UTC (rev 2459)
+++ components/wsrp/trunk/wsrp-producer-war/src/main/java/org/gatein/wsrp/endpoints/RegistrationEndpoint.java 2010-04-01 22:00:42 UTC (rev 2460)
@@ -114,6 +114,11 @@
@WebParam(name = "extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") List<Extension> extensions)
throws InvalidRegistration, OperationFailed
{
- return null; //To change body of implemented methods use File | Settings | File Templates.
+ RegistrationContext rc = new RegistrationContext();
+ rc.setRegistrationHandle(registrationHandle);
+ rc.setRegistrationState(registrationState);
+
+ producer.deregister(rc);
+ return null;
}
}
14 years, 9 months
gatein SVN: r2458 - portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page.
by do-not-reply@jboss.org
Author: mwringe
Date: 2010-04-01 16:22:54 -0400 (Thu, 01 Apr 2010)
New Revision: 2458
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java
Log:
GTNPORTAL-575: for the portal findPath, use the default node instead of the first PageNavigation node or null if the node is empty. This will pass the correct path when accessing /portal and will have the proper link show up in the breadcrumb portlet.
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java 2010-04-01 15:53:59 UTC (rev 2457)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java 2010-04-01 20:22:54 UTC (rev 2458)
@@ -342,12 +342,13 @@
//That happens when user browses to a URL like /portal/public/classic
if(pathNodes.length == 0)
{
- nodes.add(nav.getNodes().get(0));
+ nodes.add(getDefaultNode(nav));
return nodes;
}
PageNode startNode = nav.getNode(pathNodes[0]);
if (startNode == null)
{
+ nodes.add(getDefaultNode(nav));
return nodes;
}
nodes.add(startNode);
14 years, 9 months