mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-26 01:37:07 +00:00
minor js cleanup.
This commit is contained in:
parent
d3694461f1
commit
85fd4248a6
7 changed files with 32 additions and 40 deletions
9
NzbDrone.Backbone/.idea/codeStyleSettings.xml
Normal file
9
NzbDrone.Backbone/.idea/codeStyleSettings.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectCodeStyleSettingsManager">
|
||||
<option name="PER_PROJECT_SETTINGS">
|
||||
<value />
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
|
7
NzbDrone.Backbone/.idea/dictionaries/Keivan.xml
Normal file
7
NzbDrone.Backbone/.idea/dictionaries/Keivan.xml
Normal file
|
@ -0,0 +1,7 @@
|
|||
<component name="ProjectDictionaryState">
|
||||
<dictionary name="Keivan">
|
||||
<words>
|
||||
<w>rootfolder</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
</component>
|
|
@ -1,5 +1,4 @@
|
|||
define(['app', 'AddSeries/RootFolders/RootFolderCollection', 'AddSeries/New/SearchResultView', 'Shared/SpinnerView'], function (app, rootFolders) {
|
||||
|
||||
define(['app', 'AddSeries/RootFolders/RootFolderCollection', 'AddSeries/New/SearchResultView', 'Shared/SpinnerView'], function () {
|
||||
NzbDrone.AddSeries.New.AddNewSeriesView = Backbone.Marionette.Layout.extend({
|
||||
template: 'AddSeries/New/AddNewSeriesTemplate',
|
||||
route: 'Series/add/new',
|
||||
|
@ -35,18 +34,18 @@
|
|||
var term = context.ui.seriesSearch.val();
|
||||
context.collection.reset();
|
||||
|
||||
if (term !== '') {
|
||||
if (term === '') {
|
||||
context.searchResult.close();
|
||||
} else {
|
||||
context.searchResult.show(new NzbDrone.Shared.SpinnerView());
|
||||
|
||||
context.currentSearchRequest = context.collection.fetch({
|
||||
data: { term: term },
|
||||
success: function (model) {
|
||||
success: function () {
|
||||
context.searchResult.show(context.resultView);
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
context.searchResult.close();
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ define(['app','Shared/NotificationCollection', 'AddSeries/SearchResultCollection
|
|||
var quality = this.ui.qualityProfile.val();
|
||||
var rootFolderId = this.ui.rootFolder.val();
|
||||
|
||||
//Todo: This wiil create an invalid path on linux...
|
||||
//Todo: This will create an invalid path on linux...
|
||||
var rootPath = this.model.get('rootFolders').get(rootFolderId).get('path');
|
||||
var path = rootPath + "\\" + title;
|
||||
|
||||
|
@ -62,11 +62,10 @@ define(['app','Shared/NotificationCollection', 'AddSeries/SearchResultCollection
|
|||
NzbDrone.AddSeries.SearchResultView = Backbone.Marionette.CollectionView.extend({
|
||||
|
||||
itemView: NzbDrone.AddSeries.New.SearchItemView,
|
||||
|
||||
className: 'accordion',
|
||||
|
||||
initialize: function () {
|
||||
this.listenTo(this.collection, 'reset', this.render);
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
@ -26,25 +26,3 @@
|
|||
|
||||
};
|
||||
} ());
|
||||
|
||||
/*
|
||||
|
||||
var xhrMixin = function (){
|
||||
console.log ('mixing in xhr');
|
||||
|
||||
var originalOnRender = Backbone.Marionette.View.prototype.onRender;
|
||||
var originalBeforeClose = Backbone.Marionette.View.prototype.beforeClose;
|
||||
|
||||
Backbone.Marionette.View.prototype.onRender = function (){
|
||||
console.log ('render');
|
||||
if (originalOnRender){
|
||||
originalOnRender.call (this);
|
||||
}
|
||||
};
|
||||
Backbone.Marionette.View.prototype.beforeClose = function (){
|
||||
console.log ('beforeClose');
|
||||
if (originalBeforeClose){
|
||||
originalBeforeClose.call (this);
|
||||
}
|
||||
};
|
||||
} ();*/
|
||||
|
|
Loading…
Reference in a new issue