diff --git a/applications/admin/static/js/web2py.js b/applications/admin/static/js/web2py.js index c7a522a9..4a823845 100644 --- a/applications/admin/static/js/web2py.js +++ b/applications/admin/static/js/web2py.js @@ -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 */ diff --git a/applications/examples/static/js/web2py.js b/applications/examples/static/js/web2py.js index c7a522a9..4a823845 100644 --- a/applications/examples/static/js/web2py.js +++ b/applications/examples/static/js/web2py.js @@ -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 */ diff --git a/applications/welcome/static/js/web2py.js b/applications/welcome/static/js/web2py.js index c7a522a9..4a823845 100644 --- a/applications/welcome/static/js/web2py.js +++ b/applications/welcome/static/js/web2py.js @@ -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 */