You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2009/04/21 14:59:11 UTC

svn commit: r767136 - in /ofbiz/branches/release09.04: ./ applications/product/webapp/catalog/category/EditCategoryParties.ftl

Author: jleroux
Date: Tue Apr 21 12:59:11 2009
New Revision: 767136

URL: http://svn.apache.org/viewvc?rev=767136&view=rev
Log:
Applied fix from trunk for revision: 767102

Modified:
    ofbiz/branches/release09.04/   (props changed)
    ofbiz/branches/release09.04/applications/product/webapp/catalog/category/EditCategoryParties.ftl

Propchange: ofbiz/branches/release09.04/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Apr 21 12:59:11 2009
@@ -1 +1 @@
-/ofbiz/trunk:765933,766011,766015,766293,766307,766316,766325,766462,766522,766800,767060,767072,767093,767098-767099
+/ofbiz/trunk:765933,766011,766015,766293,766307,766316,766325,766462,766522,766800,767060,767072,767093,767098-767099,767102

Modified: ofbiz/branches/release09.04/applications/product/webapp/catalog/category/EditCategoryParties.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/applications/product/webapp/catalog/category/EditCategoryParties.ftl?rev=767136&r1=767135&r2=767136&view=diff
==============================================================================
--- ofbiz/branches/release09.04/applications/product/webapp/catalog/category/EditCategoryParties.ftl (original)
+++ ofbiz/branches/release09.04/applications/product/webapp/catalog/category/EditCategoryParties.ftl Tue Apr 21 12:59:11 2009
@@ -43,7 +43,7 @@
             <#if (productCategoryRole.getTimestamp("fromDate"))?exists && Static["org.ofbiz.base.util.UtilDateTime"].nowTimestamp().before(productCategoryRole.getTimestamp("fromDate"))> <#assign hasntStarted = true></#if>
             <td <#if hasntStarted> style="color: red;"</#if>>${(productCategoryRole.fromDate)?if_exists}</td>
             <td align="center">
-                <FORM method="post" action="<@o...@ofbizUrl>" name="lineForm${line}">
+                <FORM method="post" action="<@o...@ofbizUrl>" name="lineForm_update${line}">
                     <#assign hasExpired = false>
                     <#if (productCategoryRole.getTimestamp("thruDate"))?exists && (Static["org.ofbiz.base.util.UtilDateTime"].nowTimestamp().after(productCategoryRole.getTimestamp("thruDate")))> <#assign hasExpired = true></#if>
                     <input type="hidden" name="productCategoryId" value="${(productCategoryRole.productCategoryId)?if_exists}">
@@ -56,7 +56,14 @@
                 </FORM>
             </td>
             <td align="center">
-                <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.CommonDelete}</a>
+                <FORM method="post" action="<@o...@ofbizUrl>" name="lineForm_delete${line}">
+                    <#assign hasExpired = false>
+                    <input type="hidden" name="productCategoryId" value="${(productCategoryRole.productCategoryId)?if_exists}">
+                    <input type="hidden" name="partyId" value="${(productCategoryRole.partyId)?if_exists}">
+                    <input type="hidden" name="roleTypeId" value="${(productCategoryRole.roleTypeId)?if_exists}">
+                    <input type="hidden" name="fromDate" value="${(productCategoryRole.getTimestamp("fromDate"))?if_exists}">
+                    <INPUT type="submit" value="${uiLabelMap.CommonDelete}" style="font-size: x-small;">
+                </FORM>
             </td>
             </tr>
             <#-- toggle the row color -->
@@ -94,4 +101,4 @@
             </table>
         </div>
     </div>
-</#if>
\ No newline at end of file
+</#if>



Re: svn commit: r767136 - in /ofbiz/branches/release09.04: ./ applications/product/webapp/catalog/category/EditCategoryParties.ftl

Posted by Ashish Nagar <as...@hotwaxmedia.com>.
Thanks Hans,

Also an anchor can be placed outside the form, if somehow there occurs a 
need to change the position of the anchor on the page. Thus facilitates 
to submit any form within the document.

--
Ashish Nagar

Hans Bakker wrote:
> Ok, sounds reasonable
> i can support this.
>
> Regards,
> hans
>
> On Wed, 2009-04-22 at 13:04 +0530, Ashish Nagar wrote:
>   
>> Hello Hans,
>>
>> We have used anchors throughout the applications, wherever needed to 
>> pass url parameters. Doing this change, ensures that the layout of the 
>> link will be same as previous one and used consistently throughout the 
>> system. This is equally important on the pages, where there are some 
>> links which are not calling any service, so need not to modify and also 
>> the links which are calling service, need to be modified. Having a 
>> consistent way to pass the parameters is a good idea. Using javascript 
>> leverages you to use it in various manners.
>>
>> Although you can apply the same css on the submit button as well, but 
>> there will be a very minor difference in the layouts of a submit button 
>> and an anchor.
>>
>> Thanks & Regards,
>> --
>> Ashish Nagar
>>
>> Ashish Vijaywargiya wrote:
>>     
>>> These are the way of handling the same thing.
>>> To maintain consistency I did this change.
>>>
>>> Let's see what other has to say about this.
>>> I am fine with either option.
>>>
>>> -- 
>>> Ashish
>>>
>>>
>>> Hans Bakker wrote:
>>>       
>>>> can you tell me what the advantage is to do this?
>>>> in my opinion it makes the code  unnecessary complicated.
>>>>
>>>> regards,
>>>> Hans
>>>>
>>>> On Wed, 2009-04-22 at 10:57 +0530, Ashish Nagar wrote:
>>>>  
>>>>         
>>>>> jleroux@apache.org wrote:
>>>>>    
>>>>>           
>>>>>> -                <a 
>>>>>> href="<@o...@ofbizUrl>" 
>>>>>> class="buttontext">${uiLabelMap.CommonDelete}</a>
>>>>>> +                <FORM method="post" 
>>>>>> action="<@o...@ofbizUrl>" 
>>>>>> name="lineForm_delete${line}">
>>>>>> +                    <#assign hasExpired = false>
>>>>>> +                    <input type="hidden" name="productCategoryId" 
>>>>>> value="${(productCategoryRole.productCategoryId)?if_exists}">
>>>>>> +                    <input type="hidden" name="partyId" 
>>>>>> value="${(productCategoryRole.partyId)?if_exists}">
>>>>>> +                    <input type="hidden" name="roleTypeId" 
>>>>>> value="${(productCategoryRole.roleTypeId)?if_exists}">
>>>>>> +                    <input type="hidden" name="fromDate" 
>>>>>> value="${(productCategoryRole.getTimestamp("fromDate"))?if_exists}">
>>>>>> +                    <INPUT type="submit" 
>>>>>> value="${uiLabelMap.CommonDelete}" style="font-size: x-small;">
>>>>>> +                </FORM>
>>>>>>         
>>>>>>             
>>>>> Just wondering, could we use anchor <a href= "javascript: 
>>>>> document.lineForm_delete${line}.submit()" class= 
>>>>> "buttontext">${uiLabelMap.CommonDelete}</a> instead of a submit 
>>>>> button so as to maintain consistency?
>>>>>
>>>>> -- 
>>>>> Ashish Nagar
>>>>>    
>>>>>           
>>>>>>                     
>>>>>>             
>>>>>     
>>>>>           


Re: svn commit: r767136 - in /ofbiz/branches/release09.04: ./ applications/product/webapp/catalog/category/EditCategoryParties.ftl

Posted by Hans Bakker <ma...@antwebsystems.com>.
Ok, sounds reasonable
i can support this.

Regards,
hans

On Wed, 2009-04-22 at 13:04 +0530, Ashish Nagar wrote:
> Hello Hans,
> 
> We have used anchors throughout the applications, wherever needed to 
> pass url parameters. Doing this change, ensures that the layout of the 
> link will be same as previous one and used consistently throughout the 
> system. This is equally important on the pages, where there are some 
> links which are not calling any service, so need not to modify and also 
> the links which are calling service, need to be modified. Having a 
> consistent way to pass the parameters is a good idea. Using javascript 
> leverages you to use it in various manners.
> 
> Although you can apply the same css on the submit button as well, but 
> there will be a very minor difference in the layouts of a submit button 
> and an anchor.
> 
> Thanks & Regards,
> --
> Ashish Nagar
> 
> Ashish Vijaywargiya wrote:
> > These are the way of handling the same thing.
> > To maintain consistency I did this change.
> >
> > Let's see what other has to say about this.
> > I am fine with either option.
> >
> > -- 
> > Ashish
> >
> >
> > Hans Bakker wrote:
> >> can you tell me what the advantage is to do this?
> >> in my opinion it makes the code  unnecessary complicated.
> >>
> >> regards,
> >> Hans
> >>
> >> On Wed, 2009-04-22 at 10:57 +0530, Ashish Nagar wrote:
> >>  
> >>> jleroux@apache.org wrote:
> >>>    
> >>>> -                <a 
> >>>> href="<@o...@ofbizUrl>" 
> >>>> class="buttontext">${uiLabelMap.CommonDelete}</a>
> >>>> +                <FORM method="post" 
> >>>> action="<@o...@ofbizUrl>" 
> >>>> name="lineForm_delete${line}">
> >>>> +                    <#assign hasExpired = false>
> >>>> +                    <input type="hidden" name="productCategoryId" 
> >>>> value="${(productCategoryRole.productCategoryId)?if_exists}">
> >>>> +                    <input type="hidden" name="partyId" 
> >>>> value="${(productCategoryRole.partyId)?if_exists}">
> >>>> +                    <input type="hidden" name="roleTypeId" 
> >>>> value="${(productCategoryRole.roleTypeId)?if_exists}">
> >>>> +                    <input type="hidden" name="fromDate" 
> >>>> value="${(productCategoryRole.getTimestamp("fromDate"))?if_exists}">
> >>>> +                    <INPUT type="submit" 
> >>>> value="${uiLabelMap.CommonDelete}" style="font-size: x-small;">
> >>>> +                </FORM>
> >>>>         
> >>> Just wondering, could we use anchor <a href= "javascript: 
> >>> document.lineForm_delete${line}.submit()" class= 
> >>> "buttontext">${uiLabelMap.CommonDelete}</a> instead of a submit 
> >>> button so as to maintain consistency?
> >>>
> >>> -- 
> >>> Ashish Nagar
> >>>    
> >>>>                     
> >>>     
> 
-- 
Antwebsystems.com: Quality OFBiz services for competitive rates


Re: svn commit: r767136 - in /ofbiz/branches/release09.04: ./ applications/product/webapp/catalog/category/EditCategoryParties.ftl

Posted by Ashish Nagar <as...@hotwaxmedia.com>.
Hello Hans,

We have used anchors throughout the applications, wherever needed to 
pass url parameters. Doing this change, ensures that the layout of the 
link will be same as previous one and used consistently throughout the 
system. This is equally important on the pages, where there are some 
links which are not calling any service, so need not to modify and also 
the links which are calling service, need to be modified. Having a 
consistent way to pass the parameters is a good idea. Using javascript 
leverages you to use it in various manners.

Although you can apply the same css on the submit button as well, but 
there will be a very minor difference in the layouts of a submit button 
and an anchor.

Thanks & Regards,
--
Ashish Nagar

Ashish Vijaywargiya wrote:
> These are the way of handling the same thing.
> To maintain consistency I did this change.
>
> Let's see what other has to say about this.
> I am fine with either option.
>
> -- 
> Ashish
>
>
> Hans Bakker wrote:
>> can you tell me what the advantage is to do this?
>> in my opinion it makes the code  unnecessary complicated.
>>
>> regards,
>> Hans
>>
>> On Wed, 2009-04-22 at 10:57 +0530, Ashish Nagar wrote:
>>  
>>> jleroux@apache.org wrote:
>>>    
>>>> -                <a 
>>>> href="<@o...@ofbizUrl>" 
>>>> class="buttontext">${uiLabelMap.CommonDelete}</a>
>>>> +                <FORM method="post" 
>>>> action="<@o...@ofbizUrl>" 
>>>> name="lineForm_delete${line}">
>>>> +                    <#assign hasExpired = false>
>>>> +                    <input type="hidden" name="productCategoryId" 
>>>> value="${(productCategoryRole.productCategoryId)?if_exists}">
>>>> +                    <input type="hidden" name="partyId" 
>>>> value="${(productCategoryRole.partyId)?if_exists}">
>>>> +                    <input type="hidden" name="roleTypeId" 
>>>> value="${(productCategoryRole.roleTypeId)?if_exists}">
>>>> +                    <input type="hidden" name="fromDate" 
>>>> value="${(productCategoryRole.getTimestamp("fromDate"))?if_exists}">
>>>> +                    <INPUT type="submit" 
>>>> value="${uiLabelMap.CommonDelete}" style="font-size: x-small;">
>>>> +                </FORM>
>>>>         
>>> Just wondering, could we use anchor <a href= "javascript: 
>>> document.lineForm_delete${line}.submit()" class= 
>>> "buttontext">${uiLabelMap.CommonDelete}</a> instead of a submit 
>>> button so as to maintain consistency?
>>>
>>> -- 
>>> Ashish Nagar
>>>    
>>>>                     
>>>     


Re: svn commit: r767136 - in /ofbiz/branches/release09.04: ./ applications/product/webapp/catalog/category/EditCategoryParties.ftl

Posted by Ashish Vijaywargiya <as...@hotwaxmedia.com>.
These are the way of handling the same thing.
To maintain consistency I did this change.

Let's see what other has to say about this.
I am fine with either option.

--
Ashish


Hans Bakker wrote:
> can you tell me what the advantage is to do this?
> in my opinion it makes the code  unnecessary complicated.
>
> regards,
> Hans
>
> On Wed, 2009-04-22 at 10:57 +0530, Ashish Nagar wrote:
>   
>> jleroux@apache.org wrote:
>>     
>>> -                <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.CommonDelete}</a>
>>> +                <FORM method="post" action="<@o...@ofbizUrl>" name="lineForm_delete${line}">
>>> +                    <#assign hasExpired = false>
>>> +                    <input type="hidden" name="productCategoryId" value="${(productCategoryRole.productCategoryId)?if_exists}">
>>> +                    <input type="hidden" name="partyId" value="${(productCategoryRole.partyId)?if_exists}">
>>> +                    <input type="hidden" name="roleTypeId" value="${(productCategoryRole.roleTypeId)?if_exists}">
>>> +                    <input type="hidden" name="fromDate" value="${(productCategoryRole.getTimestamp("fromDate"))?if_exists}">
>>> +                    <INPUT type="submit" value="${uiLabelMap.CommonDelete}" style="font-size: x-small;">
>>> +                </FORM>
>>>   
>>>       
>> Just wondering, could we use anchor <a href= "javascript: 
>> document.lineForm_delete${line}.submit()" class= 
>> "buttontext">${uiLabelMap.CommonDelete}</a> instead of a submit button 
>> so as to maintain consistency?
>>
>> --
>> Ashish Nagar
>>     
>>>             
>>>   
>>>       
>>     

Re: svn commit: r767136 - in /ofbiz/branches/release09.04: ./ applications/product/webapp/catalog/category/EditCategoryParties.ftl

Posted by Hans Bakker <ma...@antwebsystems.com>.
can you tell me what the advantage is to do this?
in my opinion it makes the code  unnecessary complicated.

regards,
Hans

On Wed, 2009-04-22 at 10:57 +0530, Ashish Nagar wrote:
> jleroux@apache.org wrote:
> > -                <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.CommonDelete}</a>
> > +                <FORM method="post" action="<@o...@ofbizUrl>" name="lineForm_delete${line}">
> > +                    <#assign hasExpired = false>
> > +                    <input type="hidden" name="productCategoryId" value="${(productCategoryRole.productCategoryId)?if_exists}">
> > +                    <input type="hidden" name="partyId" value="${(productCategoryRole.partyId)?if_exists}">
> > +                    <input type="hidden" name="roleTypeId" value="${(productCategoryRole.roleTypeId)?if_exists}">
> > +                    <input type="hidden" name="fromDate" value="${(productCategoryRole.getTimestamp("fromDate"))?if_exists}">
> > +                    <INPUT type="submit" value="${uiLabelMap.CommonDelete}" style="font-size: x-small;">
> > +                </FORM>
> >   
> Just wondering, could we use anchor <a href= "javascript: 
> document.lineForm_delete${line}.submit()" class= 
> "buttontext">${uiLabelMap.CommonDelete}</a> instead of a submit button 
> so as to maintain consistency?
> 
> --
> Ashish Nagar
> >             
> >   
> 
> 
-- 
Antwebsystems.com: Quality OFBiz services for competitive rates


Re: svn commit: r767136 - in /ofbiz/branches/release09.04: ./ applications/product/webapp/catalog/category/EditCategoryParties.ftl

Posted by Ashish Nagar <as...@hotwaxmedia.com>.
Thank you Ashish V.   :-)

--
Ashish Nagar

Ashish Vijaywargiya wrote:
> Done at trunk rev. no. 767392.
> Thanks !
>
> -- 
> Ashish
>
> Ashish Nagar wrote:
>> jleroux@apache.org wrote:
>>> -                <a 
>>> href="<@o...@ofbizUrl>" 
>>> class="buttontext">${uiLabelMap.CommonDelete}</a>
>>> +                <FORM method="post" 
>>> action="<@o...@ofbizUrl>" 
>>> name="lineForm_delete${line}">
>>> +                    <#assign hasExpired = false>
>>> +                    <input type="hidden" name="productCategoryId" 
>>> value="${(productCategoryRole.productCategoryId)?if_exists}">
>>> +                    <input type="hidden" name="partyId" 
>>> value="${(productCategoryRole.partyId)?if_exists}">
>>> +                    <input type="hidden" name="roleTypeId" 
>>> value="${(productCategoryRole.roleTypeId)?if_exists}">
>>> +                    <input type="hidden" name="fromDate" 
>>> value="${(productCategoryRole.getTimestamp("fromDate"))?if_exists}">
>>> +                    <INPUT type="submit" 
>>> value="${uiLabelMap.CommonDelete}" style="font-size: x-small;">
>>> +                </FORM>
>>>   
>> Just wondering, could we use anchor <a href= "javascript: 
>> document.lineForm_delete${line}.submit()" class= 
>> "buttontext">${uiLabelMap.CommonDelete}</a> instead of a submit 
>> button so as to maintain consistency?
>>
>> -- 
>> Ashish Nagar
>>>               
>>
>>


Re: svn commit: r767136 - in /ofbiz/branches/release09.04: ./ applications/product/webapp/catalog/category/EditCategoryParties.ftl

Posted by Ashish Vijaywargiya <as...@hotwaxmedia.com>.
Done at trunk rev. no. 767392.
Thanks !

--
Ashish

Ashish Nagar wrote:
> jleroux@apache.org wrote:
>> -                <a 
>> href="<@o...@ofbizUrl>" 
>> class="buttontext">${uiLabelMap.CommonDelete}</a>
>> +                <FORM method="post" 
>> action="<@o...@ofbizUrl>" 
>> name="lineForm_delete${line}">
>> +                    <#assign hasExpired = false>
>> +                    <input type="hidden" name="productCategoryId" 
>> value="${(productCategoryRole.productCategoryId)?if_exists}">
>> +                    <input type="hidden" name="partyId" 
>> value="${(productCategoryRole.partyId)?if_exists}">
>> +                    <input type="hidden" name="roleTypeId" 
>> value="${(productCategoryRole.roleTypeId)?if_exists}">
>> +                    <input type="hidden" name="fromDate" 
>> value="${(productCategoryRole.getTimestamp("fromDate"))?if_exists}">
>> +                    <INPUT type="submit" 
>> value="${uiLabelMap.CommonDelete}" style="font-size: x-small;">
>> +                </FORM>
>>   
> Just wondering, could we use anchor <a href= "javascript: 
> document.lineForm_delete${line}.submit()" class= 
> "buttontext">${uiLabelMap.CommonDelete}</a> instead of a submit button 
> so as to maintain consistency?
>
> -- 
> Ashish Nagar
>>               
>
>

Re: svn commit: r767136 - in /ofbiz/branches/release09.04: ./ applications/product/webapp/catalog/category/EditCategoryParties.ftl

Posted by Ashish Vijaywargiya <as...@hotwaxmedia.com>.
+1.

Initially this was done by me and I will fix it in next few minutes.
Thanks Ashish N. :-)

--
Ashish

Ashish Nagar wrote:
> jleroux@apache.org wrote:
>> -                <a 
>> href="<@o...@ofbizUrl>" 
>> class="buttontext">${uiLabelMap.CommonDelete}</a>
>> +                <FORM method="post" 
>> action="<@o...@ofbizUrl>" 
>> name="lineForm_delete${line}">
>> +                    <#assign hasExpired = false>
>> +                    <input type="hidden" name="productCategoryId" 
>> value="${(productCategoryRole.productCategoryId)?if_exists}">
>> +                    <input type="hidden" name="partyId" 
>> value="${(productCategoryRole.partyId)?if_exists}">
>> +                    <input type="hidden" name="roleTypeId" 
>> value="${(productCategoryRole.roleTypeId)?if_exists}">
>> +                    <input type="hidden" name="fromDate" 
>> value="${(productCategoryRole.getTimestamp("fromDate"))?if_exists}">
>> +                    <INPUT type="submit" 
>> value="${uiLabelMap.CommonDelete}" style="font-size: x-small;">
>> +                </FORM>
>>   
> Just wondering, could we use anchor <a href= "javascript: 
> document.lineForm_delete${line}.submit()" class= 
> "buttontext">${uiLabelMap.CommonDelete}</a> instead of a submit button 
> so as to maintain consistency?
>
> -- 
> Ashish Nagar
>>               
>
>

Re: svn commit: r767136 - in /ofbiz/branches/release09.04: ./ applications/product/webapp/catalog/category/EditCategoryParties.ftl

Posted by Ashish Nagar <as...@hotwaxmedia.com>.
jleroux@apache.org wrote:
> -                <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.CommonDelete}</a>
> +                <FORM method="post" action="<@o...@ofbizUrl>" name="lineForm_delete${line}">
> +                    <#assign hasExpired = false>
> +                    <input type="hidden" name="productCategoryId" value="${(productCategoryRole.productCategoryId)?if_exists}">
> +                    <input type="hidden" name="partyId" value="${(productCategoryRole.partyId)?if_exists}">
> +                    <input type="hidden" name="roleTypeId" value="${(productCategoryRole.roleTypeId)?if_exists}">
> +                    <input type="hidden" name="fromDate" value="${(productCategoryRole.getTimestamp("fromDate"))?if_exists}">
> +                    <INPUT type="submit" value="${uiLabelMap.CommonDelete}" style="font-size: x-small;">
> +                </FORM>
>   
Just wondering, could we use anchor <a href= "javascript: 
document.lineForm_delete${line}.submit()" class= 
"buttontext">${uiLabelMap.CommonDelete}</a> instead of a submit button 
so as to maintain consistency?

--
Ashish Nagar
>             
>