diff --git a/UI/.idea/jsLibraryMappings.xml b/UI/.idea/jsLibraryMappings.xml index 723694460..f6e673adc 100644 --- a/UI/.idea/jsLibraryMappings.xml +++ b/UI/.idea/jsLibraryMappings.xml @@ -1,7 +1,3 @@ - - - - - + diff --git a/UI/.idea/libraries/libraries.xml b/UI/.idea/libraries/libraries.xml new file mode 100644 index 000000000..ddc15483e --- /dev/null +++ b/UI/.idea/libraries/libraries.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/UI/Index.html b/UI/Index.html index 8d0adac9f..44f7429a1 100644 --- a/UI/Index.html +++ b/UI/Index.html @@ -1,4 +1,4 @@ - + NzbDrone @@ -23,6 +23,7 @@ +
diff --git a/UI/Settings/Quality/Profile/AllowedLabeler.js b/UI/Settings/Quality/Profile/AllowedLabeler.js new file mode 100644 index 000000000..50f93b437 --- /dev/null +++ b/UI/Settings/Quality/Profile/AllowedLabeler.js @@ -0,0 +1,18 @@ +'use strict'; +define(['app', 'handlebars'], function (App,Handlebars) { + Handlebars.registerHelper('allowedLabeler', function () { + var ret = ''; + var cutoff = this.cutoff; + _.each(this.allowed, function (allowed) { + if (allowed.id === cutoff.id) { + ret += '' + allowed.name + ' '; + } + + else { + ret += '' + allowed.name + ' '; + } + }); + + return new Handlebars.SafeString(ret); + }); +}); diff --git a/UI/Settings/Quality/Profile/DeleteView.js b/UI/Settings/Quality/Profile/DeleteView.js index dd9671d13..1d0576bb9 100644 --- a/UI/Settings/Quality/Profile/DeleteView.js +++ b/UI/Settings/Quality/Profile/DeleteView.js @@ -6,7 +6,7 @@ define( ], function (App, Marionette) { return Marionette.ItemView.extend({ - template: 'Quality/Profile/DeleteTemplate', + template: 'Settings/Quality/Profile/DeleteTemplate', events: { 'click .x-confirm-delete': '_removeProfile' diff --git a/UI/Settings/Quality/Profile/QualityProfileCollectionTemplate.html b/UI/Settings/Quality/Profile/QualityProfileCollectionTemplate.html index cb67194e9..f9dbba60a 100644 --- a/UI/Settings/Quality/Profile/QualityProfileCollectionTemplate.html +++ b/UI/Settings/Quality/Profile/QualityProfileCollectionTemplate.html @@ -1,14 +1,4 @@ 
Quality Profiles - - - - - - - - - - -
NameAllowedCutoffControls
+
    \ No newline at end of file diff --git a/UI/Settings/Quality/Profile/QualityProfileCollectionView.js b/UI/Settings/Quality/Profile/QualityProfileCollectionView.js index b01c8e147..2324efce4 100644 --- a/UI/Settings/Quality/Profile/QualityProfileCollectionView.js +++ b/UI/Settings/Quality/Profile/QualityProfileCollectionView.js @@ -3,7 +3,7 @@ define(['marionette', 'Settings/Quality/Profile/QualityProfileView'], function (Marionette, QualityProfileView) { return Marionette.CompositeView.extend({ itemView : QualityProfileView, - itemViewContainer: 'tbody', + itemViewContainer: '.quality-profiles', template : 'Settings/Quality/Profile/QualityProfileCollectionTemplate' }); }); diff --git a/UI/Settings/Quality/Profile/QualityProfileTemplate.html b/UI/Settings/Quality/Profile/QualityProfileTemplate.html index 1887ab583..461e7d9d3 100644 --- a/UI/Settings/Quality/Profile/QualityProfileTemplate.html +++ b/UI/Settings/Quality/Profile/QualityProfileTemplate.html @@ -1,11 +1,11 @@ - - - {{#each allowed}} - {{name}} | - {{/each}} - - - - - | Delete - +
    +
    +

    {{name}}

    + + + + +
    + + {{allowedLabeler}} +
    \ No newline at end of file diff --git a/UI/Settings/Quality/Profile/QualityProfileView.js b/UI/Settings/Quality/Profile/QualityProfileView.js index 77cbe2d94..e0d7b873c 100644 --- a/UI/Settings/Quality/Profile/QualityProfileView.js +++ b/UI/Settings/Quality/Profile/QualityProfileView.js @@ -6,34 +6,34 @@ define( 'marionette', 'Settings/Quality/Profile/EditQualityProfileView', 'Settings/Quality/Profile/DeleteView', - 'Mixins/AsModelBoundView' + 'Mixins/AsModelBoundView', + 'Settings/Quality/Profile/AllowedLabeler' ], function (App, Marionette, EditProfileView, DeleteProfileView, AsModelBoundView) { var view = Marionette.ItemView.extend({ template: 'Settings/Quality/Profile/QualityProfileTemplate', - tagName : 'tr', + tagName : 'li', ui: { 'progressbar': '.progress .bar' }, events: { - 'click .x-edit' : 'edit', - 'click .x-remove': 'removeQuality' + 'click .x-edit' : '_editProfile', + 'click .x-delete': '_deleteProfile' }, - edit: function () { + _editProfile: function () { var view = new EditProfileView({ model: this.model}); App.modalRegion.show(view); }, - removeQuality: function () { + _deleteProfile: function () { var view = new DeleteProfileView({ model: this.model }); App.modalRegion.show(view); } }); - return AsModelBoundView.call(view); }); diff --git a/UI/Settings/Quality/quality.less b/UI/Settings/Quality/quality.less new file mode 100644 index 000000000..e15cda3e9 --- /dev/null +++ b/UI/Settings/Quality/quality.less @@ -0,0 +1,26 @@ +@import "../../Shared/Styles/card"; + +.quality-profiles { + li { + display: inline-block; + vertical-align: top; + } +} + +.quality-profile-item { + + .card; + + width: 250px; + height: 120px; + padding: 10px 15px; + + h2 { + margin-top: 0px; + display: inline-block; + } + + .btn-group { + margin-top: 10px; + } +} \ No newline at end of file