mirror of
https://github.com/documize/community.git
synced 2025-07-21 22:29:41 +02:00
Return promise from document model refresh process
This commit is contained in:
parent
ca62d74a19
commit
f2b1b5af03
1 changed files with 5 additions and 1 deletions
|
@ -214,12 +214,16 @@ export default Controller.extend(TooltipMixin, {
|
||||||
},
|
},
|
||||||
|
|
||||||
refresh() {
|
refresh() {
|
||||||
|
return new EmberPromise((resolve) => {
|
||||||
this.get('documentService').fetchPages(this.get('document.id'), this.get('session.user.id')).then((data) => {
|
this.get('documentService').fetchPages(this.get('document.id'), this.get('session.user.id')).then((data) => {
|
||||||
this.set('pages', data);
|
this.set('pages', data);
|
||||||
});
|
|
||||||
|
|
||||||
this.get('sectionService').getSpaceBlocks(this.get('folder.id')).then((data) => {
|
this.get('sectionService').getSpaceBlocks(this.get('folder.id')).then((data) => {
|
||||||
this.set('blocks', data);
|
this.set('blocks', data);
|
||||||
|
});
|
||||||
|
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue