Browse Source

Make sure top quality is always checked.

pull/874/merge
Ruud 13 years ago
parent
commit
7e3a6eeb83
  1. 17
      couchpotato/core/plugins/profile/static/profile.js

17
couchpotato/core/plugins/profile/static/profile.js

@ -86,7 +86,10 @@ var Profile = new Class({
}, },
'onComplete': function(json){ 'onComplete': function(json){
if(json.success){ if(json.success){
self.data = json.profile self.data = json.profile;
self.type_container.getElement('li:first-child input[type=checkbox]')
.set('checked', true)
.getParent().addClass('checked');
} }
} }
}); });
@ -241,7 +244,15 @@ Profile.Type = new Class({
self.finish = new Element('input.inlay.finish[type=checkbox]', { self.finish = new Element('input.inlay.finish[type=checkbox]', {
'checked': data.finish, 'checked': data.finish,
'events': { 'events': {
'change': self.fireEvent.bind(self, 'change') 'change': function(e){
if(self.el == self.el.getParent().getElement(':first-child')){
self.finish_class.check();
alert('Top quality always finishes the search')
return;
}
self.fireEvent('change');
}
} }
}) })
), ),
@ -255,7 +266,7 @@ Profile.Type = new Class({
self.el[self.data.quality_id > 0 ? 'removeClass' : 'addClass']('is_empty'); self.el[self.data.quality_id > 0 ? 'removeClass' : 'addClass']('is_empty');
new Form.Check(self.finish); self.finish_class = new Form.Check(self.finish);
}, },

Loading…
Cancel
Save