mirror of
https://github.com/documize/community.git
synced 2025-07-22 06:39:43 +02:00
Provide icon rendering framework
This commit is contained in:
parent
6eb68f84e0
commit
02102f9bf3
48 changed files with 851 additions and 546 deletions
|
@ -29,7 +29,33 @@ export default Route.extend(AuthenticatedRouteMixin, {
|
|||
return this.get('folderService').getAll();
|
||||
},
|
||||
|
||||
setupController(controller, model) {
|
||||
this._super(controller, model);
|
||||
controller.set('selectedSpaces', model);
|
||||
|
||||
let constants = this.get('constants');
|
||||
let publicSpaces = [];
|
||||
let protectedSpaces = [];
|
||||
let personalSpaces = [];
|
||||
|
||||
_.each(model, space => {
|
||||
if (space.get('spaceType') === constants.SpaceType.Public) {
|
||||
publicSpaces.pushObject(space);
|
||||
}
|
||||
if (space.get('spaceType') === constants.SpaceType.Private) {
|
||||
personalSpaces.pushObject(space);
|
||||
}
|
||||
if (space.get('spaceType') === constants.SpaceType.Protected) {
|
||||
protectedSpaces.pushObject(space);
|
||||
}
|
||||
});
|
||||
|
||||
controller.set('publicSpaces', publicSpaces);
|
||||
controller.set('protectedSpaces', protectedSpaces);
|
||||
controller.set('personalSpaces', personalSpaces);
|
||||
},
|
||||
|
||||
activate() {
|
||||
this.get('browser').setTitle('Spaces');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue