Author: rayb
Date: Fri Apr 11 04:51:45 2008
New Revision: 647130
URL:
http://svn.apache.org/viewvc?rev=647130&view=revLog:
Bug fix for the category detail page drop down menu - For pages with max view items the menu would show +1 i.e. on demo site/data category with 10 items would should as 'Page 1 of 2', with page 2 being empty in reality.
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl
Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl?rev=647130&r1=647129&r2=647130&view=diff==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl Fri Apr 11 04:51:45 2008
@@ -60,7 +60,7 @@
<#if productCategoryMembers?has_content>
<div class="product-prevnext">
<#-- Start Page Select Drop-Down -->
- <#assign viewIndexMax = Static["java.lang.Math"].ceil(listSize?double / viewSize?double)>
+ <#assign viewIndexMax = Static["java.lang.Math"].ceil((listSize - 1)?double / viewSize?double)>
<select name="pageSelect" onchange="window.location=this[this.selectedIndex].value;">
<option value="#">${uiLabelMap.CommonPage} ${viewIndex?int} ${uiLabelMap.CommonOf} ${viewIndexMax + 1}</option>
<#list 0..viewIndexMax as curViewNum>
@@ -92,7 +92,7 @@
<div class="product-prevnext">
<#-- Start Page Select Drop-Down -->
- <#assign viewIndexMax = Static["java.lang.Math"].ceil(listSize?double / viewSize?double)>
+ <#assign viewIndexMax = Static["java.lang.Math"].ceil((listSize - 1)?double / viewSize?double)>
<select name="pageSelect" onchange="window.location=this[this.selectedIndex].value;">
<option value="#">${uiLabelMap.CommonPage} ${viewIndex?int} ${uiLabelMap.CommonOf} ${viewIndexMax + 1}</option>
<#list 0..viewIndexMax as curViewNum>