From f71af0a20551414bbb1e95734fab577507d860f7 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Sat, 15 Jan 2011 06:47:22 +0000 Subject: [PATCH] fixing a bug where selects would report an incorrect value --- build/js/ox.ui.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index c93f5a16..9877b740 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -4397,10 +4397,10 @@ requires }; that.selected = function() { - return $.map(/*self.checked*/self.optionGroup.checked(), function(v, i) { + return $.map(/*self.checked*/self.optionGroup.checked(), function(v) { return { - id: self.options.items[i].id, - title: self.options.items[i].title + id: self.options.items[v].id, + title: self.options.items[v].title }; }); }; @@ -4482,10 +4482,10 @@ requires } that.value = function() { - return $.map(self.options.elements, function(input) { + return $.map(self.options.elements, function(element) { var ret = null; ['checked', 'selected', 'value'].forEach(function(v) { - input[v] && (ret = input[v]()); + element[v] && (ret = element[v]()); }); return ret; });