mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
EmberJS: FolderID to SpaceID
Co-Authored-By: Harvey Kandola <harvey@documize.com>
This commit is contained in:
parent
66d5e73ed1
commit
e0457b40da
45 changed files with 170 additions and 99 deletions
|
@ -20,6 +20,12 @@ export default Controller.extend({
|
|||
if(this.get('session.isAdmin')) {
|
||||
return this.get('global').backup(spec);
|
||||
}
|
||||
},
|
||||
|
||||
onRestore(spec, filedata) {
|
||||
if(this.get('session.isAdmin')) {
|
||||
return this.get('global').restore(spec, filedata);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1 +1 @@
|
|||
{{customize/backup-restore onBackup=(action 'onBackup')}}
|
||||
{{customize/backup-restore onBackup=(action 'onBackup') onRestore=(action 'onRestore')}}
|
||||
|
|
|
@ -65,7 +65,7 @@ export default Controller.extend(TooltipMixin, Notifier, {
|
|||
this.set('deleteSpace.name', '');
|
||||
|
||||
this.get('folderService').adminList().then((folders) => {
|
||||
let nonPrivateFolders = folders.rejectBy('folderType', 2);
|
||||
let nonPrivateFolders = folders.rejectBy('spaceType', 2);
|
||||
if (is.empty(nonPrivateFolders) || is.null(folders) || is.undefined(folders)) {
|
||||
nonPrivateFolders = [];
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ export default Route.extend(AuthenticatedRouteMixin, {
|
|||
},
|
||||
|
||||
setupController(controller, model) {
|
||||
let nonPrivateFolders = model.rejectBy('folderType', 2);
|
||||
let nonPrivateFolders = model.rejectBy('spaceType', 2);
|
||||
if (is.empty(nonPrivateFolders) || is.null(model) || is.undefined(model)) {
|
||||
nonPrivateFolders = [];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue