root / snf-cyclades-app / synnefo / ui / new_ui / ui / app / controllers / item.js @ be5195f3
History | View | Annotate | Download (625 Bytes)
1 |
App.ItemsItemController = Ember.ObjectController.extend({ |
---|---|
2 |
|
3 |
codeName: 'vm', |
4 |
|
5 |
needs: [],
|
6 |
|
7 |
hasViewCls: true, |
8 |
|
9 |
// i would like to get it from parent controller ????
|
10 |
icon: function () { |
11 |
var item = this.codeName; |
12 |
return 'snf-'+item+'-full'; |
13 |
}.property(), |
14 |
|
15 |
hasTags: true, |
16 |
|
17 |
hasConnect: false, |
18 |
|
19 |
codeNameParent: function() { |
20 |
return this.codeName+'s'; |
21 |
}.property(), |
22 |
|
23 |
codeNameChildInit: function() { |
24 |
return this.codeName+'init'; |
25 |
}.property(), |
26 |
|
27 |
actions : {
|
28 |
saveModel: function(){ |
29 |
this.get('model').save(); |
30 |
}, |
31 |
|
32 |
} |
33 |
|
34 |
|
35 |
}); |