Beginning of Add New Profile button

This commit is contained in:
Mark McDowall 2012-12-04 17:21:54 -08:00
parent ecab574042
commit ae8db51839
7 changed files with 81 additions and 20 deletions

View File

@ -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;
}

View File

@ -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.

View File

@ -82,9 +82,21 @@
<member name="P:Ninject.Web.Mvc.Fakes.ShimNinjectDependencyResolver.ConstructorIResolutionRoot">
<summary>Sets the shim of NinjectDependencyResolver.NinjectDependencyResolver(IResolutionRoot resolutionRoot)</summary>
</member>
<member name="P:Ninject.Web.Mvc.Fakes.ShimNinjectDependencyResolver.GetServiceType">
<summary>Sets the shim of NinjectDependencyResolver.GetService(Type serviceType)</summary>
</member>
<member name="P:Ninject.Web.Mvc.Fakes.ShimNinjectDependencyResolver.GetServicesType">
<summary>Sets the shim of NinjectDependencyResolver.GetServices(Type serviceType)</summary>
</member>
<member name="T:Ninject.Web.Mvc.Fakes.ShimNinjectDependencyResolver.AllInstances">
<summary>Define shims for all instances members</summary>
</member>
<member name="P:Ninject.Web.Mvc.Fakes.ShimNinjectDependencyResolver.AllInstances.GetServiceType">
<summary>Sets the shim of NinjectDependencyResolver.GetService(Type serviceType)</summary>
</member>
<member name="P:Ninject.Web.Mvc.Fakes.ShimNinjectDependencyResolver.AllInstances.GetServicesType">
<summary>Sets the shim of NinjectDependencyResolver.GetServices(Type serviceType)</summary>
</member>
<member name="T:Ninject.Web.Mvc.Fakes.ShimNinjectMvcHttpApplicationPlugin">
<summary>Shim type of Ninject.Web.Mvc.NinjectMvcHttpApplicationPlugin</summary>
</member>
@ -709,6 +721,9 @@
<member name="P:Ninject.Web.Mvc.FilterBindingSyntax.Fakes.ShimFilterFilterBindingBuilder`1.NamedString">
<summary>Sets the shim of FilterFilterBindingBuilder`1.Named(String name)</summary>
</member>
<member name="P:Ninject.Web.Mvc.FilterBindingSyntax.Fakes.ShimFilterFilterBindingBuilder`1.NinjectSyntaxIFluentSyntaxGetType">
<summary>Sets the shim of FilterFilterBindingBuilder`1.Ninject.Syntax.IFluentSyntax.GetType()</summary>
</member>
<member name="P:Ninject.Web.Mvc.FilterBindingSyntax.Fakes.ShimFilterFilterBindingBuilder`1.OnActivationActionOfIContextControllerContextActionDescriptorT0">
<summary>Sets the shim of FilterFilterBindingBuilder`1.OnActivation(Action`4&lt;IContext,ControllerContext,ActionDescriptor,!0&gt; action)</summary>
</member>
@ -724,6 +739,15 @@
<member name="P:Ninject.Web.Mvc.FilterBindingSyntax.Fakes.ShimFilterFilterBindingBuilder`1.OnDeactivationActionOfT0">
<summary>Sets the shim of FilterFilterBindingBuilder`1.OnDeactivation(Action`1&lt;!0&gt; action)</summary>
</member>
<member name="P:Ninject.Web.Mvc.FilterBindingSyntax.Fakes.ShimFilterFilterBindingBuilder`1.WhenActionMethodHasType">
<summary>Sets the shim of FilterFilterBindingBuilder`1.WhenActionMethodHas(Type attributeType)</summary>
</member>
<member name="P:Ninject.Web.Mvc.FilterBindingSyntax.Fakes.ShimFilterFilterBindingBuilder`1.WhenControllerHasType">
<summary>Sets the shim of FilterFilterBindingBuilder`1.WhenControllerHas(Type attributeType)</summary>
</member>
<member name="P:Ninject.Web.Mvc.FilterBindingSyntax.Fakes.ShimFilterFilterBindingBuilder`1.WhenControllerTypeType">
<summary>Sets the shim of FilterFilterBindingBuilder`1.WhenControllerType(Type controllerType)</summary>
</member>
<member name="P:Ninject.Web.Mvc.FilterBindingSyntax.Fakes.ShimFilterFilterBindingBuilder`1.WhenFuncOfControllerContextActionDescriptorBoolean">
<summary>Sets the shim of FilterFilterBindingBuilder`1.When(Func`3&lt;ControllerContext,ActionDescriptor,Boolean&gt; condition)</summary>
</member>
@ -805,6 +829,9 @@
<member name="P:Ninject.Web.Mvc.FilterBindingSyntax.Fakes.ShimFilterFilterBindingBuilder`1.AllInstances.NamedString">
<summary>Sets the shim of FilterFilterBindingBuilder`1.Named(String name)</summary>
</member>
<member name="P:Ninject.Web.Mvc.FilterBindingSyntax.Fakes.ShimFilterFilterBindingBuilder`1.AllInstances.NinjectSyntaxIFluentSyntaxGetType">
<summary>Sets the shim of FilterFilterBindingBuilder`1.Ninject.Syntax.IFluentSyntax.GetType()</summary>
</member>
<member name="P:Ninject.Web.Mvc.FilterBindingSyntax.Fakes.ShimFilterFilterBindingBuilder`1.AllInstances.OnActivationActionOfIContextControllerContextActionDescriptorT0">
<summary>Sets the shim of FilterFilterBindingBuilder`1.OnActivation(Action`4&lt;IContext,ControllerContext,ActionDescriptor,!0&gt; action)</summary>
</member>
@ -820,6 +847,15 @@
<member name="P:Ninject.Web.Mvc.FilterBindingSyntax.Fakes.ShimFilterFilterBindingBuilder`1.AllInstances.OnDeactivationActionOfT0">
<summary>Sets the shim of FilterFilterBindingBuilder`1.OnDeactivation(Action`1&lt;!0&gt; action)</summary>
</member>
<member name="P:Ninject.Web.Mvc.FilterBindingSyntax.Fakes.ShimFilterFilterBindingBuilder`1.AllInstances.WhenActionMethodHasType">
<summary>Sets the shim of FilterFilterBindingBuilder`1.WhenActionMethodHas(Type attributeType)</summary>
</member>
<member name="P:Ninject.Web.Mvc.FilterBindingSyntax.Fakes.ShimFilterFilterBindingBuilder`1.AllInstances.WhenControllerHasType">
<summary>Sets the shim of FilterFilterBindingBuilder`1.WhenControllerHas(Type attributeType)</summary>
</member>
<member name="P:Ninject.Web.Mvc.FilterBindingSyntax.Fakes.ShimFilterFilterBindingBuilder`1.AllInstances.WhenControllerTypeType">
<summary>Sets the shim of FilterFilterBindingBuilder`1.WhenControllerType(Type controllerType)</summary>
</member>
<member name="P:Ninject.Web.Mvc.FilterBindingSyntax.Fakes.ShimFilterFilterBindingBuilder`1.AllInstances.WhenFuncOfControllerContextActionDescriptorBoolean">
<summary>Sets the shim of FilterFilterBindingBuilder`1.When(Func`3&lt;ControllerContext,ActionDescriptor,Boolean&gt; condition)</summary>
</member>

View File

@ -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');

View File

@ -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();
}
});

View File

@ -20,12 +20,6 @@
<h3>
<a href="#">Profiles</a></h3>
<div id="profileContainer">
<div id="profileHeader">
<a id="addProfile" href="@Url.Action("AddProfile", "Settings")">
<i class="icon-plus icon-large"></i>
Add New Profile
</a>
</div>
<div id="profiles">
</div>
</div>
@ -149,6 +143,14 @@
</script>
<script id="QualityProfileCollectionTemplate" type="text/template">
<div id="profileHeader">
<button id="add-profile">Add New Profile</button>
@*<a id="add-profile" href="@Url.Action("AddProfile", "Settings")">
<i class="icon-plus icon-large"></i>
Add New Profile
</a>*@
</div>
</script>
<script>