From fb4482afe66b54c94d33a4c6bd49faee9295b80f Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 2 Dec 2014 22:37:15 +0000 Subject: [PATCH] Some more width for custom field textboxes so they're not so small --- etemplate/js/et2_widget_textbox.js | 6 +++++- etemplate/templates/default/etemplate2.css | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/etemplate/js/et2_widget_textbox.js b/etemplate/js/et2_widget_textbox.js index 2cb0509f26..8e4a6376a8 100644 --- a/etemplate/js/et2_widget_textbox.js +++ b/etemplate/js/et2_widget_textbox.js @@ -176,7 +176,11 @@ var et2_textbox = et2_inputWidget.extend( * @param _size Rather arbitrary size units, approximately characters */ 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.input.attr("size", this.size); diff --git a/etemplate/templates/default/etemplate2.css b/etemplate/templates/default/etemplate2.css index c8f0125267..1b6daeac45 100644 --- a/etemplate/templates/default/etemplate2.css +++ b/etemplate/templates/default/etemplate2.css @@ -440,7 +440,7 @@ action buttons, left aligned for "extra" controls .et2_customfield_list { width: 100%; } -.et2_customfield_list input { +.et2_customfield_list input, .et2_customfield_list textarea { max-width: 100ex; } /* Custom field list inside nextmatch rows gets an icon for each row */