In the project builds table, make sure the table heading displays when a
search query returns no results.

Signed-off-by: Belen Barros Pena <[email protected]>
---
 .../templates/projectbuilds-toastertable.html           | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git 
a/bitbake/lib/toaster/toastergui/templates/projectbuilds-toastertable.html 
b/bitbake/lib/toaster/toastergui/templates/projectbuilds-toastertable.html
index 6d27668..416fb8a 100644
--- a/bitbake/lib/toaster/toastergui/templates/projectbuilds-toastertable.html
+++ b/bitbake/lib/toaster/toastergui/templates/projectbuilds-toastertable.html
@@ -38,6 +38,14 @@
 
       tableElt.on("table-done", function (e, total, tableParams) {
         var title = "All project builds";
+                               
+                               if (total === 0) {
+                                       titleElt.hide();
+                               } 
+                               else {
+                                       titleElt.show()
+                                       titleElt.text(title);
+                               }
 
         if (tableParams.search || tableParams.filter) {
           if (total === 0) {
@@ -46,15 +54,10 @@
           else if (total > 0) {
             title = total + " project build" + (total > 1 ? 's' : '') + " 
found";
           }
-        }
 
-                               if (total === 0) {
-                                       titleElt.hide();
-                               } 
-                               else {
-                                       titleElt.show()
+                                       titleElt.show();
                                        titleElt.text(title);
-                               }
+        }
 
       });
 
-- 
1.9.1

-- 
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster

Reply via email to