root / snf-cyclades-app / synnefo / ui / new_ui / ui / app / controllers / item.js @ 9d514d49
History | View | Annotate | Download (601 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 |
codeNameParent: function() { |
18 |
return this.codeName+'s'; |
19 |
}.property(), |
20 |
|
21 |
codeNameChildInit: function() { |
22 |
return this.codeName+'init'; |
23 |
}.property(), |
24 |
|
25 |
actions : {
|
26 |
saveModel: function(){ |
27 |
this.get('model').save(); |
28 |
}, |
29 |
|
30 |
} |
31 |
|
32 |
|
33 |
}); |