mirror of
https://github.com/documize/community.git
synced 2025-07-30 02:29:43 +02:00
implemented move content to another document
This commit is contained in:
parent
07ee2248d4
commit
b5a595e305
9 changed files with 105 additions and 19 deletions
|
@ -325,6 +325,16 @@ export default Ember.Service.extend({
|
|||
let data = this.get('store').normalize('page', response);
|
||||
return this.get('store').push(data);
|
||||
});
|
||||
},
|
||||
|
||||
// Move existing page to different document.
|
||||
movePage(documentId, pageId, targetDocumentId) {
|
||||
return this.get('ajax').request(`documents/${documentId}/pages/${pageId}/move/${targetDocumentId}`, {
|
||||
method: 'POST'
|
||||
}).then((response) => {
|
||||
let data = this.get('store').normalize('page', response);
|
||||
return this.get('store').push(data);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue