[Laszlo-checkins] r12521 - openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/dhtml
bargull@openlaszlo.org
bargull at openlaszlo.org
Sat Jan 17 12:31:15 PST 2009
Author: bargull
Date: 2009-01-17 12:31:13 -0800 (Sat, 17 Jan 2009)
New Revision: 12521
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js
Log:
Change 20090103-bargull-XZh by bargull at dell--p4--2-53 on 2009-01-03 18:03:13
in /home/Admin/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: newlines aren't printed in IE
New Features:
Bugs Fixed: LPP-7550, LPP-7646
Technical Reviewer: ptw
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Also replace the html-entities for \n to <br /> so that newlines will show up in IE.
Update: fix issues listed in LPP-7646
Tests:
see bugreport
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js 2009-01-17 20:29:00 UTC (rev 12520)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js 2009-01-17 20:31:13 UTC (rev 12521)
@@ -10,6 +10,9 @@
*/
var DebugWindow = null;
+ /** @access private */
+ var __reNewline = RegExp('
|
| |\\n', 'g');
+
function LzDHTMLDebugConsole () {
super();
// But not in Rhino
@@ -29,15 +32,15 @@
function createDebugIframe() {
if (! this.DebugWindow) {
- debugurl = lz.embed.options.resourceroot + 'lps/includes/laszlo-debugger.html'
+ var debugurl = lz.embed.options.resourceroot + 'lps/includes/laszlo-debugger.html';
var iframe = document.createElement('iframe');
- lz.embed.__setAttr(iframe, 'id', 'LaszloDebugger')
- lz.embed.__setAttr(iframe, 'name', 'LaszloDebugger')
- lz.embed.__setAttr(iframe, 'src', debugurl)
- lz.embed.__setAttr(iframe, 'width', '100%')
- lz.embed.__setAttr(iframe, 'height', '200')
+ lz.embed.__setAttr(iframe, 'id', 'LaszloDebugger');
+ lz.embed.__setAttr(iframe, 'name', 'LaszloDebugger');
+ lz.embed.__setAttr(iframe, 'src', debugurl);
+ lz.embed.__setAttr(iframe, 'width', '100%');
+ lz.embed.__setAttr(iframe, 'height', '200');
var y = canvas.height - 200;
- lz.embed.__setAttr(iframe, 'style', 'position:absolute;z-index:10000000;top:' + y + 'px;')
+ lz.embed.__setAttr(iframe, 'style', 'position:absolute;z-index:10000000;top:' + y + 'px;');
canvas.sprite.__LZdiv.appendChild(iframe);
this.DebugWindow = window.frames['LaszloDebugger'];
}
@@ -53,8 +56,8 @@
var span = dwd.createElement('span');
var dwdb = dwd.body;
// IE does not display \n in white-space: pre, so we translate...
- span.innerHTML = '<span class="OUTPUT">' + str.split('\n').join('<br />') + '</span>';
- console.log('addHTMLText',dwdb, str, span);
+ span.innerHTML = '<span class="OUTPUT">' + str.replace(this.__reNewline, '<br />') + '</span>';
+ //console.log('addHTMLText',dwdb, str, span);
dwdb.appendChild(span);
// Scroll to end
dw.scrollTo(0, dwdb.scrollHeight);
More information about the Laszlo-checkins
mailing list