1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00
Sonarr/UI/System/Layout.js

64 lines
1.7 KiB
JavaScript
Raw Normal View History

2013-09-11 09:33:47 +03:00
'use strict';
2013-07-28 23:20:26 +03:00
define(
[
'app',
'marionette',
'System/StatusModel',
'System/About/View',
'Logs/Layout',
2013-09-11 09:33:47 +03:00
'Shared/Toolbar/ToolbarLayout'
2013-07-28 23:20:26 +03:00
], function (App,
Marionette,
StatusModel,
AboutView,
LogsLayout,
2013-09-11 09:33:47 +03:00
ToolbarLayout) {
2013-07-28 23:20:26 +03: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 09:04:45 +03:00
title : 'Check for Update',
icon : 'icon-nd-update',
command: 'applicationUpdate'
2013-09-11 09:33:47 +03:00
}
2013-07-28 23:20:26 +03: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
}));
}
});
});