summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-04-19 19:34:27 +0200
committerJo-Philipp Wich <jo@mein.io>2020-04-20 09:44:14 +0200
commitacae1378a80ca0f87ec3f29de585a6b6328a2c64 (patch)
tree87b4237f3b8137d2a3038235d0c39a65c8d59e36 /modules
parent4e8d309cf16a4e8f823a7bf1fe34532267d0f54c (diff)
luci-base: ui.js: fix textarea width
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/ui.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/ui.js b/modules/luci-base/htdocs/luci-static/resources/ui.js
index 4219932b9..50410762f 100644
--- a/modules/luci-base/htdocs/luci-static/resources/ui.js
+++ b/modules/luci-base/htdocs/luci-static/resources/ui.js
@@ -444,7 +444,8 @@ var UITextarea = UIElement.extend(/** @lends LuCI.ui.Textarea.prototype */ {
/** @override */
render: function() {
- var frameEl = E('div', { 'id': this.options.id }),
+ var style = !this.options.cols ? 'width:100%' : null,
+ frameEl = E('div', { 'id': this.options.id, 'style': style }),
value = (this.value != null) ? String(this.value) : '';
frameEl.appendChild(E('textarea', {
@@ -454,7 +455,7 @@ var UITextarea = UIElement.extend(/** @lends LuCI.ui.Textarea.prototype */ {
'readonly': this.options.readonly ? '' : null,
'disabled': this.options.disabled ? '' : null,
'placeholder': this.options.placeholder,
- 'style': !this.options.cols ? 'width:100%' : null,
+ 'style': style,
'cols': this.options.cols,
'rows': this.options.rows,
'wrap': this.options.wrap ? '' : null