You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2009/06/26 14:15:09 UTC
svn commit: r788669 - in
/ofbiz/branches/release09.04/applications/order/webapp/ordermgr:
WEB-INF/actions/order/FindOrders.groovy order/findOrders.ftl
Author: ashish
Date: Fri Jun 26 12:15:09 2009
New Revision: 788669
URL: http://svn.apache.org/viewvc?rev=788669&view=rev
Log:
Applied fix from trunk revision: 788667
Applied patch from jira issue OFBIZ-2659 (Secure URLs in findOrders.ftl)
Thanks Akash for your contribution.
Modified:
ofbiz/branches/release09.04/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy
ofbiz/branches/release09.04/applications/order/webapp/ordermgr/order/findOrders.ftl
Modified: ofbiz/branches/release09.04/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy?rev=788669&r1=788668&r2=788669&view=diff
==============================================================================
--- ofbiz/branches/release09.04/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy (original)
+++ ofbiz/branches/release09.04/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy Fri Jun 26 12:15:09 2009
@@ -128,6 +128,11 @@
paramList = request.getAttribute("paramList") ?: "";
context.paramList = paramList;
+if (paramList) {
+ paramIds = paramList.split("&");
+ context.paramIdList = Arrays.asList(paramIds);
+}
+
orderList = request.getAttribute("orderList");
context.orderList = orderList;
Modified: ofbiz/branches/release09.04/applications/order/webapp/ordermgr/order/findOrders.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/applications/order/webapp/ordermgr/order/findOrders.ftl?rev=788669&r1=788668&r2=788669&view=diff
==============================================================================
--- ofbiz/branches/release09.04/applications/order/webapp/ordermgr/order/findOrders.ftl (original)
+++ ofbiz/branches/release09.04/applications/order/webapp/ordermgr/order/findOrders.ftl Fri Jun 26 12:15:09 2009
@@ -59,6 +59,14 @@
form.submit();
}
// -->
+
+ function paginateOrderList(viewSize, viewIndex, hideFields) {
+ document.paginationForm.viewSize.value = viewSize;
+ document.paginationForm.viewIndex.value = viewIndex;
+ document.paginationForm.hideFields.value = hideFields;
+ document.paginationForm.submit();
+ }
+
</script>
<#if security.hasEntityPermission("ORDERMGR", "_VIEW", session)>
@@ -407,24 +415,35 @@
<ul>
<li class="h3">${uiLabelMap.OrderOrderFound}</li>
<#if (orderList?has_content && 0 < orderList?size)>
- <#if (viewIndex > 1)>
- <li><a href="<@o...@ofbizUrl>">${uiLabelMap.CommonPrevious}</a></li>
+ <#if (orderListSize > highIndex)>
+ <li><a href="javascript:paginateOrderList('${viewSize}', '${viewIndex+1}', '${requestParameters.hideFields?default("N")}')">${uiLabelMap.CommonNext}</a></li>
<#else>
- <li><span class="disabled">${uiLabelMap.CommonPrevious}</span></li>
+ <li><span class="disabled">${uiLabelMap.CommonNext}</span></li>
</#if>
<#if (orderListSize > 0)>
<li><span>${lowIndex} - ${highIndex} ${uiLabelMap.CommonOf} ${orderListSize}</span></li>
</#if>
- <#if (orderListSize > highIndex)>
- <li><a href="<@o...@ofbizUrl>">${uiLabelMap.CommonNext}</a></li>
+ <#if (viewIndex > 1)>
+ <li><a href="javascript:paginateOrderList('${viewSize}', '${viewIndex-1}', '${requestParameters.hideFields?default("N")}')">${uiLabelMap.CommonPrevious}</a></li>
<#else>
- <li><span class="disabled">${uiLabelMap.CommonNext}</span></li>
+ <li><span class="disabled">${uiLabelMap.CommonPrevious}</span></li>
</#if>
</#if>
</ul>
<br class="clear" />
</div>
<div class="screenlet-body">
+ <form name="paginationForm" method="post" action="<@o...@ofbizUrl>">
+ <input type="hidden" name="viewSize"/>
+ <input type="hidden" name="viewIndex"/>
+ <input type="hidden" name="hideFields"/>
+ <#if paramIdList?exists && paramIdList?has_content>
+ <#list paramIdList as paramIds>
+ <#assign paramId = paramIds.split("=")/>
+ <input type="hidden" name="${paramId[0]}" value="${paramId[1]}"/>
+ </#list>
+ </#if>
+ </form>
<form name="massOrderChangeForm" method="post" action="javascript:void();">
<div> </div>
<div align="right">