1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-20 21:59:42 +02:00

Make section publish modal focus on first input

This commit is contained in:
sauls8t 2019-06-06 18:29:38 +01:00
parent 78fd14b3d3
commit b1cb0ed155
2 changed files with 5 additions and 1 deletions

View file

@ -132,6 +132,10 @@ export default Component.extend(Notifier, ModalMixin, {
this.modalClose('#delete-page-modal-' + this.get('page.id'));
},
onShowPublishModal() {
this.modalOpen('#publish-page-modal-' + this.get('page.id'), {"show": true}, '#block-title-' + this.get('page.id'));
},
onSavePageAsBlock() {
let page = this.get('page');
let titleElem = '#block-title-' + page.get('id');

View file

@ -35,7 +35,7 @@
<a class="item" href="#" id={{concat "move-page-button-" page.id}} {{action "onShowMoveModal"}}>Move</a>
{{/if}}
{{#if permissions.documentTemplate}}
<a class="item" href="#" id={{concat "publish-page-button-" page.id}} data-toggle="modal" data-target={{concat "#publish-page-modal-" page.id}} data-backdrop="static">Publish</a>
<a class="item" href="#" id={{concat "publish-page-button-" page.id}} {{action "onShowPublishModal"}}>Publish</a>
{{/if}}
{{#if permissions.documentDelete}}
<div class="divider"></div>