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( 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, $checkboxId,
empty($data) ? '' : 'checked', empty($data) ? '' : 'checked',
$requirementMet ? '' : 'disabled="disabled"', $requirementMet ? '' : 'disabled="disabled"',

View File

@ -119,3 +119,11 @@
border-top-right-radius: 0.2rem; border-top-right-radius: 0.2rem;
border-bottom-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 var UI
$(document).ready(() => { $(document).ready(() => {
if (typeof UIFactory !== "undefined") {
UI = new UIFactory() UI = new UIFactory()
}
}) })