mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
Quality Profiles move to cards
This commit is contained in:
parent
f8fee8e3d0
commit
a3a1cf26ee
6
UI/.idea/jsLibraryMappings.xml
generated
6
UI/.idea/jsLibraryMappings.xml
generated
@ -1,7 +1,3 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4" />
|
||||||
<component name="JavaScriptLibraryMappings">
|
|
||||||
<file url="PROJECT" libraries="{jQuery-1.9.1}" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
|
|
||||||
|
51
UI/.idea/libraries/libraries.xml
generated
Normal file
51
UI/.idea/libraries/libraries.xml
generated
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
<component name="libraryTable">
|
||||||
|
<library name="libraries" type="javaScript">
|
||||||
|
<properties>
|
||||||
|
<sourceFilesUrls>
|
||||||
|
<item url="file://$PROJECT_DIR$/JsLibraries/bootstrap.js" />
|
||||||
|
<item url="file://$PROJECT_DIR$/JsLibraries/backbone.debug.js" />
|
||||||
|
<item url="file://$PROJECT_DIR$/JsLibraries/jquery.js" />
|
||||||
|
<item url="file://$PROJECT_DIR$/JsLibraries/sugar.js" />
|
||||||
|
<item url="file://$PROJECT_DIR$/JsLibraries/backbone.shortcuts.js" />
|
||||||
|
<item url="file://$PROJECT_DIR$/JsLibraries/jquery.tablesorter.pager.js" />
|
||||||
|
<item url="file://$PROJECT_DIR$/JsLibraries/handlebars.runtime.js" />
|
||||||
|
<item url="file://$PROJECT_DIR$/JsLibraries/jquery.tablesorter.bootstrap.js" />
|
||||||
|
<item url="file://$PROJECT_DIR$/JsLibraries/backbone.modelbinder.js" />
|
||||||
|
<item url="file://$PROJECT_DIR$/JsLibraries/jquery.tablesorter.js" />
|
||||||
|
<item url="file://$PROJECT_DIR$/JsLibraries/fullcalendar.js" />
|
||||||
|
<item url="file://$PROJECT_DIR$/JsLibraries/backbone.collectionbinder.js" />
|
||||||
|
<item url="file://$PROJECT_DIR$/JsLibraries/underscore.js" />
|
||||||
|
<item url="file://$PROJECT_DIR$/JsLibraries/backbone.marionette.js" />
|
||||||
|
<item url="file://$PROJECT_DIR$/JsLibraries/bootstrap.slider.js" />
|
||||||
|
<item url="file://$PROJECT_DIR$/JsLibraries/backbone.marionette.viewswapper.js" />
|
||||||
|
<item url="file://$PROJECT_DIR$/JsLibraries/backbone.js" />
|
||||||
|
<item url="file://$PROJECT_DIR$/JsLibraries/require.js" />
|
||||||
|
<item url="file://$PROJECT_DIR$/JsLibraries/backbone.mutators.js" />
|
||||||
|
</sourceFilesUrls>
|
||||||
|
</properties>
|
||||||
|
<CLASSES>
|
||||||
|
<root url="file://$PROJECT_DIR$/JsLibraries/bootstrapSwitch.js" />
|
||||||
|
<root url="file://$PROJECT_DIR$/JsLibraries/toastr-1.1.5.js" />
|
||||||
|
<root url="file://$PROJECT_DIR$/JsLibraries/bootstrap.js" />
|
||||||
|
<root url="file://$PROJECT_DIR$/JsLibraries/backbone.debug.js" />
|
||||||
|
<root url="file://$PROJECT_DIR$/JsLibraries/jquery.js" />
|
||||||
|
<root url="file://$PROJECT_DIR$/JsLibraries/sugar.js" />
|
||||||
|
<root url="file://$PROJECT_DIR$/JsLibraries/backbone.shortcuts.js" />
|
||||||
|
<root url="file://$PROJECT_DIR$/JsLibraries/jquery.tablesorter.pager.js" />
|
||||||
|
<root url="file://$PROJECT_DIR$/JsLibraries/handlebars.runtime.js" />
|
||||||
|
<root url="file://$PROJECT_DIR$/JsLibraries/jquery.tablesorter.bootstrap.js" />
|
||||||
|
<root url="file://$PROJECT_DIR$/JsLibraries/jquery.tablesorter.js" />
|
||||||
|
<root url="file://$PROJECT_DIR$/JsLibraries/backbone.modelbinder.js" />
|
||||||
|
<root url="file://$PROJECT_DIR$/JsLibraries/backbone.collectionbinder.js" />
|
||||||
|
<root url="file://$PROJECT_DIR$/JsLibraries/fullcalendar.js" />
|
||||||
|
<root url="file://$PROJECT_DIR$/JsLibraries/underscore.js" />
|
||||||
|
<root url="file://$PROJECT_DIR$/JsLibraries/backbone.marionette.js" />
|
||||||
|
<root url="file://$PROJECT_DIR$/JsLibraries/bootstrap.slider.js" />
|
||||||
|
<root url="file://$PROJECT_DIR$/JsLibraries/backbone.marionette.viewswapper.js" />
|
||||||
|
<root url="file://$PROJECT_DIR$/JsLibraries/backbone.js" />
|
||||||
|
<root url="file://$PROJECT_DIR$/JsLibraries/backbone.mutators.js" />
|
||||||
|
<root url="file://$PROJECT_DIR$/JsLibraries/require.js" />
|
||||||
|
</CLASSES>
|
||||||
|
<SOURCES />
|
||||||
|
</library>
|
||||||
|
</component>
|
@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head runat="server">
|
<head runat="server">
|
||||||
<title>NzbDrone</title>
|
<title>NzbDrone</title>
|
||||||
@ -23,6 +23,7 @@
|
|||||||
<link href="/Settings/Notifications/notifications.css" rel='stylesheet' type='text/css'/>
|
<link href="/Settings/Notifications/notifications.css" rel='stylesheet' type='text/css'/>
|
||||||
<link href="/Settings/Indexers/indexers.css" rel='stylesheet' type='text/css'/>
|
<link href="/Settings/Indexers/indexers.css" rel='stylesheet' type='text/css'/>
|
||||||
<link href="/Calendar/Calendar.css" rel='stylesheet' type='text/css'/>
|
<link href="/Calendar/Calendar.css" rel='stylesheet' type='text/css'/>
|
||||||
|
<link href="/settings/quality/quality.css" rel='stylesheet' type='text/css'/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="in-sub-nav">
|
<div id="in-sub-nav">
|
||||||
|
18
UI/Settings/Quality/Profile/AllowedLabeler.js
Normal file
18
UI/Settings/Quality/Profile/AllowedLabeler.js
Normal file
@ -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 += '<span class="label label-info" title="Cutoff">' + allowed.name + '</span> ';
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
ret += '<span class="label">' + allowed.name + '</span> ';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return new Handlebars.SafeString(ret);
|
||||||
|
});
|
||||||
|
});
|
@ -6,7 +6,7 @@ define(
|
|||||||
], function (App, Marionette) {
|
], function (App, Marionette) {
|
||||||
|
|
||||||
return Marionette.ItemView.extend({
|
return Marionette.ItemView.extend({
|
||||||
template: 'Quality/Profile/DeleteTemplate',
|
template: 'Settings/Quality/Profile/DeleteTemplate',
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
'click .x-confirm-delete': '_removeProfile'
|
'click .x-confirm-delete': '_removeProfile'
|
||||||
|
@ -1,14 +1,4 @@
|
|||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>Quality Profiles</legend>
|
<legend>Quality Profiles</legend>
|
||||||
<table class="table table-hover">
|
<ul class="quality-profiles"></ul>
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Name</th>
|
|
||||||
<th>Allowed</th>
|
|
||||||
<th>Cutoff</th>
|
|
||||||
<th>Controls</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody></tbody>
|
|
||||||
</table>
|
|
||||||
</fieldset>
|
</fieldset>
|
@ -3,7 +3,7 @@
|
|||||||
define(['marionette', 'Settings/Quality/Profile/QualityProfileView'], function (Marionette, QualityProfileView) {
|
define(['marionette', 'Settings/Quality/Profile/QualityProfileView'], function (Marionette, QualityProfileView) {
|
||||||
return Marionette.CompositeView.extend({
|
return Marionette.CompositeView.extend({
|
||||||
itemView : QualityProfileView,
|
itemView : QualityProfileView,
|
||||||
itemViewContainer: 'tbody',
|
itemViewContainer: '.quality-profiles',
|
||||||
template : 'Settings/Quality/Profile/QualityProfileCollectionTemplate'
|
template : 'Settings/Quality/Profile/QualityProfileCollectionTemplate'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<td name="name"></td>
|
<div class="quality-profile-item">
|
||||||
<td>
|
<div>
|
||||||
{{#each allowed}}
|
<h2>{{name}}</h2>
|
||||||
{{name}} |
|
<span class="btn-group pull-right">
|
||||||
{{/each}}
|
<button class="btn btn-mini btn-danger x-delete">Delete</button>
|
||||||
</td>
|
<button class="btn btn-mini x-edit">Edit</button>
|
||||||
<td name="cutoff.name"></td>
|
</span>
|
||||||
<td>
|
</div>
|
||||||
<i class="icon-cog x-edit" title="Edit Series"/>
|
|
||||||
| Delete
|
{{allowedLabeler}}
|
||||||
</td>
|
</div>
|
@ -6,34 +6,34 @@ define(
|
|||||||
'marionette',
|
'marionette',
|
||||||
'Settings/Quality/Profile/EditQualityProfileView',
|
'Settings/Quality/Profile/EditQualityProfileView',
|
||||||
'Settings/Quality/Profile/DeleteView',
|
'Settings/Quality/Profile/DeleteView',
|
||||||
'Mixins/AsModelBoundView'
|
'Mixins/AsModelBoundView',
|
||||||
|
'Settings/Quality/Profile/AllowedLabeler'
|
||||||
|
|
||||||
], function (App, Marionette, EditProfileView, DeleteProfileView, AsModelBoundView) {
|
], function (App, Marionette, EditProfileView, DeleteProfileView, AsModelBoundView) {
|
||||||
|
|
||||||
var view = Marionette.ItemView.extend({
|
var view = Marionette.ItemView.extend({
|
||||||
template: 'Settings/Quality/Profile/QualityProfileTemplate',
|
template: 'Settings/Quality/Profile/QualityProfileTemplate',
|
||||||
tagName : 'tr',
|
tagName : 'li',
|
||||||
|
|
||||||
ui: {
|
ui: {
|
||||||
'progressbar': '.progress .bar'
|
'progressbar': '.progress .bar'
|
||||||
},
|
},
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
'click .x-edit' : 'edit',
|
'click .x-edit' : '_editProfile',
|
||||||
'click .x-remove': 'removeQuality'
|
'click .x-delete': '_deleteProfile'
|
||||||
},
|
},
|
||||||
|
|
||||||
edit: function () {
|
_editProfile: function () {
|
||||||
var view = new EditProfileView({ model: this.model});
|
var view = new EditProfileView({ model: this.model});
|
||||||
App.modalRegion.show(view);
|
App.modalRegion.show(view);
|
||||||
},
|
},
|
||||||
|
|
||||||
removeQuality: function () {
|
_deleteProfile: function () {
|
||||||
var view = new DeleteProfileView({ model: this.model });
|
var view = new DeleteProfileView({ model: this.model });
|
||||||
App.modalRegion.show(view);
|
App.modalRegion.show(view);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
return AsModelBoundView.call(view);
|
return AsModelBoundView.call(view);
|
||||||
});
|
});
|
||||||
|
26
UI/Settings/Quality/quality.less
Normal file
26
UI/Settings/Quality/quality.less
Normal file
@ -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;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user