Author: hansbak
Date: Wed Feb 11 03:00:30 2009 New Revision: 743199 URL: http://svn.apache.org/viewvc?rev=743199&view=rev Log: correction on last commit Modified: ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml ofbiz/trunk/framework/common/webcommon/portal/editPortalPage.ftl Modified: ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml?rev=743199&r1=743198&r2=743199&view=diff ============================================================================== --- ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml (original) +++ ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml Wed Feb 11 03:00:30 2009 @@ -162,25 +162,31 @@ <first-from-list entry="ppEntry" list="ppList"/> <set field="portalPagePortlet.sequenceNum" value="${ppEntry.sequenceNum + 1}" type="Long"/> </if-compare> - <!-- update conflicting entries --> + <!-- update folowing entries in the same column if any --> <if-compare field="parameters.mode" value="BOTTOM" operator="not-equals"> <if-compare field="parameters.mode" value="DOWN" operator="equals"> - <entity-and entity-name="PortalPagePortlet" list="ppList"> - <field-map field-name="portalPageId" from-field="parameters.portalPageId"/> - <field-map field-name="sequenceNum" from-field="portalPagePortlet.sequenceNum"/> + <entity-condition entity-name="PortalPagePortlet" list="ppList"> + <condition-list combine="and"> + <condition-expr field-name="portalPageId" operator="equals" from-field="parameters.portalPageId"/> + <condition-expr field-name="columnSeqId" operator="equals" from-field="portalPagePortlet.columnSeqId"/> + <condition-expr field-name="sequenceNum" operator="greater-equals" from-field="portalPagePortlet.sequenceNum"/> + </condition-list> <order-by field-name="+sequenceNum"/> - </entity-and> + </entity-condition> <if-not-empty field="ppList"> <first-from-list entry="ppEntry" list="ppList"/> <set field="ppEntry.sequenceNum" value="${portalPagePortlet.sequenceNum - 1}" type="Long"/> <store-value value-field="ppEntry"/> </if-not-empty> - <else> - <entity-and entity-name="PortalPagePortlet" list="ppList"> - <field-map field-name="portalPageId" from-field="parameters.portalPageId"/> - <field-map field-name="sequenceNum" from-field="portalPagePortlet.sequenceNum"/> + <else><!-- this for up and top --> + <entity-condition entity-name="PortalPagePortlet" list="ppList"> + <condition-list combine="and"> + <condition-expr field-name="portalPageId" operator="equals" from-field="parameters.portalPageId"/> + <condition-expr field-name="columnSeqId" operator="equals" from-field="portalPagePortlet.columnSeqId"/> + <condition-expr field-name="sequenceNum" operator="less-equals" from-field="portalPagePortlet.sequenceNum"/> + </condition-list> <order-by field-name="-sequenceNum"/> - </entity-and> + </entity-condition> <if-not-empty field="ppList"> <first-from-list entry="ppEntry" list="ppList"/> <set field="ppEntry.sequenceNum" value="${portalPagePortlet.sequenceNum + 1}" type="Long"/> Modified: ofbiz/trunk/framework/common/webcommon/portal/editPortalPage.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/portal/editPortalPage.ftl?rev=743199&r1=743198&r2=743199&view=diff ============================================================================== --- ofbiz/trunk/framework/common/webcommon/portal/editPortalPage.ftl (original) +++ ofbiz/trunk/framework/common/webcommon/portal/editPortalPage.ftl Wed Feb 11 03:00:30 2009 @@ -65,12 +65,12 @@ <li class="edit"><a href="<@ofbizUrl>EditPortlet?${portletUrlLink}</@ofbizUrl>" title="${uiLabelMap.CommonEditPortletAttributes}"> </a></li> </#if> - <#if portlet_has_next> <#-- TODO: this doesn't take into account that later items in the list might be in a different column --> - <li class="move-down"><a href="<@ofbizUrl>updatePortalPagePortletSeq?${portletUrlLink}&mode=DOWN</@ofbizUrl>" title="${uiLabelMap.CommonMovePortletDown}"> </a></li> - </#if> <#if !firstInColumn> <li class="move-up"><a href="<@ofbizUrl>updatePortalPagePortletSeq?${portletUrlLink}&mode=UP</@ofbizUrl>" title="${uiLabelMap.CommonMovePortletUp}"> </a></li> </#if> + <#if portlet_has_next> + <li class="move-down"><a href="<@ofbizUrl>updatePortalPagePortletSeq?${portletUrlLink}&mode=DOWN</@ofbizUrl>" title="${uiLabelMap.CommonMovePortletDown}"> </a></li> + </#if> <#if portalPageColumn_has_next> <li class="move-right"><a href="<@ofbizUrl>updatePortalPagePortlet?${portletUrlLink}&columnSeqId=${portalPageColumnList[portalPageColumn_index+1].columnSeqId}</@ofbizUrl>" title="${uiLabelMap.CommonMovePortletRight}"> </a></li> </#if> @@ -80,7 +80,7 @@ <#if !firstInColumn> <li class="move-top"><a href="<@ofbizUrl>updatePortalPagePortletSeq?${portletUrlLink}&mode=TOP</@ofbizUrl>" title="${uiLabelMap.CommonMovePortletTop}"> </a></li> </#if> - <#if portlet_has_next> <#-- TODO: this doesn't take into account that later items in the list might be in a different column --> + <#if portlet_has_next> <li class="move-bottom"><a href="<@ofbizUrl>updatePortalPagePortletSeq?${portletUrlLink}&mode=BOTTOM</@ofbizUrl>" title="${uiLabelMap.CommonMovePortletBottom}"> </a></li> </#if> <#if (portalPages.size() > 1)> |
Free forum by Nabble | Edit this page |