mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-19 06:31:30 +00:00
parent
d0de4fd8f9
commit
dba506a20e
2 changed files with 4 additions and 1 deletions
resources
|
@ -7,6 +7,8 @@ class EntitySelectorPopup {
|
||||||
setup() {
|
setup() {
|
||||||
this.elem = this.$el;
|
this.elem = this.$el;
|
||||||
this.selectButton = this.$refs.select;
|
this.selectButton = this.$refs.select;
|
||||||
|
this.searchInput = this.$refs.searchInput;
|
||||||
|
|
||||||
window.EntitySelectorPopup = this;
|
window.EntitySelectorPopup = this;
|
||||||
|
|
||||||
this.callback = null;
|
this.callback = null;
|
||||||
|
@ -20,6 +22,7 @@ class EntitySelectorPopup {
|
||||||
show(callback) {
|
show(callback) {
|
||||||
this.callback = callback;
|
this.callback = callback;
|
||||||
this.elem.components.popup.show();
|
this.elem.components.popup.show();
|
||||||
|
this.searchInput.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
hide() {
|
hide() {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
option:entity-selector:entity-types="{{ $entityTypes ?? 'book,chapter,page' }}"
|
option:entity-selector:entity-types="{{ $entityTypes ?? 'book,chapter,page' }}"
|
||||||
option:entity-selector:entity-permission="{{ $entityPermission ?? 'view' }}">
|
option:entity-selector:entity-permission="{{ $entityPermission ?? 'view' }}">
|
||||||
<input refs="entity-selector@input" type="hidden" name="{{$name}}" value="">
|
<input refs="entity-selector@input" type="hidden" name="{{$name}}" value="">
|
||||||
<input type="text" placeholder="{{ trans('common.search') }}" @if($autofocus ?? false) autofocus @endif refs="entity-selector@search">
|
<input refs="entity-selector@search entity-selector-popup@searchInput" type="text" placeholder="{{ trans('common.search') }}" @if($autofocus ?? false) autofocus @endif>
|
||||||
<div class="text-center loading" refs="entity-selector@loading">@include('common.loading-icon')</div>
|
<div class="text-center loading" refs="entity-selector@loading">@include('common.loading-icon')</div>
|
||||||
<div refs="entity-selector@results"></div>
|
<div refs="entity-selector@results"></div>
|
||||||
@if($showAdd ?? false)
|
@if($showAdd ?? false)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue