UI Cleanup - Updated Navbar, Profile, Quality and Release subtrees.

This commit is contained in:
Taloth Saldono
2015-02-13 22:47:42 +01:00
parent 29d9e3dadf
commit 860f55996c
10 changed files with 217 additions and 146 deletions

View File

@@ -9,51 +9,63 @@ var ApprovalStatusCell = require('../Cells/ApprovalStatusCell');
var LoadingView = require('../Shared/LoadingView');
module.exports = Marionette.Layout.extend({
template : 'Release/ReleaseLayoutTemplate',
regions : {
template : 'Release/ReleaseLayoutTemplate',
regions : {
grid : '#x-grid',
toolbar : '#x-toolbar'
},
columns : [{
name : 'indexer',
label : 'Indexer',
sortable : true,
cell : IndexerCell
}, {
name : 'title',
label : 'Title',
sortable : true,
cell : Backgrid.StringCell
}, {
name : 'episodeNumbers',
episodes : 'episodeNumbers',
label : 'season',
cell : EpisodeNumberCell
}, {
name : 'size',
label : 'Size',
sortable : true,
cell : FileSizeCell
}, {
name : 'quality',
label : 'Quality',
sortable : true,
cell : QualityCell
}, {
name : 'rejections',
label : '',
cell : ApprovalStatusCell
}],
initialize : function(){
columns : [
{
name : 'indexer',
label : 'Indexer',
sortable : true,
cell : IndexerCell
},
{
name : 'title',
label : 'Title',
sortable : true,
cell : Backgrid.StringCell
},
{
name : 'episodeNumbers',
episodes : 'episodeNumbers',
label : 'season',
cell : EpisodeNumberCell
},
{
name : 'size',
label : 'Size',
sortable : true,
cell : FileSizeCell
},
{
name : 'quality',
label : 'Quality',
sortable : true,
cell : QualityCell
},
{
name : 'rejections',
label : '',
cell : ApprovalStatusCell
}
],
initialize : function() {
this.collection = new ReleaseCollection();
this.listenTo(this.collection, 'sync', this._showTable);
},
onRender : function(){
onRender : function() {
this.grid.show(new LoadingView());
this.collection.fetch();
},
_showTable : function(){
if(!this.isClosed) {
_showTable : function() {
if (!this.isClosed) {
this.grid.show(new Backgrid.Grid({
row : Backgrid.Row,
columns : this.columns,