mirror of
https://github.com/documize/community.git
synced 2025-07-22 22:59:43 +02:00
Turn add section UX into modal flow
At long last we have a modal-driven add section process @HarveyKandola !
This commit is contained in:
parent
716bd062d7
commit
fca6cc7ede
8 changed files with 286 additions and 303 deletions
|
@ -13,11 +13,12 @@ import $ from 'jquery';
|
|||
import { computed } from '@ember/object';
|
||||
import { debounce } from '@ember/runloop';
|
||||
import { inject as service } from '@ember/service';
|
||||
import Tooltips from '../../mixins/tooltip';
|
||||
import ModalMixin from '../../mixins/modal';
|
||||
import tocUtil from '../../utils/toc';
|
||||
import Component from '@ember/component';
|
||||
|
||||
export default Component.extend(ModalMixin, {
|
||||
export default Component.extend(ModalMixin, Tooltips, {
|
||||
documentService: service('document'),
|
||||
searchService: service('search'),
|
||||
router: service(),
|
||||
|
@ -77,6 +78,14 @@ export default Component.extend(ModalMixin, {
|
|||
this.setState(this.get('page.id'));
|
||||
},
|
||||
|
||||
didInsertElement() {
|
||||
this._super(...arguments);
|
||||
|
||||
if (this.get('session.authenticated')) {
|
||||
this.renderTooltips();
|
||||
}
|
||||
},
|
||||
|
||||
searchDocs() {
|
||||
let payload = { keywords: this.get('docSearchFilter').trim(), doc: true };
|
||||
if (payload.keywords.length == 0) return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue