forked from extern/egroupware
Fixed textbox cols/rows always being set to 1
This commit is contained in:
parent
5af5594f60
commit
fcff01e3cc
@ -41,13 +41,13 @@ var et2_textbox = et2_inputWidget.extend({
|
|||||||
"rows": {
|
"rows": {
|
||||||
"name": "Rows",
|
"name": "Rows",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"default": 1,
|
"default": -1,
|
||||||
"description": "Multiline field height - better to use CSS"
|
"description": "Multiline field height - better to use CSS"
|
||||||
},
|
},
|
||||||
"cols": {
|
"cols": {
|
||||||
"name": "Size",
|
"name": "Size",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"default": 1,
|
"default": -1,
|
||||||
"description": "Multiline field width - better to use CSS"
|
"description": "Multiline field width - better to use CSS"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -63,9 +63,17 @@ var et2_textbox = et2_inputWidget.extend({
|
|||||||
createInputWidget: function() {
|
createInputWidget: function() {
|
||||||
if (this.options.multiline || this.options.rows > 1 || this.options.cols > 1)
|
if (this.options.multiline || this.options.rows > 1 || this.options.cols > 1)
|
||||||
{
|
{
|
||||||
this.input = $j(document.createElement("textarea"))
|
this.input = $j(document.createElement("textarea"));
|
||||||
.attr("rows", this.options.rows)
|
|
||||||
.attr("cols", this.options.cols);
|
if (this.options.rows > 0)
|
||||||
|
{
|
||||||
|
this.input.attr("rows", this.options.rows);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.options.cols > 0)
|
||||||
|
{
|
||||||
|
this.input.attr("cols", this.options.cols);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user