mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
remove dependencies to namespace in Toolbar
This commit is contained in:
parent
0cd30b0a8c
commit
551b235c49
@ -61,6 +61,7 @@ define(function(){
|
||||
jglobal('Completer','notebook/js/completer');
|
||||
jglobal('Notebook','notebook/js/notebook');
|
||||
jglobal('Tooltip','notebook/js/tooltip');
|
||||
jglobal('Toolbar','notebook/js/toolbar');
|
||||
|
||||
Jupyter.version = "4.0.0.dev";
|
||||
Jupyter._target = '_blank';
|
||||
|
@ -2,9 +2,8 @@
|
||||
// Distributed under the terms of the Modified BSD License.
|
||||
|
||||
define([
|
||||
'base/js/namespace',
|
||||
'jquery'
|
||||
], function(IPython, $) {
|
||||
], function($) {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
@ -53,27 +52,6 @@ define([
|
||||
* ...
|
||||
* ]
|
||||
*
|
||||
* For backward compatibility this also support the
|
||||
* old methods of adding a button directly bound to callbacks:
|
||||
* @example
|
||||
* # deprecate, do not use
|
||||
* IPython.toolbar.add_buttons_group([
|
||||
* {
|
||||
* label:'my button',
|
||||
* icon:'icon-hdd',
|
||||
* callback:function(){alert('hoho')},
|
||||
* id : 'my_button_id', // this is optional
|
||||
* },
|
||||
* {
|
||||
* label:'my second button',
|
||||
* icon:'icon-play',
|
||||
* callback:function(){alert('be carefull I cut')}
|
||||
* }
|
||||
* ],
|
||||
* "my_button_group_id"
|
||||
* )
|
||||
*
|
||||
* @method add_buttons_group
|
||||
* @param list {List}
|
||||
* List of button of the group, with the following paramter for each :
|
||||
* @param list.label {string} text to show on button hover
|
||||
@ -154,8 +132,5 @@ define([
|
||||
this.element.toggle();
|
||||
};
|
||||
|
||||
// Backwards compatibility.
|
||||
IPython.ToolBar = ToolBar;
|
||||
|
||||
return {'ToolBar': ToolBar};
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user