svn commit: r1535962 - in /ofbiz/branches/release13.07: ./ applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ applications/order/webapp/ordermgr/entry/catalog/ specialpurpose/ecommerce/webapp/ecommerce/shoppinglist/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1535962 - in /ofbiz/branches/release13.07: ./ applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ applications/order/webapp/ordermgr/entry/catalog/ specialpurpose/ecommerce/webapp/ecommerce/shoppinglist/

jleroux@apache.org
Author: jleroux
Date: Sat Oct 26 10:33:57 2013
New Revision: 1535962

URL: http://svn.apache.org/r1535962
Log:
"Applied fix from trunk for revision: 1535961 " (conflicts handled by hand)
------------------------------------------------------------------------
r1535961 | jleroux | 2013-10-26 12:22:31 +0200 (sam. 26 oct. 2013) | 14 lignes

Fixes "Pagination from category tree is flawed, and not only this pagination" https://issues.apache.org/jira/browse/OFBIZ-5372

It was already flawed in R10.04.
If you click on the Gizmos node, the pagination page shows 3 pages when there should be only 2 and if you get to the page 3 it crashes.
If you come from the breadcrumb the problem is the same.
On the other hand, from R11.04 there is a "Popular Categories" section at top of the main screen, and from there it works correctly.
But in this version the "Featured Products" pagination shows the same symptom than the category pagination.
The "Featured Products" pagination works almost correctly from R12.04, but shows 2 pages when the second is useless and empty, at least no crashes!

Note:
This has no side effects on the same in order component
Actually what we should do is to create an unique paginationControls macro but there are subtle differences and I'm afraid it would open a can of worms. I will though check...


------------------------------------------------------------------------

Modified:
    ofbiz/branches/release13.07/   (props changed)
    ofbiz/branches/release13.07/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy
    ofbiz/branches/release13.07/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl
    ofbiz/branches/release13.07/specialpurpose/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl

Propchange: ofbiz/branches/release13.07/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1535961

Modified: ofbiz/branches/release13.07/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy?rev=1535962&r1=1535961&r2=1535962&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy (original)
+++ ofbiz/branches/release13.07/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy Sat Oct 26 10:33:57 2013
@@ -39,7 +39,7 @@ viewIndex = parameters.VIEW_INDEX;
 currentCatalogId = CatalogWorker.getCurrentCatalogId(request);
 
 // set the default view size
-defaultViewSize = request.getAttribute("defaultViewSize") ?: 20;
+defaultViewSize = request.getAttribute("defaultViewSize") ?: UtilProperties.getPropertyValue("widget", "widget.form.defaultViewSize", "20");
 context.defaultViewSize = defaultViewSize;
 
 // set the limit view

Modified: ofbiz/branches/release13.07/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl?rev=1535962&r1=1535961&r2=1535962&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl (original)
+++ ofbiz/branches/release13.07/applications/order/webapp/ordermgr/entry/catalog/categorydetail.ftl Sat Oct 26 10:33:57 2013
@@ -44,29 +44,22 @@ under the License.
     <#assign viewIndexMax = Static["java.lang.Math"].ceil((listSize - 1)?double / viewSize?double)>
       <#if (viewIndexMax?int > 0)>
         <div class="product-prevnext">
-            <#-- Start Page Select Drop-Down -->
-            <#-- 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>
-                     <option value="<@ofbizCatalogAltUrl productCategoryId=productCategoryId viewSize=viewSize viewIndex=(curViewNum?int + 1)/>">${uiLabelMap.CommonGotoPage} ${curViewNum + 1}</option>
-                </#list>
-            </select -->
             <select name="pageSelect" onchange="callDocumentByPaginate(this[this.selectedIndex].value);">
-                <option value="#">${uiLabelMap.CommonPage} ${viewIndex?int + 1} ${uiLabelMap.CommonOf} ${viewIndexMax + 1}</option>
-                <#list 0..viewIndexMax as curViewNum>
-                     <option value="${productCategoryId}~${viewSize}~${curViewNum?int}">${uiLabelMap.CommonGotoPage} ${curViewNum + 1}</option>
-                </#list>
+                <option value="#">${uiLabelMap.CommonPage} ${viewIndex?int + 1} ${uiLabelMap.CommonOf} ${viewIndexMax}</option>
+                <#if (viewIndex?int > 1)>
+                    <#list 0..viewIndexMax as curViewNum>
+                         <option value="${productCategoryId}~${viewSize}~${curViewNum?int}">${uiLabelMap.CommonGotoPage} ${curViewNum + 1}</option>
+                    </#list>
+                </#if>
             </select>
             <#-- End Page Select Drop-Down -->
             <#if (viewIndex?int > 0)>
-                <#-- a href="<@ofbizUrl>category/~category_id=${productCategoryId}/~VIEW_SIZE=${viewSize}/~VIEW_INDEX=${viewIndex?int - 1}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonPrevious}</a --> |
                 <a href="javascript: void(0);" onclick="callDocumentByPaginate('${productCategoryId}~${viewSize}~${viewIndex?int - 1}');" class="buttontext">${uiLabelMap.CommonPrevious}</a> |
             </#if>
             <#if ((listSize?int - viewSize?int) > 0)>
                 <span>${lowIndex} - ${highIndex} ${uiLabelMap.CommonOf} ${listSize}</span>
             </#if>
             <#if highIndex?int < listSize?int>
-             <#-- | <a href="<@ofbizUrl>category/~category_id=${productCategoryId}/~VIEW_SIZE=${viewSize}/~VIEW_INDEX=${viewIndex?int + 1}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonNext}</a -->
              | <a href="javascript: void(0);" onclick="callDocumentByPaginate('${productCategoryId}~${viewSize}~${viewIndex?int + 1}');" class="buttontext">${uiLabelMap.CommonNext}</a>
             </#if>
         </div>

Modified: ofbiz/branches/release13.07/specialpurpose/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/specialpurpose/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl?rev=1535962&r1=1535961&r2=1535962&view=diff
==============================================================================
--- ofbiz/branches/release13.07/specialpurpose/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl (original)
+++ ofbiz/branches/release13.07/specialpurpose/ecommerce/webapp/ecommerce/shoppinglist/editShoppingList.ftl Sat Oct 26 10:33:57 2013
@@ -54,12 +54,12 @@ under the License.
 </script>
 <br />
 <#macro paginationControls>
-    <#assign viewIndexMax = Static["java.lang.Math"].ceil((listSize)?double / viewSize?double)>
-      <#if (viewIndexMax?int >= 1)>
-        <div class="product-prevnext">
-            <#-- Start Page Select Drop-Down -->
-            <select name="pageSelect" onchange="callDocumentByPaginate(this[this.selectedIndex].value);">
-                <option value="#">${uiLabelMap.CommonPage} ${viewIndex?int} ${uiLabelMap.CommonOf} ${viewIndexMax}</option>
+  <#assign viewIndexMax = Static["java.lang.Math"].ceil((listSize)?double / viewSize?double)>
+  <#if (viewIndexMax?int > 0)>
+    <div class="product-prevnext">
+        <#-- Start Page Select Drop-Down -->
+        <select name="pageSelect" onchange="callDocumentByPaginate(this[this.selectedIndex].value);">
+            <option value="#">${uiLabelMap.CommonPage} ${viewIndex?int} ${uiLabelMap.CommonOf} ${viewIndexMax}</option>
                 <#if (viewIndex?int > 1)>
                     <#list 0..viewIndexMax as curViewNum>
                          <option value="${shoppingListId?if_exists}~${viewSize}~${curViewNum?int + 1}">${uiLabelMap.CommonGotoPage} ${curViewNum + 1}</option>