forked from extern/egroupware
Change newlines to <br /> in read-only text to preserve multi-line data.
This commit is contained in:
parent
d2031034f1
commit
059e82a01b
@ -231,8 +231,16 @@ var et2_textbox_ro = et2_valueWidget.extend([et2_IDetachedDOM],
|
||||
set_value: function(_value) {
|
||||
this.value = _value;
|
||||
|
||||
if(!_value) _value = "";
|
||||
this.span.text(_value);
|
||||
if(!_value)
|
||||
{
|
||||
_value = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
_value = _value.replace(/\n/g,'<br />');
|
||||
}
|
||||
// Use html() or the <br /> gets stripped
|
||||
this.span.html(_value);
|
||||
},
|
||||
/**
|
||||
* Code for implementing et2_IDetachedDOM
|
||||
|
Loading…
Reference in New Issue
Block a user