|
|
|
@ -5,31 +5,36 @@ define(
|
|
|
|
|
'marionette',
|
|
|
|
|
'System/About/AboutView',
|
|
|
|
|
'System/Logs/LogsLayout',
|
|
|
|
|
'System/Update/UpdateLayout'
|
|
|
|
|
'System/Update/UpdateLayout',
|
|
|
|
|
'System/DiskSpace/DiskSpaceLayout'
|
|
|
|
|
], function (Backbone,
|
|
|
|
|
Marionette,
|
|
|
|
|
AboutView,
|
|
|
|
|
LogsLayout,
|
|
|
|
|
UpdateLayout) {
|
|
|
|
|
UpdateLayout,
|
|
|
|
|
DiskSpaceLayout) {
|
|
|
|
|
return Marionette.Layout.extend({
|
|
|
|
|
template: 'System/SystemLayoutTemplate',
|
|
|
|
|
|
|
|
|
|
regions: {
|
|
|
|
|
about : '#about',
|
|
|
|
|
logs : '#logs',
|
|
|
|
|
updates : '#updates'
|
|
|
|
|
updates: '#updates',
|
|
|
|
|
diskSpace: '#diskspace'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
ui: {
|
|
|
|
|
aboutTab : '.x-about-tab',
|
|
|
|
|
logsTab : '.x-logs-tab',
|
|
|
|
|
updatesTab: '.x-updates-tab'
|
|
|
|
|
updatesTab: '.x-updates-tab',
|
|
|
|
|
diskSpaceTab: '.x-diskspace-tab'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
events: {
|
|
|
|
|
'click .x-about-tab' : '_showAbout',
|
|
|
|
|
'click .x-logs-tab' : '_showLogs',
|
|
|
|
|
'click .x-updates-tab': '_showUpdates'
|
|
|
|
|
'click .x-updates-tab': '_showUpdates',
|
|
|
|
|
'click .x-diskspace-tab':'_showDiskSpace'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
initialize: function (options) {
|
|
|
|
@ -46,6 +51,8 @@ define(
|
|
|
|
|
case 'updates':
|
|
|
|
|
this._showUpdates();
|
|
|
|
|
break;
|
|
|
|
|
case 'diskspace':
|
|
|
|
|
this._showDiskSpace();
|
|
|
|
|
default:
|
|
|
|
|
this._showAbout();
|
|
|
|
|
}
|
|
|
|
@ -83,6 +90,14 @@ define(
|
|
|
|
|
this.updates.show(new UpdateLayout());
|
|
|
|
|
this.ui.updatesTab.tab('show');
|
|
|
|
|
this._navigate('system/updates');
|
|
|
|
|
},
|
|
|
|
|
_showDiskSpace: function (e) {
|
|
|
|
|
if (e) {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
}
|
|
|
|
|
this.diskSpace.show(new DiskSpaceLayout());
|
|
|
|
|
this.ui.diskSpaceTab.tab('show');
|
|
|
|
|
this._navigate("system/diskspace");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|