1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-24 22:35:49 -04:00

Paging for movies :) (#861)

* First steps.

* Not really sure what I am doing here.

* Pretty hacky, but it works :)

* First filter works now.

* Fix all filters.

* Fix some filters.

* PageSize saving now works.

* Fixed items being added when a refresh movie is done.

* Downloaded sort not working.

* Sorting by downloaded status now works.

Extremely hacky, but ¯\_(ツ)_/¯

* Fixed issue where users were stuck when filtering.

* Sorting via that button works now.

* Removed temp thingy.
This commit is contained in:
Leonardo Galli
2017-02-24 19:52:40 +01:00
committed by GitHub
parent 50fdbd896c
commit f07f2e77f6
16 changed files with 291 additions and 40 deletions
+1
View File
@@ -8,6 +8,7 @@ var model = DeepModel.extend({
initialize : function() {
this.listenTo(vent, vent.Commands.SaveSettings, this.saveSettings);
this.listenTo(this, 'destroy', this._stopListening);
},
saveSettings : function() {
+16 -2
View File
@@ -1,7 +1,21 @@
var SettingsModelBase = require('../SettingsModelBase');
var Config = require('../../Config');
module.exports = SettingsModelBase.extend({
url : window.NzbDrone.ApiRoot + '/config/ui',
successMessage : 'UI settings saved',
errorMessage : 'Failed to save UI settings'
});
errorMessage : 'Failed to save UI settings',
origSave : SettingsModelBase.prototype.saveSettings,
origInit : SettingsModelBase.prototype.initialize,
initialize : function() {
this.set("pageSize", Config.getValue("pageSize"));
this.origInit.call(this);
},
saveSettings : function() {
Config.setValue("pageSize", this.get("pageSize"));
this.origSave.call(this);
}
});
+23
View File
@@ -1,4 +1,27 @@
<div class="form-horizontal">
<fieldset>
<legend>Movies</legend>
<div class="form-group">
<label class="col-sm-3 control-label">Page Size</label>
<div class="col-sm-4">
<select name="pageSize" class="form-control">
<option value="25">25</option>
<option value="50">50</option>
<option value="100">100</option>
<option value="250">250</option>
<option value="500">500</option>
<option value="1000">1000</option>
</select>
</div>
<span class="col-sm-1 help-inline">
<i class="icon-sonarr-form-info" title="How many movies to show on the main page."/>
</span>
</div>
</fieldset>
<fieldset>
<legend>Calendar</legend>