Permalink
Browse files

Add two events for programatically activating / opening a field that …

…has Chosen applied.
  • Loading branch information...
1 parent 2e09d33 commit a3ec7cb1164e9a6a9435fc1ccc93921d7efda051 @pfiller pfiller committed Aug 17, 2012
View
@@ -385,6 +385,12 @@ Copyright (c) 2011 by Harvest
this.form_field_jq.bind("liszt:updated", function(evt) {
return _this.results_update_field(evt);
});
+ this.form_field_jq.bind("liszt:activate", function(evt) {
+ return _this.activate_field(evt);
+ });
+ this.form_field_jq.bind("liszt:open", function(evt) {
+ return _this.container_mousedown(evt);
+ });
this.search_field.blur(function(evt) {
return _this.input_blur(evt);
});

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -376,6 +376,12 @@ Copyright (c) 2011 by Harvest
this.form_field.observe("liszt:updated", function(evt) {
return _this.results_update_field(evt);
});
+ this.form_field.observe("liszt:activate", function(evt) {
+ return _this.activate_field(evt);
+ });
+ this.form_field.observe("liszt:open", function(evt) {
+ return _this.container_mousedown(evt);
+ });
this.search_field.observe("blur", function(evt) {
return _this.input_blur(evt);
});

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -82,6 +82,8 @@ class Chosen extends AbstractChosen
@search_results.mouseout (evt) => this.search_results_mouseout(evt)
@form_field_jq.bind "liszt:updated", (evt) => this.results_update_field(evt)
+ @form_field_jq.bind "liszt:activate", (evt) => this.activate_field(evt)
+ @form_field_jq.bind "liszt:open", (evt) => this.container_mousedown(evt)
@search_field.blur (evt) => this.input_blur(evt)
@search_field.keyup (evt) => this.keyup_checker(evt)
@@ -74,6 +74,8 @@ class Chosen extends AbstractChosen
@search_results.observe "mouseout", (evt) => this.search_results_mouseout(evt)
@form_field.observe "liszt:updated", (evt) => this.results_update_field(evt)
+ @form_field.observe "liszt:activate", (evt) => this.activate_field(evt)
+ @form_field.observe "liszt:open", (evt) => this.container_mousedown(evt)
@search_field.observe "blur", (evt) => this.input_blur(evt)
@search_field.observe "keyup", (evt) => this.keyup_checker(evt)

0 comments on commit a3ec7cb

Please sign in to comment.