mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
Moved source code under src folder - massive change
This commit is contained in:
parent
2fc8123d6b
commit
5bf0e197ec
1499 changed files with 1054 additions and 1444 deletions
11
src/UI/System/Update/UpdateCollection.js
Normal file
11
src/UI/System/Update/UpdateCollection.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
'use strict';
|
||||
define(
|
||||
[
|
||||
'backbone',
|
||||
'System/Update/UpdateModel'
|
||||
], function (Backbone, UpdateModel) {
|
||||
return Backbone.Collection.extend({
|
||||
url : window.NzbDrone.ApiRoot + '/update',
|
||||
model: UpdateModel
|
||||
});
|
||||
});
|
10
src/UI/System/Update/UpdateCollectionView.js
Normal file
10
src/UI/System/Update/UpdateCollectionView.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
'use strict';
|
||||
define(
|
||||
[
|
||||
'marionette',
|
||||
'System/Update/UpdateItemView'
|
||||
], function (Marionette, UpdateItemView) {
|
||||
return Marionette.CollectionView.extend({
|
||||
itemView: UpdateItemView
|
||||
});
|
||||
});
|
11
src/UI/System/Update/UpdateItemView.js
Normal file
11
src/UI/System/Update/UpdateItemView.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
'use strict';
|
||||
|
||||
define(
|
||||
[
|
||||
'app',
|
||||
'marionette'
|
||||
], function (App, Marionette) {
|
||||
return Marionette.ItemView.extend({
|
||||
template: 'System/Update/UpdateItemViewTemplate'
|
||||
});
|
||||
});
|
23
src/UI/System/Update/UpdateItemViewTemplate.html
Normal file
23
src/UI/System/Update/UpdateItemViewTemplate.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
<div class="update">
|
||||
<fieldset>
|
||||
<legend>{{version}} <span class="date">- {{ShortDate releaseDate}} {{currentVersion version}}</span></legend>
|
||||
|
||||
{{#with changes}}
|
||||
{{#each new}}
|
||||
<div class="change">
|
||||
<span class="label label-success">New</span> {{this}}
|
||||
</div>
|
||||
{{/each}}
|
||||
|
||||
{{#each fixed}}
|
||||
<div class="change">
|
||||
<span class="label label-info">Fixed</span> {{this}}
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/with}}
|
||||
|
||||
{{#unless changes}}
|
||||
No notable changes
|
||||
{{/unless}}
|
||||
</fieldset>
|
||||
</div>
|
58
src/UI/System/Update/UpdateLayout.js
Normal file
58
src/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
|
||||
}));
|
||||
}
|
||||
});
|
||||
});
|
6
src/UI/System/Update/UpdateLayoutTemplate.html
Normal file
6
src/UI/System/Update/UpdateLayoutTemplate.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
<div id="x-toolbar"/>
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<div id="x-updates"/>
|
||||
</div>
|
||||
</div>
|
9
src/UI/System/Update/UpdateModel.js
Normal file
9
src/UI/System/Update/UpdateModel.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
'use strict';
|
||||
define(
|
||||
[
|
||||
'backbone'
|
||||
], function (Backbone) {
|
||||
return Backbone.Model.extend({
|
||||
|
||||
});
|
||||
});
|
25
src/UI/System/Update/update.less
Normal file
25
src/UI/System/Update/update.less
Normal file
|
@ -0,0 +1,25 @@
|
|||
.update {
|
||||
margin-bottom: 30px;
|
||||
|
||||
legend {
|
||||
margin-bottom: 5px;
|
||||
line-height: 30px;
|
||||
|
||||
.date {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.changes-header {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.label {
|
||||
width: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
.change {
|
||||
margin-bottom: 2px;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue