Re: [OFBiz] Dev - multi forms (widget) and select all javascript

Posted by Jacopo Cappellato on
URL: http://ofbiz.116.s1.nabble.com/OFBiz-Dev-multi-forms-widget-and-select-all-javascript-tp166101p166103.html

David,

great, you have mostly rewritten all the methods to support the form
name argument... thanks!

Jacopo

PS: could you please change the file's mime type in SVN to plain/text?




David E. Jones wrote:

>
> Jacopo,
>
> No problem, it's in rev 5856.
>
> -David
>
>
> On Sep 28, 2005, at 8:31 AM, Jacopo Cappellato wrote:
>
>> Hi all,
>>
>> I'm trying to add a selectAll checkbox to select/deselect all the  
>> rows of a multi form rendered thru the widget.
>>
>> Unfortunately the javascript functions defined in the selectall.js  
>> file use a hardcoded form name ("selectAllForm").
>> To make them more flexible I've created a new toggleAll() function  
>> that accepts the form name as a parameter:
>>
>> function toggleAll(e, formName) {
>>     var cform = document[formName];
>>     var len = cform.elements.length;
>>     for (var i = 0; i < len; i++) {
>>         var element = cform.elements[i];
>>         if (element.name.substring(0, 10) == "_rowSubmit" &&  
>> element.checked != e.checked) {
>>             toggle(element);
>>         }
>>     }
>> }
>>
>> Could someone commit this change? If you think that it is good I  can
>> refactor also the other functions in the same file to accept  the form
>> name.
>> I'm sorry, this is not a diff patch because the file is marked as  
>> binary.
>>
>> Jacopo
>>
>> _______________________________________________
>> Dev mailing list
>> [hidden email]
>> http://lists.ofbiz.org/mailman/listinfo/dev
>>
>
>
> ------------------------------------------------------------------------
>
>  
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev