Skip to content

Commit

Permalink
Tune menu bar.
Browse files Browse the repository at this point in the history
  • Loading branch information
noirbizarre committed Feb 24, 2012
1 parent a56b94a commit 7d4936d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 8 deletions.
19 changes: 16 additions & 3 deletions src/main/webapp/css/ezwall.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ body {

background: grey;
background-color: grey; /* Fall-back color */
background-image: -webkit-linear-gradient(top, grey, #000);
background-image: -moz-linear-gradient(top, grey, #000);
background-image: linear-gradient(top, grey, #000);
background-image: -webkit-linear-gradient(top, #808080, #606060);
background-image: -moz-linear-gradient(top, #808080, #606060);
background-image: linear-gradient(top, #808080, #606060);

opacity: 0.95;
}

#header-display-zone {
Expand All @@ -43,6 +45,17 @@ body {
height: 20px;
}

#main-menu a {
text-decoration: none;
}

#main-menu #view-name {
text-decoration: none;
color: white;
font-weight: bold;
margin: 5px;
}

#dashboard {
margin: 0;
padding: 0;
Expand Down
9 changes: 6 additions & 3 deletions src/main/webapp/js/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@ define([
initialize : function() {
console.log('AppRouter: initiliaze');

// Inialize the jenkins View
this.view = new Jenkins.View();

// Initialize menu
this.menu = new Menu;
this.menu = new Menu({
model: this.view
});
this.menu.render();
this.menu.on('menu:refresh', function() {
this.view.fetchAll();
Expand All @@ -31,8 +36,6 @@ define([
this.navigate('about', true);
}, this);

// Inialize the jenkins View
this.view = new Jenkins.View();

// Initialize Dashboard
this.dashboard = new Dashboard.View({
Expand Down
3 changes: 2 additions & 1 deletion src/main/webapp/js/templates/menu.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<nav id="mainmenu" class="menu">
<nav id="main-menu" class="menu">
<a href=".."><span id="view-name">${name}</span></a>
<button id="refresh-button" class="menu-button">Refresh</button>
<button id="settings-button" class="menu-button">Settings</button>
<button id="about-button" class="menu-button">About</button>
Expand Down
4 changes: 3 additions & 1 deletion src/main/webapp/js/views/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ define([
_.bindAll(this, 'render', 'showMenu', 'hideMenu',
'onVisble', 'onHidden');
console.log('Menu: initialized');
this.model.on('change:name', this.render);
this._visible = false;
},

render : function() {
this.$el.empty();
console.log('Menu: render');
$.tmpl(menuTemplate, {}).appendTo(this.el);
$.tmpl(menuTemplate, this.model.toJSON()).appendTo(this.el);
//this.$('.menu-button').button();
this.$( '#refresh-button' ).button({ icons: {primary:'ui-icon-refresh'}});
this.$( '#settings-button' ).button({ icons: {primary:'ui-icon-wrench'}});
Expand Down

0 comments on commit 7d4936d

Please sign in to comment.