Version added to footer

This commit is contained in:
Mark McDowall 2013-06-14 21:02:40 -07:00
parent 0ae1865dd8
commit f94220c5ff
10 changed files with 52 additions and 18 deletions

View File

@ -56,16 +56,6 @@ html {
font-size: 13px; font-size: 13px;
} }
#footer-region {
font-size: 16px;
text-decoration: none;
font-weight: lighter;
margin: 20px 0 30px 0;
a:hover {
text-decoration: underline;
}
}
#notification-region { #notification-region {
pre { pre {
font-size: 12px; font-size: 12px;

View File

@ -447,11 +447,21 @@ ul.stat-list li label, ul.stat-list li h4, ul.stat-list li small, ul.stat-list l
} }
footer { footer {
padding-top: 20px; font-size: 13px;
font-weight: lighter;
padding-top: 0px;
padding-bottom: 20px; padding-bottom: 20px;
color: #999999; color: #999999;
margin: 0;
text-decoration: none;
a { a {
color: #999999; color: #999999;
text-decoration: underline;
}
p {
margin-bottom: 0px;
} }
} }

View File

@ -15,7 +15,8 @@ define(['app',
'Missing/MissingLayout', 'Missing/MissingLayout',
'History/HistoryLayout', 'History/HistoryLayout',
'Shared/FormatHelpers', 'Shared/FormatHelpers',
'Shared/TemplateHelpers'], 'Shared/TemplateHelpers',
'Shared/Footer/View'],
function () { function () {
var controller = Backbone.Marionette.Controller.extend({ var controller = Backbone.Marionette.Controller.extend({

View File

@ -69,7 +69,7 @@
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="span12"> <div class="span12">
<p>&copy; Copyright 2013 NzbDrone</p> <div id="footer-region"></div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -28,6 +28,7 @@ require(['app', 'Controller', 'RouteBinder'], function (app, controller, routeBi
Backbone.history.start({ pushState: true }); Backbone.history.start({ pushState: true });
routeBinder.bind(); routeBinder.bind();
NzbDrone.footerRegion.show(new NzbDrone.Shared.Footer.View());
}); });
}); });

11
UI/Shared/Footer/Model.js Normal file
View File

@ -0,0 +1,11 @@
"use strict";
define(['app'], function () {
NzbDrone.Shared.Footer.Model = Backbone.Model.extend({
defaults: {
'version' : '0.0.0.0'
}
});
return NzbDrone.Shared.Footer.Model;
});

View File

@ -0,0 +1,2 @@
<p>&copy; Copyright 2013 NzbDrone</p>
<p>v{{version}}</p>

15
UI/Shared/Footer/View.js Normal file
View File

@ -0,0 +1,15 @@
"use strict";
define(['app',
'Shared/Footer/Model'], function () {
NzbDrone.Shared.Footer.View = Backbone.Marionette.ItemView.extend({
template: 'Shared/Footer/Template',
initialize: function () {
this.model = new NzbDrone.Shared.Footer.Model();
this.model.version = NzbDrone.Constants.Version;
}
});
return new NzbDrone.Shared.Footer.View();
});

View File

@ -0,0 +1,3 @@
footer {
font-size: 12.6px;
}

View File

@ -127,7 +127,6 @@ define([
Activity: {} Activity: {}
}; };
window.NzbDrone.Quality = {}; window.NzbDrone.Quality = {};
window.NzbDrone.Commands = {}; window.NzbDrone.Commands = {};
@ -136,8 +135,8 @@ define([
Toolbar : {}, Toolbar : {},
Messenger : {}, Messenger : {},
FormatHelpers: {}, FormatHelpers: {},
Grid : {} Grid : {},
Footer : {}
}; };
window.NzbDrone.Cells = {}; window.NzbDrone.Cells = {};
@ -172,7 +171,8 @@ define([
}; };
window.NzbDrone.Constants = { window.NzbDrone.Constants = {
ApiRoot: '/api' ApiRoot: '/api',
Version: '0.0.0.0'
}; };
window.NzbDrone.addInitializer(function () { window.NzbDrone.addInitializer(function () {
@ -184,7 +184,8 @@ define([
NzbDrone.addRegions({ NzbDrone.addRegions({
mainRegion : '#main-region', mainRegion : '#main-region',
notificationRegion: '#notification-region', notificationRegion: '#notification-region',
modalRegion : ModalRegion modalRegion : ModalRegion,
footerRegion : '#footer-region'
}); });
window.NzbDrone.start(); window.NzbDrone.start();