Set textarea to get height from rows attribute, some better styling so they are not so small

This commit is contained in:
Nathan Gray 2014-12-08 16:06:09 +00:00
parent fce211850a
commit 906a5b442e
2 changed files with 6 additions and 2 deletions

View File

@ -182,7 +182,11 @@ var et2_textbox = et2_inputWidget.extend(
* @param _size Rather arbitrary size units, approximately characters * @param _size Rather arbitrary size units, approximately characters
*/ */
set_size: function(_size) { set_size: function(_size) {
if (typeof _size != 'undefined' && _size != this.input.attr("size")) if (this.options.multiline || this.options.rows > 1 || this.options.cols > 1)
{
this.input.css('width', _size + "em");
}
else if (typeof _size != 'undefined' && _size != this.input.attr("size"))
{ {
this.size = _size; this.size = _size;
this.input.attr("size", this.size); this.input.attr("size", this.size);

View File

@ -440,7 +440,7 @@ action buttons, left aligned for "extra" controls
.et2_customfield_list { .et2_customfield_list {
width: 100%; width: 100%;
} }
.et2_customfield_list input { .et2_customfield_list input, .et2_customfield_list textarea {
max-width: 100ex; max-width: 100ex;
} }
/* Custom field list inside nextmatch rows gets an icon for each row */ /* Custom field list inside nextmatch rows gets an icon for each row */