invalidate function in web2py.js

This commit is contained in:
ilvalle
2013-12-11 15:50:19 +01:00
parent 3204447a74
commit 371f97e050
3 changed files with 36 additions and 3 deletions
+12 -1
View File
@@ -659,7 +659,18 @@
el.on('ajax:complete', 'form[data-w2p_target]', function (e) {
web2py.enableFormElements($(this));
});
}
},
/* Invalidate and force reload of a web2py component
*/
invalidate: function(target) {
$('div[data-w2p_remote]', target).each(function () {
var el = $('#' + $(this).attr('id')).get(0);
if (el.timing !== undefined) { // Block triggering regular routines
clearInterval(el.timing);
}
});
$.web2py.component_handler(target);
},
}
/*end of functions */
+12 -1
View File
@@ -659,7 +659,18 @@
el.on('ajax:complete', 'form[data-w2p_target]', function (e) {
web2py.enableFormElements($(this));
});
}
},
/* Invalidate and force reload of a web2py component
*/
invalidate: function(target) {
$('div[data-w2p_remote]', target).each(function () {
var el = $('#' + $(this).attr('id')).get(0);
if (el.timing !== undefined) { // Block triggering regular routines
clearInterval(el.timing);
}
});
$.web2py.component_handler(target);
},
}
/*end of functions */
+12 -1
View File
@@ -659,7 +659,18 @@
el.on('ajax:complete', 'form[data-w2p_target]', function (e) {
web2py.enableFormElements($(this));
});
}
},
/* Invalidate and force reload of a web2py component
*/
invalidate: function(target) {
$('div[data-w2p_remote]', target).each(function () {
var el = $('#' + $(this).attr('id')).get(0);
if (el.timing !== undefined) { // Block triggering regular routines
clearInterval(el.timing);
}
});
$.web2py.component_handler(target);
},
}
/*end of functions */