Radarr/UI/System/Layout.js

64 lines
1.7 KiB
JavaScript
Raw Normal View History

2013-09-11 06:33:47 +00:00
'use strict';
2013-07-28 20:20:26 +00:00
define(
[
'app',
'marionette',
'System/StatusModel',
'System/About/View',
'Logs/Layout',
2013-09-11 06:33:47 +00:00
'Shared/Toolbar/ToolbarLayout'
2013-07-28 20:20:26 +00:00
], function (App,
Marionette,
StatusModel,
AboutView,
LogsLayout,
2013-09-11 06:33:47 +00:00
ToolbarLayout) {
2013-07-28 20:20:26 +00:00
return Marionette.Layout.extend({
template: 'System/LayoutTemplate',
regions: {
toolbar : '#toolbar',
about : '#about',
loading : '#loading'
},
leftSideButtons: {
type : 'default',
storeState: false,
items :
[
{
title: 'Logs',
icon : 'icon-book',
route: 'logs'
},
{
2013-08-09 06:04:45 +00:00
title : 'Check for Update',
icon : 'icon-nd-update',
command: 'applicationUpdate'
2013-09-11 06:33:47 +00:00
}
2013-07-28 20:20:26 +00:00
]
},
initialize: function () {
this.statusModel = StatusModel;
},
onRender: function () {
this._showToolbar();
this.about.show(new AboutView({ model: this.statusModel }));
},
_showToolbar: function () {
this.toolbar.show(new ToolbarLayout({
left :
[
this.leftSideButtons
],
context: this
}));
}
});
});