very basic textarea support

This commit is contained in:
Rolux 2010-02-26 14:22:27 +01:00
parent 0345cb2320
commit d545069891
4 changed files with 30 additions and 5 deletions

View File

@ -103,7 +103,8 @@ Forms
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)));
}
.OxThemeClassic input.OxInput:focus {
.OxThemeClassic input.OxInput:focus,
.OxThemeClassic textarea.OxInput:focus {
border: 1px solid rgb(160, 160, 160);
-moz-box-shadow: 0 0 2px rgb(128, 128, 128);
-webkit-box-shadow: 0 0 2px rgb(128, 128, 128);

View File

@ -138,7 +138,8 @@ Forms
================================================================================
*/
input {
input,
textarea {
padding: 0;
border: 1px;
margin: 0;
@ -152,7 +153,8 @@ input[type=submit] {
input[type=image] {
cursor: default;
}
input:focus {
input:focus,
textarea:focus {
outline: none;
}
/*
@ -214,12 +216,18 @@ input[type=image].OxSmall {
input::-moz-focus-inner {
border: none;
}
textarea {
margin: -1px 0 0 -1px;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
}
.OxButton.OxSymbol,
.OxButton.OxSymbol:active,
.OxButton.OxSymbol:focus {
border: 1px solid rgba(0, 0, 0, 0);
background: 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 {
float: left;
margin: -1px -1px 0 -1px;
}
textarea.OxInput {
}
/*
--------------------------------------------------------------------------------

View File

@ -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));

View File

@ -509,6 +509,11 @@
type: "text",
value: "Bar"
}).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() {