Simple less classes
Simplify class handeling in js/css
Instead of setting several class (e.g: `cell vbox`) per dom element, use less to embed the definition of `vbox` into `cell`.
This should allow :
- more easy theming.
- responsive css on nbviewer
There are many other places where this can be done.
Change the way configurability works.
Config dict should be passed down to the parent class where it will be
merged with the default value and propagate to this only in the base
class.
This allow to both alter the configuration on a per instance basis, or
globaly by tempering with the class instance.
This also get rid of IPython global in some cases.
This add a per-cell globally toggleable toolbar
the main purpouse is to easily edit metadata.
this come with a few example like adding checkbox,
dropdown list, simple button, button with icon...
please see the js-doc of
IPython/frontend/html/notebook/static/js/MetaUI.js
for more info
Autochange highlight with cell magics
Highlight change is made on cell load and Enter keypress.
For now, it recognizes %%javascript, %%python[3], %%ruby, %%bash , %%R, %%perl.
new modes can easily be added by adding regular expression on config.js
The behavior is the following:
* If you press UP while on the first row, you go to the beginning of the line.
* If you press UP again (or were already at the beginning of the line), you
go to the previous cell.
* If you press DOWN while on the last row, you go to the end of the line.
* If you press DOWN again (or were already at the end of the line), you go
to the next cell.
This applies to `CodeCell`s and `RawCell`s.
second attempt at scrolled long output
Some amount of CSS tweaking will probably want to be done before 0.13 final,
but this is good enough for beta.
closes#1553
Cell/Worksheet metadata
* metadata dicts are attached to cells and worksheets
* restores collapsed flag to the nbformat - this change happened in the refactor, and was undocumented, and possibly accidental. But we should either document it or fix it, and this includes a fix.
* adds a new field, `nbformat_minor`, used to denote minor bumps of the notebook format that expose new capabilities but don't prevent loading by older clients.
* Add a warning in Javascript if loading a multiworksheet notebook (which will exist in the future) as current JS code will only save the first.
closes#1915
I found another bug where switching the cell type causes the loss of all
undo history for that cell. With this commit, switching the cell type
simply resets the history
For security reasons, the kernel should not be started until
after the notebook content is completely loaded and on the page.
This prevents people from creating notebooks that run nasty code
on the users machine at load time.
In order to implement this, we had to create a CodeCell.set_kernel
method that allows the kernel attribute of a CodeCell to be set
at a later time. This also fixes some error messages we were
seeing related to the kernel's channels not being setup properly
when a send was attempted.