Commit Graph

2090 Commits

Author SHA1 Message Date
Matthias Bussonnier
95881ccb0e Merge pull request #172 from Carreau/deepcopy
Deepcopy

rework of config system to fix non-configurability bugs.
2013-06-06 09:10:00 -07:00
Matthias BUSSONNIER
2208e387d9 finish up config merging 2013-06-06 00:10:53 +02:00
Matthias Bussonnier
4469559b19 Merge pull request #3401 from minrk/rollbackcmcss
rollback #3358

#3358 was a workaround for a CodeMirror (actually Chrome seems to be the one at fault) bug drawing scrollbars over text, when there isn't anything to scroll. The workaround was a compromise, always drawing the space for the scrollbars to prevent the overlay, but reducing the margin so it isn't quite so annoying in the ~99% of the time that there are no scrollbars. It turns out (#3397, #3399) that the margins are not reliable, so the margin adjustment could cause the very same problem.

closes #3391, #3397, #3399

For users who need to hide the scrollbars while zooming text while we wait for a CodeMirror release, you can add the following to your custom.css:

.CodeMirror-scroll, .CodeMirror-wrap .CodeMirror-scroll {
 overflow: scroll;
}

.CodeMirror-vscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-hscrollbar {
   visibility: hidden;
}
or just put CodeMirror master in your profile's static/components directory.
2013-06-04 14:51:42 -07:00
Matthias Bussonnier
e066135a7c Merge pull request #3373 from minrk/cookiesecret
make cookie_secret configurable

Allows config to specify logins that survive across server instances (default behavior unchanged).

Add warning about not sharing config files with cookie secret.
2013-06-04 14:48:53 -07:00
MinRK
1f841c64e5 add note about sharing config files with cookie_secret 2013-06-04 14:37:19 -07:00
Matthias BUSSONNIER
9f229a8e1c Use {{static_url}} as require search root 2013-06-04 20:47:38 +02:00
MinRK
977b96ef1f rollback #3358
closes #3391

For users who need to hide the scrollbars while zooming text in the meantime, you can add the following to your custom.css:

```css
.CodeMirror-scroll, .CodeMirror-wrap .CodeMirror-scroll {
  overflow: scroll;
}

.CodeMirror-vscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-hscrollbar {
    visibility: hidden;
}
```
2013-06-04 11:22:49 -07:00
Matthias BUSSONNIER
66ff7dde48 de-require-config 2013-06-04 10:11:41 +02:00
Matthias Bussonnier
32ac1e9421 Merge pull request #3307 from minrk/wsproto
switch default ws_url logic to js side

In some cases (proxies, #3305), the request object doesn't have the right information about the originating information. This changes the default behavior, so that ws_url is generally empty by default, which the javascript takes to mean 'the same as http'. This is simpler and should be more resilient than trying a guess on server-side.

also replaces unused websocket_host with websocket_url

Rather than specifying only the hostname, it makes much more sense to specify the whole protocol,host,port in a single go.
2013-06-02 11:36:17 -07:00
Min RK
e05b3b3b12 Merge pull request #3392 from Carreau/fix-anchor
Restore anchor link on h2-h6
2013-06-02 11:25:13 -07:00
Matthias BUSSONNIER
b52aa7e66d restore anchore on h2-h6 links 2013-06-02 18:19:39 +02:00
Matthias Bussonnier
ceef803109 Merge pull request #3369 from Carreau/auto-scroll
Use different treshold for (auto)scroll in output

Use different treshold for (auto)scroll in output
Allow, in particular to switch to scolling for longer input (or disable
it) by still keeping the possibility to manually toggle the output to
scroll.

cf jsdoc, 
OutputArea.auto_scroll_threshold
and
OutputArea.minimum_scroll_threshold

OutputArea.auto_scroll_threshold < 0 will prevent auto_scroll from ever happening.
2013-06-02 08:46:25 -07:00
Matthias Bussonnier
fea07e81ce Merge pull request #3370 from minrk/nonasciicp
used in comparison check for notebook name change.

Unless the filenames are normalized, unchanged names may result in false positives for a name change (e.g. OS X uses NFD on the filesystem, so u'\xfc' roundtripped to the filesystem will be u'u\u0308'), which can result in the first save of a notebook after open performing the following actions:

save the recently opened notebook
old_name != new_name, so name change detected
delete old_name (which is actually new_name), which ultimately deletes the just-saved notebook
In master, this has a symptom of the first checkpoint failing because the first save actually deleted the file, and you can't checkpoint a notebook that doesn't exist.

closes #3360
2013-06-02 08:43:20 -07:00
Matthias Bussonnier
874ee503cd Merge pull request #3372 from minrk/cookiename
base default cookie name on request host+port
2013-06-02 08:42:36 -07:00
Matthias Bussonnier
c7a13d15b8 Merge pull request #3378 from minrk/dragDropSafari
disable CodeMirror drag/drop on Safari
2013-06-02 08:40:49 -07:00
Matthias Bussonnier
a063c9a094 Merge pull request #3358 from minrk/cm-scroll
workaround spurious CodeMirror scrollbars
2013-06-02 08:39:07 -07:00
Matthias Bussonnier
3d57f9b0a0 Merge pull request #3371 from minrk/dirty-event
make setting the notebook dirty flag an event
2013-06-02 08:35:44 -07:00
MinRK
711edfaed9 use dirty event to set autosaved/unsaved changes
instead of last-saved timestamp
2013-05-31 21:42:49 -07:00
Min RK
59ef1fb2ed Merge pull request #3387 from takluyver/py3-submodules
Make submodule checks work under Python 3

introduces a regression in the submodule check for people who may have fetched a tarball from GitHub,
which will now install an incomplete IPython.
2013-05-30 11:52:51 -07:00
Matthias Bussonnier
665a7b9acc Merge pull request #3357 from minrk/heading-links
move anchor-link off of heading text
2013-05-30 10:02:31 -07:00
MinRK
d48409cdf6 use .text() instead of .html() 2013-05-30 09:59:16 -07:00
MinRK
7fb4e218dc toggle heading-link visibility with CSS alone 2013-05-30 09:47:48 -07:00
Thomas Kluyver
642ef40c82 Make submodule checks work under Python 3.
Closes gh-3385
2013-05-30 11:17:51 +01:00
Matthias Bussonnier
17e4486de2 set autoscroll default back to 100 2013-05-30 09:08:01 +03:00
MinRK
438216ce5e replace unused websocket_host with websocket_url
Rather than specifying only the hostname, it makes much more sense
to specify the whole protocol,host,port in a single go.
2013-05-29 15:53:09 -07:00
MinRK
2b45d245a4 switch default ws_url logic to js side
In some cases (proxies, #3305), the request object doesn't have the right information about the originating information.  This changes the default behavior, so that `ws_url` is generally empty by default, which the javascript takes to mean 'the same as http'.  This is simpler and should be more resilient than trying a guess on server-side.
2013-05-29 15:53:04 -07:00
MinRK
38b58e784c make sure test files are installed 2013-05-29 14:10:57 -07:00
Matthias BUSSONNIER
0c6c87b446 document undefined behavior for 0 parameter 2013-05-29 11:19:19 +02:00
Matthias BUSSONNIER
c6f9d3ed23 Merge PR 137 into master
Conflicts:
	README.rst

Full Refactor of nbconvert 1 and 2 for the longer plan in merging it
into IPython itself.
2013-05-29 09:53:17 +02:00
MinRK
f2138c0167 disable CodeMirror drag/drop on Safari
workaround for marijnh/CodeMirror#332

closes #3375
2013-05-28 22:43:22 -07:00
MinRK
f3a2d5fa27 remove unused is_typing js util 2013-05-28 14:16:39 -07:00
MinRK
4d8bbeb356 trigger dirty on CM change 2013-05-28 14:14:24 -07:00
MinRK
b0d0ed0505 make cookie_secret configurable
allows config to specify logins that survive across server instances (default behavior unchanged).

Depends on PR #3372
2013-05-28 13:34:08 -07:00
MinRK
78d5827c47 base default cookie name on request host+port
instead of random.

The random cookie name meant that every time you restarted the notebook it would get a new key in the cookie for the same host, resulting in an ever-growing cookie full of obsolete data.
2013-05-28 13:23:01 -07:00
Matthias BUSSONNIER
0c2dd44f8d rename scroll_threshold, add minimum_ prefix 2013-05-28 21:51:46 +02:00
MinRK
04726d2563 setting the notebook dirty flag is now an event
set_dirty.Notebook
2013-05-28 12:44:08 -07:00
MinRK
91c82dcfae add is_typing utility
simple, liberal check for whether a keypress is probably typing or not.
2013-05-28 12:43:03 -07:00
Matthias Bussonnier
70ca4f47e5 Merge pull request #3368 from samuela/master
Reenable bracket matching in CodeMirror. 

Upstream code was moved in a add-on, just load this add-on, configuration was still in the right place.
2013-05-28 12:35:49 -07:00
Matthias BUSSONNIER
84d9694a59 improve js documentation 2013-05-28 21:25:21 +02:00
MinRK
718bf61bd3 normalize unicode notebook filenames
used in comparison check for notebook name change.

Unless the filenames are normalized,
unchanged names may result in false positives for a name change
(e.g. OS X uses NFD on the filesystem,
so u'\xfc' roundtripped to the filesystem will be u'u\u0308'),
which can result in the first save of a notebook after open performing the following actions:

1. save the recently opened notebook
2. `old_name != new_name`, so name change detected
3. delete old_name (which is actually new_name), which ultimately deletes the just-saved notebook

In master, this has a symptom of the first checkpoint failing because the first save actually deleted the file, and you can't checkpoint a notebook that doesn't exist.

closes #3360
2013-05-28 11:47:05 -07:00
Matthias BUSSONNIER
ed22684ef2 Use different threshold for (auto)scroll in output
Allow, in particular to switch to scolling for longer input (or disable
it) by still keeping the possibility to manually toggle the output to
scroll.
2013-05-28 20:26:04 +02:00
Samuel Ainsworth
9bdeaee734 Reenable bracket matching 2013-05-28 10:48:27 -04:00
Jonathan Frederic
2102ad6a57 Rename api to exporters, as in discussion 2013-05-27 14:39:45 -07:00
Matthias BUSSONNIER
fafb84e83c Inject requirejs in notebook and start using it. 2013-05-26 21:38:25 +02:00
MinRK
0cff42ffff move anchor-link off of heading text
avoids confusion about where to click, matching Sphinx-style output.

Moves the relevant style to textcell.less
2013-05-24 16:55:32 -07:00
MinRK
21a6e1f892 workaround spurious CodeMirror scrollbars
always draw scrollbar margin, so that inappropriate scrollbars never overlap the last line.
To compensate for the extra space, the margin between the scrollbar and the last line is shrunk significantly.
2013-05-24 16:54:56 -07:00
Fernando Perez
695d7af2a5 Merge pull request #3325 from ellisonbg/jsreorg
Organize the JS and less files by component, in the `static` directory of the notebook.

This PR does the client side re-org that parallels the server side work in #3321.  There are now subdirectories in `static/` for each part of the client; roughly speaking there is one subdir for each page, web service or component.
2013-05-24 15:19:34 -07:00
Brian E. Granger
f3dc5a858a Merge pull request #8 from minrk/jsreorg
CSS tweaks
2013-05-24 11:45:56 -07:00
MinRK
bb4228d4e5 remove outline from heading-anchor links 2013-05-24 11:27:21 -07:00
MinRK
bf97e27c22 don't hardcode output_area pre background
set it to transparent, thus inheriting from the parent div.
2013-05-24 11:27:21 -07:00