1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-24 23:59:47 +02:00

Fix Ember lint issues and print view

This commit is contained in:
McMatts 2019-05-31 11:48:16 +01:00
parent 40237344e2
commit 715c31a1da
15 changed files with 53 additions and 37 deletions

View file

@ -9,6 +9,7 @@
//
// https://documize.com
import $ from 'jquery';
import { debounce } from '@ember/runloop';
import { computed, set } from '@ember/object';
import { inject as service } from '@ember/service';
@ -83,7 +84,7 @@ export default Component.extend(ModalMixin, {
didRender() {
this._super(...arguments);
this.$('#content-linker-networklocation').removeClass('is-invalid');
$('#content-linker-networklocation').removeClass('is-invalid');
},
willDestroyElement() {
@ -149,7 +150,7 @@ export default Component.extend(ModalMixin, {
}
if (_.isNull(selection)) {
if (this.get('tab4Selected')) this.$('#content-linker-networklocation').addClass('is-invalid').focus();
if (this.get('tab4Selected')) $('#content-linker-networklocation').addClass('is-invalid').focus();
return;
}

View file

@ -17,6 +17,8 @@ import Modals from '../../mixins/modal';
import Component from '@ember/component';
export default Component.extend(Modals, {
classNames: ['document-meta-wrapper', 'non-printable'],
appMeta: service(),
documentService: service('document'),
sessionService: service('session'),
categoryService: service('category'),
@ -62,6 +64,12 @@ export default Component.extend(Modals, {
if (!this.get('permissions.documentEdit')) return;
this.get('router').transitionTo('document.settings', {queryParams: {tab: 'category'}});
},
onSelectVersion(version) {
let space = this.get('space');
this.get('router').transitionTo('document', space.get('id'), space.get('slug'), version.documentId, this.get('document.slug'));
}
}
});

View file

@ -167,9 +167,9 @@ export default Component.extend(Notifier, {
if (tag.length> 0) {
if (!_.includes(tagzToSave, tag) && !_.startsWith(tag, '-')) {
tagzToSave.push(tag);
this.$('#add-tag-field-' + t.number).removeClass('is-invalid');
$('#add-tag-field-' + t.number).removeClass('is-invalid');
} else {
this.$('#add-tag-field-' + t.number).addClass('is-invalid');
$('#add-tag-field-' + t.number).addClass('is-invalid');
}
}
});

View file

@ -168,9 +168,9 @@ export default Component.extend(Notifier, {
if (tag.length> 0) {
if (!_.includes(tagzToSave, tag) && !_.startsWith(tag, '-')) {
tagzToSave.push(tag);
this.$('#add-tag-field-' + t.number).removeClass('is-invalid');
$('#add-tag-field-' + t.number).removeClass('is-invalid');
} else {
this.$('#add-tag-field-' + t.number).addClass('is-invalid');
$('#add-tag-field-' + t.number).addClass('is-invalid');
}
}
});

View file

@ -17,7 +17,7 @@ import Notifier from '../../mixins/notifier';
import Component from '@ember/component';
export default Component.extend(Modals, Notifier, {
classNames: ["document-meta"],
classNames: ["document-meta", ' non-printable'],
documentService: service('document'),
browserSvc: service('browser'),
appMeta: service(),