diff --git a/NzbDrone.Web/Content/QualitySettings.css b/NzbDrone.Web/Content/QualitySettings.css index 74f08b603..740fb0081 100644 --- a/NzbDrone.Web/Content/QualitySettings.css +++ b/NzbDrone.Web/Content/QualitySettings.css @@ -13,7 +13,7 @@ overflow: auto; } -#addProfile +#add-profile { text-decoration: none; font-size:16px; @@ -22,7 +22,7 @@ vertical-align: middle; } -#addProfile > i { +#add-profile > i { color: green; font-size: 20px; } diff --git a/NzbDrone.Web/FakesAssemblies/Ninject.Web.Mvc.Fakes.dll b/NzbDrone.Web/FakesAssemblies/Ninject.Web.Mvc.Fakes.dll index 3111e0dcb..8c7ba3d3a 100644 Binary files a/NzbDrone.Web/FakesAssemblies/Ninject.Web.Mvc.Fakes.dll and b/NzbDrone.Web/FakesAssemblies/Ninject.Web.Mvc.Fakes.dll differ diff --git a/NzbDrone.Web/FakesAssemblies/Ninject.Web.Mvc.Fakes.messages b/NzbDrone.Web/FakesAssemblies/Ninject.Web.Mvc.Fakes.messages new file mode 100644 index 000000000..59b9caa8b --- /dev/null +++ b/NzbDrone.Web/FakesAssemblies/Ninject.Web.Mvc.Fakes.messages @@ -0,0 +1,27 @@ +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate stub for Ninject.Web.Mvc.FilterBindingSyntax.BindingRootExtensions: type is sealed. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate stub for Ninject.Web.Mvc.FilterBindingSyntax.IConstructorArgumentSyntaxExtensions: type is sealed. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate shim for Ninject.Web.Mvc.Filter.INinjectFilter: type is an interface. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate shim for Ninject.Web.Mvc.Filter.NinjectFilterProvider+<>c__DisplayClass1: type is not supported because of internal limitations. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate shim for Ninject.Web.Mvc.FilterBindingSyntax.BindingRootExtensions+<>c__DisplayClass0`1: type is not supported because of internal limitations. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate shim for Ninject.Web.Mvc.FilterBindingSyntax.BindingRootExtensions+<>c__DisplayClass2`1: type is not supported because of internal limitations. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate shim for Ninject.Web.Mvc.FilterBindingSyntax.IFilterBindingWhenSyntax`1: type is an interface. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate shim for Ninject.Web.Mvc.FilterBindingSyntax.IFilterBindingInSyntax`1: type is an interface. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate shim for Ninject.Web.Mvc.FilterBindingSyntax.IFilterBindingNamedSyntax`1: type is an interface. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate shim for Ninject.Web.Mvc.FilterBindingSyntax.IFilterBindingWithSyntax`1: type is an interface. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate shim for Ninject.Web.Mvc.FilterBindingSyntax.IFilterBindingOnSyntax`1: type is an interface. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate shim for Ninject.Web.Mvc.FilterBindingSyntax.IFilterBindingWhenInNamedWithOrOnSyntax`1: type is an interface. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate shim for Ninject.Web.Mvc.FilterBindingSyntax.IFilterBindingInNamedWithOrOnSyntax`1: type is an interface. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate shim for Ninject.Web.Mvc.FilterBindingSyntax.IFilterBindingNamedWithOrOnSyntax`1: type is an interface. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate shim for Ninject.Web.Mvc.FilterBindingSyntax.IFilterBindingWithOrOnSyntax`1: type is an interface. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate shim for Ninject.Web.Mvc.FilterBindingSyntax.FilterFilterBindingBuilder`1+<>c__DisplayClass12: type is not supported because of internal limitations. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate shim for Ninject.Web.Mvc.FilterBindingSyntax.FilterFilterBindingBuilder`1+<>c__DisplayClass15`1: type is not supported because of internal limitations. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate shim for Ninject.Web.Mvc.FilterBindingSyntax.FilterFilterBindingBuilder`1+<>c__DisplayClass18`1: type is not supported because of internal limitations. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate shim for Ninject.Web.Mvc.FilterBindingSyntax.FilterFilterBindingBuilder`1+<>c__DisplayClass1b: type is not supported because of internal limitations. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate shim for Ninject.Web.Mvc.FilterBindingSyntax.FilterFilterBindingBuilder`1+<>c__DisplayClass1e`1: type is not supported because of internal limitations. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate shim for Ninject.Web.Mvc.FilterBindingSyntax.FilterFilterBindingBuilder`1+<>c__DisplayClass2: type is not supported because of internal limitations. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate shim for Ninject.Web.Mvc.FilterBindingSyntax.FilterFilterBindingBuilder`1+<>c__DisplayClass21`1: type is not supported because of internal limitations. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate shim for Ninject.Web.Mvc.FilterBindingSyntax.FilterFilterBindingBuilder`1+<>c__DisplayClass24: type is not supported because of internal limitations. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate shim for Ninject.Web.Mvc.FilterBindingSyntax.FilterFilterBindingBuilder`1+<>c__DisplayClass6: type is not supported because of internal limitations. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate shim for Ninject.Web.Mvc.FilterBindingSyntax.FilterFilterBindingBuilder`1+<>c__DisplayClass9: type is not supported because of internal limitations. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate shim for Ninject.Web.Mvc.FilterBindingSyntax.FilterFilterBindingBuilder`1+<>c__DisplayClassc: type is not supported because of internal limitations. +C:\Users\Mark\Dropbox\Dev\NzbDrone\NzbDrone.Web\Fakes\Ninject.Web.Mvc.fakes : warning : Cannot generate shim for Ninject.Web.Mvc.FilterBindingSyntax.FilterFilterBindingBuilder`1+<>c__DisplayClassf: type is not supported because of internal limitations. diff --git a/NzbDrone.Web/FakesAssemblies/Ninject.Web.Mvc.Fakes.xml b/NzbDrone.Web/FakesAssemblies/Ninject.Web.Mvc.Fakes.xml index 31489771f..ecb0d8bfa 100644 --- a/NzbDrone.Web/FakesAssemblies/Ninject.Web.Mvc.Fakes.xml +++ b/NzbDrone.Web/FakesAssemblies/Ninject.Web.Mvc.Fakes.xml @@ -82,9 +82,21 @@ Sets the shim of NinjectDependencyResolver.NinjectDependencyResolver(IResolutionRoot resolutionRoot) + + Sets the shim of NinjectDependencyResolver.GetService(Type serviceType) + + + Sets the shim of NinjectDependencyResolver.GetServices(Type serviceType) + Define shims for all instances members + + Sets the shim of NinjectDependencyResolver.GetService(Type serviceType) + + + Sets the shim of NinjectDependencyResolver.GetServices(Type serviceType) + Shim type of Ninject.Web.Mvc.NinjectMvcHttpApplicationPlugin @@ -709,6 +721,9 @@ Sets the shim of FilterFilterBindingBuilder`1.Named(String name) + + Sets the shim of FilterFilterBindingBuilder`1.Ninject.Syntax.IFluentSyntax.GetType() + Sets the shim of FilterFilterBindingBuilder`1.OnActivation(Action`4<IContext,ControllerContext,ActionDescriptor,!0> action) @@ -724,6 +739,15 @@ Sets the shim of FilterFilterBindingBuilder`1.OnDeactivation(Action`1<!0> action) + + Sets the shim of FilterFilterBindingBuilder`1.WhenActionMethodHas(Type attributeType) + + + Sets the shim of FilterFilterBindingBuilder`1.WhenControllerHas(Type attributeType) + + + Sets the shim of FilterFilterBindingBuilder`1.WhenControllerType(Type controllerType) + Sets the shim of FilterFilterBindingBuilder`1.When(Func`3<ControllerContext,ActionDescriptor,Boolean> condition) @@ -805,6 +829,9 @@ Sets the shim of FilterFilterBindingBuilder`1.Named(String name) + + Sets the shim of FilterFilterBindingBuilder`1.Ninject.Syntax.IFluentSyntax.GetType() + Sets the shim of FilterFilterBindingBuilder`1.OnActivation(Action`4<IContext,ControllerContext,ActionDescriptor,!0> action) @@ -820,6 +847,15 @@ Sets the shim of FilterFilterBindingBuilder`1.OnDeactivation(Action`1<!0> action) + + Sets the shim of FilterFilterBindingBuilder`1.WhenActionMethodHas(Type attributeType) + + + Sets the shim of FilterFilterBindingBuilder`1.WhenControllerHas(Type attributeType) + + + Sets the shim of FilterFilterBindingBuilder`1.WhenControllerType(Type controllerType) + Sets the shim of FilterFilterBindingBuilder`1.When(Func`3<ControllerContext,ActionDescriptor,Boolean> condition) diff --git a/NzbDrone.Web/Scripts/NzbDrone/qualitySettings.js b/NzbDrone.Web/Scripts/NzbDrone/qualitySettings.js index 869ea62e9..ac3de1858 100644 --- a/NzbDrone.Web/Scripts/NzbDrone/qualitySettings.js +++ b/NzbDrone.Web/Scripts/NzbDrone/qualitySettings.js @@ -1,17 +1,5 @@ var deleteQualityProfileUrl = '../../Settings/DeleteQualityProfile'; -$(document).on("click", "#addProfile", function (event) { - $.ajax({ - url: this.href, - cache: false, - success: function (html) { - $("#profiles").append(html); - } - }); - - event.preventDefault(); -}); - $(document).on('click', '.delete-profile', function (e) { var container = $(this).closest('.profileSection'); var id = $(container).attr('data-profile-id'); diff --git a/NzbDrone.Web/Scripts/backbone/views/qualityProfiles.js b/NzbDrone.Web/Scripts/backbone/views/qualityProfiles.js index c8219238b..a95fa5794 100644 --- a/NzbDrone.Web/Scripts/backbone/views/qualityProfiles.js +++ b/NzbDrone.Web/Scripts/backbone/views/qualityProfiles.js @@ -72,5 +72,13 @@ QualityProfileCollectionView = Backbone.Marionette.CompositeView.extend({ this.collection = new QualityProfileCollection(); this.collection.fetch(); this.collection.bind('reset', this.render); + }, + events: { + 'click #add-profile': 'addProfile' + }, + addProfile: function (e) { + //Add new profile to collection + this.collection.add(new QualityProfile()); + e.preventDefault(); } }); \ No newline at end of file diff --git a/NzbDrone.Web/Views/Settings/Quality.cshtml b/NzbDrone.Web/Views/Settings/Quality.cshtml index f8fde4e8b..0bb6df07f 100644 --- a/NzbDrone.Web/Views/Settings/Quality.cshtml +++ b/NzbDrone.Web/Views/Settings/Quality.cshtml @@ -20,12 +20,6 @@

Profiles

-
- - - Add New Profile - -
@@ -149,6 +143,14 @@