1
0
Fork 0
forked from 0x2620/oxjs

some improvements for textareas with labels

This commit is contained in:
Rolux 2010-02-27 08:54:45 +01:00
commit e805486d86
3 changed files with 17 additions and 8 deletions

View file

@ -2003,7 +2003,7 @@ requires
background: "-moz-linear-gradient(top, rgb(224, 224, 224), rgb(240, 240, 240) " + percent + "%, rgb(240, 240, 240) " + (100 - percent) + "%, rgb(255, 255, 255))"
})
.css({
background: "-webkit-gradient(linear, left top, left bottom, from(rgb(224, 224, 224)), color-stop(" + (percent / 100) + ", rgb(240, 240, 240)), color-stop(" + (1 - percent / 100) + ", rgb(240, 240, 240)), to(rgb(255, 255, 255)));"
background: "-webkit-gradient(linear, left top, left bottom, from(rgb(224, 224, 224)), color-stop(" + (percent / 100) + ", rgb(240, 240, 240)), color-stop(" + (1 - percent / 100) + ", rgb(240, 240, 240)), to(rgb(255, 255, 255)))"
});
}
return that;
@ -2012,9 +2012,9 @@ requires
that.width = function(value) {
that.$element.width(value);
that.$input.width(value - (self.options.type == "textarea" ? 0 : 2) -
(self.options.labelWidth ? self.options.labelWidth + 34 : 0) -
(self.options.labelWidth ? self.options.labelWidth + 18 : 0) -
(self.options.placeholder.length > 1 ? 26 : 0) -
(self.options.clear ? 15 : 0));
(self.options.clear ? 31 : 0));
// fixme: the values above are all weird guesswork
return that;
}