mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-12 08:07:10 -07:00
System now uses tabs instead of toolbar
This commit is contained in:
parent
ea5549d736
commit
6a10382e7b
40 changed files with 330 additions and 224 deletions
58
UI/System/Update/UpdateLayout.js
Normal file
58
UI/System/Update/UpdateLayout.js
Normal file
|
@ -0,0 +1,58 @@
|
|||
'use strict';
|
||||
define(
|
||||
[
|
||||
'marionette',
|
||||
'backgrid',
|
||||
'System/Update/UpdateCollection',
|
||||
'System/Update/UpdateCollectionView',
|
||||
'Shared/Toolbar/ToolbarLayout',
|
||||
'Shared/LoadingView'
|
||||
], function (Marionette, Backgrid, UpdateCollection, UpdateCollectionView, ToolbarLayout, LoadingView) {
|
||||
return Marionette.Layout.extend({
|
||||
template: 'System/Update/UpdateLayoutTemplate',
|
||||
|
||||
regions: {
|
||||
updates: '#x-updates',
|
||||
toolbar: '#x-toolbar'
|
||||
},
|
||||
|
||||
leftSideButtons: {
|
||||
type : 'default',
|
||||
storeState: false,
|
||||
items :
|
||||
[
|
||||
{
|
||||
title : 'Check for Update',
|
||||
icon : 'icon-nd-update',
|
||||
command: 'applicationUpdate'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
initialize: function () {
|
||||
this.updateCollection = new UpdateCollection();
|
||||
},
|
||||
|
||||
onRender: function () {
|
||||
this.updates.show(new LoadingView());
|
||||
this._showToolbar();
|
||||
|
||||
var self = this;
|
||||
var promise = this.updateCollection.fetch();
|
||||
|
||||
promise.done(function (){
|
||||
self.updates.show(new UpdateCollectionView({ collection: self.updateCollection }));
|
||||
});
|
||||
},
|
||||
|
||||
_showToolbar: function () {
|
||||
this.toolbar.show(new ToolbarLayout({
|
||||
left :
|
||||
[
|
||||
this.leftSideButtons
|
||||
],
|
||||
context: this
|
||||
}));
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue