Commit graph

11 commits

Author SHA1 Message Date
Brad Jorsch e878314048 Handle session loss in the console
If the session data gets lost, the console forgets the content and
previous commands. Detect this situation and handle it.

Change-Id: I82fb5e111c09091d4f9a87d2e1b1c245eced1420
2013-02-11 13:23:10 -05:00
Brad Jorsch 49ec3cee05 Fix title passed to API scribunto-console
The title should be passed with the proper namespace.

Change-Id: If63ebd707420ca600590f38b29d0e3c839b1f1b6
2013-02-07 12:37:14 -05:00
Tim Starling d5bd1102d0 Fixed transmission of \0 from Lua standalone
* string.format() truncates the string at a null character, causing a
  deadlock when Lua attempts to send null characters to PHP. Use
  concatenation instead.
* Added test.
* Fixed an error reporting issue in the console, which I happened to
  notice at the same time as the above bug.

Change-Id: I2e6061a04512557492bffbd04bc09ca3bc1d80d6
2012-12-03 17:46:11 +11:00
Siebrand Mazeland ce27d6eefc Reformat JavaScript and CSS code.
Change-Id: Id5630bacfbc97ace3d2c68b69403b463eb6b5e87
2012-10-07 16:13:39 +02:00
Siebrand Mazeland 7e43f640a6 Tweaks and fixes suggested by JSHint/JSLint.
Change-Id: Ia2e089dba787fafbd48e27a3da197dec328c5181
2012-10-07 02:36:28 +02:00
Siebrand 39cb7bcdfb Merge "(bug 39364) Fix for Code Editor directionality" 2012-08-15 13:30:32 +00:00
Amir E. Aharoni b70f8a064e Fix console directionality
Add dir="ltr" and lang="en" to the console element.

Change-Id: I73e6e35d2045dc4a7af7ab16799d4e0f06af0bec
2012-08-15 12:16:43 +03:00
Amir E. Aharoni 8be497e27a (bug 39364) Fix for Code Editor directionality
Added /* @noflip */ direction: ltr to the ace_editor class.

Change-Id: I29403409c2cef0266db8effbdd63a1311cf0749c
2012-08-15 12:14:50 +03:00
Tim Starling b5c36bad59 Debug console module
* Added a debug console to the edit page, allowing unsaved modules to be
  tested.
* Removed the "preview" button from the edit page.
* Only show the "ignore code errors" checkbox on module edit pages, not
  all edit pages.
* Added Lua function mw.log() for sending messages to the debug log.

Change-Id: Ia51f439e573a1deb5b83f94ddd1a86792d5569c1
2012-07-14 14:35:55 +10:00
Tim Starling 886c6ae06d Don't open multiple error dialogs
If a Scribunto error dialog is open and the user clicks another error,
or the same error again, don't open another dialog window, instead close
the old one and reuse it.

Change-Id: I50b8d48ee551cfb8cb4e1e672a0e36e15b5ae216
2012-05-26 16:00:05 +04:00
Tim Starling da06273ede Nicer errors with backtraces etc.
* Added error backtrace collection to MWServer:handleCall()
* When there is an error on parse, show a short and simple inline error
  message to the user, which when clicked, expands to a full error with
  HTML-formatted backtrace.
* When an error is encountered during module validation, have the code
  editor jump directly to the line. Requires r115011.
* Expose the code location of most errors to Scribunto, by parsing the
  standard error message format.
* During module validation, abbreviate the error location if the error
  is in the same module.
* Do not execute the module during validation, just parse it. Execution
  does not really work without an active parse operation in progress.
  It already caused a fatal error if you called require() from the main
  chunk, and problems would have become more visible as more
  parser-related APIs were added.
* LuaSandbox does not yet provide backtraces, but this is planned.

Change-Id: Id9f6564a41b310792b3fe3ebb527cbf8f8771bd1
2012-04-23 21:58:30 +10:00