fire a liszt:ready event when Chosen is done generating the HTML, thus providing a hook for further customization

js_style_fix
Sebastian Delmont 2011-08-05 12:25:33 -04:00
parent b7a531f211
commit 3bf68f6aef
6 changed files with 12 additions and 6 deletions

View File

@ -89,7 +89,10 @@
});
}
this.results_build();
return this.set_tab_index();
this.set_tab_index();
return this.form_field_jq.fire("liszt:ready", {
chosen: this
});
};
Chosen.prototype.register_observers = function() {
this.container.click(__bind(function(evt) {

File diff suppressed because one or more lines are too long

View File

@ -83,7 +83,10 @@
});
}
this.results_build();
return this.set_tab_index();
this.set_tab_index();
return this.form_field.fire("liszt:ready", {
chosen: this
});
};
Chosen.prototype.register_observers = function() {
this.container.observe("click", __bind(function(evt) {

File diff suppressed because one or more lines are too long

View File

@ -84,7 +84,7 @@ class Chosen
this.results_build()
this.set_tab_index()
@form_field_jq.fire("liszt:ready", {chosen: this})
register_observers: ->
@container.click (evt) => this.container_click(evt)

View File

@ -78,7 +78,7 @@ class Chosen
this.results_build()
this.set_tab_index()
@form_field.fire("liszt:ready", {chosen: this})
register_observers: ->
@container.observe "click", (evt) => this.container_click(evt)