From ea3aa62476885874d913171b443201c28360a41e Mon Sep 17 00:00:00 2001 From: Massimo Date: Tue, 4 Jun 2013 16:41:05 -0500 Subject: [PATCH] fixed show_if with LOAD, thanks Niphlod --- VERSION | 2 +- applications/admin/static/js/web2py.js | 32 +++++++++++------------ applications/examples/static/js/web2py.js | 32 +++++++++++------------ applications/welcome/static/js/web2py.js | 32 +++++++++++------------ 4 files changed, 49 insertions(+), 49 deletions(-) diff --git a/VERSION b/VERSION index b6c8b766..b816fa7e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.4.7-stable+timestamp.2013.06.04.09.30.34 +Version 2.4.7-stable+timestamp.2013.06.04.16.40.00 diff --git a/applications/admin/static/js/web2py.js b/applications/admin/static/js/web2py.js index c4d5ee13..4fa32877 100644 --- a/applications/admin/static/js/web2py.js +++ b/applications/admin/static/js/web2py.js @@ -35,6 +35,7 @@ function web2py_ajax_init(target) { jQuery('.hidden', target).hide(); jQuery('.error', target).hide().slideDown('slow'); web2py_ajax_fields(target); + web2py_show_if(target); }; function web2py_event_handlers() { @@ -78,7 +79,6 @@ jQuery(function() { if(flash.html()) flash.append('×').slideDown(); web2py_ajax_init(document); web2py_event_handlers(); - web2py_show_if(); }); function web2py_trap_form(action,target) { @@ -217,26 +217,26 @@ function web2py_validate_entropy(myfield, req_entropy) { if(!myfield.hasClass('entropy_check')) myfield.on('keyup', validator).on('keydown', validator).addClass('entropy_check'); } -function web2py_show_if() { +function web2py_show_if(target) { var triggers = {}; - var show_if = function() { - var t = jQuery(this); + var show_if = function () { + var t = jQuery(this); var id = t.attr('id'); - t.attr('value',t.val()); - for(var k=0; k×').slideDown(); web2py_ajax_init(document); web2py_event_handlers(); - web2py_show_if(); }); function web2py_trap_form(action,target) { @@ -217,26 +217,26 @@ function web2py_validate_entropy(myfield, req_entropy) { if(!myfield.hasClass('entropy_check')) myfield.on('keyup', validator).on('keydown', validator).addClass('entropy_check'); } -function web2py_show_if() { +function web2py_show_if(target) { var triggers = {}; - var show_if = function() { - var t = jQuery(this); + var show_if = function () { + var t = jQuery(this); var id = t.attr('id'); - t.attr('value',t.val()); - for(var k=0; k×').slideDown(); web2py_ajax_init(document); web2py_event_handlers(); - web2py_show_if(); }); function web2py_trap_form(action,target) { @@ -217,26 +217,26 @@ function web2py_validate_entropy(myfield, req_entropy) { if(!myfield.hasClass('entropy_check')) myfield.on('keyup', validator).on('keydown', validator).addClass('entropy_check'); } -function web2py_show_if() { +function web2py_show_if(target) { var triggers = {}; - var show_if = function() { - var t = jQuery(this); + var show_if = function () { + var t = jQuery(this); var id = t.attr('id'); - t.attr('value',t.val()); - for(var k=0; k