aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2016-01-15 13:01:01 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-15 16:30:00 +0000
commit6c2d88fda5bb121836c57fd54e23e3a63528801d (patch)
treef409178b84758131401835f10bd1c24b50d43442 /bitbake
parentf08730ab4de72999236ed5fc5df2286febd542e7 (diff)
downloadopenembedded-core-contrib-6c2d88fda5bb121836c57fd54e23e3a63528801d.tar.gz
bitbake: toastergui: mute label for filter actions with no records
The radio button for a filter action is disabled if that filter action has no associated records. However, the label retains the normal font styling, so it's unclear that the action is not available. Add the "muted" class to the label for a filter action (and still disable its radio button) if it has no records associated with it. [YOCTO #8738] (Bitbake rev: b7f7ff095c9c4c922e608f776713f17acc1f150d) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/table.js7
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){
* show when selected
*/
function createActionRadio(filterName, filterActionData) {
+ var hasNoRecords = (Number(filterActionData.count) == 0);
+
var actionStr = '<div class="radio">' +
'<input type="radio" name="filter"' +
' value="' + filterName + '"';
- if (Number(filterActionData.count) == 0) {
+ if (hasNoRecords) {
actionStr += ' disabled="disabled"';
}
actionStr += ' id="' + filterName + '">' +
'<input type="hidden" name="filter_value" value="on"' +
' data-value-for="' + filterName + '">' +
- '<label class="filter-title"' +
+ '<label class="filter-title' +
+ (hasNoRecords ? ' muted' : '') + '"' +
' for="' + filterName + '">' +
filterActionData.title +
' (' + filterActionData.count + ')' +