Author: ashish
Date: Fri Jun 26 12:12:26 2009 New Revision: 788667 URL: http://svn.apache.org/viewvc?rev=788667&view=rev Log: Applied patch from jira issue OFBIZ-2659 (Secure URLs in findOrders.ftl) Thanks Akash for your contribution. Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy ofbiz/trunk/applications/order/webapp/ordermgr/order/findOrders.ftl Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy?rev=788667&r1=788666&r2=788667&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy Fri Jun 26 12:12:26 2009 @@ -143,6 +143,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/trunk/applications/order/webapp/ordermgr/order/findOrders.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/findOrders.ftl?rev=788667&r1=788666&r2=788667&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/order/findOrders.ftl (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/order/findOrders.ftl Fri Jun 26 12:12:26 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)> @@ -481,24 +489,35 @@ <ul> <li class="h3">${uiLabelMap.OrderOrderFound}</li> <#if (orderList?has_content && 0 < orderList?size)> - <#if (viewIndex > 1)> - <li><a href="<@ofbizUrl>searchorders?viewSize=${viewSize}&viewIndex=${viewIndex-1}&hideFields=${requestParameters.hideFields?default("N")}&${paramList}</@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="<@ofbizUrl>searchorders?viewSize=${viewSize}&viewIndex=${viewIndex+1}&hideFields=${requestParameters.hideFields?default("N")}&${paramList}</@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="<@ofbizUrl>searchorders</@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"> |
Free forum by Nabble | Edit this page |