You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by ad...@sandglass-software.com on 2013/12/11 19:14:42 UTC
Re: svn commit: r1550203 - in /ofbiz/branches/release13.07: ./
.classpath framework/widget/templates/htmlFormMacroLibrary.ftl
It looks like this commit has some unintentional changes.
-Adrian
Quoting jleroux@apache.org:
> Author: jleroux
> Date: Wed Dec 11 17:49:45 2013
> New Revision: 1550203
>
> URL: http://svn.apache.org/r1550203
> Log:
> "Applied fix from trunk for revision: 1550201"
> ------------------------------------------------------------------------
> r1550201 | jleroux | 2013-12-11 18:48:37 +0100 (mer. 11 déc. 2013) |
> 20 lignes
>
> A patch from Gareth Carter for "htmlFormMacroLibrary.ftl
> renderNextPrev does not calculate number of pages correctly"
> https://issues.apache.org/jira/browse/OFBIZ-5422
>
> There are 2 issues with the existing code.
> 1 - floor is applied to viewSize only not the computed value
> 2 - if the listSize divides with viewSize evenly, you'll get one extra
> eg
> 24/2=12 - no of pages = 13
> 24/5=4.8 - no of pages = 5
>
> Change to correctly calculate the number of pages using ceiling
> rather than floor
>
> To repoduce this I went into find party screen, search for all and
> manually set the view size (I had to click next and change the
> VIEW_SIZE parameter in the url).
>
> In my description I mention 24/2=12 and 24/5=4.8,
> 24 is number of parties I had
> 2/5 is the view size
>
> It does not matter what the item size is (as long as its more than
> 0), you just have to make sure listSize divides by viewSize evenly.
> In my case 24/2 divided evenly and which should have have given 12
> pages but gave 13.
>
>
> ------------------------------------------------------------------------
>
>
> Modified:
> ofbiz/branches/release13.07/ (props changed)
> ofbiz/branches/release13.07/.classpath
>
> ofbiz/branches/release13.07/framework/widget/templates/htmlFormMacroLibrary.ftl
>
> Propchange: ofbiz/branches/release13.07/
> ------------------------------------------------------------------------------
> Merged /ofbiz/trunk:r1550201
>
> Modified: ofbiz/branches/release13.07/.classpath
> URL:
> http://svn.apache.org/viewvc/ofbiz/branches/release13.07/.classpath?rev=1550203&r1=1550202&r2=1550203&view=diff
> ==============================================================================
> --- ofbiz/branches/release13.07/.classpath (original)
> +++ ofbiz/branches/release13.07/.classpath Wed Dec 11 17:49:45 2013
> @@ -101,8 +101,8 @@
> <classpathentry kind="lib"
> path="framework/base/lib/scripting/groovy-all-2.1.9.jar"/>
> <classpathentry kind="lib"
> path="framework/base/lib/scripting/jakarta-oro-2.0.8.jar"/>
> <classpathentry kind="lib"
> path="framework/base/lib/scripting/jython-nooro.jar"/>
> - <classpathentry kind="lib"
> path="specialpurpose/birt/lib/org.eclipse.birt.runtime_3.7.2.v20120214-1408.jar"/>
> - <classpathentry kind="lib"
> path="specialpurpose/birt/lib/viewservlets.jar"/>
> + <!-- classpathentry kind="lib"
> path="specialpurpose/birt/lib/org.eclipse.birt.runtime_3.7.2.v20120214-1408.jar"/>
> + <classpathentry kind="lib"
> path="specialpurpose/birt/lib/viewservlets.jar"/>-->
> <classpathentry kind="lib" path="framework/catalina/lib/ecj-4.2.2.jar"/>
> <classpathentry kind="lib"
> path="framework/catalina/lib/tomcat-7.0.47-catalina-ha.jar"/>
> <classpathentry kind="lib"
> path="framework/catalina/lib/tomcat-7.0.47-catalina-tribes.jar"/>
> @@ -147,7 +147,7 @@
> <classpathentry kind="lib"
> path="framework/webapp/lib/json-lib-2.2.3-jdk15.jar"/>
> <classpathentry kind="lib" path="framework/webapp/lib/rome-0.9.jar"/>
> <classpathentry kind="lib"
> path="framework/webapp/lib/velocity-1.6.1.jar"/>
> - <classpathentry kind="lib"
> path="specialpurpose/googlecheckout/lib/checkout-sdk-0.8.8.jar"/>
> + <!-- classpathentry kind="lib"
> path="specialpurpose/googlecheckout/lib/checkout-sdk-0.8.8.jar"/>
> <classpathentry kind="lib"
> path="specialpurpose/ldap/lib/cas-server-core-3.3.jar"/>
> <classpathentry kind="lib"
> path="specialpurpose/pos/lib/XuiCoreSwing-v3.2rc2b.jar"/>
> <classpathentry kind="lib"
> path="specialpurpose/pos/lib/XuiOptional-v3.2rc2b.jar"/>
> @@ -157,7 +157,7 @@
> <classpathentry kind="lib"
> path="specialpurpose/ebaystore/lib/attributes.jar"/>
> <classpathentry kind="lib"
> path="specialpurpose/ebaystore/lib/ebaycalls.jar"/>
> <classpathentry kind="lib"
> path="specialpurpose/ebaystore/lib/ebaysdkcore.jar"/>
> - <classpathentry kind="lib"
> path="specialpurpose/ebaystore/lib/helper.jar"/>
> + <classpathentry kind="lib"
> path="specialpurpose/ebaystore/lib/helper.jar"/>-->
> <classpathentry
> excluding="org/ofbiz/accounting/thirdparty/cybersource/**|org/ofbiz/accounting/thirdparty/verisign/**|org/ofbiz/accounting/thirdparty/worldpay/**|org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java|org/ofbiz/accounting/thirdparty/orbital/**|org/ofbiz/accounting/thirdparty/securepay/**|org/ofbiz/accounting/thirdparty/ideal/**" kind="src"
> path="applications/accounting/src"/>
> <classpathentry
> excluding="org/ofbiz/content/openoffice/|org/ofbiz/content/report/"
> kind="src" path="applications/content/src"/>
> <classpathentry kind="src" path="applications/manufacturing/src"/>
> @@ -168,11 +168,11 @@
> <classpathentry
> excluding="org/ofbiz/securityext/thirdparty/truition/TruitionCoReg.java"
> kind="src" path="applications/securityext/src"/>
> <classpathentry kind="src" path="applications/humanres/src"/>
> <classpathentry kind="src" path="applications/workeffort/src"/>
> - <classpathentry kind="src" path="specialpurpose/appserver/src"/>
> + <!-- classpathentry kind="src"
> path="specialpurpose/appserver/src"/> -->
> <classpathentry kind="src" path="framework/base/build/gen-src/javacc"/>
> <classpathentry
> excluding="org/ofbiz/base/config/CoberturaInstrumenter.java"
> kind="src" path="framework/base/src"/>
> <classpathentry kind="src" path="framework/bi/src"/>
> - <classpathentry kind="src" path="specialpurpose/birt/src"/>
> + <!-- classpathentry kind="src" path="specialpurpose/birt/src"/>-->
> <classpathentry kind="src" path="framework/catalina/src"/>
> <classpathentry kind="src" path="framework/common/src"/>
> <classpathentry kind="src" path="framework/datafile/src"/>
>
> Modified:
> ofbiz/branches/release13.07/framework/widget/templates/htmlFormMacroLibrary.ftl
> URL:
> http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=1550203&r1=1550202&r2=1550203&view=diff
> ==============================================================================
> ---
> ofbiz/branches/release13.07/framework/widget/templates/htmlFormMacroLibrary.ftl
> (original)
> +++
> ofbiz/branches/release13.07/framework/widget/templates/htmlFormMacroLibrary.ftl Wed Dec 11 17:49:45
> 2013
> @@ -742,8 +742,7 @@ Parameter: lastViewName, String, optiona
> <li class="${paginateFirstStyle}<#if viewIndex gt 0>"><a
> href="<#if
> ajaxEnabled>javascript:ajaxUpdateAreas('${ajaxFirstUrl}')<#else>${firstUrl}</#if>">${paginateFirstLabel}</a><#else>-disabled"><span>${paginateFirstLabel}</span></#if></li>
> <li class="${paginatePreviousStyle}<#if viewIndex gt 0>"><a
> href="<#if
> ajaxEnabled>javascript:ajaxUpdateAreas('${ajaxPreviousUrl}')<#else>${previousUrl}</#if>">${paginatePreviousLabel}</a><#else>-disabled"><span>${paginatePreviousLabel}</span></#if></li>
> <#if listSize gt 0 && javaScriptEnabled><li
> class="nav-page-select">${pageLabel} <select name="page" size="1"
> onchange="<#if
> ajaxEnabled>javascript:ajaxUpdateAreas('${ajaxSelectUrl}')<#else>location.href='${selectUrl}'+this.value;</#if>"><#rt/>
> - <#assign x=listSize/viewSize?floor>
> - <#if listSize gt (viewIndex*viewSize)><#assign x=x+1></#if>
> + <#assign x=(listSize/viewSize)?ceiling>
> <#list 1..x as i>
> <#if i == (viewIndex+1)><option selected="selected"
> value="<#else><option value="</#if>${i-1}">${i}</option>
> </#list>
>
>
>
Re: svn commit: r1550203 - in /ofbiz/branches/release13.07: ./
.classpath framework/widget/templates/htmlFormMacroLibrary.ftl
Posted by Jacques Le Roux <ja...@les7arts.com>.
Oops indeed, thanks Adrian
Jacques
On Wednesday, December 11, 2013 7:14 PM adrian.crum@sandglass-software.com <ad...@sandglass-software.com> wrote:
> It looks like this commit has some unintentional changes.
>
> -Adrian
>
> Quoting jleroux@apache.org:
>
>> Author: jleroux
>> Date: Wed Dec 11 17:49:45 2013
>> New Revision: 1550203
>>
>> URL: http://svn.apache.org/r1550203
>> Log:
>> "Applied fix from trunk for revision: 1550201"
>> ------------------------------------------------------------------------
>> r1550201 | jleroux | 2013-12-11 18:48:37 +0100 (mer. 11 déc. 2013) |
>> 20 lignes
>>
>> A patch from Gareth Carter for "htmlFormMacroLibrary.ftl
>> renderNextPrev does not calculate number of pages correctly"
>> https://issues.apache.org/jira/browse/OFBIZ-5422
>>
>> There are 2 issues with the existing code.
>> 1 - floor is applied to viewSize only not the computed value
>> 2 - if the listSize divides with viewSize evenly, you'll get one extra
>> eg
>> 24/2=12 - no of pages = 13
>> 24/5=4.8 - no of pages = 5
>>
>> Change to correctly calculate the number of pages using ceiling
>> rather than floor
>>
>> To repoduce this I went into find party screen, search for all and
>> manually set the view size (I had to click next and change the
>> VIEW_SIZE parameter in the url).
>>
>> In my description I mention 24/2=12 and 24/5=4.8,
>> 24 is number of parties I had
>> 2/5 is the view size
>>
>> It does not matter what the item size is (as long as its more than
>> 0), you just have to make sure listSize divides by viewSize evenly.
>> In my case 24/2 divided evenly and which should have have given 12
>> pages but gave 13.
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>> Modified:
>> ofbiz/branches/release13.07/ (props changed)
>> ofbiz/branches/release13.07/.classpath
>>
>> ofbiz/branches/release13.07/framework/widget/templates/htmlFormMacroLibrary.ftl
>>
>> Propchange: ofbiz/branches/release13.07/
>> ------------------------------------------------------------------------------
>> Merged /ofbiz/trunk:r1550201
>>
>> Modified: ofbiz/branches/release13.07/.classpath
>> URL:
>> http://svn.apache.org/viewvc/ofbiz/branches/release13.07/.classpath?rev=1550203&r1=1550202&r2=1550203&view=diff
>> ==============================================================================
>> --- ofbiz/branches/release13.07/.classpath (original)
>> +++ ofbiz/branches/release13.07/.classpath Wed Dec 11 17:49:45 2013
>> @@ -101,8 +101,8 @@
>> <classpathentry kind="lib"
>> path="framework/base/lib/scripting/groovy-all-2.1.9.jar"/>
>> <classpathentry kind="lib"
>> path="framework/base/lib/scripting/jakarta-oro-2.0.8.jar"/>
>> <classpathentry kind="lib"
>> path="framework/base/lib/scripting/jython-nooro.jar"/>
>> - <classpathentry kind="lib"
>> path="specialpurpose/birt/lib/org.eclipse.birt.runtime_3.7.2.v20120214-1408.jar"/>
>> - <classpathentry kind="lib"
>> path="specialpurpose/birt/lib/viewservlets.jar"/>
>> + <!-- classpathentry kind="lib"
>> path="specialpurpose/birt/lib/org.eclipse.birt.runtime_3.7.2.v20120214-1408.jar"/>
>> + <classpathentry kind="lib"
>> path="specialpurpose/birt/lib/viewservlets.jar"/>-->
>> <classpathentry kind="lib" path="framework/catalina/lib/ecj-4.2.2.jar"/>
>> <classpathentry kind="lib"
>> path="framework/catalina/lib/tomcat-7.0.47-catalina-ha.jar"/>
>> <classpathentry kind="lib"
>> path="framework/catalina/lib/tomcat-7.0.47-catalina-tribes.jar"/>
>> @@ -147,7 +147,7 @@
>> <classpathentry kind="lib"
>> path="framework/webapp/lib/json-lib-2.2.3-jdk15.jar"/>
>> <classpathentry kind="lib" path="framework/webapp/lib/rome-0.9.jar"/>
>> <classpathentry kind="lib"
>> path="framework/webapp/lib/velocity-1.6.1.jar"/>
>> - <classpathentry kind="lib"
>> path="specialpurpose/googlecheckout/lib/checkout-sdk-0.8.8.jar"/>
>> + <!-- classpathentry kind="lib"
>> path="specialpurpose/googlecheckout/lib/checkout-sdk-0.8.8.jar"/>
>> <classpathentry kind="lib"
>> path="specialpurpose/ldap/lib/cas-server-core-3.3.jar"/>
>> <classpathentry kind="lib"
>> path="specialpurpose/pos/lib/XuiCoreSwing-v3.2rc2b.jar"/>
>> <classpathentry kind="lib"
>> path="specialpurpose/pos/lib/XuiOptional-v3.2rc2b.jar"/>
>> @@ -157,7 +157,7 @@
>> <classpathentry kind="lib"
>> path="specialpurpose/ebaystore/lib/attributes.jar"/>
>> <classpathentry kind="lib"
>> path="specialpurpose/ebaystore/lib/ebaycalls.jar"/>
>> <classpathentry kind="lib"
>> path="specialpurpose/ebaystore/lib/ebaysdkcore.jar"/>
>> - <classpathentry kind="lib"
>> path="specialpurpose/ebaystore/lib/helper.jar"/>
>> + <classpathentry kind="lib"
>> path="specialpurpose/ebaystore/lib/helper.jar"/>-->
>> <classpathentry
>> excluding="org/ofbiz/accounting/thirdparty/cybersource/**|org/ofbiz/accounting/thirdparty/verisign/**|org/ofbiz/accounting/thirdparty/worldpay/**|org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java|org/ofbiz/accounting/thirdparty/orbital/**|org/ofbiz/accounting/thirdparty/securepay/**|org/ofbiz/accounting/thirdparty/ideal/**"
>> kind="src" path="applications/accounting/src"/>
>> <classpathentry
>> excluding="org/ofbiz/content/openoffice/|org/ofbiz/content/report/"
>> kind="src" path="applications/content/src"/>
>> <classpathentry kind="src" path="applications/manufacturing/src"/>
>> @@ -168,11 +168,11 @@
>> <classpathentry
>> excluding="org/ofbiz/securityext/thirdparty/truition/TruitionCoReg.java"
>> kind="src" path="applications/securityext/src"/>
>> <classpathentry kind="src" path="applications/humanres/src"/>
>> <classpathentry kind="src" path="applications/workeffort/src"/>
>> - <classpathentry kind="src" path="specialpurpose/appserver/src"/>
>> + <!-- classpathentry kind="src"
>> path="specialpurpose/appserver/src"/> -->
>> <classpathentry kind="src" path="framework/base/build/gen-src/javacc"/>
>> <classpathentry
>> excluding="org/ofbiz/base/config/CoberturaInstrumenter.java"
>> kind="src" path="framework/base/src"/>
>> <classpathentry kind="src" path="framework/bi/src"/>
>> - <classpathentry kind="src" path="specialpurpose/birt/src"/>
>> + <!-- classpathentry kind="src" path="specialpurpose/birt/src"/>-->
>> <classpathentry kind="src" path="framework/catalina/src"/>
>> <classpathentry kind="src" path="framework/common/src"/>
>> <classpathentry kind="src" path="framework/datafile/src"/>
>>
>> Modified:
>> ofbiz/branches/release13.07/framework/widget/templates/htmlFormMacroLibrary.ftl
>> URL:
>> http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=1550203&r1=1550202&r2=1550203&view=diff
>> ==============================================================================
>> ---
>> ofbiz/branches/release13.07/framework/widget/templates/htmlFormMacroLibrary.ftl
>> (original)
>> +++
>> ofbiz/branches/release13.07/framework/widget/templates/htmlFormMacroLibrary.ftl Wed Dec 11 17:49:45
>> 2013
>> @@ -742,8 +742,7 @@ Parameter: lastViewName, String, optiona
>> <li class="${paginateFirstStyle}<#if viewIndex gt 0>"><a
>> href="<#if
>> ajaxEnabled>javascript:ajaxUpdateAreas('${ajaxFirstUrl}')<#else>${firstUrl}</#if>">${paginateFirstLabel}</a><#else>-disabled"><span>${paginateFirstLabel}</span></#if></li>
>> <li class="${paginatePreviousStyle}<#if viewIndex gt 0>"><a
>> href="<#if
>> ajaxEnabled>javascript:ajaxUpdateAreas('${ajaxPreviousUrl}')<#else>${previousUrl}</#if>">${paginatePreviousLabel}</a><#else>-disabled"><span>${paginatePreviousLabel}</span></#if></li>
>> <#if listSize gt 0 && javaScriptEnabled><li
>> class="nav-page-select">${pageLabel} <select name="page" size="1"
>> onchange="<#if
>> ajaxEnabled>javascript:ajaxUpdateAreas('${ajaxSelectUrl}')<#else>location.href='${selectUrl}'+this.value;</#if>"><#rt/>
>> - <#assign x=listSize/viewSize?floor>
>> - <#if listSize gt (viewIndex*viewSize)><#assign x=x+1></#if>
>> + <#assign x=(listSize/viewSize)?ceiling>
>> <#list 1..x as i>
>> <#if i == (viewIndex+1)><option selected="selected"
>> value="<#else><option value="</#if>${i-1}">${i}</option>
>> </#list>