From e8ccf84b05fc8c6b0e919248704827941b24f843 Mon Sep 17 00:00:00 2001 From: Heiko Kernbach Date: Thu, 14 Mar 2013 14:26:01 +0100 Subject: [PATCH] fixed print function --- frontend/js/shell/shell2.js | 7 ++++--- frontend/js/views/shellView.js | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/frontend/js/shell/shell2.js b/frontend/js/shell/shell2.js index 9ae8df53bf..68da4ef72c 100644 --- a/frontend/js/shell/shell2.js +++ b/frontend/js/shell/shell2.js @@ -471,9 +471,10 @@ ModuleCache["/internal"] = new Module("/internal"); internal.printShell.apply(internal.printShell, arguments); // flush buffer - $('#shellContent').append('

' - + internal.browserOutputBuffer - + '

'); + //$('#shellContent').append('

' + // + internal.browserOutputBuffer + // + '

'); + jqconsole.Write('==> ' + internal.browserOutputBuffer + '\n', 'jssuccess'); internal.browserOutputBuffer = ""; }; diff --git a/frontend/js/views/shellView.js b/frontend/js/views/shellView.js index 9eac0f2041..2658925a6b 100644 --- a/frontend/js/views/shellView.js +++ b/frontend/js/views/shellView.js @@ -96,13 +96,14 @@ var shellView = Backbone.View.extend({ }, evaloutput: function (data) { try { - var result = eval(data); + var result = eval(data); if (result !== undefined) { print(result); } } catch(e) { - $('#shellContent').append('

Error:' + e + '

'); + //$('#shellContent').append('

Error:' + e + '

'); + jqconsole.Write('ReferenceError: ' + e + '\n', 'jserror'); } }