From 72d35cc8bafd0b2e284460318957a5223265c4b8 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 11 Jan 2021 19:35:27 +0000 Subject: [PATCH] Bug 27321: (follow-up) Use class instead of style attribute. This patch relplaces the inline style and uses a class name instead. SCSS is modified, so rebuild the staff client CSS before testing (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). --- koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss | 5 +++++ koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss index 6d03d1a310..d72d56ab88 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -3305,6 +3305,11 @@ label { display: block; margin: .5em 0; } + + &.disabled { + color: #CCC; + cursor: not-allowed; + } } .radio { diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js b/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js index 3685ec06ee..2691aec4f3 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js +++ b/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js @@ -241,14 +241,13 @@ $( document ).ready( function () { checked = ""; } if( exclusions.indexOf( val ) >= 0 ){ - style = ' style="color:#cccccc;" '; + style = 'disabled'; disabled = ' disabled="disabled" '; checked = ""; } else { - style = ' style="color:#000;" '; disabled = ""; } - items.push(' ' + key + ''); + items.push(''); }); $("
", { "class": "columns-2", -- 2.11.0