summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/static/js/table.js
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static/js/table.js')
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/table.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/table.js b/bitbake/lib/toaster/toastergui/static/js/table.js
index afe16b5e1b..7ac4ed5859 100644
--- a/bitbake/lib/toaster/toastergui/static/js/table.js
+++ b/bitbake/lib/toaster/toastergui/static/js/table.js
@@ -33,6 +33,10 @@ function tableInit(ctx){
33 33
34 loadData(tableParams); 34 loadData(tableParams);
35 35
36 // clicking on this set of elements removes the search
37 var clearSearchElements = $('.remove-search-btn-'+ctx.tableName +
38 ', .show-all-'+ctx.tableName);
39
36 function loadData(tableParams){ 40 function loadData(tableParams){
37 $.ajax({ 41 $.ajax({
38 type: "GET", 42 type: "GET",
@@ -62,9 +66,9 @@ function tableInit(ctx){
62 paginationBtns.html(""); 66 paginationBtns.html("");
63 67
64 if (tableParams.search) 68 if (tableParams.search)
65 $('.remove-search-btn-'+ctx.tableName).show(); 69 clearSearchElements.show();
66 else 70 else
67 $('.remove-search-btn-'+ctx.tableName).hide(); 71 clearSearchElements.hide();
68 72
69 $('.table-count-' + ctx.tableName).text(tableData.total); 73 $('.table-count-' + ctx.tableName).text(tableData.total);
70 tableTotal = tableData.total; 74 tableTotal = tableData.total;
@@ -230,9 +234,8 @@ function tableInit(ctx){
230 234
231 } else { 235 } else {
232 /* Not orderable */ 236 /* Not orderable */
233 header.addClass("muted");
234 header.css("font-weight", "normal"); 237 header.css("font-weight", "normal");
235 header.append(col.title+' '); 238 header.append('<span class="muted">' + col.title + '</span> ');
236 } 239 }
237 240
238 /* Setup the filter button */ 241 /* Setup the filter button */
@@ -665,7 +668,7 @@ function tableInit(ctx){
665 loadData(tableParams); 668 loadData(tableParams);
666 }); 669 });
667 670
668 $('.remove-search-btn-'+ctx.tableName).click(function(e){ 671 clearSearchElements.click(function(e){
669 e.preventDefault(); 672 e.preventDefault();
670 673
671 tableParams.page = 1; 674 tableParams.page = 1;