mirror of
https://github.com/documize/community.git
synced 2025-07-23 15:19:42 +02:00
upgraded Ember and Bootstrap, merged changes
This commit is contained in:
parent
b4fd42da38
commit
5dd7d9c181
114 changed files with 9814 additions and 1361 deletions
|
@ -18,24 +18,28 @@ export default Component.extend({
|
|||
documentService: service('document'),
|
||||
appMeta: service(),
|
||||
hasAttachments: notEmpty('files'),
|
||||
deleteAttachment: {
|
||||
id: "",
|
||||
name: "",
|
||||
},
|
||||
canShow: computed('permissions', 'files', function() {
|
||||
return this.get('files.length') > 0 || this.get('permissions.documentEdit');
|
||||
}),
|
||||
canEdit: computed('permissions', 'document.protection', function() {
|
||||
return this.get('document.protection') !== this.get('constants').ProtectionType.Lock && this.get('permissions.documentEdit');
|
||||
}),
|
||||
showDialog: false,
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
this.getAttachments();
|
||||
|
||||
this.deleteAttachment = {
|
||||
id: "",
|
||||
name: "",
|
||||
};
|
||||
},
|
||||
|
||||
didInsertElement() {
|
||||
this._super(...arguments);
|
||||
|
||||
if (!this.get('permissions.documentEdit')) {
|
||||
if (!this.get('permissions.documentEdit') || this.get('document.protection') === this.get('constants').ProtectionType.Lock) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -78,10 +82,6 @@ export default Component.extend({
|
|||
this.set('drop', dzone);
|
||||
},
|
||||
|
||||
willDestroyElement() {
|
||||
this._super(...arguments);
|
||||
},
|
||||
|
||||
getAttachments() {
|
||||
this.get('documentService').getAttachments(this.get('document.id')).then((files) => {
|
||||
this.set('files', files);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue