some improvements for textareas with labels
This commit is contained in:
parent
ae1dabc5d6
commit
375b849377
|
@ -217,11 +217,12 @@ input::-moz-focus-inner {
|
|||
border: none;
|
||||
}
|
||||
textarea {
|
||||
padding: 2px 4px 2px 4px;
|
||||
margin: -1px 0 0 -1px;
|
||||
//padding: 2px 4px 2px 4px;
|
||||
padding: 0 4px 0 4px;
|
||||
margin: -1px 0 0 0;
|
||||
resize: none;
|
||||
//-moz-border-radius: 8px;
|
||||
//-webkit-border-radius: 8px;
|
||||
-moz-border-radius: 8px;
|
||||
-webkit-border-radius: 8px;
|
||||
}
|
||||
.OxButton.OxSymbol,
|
||||
.OxButton.OxSymbol:active,
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -517,7 +517,15 @@
|
|||
$("<br>").appendTo(mainPanel.$element);
|
||||
$("<br>").appendTo(mainPanel.$element);
|
||||
Ox.Input({
|
||||
placeholder: "some\ntext",
|
||||
label: "Label",
|
||||
labelWidth: 48,
|
||||
}).width(400).addClass("margin").appendTo(mainPanel);
|
||||
$("<br>").appendTo(mainPanel.$element);
|
||||
$("<br>").appendTo(mainPanel.$element);
|
||||
Ox.Input({
|
||||
label: "Label",
|
||||
labelWidth: 48,
|
||||
//placeholder: "some\ntext",
|
||||
type: "textarea"
|
||||
}).width(400).height(100).addClass("margin").appendTo(mainPanel);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user