mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
removed NzbDrone. namespace, everything is done using require.
This commit is contained in:
parent
ef62af75df
commit
b0bd3f34f1
121 changed files with 2570 additions and 2587 deletions
|
@ -1,9 +1,10 @@
|
|||
'use strict';
|
||||
define(['app', 'Quality/QualitySizeModel'], function () {
|
||||
NzbDrone.Quality.QualitySizeCollection = Backbone.Collection.extend({
|
||||
model: NzbDrone.Quality.QualitySizeModel,
|
||||
url : NzbDrone.Constants.ApiRoot + '/qualitysize'
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'Quality/QualitySizeModel'
|
||||
], function (QualitySizeModel) {
|
||||
return Backbone.Collection.extend({
|
||||
model: QualitySizeModel,
|
||||
url : window.ApiRoot + '/qualitysize'
|
||||
});
|
||||
});
|
||||
|
||||
return NzbDrone.Quality.QualitySizeCollection;
|
||||
});
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
'use strict';
|
||||
define(['app'], function () {
|
||||
NzbDrone.Quality.QualitySizeModel = Backbone.Model.extend({
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'backbone'
|
||||
], function (Backbone) {
|
||||
return Backbone.Model.extend({
|
||||
|
||||
initialize: function () {
|
||||
this.validators = {};
|
||||
},
|
||||
|
||||
mutators: {
|
||||
thirtyMinuteSize: function () {
|
||||
return this.get('maxSize') * 30;
|
||||
},
|
||||
sixtyMinuteSize : function () {
|
||||
return this.get('maxSize') * 60;
|
||||
mutators: {
|
||||
thirtyMinuteSize: function () {
|
||||
return this.get('maxSize') * 30;
|
||||
},
|
||||
sixtyMinuteSize : function () {
|
||||
return this.get('maxSize') * 60;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,14 +1,18 @@
|
|||
'use strict';
|
||||
define(['app', 'Quality/QualityProfileModel'], function () {
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'backbone',
|
||||
'Quality/QualityProfileModel'
|
||||
], function (Backbone, QualityProfileModel) {
|
||||
|
||||
var qualityProfileCollection = Backbone.Collection.extend({
|
||||
model: NzbDrone.Quality.QualityProfileModel,
|
||||
url : NzbDrone.Constants.ApiRoot + '/qualityprofiles'
|
||||
var QualityProfileCollection = Backbone.Collection.extend({
|
||||
model: QualityProfileModel,
|
||||
url : window.ApiRoot + '/qualityprofiles'
|
||||
});
|
||||
|
||||
var profiles = new QualityProfileCollection();
|
||||
|
||||
profiles.fetch();
|
||||
|
||||
return profiles;
|
||||
});
|
||||
|
||||
var profiles = new qualityProfileCollection();
|
||||
|
||||
profiles.fetch();
|
||||
|
||||
return profiles;
|
||||
});
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
'use strict';
|
||||
define(['app', 'backbone.deepmodel'], function (App, DeepModel) {
|
||||
NzbDrone.Quality.QualityProfileModel = DeepModel.DeepModel.extend({
|
||||
|
||||
defaults: {
|
||||
id : null,
|
||||
name : '',
|
||||
cutoff: null
|
||||
}
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'backbone.deepmodel'
|
||||
], function (DeepModel) {
|
||||
return DeepModel.DeepModel.extend({
|
||||
defaults: {
|
||||
id : null,
|
||||
name : '',
|
||||
cutoff: null
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue