1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-21 22:29:41 +02:00

Removed obsolete doc general settings code

This commit is contained in:
HarveyKandola 2018-06-22 11:02:31 +01:00
parent 785e4c245d
commit 6ff74cf45e
3 changed files with 660 additions and 686 deletions

View file

@ -10,7 +10,6 @@
// https://documize.com
import { empty } from '@ember/object/computed';
import { computed } from '@ember/object';
import { inject as service } from '@ember/service';
import Notifier from '../../mixins/notifier';
import Component from '@ember/component';
@ -21,31 +20,6 @@ export default Component.extend(Notifier, {
docExcerpt: '',
hasNameError: empty('docName'),
noEdits: computed('permssions', 'document', function() {
let constants = this.get('constants');
let permissions = this.get('permissions');
if (!permissions.get('documentEdit')) {
return true;
}
if (!permissions.get('documentApprove') && this.get('document.protection') === constants.ProtectionType.Review) {
return true;
}
if (this.get('document.protection') === constants.ProtectionType.Lock) {
return true;
}
return false;
}),
keyUp(e) {
if (e.keyCode === 27) { // escape key
this.send('onCancel');
}
},
didReceiveAttrs() {
this._super(...arguments);