mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-28 19:06:39 +08:00
Added bookshelves homepage options
- Updated homepage selection UI to be more scalable - Cleaned homepage selection logic in code - Added seed test data for bookshelves - Added bookshelves to permission system
This commit is contained in:
@ -15,18 +15,20 @@ class PagePicker {
|
||||
}
|
||||
|
||||
setupListeners() {
|
||||
// Select click
|
||||
this.selectButton.addEventListener('click', event => {
|
||||
window.EntitySelectorPopup.show(entity => {
|
||||
this.setValue(entity.id, entity.name);
|
||||
});
|
||||
});
|
||||
this.selectButton.addEventListener('click', this.showPopup.bind(this));
|
||||
this.display.parentElement.addEventListener('click', this.showPopup.bind(this));
|
||||
|
||||
this.resetButton.addEventListener('click', event => {
|
||||
this.setValue('', '');
|
||||
});
|
||||
}
|
||||
|
||||
showPopup() {
|
||||
window.EntitySelectorPopup.show(entity => {
|
||||
this.setValue(entity.id, entity.name);
|
||||
});
|
||||
}
|
||||
|
||||
setValue(value, name) {
|
||||
this.value = value;
|
||||
this.input.value = value;
|
||||
|
Reference in New Issue
Block a user