mirror of
https://github.com/documize/community.git
synced 2025-07-24 07:39:43 +02:00
Reafctor client side (EJS) constants
This commit is contained in:
parent
8fb001422a
commit
bde0091a4a
23 changed files with 118 additions and 367 deletions
|
@ -11,7 +11,6 @@
|
|||
|
||||
import { computed } from '@ember/object';
|
||||
import attr from 'ember-data/attr';
|
||||
import constants from '../utils/constants';
|
||||
import stringUtil from '../utils/string';
|
||||
import Model from 'ember-data/model';
|
||||
|
||||
|
@ -20,6 +19,7 @@ export default Model.extend({
|
|||
orgId: attr('string'),
|
||||
userId: attr('string'),
|
||||
folderType: attr('number', { defaultValue: 2 }),
|
||||
lifecycle: attr('number', { defaultValue: 1 }),
|
||||
likes: attr('string'),
|
||||
|
||||
allowLikes: computed('likes', function () {
|
||||
|
@ -31,14 +31,17 @@ export default Model.extend({
|
|||
}),
|
||||
|
||||
markAsRestricted() {
|
||||
let constants = this.get('constants');
|
||||
this.set('folderType', constants.FolderType.Protected);
|
||||
},
|
||||
|
||||
markAsPrivate() {
|
||||
let constants = this.get('constants');
|
||||
this.set('folderType', constants.FolderType.Private);
|
||||
},
|
||||
|
||||
markAsPublic() {
|
||||
let constants = this.get('constants');
|
||||
this.set('folderType', constants.FolderType.Public);
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue