##// END OF EJS Templates
Remove EventManager reset methods, because they violate encapsulation....
Remove EventManager reset methods, because they violate encapsulation. The whole idea of the EventManager is that you can register hooks without worrying about what hooks other pieces of code might be registering. The reset methods violate this separation of concerns, since they will blow away everyone else's hooks too. (See gh-6680 for an example of this breaking things.) Since there is never any safe way to use them, we simply remove them entirely.

File last commit:

r17572:3b9a023b
r18547:4043b271
Show More
custom.js
69 lines | 2.5 KiB | application/javascript | JavascriptLexer
Matthias BUSSONNIER
document custom.js
r8740 // leave at least 2 line with only a star on it below, or doc generation fails
/**
*
*
* Placeholder for custom user javascript
Brian E. Granger
Removing one level uf subdirs in static/custom.
r10739 * mainly to be overridden in profile/static/custom/custom.js
Matthias BUSSONNIER
document custom.js
r8740 * This will always be an empty file in IPython
*
Brian E. Granger
Removing one level uf subdirs in static/custom.
r10739 * User could add any javascript in the `profile/static/custom/custom.js` file
Matthias BUSSONNIER
document custom.js
r8740 * (and should create it if it does not exist).
* It will be executed by the ipython notebook at load time.
*
Brian E. Granger
Fixing path to custom.css in comment.
r10742 * Same thing with `profile/static/custom/custom.css` to inject custom css into the notebook.
patricktokeeffe
Update custom.js...
r17548 *
* Classes and functions are available at load time and may be accessed plainly:
*
patricktokeeffe
Update custom.js
r17572 * IPython.Cell.options_default.cm_config.extraKeys['Home'] = 'goLineLeft';
* IPython.Cell.options_default.cm_config.extraKeys['End'] = 'goLineRight';
patricktokeeffe
Update custom.js...
r17548 *
* Instances are created later however and must be accessed using events:
*
* $([IPython.events]).on("app_initialized.NotebookApp", function () {
* IPython.keyboard_manager....
* });
Matthias BUSSONNIER
Fix layout and add note about custom.css
r8741 *
Jean-Christophe Jaskula
Creating an entry point for notebook manager extensions...
r17047 * __Example 1:__
Matthias BUSSONNIER
Fix layout and add note about custom.css
r8741 *
Matthias BUSSONNIER
document custom.js
r8740 * Create a custom button in toolbar that execute `%qtconsole` in kernel
* and hence open a qtconsole attached to the same kernel as the current notebook
*
Jonathan Frederic
Updated custom.js template to reflect IPython namespace changes
r17218 * IPython.events.on('app_initialized.NotebookApp', function(){
Matthias BUSSONNIER
document custom.js
r8740 * IPython.toolbar.add_buttons_group([
* {
* 'label' : 'run qtconsole',
MinRK
update example custom.js...
r12351 * 'icon' : 'icon-terminal', // select your icon from http://fortawesome.github.io/Font-Awesome/icons
* 'callback': function () {
* IPython.notebook.kernel.execute('%qtconsole')
* }
Matthias BUSSONNIER
document custom.js
r8740 * }
* // add more button here if needed.
* ]);
* });
*
Jean-Christophe Jaskula
Creating an entry point for notebook manager extensions...
r17047 * __Example 2:__
*
* At the completion of the dashboard loading, load an unofficial javascript extension
* that is installed in profile/static/custom/
*
Jonathan Frederic
Updated custom.js template to reflect IPython namespace changes
r17218 * IPython.events.on('app_initialized.DashboardApp', function(){
Jean-Christophe Jaskula
Creating an entry point for notebook manager extensions...
r17047 * require(['custom/unofficial_extension.js'])
* });
*
* __Example 3:__
Matthias BUSSONNIER
Split metadataui into multiple file...
r9057 *
* Use `jQuery.getScript(url [, success(script, textStatus, jqXHR)] );`
* to load custom script into the notebook.
*
* // to load the metadata ui extension example.
Brian E. Granger
Removing one level uf subdirs in static/custom.
r10739 * $.getScript('/static/notebook/js/celltoolbarpresets/example.js');
Matthias BUSSONNIER
Split metadataui into multiple file...
r9057 * // or
* // to load the metadata ui extension to control slideshow mode / reveal js for nbconvert
Brian E. Granger
Removing one level uf subdirs in static/custom.
r10739 * $.getScript('/static/notebook/js/celltoolbarpresets/slideshow.js');
Matthias BUSSONNIER
Split metadataui into multiple file...
r9057 *
*
Matthias BUSSONNIER
document custom.js
r8740 * @module IPython
* @namespace IPython
* @class customjs
* @static
*/