diff options
| -rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/table.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/table.js b/bitbake/lib/toaster/toastergui/static/js/table.js index a253917b61..9384386718 100644 --- a/bitbake/lib/toaster/toastergui/static/js/table.js +++ b/bitbake/lib/toaster/toastergui/static/js/table.js | |||
| @@ -399,18 +399,21 @@ function tableInit(ctx){ | |||
| 399 | * show when selected | 399 | * show when selected |
| 400 | */ | 400 | */ |
| 401 | function createActionRadio(filterName, filterActionData) { | 401 | function createActionRadio(filterName, filterActionData) { |
| 402 | var hasNoRecords = (Number(filterActionData.count) == 0); | ||
| 403 | |||
| 402 | var actionStr = '<div class="radio">' + | 404 | var actionStr = '<div class="radio">' + |
| 403 | '<input type="radio" name="filter"' + | 405 | '<input type="radio" name="filter"' + |
| 404 | ' value="' + filterName + '"'; | 406 | ' value="' + filterName + '"'; |
| 405 | 407 | ||
| 406 | if (Number(filterActionData.count) == 0) { | 408 | if (hasNoRecords) { |
| 407 | actionStr += ' disabled="disabled"'; | 409 | actionStr += ' disabled="disabled"'; |
| 408 | } | 410 | } |
| 409 | 411 | ||
| 410 | actionStr += ' id="' + filterName + '">' + | 412 | actionStr += ' id="' + filterName + '">' + |
| 411 | '<input type="hidden" name="filter_value" value="on"' + | 413 | '<input type="hidden" name="filter_value" value="on"' + |
| 412 | ' data-value-for="' + filterName + '">' + | 414 | ' data-value-for="' + filterName + '">' + |
| 413 | '<label class="filter-title"' + | 415 | '<label class="filter-title' + |
| 416 | (hasNoRecords ? ' muted' : '') + '"' + | ||
| 414 | ' for="' + filterName + '">' + | 417 | ' for="' + filterName + '">' + |
| 415 | filterActionData.title + | 418 | filterActionData.title + |
| 416 | ' (' + filterActionData.count + ')' + | 419 | ' (' + filterActionData.count + ')' + |
