mirror of
https://github.com/documize/community.git
synced 2025-07-23 15:19:42 +02:00
Provide copy document option
Duplicates entire document tree into a new document (same space).
This commit is contained in:
parent
b75969ae90
commit
ec8d5c78e2
10 changed files with 304 additions and 12 deletions
|
@ -78,6 +78,21 @@ export default Service.extend({
|
|||
});
|
||||
},
|
||||
|
||||
|
||||
// Duplicate creates a copy.
|
||||
duplicate(spaceId, docId, docName) {
|
||||
let data = {
|
||||
spaceId: spaceId,
|
||||
documentId: docId,
|
||||
documentName: docName
|
||||
};
|
||||
|
||||
return this.get('ajax').request(`document/duplicate`, {
|
||||
method: 'POST',
|
||||
data: JSON.stringify(data)
|
||||
});
|
||||
},
|
||||
|
||||
//**************************************************
|
||||
// Page
|
||||
//**************************************************
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue