Skip to content

Commit

Permalink
js: Select the corresponding radio button on completion focus
Browse files Browse the repository at this point in the history
A nice touch, if the user focuses the autocompletion input, it's because
she/he wants to use that option. Automatically select it for her/him.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
  • Loading branch information
Damien Lespiau committed Feb 3, 2016
1 parent f287369 commit 82d94a5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions htdocs/js/series-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ $(function () {
this.completion.on('change', function() {
_this.refresh_apply();
});

$('#submitter-filter .selectize-input input').focus(function() {
_this.me.prop('checked', false);
_this.by.prop('checked', true);
_this.refresh_apply();
});
},
set_filter: function(table) {
var filter = null;
Expand Down Expand Up @@ -119,6 +125,12 @@ $(function () {
this.completion.on('change', function() {
_this.refresh_apply();
});

$('#reviewer-action .selectize-input input').focus(function() {
_this.me.prop('checked', false);
_this.to.prop('checked', true);
_this.refresh_apply();
});
},
do_action: function(id) {
var reviewer = null;
Expand Down

0 comments on commit 82d94a5

Please sign in to comment.