1
0
Fork 0
forked from 0x2620/oxjs

improve listmap editing functionality

This commit is contained in:
rolux 2011-05-24 13:43:27 +02:00
commit b17e8a783b
6 changed files with 48 additions and 35 deletions

View file

@ -829,7 +829,13 @@ Ox.Input = function(options, self) {
// fixme: deprecate, options are enough
that.value = function() {
return self.$input.hasClass('OxPlaceholder') ? '' : self.$input.val();
var value = self.$input.hasClass('OxPlaceholder') ? '' : self.$input.val();
if (self.options.type == 'float') {
value = parseFloat(value);
} else if (self.options.type == 'int') {
value = parseInt(value); // cannot have leading zero
}
return value;
};
return that;