Author: hansbak
Date: Sun Dec 21 19:54:37 2008 New Revision: 728596 URL: http://svn.apache.org/viewvc?rev=728596&view=rev Log: patch from Bruno in OFBIZ-2099 to set the column width in the portal functions Modified: ofbiz/trunk/framework/common/config/CommonUiLabels.xml ofbiz/trunk/framework/common/servicedef/services.xml ofbiz/trunk/framework/common/webcommon/WEB-INF/portal-controller.xml ofbiz/trunk/framework/common/webcommon/portal/portalPage.ftl ofbiz/trunk/framework/images/webapp/images/maincss.css Modified: ofbiz/trunk/framework/common/config/CommonUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/config/CommonUiLabels.xml?rev=728596&r1=728595&r2=728596&view=diff ============================================================================== --- ofbiz/trunk/framework/common/config/CommonUiLabels.xml (original) +++ ofbiz/trunk/framework/common/config/CommonUiLabels.xml Sun Dec 21 19:54:37 2008 @@ -5528,6 +5528,10 @@ <value xml:lang="zh">设置</value> <value xml:lang="zh_CN">èµå¼</value> </property> + <property key="CommonSetColumnWidth"> + <value xml:lang="en">Set Column Width...</value> + <value xml:lang="it">Larghezza colonna...</value> + </property> <property key="CommonSetNowEmpty"> <value xml:lang="ar">(سÙÙضع اÙÙÙ٠إذا Ùا٠Ùارغا)</value> <value xml:lang="de">(Wird auf 'jetzt' gesetzt, falls leer)</value> Modified: ofbiz/trunk/framework/common/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/servicedef/services.xml?rev=728596&r1=728595&r2=728596&view=diff ============================================================================== --- ofbiz/trunk/framework/common/servicedef/services.xml (original) +++ ofbiz/trunk/framework/common/servicedef/services.xml Sun Dec 21 19:54:37 2008 @@ -630,6 +630,11 @@ <auto-attributes include="nonpk" mode="IN" optional="true"/> <override name="columnSeqId" mode="OUT" optional="true"/> </service> + <service name="updatePortalPageColumn" default-entity-name="PortalPageColumn" engine="entity-auto" invoke="update" auth="true"> + <description>Update a Portal Page Column</description> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + </service> <service name="deletePortalPageColumn" default-entity-name="PortalPageColumn" engine="simple" auth="true" location="org/ofbiz/common/PortalPageServices.xml" invoke="deletePortalPageColumn"> <description>Delete a Column from a PortalPage</description> Modified: ofbiz/trunk/framework/common/webcommon/WEB-INF/portal-controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/WEB-INF/portal-controller.xml?rev=728596&r1=728595&r2=728596&view=diff ============================================================================== --- ofbiz/trunk/framework/common/webcommon/WEB-INF/portal-controller.xml (original) +++ ofbiz/trunk/framework/common/webcommon/WEB-INF/portal-controller.xml Sun Dec 21 19:54:37 2008 @@ -96,6 +96,12 @@ <response name="success" type="request" value="dashboard"/> <response name="error" type="request" value="dashboard"/> </request-map> + <request-map uri="updatePortalPageColumn"> + <security https="true" auth="true"/> + <event type="service" invoke="updatePortalPageColumn"/> + <response name="success" type="request" value="dashboard"/> + <response name="error" type="request" value="dashboard"/> + </request-map> <request-map uri="deletePortalPageColumn"> <security https="true" auth="true"/> <event type="service" invoke="deletePortalPageColumn"/> Modified: ofbiz/trunk/framework/common/webcommon/portal/portalPage.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/portal/portalPage.ftl?rev=728596&r1=728595&r2=728596&view=diff ============================================================================== --- ofbiz/trunk/framework/common/webcommon/portal/portalPage.ftl (original) +++ ofbiz/trunk/framework/common/webcommon/portal/portalPage.ftl Sun Dec 21 19:54:37 2008 @@ -28,12 +28,11 @@ <br class="clear"/> </div> </#if> - <table width="100%"> <#if configurePortalPage?has_content> <tr> <#list portalPageColumnList?if_exists as portalPageColumn> - <td class="manage-portal-column-toolbar"> + <td class="manage-portal-column-toolbar" style="vertical-align: top; <#if portalPageColumn.columnWidthPercentage?has_content> width:${portalPageColumn.columnWidthPercentage}%;</#if>"> <ul> <li id="delete-column"> <a href="<@ofbizUrl>deletePortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonDelete}</a> @@ -41,17 +40,32 @@ <li id="add-portlet"> <a href="<@ofbizUrl>AddPortlet?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&originalPortalPageId=${parameters.originalPortalPageId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonAddAPortlet}</a> </li> + <li id="column-width"> + <select name="setColWidth" onchange="window.location=this.value;"> + <option value="">${uiLabelMap.CommonSetColumnWidth}</option> + <option <#if portalPageColumn.columnWidthPercentage?default(0) == 10> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=10&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}</@ofbizUrl>">10%</option> + <option <#if portalPageColumn.columnWidthPercentage?default(0) == 20> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=20&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}</@ofbizUrl>">20%</option> + <option <#if portalPageColumn.columnWidthPercentage?default(0) == 30> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=30&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}</@ofbizUrl>">30%</option> + <option <#if portalPageColumn.columnWidthPercentage?default(0) == 40> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=40&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}</@ofbizUrl>">40%</option> + <option <#if portalPageColumn.columnWidthPercentage?default(0) == 50> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=50&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}</@ofbizUrl>">50%</option> + <option <#if portalPageColumn.columnWidthPercentage?default(0) == 60> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=60&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}</@ofbizUrl>">60%</option> + <option <#if portalPageColumn.columnWidthPercentage?default(0) == 70> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=70&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}</@ofbizUrl>">70%</option> + <option <#if portalPageColumn.columnWidthPercentage?default(0) == 80> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=80&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}</@ofbizUrl>">80%</option> + <option <#if portalPageColumn.columnWidthPercentage?default(0) == 90> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=90&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}</@ofbizUrl>">90%</option> + <option <#if portalPageColumn.columnWidthPercentage?default(0) == 100> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=100&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}</@ofbizUrl>">100%</option> + </select> + </li> </ul> </td> <#if portalPageColumn_has_next> - <td width="5px"> </td> + <td> </td> </#if> </#list> </tr> </#if> <tr> <#list portalPageColumnList?if_exists as portalPageColumn> - <td style="vertical-align: top;"<#if portalPageColumn.columnWidthPixels?has_content> width="${portalPageColumn.columnWidthPixels}"</#if>> + <td style="vertical-align: top; <#if portalPageColumn.columnWidthPercentage?has_content> width:${portalPageColumn.columnWidthPercentage}%;</#if>"> <#assign firstInColumn = true/> <#list portalPagePortletViewList as portlet> <#if (!portlet.columnSeqId?has_content && portalPageColumn_index == 0) || (portlet.columnSeqId?if_exists == portalPageColumn.columnSeqId)> @@ -124,7 +138,7 @@ </#if> </#list> <#if portalPageColumn_has_next> - <td width="5px"> </td> + <td> </td> </#if> </#list> </tr> Modified: ofbiz/trunk/framework/images/webapp/images/maincss.css URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/maincss.css?rev=728596&r1=728595&r2=728596&view=diff ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/maincss.css (original) +++ ofbiz/trunk/framework/images/webapp/images/maincss.css Sun Dec 21 19:54:37 2008 @@ -2090,6 +2090,7 @@ } .manage-portal-column-toolbar #add-portlet, -.manage-portal-column-toolbar #delete-column { +.manage-portal-column-toolbar #delete-column, +.manage-portal-column-toolbar #column-width { float: right; } |
Free forum by Nabble | Edit this page |