forked from 0x2620/oxjs
very basic textarea support
This commit is contained in:
parent
240c13278f
commit
94a4ff135d
4 changed files with 30 additions and 5 deletions
|
|
@ -1799,7 +1799,7 @@ requires
|
|||
self.options.type == "textarea" ? "textarea" : "input", self
|
||||
)
|
||||
.attr({
|
||||
type: self.options.type == "textarea" ? null : self.options.type
|
||||
type: self.options.type == "textarea" ? undefined : self.options.type // fixme: make conditional?
|
||||
})
|
||||
.addClass(
|
||||
"OxInput Ox" + Ox.toTitleCase(self.options.size) +
|
||||
|
|
@ -1989,9 +1989,17 @@ requires
|
|||
that.triggerEvent("submit", that.$input.val());
|
||||
}
|
||||
|
||||
that.height = function(value) {
|
||||
if (self.options.type == "textarea") {
|
||||
that.$element.height(value);
|
||||
that.$input.height(value);
|
||||
}
|
||||
return that;
|
||||
}
|
||||
|
||||
that.width = function(value) {
|
||||
that.$element.width(value);
|
||||
that.$input.width(value - 2 -
|
||||
that.$input.width(value - (self.options.type == "textarea" ? 0 : 2) -
|
||||
(self.options.labelWidth ? self.options.labelWidth + 34 : 0) -
|
||||
(self.options.placeholder.length > 1 ? 26 : 0) -
|
||||
(self.options.clear ? 15 : 0));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue