Commit Graph

616 Commits

Author SHA1 Message Date
Brian E. Granger
d0c445a63c Merge pull request #1386 from ellisonbg/jsd3
Adding Javascript output handling to the notebook.
2012-02-09 17:47:36 -08:00
Min RK
6b2cb224cd Merge pull request #1353 from takluyver/i1345
Save notebook as script using unicode file handle.

Using io.open(), which is the Python 3 open() in 2.6 and above.

Closes #1345
2012-02-08 15:14:47 -08:00
Brian Granger
6c9a7d0d41 Fixing Cell menu to update cell type select box. 2012-02-07 12:02:54 -08:00
Brian Granger
5ef2e06a42 Javascript output is not run on notebook loading and paste's. 2012-02-07 09:18:23 -08:00
Brian Granger
893572d3ad Wired up the javascript display protocol using eval. 2012-02-07 08:57:06 -08:00
Brian E. Granger
cd0810ee25 Merge pull request #1370 from minrk/draft76
allow draft76 websockets (Safari)
2012-02-06 10:59:13 -08:00
Brian E. Granger
b3fb9c474b Merge pull request #1368 from minrk/asciipatterns
Ensure handler patterns are str, not unicode
2012-02-06 10:51:39 -08:00
MinRK
8cfd9dcf6e allow draft76 websockets (Safari)
Safari still uses draft76, and Tornado 2.2.0 release disables the
access from the draft version by default for security reasons.
This simply sets the tornado flag to True, so we can continue
to support Safari until it upgrades to the RFC 6455 implementation.
2012-02-02 22:31:42 -08:00
MinRK
7607bb6a5b Ensure handler patterns are str, not unicode
Python < 2.6.5 doesn't accept unicode keys in f(**kwargs), and
base_project_url will always be unicode, which will in turn
make the patterns unicode, and ultimately result in unicode
keys in kwargs to handler._execute(**kwargs) in tornado.
This enforces that base_project_url be ascii in that situation.

Note that the URLs these patterns check against are escaped,
and thus guaranteed to be ASCII: 'héllo' is really 'h%C3%A9llo'.

If you actually use u'héllo' in your regex, it will not match the URLs
you think it should.
2012-02-02 15:18:54 -08:00
Brian Granger
f387e52610 Proper error handling for nbformat versions in client code.
1. Users are warned when an older nbformat notebook is converted.
2. The notebook notifies the user when a notebook that is too new
   is attempted to load.

To test these things, create a simple notebook. Then change its
nbformat field by hand to 2 (to test 1) and then 4 (to test 2).
2012-02-01 15:46:14 -08:00
Brian Granger
1ffb5ff262 Making keyboard shortcut for showing line numbers consistent. 2012-02-01 14:43:58 -08:00
Brian Granger
f9ce3fa493 Fixing #1337. Tooltip stops TAB from being handled by others.
Pressing TAB to get the tooltip "range(TAB" was inserting a TAB.
To get rid of this we are now telling CodeMirror to ignore it
and also stopping the event from bubbling up the DOM.
2012-02-01 10:26:07 -08:00
Brian Granger
e5bc1eef59 Fixing Shift-Enter bug in text cells.
Hitting Shift-Enter on an already rendered text cell should simply
move past it. It was causing the cell to enter edit mode. This
is not fixed.
2012-02-01 09:57:23 -08:00
Brian Granger
4ae865a988 Fixing #1348 to allow Ctrl-M M to work w/o releasing Ctrl. 2012-02-01 09:50:56 -08:00
Brian Granger
e59f95376d Major refactoring of saving, notification.
* Refactored the save widget so that the notebook doesn't depend
  on it.  Now the notebook emits events and the save widget
  observes those events.
* Created a new event system for all IPython events (events.js).
  We should start to use this to allow our classes to be loosely
  coupled.
* Created a new notification widget that should be used for all
  notifications. Uses new event system.
* Removed the kernel status widget.
* All kernel status message use new event/notification system.
* The print notebook view works again.
2012-01-31 21:42:01 -08:00
Brian E. Granger
241e65b5c1 Merge pull request #1347 from Carreau/fixes-1243
Fix weird magic completion in notebook.  Closes #1243.
2012-01-30 15:22:03 -08:00
Brian E. Granger
96e5089d5d Merge pull request #1346 from astraw/alternate-url-fixups
fixups for alternate URL prefix stuff
2012-01-30 15:16:15 -08:00
Brian Granger
d7efc05572 Removing extra refresh in PlaintextCell. 2012-01-30 14:54:26 -08:00
Brian Granger
bdd17da81d Fixing minor bugs in nbformat and saving.
* json separator is not ',' to avoid adding extra space at EOL.
* vs used throughout nbformat.current.
* Cell collapse is properly loaded from notebook.
2012-01-30 14:20:54 -08:00
Thomas Kluyver
abd3989bb6 Specify UTF-8 encoding for saving notebook as script. 2012-01-30 21:48:05 +00:00
Thomas Kluyver
53b10b861c Save notebook as script using unicode file handle.
Closes gh-1345
2012-01-30 21:43:48 +00:00
Brian Granger
a00fc0165b Heading/plaintext cells now wired up to toolbar UI. 2012-01-30 12:08:36 -08:00
Brian Granger
2f88004a05 Updating JS part of plaintext cell handling. 2012-01-30 11:50:04 -08:00
Brian Granger
fd3d5edb66 Finishing first draft of RST and heading cells. 2012-01-30 11:50:03 -08:00
Brian Granger
f65adcf33e Adding new HeadingCell. 2012-01-30 11:50:03 -08:00
Brian Granger
47e4e1e2c4 A first go at RST cell support in the notebook. 2012-01-30 11:50:03 -08:00
Andrew Straw
ee9da32b05 use full URL when using alternate URL prefix 2012-01-30 07:19:33 +01:00
Andrew Straw
332fdf662c let websocket server be traited config option 2012-01-29 07:29:33 +01:00
Andrew Straw
bd7f1f941c allow setting base_project_url and base_kernel_url to non-default values 2012-01-29 07:29:33 +01:00
Andrew Straw
c706d6ed99 bugfix: use baseProjectUrl when re-writing URL in address bar 2012-01-29 07:29:33 +01:00
Andrew Straw
81a636dabf use Tornado's handler.static_url() in templates 2012-01-29 07:29:33 +01:00
Fernando Perez
5067e77292 Merge pull request #1334 from fawce/keycuts
Make Control-S (or Cmd-S on Apple) save the actual notebook instead of bringing up the useless 'save as html' dialog.  This doesn't disable the C-m-s keybinding, simply adds the far more familiar and common C-s.
2012-01-28 16:39:06 -08:00
Brian Granger
1ed9a21039 Adding "Cell" to cell related Edit actions. 2012-01-27 16:16:22 -08:00
Brian Granger
9b723324db Wired the rest of the toolbar buttons up to actions. 2012-01-27 13:54:37 -08:00
Brian Granger
428c82877f Further work on the toolbar UI.
* Cell type selection box is wired up and styled.
* New View menu that allows toolbar/header to be toggled.
2012-01-27 13:45:43 -08:00
Brian Granger
4c88c4686c First draft of toolbar.
We are adding a thin horizontal toolbar below the menubar. This
commit adds the basic UI elements. Still need to hook up the actions
and make this hidable.
2012-01-27 12:31:28 -08:00
fawce
a53def4a49 fixed missing return for keybinding 2012-01-27 14:49:39 -05:00
fawce
6120c07c4d added key handler for control-s to notebook, seems to work pretty well 2012-01-27 14:18:48 -05:00
Thomas Kluyver
717285060e Use explicit for loop to find section in testing. 2012-01-27 11:16:35 +00:00
Thomas Kluyver
4b51bacbb2 Don't raise errors from coverage post-processing. 2012-01-27 01:16:46 +00:00
Thomas Kluyver
93a8b9d215 Use separate option --with-xml-coverage to ask for coverage xml output. 2012-01-27 01:16:46 +00:00
Thomas Kluyver
24af9ac298 Use standard command for coverage. 2012-01-27 01:16:46 +00:00
Thomas Kluyver
e29d417931 Produce coverage xml reports from subprocess test runners. 2012-01-27 01:16:46 +00:00
Min RK
125dc8cb74 Merge pull request #1206 from minrk/fixConsole
The notebook js transforms ANSI-escaped text to HTML.  The transformed HTML was previously persisted to ipynb files, rather than the true output.  This has been fixed, and notebooks with ANSI-colored output will need to be re-run for colored output (tracebacks) to be displayed correctly after this change.
2012-01-26 17:14:29 -08:00
Fernando Perez
df7d91f30a Add linewrapping to text cells (new feature in CodeMirror). 2012-01-25 22:17:12 -08:00
Fernando Perez
ef1cc56996 Merge pull request #1327 from ellisonbg/updatecm2
Updating CodeMirror to the latest dev master. 

We had found a bug in CodeMirror that was forcing us to call refresh/focus/refresh on Firefox. This bug was fixed upstream. This PR pull in the latest CM with the bug fix and removes the extra refresh calls. All known CM bugs should be fixed, yeh!
2012-01-25 22:16:13 -08:00
Fernando Perez
219ba77482 Merge pull request #1326 from ellisonbg/removeace
Removing Ace edit capability.

We have fixed some of the problems with CodeMirror and feel that
the differences between Ace and CodeMirror are not great enough
to justify having both. We may reintroduce a full-window edit
mode using CodeMirror, but that will come separately.
2012-01-25 20:30:36 -08:00
Fernando Perez
1d5c57d6c9 Remove debug print statement left over from PR #1316. 2012-01-25 19:43:14 -08:00
Brian Granger
0bc0c560aa Removing extra refresh that is no longer needed because of CM fix. 2012-01-25 14:03:49 -08:00
Brian Granger
262d73f652 Updating CodeMirror to latest to incorporate bug fixes. 2012-01-25 13:46:48 -08:00