improve form elements

This commit is contained in:
rlx 2011-11-02 10:23:15 +00:00
commit 14a6b6c148
5 changed files with 43 additions and 30 deletions

View file

@ -222,7 +222,7 @@ Ox.Input = function(options, self) {
width: self.inputWidth + 'px',
textAlign: self.options.textAlign
}, self.options.type == 'textarea' ? {
height: self.options.height + 'px',
height: self.options.height - 6 + 'px',
} : {})
)
.val(self.options.value)
@ -232,7 +232,7 @@ Ox.Input = function(options, self) {
.appendTo(that.$element);
if (self.options.type == 'textarea') {
Ox.print('TEXTAREA', self.options.width, self.options.height, '...', that.css('width'), that.css('height'), '...', self.$input.css('width'), self.$input.css('height'))
Ox.print('TEXTAREA', self.options.width, self.options.height, '...', that.css('width'), that.css('height'), '...', self.$input.css('width'), self.$input.css('height'), '...', self.$input.css('border'))
}
// fixme: is there a better way than this one?
@ -694,11 +694,11 @@ Ox.Input = function(options, self) {
}
function getInputWidth() {
return self.options.width -
(self.options.arrows ? 32 : 0) -
(self.options.clear ? 16 : 0) -
(self.options.label ? self.options.labelWidth : 0) -
(self.options.style == 'rounded' ? 14 : 6);
return self.options.width
- (self.options.arrows ? 32 : 0)
- (self.options.clear ? 16 : 0)
- (self.options.label ? self.options.labelWidth : 0)
- (self.options.style == 'rounded' ? 14 : 6);
}
function keydown(event) {