mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
moved add series to require.
This commit is contained in:
parent
24c77b4047
commit
72772bed5a
16 changed files with 181 additions and 185 deletions
|
@ -1,15 +1,17 @@
|
|||
"use strict";
|
||||
define(
|
||||
[
|
||||
'app',
|
||||
'backbone',
|
||||
'AddSeries/RootFolders/Model',
|
||||
'mixins/backbone.signalr.mixin'
|
||||
], function () {
|
||||
], function (Backbone, RootFolderModel) {
|
||||
|
||||
var rootFolderCollection = Backbone.Collection.extend({
|
||||
url : NzbDrone.Constants.ApiRoot + '/rootfolder',
|
||||
model: NzbDrone.AddSeries.RootFolders.RootFolderModel
|
||||
model: RootFolderModel
|
||||
});
|
||||
|
||||
return new rootFolderCollection().BindSignalR();
|
||||
var collection = new rootFolderCollection().BindSignalR();
|
||||
|
||||
return collection;
|
||||
});
|
||||
|
|
|
@ -4,8 +4,8 @@ define(
|
|||
[
|
||||
'marionette',
|
||||
'AddSeries/RootFolders/CollectionView',
|
||||
'AddSeries/RootFolders/Model',
|
||||
'AddSeries/RootFolders/Collection',
|
||||
'AddSeries/RootFolders/Model',
|
||||
'Mixins/AutoComplete'
|
||||
], function (Marionette, RootFolderCollectionView, RootFolderCollection, RootFolderModel) {
|
||||
|
||||
|
|
|
@ -1,14 +1,18 @@
|
|||
"use strict";
|
||||
define(['app'], function () {
|
||||
NzbDrone.AddSeries.RootFolders.RootFolderModel = Backbone.Model.extend({
|
||||
mutators: {
|
||||
freeSpaceString: function () {
|
||||
return this.get('freeSpace').bytes(2) + " Free";
|
||||
}
|
||||
},
|
||||
define(
|
||||
[
|
||||
'backbone',
|
||||
'sugar'
|
||||
], function (Backbone) {
|
||||
return Backbone.Model.extend({
|
||||
mutators: {
|
||||
freeSpaceString: function () {
|
||||
return this.get('freeSpace').bytes(2) + " Free";
|
||||
}
|
||||
},
|
||||
|
||||
defaults: {
|
||||
freeSpace: 0
|
||||
}
|
||||
defaults: {
|
||||
freeSpace: 0
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,4 +3,6 @@
|
|||
<option value="{{id}}">{{path}}</option>
|
||||
{{/each}}
|
||||
<option value="addNew">Add a diffrent path</option>
|
||||
</select>
|
||||
</select>
|
||||
|
||||
{{debug}}
|
|
@ -1,13 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
define(
|
||||
[
|
||||
'AddSeries/RootFolders/Collection',
|
||||
'handlebars'
|
||||
], function (rootFolders, Handlebars) {
|
||||
|
||||
Handlebars.registerHelper('rootFolderSelection', function () {
|
||||
var templateFunction = Marionette.TemplateCache.get('AddSeries/RootFolders/RootFolderSelectionTemplate');
|
||||
return new Handlebars.SafeString(templateFunction(rootFolders.toJSON()));
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue