From: Michael Wood Date: Fri, 9 Dec 2016 16:52:42 +0000 (+0000) Subject: toaster: tablejs Add visual indicator for table data loading X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=554c4992b33b77526b4b37c7484f1dd00032ddef;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git toaster: tablejs Add visual indicator for table data loading Add a visual indicator when the data is changing in the table, for instance if it's being re-ordered, searched or paginated. [YOCTO #10104] Signed-off-by: Michael Wood Signed-off-by: Richard Purdie --- diff --git a/lib/toaster/toastergui/static/js/table.js b/lib/toaster/toastergui/static/js/table.js index aaa3e1f5cde..9db3902b55d 100644 --- a/lib/toaster/toastergui/static/js/table.js +++ b/lib/toaster/toastergui/static/js/table.js @@ -39,6 +39,8 @@ function tableInit(ctx){ ', .show-all-'+ctx.tableName); function loadData(tableParams){ + table.trigger("table-loading"); + $.ajax({ type: "GET", url: ctx.url, @@ -835,4 +837,12 @@ function tableInit(ctx){ $('#filter-modal-'+ctx.tableName).modal('hide'); }); + + table.on("table-loading", function(){ + table.css("opacity", 0.5); + }); + + table.on("table-done", function(){ + table.css("opacity", 1); + }) }