UI Cleanup - Updated System, Tags and Wanted subtrees.

This commit is contained in:
Taloth Saldono
2015-02-14 11:18:21 +01:00
parent d6079a701c
commit 32fc68b9df
46 changed files with 1008 additions and 643 deletions
+3 -1
View File
@@ -2,9 +2,11 @@ var NzbDroneCell = require('../../../Cells/NzbDroneCell');
module.exports = NzbDroneCell.extend({
className : 'log-level-cell',
render : function(){
render : function() {
var level = this._getValue();
this.$el.html('<i class="icon-nd-health-{0}" title="{1}"/>'.format(this._getValue().toLowerCase(), level));
return this;
}
});
+34 -24
View File
@@ -6,37 +6,47 @@ var HealthWikiCell = require('./HealthWikiCell');
var HealthOkView = require('./HealthOkView');
module.exports = Marionette.Layout.extend({
template : 'System/Info/Health/HealthLayoutTemplate',
regions : {grid : '#x-health-grid'},
columns : [{
name : 'type',
label : '',
cell : HealthCell,
sortable : false
}, {
name : 'message',
label : 'Message',
cell : 'string',
sortable : false
}, {
name : 'wikiUrl',
label : '',
cell : HealthWikiCell,
sortable : false
}],
initialize : function(){
template : 'System/Info/Health/HealthLayoutTemplate',
regions : {
grid : '#x-health-grid'
},
columns : [
{
name : 'type',
label : '',
cell : HealthCell,
sortable : false
},
{
name : 'message',
label : 'Message',
cell : 'string',
sortable : false
},
{
name : 'wikiUrl',
label : '',
cell : HealthWikiCell,
sortable : false
}
],
initialize : function() {
this.listenTo(HealthCollection, 'sync', this.render);
HealthCollection.fetch();
},
onRender : function(){
if(HealthCollection.length === 0) {
onRender : function() {
if (HealthCollection.length === 0) {
this.grid.show(new HealthOkView());
}
else {
} else {
this._showTable();
}
},
_showTable : function(){
_showTable : function() {
this.grid.show(new Backgrid.Grid({
row : Backgrid.Row,
columns : this.columns,
+3 -1
View File
@@ -1,3 +1,5 @@
var Marionette = require('marionette');
module.exports = Marionette.ItemView.extend({template : 'System/Info/Health/HealthOkViewTemplate'});
module.exports = Marionette.ItemView.extend({
template : 'System/Info/Health/HealthOkViewTemplate'
});
+6 -3
View File
@@ -3,9 +3,12 @@ var Backgrid = require('backgrid');
module.exports = Backgrid.UriCell.extend({
className : 'wiki-link-cell',
title : 'Read the Wiki for more information',
text : 'Wiki',
render : function(){
title : 'Read the Wiki for more information',
text : 'Wiki',
render : function() {
this.$el.empty();
var rawValue = this.model.get(this.column.get('name'));
var formattedValue = this.formatter.fromRaw(rawValue, this.model);