chg: [genericElements:indexTable] Improved UI of toggle field

pull/37/head
mokaddem 2021-01-11 14:21:46 +01:00
parent 899fa27a45
commit a5e3ded892
3 changed files with 12 additions and 2 deletions

View File

@ -35,7 +35,7 @@
}
echo sprintf(
'<input type="checkbox" id="%s" %s %s><span id="%s" class="d-none"></span>',
'<input type="checkbox" id="%s" class="change-cursor" %s %s><span id="%s" class="d-none"></span>',
$checkboxId,
empty($data) ? '' : 'checked',
$requirementMet ? '' : 'disabled="disabled"',

View File

@ -118,4 +118,12 @@
.btn-group > .btn:last-of-type:not(.dropdown-toggle), .btn-group > .btn-group:not(:last-of-type) > .btn {
border-top-right-radius: 0.2rem;
border-bottom-right-radius: 0.2rem;
}
input[type="checkbox"].change-cursor {
cursor: pointer;
}
input[type="checkbox"]:disabled.change-cursor {
cursor: not-allowed;
}

View File

@ -40,5 +40,7 @@ function executeStateDependencyChecks(dependenceSourceSelector) {
var UI
$(document).ready(() => {
UI = new UIFactory()
if (typeof UIFactory !== "undefined") {
UI = new UIFactory()
}
})