Bug 27321: Make disabled DB columns clearly disabled visually
To test: 1. Apply patch and its dependency (bug 17364) 2. Rebuild the CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client) 3. Go the system pref BorroweUnwantedFields 4. branchcode should cleary stand out as disabled (#cccccc) Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
1cc252c145
commit
814bb1cf41
2 changed files with 9 additions and 1 deletions
|
@ -3324,6 +3324,11 @@ label {
|
|||
display: block;
|
||||
margin: .5em 0;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
color: #CCC;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
.radio {
|
||||
|
|
|
@ -233,6 +233,7 @@ $( document ).ready( function () {
|
|||
$.getJSON( themelang + "/modules/admin/preferences/" + datasource + ".json", function( data ){
|
||||
var items = [];
|
||||
var checked = "";
|
||||
var style = "";
|
||||
$.each( data, function( key, val ){
|
||||
if( prefs.indexOf( val ) >= 0 ){
|
||||
checked = ' checked="checked" ';
|
||||
|
@ -240,12 +241,14 @@ $( document ).ready( function () {
|
|||
checked = "";
|
||||
}
|
||||
if( exclusions.indexOf( val ) >= 0 ){
|
||||
style = "disabled";
|
||||
disabled = ' disabled="disabled" ';
|
||||
checked = "";
|
||||
} else {
|
||||
style = "";
|
||||
disabled = "";
|
||||
}
|
||||
items.push('<label><input class="dbcolumn_selection" type="checkbox" id="' + key + '"' + checked + disabled + ' name="pref" value="' + val + '" /> ' + key + '</label>');
|
||||
items.push('<label class="' + style +'"><input class="dbcolumn_selection" type="checkbox" id="' + key + '"' + checked + disabled + ' name="pref" value="' + val + '" /> ' + key + '</label>');
|
||||
});
|
||||
$("<div/>", {
|
||||
"class": "columns-2",
|
||||
|
|
Loading…
Reference in a new issue