From a92fc3025b12bf7e794745c05c8567cc491bb073 Mon Sep 17 00:00:00 2001 From: Michael Wood Date: Tue, 27 Oct 2015 19:11:01 +0000 Subject: bitbake: toaster: tablejs Add an event handler to manually trigger a data reload Allow users of ToasterTable to manually trigger a refresh of the data. This can be useful if an action has happened in-page and the data is now invalid. Such as new data being added or removed from the model. (Bitbake rev: 6e42070d8abc80dacd8094c4f5019577453a9d49) Signed-off-by: Michael Wood Signed-off-by: brian avery Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/static/js/table.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bitbake/lib/toaster/toastergui/static') diff --git a/bitbake/lib/toaster/toastergui/static/js/table.js b/bitbake/lib/toaster/toastergui/static/js/table.js index 87cac600a5..a7e4fbad09 100644 --- a/bitbake/lib/toaster/toastergui/static/js/table.js +++ b/bitbake/lib/toaster/toastergui/static/js/table.js @@ -671,6 +671,13 @@ function tableInit(ctx){ }); } + /* Allow pages to trigger reload event */ + table.on('reload', function(e, newTableParams){ + if (newTableParams) + loadData(newTableParams); + else + loadData(tableParams) + }); $(".get-help").tooltip({container:'body', html:true, delay:{show:300}}); -- cgit v1.2.3-54-g00ecf