You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.2 KiB
46 lines
1.2 KiB
'use strict';
|
|
|
|
define(['marionette', 'Mixins/AsModelBoundView', 'jquery.knob'], function (Marionette, AsModelBoundView) {
|
|
|
|
var view = Marionette.ItemView.extend({
|
|
template : 'Settings/Quality/Size/QualitySizeTemplate',
|
|
tagName : 'li',
|
|
|
|
ui: {
|
|
knob : '.x-knob',
|
|
thirtyMinuteSize: '.thirty-minute-size',
|
|
sixtyMinuteSize : '.sixty-minute-size'
|
|
},
|
|
|
|
events: {
|
|
'change .x-knob': '_changeMaxSize'
|
|
},
|
|
|
|
initialize: function (options) {
|
|
this.qualityProfileCollection = options.qualityProfiles;
|
|
},
|
|
|
|
onRender: function () {
|
|
this.ui.knob.knob({
|
|
min : 0,
|
|
max : 200,
|
|
step : 10,
|
|
cursor : 25,
|
|
width : 100,
|
|
stopper : true
|
|
});
|
|
},
|
|
|
|
_changeMaxSize: function (e, value) {
|
|
this.model.set({
|
|
maxSize: value
|
|
});
|
|
|
|
this.ui.thirtyMinuteSize.html(value * 30);
|
|
this.ui.sixtyMinuteSize.html(value * 60);
|
|
}
|
|
});
|
|
|
|
return AsModelBoundView.call(view);
|
|
});
|