mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Default templates: Cleaned up ux, added case for added endpoint
Cleaned up and updated page picker a bit, allowing longer names to show, clicking through to item without triggering popup, and updated to use hidden attributes instead of styles. Added phpunit tests to cover supporting entity-selector-templates endpoint.
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import {Component} from './component';
|
||||
|
||||
function toggleElem(elem, show) {
|
||||
elem.style.display = show ? null : 'none';
|
||||
elem.toggleAttribute('hidden', !show);
|
||||
}
|
||||
|
||||
export class PagePicker extends Component {
|
||||
@ -21,6 +21,7 @@ export class PagePicker extends Component {
|
||||
setupListeners() {
|
||||
this.selectButton.addEventListener('click', this.showPopup.bind(this));
|
||||
this.display.parentElement.addEventListener('click', this.showPopup.bind(this));
|
||||
this.display.addEventListener('click', e => e.stopPropagation());
|
||||
|
||||
this.resetButton.addEventListener('click', () => {
|
||||
this.setValue('', '');
|
||||
|
Reference in New Issue
Block a user