From db75f272b807c23f27b8d1da1171543b8fa86f58 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 18 Jun 2013 14:32:36 +0000 Subject: [PATCH] Re-add lost reset methods --- phpgwapi/js/jquery/chosen/chosen.jquery.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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) {