1
0
Fork 0
forked from 0x2620/oxjs

improving listmap

This commit is contained in:
rolux 2011-05-22 14:39:57 +02:00
commit 5915acd72c
12 changed files with 152 additions and 39 deletions

View file

@ -65,7 +65,7 @@ Ox.Form = function(options, self) {
});
});
function getItemPositionById(id) {
function getItemIndexById(id) {
return self.itemIds.indexOf(id);
}
@ -121,8 +121,10 @@ Ox.Form = function(options, self) {
//Ox.print('VALUES', values)
return values;
} else {
Ox.each(arguments[0], function(val, key) {
Ox.forEach(arguments[0], function(value, key) {
var index = getItemIndexById(key);
index > -1 && Ox.print(key, value)
index > -1 && self.options.items[index].options({value: value});
});
return that;
}