Show More
@@ -47,40 +47,37 b'' | |||||
47 | lineNumbers: true, |
|
47 | lineNumbers: true, | |
48 | matchBrackets: true, |
|
48 | matchBrackets: true, | |
49 | }); |
|
49 | }); | |
50 |
|
|
50 | IPython.dialog.modal({ | |
51 | autoOpen: true, |
|
51 | title: "Edit Cell Metadata", | |
52 | height: 300, |
|
52 | body: dialogform, | |
53 | width: 650, |
|
|||
54 | modal: true, |
|
|||
55 | buttons: { |
|
53 | buttons: { | |
56 |
"O |
|
54 | "OK": { class : "btn-primary", | |
|
55 | click: function() { | |||
57 | //validate json and set it |
|
56 | //validate json and set it | |
58 | try { |
|
57 | try { | |
59 | var json = JSON.parse(editor.getValue()); |
|
58 | var json = JSON.parse(editor.getValue()); | |
60 | cell.metadata = json; |
|
59 | cell.metadata = json; | |
61 | $( this ).dialog( "close" ); |
|
60 | } catch(e) { | |
62 | } |
|
|||
63 | catch(e) |
|
|||
64 | { |
|
|||
65 | error_div.text('Warning, invalid json, not saved'); |
|
61 | error_div.text('Warning, invalid json, not saved'); | |
|
62 | return false; | |||
66 | } |
|
63 | } | |
67 | }, |
|
64 | }}, | |
68 |
Cancel: |
|
65 | Cancel: {} | |
69 | $( this ).dialog( "close" ); |
|
|||
70 | } |
|
|||
71 | }, |
|
|||
72 | close: function() { |
|
|||
73 | //cleanup on close |
|
|||
74 | $(this).remove(); |
|
|||
75 | } |
|
66 | } | |
76 | }); |
|
67 | }); | |
77 | editor.refresh(); |
|
68 | editor.refresh(); | |
78 | } |
|
69 | } | |
79 |
|
70 | |||
80 | var add_raw_edit_button = function(div, cell) { |
|
71 | var add_raw_edit_button = function(div, cell) { | |
81 | var button_container = div |
|
72 | console.log(div, cell); | |
82 | var button = $('<div/>').button({label:'Raw Edit'}) |
|
73 | var button_container = div; | |
83 | .click(function(){raw_edit(cell); return false;}) |
|
74 | var button = $('<button/>') | |
|
75 | .addClass("btn btn-mini") | |||
|
76 | .text("Raw Edit") | |||
|
77 | .click( function () { | |||
|
78 | raw_edit(cell); | |||
|
79 | return false; | |||
|
80 | }); | |||
84 | button_container.append(button); |
|
81 | button_container.append(button); | |
85 | } |
|
82 | } | |
86 |
|
83 |
@@ -9,7 +9,7 b'' | |||||
9 | border-top-left-radius: 3px; |
|
9 | border-top-left-radius: 3px; | |
10 | width:100%; |
|
10 | width:100%; | |
11 | -webkit-box-pack: end; |
|
11 | -webkit-box-pack: end; | |
12 |
height:2 |
|
12 | height:22px; | |
13 | } |
|
13 | } | |
14 |
|
14 | |||
15 |
|
15 |
@@ -1427,7 +1427,7 b' input.engine_num_input{height:20px;margin-bottom:2px;padding-top:0;padding-botto' | |||||
1427 | .cell{border:1px solid transparent;display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:vertical;-moz-box-align:stretch;display:box;box-orient:vertical;box-align:stretch;width:100%;}.cell.selected{border-radius:4px;border:thin #ababab solid;} |
|
1427 | .cell{border:1px solid transparent;display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:vertical;-moz-box-align:stretch;display:box;box-orient:vertical;box-align:stretch;width:100%;}.cell.selected{border-radius:4px;border:thin #ababab solid;} | |
1428 | div.cell{width:100%;padding:5px 5px 5px 0px;margin:2px 0px 2px 0px;outline:none;} |
|
1428 | div.cell{width:100%;padding:5px 5px 5px 0px;margin:2px 0px 2px 0px;outline:none;} | |
1429 | div.prompt{width:11ex;padding:0.4em;margin:0px;font-family:monospace;text-align:right;line-height:1.231em;} |
|
1429 | div.prompt{width:11ex;padding:0.4em;margin:0px;font-family:monospace;text-align:right;line-height:1.231em;} | |
1430 |
.celltoolbar{border:thin solid #CFCFCF;border-bottom:none;background:#EEE;border-top-right-radius:3px;border-top-left-radius:3px;width:100%;-webkit-box-pack:end;height:2 |
|
1430 | .celltoolbar{border:thin solid #CFCFCF;border-bottom:none;background:#EEE;border-top-right-radius:3px;border-top-left-radius:3px;width:100%;-webkit-box-pack:end;height:22px;} | |
1431 | .no_input_radius{border-top-right-radius:0px;border-top-left-radius:0px;} |
|
1431 | .no_input_radius{border-top-right-radius:0px;border-top-left-radius:0px;} | |
1432 | .text_cell .ctb_prompt{display:none;} |
|
1432 | .text_cell .ctb_prompt{display:none;} | |
1433 | .code_cell .ctb_prompt{display:block;} |
|
1433 | .code_cell .ctb_prompt{display:block;} |
General Comments 0
You need to be logged in to leave comments.
Login now