##// END OF EJS Templates
Merge pull request #6127 from minrk/fix-edit-md...
Matthias Bussonnier -
r17287:c3e6f16b merge
parent child Browse files
Show More
@@ -124,7 +124,7 b' define(['
124 autoIndent: true,
124 autoIndent: true,
125 mode: 'application/json',
125 mode: 'application/json',
126 });
126 });
127 var modal = modal({
127 var modal_obj = modal({
128 title: "Edit " + options.name + " Metadata",
128 title: "Edit " + options.name + " Metadata",
129 body: dialogform,
129 body: dialogform,
130 buttons: {
130 buttons: {
@@ -148,7 +148,7 b' define(['
148 keyboard_manager: options.keyboard_manager,
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 var dialog = {
154 var dialog = {
@@ -278,7 +278,7 b' define(['
278 }
278 }
279
279
280 // If there are no controls or the cell is a rendered TextCell hide the toolbar.
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 this.hide();
282 this.hide();
283 } else {
283 } else {
284 this.show();
284 this.show();
@@ -11,8 +11,14 b' define(['
11 var CellToolbar = celltoolbar.CellToolbar;
11 var CellToolbar = celltoolbar.CellToolbar;
12
12
13 var raw_edit = function(cell){
13 var raw_edit = function (cell) {
14 dialog.edit_metadata(cell.metadata, function (md) {
14 dialog.edit_metadata({
15 md: cell.metadata,
16 callback: function (md) {
15 cell.metadata = 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 var register = function (notebook, events) {
37 var register = function (notebook, events) {
32 CellToolbar.register_callback('default.rawedit', add_raw_edit_button);
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 var example_preset = [];
44 var example_preset = [];
34 example_preset.push('default.rawedit');
45 example_preset.push('default.rawedit');
35
46
General Comments 0
You need to be logged in to leave comments. Login now