Commit Graph

4294 Commits

Author SHA1 Message Date
Jessica B. Hamrick
c3c11e5820 Initial version of textbox celltoolbar ui element 2014-09-06 13:34:43 -07:00
Thomas Kluyver
a47575df63 Fix some doc build warnings 2014-09-06 11:35:14 -07:00
Matthias Bussonnier
3dc94d6911 Merge pull request #6419 from takluyver/sort-test-dir-contents
Sort directory contents in test before assertion
2014-09-05 19:35:57 -07:00
Thomas Kluyver
fa6056e9ed Sort directory contents in test before assertion
Should fix recent test failures, but I can't replicate failure on my
computer, so it's not clear that it's fixed.
2014-09-05 18:44:58 -07:00
Fernando Perez
a5fd908b28 Merge pull request #6408 from minrk/new-cell-code
make default cell type configurable
2014-09-05 18:41:35 -07:00
MinRK
6cee444630 make default cell type configurable
- adds IPython.notebook.default_cell_type
- default is 'code' (matching IPython 2.0)
- special heuristic values include:
  - 'selected': default to selected cell (current master behavior)
  - 'above': default to cell above
  - 'below': default to cell below
2014-09-05 11:28:00 -07:00
Matthias BUSSONNIER
186c8ae41d remove useless comment 2014-09-05 11:14:37 -07:00
Matthias BUSSONNIER
a9b4bdc03f Move md-cell display logic to css 2014-09-05 11:03:48 -07:00
Thomas Kluyver
b2737e668e Add tests and fix some issues
Tests taken from #6360
2014-09-05 10:16:37 -07:00
Thomas Kluyver
0e109ee4be Correct comment 2014-09-05 09:40:02 -07:00
MinRK
dbe65d0cd5 remove unused TreeRedirectHandler 2014-09-04 17:40:48 -07:00
MinRK
379374b5d9 make the default url customizable
this is the page redirected to from `/`,
which defaults to `/tree`.

also changes the redirect code to 302 from 301,
which should cause less grumbling about caching.
2014-09-04 17:40:48 -07:00
Thomas Kluyver
7e681c1c53 Merge pull request #6302 from minrk/ws-heartbeat-timeout
close websocket connections on ping/pong timeout
2014-09-04 15:21:25 -07:00
Matthias Bussonnier
df67bd1720 Merge pull request #6406 from minrk/celltoolbar-rendered
don't hide cell toolbar on rendered text cells
2014-09-04 15:19:59 -07:00
Thomas Kluyver
ca8dabf705 Fix 404 error when accessing nonexistant session 2014-09-04 15:13:59 -07:00
Thomas Kluyver
4c4af25734 Fix failure message for tests 2014-09-04 15:13:59 -07:00
Thomas Kluyver
76b05b24af Handle sessions where the kernel has been killed 2014-09-04 15:13:59 -07:00
Thomas Kluyver
81b06d81a1 Merge pull request #6358 from minrk/contents-missing
fix directory listing with broken symlinks
2014-09-04 14:43:45 -07:00
MinRK
78fdc1ebb4 move mergeopt to utils
from Cell
2014-09-04 11:15:45 -07:00
MinRK
6038612732 don't hide cell toolbar on rendered text cells
because it annoys @Carreau
2014-09-03 17:08:55 -07:00
Matthias Bussonnier
9e8cf39956 Merge pull request #6258 from patricktokeeffe/patch-1
Update custom.js
2014-09-03 10:53:24 -07:00
Min RK
aaa027f503 Merge pull request #6267 from Carreau/less-jq-ui
Remove some jquery-UI classes.
2014-09-02 19:35:45 -07:00
Matthias BUSSONNIER
7752320295 get rid of some jq-ui- style 2014-09-02 17:47:59 -07:00
Min RK
8a0773fd84 Merge pull request #6290 from takluyver/deprecate-rmagic
Deprecate rmagic
2014-09-02 17:16:13 -07:00
Min RK
fbae96f9cb Merge pull request #6269 from takluyver/atomic-save
Implement atomic save
2014-09-02 10:59:38 -07:00
MinRK
58ecfc2376 catch any exception while waiting to connect
requests 2.4 changed the exception type for a failed connection
2014-08-31 21:50:16 -07:00
Brian E. Granger
a67c7e83a6 Adding tests and limiting CM mode to python 3. 2014-08-29 09:55:40 -04:00
Brian E. Granger
2dfd4079ec Cleaning up and only doing latex completion for python 3. 2014-08-28 21:50:26 -04:00
Brian E. Granger
27f2f6baaa Adding regexp for unicode identifers to CM mode. 2014-08-28 21:42:04 -04:00
Jason Grout
2acee4a269 Strip the IPY_MODEL_ prefix from widget IDs before referencing them. 2014-08-28 19:52:20 +00:00
Jonathan Frederic
2f9dcb852c Fab CSS 2014-08-28 11:15:35 -07:00
Jonathan Frederic
cb9014e42c Fixed rebase bugs and other bugs. 2014-08-28 11:15:35 -07:00
Jonathan Frederic
fa1c6f93f1 Added bootstrap3 progress bar classes 2014-08-28 11:15:35 -07:00
Jonathan Frederic
9b4d19bad7 Added Bootstrap specific classes,
and fixed a few bugs here and there...
2014-08-28 11:15:35 -07:00
Jonathan Frederic
a0e70e350f Fix some bugs found by the widget examples,
add margin and padding base traits,
add overflow traits to box base.
2014-08-28 11:15:24 -07:00
Jonathan Frederic
834fe2d044 Fab CSS 2014-08-28 11:11:16 -07:00
Jonathan Frederic
42cc27e1f5 Finished style attributes. 2014-08-28 11:09:55 -07:00
Jonathan Frederic
fdcf263965 Partial implementation of styles 2014-08-28 11:09:55 -07:00
Jonathan Frederic
9af77a6374 Initial crack at using specific traits for styling. 2014-08-28 11:09:55 -07:00
Jonathan Frederic
1797243f7a Fix tests 2014-08-28 11:09:55 -07:00
Jonathan Frederic
f85a01041c Remove add/remove class methods,
Remove helper set/get css methods
2014-08-28 11:09:55 -07:00
Paul Ivanov
78918ba827 Merge pull request #6359 from minrk/build-css
build css
2014-08-28 10:35:02 -07:00
Paul Ivanov
583fc21488 Merge pull request #6371 from minrk/dashboard-test-quickfix
minor fixes in dashboard tests
2014-08-28 10:34:01 -07:00
MinRK
fb0421107c minor fixes in dashboard tests
events and regular expressions weren't quite right, which could cause occasional test failures.
2014-08-27 13:51:49 -07:00
MinRK
6345b6c874 fix handling of no-checkpoint-defined
a few typos and missing handling of undefined checkpoint

regression introduced in #6205
2014-08-27 13:17:19 -07:00
Min RK
89f5ec3677 Merge pull request #6306 from coderforlife/master
Minor improvements to file upload.
2014-08-26 17:22:45 -07:00
MinRK
318d46d647 build css
looks like a recent PR didn't have a final render of the LESS
2014-08-26 09:33:14 -07:00
MinRK
819c3c326c fix directory listing with broken symlinks
directory listing would 404 if any listed file doesn't exist
(e.g. symlink to missing target).

Previously-failing test included.
2014-08-26 09:12:54 -07:00
Gordon Ball
859e9f5261 Change from on_demand kwarg to interact_choose function 2014-08-26 10:37:32 +02:00
Gordon Ball
8296f24904 Merge master 2014-08-26 10:25:38 +02:00
Jonathan Frederic
cf0ca9d4a5 Merge pull request #6050 from chronitis/interact-range-widgets
Range widgets
2014-08-25 21:40:21 -07:00
Jonathan Frederic
1b29be13c6 Merge pull request #6332 from jasongrout/widget-property-lock
Widget property lock should compare json states, not python states
2014-08-25 10:12:04 -07:00
Gordon Ball
9383822d7a Clean up validation in __init__ 2014-08-24 12:26:56 +02:00
Gordon Ball
a096d01310 Test case for setting only lower or upper, no sensible default so should be an error 2014-08-24 12:26:02 +02:00
Gordon Ball
a12b1a50a9 Change range trait to _range 2014-08-24 11:48:19 +02:00
Gordon Ball
1a8b77231e Remove errant tabs from js 2014-08-24 11:32:03 +02:00
Matthias Bussonnier
77ec6fdfa2 Merge pull request #6205 from Carreau/momentjs
use momentjs for nicer dates
2014-08-23 22:19:08 +02:00
Brian E. Granger
9e16415907 Initial messing around.
Latex tab completion will have to be done outside the normal
completer logic as the completer line splitting logic uses
\\ as a special character to split lines on. I probably want
to put the latex completions first and it if finds any matches,
don't do any other completion logic. The only issue is that might
short circuit dir/path matching on windows. Hmmm.
2014-08-22 17:28:13 -04:00
Gordon Ball
b8c0afbb55 Merge master 2014-08-22 10:19:03 +02:00
Brian E. Granger
4b22230896 Merge pull request #6305 from minrk/switch-kernel-close-ws
JS: close WebSockets when killing kernels
2014-08-20 17:38:46 -04:00
Brian E. Granger
94f717781d Merge pull request #6125 from jdfreder/flex
Embrace the flexible box model in the widgets
2014-08-20 14:15:22 -04:00
Jonathan Frederic
62bd36bcc9 s/that/this bug 2014-08-20 09:34:25 -07:00
Jonathan Frederic
be3ba35736 Fix typo in deprecated class name. 2014-08-20 09:34:05 -07:00
Gordon Ball
8838762b30 Remove a rogue print statement 2014-08-20 16:49:52 +02:00
Gordon Ball
08895738f2 Merge master 2014-08-20 16:44:58 +02:00
Gordon Ball
05f07f1f71 Add a number of extra tests for the range widgets 2014-08-20 16:25:53 +02:00
Gordon Ball
2be045fe25 Support both value tuple and upper, lower traits for both int and float widgets 2014-08-20 16:25:33 +02:00
Jonathan Frederic
8877d32c4e Merge pull request #6194 from SylvainCorlay/immediate-widget-comm
Allow model id to be set externally on creation of the widget.
2014-08-19 14:33:03 -07:00
Jonathan Frederic
ed593f02f1 Merge pull request #6171 from tarzzz/slider-value-validate
Validate slider value, when limits change
2014-08-18 20:03:14 -07:00
MinRK
d5a4553b8e improve indicators and handling of dead kernels and broken websocket connections
I think it's still possible to get to a state with no kernel and insufficient indication.
Imperfect, but an improvement.
2014-08-18 10:50:25 -07:00
MinRK
7ee8403ed8 allow slash in root->tree redirect
before #6117, only `/base_url/` worked,
after #6117, only `/base_url worked,
after this PR, both should work.
2014-08-18 10:47:20 -07:00
Jason Grout
0e5ceca059 Make the widget property_lock store the JSON state, not the original object
Comparison between arbitrary python objects can get crazy, whereas we really
only care about if the JSON state we are syncing is different.  So with this change,
we store and check against the JSON state.
2014-08-18 17:28:07 +00:00
MinRK
568034c349 use write_error instead of get_error_html
get_error_html is removed in tornado 4.0
2014-08-15 13:41:13 -07:00
Jonathan Frederic
2790684a17 Fixed typo 2014-08-15 10:41:43 -07:00
Jonathan Frederic
a12b302597 renamed: widget_container.js -> widget_box.js 2014-08-15 10:37:46 -07:00
Jonathan Frederic
afdba2fd47 Fix logic, use box where applicable 2014-08-15 10:14:04 -07:00
Jonathan Frederic
9b5ece6661 Make popup inherit from widget box 2014-08-14 16:09:50 -07:00
Jonathan Frederic
371b12a9b0 Fab CSS 2014-08-14 15:53:13 -07:00
Jonathan Frederic
0aca365718 Address Sylvain's comments. 2014-08-14 15:51:41 -07:00
Tarun Gaba
258b888835 added 'var' 2014-08-15 02:59:28 +05:30
Tarun Gaba
dda92ff7ea Removed another stray alertO 2014-08-15 02:21:53 +05:30
Tarun Gaba
825186c868 Removed alert statement! 2014-08-15 02:19:26 +05:30
Tarun Gaba
539596bcdd adressed @jdfrederer's concern! 2014-08-15 02:18:38 +05:30
Jonathan Frederic
690059f8f8 Merge pull request #6296 from jasongrout/sync-hold
Add a new context manager, Widget.hold_sync(), which holds any syncing until the manager exits
2014-08-14 12:45:19 -07:00
Jeffrey Bush
f141a6926a File list refreshes no longer move the upload filename boxes.
The new file list is always placed after the upload filename boxes. I also removed the autorefresh guards against refreshing while having an upload box since this is no longer a problem.
2014-08-13 23:58:20 -07:00
Jeffrey Bush
1f68e22486 Fixed many edge cases in file uploads.
When there is an error reading a file, a message is shown (I could reproduce this easily by dragging a folder onto the list), added a missing "return false;" after an illegal notebook was detected, and we prevent no-name files and files starting with dots (which will not be visible in dashboard and automatically overwritten).
2014-08-13 22:55:53 -07:00
MinRK
0909694b50 avoid race condition when deleting/starting sessions
javascript doesn't guarantee the order of AJAX requests,
so we give `Session.delete` and `Kernel.kill` a callback signature.

Changing the kernel type calls `Notebook.start_kernel`,
which terminates the previous session, if defined,
before starting the new one.

A flag is stored, to prevent multiple simultaneous attempts to start sessions, raising a SessionAlreadyStarting Error,
preventing the spec_changed event from firing.
2014-08-13 22:11:32 -07:00
Jeffrey Bush
305c734830 Uploading a file with a name that already exists asks the user if they want to overwrite.
This is not perfect (it doesn't check against the real filesystem but the current list in the browser which may be stale) but it is better than nothing.
2014-08-13 22:07:57 -07:00
MinRK
bd5a88e954 handle undefined or closed zmq_stream in on_message
can happen if a message is waiting in a pipe and the web socket is closed before the message is handled.

And give ZMQChannels a nice repr with their kernel ID
2014-08-13 21:51:52 -07:00
Jeffrey Bush
5fff038965 Added ESC keep to upload textbox to cancel. 2014-08-13 20:57:35 -07:00
Jeffrey Bush
defabcc772 Minor improvements to file upload.
Updated file upload so that the icon of the new upload item reflects if it is a file or notebook, added the ability to use the "Enter" key in the filename text box to cause the upload to happen, and make it so that the list of files refreshes immediately upon successful upload.
2014-08-13 17:16:05 -07:00
MinRK
6d542013a4 add utils.ajax_error_msg for extracting the JSON error message. 2014-08-13 14:40:51 -07:00
MinRK
cb3da26e61 display JSON error message on failed notebook load
if there is one (escaped for safety).
2014-08-13 14:27:12 -07:00
MinRK
e3696996be JS: close WebSockets when killing kernels
by calling Kernel.stop_channels() in Session.delete and Kernel.kill
2014-08-13 14:21:14 -07:00
Jonathan Frederic
2db702fa57 Filenames s/container/box 2014-08-13 13:29:30 -07:00
Jonathan Frederic
d985ee86c6 s/Container/Box 2014-08-13 13:19:27 -07:00
MinRK
b3b168648a close websocket connections on ping/pong timeout
we recently added ws pings for keep alive,
and we can now use the longs to close dead connections.

This can apparently happen when connections are not closed cleanly,
e.g. on VPNs.

Setting ws_ping_timeout = 0 disables the ping mechanism altogether.
2014-08-13 11:32:25 -07:00
Jonathan Frederic
865fb20c00 Merge pull request #6284 from jasongrout/patch-6
Default view should be the base widget view class
2014-08-12 13:06:59 -07:00
Jason Grout
5cd46788f9 Before syncing a widget's state, check first for the property lock, then for the widget state lock 2014-08-12 18:23:57 +00:00
Jason Grout
af26d9cc24 Add a new context manager, Widget.hold_sync(), which holds any syncing until the manager exits
Sometimes for consistency or efficiency purposes, it makes sense to update
a group of properties all at once.  This context manager makes this possible.

We also fix a bug where send_state was not passing the key on to get_state.
2014-08-12 17:29:41 +00:00
Thomas Kluyver
e60f8bdda1 Merge pull request #6228 from jdfreder/eventful-list-dict
Add EventfulList and EventfulDict trait types.
2014-08-11 18:09:04 -07:00
Sylvain Corlay
f9fa4ada06 allowing widet id to be set externally 2014-08-11 18:36:59 +00:00
Jason Grout
8513f673e3 Make the widget comm attribute more straigtforward
Instead of automagically instantiating a comm when it is accessed, require a call to open().  This makes the comm attribute much less magical, and hopefully more understandable.
2014-08-11 18:36:59 +00:00
Jason Grout
16c366d1b5 Automatically open a comm on creation of widgets
This will immediately create a model on the javascript side when a widget is created.  This means that, for example, a widget that only interacts with its model can work without "displaying" it.
2014-08-11 18:30:26 +00:00
Thomas Kluyver
347e16aa22 No need to check for rpy2 in test machinery 2014-08-11 10:06:31 -07:00
Jonathan Frederic
848c223785 Rebase cleanup 2014-08-08 15:00:22 -07:00
Jonathan Frederic
36721c73c6 Added some doc strings on the widgets.
Also address the comments Matthias left me.
2014-08-08 14:57:51 -07:00
Jonathan Frederic
dbb88f95cd Make HBox and VBox helper functions 2014-08-08 14:57:51 -07:00
Sylvain Corlay
c9ed512d54 adding hbox and vbox
Conflicts:
	IPython/html/static/widgets/js/widget_container.js
	IPython/html/widgets/widget_container.py
2014-08-08 14:57:51 -07:00
Jonathan Frederic
170b13102e Fix interact tests for rename 2014-08-08 14:56:11 -07:00
Jonathan Frederic
ba3033971e Renamed *Widget to *,
depracted old names.
2014-08-08 14:56:11 -07:00
Jonathan Frederic
37f00f73d7 Added baseline and stretch 2014-08-08 14:56:10 -07:00
Jonathan Frederic
6faf86ee77 Embrace flexible box model 2014-08-08 14:56:10 -07:00
Gordon Ball
8c5218b581 Default to 25-75% of min-max if no value is set instead of 0-1 2014-08-07 21:32:25 +02:00
Jason Grout
d64627380b Default view should be the base widget view class 2014-08-07 13:12:15 -04:00
Gordon Ball
ff3f952b18 Merge branch 'master' into interact-range-widgets
Conflicts:
	IPython/html/static/style/ipython.min.css
	IPython/html/static/style/style.min.css
	IPython/html/static/widgets/js/widget_int.js
2014-08-07 17:11:06 +02:00
Paul Ivanov
6162c99028 nbconvert requires mistune
You get a cryptic error message from iptest if mistune is not installed.

Test group: nbconvert
E
======================================================================
ERROR: Failure: AttributeError ('module' object has no attribute 'nbconvert')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 403, in loadTestsFromName
    module = resolve_name(addr.module)
  File "/usr/lib/python2.7/dist-packages/nose/util.py", line 321, in resolve_name
    obj = getattr(obj, part)
AttributeError: 'module' object has no attribute 'nbconvert'

----------------------------------------------------------------------
Ran 1 test in 0.001s

FAILED (errors=1
2014-08-06 15:37:29 -07:00
Jonathan Frederic
6026ef45d2 Merge pull request #6266 from Carreau/fix-lgw-css
fix loginwidget css
2014-08-06 10:56:41 -07:00
patricktokeeffe
c1971e9d42 Update custom.js 2014-08-05 11:19:48 -07:00
Thomas Kluyver
8b7d4c1c2f Rework atomic_writing with tests & docstring 2014-08-05 10:50:09 -07:00
Jonathan Frederic
cffe958e4c s/this/self 2014-08-04 14:22:16 -07:00
Jonathan Frederic
d31655f50a kwarg on_events and hardcoded callbacks 2014-08-04 14:22:16 -07:00
Jonathan Frederic
e4860ae075 Use ternary operator for callback registration 2014-08-04 14:22:16 -07:00
Jonathan Frederic
22e210e981 Added on_events convinience method 2014-08-04 14:22:16 -07:00
Jonathan Frederic
3d6fcc6a60 Address review comments @takluyver 2014-08-04 14:22:16 -07:00
Jonathan Frederic
71ea1459ab Add EventfulList and EventfulDict trait types. 2014-08-04 14:22:16 -07:00
Jonathan Frederic
ba0a805404 Merge pull request #6226 from jasongrout/css-top-default
Remove $el_to_style from the widget javascript code; '' now defaults to this.$el
2014-08-04 13:46:01 -07:00
Thomas Kluyver
04cbce2a14 Implement atomic save
Ping @fperez, this should avoid issues with corrupted/lost notebooks
when the disk is full, though I haven't worked out how to test it just
yet.

Closes gh-6254
2014-08-04 11:22:42 -07:00
Jonathan Frederic
fd50a3228e Merge pull request #6250 from minrk/double-free-widget
avoid unregistering widget model twice
2014-08-04 10:25:46 -07:00
Matthias BUSSONNIER
d1dc31c9de fix loginwidget css 2014-08-03 18:09:35 +02:00
patricktokeeffe
3f79d6dad1 Update custom.js
Explain different semantics required for instances versus functions or classes. Based on comments of @minrk in #5985.
2014-08-01 16:20:50 -07:00
Thomas Kluyver
c15284d716 Merge pull request #6238 from ivanov/cm-heading-fonts
proportional font-size when editing heading cells
2014-08-01 10:03:42 -07:00
Thomas Kluyver
b95de43b97 Merge pull request #6253 from jasongrout/highlighting-bug
Copy codemirror mode configuration instead of changing it
2014-07-31 14:46:55 -07:00
Jason Grout
c80709e5a3 Copy codemirror mode configuration instead of changing it
If we change it, the modified (wrong) mode is saved in the notebook, which
wrecks havoc on highlighting once the notebook is saved and reopened.
2014-07-31 21:25:34 +00:00
Thomas Kluyver
4db6295fba Merge pull request #6249 from minrk/always-https-mathjax
always use HTTPS getting mathjax from CDN
2014-07-31 13:44:37 -07:00
MinRK
09c1354ea7 avoid unregistering widget model twice
widgets are registered when the comm is created;
closing unregisters them. Calling `close` a second time
should be a no-op.
2014-07-31 12:23:03 -07:00
MinRK
b47ddffd42 always use HTTPS getting mathjax from CDN 2014-07-31 12:03:44 -07:00
MinRK
fae77bd133 remove unused project_dir 2014-07-31 11:57:38 -07:00
MinRK
3e79eea46b update contents per further review
- fix is_hidden always returning True on nonexistent files
- create hidden dir fails with 400
- don't read binary files twice
- logging improvements
- dialog on invalid notebook upload
- warn about disabled `--save`
2014-07-31 11:57:38 -07:00
MinRK
fb89646a29 various upload fixes
- recognize 201 as success (dataType must not be 'json')
- support uploading non-notebook files (b64-encoded)
2014-07-31 11:57:38 -07:00
MinRK
3c26b079f0 updates per review
- clarified docstrings and errors
- still more notebook/file renames
- configurable untitled names
- copy_from can be full path
- fix running, upload, new-tab behaviors in dashboard

Yay, review!
2014-07-31 11:57:38 -07:00
MinRK
d4fe081fe5 move /files/ redirect to base handlers
and reuse it in /nbconvert/html/…

closes #6137
2014-07-31 11:57:37 -07:00
MinRK
bec995aa63 updates per review
a few more notebook mentions in docstrings,
and inappropriate use of setdefault.
2014-07-31 11:57:37 -07:00
MinRK
2ea31b5ee0 use contents manager to handle redirect of /notebooks -> /files
avoids 404 on /files for visiting a nonexistent notebook
2014-07-31 11:57:37 -07:00
MinRK
93b300adda support deleting empty directories
can’t copy directories
2014-07-31 11:57:37 -07:00
MinRK
260afd76ae contents service review
- missed some s/notebook/file/ in docstrings
- manager doesn’t sort contents
2014-07-31 11:57:37 -07:00
MinRK
accf0878ae test creating a directory with PUT 2014-07-31 11:57:37 -07:00
MinRK
8c4069cc00 add support and tests for uploading and saving regular files 2014-07-31 11:57:36 -07:00
MinRK
3674958b70 teach tree view about non-notebook files 2014-07-31 11:57:36 -07:00
MinRK
0c0eb43719 teach contents service about non-notebook files 2014-07-31 11:57:36 -07:00