Revision 6e4e71b8
b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/ember/controllers/items.js | ||
---|---|---|
6 | 6 |
title: function () { |
7 | 7 |
return this.codeName; |
8 | 8 |
}.property(), |
9 |
|
|
10 |
// returns codename without an 's', i.e. network |
|
11 |
_item: function () { |
|
12 |
return this.codeName.substring(0, this.codeName.length - 1); |
|
13 |
}.property(), |
|
9 | 14 |
|
10 | 15 |
// returns codename without an 's', i.e. network |
11 | 16 |
itemController: function () { |
12 |
return this.codeName.substring(0, this.codeName.length - 1);
|
|
17 |
return this.get('_item');
|
|
13 | 18 |
}.property(), |
14 | 19 |
|
15 | 20 |
// returns snf-network-full |
16 | 21 |
iconCls: function () { |
17 |
var item = this.codeName.substring(0, this.codeName.length - 1); |
|
18 |
return 'snf-'+item+'-full'; |
|
22 |
return 'snf-'+this.get('_item')+'-full'; |
|
19 | 23 |
}.property(), |
20 | 24 |
|
21 | 25 |
// returns snf-network-create-full |
22 | 26 |
newIcon: function () { |
23 |
var item = this.codeName.substring(0, this.codeName.length - 1); |
|
24 |
return 'snf-'+item+'-create-full'; |
|
27 |
return 'snf-'+this.get('_item')+'-create-full'; |
|
25 | 28 |
}.property(), |
26 | 29 |
|
27 | 30 |
// returns Create new network |
28 | 31 |
newTxt: function () { |
29 |
var item = this.codeName.substring(0, this.codeName.length - 1); |
|
30 |
return 'Create new '+item; |
|
32 |
return 'Create new '+this.get('_item'); |
|
31 | 33 |
}.property(), |
32 | 34 |
|
33 | 35 |
// enables grid/list view in action bar |
... | ... | |
44 | 46 |
}.property(), |
45 | 47 |
|
46 | 48 |
codeNameChildInit: function () { |
47 |
var item = this.codeName.substring(0, this.codeName.length - 1); |
|
48 |
return item+'init'; |
|
49 |
return this.get('_item')+'init'; |
|
49 | 50 |
}.property(), |
50 | 51 |
|
51 | 52 |
}); |
Also available in: Unified diff