mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-16 21:34:58 +00:00
Upgraded app to Laravel 5.7
This commit is contained in:
parent
213e9d2941
commit
6917ea088f
179 changed files with 829 additions and 115 deletions
resources/js/components
20
resources/js/components/entity-permissions-editor.js
Normal file
20
resources/js/components/entity-permissions-editor.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
|
||||
class EntityPermissionsEditor {
|
||||
|
||||
constructor(elem) {
|
||||
this.permissionsTable = elem.querySelector('[permissions-table]');
|
||||
|
||||
// Handle toggle all event
|
||||
this.restrictedCheckbox = elem.querySelector('[name=restricted]');
|
||||
this.restrictedCheckbox.addEventListener('change', this.updateTableVisibility.bind(this));
|
||||
}
|
||||
|
||||
updateTableVisibility() {
|
||||
this.permissionsTable.style.display =
|
||||
this.restrictedCheckbox.checked
|
||||
? null
|
||||
: 'none';
|
||||
}
|
||||
}
|
||||
|
||||
export default EntityPermissionsEditor;
|
Loading…
Add table
Add a link
Reference in a new issue