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 03:58:44 +00:00
|
|
|
|
{
|
2013-09-28 18:48:30 +00:00
|
|
|
|
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
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|