diff --git a/IPython/html/static/base/js/dialog.js b/IPython/html/static/base/js/dialog.js
index 246f93f..c6ffae4 100644
--- a/IPython/html/static/base/js/dialog.js
+++ b/IPython/html/static/base/js/dialog.js
@@ -124,7 +124,7 @@ define([
autoIndent: true,
mode: 'application/json',
});
- var modal = modal({
+ var modal_obj = modal({
title: "Edit " + options.name + " Metadata",
body: dialogform,
buttons: {
@@ -148,7 +148,7 @@ define([
keyboard_manager: options.keyboard_manager,
});
- modal.on('shown.bs.modal', function(){ editor.refresh(); });
+ modal_obj.on('shown.bs.modal', function(){ editor.refresh(); });
};
var dialog = {
diff --git a/IPython/html/static/notebook/js/celltoolbar.js b/IPython/html/static/notebook/js/celltoolbar.js
index 3394218..50c6bd9 100644
--- a/IPython/html/static/notebook/js/celltoolbar.js
+++ b/IPython/html/static/notebook/js/celltoolbar.js
@@ -278,7 +278,7 @@ define([
}
// If there are no controls or the cell is a rendered TextCell hide the toolbar.
- if (!this.ui_controls_list.length || (this.cell_type != 'code' && this.cell.rendered)) {
+ if (!this.ui_controls_list.length || (this.cell.cell_type != 'code' && this.cell.rendered)) {
this.hide();
} else {
this.show();
diff --git a/IPython/html/static/notebook/js/celltoolbarpresets/default.js b/IPython/html/static/notebook/js/celltoolbarpresets/default.js
index 29c7154..a44db5d 100644
--- a/IPython/html/static/notebook/js/celltoolbarpresets/default.js
+++ b/IPython/html/static/notebook/js/celltoolbarpresets/default.js
@@ -10,9 +10,15 @@ define([
var CellToolbar = celltoolbar.CellToolbar;
- var raw_edit = function(cell){
- dialog.edit_metadata(cell.metadata, function (md) {
- cell.metadata = md;
+ var raw_edit = function (cell) {
+ dialog.edit_metadata({
+ md: cell.metadata,
+ callback: function (md) {
+ cell.metadata = md;
+ },
+ name: 'Cell',
+ notebook: this.notebook,
+ keyboard_manager: this.keyboard_manager
});
};
@@ -30,6 +36,11 @@ define([
var register = function (notebook, events) {
CellToolbar.register_callback('default.rawedit', add_raw_edit_button);
+ raw_edit = $.proxy(raw_edit, {
+ notebook: notebook,
+ keyboard_manager: notebook.keyboard_manager
+ });
+
var example_preset = [];
example_preset.push('default.rawedit');