Commit Graph

3705 Commits

Author SHA1 Message Date
Brian E. Granger
c857f9f6fa Merge pull request #5390 from minrk/finish-5333
finish PR #5333
2014-03-20 14:51:27 -07:00
Brian E. Granger
fa44edcb47 Merge pull request #5326 from takluyver/iptest-gardening
Some gardening on iptest result reporting
2014-03-20 14:45:55 -07:00
MinRK
3e67d961c9 only check listdir on dirs
is_hidden is called with files, not just dirs
2014-03-20 14:40:39 -07:00
MinRK
c051e870e1 better log message in deprecated files/ redirect 2014-03-20 14:38:44 -07:00
Brian E. Granger
e51030ea5f Merge pull request #5368 from jdfreder/specifity
Flexbox classes specificity fixes
2014-03-20 14:34:17 -07:00
MinRK
2041dc6563 widen modal dialogs on wide displays
needed for quick help layout with multiple meta keys
2014-03-20 14:12:09 -07:00
MinRK
840364ff71 use box-flex to layout quickhelp 2014-03-20 14:11:05 -07:00
MinRK
19c64f4b59 remove alt-- shortcut
replace with ctrl-shift--

alt is not safe for defaults
2014-03-20 14:10:44 -07:00
Brian E. Granger
9f1b26d860 Merge pull request #5331 from minrk/raw-input-css
fix raw_input CSS
2014-03-20 13:47:14 -07:00
Thomas Kluyver
2620761202 Improve description of -j option to iptest 2014-03-20 13:36:24 -07:00
Thomas Kluyver
c861f58327 Shorten leftover references to 'IPython test group' 2014-03-20 13:33:27 -07:00
Min RK
0ae0216b12 Merge pull request #5049 from ivanov/quickhelp-update
update quickhelp on adding and removing shortcuts
2014-03-20 12:39:42 -07:00
Paul Ivanov
35c861f583 fix MacOS specific shortcuts, thanks @minrk 2014-03-20 12:38:25 -07:00
Brian E. Granger
bfdbdd456c Merge pull request #5391 from jdfreder/netscape-keyboard
Fix Gecko (Netscape) keyboard handling
2014-03-20 12:35:52 -07:00
Paul Ivanov
c28096f0c5 prevent saving of partially loaded notebooks
closes #5363
2014-03-20 02:21:38 -07:00
Paul Ivanov
54d9eb4358 really fix the '-' key shortcuts now 2014-03-19 22:29:31 -07:00
Paul Ivanov
77bf4a72dd better handling of minus 2014-03-19 19:24:05 -07:00
Jonathan Frederic
a08fbff5d9 Fix Gecko (Netscape) keyboard handling 2014-03-19 16:36:11 -07:00
Paul Ivanov
21ebaf2e32 handle keyboard shortcuts ending with '-' 2014-03-19 16:24:53 -07:00
Paul Ivanov
4cf1717980 use - for shortcut separators 2014-03-19 15:58:59 -07:00
Thomas Kluyver
8e1146c6d1 Merge pull request #5357 from minrk/smb-fails
catch exception in copystat
2014-03-19 15:13:14 -07:00
Paul Ivanov
083f631cde wider style for keyboard shortcuts 2014-03-19 12:44:12 -07:00
MinRK
62061f0294 only catch errors in copystat 2014-03-19 12:22:33 -07:00
Min RK
d88b2ccc4a Merge pull request #5310 from ivanov/fix-5238
remove raw cell placeholder on focus, closes #5238
2014-03-19 12:21:03 -07:00
Min RK
5c5139b65d Merge pull request #5332 from ivanov/semantic-icons
semantic names for indicator icons
2014-03-19 12:20:07 -07:00
Paul Ivanov
c54ced12e5 Merge pull request #5360 from minrk/monospace
remove some redundant font-family: monospace
2014-03-19 11:25:12 -07:00
Paul Ivanov
2e4036fd4f raw cell placeholder text as one line 2014-03-19 10:42:11 -07:00
Paul Ivanov
37852baa6d render on focus out, always pad raw cells 2014-03-19 10:37:59 -07:00
Paul Ivanov
8a623dbcc4 fab css 2014-03-18 12:06:06 -07:00
Paul Ivanov
955d239d07 rename css class names to be consistent with current style 2014-03-18 12:03:43 -07:00
Paul Ivanov
a0a17fa04a capitalize keyboard shortcuts in the tour 2014-03-18 11:19:44 -07:00
Paul Ivanov
00603a11f6 remove stale modal dialog from the DOM 2014-03-18 11:16:56 -07:00
Fernando Perez
5f086fded2 Merge pull request #5372 from minrk/no-close-strings
Don't autoclose strings, because CodeMirror's behavior makes it confusing and awkward to type triple-quoted strings (and these are very common in Python).

An issue about this was filed in CodeMirror itself: https://github.com/marijnh/CodeMirror/issues/2385
2014-03-18 11:14:24 -07:00
MinRK
3c1fe84f52 Don't autoclose strings
CodeMirror doesn't do the right thing with triple-quoted strings,
so don't let it try.
2014-03-18 11:11:28 -07:00
Paul Ivanov
597a5cb741 don't color code in crimson
do alliterate, aforementioned color alternative alias is amaranth
2014-03-18 11:03:09 -07:00
Paul Ivanov
b9ef37ac26 semicolon fixes buttress half of my js commits 2014-03-18 10:31:51 -07:00
Min RK
e64c2cb5d8 Merge pull request #5296 from ivanov/more-shortcuts
unify keyboard shortcut and codemirror interaction
2014-03-18 09:46:07 -07:00
Paul Ivanov
0c366861c5 brief key event desription 2014-03-17 21:09:51 -07:00
Paul Ivanov
6d6e0fb007 fix up and down arrows in the top and bottom cells 2014-03-17 20:11:33 -07:00
Paul Ivanov
09866e0ee1 go to the beginning of the line when entering cell 2014-03-17 17:41:44 -07:00
Paul Ivanov
96848748de restore master behavior
up arrow at the top line first goes to char 0, and only goes to the cell
above if already on char 0. Same with down arrow on the bottom line:
transition cursor to the end of the line, and only go down a cell if
already at the end of the last line.

this makes for an unhappy experience in code-mirror's vim mode  for j
and k keys, but we'll fix that in the next commit
2014-03-17 16:21:23 -07:00
Paul Ivanov
8f17444c27 go to appropriate line when coming from another cell
Sets the cursor on the last line of the cell when moved up from the top
of the cell below, and sets the cursors to the first line when moving
down from the bottom of a last line.

Here, we retain the character that the cursor was on, so that users
wishing to have up-down functionality like one document can still use
this shortcut handler and simple adjust the at_top and at_bottom methods
2014-03-17 15:48:36 -07:00
Jonathan Frederic
2dd8757da7 Fab CSS 2014-03-17 10:44:29 -07:00
Jonathan Frederic
77904a044c Re-added already existing base for less backwards compatability. 2014-03-17 10:43:53 -07:00
Jonathan Frederic
0020b9f896 Fix specifity of flex modifier classes 2014-03-17 10:40:28 -07:00
MinRK
8e5937e993 remove some redundant font-family: monospace
`pre`, `code` tags already set the font-family in these contexts.
Setting it again in the surrounding context is redundant,
and causes inconsistency when embedding notebooks in HTML
(e.g. nbviewer).
2014-03-14 11:43:11 -07:00
Jonathan Frederic
d37ffe91b7 Fix status ind. icon bug 2014-03-14 11:40:54 -07:00
MinRK
caee63f413 fallback on copy, copyfile if copy2 fails
in notebook manager
2014-03-14 10:06:02 -07:00
MinRK
89faa5f340 simplify raw_input css
for once, vertical-align: baseline is the right choice
2014-03-13 20:47:34 -07:00
MinRK
065a6eaa34 fix ambiguous raw_input classes 2014-03-13 20:45:54 -07:00
Paul Ivanov
61b47695e4 renamed 'use_shortcut' method to 'handles' 2014-03-13 16:44:19 -07:00
Paul Ivanov
d8287466d0 another doc fix 2014-03-13 16:40:37 -07:00
Paul Ivanov
f68dcc3e57 it's only half true that I'm anal about semicolons 2014-03-13 16:30:58 -07:00
Paul Ivanov
67fd905421 minor fixes to docs to address PR feedback 2014-03-13 16:29:28 -07:00
Paul Ivanov
469c70fd10 more semicolons 2014-03-13 16:23:27 -07:00
Jonathan Frederic
443083c1fd Added some comments 2014-03-13 14:34:17 -07:00
Paul Ivanov
1dc113a9cb closes #5336 2014-03-13 14:30:32 -07:00
cgohlke
74be15ec19 Fix filenbmanager.list_dirs fails for Windows user profile directory 2014-03-11 23:50:46 -07:00
Paul Ivanov
4142911ac7 better fix for starting with Command Mode icon 2014-03-11 18:58:46 -07:00
Paul Ivanov
12139b4d6e ensure ipython-command-mode icon displayed on load 2014-03-11 18:48:21 -07:00
Paul Ivanov
f0ae836f5f semantic names for kernel status indicator 2014-03-11 18:37:35 -07:00
Paul Ivanov
f5a02a02dd semantic names for indicator icons
For all of the discussion that we had about what kind of icons should
and should not be used to indicate what mode the notebook is in, we
never went through to make it possible to override it.

With this change, it is now possible to override what icons are
displayed for Command and Edit Modes.

For example, @minrk liked the fighter-jet icon for Command Mode, so he
can put this in his custom.css

.ipython-command-mode:before {
     content: "\f0fb";
}
2014-03-11 18:22:03 -07:00
MinRK
084aba793f fix raw_input CSS
I had to express padding in px, not em for consistent appearance.
I'm not sure why.
2014-03-11 14:45:37 -07:00
Paul Ivanov
4dd009f198 DRY: style in one place, removed code duplication 2014-03-11 00:53:15 -07:00
Thomas Kluyver
8c45772c3e Refactor generation of casperjs command 2014-03-10 17:01:35 -07:00
Thomas Kluyver
1cf91b4933 Refactor TestController API to allow it to display extra info.
Add a setup() method to be called when we know we're going to use a test
group, for creating temporary dirs etc., and a print_extra_info() method
to display extra information.
2014-03-10 16:45:08 -07:00
Thomas Kluyver
8170b58c3f Fix display of notebook directory path 2014-03-10 16:07:12 -07:00
Thomas Kluyver
cedc3bad9e Some gardening on iptest result reporting 2014-03-10 15:47:41 -07:00
Jonathan Frederic
7762cb0ab3 Fixed a small bug/typo 2014-03-10 15:29:10 -07:00
Jonathan Frederic
e61b6aef47 Add logic to close tt when cell is unselected 2014-03-10 15:26:04 -07:00
MinRK
f9758dd453 add NotebookNotary to NotebookApp's class list
adds it to help output and config files
2014-03-10 15:21:11 -07:00
Brian E. Granger
3eb654bd86 Merge pull request #5295 from minrk/no-append-prototype
OutputArea.append_type functions are not prototype methods
2014-03-10 14:13:14 -07:00
Paul Ivanov
b08665563d fix capitalization of mode-switching keys 2014-03-10 11:48:13 -07:00
MinRK
a24595d16b call append_text from append_map 2014-03-10 11:44:00 -07:00
Paul Ivanov
01c9be84d0 prettify combo keyboard shortcuts 2014-03-10 11:30:50 -07:00
Paul Ivanov
1c213bc615 first pass at capitalizing keyboard shortcuts 2014-03-10 11:13:18 -07:00
Jonathan Frederic
95492b0f42 Add illusion that cell is in edit mode when complete is up,
even though it is not in focus so it is not in edit mode.
2014-03-10 10:10:06 -07:00
Jonathan Frederic
65732920eb Remove all should cancel blur logic. 2014-03-10 09:46:59 -07:00
Jonathan Frederic
989ae4e1b3 Workaround for Tooltip & completer click focus bug. 2014-03-10 09:28:19 -07:00
MinRK
abe2dce926 back to dev 2014-03-09 21:58:09 -07:00
Paul Ivanov
1c23dee141 remove recreation of QuickHelp 2014-03-09 14:21:14 -07:00
Paul Ivanov
8bf4ffa2ca rebuild.QuickHelp event sets the dirty bit
QuickHelp is rebuilt on show if the dirty bit was set.
2014-03-09 14:15:47 -07:00
Paul Ivanov
cdb7967cc2 removing keyboard shortcuts should also update help 2014-03-09 12:26:34 -07:00
Paul Ivanov
4a287569fc update notebook quickhelp on new shortcuts 2014-03-09 12:24:32 -07:00
Paul Ivanov
cd38181438 remove raw cell placeholder on focus, closes #5238 2014-03-09 11:41:25 -07:00
MinRK
4d1f9b21c4 append functions are not prototype methods 2014-03-07 17:57:37 -08:00
Paul Ivanov
54409a196d dem semicolons 2014-03-07 17:48:34 -08:00
Paul Ivanov
19c7189b15 no need to special-case Escape anymore 2014-03-07 17:48:34 -08:00
Paul Ivanov
6a2c4121f9 up and down keys no longer need special casing 2014-03-07 17:48:34 -08:00
Paul Ivanov
2c9ff376a2 added new use_shortcut method to shortcuts
this way, you can ask if a particular event will be handled by the
shortcuts system. This takes away the need to special-case many
different possible keys which should be ignored by codemirror by
ignoring them en masse.
2014-03-07 17:48:34 -08:00
Paul Ivanov
b9e448b160 DRY: refactor common keyboard handling to Cell
Our edit mode keyboard shortcuts don't distinguish between being in a
code cell or in a text cell, so it makes sense to handle both in one
place. This is a first step in that direction.
2014-03-07 17:48:34 -08:00
Paul Ivanov
15f4345ba3 typo, use keycodes object instead of magic numbers 2014-03-07 17:48:34 -08:00
Paul Ivanov
bf3ecdb35f DRY: factor out common handle_keyevent method
This method was identical in both CodeCell and TextCell
2014-03-07 17:48:34 -08:00
Paul Ivanov
71d4c427c9 refactor to improve cell switching in edit mode
This code was repeated in both CodeCell and TextCell, both of which are
extensions of Cell, so this just unifies the logic in Cell.

TextCell had logic here to check if the cell was rendered or not, but I
don't believe it is possible to end up triggering such a code path.
(Should that be required, I can always just add back these methods to
TextCell, performing the .rendered==True check, and calling the Cell

prior to this, code mirror at_top would only return true on if the
cursor was at the first character of the top line. Now, pressing up
arrow on any character on the top line will take you to the cell above.

The same applies for the bottom line. Pressing down arrow would only go
to the next cell if the cursor was at a location *after* the last
character (something that is only possible to achieve in vim mode if the
last line is empty, for example). Now, down arrow on any character of
the last line will go to the next cell.
2014-03-07 17:48:34 -08:00
Paul Ivanov
8889a7581c start better keyboard handling 2014-03-07 17:48:34 -08:00
MinRK
3face719e8 setup jsversion 2014-03-07 15:54:55 -08:00
Brian E. Granger
30c500bfa9 Merge pull request #5292 from jdfreder/shift-enter-scroll
focus next cell on shift+enter
2014-03-07 14:55:48 -08:00
Jonathan Frederic
da334e782e focus next cell on shift+enter 2014-03-07 14:48:09 -08:00
Min RK
0a37d7bfc5 Merge pull request #5232 from jdfreder/nbc_incono
Make nbconvert html full output like notebook's html.
2014-03-07 14:14:43 -08:00
Brian E. Granger
05e6fbade4 Merge pull request #5288 from minrk/start-idle
Correct initial state of kernel status indicator
2014-03-07 14:07:42 -08:00
Thomas Kluyver
80af3b4cfb Merge pull request #4802 from ivanov/ui-docs
Tour of the notebook UI (was UI elements inline with highlighting)
2014-03-07 12:09:32 -08:00
MinRK
e901c9be33 Correct initial state of kernel status indicator
- start as busy, since we don't know
- send a kernel_info request once connections are established
- set idle on reply to the to the kernel_info request
2014-03-07 11:51:54 -08:00
Brian E. Granger
f62ce75a62 Lots of CSS tweaks to get nbconvert output looking right. 2014-03-06 16:36:39 -08:00
Jonathan Frederic
9c5bca99e2 addClass instead of adding extra_class arg everywhere 2014-03-06 14:22:36 -08:00
Jonathan Frederic
6169acfc6d Fixed rebase issues 2014-03-06 14:10:37 -08:00
Jonathan Frederic
8b3c356c8d Add extra_class arg to the rest of the append methods,
use new extra_arg to add output_pyout class
2014-03-06 13:29:09 -08:00
Jonathan Frederic
b92ede2800 Added output_pyerr to python error output 2014-03-06 13:26:44 -08:00
Brian E. Granger
1407b4347e Merge pull request #5268 from ellisonbg/cmd-mode
Refactoring Notebook.command_mode
2014-03-06 12:09:43 -08:00
Paul Ivanov
610e66615e added a note to what's new 2014-03-05 22:18:16 -08:00
Paul Ivanov
7974e32150 oops, <tt> went the way of the dodo, using <code> 2014-03-05 21:27:14 -08:00
Paul Ivanov
06e5858ee2 lower case names for keys 2014-03-05 21:08:24 -08:00
Min RK
aaedd1a311 Merge pull request #5283 from takluyver/widget-del
Remove Widget.closed attribute
2014-03-05 17:16:35 -08:00
Thomas Kluyver
95dc697e3b Remove Widget.closed attribute
Closes gh-5282
2014-03-05 15:34:14 -08:00
MinRK
7d87978a66 fix a typo introduced by a rebased PR
caused heading cells to appear in both rendered and unrendered state
2014-03-05 14:30:34 -08:00
Jonathan Frederic
de9b5b907e Fab CSS 2014-03-05 12:25:26 -08:00
juhasch
72864cc83c append Firefox overflow-x fix 2014-03-05 12:25:11 -08:00
Paul Ivanov
fdca0762a4 tidy up capitalization 2014-03-04 19:05:56 -08:00
Paul Ivanov
0ba3d22501 proper styling for the tour 2014-03-04 19:00:14 -08:00
Paul Ivanov
e10afab397 rewording according to feedback in #4802 2014-03-04 18:14:51 -08:00
Paul Ivanov
490e4d1e42 horizontally center menubar popup 2014-03-04 18:10:45 -08:00
Paul Ivanov
4371ebf625 fix vertical position of command mode tooltip 2014-03-04 18:02:21 -08:00
MinRK
3588fe40a9 Merge Security Pull Request: google-caja
Adds HTML sanitization.

The basics:

- untrusted HTML is always sanitized, with no warning
  (there is console logging for changes made)
- markdown is always treated as untrusted
- no warnings for simply excluded output (e.g. Javascript)
- CSS tags and attributes are always stripped from untrusted HTML
- never check whether HTML is "safe," only sanitize
- add 'Trust notebook' to File menu
2014-03-04 17:35:55 -08:00
MinRK
54e1558c16 make trust notebook dialog a single paragraph 2014-03-04 17:35:38 -08:00
MinRK
8cd744db85 mention that Trust triggers reload 2014-03-04 15:58:09 -08:00
MinRK
9396619f9d security.js docstrings 2014-03-04 15:38:11 -08:00
Brian E. Granger
4e0a2ee476 Make sure we are in command mode before we select a new cell. 2014-03-04 15:09:49 -08:00
Brian E. Granger
8d38e042df Merge pull request #5158 from ivanov/fix-5157
log refusal to serve hidden directories
2014-03-04 10:05:29 -08:00
MinRK
d8f2e320f2 trust method docstrings 2014-03-03 16:27:59 -08:00
MinRK
d5b0026cf1 trust via mark cells and save, rather than trust API request 2014-03-03 16:10:21 -08:00
MinRK
e7f3c05d28 remove unused get_attr_names 2014-03-03 16:10:21 -08:00
MinRK
6792d38215 log excluded untrusted output 2014-03-03 16:10:21 -08:00
MinRK
aaefc5f296 remove warning for stripped output 2014-03-03 16:10:21 -08:00
MinRK
b5c8a51331 disable trust notebook menu item on trusted notebooks 2014-03-03 16:10:20 -08:00
MinRK
c9c23cd71c cleanup test_nbmanager
use class setUp / teardown instead of the same context manager in every test
2014-03-03 16:10:20 -08:00
MinRK
1ae689f30c Add Trust Notebook to File menu 2014-03-03 16:10:20 -08:00
MinRK
46665483ed remove struct-returning sanitize
only keep str-str sanitization
2014-03-03 16:10:20 -08:00
MinRK
d4780c2cfc remove security.is_safe 2014-03-03 16:10:20 -08:00
MinRK
d59e44a190 default to allow_css = false 2014-03-03 16:10:20 -08:00
MinRK
4d35660f3c sanitize CSS
rather than removing it entirely
2014-03-03 16:10:19 -08:00
MinRK
d7b1e8b45b test style 2014-03-03 16:10:19 -08:00
MinRK
5f7f1c51ec remove unused security warning 2014-03-03 16:10:19 -08:00
MinRK
c49f04545a don't use result.safe to communicate incomplete information 2014-03-03 16:10:19 -08:00
MinRK
028ce17c62 fix tagName comparison 2014-03-03 16:10:19 -08:00
MinRK
a7dc526b2b testing for sanitize 2014-03-03 16:10:18 -08:00
MinRK
3897b1c39f don't populate sanitized.safe by default
since it's potentially expensive.

walk nodes in is_safe
2014-03-03 16:10:18 -08:00
MinRK
6384502e47 sanitize untrusted HTML output
rather than checking is_safe
2014-03-03 16:10:18 -08:00
MinRK
3d0957c7bc trust latex
If mathjax is insecure, we have big problems.
And we already trust mathjax in markdown cells,
so this is consistent.
2014-03-03 16:10:18 -08:00
MinRK
4b01948200 check trust of data-attributes in sanitization 2014-03-03 16:10:18 -08:00
MinRK
367b4f85c2 wrap caja.sanitizeAttribs to trust data-* attributes 2014-03-03 16:10:17 -08:00
MinRK
c298670a4b use html-sanitizer instead of html-css
always scrub css (for now)
2014-03-03 16:10:17 -08:00
MinRK
eec5d427a4 add cmp_tree, in case caja log can't be trusted
(spoiler: it can't)
2014-03-03 16:10:17 -08:00
MinRK
0da66543a0 move security js test 2014-03-03 16:10:17 -08:00
MinRK
890c0be1dd always sanitize markdown
don't check if it's safe or not
2014-03-03 16:10:17 -08:00
MinRK
2a0451fdde use google-caja for sanitization 2014-03-03 16:06:41 -08:00
Brian E. Granger
07cdb1e195 Adding first round of security tests of is_safe. 2014-03-03 16:06:41 -08:00
Brian E. Granger
3b262912a1 Display safe HTML+SVG even if untrusted, but don't set trusted=1. 2014-03-03 16:06:40 -08:00
Brian E. Granger
31c9e08fa8 Don't render insecure Markdown and show warning. 2014-03-03 16:06:40 -08:00
Brian E. Granger
fa3f998295 Adding security.js with 1st attempt at is_safe. 2014-03-03 16:06:40 -08:00
Brian E. Granger
6f4263dc74 Removing conditionals that are not needed. 2014-03-03 16:03:06 -08:00
Paul Ivanov
6c8cccf9e3 fix test suite
is_hidden expects the file to actually exist, so I've rearranged the
logic such that is_hidden is called only after it's clear that the file
exists.
2014-03-03 16:02:07 -08:00
Brian E. Granger
e374ca5ebb Refactoring Notebook.command_mode. 2014-03-03 15:32:05 -08:00
Thomas Kluyver
9c5f9e3a35 Merge pull request #5265 from ellisonbg/timeout-error
Missing class def for TimeoutError
2014-03-03 15:16:21 -08:00
Brian E. Granger
c6ddfbd0bf Merge pull request #5267 from minrk/normalize-paths
normalize unicode in notebook API tests
2014-03-03 15:04:19 -08:00
Brian E. Granger
b1c87debde Adding comment about this fix. 2014-03-03 14:50:06 -08:00
MinRK
052955a84a normalize unicode in notebook API tests
was failing comparison on OS X
2014-03-03 14:33:45 -08:00
Brian E. Granger
dd55efc45d Missing class def for TimeoutError. 2014-03-03 13:55:00 -08:00
Brian E. Granger
92967c0baf Addressing things in completer.js. 2014-03-03 13:20:32 -08:00
Brian E. Granger
af7dd15181 Removing old keyboard handling from IPython.utils. 2014-03-03 13:13:50 -08:00
Brian E. Granger
929f5bc8ea Fixing references to IPython.keycodes. 2014-03-03 13:10:18 -08:00
Brian E. Granger
c76ab1d836 Adding basic tests for keyboard.js 2014-03-03 13:10:17 -08:00
Brian E. Granger
ec6ea72873 Adding utility functions. 2014-03-03 13:10:17 -08:00
Brian E. Granger
ff1492f8c9 Creating new base/js/keyboard.js 2014-03-03 13:10:17 -08:00
Paul Ivanov
d6f2dfefea log refusal to serve hidden files dirs 2014-03-03 12:35:37 -08:00
Jonathan Frederic
ede116bee7 Get cell after first conditional 2014-03-03 11:35:15 -08:00
Jonathan Frederic
479bc6b37a Check down too. 2014-03-03 11:33:58 -08:00
Jonathan Frederic
bebe51c158 Don't allow edit mode up arrow to continue past index == 0 2014-03-03 11:27:58 -08:00
Paul Ivanov
1ce7d5ec80 tour: put the right arrow on the right side 2014-03-03 11:06:54 -08:00
Brian E. Granger
8c5b32c987 Merge pull request #5223 from minrk/tiny-images
use on-load event to trigger resizable images
2014-03-03 10:35:42 -08:00
Min RK
fa6bbe66f3 Merge pull request #5153 from takluyver/dashboard-sorting
Dashboard sorting

closes #5151
closes #5152
2014-03-02 17:40:38 -08:00
Paul Ivanov
6d0d34d7ed entering edit mode now requires focus_cell 2014-03-01 01:23:34 -08:00
Matthias BUSSONNIER
a01c112b0f allow custom headers on all pages 2014-03-01 09:43:27 +01:00
Paul Ivanov
bdbf2fe9d5 more robust forward and back tour transitions 2014-03-01 00:12:59 -08:00
Paul Ivanov
ccf6128962 addressing Fernando's feedback 2014-02-28 23:41:20 -08:00
Paul Ivanov
431c4dfeb6 correct instructions for updating components 2014-02-28 20:04:22 -08:00
Paul Ivanov
95bd36be10 don't automatically advance the tour 2014-02-28 20:04:22 -08:00
Paul Ivanov
9d1595aebb more refinement of the tour contents 2014-02-28 20:04:22 -08:00
Paul Ivanov
405017875e tidy up and add to the tour
@takluyver found some typos which I fixed now
2014-02-28 20:04:22 -08:00
Paul Ivanov
d11d9b4830 tidying up the tour explanation of modes 2014-02-28 20:04:22 -08:00
Paul Ivanov
3a43d776c2 End tour via 'x' in upper right corner of window 2014-02-28 20:04:22 -08:00
Paul Ivanov
1ee52fcbbc pause/play buttons for starting/stopping the tour 2014-02-28 20:04:22 -08:00
Paul Ivanov
5725bf80f5 use minified tour 2014-02-28 20:04:22 -08:00
Paul Ivanov
600facc92d allow tour restarting 2014-02-28 20:04:21 -08:00
Paul Ivanov
abe4732aa0 fix typo in tour.js 2014-02-28 20:04:21 -08:00
Paul Ivanov
5fead3cdd7 starting the tour from the menu works now
JavaScript makes me fond of this phrase:

  When there's nothing left to burn, you have to set yourself on fire.
2014-02-28 20:03:47 -08:00
Paul Ivanov
d7b569390f more work on the tour 2014-02-28 20:03:46 -08:00
Paul Ivanov
a765132684 add the tour to the page 2014-02-28 20:03:46 -08:00
Paul Ivanov
52766703b4 fix typo for the location of bower.json 2014-02-28 20:01:48 -08:00
Paul Ivanov
3cf601b58e initial bootstrap tour
One way to get it to play currently is with a cell like this:

    %%javascript
    $.getScript('/static/notebook/js/tour.js')

provided that you have Bootstrap Tour installed in the components
2014-02-28 20:01:48 -08:00
Min RK
a9a0c71f75 Merge pull request #5244 from minrk/test-ipc
try to avoid EADDRINUSE errors on travis
2014-02-28 17:30:15 -08:00
MinRK
15fac2c1d6 make input_area css generic to cells
removes otherwise-identical text_cell_input class in text cells
2014-02-28 16:52:00 -08:00
MinRK
983271a36f use on-load event to trigger resizable images
instead of timeout, which could get incorrect size information.

closes #5219
2014-02-28 16:46:55 -08:00
Brian E. Granger
88460cd212 Merge pull request #5175 from jdfreder/html-take2
Audit .html() calls take #2
2014-02-28 15:56:12 -08:00
Brian E. Granger
88fc1a0737 Merge pull request #5146 from jdfreder/modal-fix
Dual mode bug fixes.
2014-02-28 15:54:41 -08:00
Jonathan Frederic
39d39d0ea6 s/trigger_edit_mode/edit_mode 2014-02-28 15:52:28 -08:00
Jonathan Frederic
c41fe67da2 Re-added removed refresh 2014-02-28 15:22:30 -08:00
Jonathan Frederic
3bcee30e8c Added comments to kbm and shrunk focus_cell lines 2014-02-28 15:11:21 -08:00
Jonathan Frederic
69e760841a Move should cancel blur into codecell 2014-02-28 15:06:47 -08:00
Jonathan Frederic
4fdc99e111 Remove notebook load log succes 2014-02-28 15:03:27 -08:00
Jonathan Frederic
a6f883d7f2 Couple of whiteboard logic implementation misses 2014-02-28 14:30:06 -08:00
Jonathan Frederic
9451589e38 implemented whiteboard logic 2014-02-28 14:18:56 -08:00
Jonathan Frederic
673577cf6c Merge pull request #5207 from Zaharid/childfireevent
Children fire event
2014-02-28 13:47:21 -08:00
MinRK
22486461f3 use ipc for notebook js tests
on linux only

This ought to prevent EADDRINUSE errors in the kernel.
2014-02-28 12:50:53 -08:00
Thomas Kluyver
8c1c18461c Fix a couple of static analysis warnings 2014-02-28 11:38:28 -08:00
Thomas Kluyver
3698563794 Make hidden directories configurable 2014-02-28 11:37:26 -08:00
Thomas Kluyver
c75d4e9962 Don't attempt locale-aware sorting for now.
On Python 2, locale.strxfrm() can't handle unicode.
2014-02-28 11:35:49 -08:00
Thomas Kluyver
4fe9f8d057 Case insensitive sorting in the dashboard.
Closes gh-5151
2014-02-28 11:35:04 -08:00
Thomas Kluyver
c1e8ddc64e Hide directories beginning with _ from the dashboard.
Closes gh-5152
2014-02-28 11:31:58 -08:00
Paul Ivanov
f8ab13b675 Merge pull request #5215 from ivanov/running-kernels
Dashboard "Running" Tab
2014-02-27 19:57:50 -08:00
Paul Ivanov
938f4bdfc4 small whitespace cleanup, renamed drag_info
in the dashboard, I've renamed drag_info to notebook_list_info, so
applying style to notebook_list_info and running_list_info can be done
in one place.
2014-02-27 19:36:42 -08:00
Min RK
1ff8d9153a Merge pull request #5239 from takluyver/coverage-exclude-tests
Fix exclusion of tests directories from coverage reports
2014-02-27 18:30:22 -08:00
Paul Ivanov
eb4e674598 remove redundant checks in code 2014-02-27 18:13:53 -08:00
Paul Ivanov
14239c01e4 use explicit running header name + jquery's toggle 2014-02-27 17:59:16 -08:00
Thomas Kluyver
40ac479ae1 Merge pull request #5203 from minrk/test-log-warn
capture some logging/warning output in some tests
2014-02-27 17:55:29 -08:00
Thomas Kluyver
f8fbd82864 Fix exclusion of tests directories from coverage reports 2014-02-27 17:39:48 -08:00
Jonathan Frederic
0884716a7d Re-added widget textbox blur fix FF 2014-02-27 16:15:11 -08:00
Jonathan Frederic
bfc51c2a29 Final touches? 2014-02-27 16:09:00 -08:00
Jonathan Frederic
c5fb037e41 Reorg index and focus_editor params on edit_mode func 2014-02-27 15:52:05 -08:00
Jonathan Frederic
048ca30b0c Remove fixes that are implemented correct in new CM 2014-02-27 15:47:01 -08:00
Brian E. Granger
e847a31348 Always refresh the CM editor upon TextCell unrender. 2014-02-27 15:45:06 -08:00
Jonathan Frederic
b976804051 Moved edit_mode canceling logic back into cell. 2014-02-27 15:45:06 -08:00
Jonathan Frederic
ff37fb7a36 Standardized comments and removed last logs 2014-02-27 15:45:06 -08:00
Jonathan Frederic
64ae25508d Removed change that is no longer needed 2014-02-27 15:45:06 -08:00
Jonathan Frederic
70086d352f s/unfocus/blur 2014-02-27 15:45:06 -08:00
Jonathan Frederic
c7860d8bc8 Post in person review
Removed logic for reverse ordered events
Removed almost all of the log statements
Removed list for should unfocus callbacks
Removed all the logic in focus_editor
Only call focus_editor if the keyboard was used to enter edit mode
2014-02-27 15:45:06 -08:00
Jonathan Frederic
3595c099c2 Fixed rebase problems 2014-02-27 15:45:06 -08:00
Jonathan Frederic
10d79a9102 Added cell unfocus event canceller API 2014-02-27 15:45:05 -08:00
Jonathan Frederic
a6aaa8a886 Use is_focused for element kbman removal event 2014-02-27 15:45:05 -08:00
Jonathan Frederic
6f7c502157 Fixed lots of bugs
Half overhaul of notebook focus events...
2014-02-27 15:45:05 -08:00
Jonathan Frederic
206d35a89e DEBUG
Added lots of log calls and a couple small 'fixes' (attempts)
2014-02-27 15:45:05 -08:00
Jonathan Frederic
7913305312 jshint 2014-02-27 15:45:05 -08:00
Thomas Kluyver
0059c317c3 Merge pull request #5216 from minrk/notebook-dir-cli
fixup positional arg handling in notebook app
2014-02-27 15:13:37 -08:00
Min RK
4038421da6 Merge pull request #5221 from jdfreder/ctuple
Change widget children List to Tuple.
2014-02-26 20:42:01 -08:00
MinRK
bdde544d47 don't forget base_url when updating address bar in rename 2014-02-26 15:01:07 -08:00
Paul Ivanov
7d1da4c550 refer to notebooks, not kernels. 2014-02-26 12:35:20 -08:00
MinRK
d8b6a1a0ba don't validate ContainerWidget.children
just use a plain Tuple, so we don't have to define a new Trait
2014-02-25 19:08:43 -08:00
Paul Ivanov
b74b10e308 added IPython.session_list
before this, kernel_list and notebook_list each fetched and held onto
their own copy of the sessions.
2014-02-25 18:09:16 -08:00
Jonathan Frederic
6c1ef48f1a Merge pull request #5173 from jdfreder/movewidgets
Moved widget files into static/widgets/*
2014-02-25 16:14:10 -08:00
MinRK
cc1ba8b1f7 remove incorrect is instance check in children_changed 2014-02-25 15:00:48 -08:00
MinRK
c89ec19fca don't check shape of ContainerWidget.children 2014-02-25 14:37:12 -08:00
Jonathan Frederic
7855de2f13 s/CTuple/Tuple 2014-02-25 13:50:58 -08:00
Jonathan Frederic
dedbc3b0e1 Changed children list to CTuple.
Also removed some unused refences in the widget code
and added support for tuples in the pack/unpack code.
2014-02-25 09:46:27 -08:00
Min RK
0117b587ab Merge pull request #4985 from damianavila/closebrackets
Enable autoCloseBrackets in CodeMirror by default.
2014-02-25 09:04:22 -08:00
MinRK
bb7f27541f write config instead of direct assignment from the command-line
Gross.
2014-02-24 15:48:43 -08:00
MinRK
6e09314027 fixup positional arg parsing in notebook app
- `ipnb .` triggers override of sub-config, even when the parent isn't changed
- `ipnb /path/nb.ipynb` sets notebook_dir to `/path`
2014-02-24 15:42:49 -08:00
Paul Ivanov
06c689caa3 remove reiterated repetitively redundant "actively" 2014-02-24 15:02:08 -08:00
Paul Ivanov
a2b9c75e93 don't double-join the notebook path 2014-02-24 14:18:22 -08:00
Paul Ivanov
a27168ae3b refresh of Notebook list should reload sessions 2014-02-24 13:12:15 -08:00
Paul Ivanov
af90cd8c62 fix typo in method name 2014-02-24 13:11:50 -08:00
Paul Ivanov
cb1bb62272 ok, Running tab is working now 2014-02-24 13:11:13 -08:00
Min RK
c73acb300f Merge pull request #5200 from Carreau/jinja-no-cache
Allow to pass option to jinja env
2014-02-23 22:15:29 -08:00
Matthias BUSSONNIER
816df5bb34 Allow to pass option to jinja env
Mainly to pass cache_size=-1 while developping not to cache templates
2014-02-23 23:28:57 +01:00
zah
439003d709 Children fire event
Now when a container widget is displayed, the _handle_displayed method
of each of its children is fired.
2014-02-23 20:31:39 +01:00
MinRK
e02308e436 capture logging in a few tests
this could probably be made more general,
but these were the two places I noticed log output.
2014-02-22 21:12:19 -08:00
Fernando Perez
371afec677 Merge pull request #5112 from minrk/completion-band-aid
Band-aid for completion in the notebook: not the ideal solution, but will have to do the job for now so that typing while completing works.

closes #4860
2014-02-21 18:08:19 -08:00
Brian E. Granger
708c30c912 Merge pull request #5136 from minrk/interact-default
set default value from signature defaults in interact
2014-02-21 16:28:52 -08:00
Brian E. Granger
edb8d68331 Merge pull request #5132 from minrk/oops-pdf-transform
remove application/pdf->pdf transform in javascript
2014-02-21 16:28:12 -08:00
Brian E. Granger
7a35e2a0be Merge pull request #5116 from minrk/os_path
reorganize who knows what about paths
2014-02-21 16:27:05 -08:00
Jonathan Frederic
28423647a2 Updated require references to point to new files 2014-02-21 16:25:52 -08:00
Jonathan Frederic
e0ba52c802 Moved widget files into static/widgets/*
Since they do not depend on anything ntoebook related
2014-02-21 16:25:52 -08:00
Min RK
612acd2e08 Merge pull request #5170 from jdfreder/widget-throttle-trait
Added msg_throttle sync=True widget traitlet
2014-02-21 15:32:10 -08:00
MinRK
386274488d don't create notebook_dir if it doesn't exist 2014-02-21 13:22:57 -08:00
MinRK
d37780c6a6 use config instead of App.instance to propagate notebook_dir
Should behave more logically (I hope).
2014-02-21 13:22:57 -08:00
MinRK
f9e8824fef use NotebookManager APIs in nbconvert handler 2014-02-21 13:22:56 -08:00
MinRK
cb25736a24 reorganize who knows what about paths
- add NotebookApp.notebook_dir
- add KernelManager.root_dir
- remove NotebookManager.notebook_dir, move to FileNBM.notebook_dir

Default value for KM.root_dir and fNBM.notebook_dir is NotebookApp.notebook_dir, but they can be configured separately.

SessionManager passes the API path to KernelManager,
which is responsible for turning it into the kernel's cwd.
2014-02-21 13:22:56 -08:00
Brian E. Granger
eda4569099 Merge pull request #5037 from jdfreder/ff-widget-align
FF Fix: alignment and scale of text widget
2014-02-21 12:37:40 -08:00
Jonathan Frederic
ef3f61f906 Use set_rendered to set the error msg of the cell. 2014-02-21 10:31:29 -08:00
Jonathan Frederic
946212d5fa Treat set_rendered as unsafe. 2014-02-21 10:05:07 -08:00
Jonathan Frederic
407fc0a017 s/with with/with 2014-02-21 09:42:14 -08:00
Jonathan Frederic
6a224d131b Move todos into set_rendered 2014-02-21 09:40:14 -08:00
MinRK
62f318c777 undo failed changes
before raising

otherwise, invalid values were still accepted
2014-02-20 22:57:01 -08:00
MinRK
37cb0fbdee remove websocket url
websockets should follow the kernel URL

(normal behavior is unchanged, only unused configurability is removed)
2014-02-20 22:54:36 -08:00
MinRK
b51cc50357 further tests for default values in interact
both valid and invalid
2014-02-20 22:37:04 -08:00
MinRK
acfc2d5308 set default value from dict 2014-02-20 22:36:42 -08:00
Paul Ivanov
3b109de563 minimal KernelList 2014-02-20 17:37:46 -08:00
Brian E. Granger
4bd315bda0 Merge pull request #5147 from minrk/static-url-version
Some template URL changes
2014-02-20 17:05:09 -08:00
Paul Ivanov
b3c1164798 put Running tab on the page 2014-02-20 17:01:51 -08:00
Brian E. Granger
db4960769b Merge pull request #5100 from minrk/base_kernel_url
remove base_kernel_url
2014-02-20 17:00:38 -08:00
Jonathan Frederic
ad03225cf6 Audit .html() calls take #2 2014-02-20 15:46:44 -08:00
Jonathan Frederic
82bbcf166d Fixed .. typo 2014-02-20 13:14:37 -08:00
Jonathan Frederic
0e56051a01 Added parentheses to emphasize order of op. 2014-02-20 08:48:05 -08:00
Jonathan Frederic
0eebd9e05b Added msg_throttle sync=True widget traitlet 2014-02-20 08:41:05 -08:00
Jonathan Frederic
cecf7cf06f Fixed radio button selector for new radio button class 2014-02-19 14:48:21 -08:00
Jonathan Frederic
d1d863af86 fab css 2014-02-19 14:14:14 -08:00
Jonathan Frederic
3b8beec541 Added a class for RadioButtons container
with appropriate top padding...
2014-02-19 14:14:14 -08:00
Jonathan Frederic
033ea6d88c Added bottom margin to text widget 2014-02-19 14:14:14 -08:00
Min RK
41275b062a Merge pull request #5089 from rgbkrk/azure_out
Remove legacy azure nbmanager
2014-02-19 11:42:20 -08:00
Paul Ivanov
efc01b8854 remove append_json reference
we never had such a method
2014-02-18 23:41:10 -08:00
Paul Ivanov
7b5c834649 fix IPython typo, closes #5155 2014-02-18 21:10:25 -08:00
MinRK
69cba774d9 Some template static_url tweaks
- don't try to include version in static_urls that don't point to files
- use full static_urls (with extension) for backbone and underscore, so version can be computed

closes #5141
2014-02-18 14:09:56 -08:00
Jonathan Frederic
a7fb5e1e55 Merge pull request #5114 from minrk/empty-button
use non-breaking space for button with no description
2014-02-17 08:37:08 -08:00