Uploading to trunk. Please check it.

On Tuesday, 4 June 2013 16:25:15 UTC-5, Niphlod wrote:
>
> fix for that.
>
>
> function web2py_show_if(target) {
>   var triggers = {};
>   var show_if = function () {
>     var t = jQuery(this);
>     var id = t.attr('id');
>     t.attr('value', t.val());
>     for(var k = 0; k < triggers[id].length; k++) {
>       var dep = jQuery('#' + triggers[id][k], target);
>       var tr = jQuery('#' + triggers[id][k] + '__row', target);
>       if(t.is(dep.attr('data-show-if'))) tr.slideDown();
>       else tr.hide();
>     }
>   };
>   jQuery('[data-show-trigger]', target).each(function () {
>     var name = jQuery(this).attr('data-show-trigger');
>     if(!triggers[name]) triggers[name] = [];
>     triggers[name].push(jQuery(this).attr('id'));
>   });
>   for(var name in triggers) {
>     jQuery('#' + name, target).change(show_if).keyup(show_if);
>     show_if.call(jQuery('#' + name, target));
>   };
> }
>
> and then move the instantiation to the web2py_ajax_init(target) function.
>
> On Tuesday, June 4, 2013 11:15:24 PM UTC+2, Niphlod wrote:
>>
>> BTW2: doesn't work on LOADed forms.
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to