1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-04 21:15:24 +02:00

upgraded Ember and Bootstrap, merged changes

This commit is contained in:
sauls8t 2018-01-22 10:31:03 +00:00
parent b4fd42da38
commit 5dd7d9c181
114 changed files with 9814 additions and 1361 deletions

View file

@ -19,7 +19,7 @@ export default Model.extend({
contentType: attr('string'),
pageType: attr('string'),
level: attr('number', { defaultValue: 1 }),
sequence: attr('number', { defaultValue: 0 }),
sequence: attr('number', { defaultValue: 1024 }),
numbering: attr('string'),
revisions: attr('number', { defaultValue: 0 }),
blockId: attr('string'),
@ -27,8 +27,9 @@ export default Model.extend({
body: attr('string'),
rawBody: attr('string'),
meta: attr(),
approval: attr('number', { defaultValue: 0 }),
status: attr('number', { defaultValue: 0 }),
relativeId: attr('string'),
userId: attr('string'),
tagName: computed('level', function () {
return "h2";
@ -48,5 +49,16 @@ export default Model.extend({
}),
created: attr(),
revised: attr()
revised: attr(),
// is this a new page that is pending and belongs to the user?
isNewPageUserPending(userId) {
return this.get('relativeId') === '' && this.get('userId') === userId && (
this.get('status') === this.get('constants').ChangeState.PendingNew || this.get('status') === this.get('constants').ChangeState.UnderReview);
},
// is this new page ready for review?
isNewPageReviewReady() {
return this.get('relativeId') === '' && this.get('status') === this.get('constants').ChangeState.UnderReview;
}
});