mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
almost all js files are loaded using require.js
This commit is contained in:
parent
aed7b95245
commit
2407e33ea2
35 changed files with 570 additions and 717 deletions
|
@ -1,5 +1,5 @@
|
|||
"use strict";
|
||||
define(['app', 'Series/Details/SeasonCollectionView', 'Shared/LoadingView'], function () {
|
||||
define(['app', 'Series/Details/SeasonCollectionView', 'Shared/LoadingView','backstrech'], function () {
|
||||
NzbDrone.Series.Details.SeriesDetailsLayout = Backbone.Marionette.Layout.extend({
|
||||
|
||||
itemViewContainer: '.x-series-seasons',
|
||||
|
|
|
@ -1,17 +1,22 @@
|
|||
"use strict";
|
||||
NzbDrone.Series.Index.Table.Row = Backgrid.Row.extend({
|
||||
events: {
|
||||
'click .x-edit' : 'editSeries',
|
||||
'click .x-remove': 'removeSeries'
|
||||
},
|
||||
define(['app','backgrid'], function () {
|
||||
NzbDrone.Series.Index.Table.Row = Backgrid.Row.extend({
|
||||
events: {
|
||||
'click .x-edit' : 'editSeries',
|
||||
'click .x-remove': 'removeSeries'
|
||||
},
|
||||
|
||||
editSeries: function () {
|
||||
var view = new NzbDrone.Series.Edit.EditSeriesView({ model: this.model});
|
||||
NzbDrone.modalRegion.show(view);
|
||||
},
|
||||
editSeries: function () {
|
||||
var view = new NzbDrone.Series.Edit.EditSeriesView({ model: this.model});
|
||||
NzbDrone.modalRegion.show(view);
|
||||
},
|
||||
|
||||
removeSeries: function () {
|
||||
var view = new NzbDrone.Series.Delete.DeleteSeriesView({ model: this.model });
|
||||
NzbDrone.modalRegion.show(view);
|
||||
}
|
||||
});
|
||||
|
||||
return NzbDrone.Series.Table.Row;
|
||||
});
|
||||
|
||||
removeSeries: function () {
|
||||
var view = new NzbDrone.Series.Delete.DeleteSeriesView({ model: this.model });
|
||||
NzbDrone.modalRegion.show(view);
|
||||
}
|
||||
});
|
|
@ -1,23 +1,27 @@
|
|||
"use strict";
|
||||
Backgrid.SeriesStatusCell = Backgrid.Cell.extend({
|
||||
className: "series-status-cell",
|
||||
define(['app','backgrid'], function () {
|
||||
Backgrid.SeriesStatusCell = Backgrid.Cell.extend({
|
||||
className: "series-status-cell",
|
||||
|
||||
render: function () {
|
||||
this.$el.empty();
|
||||
var monitored = this.model.get('monitored');
|
||||
var status = this.model.get('status');
|
||||
render: function () {
|
||||
this.$el.empty();
|
||||
var monitored = this.model.get('monitored');
|
||||
var status = this.model.get('status');
|
||||
|
||||
if (!monitored) {
|
||||
this.$el.html('<i class="icon-pause grid-icon" title="Not Monitored"></i>');
|
||||
}
|
||||
else if (status === 'continuing') {
|
||||
this.$el.html('<i class="icon-play grid-icon" title="Continuing"></i>');
|
||||
if (!monitored) {
|
||||
this.$el.html('<i class="icon-pause grid-icon" title="Not Monitored"></i>');
|
||||
}
|
||||
else if (status === 'continuing') {
|
||||
this.$el.html('<i class="icon-play grid-icon" title="Continuing"></i>');
|
||||
}
|
||||
|
||||
else {
|
||||
this.$el.html('<i class="icon-stop grid-icon" title="Ended"></i>');
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
});
|
||||
|
||||
else {
|
||||
this.$el.html('<i class="icon-stop grid-icon" title="Ended"></i>');
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
return Backgrid.SeriesStatusCell;
|
||||
});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
define(['app', 'Series/SeasonModel'], function () {
|
||||
NzbDrone.Series.SeasonCollection = Backbone.PageableCollection.extend({
|
||||
define(['app', 'Series/SeasonModel', 'backbone.pageable'], function (App, SeasonModel, PageAbleCollection) {
|
||||
NzbDrone.Series.SeasonCollection = PageAbleCollection.extend({
|
||||
url : NzbDrone.Constants.ApiRoot + '/season',
|
||||
model: NzbDrone.Series.SeasonModel,
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ define(['app', 'Quality/QualityProfileCollection'], function (app, qualityProfil
|
|||
|
||||
var profile = qualityProfiles.get(this.get('qualityProfileId'));
|
||||
|
||||
if(profile){
|
||||
if (profile) {
|
||||
return profile.toJSON();
|
||||
}
|
||||
|
||||
|
@ -82,4 +82,6 @@ define(['app', 'Quality/QualityProfileCollection'], function (app, qualityProfil
|
|||
}
|
||||
});
|
||||
|
||||
return NzbDrone.Series.SeriesModel;
|
||||
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue