mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-27 08:19:45 +01:00
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) {
|
set_value: function(_value) {
|
||||||
this.value = _value;
|
this.value = _value;
|
||||||
|
|
||||||
if(!_value) _value = "";
|
if(!_value)
|
||||||
this.span.text(_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
|
* Code for implementing et2_IDetachedDOM
|
||||||
|
Loading…
Reference in New Issue
Block a user