From 9276e51bce438b0686deac827fce2ca60a5301e1 Mon Sep 17 00:00:00 2001 From: Endi Sukma Dewata Date: Mon, 21 Nov 2011 16:43:52 -0600 Subject: Fixed navigation buttons for HBAC Test. The Back, Next, and New Test buttons in HBAC Test have been fixed to work properly. Ticket #388 --- install/ui/jquery.ordered-map.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'install/ui/jquery.ordered-map.js') diff --git a/install/ui/jquery.ordered-map.js b/install/ui/jquery.ordered-map.js index ea61b954..f30f8d13 100755 --- a/install/ui/jquery.ordered-map.js +++ b/install/ui/jquery.ordered-map.js @@ -44,7 +44,7 @@ jQuery.ordered_map = jQuery.fn.ordered_map = function() { that.remove = function(key) { - var i = that.keys.indexOf(key); + var i = that.get_key_index(key); if (i<0) return null; that.keys.splice(i, 1); @@ -63,5 +63,17 @@ jQuery.ordered_map = jQuery.fn.ordered_map = function() { that.length = that.keys.length; }; + that.get_key_index = function(key) { + return that.keys.indexOf(key); + }; + + that.get_key_by_index = function(index) { + return that.keys[index]; + }; + + that.get_value_by_index = function(index) { + return that.values[index]; + }; + return that; }; -- cgit