very basic textarea support
This commit is contained in:
parent
240c13278f
commit
94a4ff135d
4 changed files with 30 additions and 5 deletions
|
@ -103,7 +103,8 @@ Forms
|
||||||
background: -moz-linear-gradient(top, rgb(224, 224, 224), rgb(255, 255, 255));
|
background: -moz-linear-gradient(top, rgb(224, 224, 224), rgb(255, 255, 255));
|
||||||
background: -webkit-gradient(linear, left top, left bottom, from(rgb(224, 224, 224)), to(rgb(255, 255, 255)));
|
background: -webkit-gradient(linear, left top, left bottom, from(rgb(224, 224, 224)), to(rgb(255, 255, 255)));
|
||||||
}
|
}
|
||||||
.OxThemeClassic input.OxInput:focus {
|
.OxThemeClassic input.OxInput:focus,
|
||||||
|
.OxThemeClassic textarea.OxInput:focus {
|
||||||
border: 1px solid rgb(160, 160, 160);
|
border: 1px solid rgb(160, 160, 160);
|
||||||
-moz-box-shadow: 0 0 2px rgb(128, 128, 128);
|
-moz-box-shadow: 0 0 2px rgb(128, 128, 128);
|
||||||
-webkit-box-shadow: 0 0 2px rgb(128, 128, 128);
|
-webkit-box-shadow: 0 0 2px rgb(128, 128, 128);
|
||||||
|
|
|
@ -138,7 +138,8 @@ Forms
|
||||||
================================================================================
|
================================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
input {
|
input,
|
||||||
|
textarea {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: 1px;
|
border: 1px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
@ -152,7 +153,8 @@ input[type=submit] {
|
||||||
input[type=image] {
|
input[type=image] {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
input:focus {
|
input:focus,
|
||||||
|
textarea:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
@ -214,12 +216,18 @@ input[type=image].OxSmall {
|
||||||
input::-moz-focus-inner {
|
input::-moz-focus-inner {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
textarea {
|
||||||
|
margin: -1px 0 0 -1px;
|
||||||
|
-moz-border-radius: 8px;
|
||||||
|
-webkit-border-radius: 8px;
|
||||||
|
}
|
||||||
.OxButton.OxSymbol,
|
.OxButton.OxSymbol,
|
||||||
.OxButton.OxSymbol:active,
|
.OxButton.OxSymbol:active,
|
||||||
.OxButton.OxSymbol:focus {
|
.OxButton.OxSymbol:focus {
|
||||||
border: 1px solid rgba(0, 0, 0, 0);
|
border: 1px solid rgba(0, 0, 0, 0);
|
||||||
background: rgba(0, 0, 0, 0);
|
background: rgba(0, 0, 0, 0);
|
||||||
-moz-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
|
-moz-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
|
||||||
|
//-webkit-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
@ -325,6 +333,9 @@ div.OxInput > .OxButton:last-child {
|
||||||
input.OxInput {
|
input.OxInput {
|
||||||
float: left;
|
float: left;
|
||||||
margin: -1px -1px 0 -1px;
|
margin: -1px -1px 0 -1px;
|
||||||
|
}
|
||||||
|
textarea.OxInput {
|
||||||
|
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
|
@ -1799,7 +1799,7 @@ requires
|
||||||
self.options.type == "textarea" ? "textarea" : "input", self
|
self.options.type == "textarea" ? "textarea" : "input", self
|
||||||
)
|
)
|
||||||
.attr({
|
.attr({
|
||||||
type: self.options.type == "textarea" ? null : self.options.type
|
type: self.options.type == "textarea" ? undefined : self.options.type // fixme: make conditional?
|
||||||
})
|
})
|
||||||
.addClass(
|
.addClass(
|
||||||
"OxInput Ox" + Ox.toTitleCase(self.options.size) +
|
"OxInput Ox" + Ox.toTitleCase(self.options.size) +
|
||||||
|
@ -1989,9 +1989,17 @@ requires
|
||||||
that.triggerEvent("submit", that.$input.val());
|
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.width = function(value) {
|
||||||
that.$element.width(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.labelWidth ? self.options.labelWidth + 34 : 0) -
|
||||||
(self.options.placeholder.length > 1 ? 26 : 0) -
|
(self.options.placeholder.length > 1 ? 26 : 0) -
|
||||||
(self.options.clear ? 15 : 0));
|
(self.options.clear ? 15 : 0));
|
||||||
|
|
|
@ -509,6 +509,11 @@
|
||||||
type: "text",
|
type: "text",
|
||||||
value: "Bar"
|
value: "Bar"
|
||||||
}).addClass("margin").appendTo(mainPanel);
|
}).addClass("margin").appendTo(mainPanel);
|
||||||
|
$("<br>").appendTo(mainPanel.$element);
|
||||||
|
$("<br>").appendTo(mainPanel.$element);
|
||||||
|
Ox.Input({
|
||||||
|
type: "textarea"
|
||||||
|
}).width(400).height(200).addClass("margin").appendTo(mainPanel);
|
||||||
|
|
||||||
//*/
|
//*/
|
||||||
function openDialog() {
|
function openDialog() {
|
||||||
|
|
Loading…
Reference in a new issue