mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-15 04:00:34 +08:00
'more menu bound to actions'
This commit is contained in:
parent
19e5a8a1b4
commit
6e0134772c
@ -551,6 +551,12 @@ define(function(require){
|
||||
env.notebook.copy_notebook();
|
||||
}
|
||||
},
|
||||
'trust-notebook':{
|
||||
help: "Trust the current notebook",
|
||||
handler : function (env, event) {
|
||||
env.notebook.trust_notebook();
|
||||
}
|
||||
},
|
||||
'rename-notebook':{
|
||||
help: "Rename current notebook",
|
||||
handler : function (env, event) {
|
||||
|
@ -158,14 +158,7 @@ define([
|
||||
that._nbconvert('script', true);
|
||||
});
|
||||
|
||||
this.element.find('#rename_notebook').click(function () {
|
||||
that.save_widget.rename_notebook({notebook: that.notebook});
|
||||
});
|
||||
|
||||
|
||||
this.element.find('#trust_notebook').click(function () {
|
||||
that.notebook.trust_notebook();
|
||||
});
|
||||
this.events.on('trust_changed.Notebook', function (event, trusted) {
|
||||
if (trusted) {
|
||||
that.element.find('#trust_notebook')
|
||||
@ -203,6 +196,8 @@ define([
|
||||
});
|
||||
|
||||
var id_actions_dict = {
|
||||
'#trust_notebook' : 'jupyter-notebook:trust-notebook',
|
||||
'#rename_notebook' : 'jupyter-notebook:rename-notebook',
|
||||
'#find_and_replace' : 'jupyter-notebook:find-and-replace',
|
||||
'#save_checkpoint': 'jupyter-notebook:save-notebook',
|
||||
'#restart_kernel': 'jupyter-notebook:confirm-restart-kernel',
|
||||
|
Loading…
Reference in New Issue
Block a user