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.
Lidarr/src/UI/Settings/Profile/Edit/EditProfileView.js

35 lines
982 B

'use strict';
define(
[
'underscore',
'marionette',
'Settings/Profile/Language/LanguageCollection',
'Config',
'Mixins/AsModelBoundView',
'Mixins/AsValidatedView'
], function (_, Marionette, LanguageCollection, Config, AsModelBoundView, AsValidatedView) {
var view = Marionette.ItemView.extend({
template: 'Settings/Profile/Edit/EditProfileViewTemplate',
ui: {
cutoff : '.x-cutoff'
},
templateHelpers: function () {
return {
languages : LanguageCollection.toJSON()
};
},
getCutoff: function () {
var self = this;
return _.findWhere(_.pluck(this.model.get('items'), 'quality'), { id: parseInt(self.ui.cutoff.val(), 10)});
}
});
AsValidatedView.call(view);
return AsModelBoundView.call(view);
});