root / snf-cyclades-app / synnefo / ui / new_ui / ui / app / controllers / base.js @ d22d9f7b
History | View | Annotate | Download (623 Bytes)
1 |
Snf.ElemsListController = Ember.ArrayController.extend({ |
---|---|
2 |
|
3 |
type: '', |
4 |
|
5 |
// returns type without an 's', i.e. network
|
6 |
_item: function () { |
7 |
return this.type.substring(0, this.type.length - 1); |
8 |
}.property(), |
9 |
|
10 |
// returns type without an 's', i.e. network
|
11 |
itemController: function () { |
12 |
return this.get('_item'); |
13 |
}.property(), |
14 |
|
15 |
// returns snf-network-full
|
16 |
iconCls: function () { |
17 |
return 'snf-'+this.get('_item')+'-full'; |
18 |
}.property(), |
19 |
|
20 |
}); |
21 |
|
22 |
Snf.ElemController = Ember.ObjectController.extend({ |
23 |
|
24 |
type: 'vm', |
25 |
|
26 |
needs: [],
|
27 |
|
28 |
hasConnect: false, |
29 |
|
30 |
}); |