Show More
@@ -124,7 +124,7 b' define([' | |||
|
124 | 124 | autoIndent: true, |
|
125 | 125 | mode: 'application/json', |
|
126 | 126 | }); |
|
127 | var modal = modal({ | |
|
127 | var modal_obj = modal({ | |
|
128 | 128 | title: "Edit " + options.name + " Metadata", |
|
129 | 129 | body: dialogform, |
|
130 | 130 | buttons: { |
@@ -148,7 +148,7 b' define([' | |||
|
148 | 148 | keyboard_manager: options.keyboard_manager, |
|
149 | 149 | }); |
|
150 | 150 | |
|
151 | modal.on('shown.bs.modal', function(){ editor.refresh(); }); | |
|
151 | modal_obj.on('shown.bs.modal', function(){ editor.refresh(); }); | |
|
152 | 152 | }; |
|
153 | 153 | |
|
154 | 154 | var dialog = { |
@@ -278,7 +278,7 b' define([' | |||
|
278 | 278 | } |
|
279 | 279 | |
|
280 | 280 | // If there are no controls or the cell is a rendered TextCell hide the toolbar. |
|
281 | if (!this.ui_controls_list.length || (this.cell_type != 'code' && this.cell.rendered)) { | |
|
281 | if (!this.ui_controls_list.length || (this.cell.cell_type != 'code' && this.cell.rendered)) { | |
|
282 | 282 | this.hide(); |
|
283 | 283 | } else { |
|
284 | 284 | this.show(); |
@@ -10,9 +10,15 b' define([' | |||
|
10 | 10 | |
|
11 | 11 | var CellToolbar = celltoolbar.CellToolbar; |
|
12 | 12 | |
|
13 | var raw_edit = function(cell){ | |
|
14 |
dialog.edit_metadata( |
|
|
15 |
cell.metadata |
|
|
13 | var raw_edit = function (cell) { | |
|
14 | dialog.edit_metadata({ | |
|
15 | md: cell.metadata, | |
|
16 | callback: function (md) { | |
|
17 | cell.metadata = md; | |
|
18 | }, | |
|
19 | name: 'Cell', | |
|
20 | notebook: this.notebook, | |
|
21 | keyboard_manager: this.keyboard_manager | |
|
16 | 22 | }); |
|
17 | 23 | }; |
|
18 | 24 | |
@@ -30,6 +36,11 b' define([' | |||
|
30 | 36 | |
|
31 | 37 | var register = function (notebook, events) { |
|
32 | 38 | CellToolbar.register_callback('default.rawedit', add_raw_edit_button); |
|
39 | raw_edit = $.proxy(raw_edit, { | |
|
40 | notebook: notebook, | |
|
41 | keyboard_manager: notebook.keyboard_manager | |
|
42 | }); | |
|
43 | ||
|
33 | 44 | var example_preset = []; |
|
34 | 45 | example_preset.push('default.rawedit'); |
|
35 | 46 |
General Comments 0
You need to be logged in to leave comments.
Login now