mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 12:02:35 +02:00
Changed: All-around small improvements (#3032)
This commit is contained in:
parent
3767bbec18
commit
c566c6e18a
@ -7,6 +7,7 @@
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Common.Reflection;
|
||||
using NzbDrone.Core.Annotations;
|
||||
using NzbDrone.Core.Download.Clients.Nzbget;
|
||||
using NzbDrone.Core.Qualities;
|
||||
using NzbDrone.Core.Profiles;
|
||||
|
||||
@ -181,6 +182,11 @@ private static List<SelectOption> GetSelectOptions(Type selectOptions)
|
||||
var options = from Enum e in Enum.GetValues(selectOptions)
|
||||
select new SelectOption { Value = Convert.ToInt32(e), Name = e.ToString() };
|
||||
|
||||
if (selectOptions == typeof(NzbgetPriority))
|
||||
{
|
||||
return options.OrderBy(o => o.Value).ToList();
|
||||
}
|
||||
|
||||
return options.OrderBy(o => o.Name).ToList();
|
||||
}
|
||||
}
|
||||
|
@ -231,7 +231,6 @@ module.exports = Marionette.Layout.extend({
|
||||
this.listsDropdown = new DiscoverableListDropdownView(DiscoverableListCollection.toJSON());
|
||||
this.listsDropdown.render();
|
||||
$("#list-dropdown").html(this.listsDropdown.$el.html());
|
||||
//debugger;
|
||||
//this.myRegion.show(new DiscoverableListDropdownView(DiscoverableListCollection.toJSON()));
|
||||
},
|
||||
|
||||
|
@ -25,7 +25,6 @@ module.exports = Backgrid.SelectCell.extend({
|
||||
},
|
||||
|
||||
optionValues : function() {
|
||||
//debugger;
|
||||
return _.map(ProfileCollection.models, function(model){
|
||||
return [model.get("name"), model.get("id")+""];
|
||||
});
|
||||
|
@ -56,7 +56,6 @@ module.exports = Marionette.Layout.extend({
|
||||
this.bulkImportCollection.fullCollection.reset();
|
||||
this.bulkImportCollection.reset();
|
||||
this.table.show(new LoadingView());
|
||||
//debugger;
|
||||
this.bulkImportCollection.setPageSize(pageSize);
|
||||
//this.bulkImportCollection.fetch();
|
||||
},
|
||||
|
@ -39,7 +39,6 @@ module.exports = Marionette.CollectionView.extend({
|
||||
setExisting : function(tmdbid) {
|
||||
var movies = this.collection.where({ tmdbId : tmdbid });
|
||||
console.warn(movies);
|
||||
//debugger;
|
||||
if (movies.length > 0) {
|
||||
this.children.findByModel(movies[0])._configureTemplateHelpers();
|
||||
//this.children.findByModel(movies[0])._configureTemplateHelpers();
|
||||
|
@ -23,7 +23,6 @@ module.exports = Backgrid.CellEditor.extend({
|
||||
promise.done(function() {
|
||||
var templateName = self.template;
|
||||
self.schema = profileSchemaCollection.first();
|
||||
debugger;
|
||||
|
||||
var selected = _.find(self.schema.get('items'), function(model) {
|
||||
return model.quality.id === self.model.get(self.column.get('name')).quality.id;
|
||||
|
@ -2404,7 +2404,6 @@ var Body = Backgrid.Body = Backbone.View.extend({
|
||||
See [Backbone.Collection#comparator](http://backbonejs.org/#Collection-comparator)
|
||||
*/
|
||||
sort: function (column, direction) {
|
||||
//debugger;
|
||||
if (_.isString(column)) column = this.columns.findWhere({name: column});
|
||||
|
||||
var collection = this.collection;
|
||||
|
@ -815,7 +815,7 @@
|
||||
sort: function(options) {
|
||||
if (!this.comparator) throw new Error('Cannot sort a set without a comparator');
|
||||
options || (options = {});
|
||||
//debugger;
|
||||
|
||||
// Run sort based on type of `comparator`.
|
||||
if (_.isString(this.comparator) || this.comparator.length === 1) {
|
||||
this.models = this.sortBy(this.comparator, this);
|
||||
|
@ -87,7 +87,7 @@ module.exports = Marionette.Layout.extend({
|
||||
|
||||
_filter : function (term) {
|
||||
this.movieCollection.reset(this.fullMovieCollection.filter(function(model){
|
||||
return (model.get("title") + " "+model.get("year")+"").toLowerCase().indexOf(term.toLowerCase()) != -1;
|
||||
return (model.get("title") + " "+model.get("year")+"").toLowerCase().indexOf(term.toLowerCase()) !== -1;
|
||||
}).slice(0, 50));
|
||||
|
||||
this._setModelCollection();
|
||||
@ -95,7 +95,6 @@ module.exports = Marionette.Layout.extend({
|
||||
},
|
||||
|
||||
_onSelected : function (e) {
|
||||
debugger;
|
||||
this.trigger('manualimport:selected:movie', { model: e.model });
|
||||
|
||||
vent.trigger(vent.Commands.CloseModal2Command);
|
||||
|
@ -26,10 +26,10 @@ module.exports = Marionette.ItemView.extend({
|
||||
},
|
||||
|
||||
onRender : function() {
|
||||
if (this.current.formats != undefined) {
|
||||
if (this.current.formats !== undefined) {
|
||||
this.ui.formats.val(this.current.formats.map(function(m) {return m.id;}).join(","));
|
||||
}
|
||||
if (this.current.quality != undefined) {
|
||||
if (this.current.quality !== undefined) {
|
||||
this.ui.select.val(this.current.quality.id);
|
||||
}
|
||||
this.ui.formats.tagInput();
|
||||
|
@ -3,7 +3,7 @@
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3>Delete {{title}}</h3>
|
||||
</div>
|
||||
<div class="modal-body delete-series-modal">
|
||||
<div class="modal-body delete-movie-modal">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3 hidden-xs">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="close">×</button>
|
||||
<h3>Delete {{removeCount}} Titles</h3>
|
||||
</div>
|
||||
<div class="modal-body delete-series-modal">
|
||||
<div class="modal-body delete-movie-modal">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-horizontal">
|
||||
|
@ -11,8 +11,8 @@
|
||||
|
||||
Are you sure you want to update all files in the {{numberOfMovies}} selected movies?
|
||||
|
||||
|
||||
<ul class="selected-series">
|
||||
|
||||
<ul class="selected-movie">
|
||||
{{#each movies}}
|
||||
<li>{{title}}</li>
|
||||
{{/each}}
|
||||
|
@ -145,7 +145,6 @@ module.exports = Marionette.Layout.extend({
|
||||
initialize : function() {
|
||||
//this variable prevents us from showing the list before moviesCollection has been fetched the first time
|
||||
this.moviesCollection = MoviesCollection.clone();
|
||||
//debugger;
|
||||
this.moviesCollection.bindSignalR();
|
||||
var pageSize = parseInt(Config.getValue("pageSize")) || 10;
|
||||
if (this.moviesCollection.state.pageSize !== pageSize) {
|
||||
@ -321,7 +320,6 @@ module.exports = Marionette.Layout.extend({
|
||||
};
|
||||
|
||||
//this._showToolbar();
|
||||
//debugger;
|
||||
var self = this;
|
||||
setTimeout(function(){self._showToolbar();}, 0); // jshint ignore:line
|
||||
//this._renderView();
|
||||
@ -397,7 +395,6 @@ module.exports = Marionette.Layout.extend({
|
||||
},
|
||||
|
||||
_showToolbar : function() {
|
||||
//debugger;
|
||||
if (this.toolbar.currentView) {
|
||||
return;
|
||||
}
|
||||
|
@ -26,7 +26,6 @@ module.exports = NzbDroneController.extend({
|
||||
|
||||
if(FullMovieCollection.length > 0) {
|
||||
this._renderMovieDetails(query);
|
||||
//debugger;
|
||||
} else {
|
||||
var self = this;
|
||||
$.getJSON(window.NzbDrone.ApiRoot + '/movie/titleslug/'+query, { }, function(data) {
|
||||
@ -34,7 +33,6 @@ module.exports = NzbDroneController.extend({
|
||||
self._renderMovieDetails(query);
|
||||
});
|
||||
this.listenTo(FullMovieCollection, 'sync', function(model, options) {
|
||||
//debugger;
|
||||
this._renderMovieDetails(query);
|
||||
});
|
||||
}
|
||||
|
@ -156,7 +156,7 @@
|
||||
width : 170px;
|
||||
|
||||
:hover {
|
||||
cursor : default;
|
||||
cursor : pointer;
|
||||
}
|
||||
|
||||
.label {
|
||||
|
@ -2,7 +2,7 @@ var vent = require('vent');
|
||||
var Marionette = require('marionette');
|
||||
|
||||
module.exports = Marionette.ItemView.extend({
|
||||
template : 'Settings/Indexers/Delete/IndexerDeleteViewTemplate',
|
||||
template : 'Settings/NetImport/Delete/NetImportDeleteViewTemplate',
|
||||
|
||||
events : {
|
||||
'click .x-confirm-delete' : '_delete'
|
||||
@ -16,4 +16,4 @@ module.exports = Marionette.ItemView.extend({
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
@ -1,7 +1,7 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3>Delete Indexer</h3>
|
||||
<h3>Delete List</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Are you sure you want to delete '{{name}}'?</p>
|
||||
@ -10,4 +10,4 @@
|
||||
<button class="btn" data-dismiss="modal">Cancel</button>
|
||||
<button class="btn btn-danger x-confirm-delete">Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -3,7 +3,7 @@ var $ = require('jquery');
|
||||
var vent = require('vent');
|
||||
var AppLayout = require('../../../AppLayout');
|
||||
var Marionette = require('marionette');
|
||||
var DeleteView = require('../Delete/IndexerDeleteView');
|
||||
var DeleteView = require('../Delete/NetImportDeleteView');
|
||||
var Profiles = require('../../../Profile/ProfileCollection');
|
||||
var AsModelBoundView = require('../../../Mixins/AsModelBoundView');
|
||||
var AsValidatedView = require('../../../Mixins/AsValidatedView');
|
||||
|
@ -30,7 +30,7 @@ var view = Marionette.Layout.extend({
|
||||
initialize : function(options) {
|
||||
this.profileCollection = options.profileCollection;
|
||||
this.itemsCollection = new Backbone.Collection(_.toArray(this.model.get('items')).reverse());
|
||||
this.netImportCollection = new NetImportCollection;
|
||||
this.netImportCollection = new NetImportCollection();
|
||||
this.netImportCollection.fetch();
|
||||
this.formatItemsCollection = new Backbone.Collection(_.toArray(this.model.get('formatItems')).reverse());
|
||||
this.listenTo(FullMovieCollection, 'all', this._updateDisableStatus);
|
||||
|
@ -94,7 +94,7 @@ var view = Marionette.ItemView.extend({
|
||||
var input = this.ui.thirtyMinuteMaxSize.val();
|
||||
var maxSize = parseFloat(input) || 0;
|
||||
var mbPerMinute = maxSize / 90 * 1024;
|
||||
if (mbPerMinute == 0)
|
||||
if (mbPerMinute === 0)
|
||||
{
|
||||
mbPerMinute = null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user