Commit Graph

826 Commits

Author SHA1 Message Date
Stefan van der Walt
6a8a66fa8b Correctly set read_only meta name for use in javascript. Note that this has a different meaning than in the Python code: not whether the read-only flag was specified upon launch, but whether the notebook is in read-only mode and input should be disabled. 2011-12-13 18:02:17 -08:00
Stefan van der Walt
4476c69984 Hide top login/logout buttons on login/logout pages. 2011-12-13 17:44:29 -08:00
Stefan van der Walt
52a2f081fe Split read-only logic into three functions: read_only, logged_in, and login_available. Move display logic from javascript into templates. 2011-12-13 17:22:13 -08:00
Stefan van der Walt
3bf57a7f5d Improve three-state read-only logic. 2011-12-13 16:15:20 -08:00
Stefan van der Walt
23ff0c2f88 On the login page, focus on the password field. 2011-12-13 16:13:34 -08:00
Stefan van der Walt
06d34fea72 Redirect to front page upon read-only logout. 2011-12-13 16:13:34 -08:00
Stefan van der Walt
ec89b7c98b Display login button in read-only mode. 2011-12-13 16:13:34 -08:00
Fernando Perez
b98a86f818 Merge pull request #1146 from minrk/savescript
Allow saving notebook.py next to notebook.ipynb.  This allows notebooks to be imported or %run via their .py companion file.
2011-12-12 22:38:45 -08:00
MinRK
dca65fa91d include error in 'Unexpected error' message. 2011-12-12 21:09:42 -08:00
MinRK
6947e47822 Merge PR #1132
Improve read-only style

closes #1132
2011-12-12 15:19:04 -08:00
MinRK
218a88a47b move drag_info show/hide to page.ready, to avoid flouc 2011-12-12 15:17:20 -08:00
MinRK
103f76563d Merge PR #1125
Adds IP[y]: Notebook header image and link, instead of plain text.

closes #1125
2011-12-12 15:05:39 -08:00
Matthias BUSSONNIER
c6457428c8 notebook : update logo
Change Notebook logo to IP[y]:Notebook
    Make it clickable to return to the dashboard
    Thanks to @MinRK for the css.

    closes #607

    png logo is 48px high (2x display), for balance of
    browser display / zoomed appearance.
2011-12-12 15:03:38 -08:00
MinRK
a8425e5c62 Merge PR 1135
settings for tornado web application can now be specified via the
NotebookApp.webapp_settings configurable.  This principally allows
users/admins to serve custom templates, css, and javascript, without
having to modify IPython's shipped sources.

closes #1135
2011-12-12 14:17:07 -08:00
MinRK
88340d682c update iptest exclusions with recent changes 2011-12-12 11:47:51 -08:00
Matthias BUSSONNIER
16946ef7bb unhide on not read-only instead of inverse 2011-12-11 13:02:13 +01:00
Timo Paulssen
eb51077b26 look for mathjax in the custom static path if it's supplied. 2011-12-10 22:44:12 +01:00
Timo Paulssen
7fa16984cc this is how the configuration system is supposed to be used. 2011-12-10 18:49:41 +01:00
Timo Paulssen
ec0026bbf9 use IPythons config subsystem to allow overrides to the tornado web app. 2011-12-10 16:30:12 +01:00
Matthias BUSSONNIER
540f77f96a [notebook] read-only disable element
* remove the drag file to upload text
    * prevent drag binding to show upload form
2011-12-09 16:45:19 +01:00
Matthias BUSSONNIER
b0ad2c6f29 [notebook] read-only: disable name field 2011-12-09 12:36:11 +01:00
MinRK
d7970d29a5 skip codemirror key-event handling when read-only 2011-12-08 12:47:08 -08:00
Matthias BUSSONNIER
70fa9c8b2a totally remove pager when read only
closes #1126
2011-12-08 12:46:31 -08:00
MinRK
46cd0213a6 allow saving notebook.py next to notebook.ipynb
enable with:

    NotebookManager.save_script=True
2011-12-07 16:37:11 -08:00
Fernando Perez
341fbcafb4 Merge pull request #1108 from Carreau/completer-usability-2
Usability refinements to the as-you-type completer, so it shows the part that is fixed (typed by the user prior to tab), and is dismissed when not needed further.

Closes #1080.
2011-12-06 23:17:27 -08:00
Matthias BUSSONNIER
855fd6f923 notebook: code Readability. Add dismissing symbols
* As minrk suggested, changes list of char to string.split()
	* add also a few dismissing symbold like `,` `=` and `*` for
	  the completer
2011-12-07 08:03:37 +01:00
Matthias BUSSONNIER
44c959f88b notebook: fix, only one completion autopick 2011-12-07 08:03:37 +01:00
Matthias BUSSONNIER
c596d17eaf completer update code-miror on the fly
Following @fperez advice, change the completer apparence to avoid user confusion.

	- Append what the user type in the completer in code-miror, (Almost) as if
	  codemirror still have focus
	- distinguish between "fixed" completion  part, which was sent to the kernel
	  (now written in bold) and filtering one,handled only in JS,that the user
	  can errase without dismissing the completer

	I changed the action of <Space> to dismiss the completer with what have
	already been typed and inserting a space instead of "picking" the currently
	hilighted option

	<Escape> will still dissmiss the completer and remove everything the user as
	typed since the completer invocation

	Note that while the completer is shown, code-mirror does not show any
	blinking cursor
2011-12-07 08:03:37 +01:00
Matthias BUSSONNIER
1fbf5b18dd Apply pep8 to js 2011-12-07 08:03:37 +01:00
Matthias BUSSONNIER
933cf3606b usability and cross browser compat for completer
- dissmiss the completer, append what alredy type, **Plus** one caracter in
	  some cases

	  List of special caracter that are handle are in a given list `()[]./\-+`
	  for the moment. usefull for exaple when typing :
	  >>> np.s<tab>in(
	  and not having to type '(' twice.

	  they are handle separately has the [a-zA-Z] ones because otherwise they
	  will screw up the regexp, and are opt-in to avoid bugs with invisible
	  caracters send because some browser have 'keypress' event for meta keys

	  close #1080

		Note to this commit :
	  list of test for the completer across browser with --pylab=inline flag

	  #test direct one completion
	  plt.an<tab>       -> plt.annotate

	  #test filter,tab, only one completion
	  plt.a<tab>n<tab>  -> plt.annotate

	  # test partial common beggining
	  # test dismmised if user erase
	  plt.a<tab>nn<backspace><backspace>u<tab>                -> completer to `aut`
	  ........................................<tab><tab><tab> -> nothing should append
	  .......................................................<backspace><backspace<backspace> -> completer cancelled

	  #test dismiss if no more completion
	  plt.s<tab>c  -> completer 3 choices
	  ...........u -> dismissed whith what user have typed.  `plt.scu`

	  # test dismiss in no completion, special symbol
	  # opt-in list of caracters +-/\()[].
	  np<tab>.s          -> a 'dot' sould dismiss the completer and be appended
	  .........<tab>in(  -> np.sin(
	  np.s<tab>in[       -> np.sin[
2011-12-07 08:03:37 +01:00
Fernando Perez
5876485b5f Merge pull request #864 from ipython/termzmq
Two-process terminal frontend: this branch adds a new IPython frontend, invoked via

ipython console

that behaves much like the regular, old ipython, but runs over zeromq in two processes.  This means that such a client can connect to existing kernels initiated by the Qt console, the notebook or standalone (i.e. via `ipython kernel`).

We still have some internal architectural cleanups to perform to simplify how the various frontends talk to the kernels, but by having this main piece in, the complete picture is clearer, and that refactoring work can be carried post-0.12.

This frontend should still be considered experimental.
2011-12-06 12:10:58 -08:00
MinRK
5ffe131458 exclude mathjax from notebook package_data
closes #1018
2011-12-05 21:26:41 -08:00
MinRK
bf7f3336ae Split swallow_argv into standalone function in lib.kernel
adds frontend_flags/aliases traits to ConsoleApp derivatives for
use in this function.
2011-12-05 17:41:00 -08:00
Min RK
b6bb3c8c7a Merge pull request #1077 from minrk/nb
allow the notebook to run without MathJax

adds --no-mathjax flag for disabling mathjax, and moves the mathjax URL decision to the server from the browser.

closes #1071
2011-12-05 16:49:04 -08:00
MinRK
7774ddd0a5 Merge PR #1098: notebook config-panel style
Fixes some style consistency issues in config section of side panel.

closes #1098
2011-12-05 15:52:01 -08:00
MinRK
26416b6d2d make 'time before tooltip' style more consistent 2011-12-05 15:51:29 -08:00
MinRK
d6ac9f3ec3 add server/permission info in failed-mathjax dialog
It's now more clear that offline mathjax info is server-related.
2011-12-05 15:21:49 -08:00
MinRK
41b493f540 Cleanup some inappropriate javascript
prototype functions were actually called which should not happen, and
resulted in objects and their attributes being passed to their own methods
as arguments.
2011-12-04 14:20:48 -08:00
Matthias BUSSONNIER
e268dd0650 fix cancell->cancel typo in js
prevented closing tooltip

closes #1095
2011-12-04 13:52:13 -08:00
Matthias BUSSONNIER
057c304162 notebook: config section UI
Polish config section appearence in left pannel, elements alignement, time units...
2011-12-04 12:56:01 +01:00
MinRK
72fb49b7c7 adjust missing mathjax handling per review
* use jQuery syntax to construct dialog
* server determines where MathJax comes from via mathjax_url configurable (default local/CDN priority unchanged)
2011-12-01 15:59:27 -08:00
MinRK
36024bcf83 allow the notebook to run without MathJax
* add `--no-mathjax` flag for disabling mathjax in the notebook server
* A jQuery dialog with our 'no mathjax' message will appear if mathjax is unavailable, but the notebook will be fully functional after dismissal.
* Various calls to MathJax.Hub.typeset moved to Cell.typeset, which checks for MathJax existence and is a no-op without it.

closes #1071
2011-11-30 20:11:37 -08:00
MinRK
f18d172fdf don't swallow regular key events in read-only mode 2011-11-30 15:10:31 -08:00
Fernando Perez
f6e4b0ae60 Merge pull request #1069 from Carreau/test-fix-ff-completer
Fix "As you type" tab completion for the notebook on firefox; recent merge had introduced a firefox-specific bug.
2011-11-30 10:39:08 -08:00
Matthias BUSSONNIER
ca846ecd02 as you type Completer, propagate event by hand
Should fix completer behaviour on firefox...
2011-11-30 12:04:37 +01:00
Fernando Perez
a919ef339b Merge pull request #1039 from Carreau/notebook-as-you-type-completer
Improve tab-completer in the notebook to filter list of completions 'as you type'.  Once the completions list is opened, you can continue typing letters and the list will filter down as less items match.  Typing tab again will activate the completion once there are no ambiguities.

This brings the experience in the notebook much closer to the feel of a readline completer, so muscle memory can carry across systems.
2011-11-29 22:11:44 -08:00
Matthias BUSSONNIER
90b6f1b8d6 fix double tooltip
there was a possibility of 2 tooltip if clicking in two cell
	and one that it wasn't able to dismiss
2011-11-30 00:33:38 +01:00
Matthias BUSSONNIER
1b68c17acc tidy up code 2011-11-30 00:33:38 +01:00
Matthias BUSSONNIER
1fb62e259e tab pick if only one match left 2011-11-30 00:33:38 +01:00
Matthias BUSSONNIER
5e1bd70d36 tabs fast forward user tab 2011-11-29 20:59:37 +01:00