Fire the selectall event when select all element is clicked.

This commit is contained in:
Patrick Filler 2012-02-28 16:19:01 -05:00
parent 1466f160fc
commit c254bfd02e
6 changed files with 6 additions and 2 deletions

View file

@ -601,6 +601,7 @@ Copyright (c) 2011 by Harvest
if (!option.disabled) option.selected = true; if (!option.disabled) option.selected = true;
} }
this.form_field_jq.trigger("liszt:updated"); this.form_field_jq.trigger("liszt:updated");
this.form_field_jq.trigger("liszt:selectall");
return this.select_all_disable(); return this.select_all_disable();
}; };

File diff suppressed because one or more lines are too long

View file

@ -591,6 +591,7 @@ Copyright (c) 2011 by Harvest
if (!option.disabled) return option.selected = true; if (!option.disabled) return option.selected = true;
}); });
this.form_field.fire("liszt:updated"); this.form_field.fire("liszt:updated");
this.form_field.fire("liszt:selectall");
return this.select_all_disable(); return this.select_all_disable();
}; };

File diff suppressed because one or more lines are too long

View file

@ -265,6 +265,7 @@ class Chosen extends AbstractChosen
for option in options for option in options
option.selected = true if not option.disabled option.selected = true if not option.disabled
@form_field_jq.trigger("liszt:updated") @form_field_jq.trigger("liszt:updated")
@form_field_jq.trigger("liszt:selectall")
this.select_all_disable() this.select_all_disable()
select_all_disable: -> select_all_disable: ->

View file

@ -254,6 +254,7 @@ class Chosen extends AbstractChosen
@form_field.select("option").each (option) -> @form_field.select("option").each (option) ->
option.selected = true if not option.disabled option.selected = true if not option.disabled
@form_field.fire("liszt:updated") @form_field.fire("liszt:updated")
@form_field.fire("liszt:selectall")
this.select_all_disable() this.select_all_disable()
select_all_disable: -> select_all_disable: ->