mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Sugared quality size knobs
This commit is contained in:
parent
2ce5f6d416
commit
f65911aff7
3 changed files with 29 additions and 9 deletions
|
@ -24,7 +24,7 @@ define(['marionette', 'Mixins/AsModelBoundView', 'jquery.knob'], function (Mario
|
|||
this.ui.knob.knob({
|
||||
min : 0,
|
||||
max : 200,
|
||||
step : 10,
|
||||
step : 5,
|
||||
cursor : 25,
|
||||
width : 150,
|
||||
stopper : true,
|
||||
|
@ -32,11 +32,19 @@ define(['marionette', 'Mixins/AsModelBoundView', 'jquery.knob'], function (Mario
|
|||
});
|
||||
},
|
||||
|
||||
_changeMaxSize: function (e) {
|
||||
var value = this.model.get('maxSize');
|
||||
_changeMaxSize: function () {
|
||||
var maxSize = this.model.get('maxSize');
|
||||
var bytes = maxSize * 1024 * 1024;
|
||||
var thirty = (bytes * 30).bytes(1);
|
||||
var sixty = (bytes * 60).bytes(1);
|
||||
|
||||
this.ui.thirtyMinuteSize.html(value * 30);
|
||||
this.ui.sixtyMinuteSize.html(value * 60);
|
||||
if (parseInt(maxSize) === 0) {
|
||||
thirty = 'No Limit';
|
||||
sixty = 'No Limit';
|
||||
}
|
||||
|
||||
this.ui.thirtyMinuteSize.html(thirty);
|
||||
this.ui.sixtyMinuteSize.html(sixty);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue