mirror of
https://github.com/documize/community.git
synced 2025-07-23 15:19:42 +02:00
removed default space creation
This commit is contained in:
parent
2154d01dcc
commit
686d74a041
1 changed files with 4 additions and 10 deletions
|
@ -1,11 +1,11 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
||||||
//
|
//
|
||||||
// This software (Documize Community Edition) is licensed under
|
// This software (Documize Community Edition) is licensed under
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
||||||
//
|
//
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
// You can operate outside the AGPL restrictions by purchasing
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
// Documize Enterprise Edition and obtaining a commercial license
|
||||||
// by contacting <sales@documize.com>.
|
// by contacting <sales@documize.com>.
|
||||||
//
|
//
|
||||||
// https://documize.com
|
// https://documize.com
|
||||||
|
|
||||||
|
@ -53,17 +53,11 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
||||||
}
|
}
|
||||||
|
|
||||||
// If model has any folders redirect to dashboard
|
// If model has any folders redirect to dashboard
|
||||||
if (model.length > 0) {
|
if (model.get('length') > 0) {
|
||||||
let folder = model[0];
|
let folder = model[0];
|
||||||
Ember.set(this, 'folder', folder);
|
Ember.set(this, 'folder', folder);
|
||||||
this.transitionTo('folders.folder', folder.get('id'), folder.get('slug'));
|
this.transitionTo('folders.folder', folder.get('id'), folder.get('slug'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// has no folders, create default folder
|
|
||||||
return this.get('folderService').add({ name: "My Space" }).then((folder) => {
|
|
||||||
Ember.set(this, 'folder', folder);
|
|
||||||
this.transitionTo('folders.folder', folder.get('id'), folder.get('slug'));
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//If folder route has params
|
//If folder route has params
|
||||||
|
@ -88,4 +82,4 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
||||||
controller.set('model', model);
|
controller.set('model', model);
|
||||||
controller.set('folder', this.folder);
|
controller.set('folder', this.folder);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue