Revision f29f1023
b/snf-cyclades-app/synnefo/ui/new_ui/ui/index.html | ||
---|---|---|
20 | 20 |
<header> |
21 | 21 |
<nav> |
22 | 22 |
<ul class="icons-nav"> |
23 |
<li>{{#link-to 'vms' class="has-tip" title="machines"}}<span class="snf-pc-outline"></span>{{/link-to}}</li>
|
|
24 |
<li>{{#link-to 'networks' class="has-tip" title="networks"}}<span class="snf-network-outline"></span>{{/link-to}}</li>
|
|
25 |
<li>{{#link-to 'disks' class="has-tip" title="disks"}}<span class="snf-volume-outline"></span>{{/link-to}}</li>
|
|
23 |
{{#each 'iconLink'}}
|
|
24 |
<li>{{#link-to path class="has-tip" title=title}}<span {{bind-attr class="iconCls"}}></span>{{/link-to}}</li>
|
|
25 |
{{/each}}
|
|
26 | 26 |
</ul> |
27 | 27 |
</nav> |
28 | 28 |
<div class="login"> |
b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/common.js | ||
---|---|---|
548 | 548 |
$(that).parents('.hd-search').find('input[type="search"]').val(''); |
549 | 549 |
} |
550 | 550 |
}) |
551 |
$('header').click(function(e){ |
|
552 |
e.preventDefault(); |
|
553 |
alert('s'); |
|
554 |
}) |
|
551 | 555 |
|
552 |
$('.header .login').mouseenter(function(e){
|
|
556 |
$('header .login').mouseenter(function(e){ |
|
553 | 557 |
$(this).find('ul').stop(true, true).slideDown(200); |
554 | 558 |
}); |
555 |
$('.header .login').mouseleave(function(e){
|
|
559 |
$('header .login').mouseleave(function(e){ |
|
556 | 560 |
$(this).find('ul').stop(true, true).slideUp(200); |
557 | 561 |
}); |
558 | 562 |
|
b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/ember/application.js | ||
---|---|---|
1 |
// we have initialized and Ember Application with namespace UI |
|
1 | 2 |
window.UI = Ember.Application.create(); |
2 | 3 |
|
4 |
/* |
|
5 |
* stuff that will be used globally in UI |
|
6 |
* This is weird as non-common models are called in router.js |
|
7 |
* Example: |
|
8 |
* UI.VmsRoute = Ember.Route.extend({ |
|
9 |
* model: function() { |
|
10 |
* return vms; |
|
11 |
* } |
|
12 |
* }); |
|
13 |
*/ |
|
3 | 14 |
UI.ApplicationController = Ember.Controller.extend({ |
4 | 15 |
logoUrl: 'images/synnefo-logo.png', |
5 |
}); |
|
16 |
iconLink:[ { |
|
17 |
id: 1, |
|
18 |
title: 'Machines', |
|
19 |
path: 'vms', |
|
20 |
iconCls: 'snf-pc-outline', |
|
21 |
}, { |
|
22 |
id: 2, |
|
23 |
title: 'Networks', |
|
24 |
path: 'networks', |
|
25 |
iconCls: 'snf-network-outline', |
|
26 |
}, { |
|
27 |
id: 3, |
|
28 |
title: 'Disks', |
|
29 |
path: 'disks', |
|
30 |
iconCls: 'snf-volume-outline', |
|
31 |
}, { |
|
32 |
id: 4, |
|
33 |
title: 'Snapshots', |
|
34 |
path: 'snapshots', |
|
35 |
iconCls: 'snf-snapshot-outline', |
|
36 |
}, { |
|
37 |
id: 5, |
|
38 |
title: 'Images', |
|
39 |
path: 'images', |
|
40 |
iconCls: 'snf-image-outline', |
|
41 |
}], |
|
42 |
}); |
|
43 |
|
b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/ember/models/index.js | ||
---|---|---|
1 |
var links = [ {
|
|
1 |
var index = [ {
|
|
2 | 2 |
id: 1, |
3 | 3 |
title: 'VM1', |
4 | 4 |
body: 'Body vms 1' |
b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/ember/router.js | ||
---|---|---|
1 | 1 |
// if the path is the same as the resource name, there is no need to |
2 | 2 |
// specify it. |
3 | 3 |
|
4 |
|
|
5 |
/* |
|
6 |
* There is a problem if the menu is generated dynamically. |
|
7 |
* The various components are defined in application.js, but must also be |
|
8 |
* declared in router.js file |
|
9 |
* TODO: Look for a better solution |
|
10 |
*/ |
|
4 | 11 |
UI.Router.map(function () { |
5 | 12 |
this.resource('index', { path: '/' }); |
6 | 13 |
this.resource('vms'); |
7 | 14 |
this.resource('networks'); |
8 | 15 |
this.resource('disks'); |
16 |
this.resource('images'); |
|
17 |
this.resource('snapshots'); |
|
9 | 18 |
}); |
10 | 19 |
|
20 |
|
|
11 | 21 |
UI.VmsRoute = Ember.Route.extend({ |
12 | 22 |
model: function() { |
13 | 23 |
return vms; |
Also available in: Unified diff