Revision 6bf34226

b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/ember/controllers/items.js
2 2
    
3 3
    codeName: '',
4 4
    
5

  
5 6
    // returns the same as codename, i.e. networks
6 7
    title: function () {
7 8
        return this.codeName;
......
38 39

  
39 40
    // enables filtering in action bar    
40 41
    hasFilter: true,
42

  
43
    codeNameParent: function () {
44
        return this.codeName;
45
    }.property(),
46

  
47
    codeNameChildInit: function () {
48
        var item = this.codeName.substring(0, this.codeName.length - 1);
49
        return item+'init';
50
    }.property(),
41 51
    
42 52
});
43 53

  
44 54

  
45 55
App.NetworksController = App.ItemsListController.extend({
46
    codeName : 'networks'
56
    codeName : 'networks',
47 57
});
48 58

  
49 59

  
b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/ember/routes/items.js
27 27
    },
28 28

  
29 29
    afterModel: function(model, transition ) {
30
        console.log(this.viewCls,'t');
31 30
        if (this.viewCls == 'first') {
32 31
            this.transitionTo(this.modelName, model.get('firstObject').id);
33 32
        }
b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/ember/routes/vm.js
6 6

  
7 7
    renderTemplate: function() {
8 8
        this.render('vm');
9

  
9 10
        this.render('lt-bar', {
10 11
          into: 'vm',
11 12
          outlet: 'lt-bar',
12 13
          controller: 'vms',
13 14
        });
15

  
16
/*        this.render('test', {
17
          into: 'item',
18
          outlet: 'test',
19
          controller: 'vm',
20
        });*/
14 21
    }
15 22

  
16 23
});
24

  
25

  
26
App.VminitRoute = Ember.Route.extend({
27

  
28
  model: function(params){
29
    return this.store.find('vm');
30
  },
31

  
32
  afterModel: function(model) {
33
    this.transitionTo('vm', model.get('firstObject').id);
34
  }
35
});
b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/templates/_actions-bar.hbs
4 4

  
5 5
	{{#if hasViewCls}}
6 6
	<div class="rt-actions">
7
		{{#link-to codeName 'first' class="single"}}{{/link-to}}
8
		{{#link-to codeName 'grid-view'}}<span class="snf-gridview current">{{/link-to}}
9
		{{#link-to codeName 'list-view'}}<span class="snf-listview "></span>{{/link-to}}
7
		{{#link-to codeNameChildInit class="single"}}{{/link-to}}
8
		{{#link-to codeNameParent 'grid-view'}}<span class="snf-gridview current">{{/link-to}}
9
		{{#link-to codeNameParent 'list-view'}}<span class="snf-listview "></span>{{/link-to}}
10 10
	</div>
11 11
	{{/if}}
12 12
	
b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/templates/item.hbs
1 1
<li {{bind-attr data-status=this.status class=this.status}}>
2

  
3 2
	{{view App.sideActionsView}}
4 3

  
5 4
	<div class="container">
5

  
6 6
		<a href="" class="check">
7 7
			<span class="snf-checkbox-unchecked"></span>
8 8
		</a>
......
13 13
		<div class= "status">
14 14
			<span class="state">{{status-to-text this.status}}</span>
15 15
		</div>
16
		<div class="actions">
17
			<a href="" data-reveal-id="vm-connect" data-tooltip title="connect" class="connect has-tip"><span class="snf-thunder-full"></span></a>
18
			<a href="vm_details.html" data-tooltip title="view vm details" class="snf-info-outline has-tip">i</a>
19
		</div>
20
		<div class="info"><a {{bind-attr href=this.link title=this.title}}>{{this.link}}</a></div>
21 16
	</div>
22 17
</li>
23 18
	

Also available in: Unified diff