sonarr-repo-only/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'
},
{
title : 'Updates',
icon : 'icon-upload-alt',
route : 'update'
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
}));
}
});
});