Merge pull request #327 from ilvalle/create_view

invalidate function in web2py.js
This commit is contained in:
mdipierro
2013-12-11 11:12:33 -08:00
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 */