1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-24 16:53:54 +00:00

add series lookup doesn't send a request to server with a blank filter.

This commit is contained in:
Keivan Beigi 2013-01-23 17:51:25 -08:00 committed by kay.one
parent ebadd6b1d5
commit ae61150b84
4 changed files with 18 additions and 5 deletions

View file

@ -12,6 +12,14 @@
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
<add key="aspnet:MaxHttpCollectionKeys" value="5000" />
</appSettings>
<system.diagnostics>
<sources>
<source name="Cassette" switchName="CassetteSwitch" switchType="System.Diagnostics.SourceSwitch" />
</sources>
<switches>
<add name="CassetteSwitch" value="All" />
</switches>
</system.diagnostics>
<system.web>
<trust level="Full" originUrl=".*" />
<compilation debug="true" targetFramework="4.0" />

View file

@ -58,7 +58,14 @@ NzbDrone.AddSeries.AddNewSeriesView = Backbone.Marionette.Layout.extend({
search: function (context) {
var term = context.ui.seriesSearch.val();
console.log(term);
context.collection.fetch({ data: $.param({ term: term }) });
if (term == "") {
context.collection.reset();
} else {
console.log(term);
context.collection.fetch({ data: $.param({ term: term }) });
}
},
});

View file

@ -8,7 +8,6 @@ namespace NzbDrone.Web.Backbone.NzbDrone
public class CassetteBundleConfiguration : IConfiguration<BundleCollection>
{
public const string BASE_STYLE = "BASE_STYLE";
public const string BACKBONE = "BACKBONE";
public const string NZBDRONE = "NZBDRONE";
internal const string FONTS = "FONTS";
@ -28,7 +27,7 @@ namespace NzbDrone.Web.Backbone.NzbDrone
},
bundle => bundle.AddReference("/" + FONTS));
bundles.Add<ScriptBundle>("~/_backboneApp/JsLibraries/backbone.js");
bundles.Add<ScriptBundle>(NZBDRONE, new[]{
APP_PATH + "\\AddSeries\\AddSeriesLayout.js",

View file

@ -1,7 +1,6 @@
/// <reference path="JsLibraries/jquery.js" />
/// <reference path="JsLibraries/underscore.js" />
/// <reference path="JsLibraries/backbone.js" />
/// <reference path="JsLibraries/backbone.debug.js" />
/// <reference path="JsLibraries/backbone.modelbinder.js" />
/// <reference path="JsLibraries/backbone.marionette.js" />
/// <reference path="JsLibraries/backbone.marionette.extend.js" />