1
0
Fork 0
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:
sauls8t 2018-06-04 14:37:21 +01:00
parent 716bd062d7
commit fca6cc7ede
8 changed files with 286 additions and 303 deletions

View file

@ -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;