diff --git a/phpgwapi/js/jquery/chosen/chosen.jquery.js b/phpgwapi/js/jquery/chosen/chosen.jquery.js index 00047b697f..21c5c4347c 100644 --- a/phpgwapi/js/jquery/chosen/chosen.jquery.js +++ b/phpgwapi/js/jquery/chosen/chosen.jquery.js @@ -457,6 +457,14 @@ Copyright (c) 2011 by Harvest }); } }; + Chosen.prototype.unregister_observers = function() { + return this.form_field_jq.unbind(); + }; + + Chosen.prototype.remove_html = function() { + this.form_field_jq.show().removeClass('chzn-done'); + return this.container.remove(); + }; Chosen.prototype.search_field_disabled = function() { this.is_disabled = this.form_field_jq[0].disabled; @@ -687,6 +695,13 @@ Copyright (c) 2011 by Harvest return this.results_showing = false; }; + Chosen.prototype.reset_tab_index = function() { + var tabbed_item; + tabbed_item = this.is_multiple ? this.search_field : this.selected_item; + this.form_field_jq.attr("tabindex",tabbed_item.attr("tabindex")); + return tabbed_item.attr("tabindex") - 1; + }; + Chosen.prototype.set_tab_index = function(el) { var ti; if (this.form_field_jq.attr("tabindex")) { @@ -981,6 +996,12 @@ Copyright (c) 2011 by Harvest return this.search_results.find(".no-results").remove(); }; + Chosen.prototype.remove = function() { + this.reset_tab_index(); + this.unregister_observers(); + return this.remove_html(); + }; + Chosen.prototype.keydown_arrow = function() { var first_active, next_sib; if (!this.result_highlight) {