mirror of
https://github.com/discourse/discourse.git
synced 2025-02-22 05:33:26 +08:00
FIX: avatar selection wasn't properly pre-selected
This commit is contained in:
parent
5a77f62181
commit
0bfabed2d5
@ -5,9 +5,12 @@ export default ModalBodyView.extend({
|
||||
classNames: ['avatar-selector'],
|
||||
title: I18n.t('user.change_avatar.title'),
|
||||
|
||||
// *HACK* used to select the proper radio button, cause {{action}}
|
||||
// stops the default behavior
|
||||
// *HACK* used to select the proper radio button, because {{action}} stops the default behavior
|
||||
selectedChanged: function() {
|
||||
Em.run.next(() => $('input:radio[name="avatar"]').val([this.get('controller.selected')]) );
|
||||
}.observes('controller.selected')
|
||||
Em.run.next(() => $('input:radio[name="avatar"]').val([this.get('controller.selected')]));
|
||||
}.observes('controller.selected').on("didInsertElement"),
|
||||
|
||||
_focusSelectedButton: function() {
|
||||
Em.run.next(() => $('input:radio[value="' + this.get('controller.selected') + '"]').focus());
|
||||
}.on("didInsertElement")
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user