forked from 0x2620/oxjs
improve listmap editing functionality
This commit is contained in:
parent
02442a24f7
commit
b17e8a783b
6 changed files with 48 additions and 35 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue