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

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){
_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) {

View File

@ -1,9 +1,9 @@
<ul class="nav nav-tabs">
<li><a href="#info" class="x-info-tab no-router">Info</a></li>
<li><a href="#logs" class="x-logs-tab no-router">Logs</a></li>
<li><a href="#status" class="x-status-tab no-router">Status</a></li>
<li><a href="#updates" class="x-updates-tab no-router">Updates</a></li>
<li><a href="#backup" class="x-backup-tab no-router">Backup</a></li>
<li><a href="#tasks" class="x-tasks-tab no-router">Tasks</a></li>
<li><a href="#backup" class="x-backup-tab no-router">Backup</a></li>
<li><a href="#logs" class="x-logs-tab no-router">Logs</a></li>
<li class="lifecycle-controls pull-right">
<div class="btn-group">
<button class="btn btn-default btn-icon-only x-shutdown" title="Shutdown" data-container="body">
@ -23,9 +23,9 @@
</ul>
<div class="tab-content">
<div class="tab-pane" id="info"></div>
<div class="tab-pane" id="logs"></div>
<div class="tab-pane" id="status"></div>
<div class="tab-pane" id="updates"></div>
<div class="tab-pane" id="backup"></div>
<div class="tab-pane" id="tasks"></div>
<div class="tab-pane" id="backup"></div>
<div class="tab-pane" id="logs"></div>
</div>