support textarea as type for Ox.Input
This commit is contained in:
parent
91318e1398
commit
f7f6ef6039
1 changed files with 4 additions and 2 deletions
|
@ -1500,15 +1500,17 @@ requires
|
||||||
|
|
||||||
Ox.Input = function(options, self) {
|
Ox.Input = function(options, self) {
|
||||||
var self = self || {},
|
var self = self || {},
|
||||||
that = new Ox.Element("input", self)
|
that = new Ox.Element(options.type=='textarea'?'textarea':'input', self)
|
||||||
.defaults({
|
.defaults({
|
||||||
placeholder: "",
|
placeholder: "",
|
||||||
size: "medium",
|
size: "medium",
|
||||||
type: "text"
|
type: "text"
|
||||||
})
|
})
|
||||||
.options(options || {});
|
.options(options || {});
|
||||||
|
if(options.type != 'textarea') {
|
||||||
|
that.attr({type: self.options.type})
|
||||||
|
}
|
||||||
that.attr({
|
that.attr({
|
||||||
type: self.options.type,
|
|
||||||
placeholder: self.options.placeholder
|
placeholder: self.options.placeholder
|
||||||
})
|
})
|
||||||
.addClass("OxInput Ox" +
|
.addClass("OxInput Ox" +
|
||||||
|
|
Loading…
Reference in a new issue