fix web2py.js with show_if and grid
This commit is contained in:
1 parent
95b54857a3
commit
7fa8f1fa08
3 files changed
+15
-6
No files matched your search
@@ -545,8 +545,11 @@
|
||||
};
|
||||
$('[data-show-trigger]', target).each(function () {
|
||||
var name = $(this).attr('data-show-trigger');
|
||||
if(!triggers[name]) triggers[name] = [];
|
||||
triggers[name].push($(this).attr('id'));
|
||||
// The field exists only when creating/editing a row
|
||||
if ($('#' + name).length) {
|
||||
if(!triggers[name]) triggers[name] = [];
|
||||
triggers[name].push($(this).attr('id'));
|
||||
}
|
||||
});
|
||||
for(var name in triggers) {
|
||||
$('#' + name, target).change(show_if).keyup(show_if);
|
||||
|
||||
Reference in new issue
Block a user