Reordered and renamed tabs in System.

This commit is contained in:
Taloth Saldono
2015-01-27 20:33:32 +01:00
parent 071839fa86
commit f7bdf635b3
2 changed files with 16 additions and 15 deletions
+10 -9
View File
@@ -12,21 +12,21 @@ var StatusModel = require('./StatusModel');
module.exports = Marionette.Layout.extend({
template : 'System/SystemLayoutTemplate',
regions : {
info : '#info',
status : '#status',
logs : '#logs',
updates : '#updates',
backup : '#backup',
tasks : '#tasks'
},
ui : {
infoTab : '.x-info-tab',
statusTab : '.x-status-tab',
logsTab : '.x-logs-tab',
updatesTab : '.x-updates-tab',
backupTab : '.x-backup-tab',
tasksTab : '.x-tasks-tab'
},
events : {
'click .x-info-tab' : '_showInfo',
'click .x-status-tab' : '_showStatus',
'click .x-logs-tab' : '_showLogs',
'click .x-updates-tab' : '_showUpdates',
'click .x-backup-tab' : '_showBackup',
@@ -58,7 +58,7 @@ module.exports = Marionette.Layout.extend({
this._showTasks();
break;
default:
this._showInfo();
this._showStatus();
}
},
_navigate : function(route){
@@ -67,13 +67,14 @@ module.exports = Marionette.Layout.extend({
replace : true
});
},
_showInfo : function(e){
if(e) {
_showStatus : function (e) {
if (e) {
e.preventDefault();
}
this.info.show(new SystemInfoLayout());
this.ui.infoTab.tab('show');
this._navigate('system/info');
this.status.show(new SystemInfoLayout());
this.ui.statusTab.tab('show');
this._navigate('system/status');
},
_showLogs : function(e){
if(e) {