##// END OF EJS Templates
fix cell toolbar
MinRK -
Show More
@@ -47,40 +47,37 b''
47 47 lineNumbers: true,
48 48 matchBrackets: true,
49 49 });
50 $(dialogform).dialog({
51 autoOpen: true,
52 height: 300,
53 width: 650,
54 modal: true,
50 IPython.dialog.modal({
51 title: "Edit Cell Metadata",
52 body: dialogform,
55 53 buttons: {
56 "Ok": function() {
54 "OK": { class : "btn-primary",
55 click: function() {
57 56 //validate json and set it
58 57 try {
59 58 var json = JSON.parse(editor.getValue());
60 59 cell.metadata = json;
61 $( this ).dialog( "close" );
62 }
63 catch(e)
64 {
60 } catch(e) {
65 61 error_div.text('Warning, invalid json, not saved');
62 return false;
66 63 }
67 },
68 Cancel: function() {
69 $( this ).dialog( "close" );
70 }
71 },
72 close: function() {
73 //cleanup on close
74 $(this).remove();
64 }},
65 Cancel: {}
75 66 }
76 67 });
77 68 editor.refresh();
78 69 }
79 70
80 71 var add_raw_edit_button = function(div, cell) {
81 var button_container = div
82 var button = $('<div/>').button({label:'Raw Edit'})
83 .click(function(){raw_edit(cell); return false;})
72 console.log(div, cell);
73 var button_container = div;
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 81 button_container.append(button);
85 82 }
86 83
@@ -9,7 +9,7 b''
9 9 border-top-left-radius: 3px;
10 10 width:100%;
11 11 -webkit-box-pack: end;
12 height:20px;
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 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 1428 div.cell{width:100%;padding:5px 5px 5px 0px;margin:2px 0px 2px 0px;outline:none;}
1429 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:20px;}
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 1431 .no_input_radius{border-top-right-radius:0px;border-top-left-radius:0px;}
1432 1432 .text_cell .ctb_prompt{display:none;}
1433 1433 .code_cell .ctb_prompt{display:block;}
General Comments 0
You need to be logged in to leave comments. Login now