luci-base: ui.js: fix textarea width
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
4e8d309cf1
commit
acae1378a8
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue