[oe-commits] [bitbake] 01/14: toaster: tablejs Add visual indicator for table data loading

git at git.openembedded.org git at git.openembedded.org
Mon Dec 12 20:45:55 UTC 2016


rpurdie pushed a commit to branch master
in repository bitbake.

commit 554c4992b33b77526b4b37c7484f1dd00032ddef
Author: Michael Wood <michael.g.wood at intel.com>
AuthorDate: Fri Dec 9 16:52:42 2016 +0000

    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 <michael.g.wood at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/toaster/toastergui/static/js/table.js | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/lib/toaster/toastergui/static/js/table.js b/lib/toaster/toastergui/static/js/table.js
index aaa3e1f..9db3902 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);
+  })
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list