diff --git a/IPython/frontend/html/notebook/static/notebook/js/celltoolbarpresets/default.js b/IPython/frontend/html/notebook/static/notebook/js/celltoolbarpresets/default.js index f78489b..2b5f2b5 100644 --- a/IPython/frontend/html/notebook/static/notebook/js/celltoolbarpresets/default.js +++ b/IPython/frontend/html/notebook/static/notebook/js/celltoolbarpresets/default.js @@ -47,40 +47,37 @@ lineNumbers: true, matchBrackets: true, }); - $(dialogform).dialog({ - autoOpen: true, - height: 300, - width: 650, - modal: true, + IPython.dialog.modal({ + title: "Edit Cell Metadata", + body: dialogform, buttons: { - "Ok": function() { + "OK": { class : "btn-primary", + click: function() { //validate json and set it try { var json = JSON.parse(editor.getValue()); cell.metadata = json; - $( this ).dialog( "close" ); - } - catch(e) - { + } catch(e) { error_div.text('Warning, invalid json, not saved'); + return false; } - }, - Cancel: function() { - $( this ).dialog( "close" ); - } - }, - close: function() { - //cleanup on close - $(this).remove(); + }}, + Cancel: {} } }); editor.refresh(); } var add_raw_edit_button = function(div, cell) { - var button_container = div - var button = $('
').button({label:'Raw Edit'}) - .click(function(){raw_edit(cell); return false;}) + console.log(div, cell); + var button_container = div; + var button = $('') + .addClass("btn btn-mini") + .text("Raw Edit") + .click( function () { + raw_edit(cell); + return false; + }); button_container.append(button); } diff --git a/IPython/frontend/html/notebook/static/notebook/less/celltoolbar.less b/IPython/frontend/html/notebook/static/notebook/less/celltoolbar.less index c008f59..38c5583 100644 --- a/IPython/frontend/html/notebook/static/notebook/less/celltoolbar.less +++ b/IPython/frontend/html/notebook/static/notebook/less/celltoolbar.less @@ -9,7 +9,7 @@ border-top-left-radius: 3px; width:100%; -webkit-box-pack: end; - height:20px; + height:22px; } diff --git a/IPython/frontend/html/notebook/static/style/style.min.css b/IPython/frontend/html/notebook/static/style/style.min.css index e3218ff..c9a44f0 100644 --- a/IPython/frontend/html/notebook/static/style/style.min.css +++ b/IPython/frontend/html/notebook/static/style/style.min.css @@ -1427,7 +1427,7 @@ input.engine_num_input{height:20px;margin-bottom:2px;padding-top:0;padding-botto .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;} div.cell{width:100%;padding:5px 5px 5px 0px;margin:2px 0px 2px 0px;outline:none;} div.prompt{width:11ex;padding:0.4em;margin:0px;font-family:monospace;text-align:right;line-height:1.231em;} -.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;} +.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;} .no_input_radius{border-top-right-radius:0px;border-top-left-radius:0px;} .text_cell .ctb_prompt{display:none;} .code_cell .ctb_prompt{display:block;}