From f31f43fb62653a510f37540912dcd688dc4c8160 2013-01-14 07:40:55 From: Matthias BUSSONNIER Date: 2013-01-14 07:40:55 Subject: [PATCH] rename metaui -> celltoolbar --- diff --git a/IPython/frontend/html/notebook/static/css/metaui.css b/IPython/frontend/html/notebook/static/css/metaui.css index 1e1e6c0..c442689 100644 --- a/IPython/frontend/html/notebook/static/css/metaui.css +++ b/IPython/frontend/html/notebook/static/css/metaui.css @@ -1,6 +1,6 @@ /*Css for the metadata edit area*/ -.metaedit{ +.celltoolbar{ border:thin solid #DDD; margin-left:81px; border-bottom:none; @@ -10,24 +10,24 @@ display:none; } -.code_cell .metaedit{ +.code_cell .celltoolbar{ margin-left:81px; } -.text_cell .metaedit{ +.text_cell .celltoolbar{ margin-left:0px; } -.editmetaon div.input_area , .editmetaon div.text_cell_input{ +.celltoolbar-on div.input_area , .celltoolbar-on div.text_cell_input{ border-top-right-radius: 0px; border-top-left-radius: 0px; } -.editmetaon .metaedit { +.celltoolbar-on .celltoolbar { display:block; } -.metaedit ui-button { +.celltoolbar ui-button { border :none; } @@ -41,13 +41,13 @@ border : none; } -.metaedit select { +.celltoolbar select { margin:10px; margin-top:0px; margin-bottom:0px; } -.metaedit input[type=checkbox] { +.celltoolbar input[type=checkbox] { margin-bottom:1px; } diff --git a/IPython/frontend/html/notebook/static/js/cell.js b/IPython/frontend/html/notebook/static/js/cell.js index 1092b5b..0006a91 100644 --- a/IPython/frontend/html/notebook/static/js/cell.js +++ b/IPython/frontend/html/notebook/static/js/cell.js @@ -163,7 +163,7 @@ var IPython = (function (IPython) { if (data.metadata !== undefined) { this.metadata = data.metadata; } - this.metaui.rebuild(); + this.celltoolbar.rebuild(); }; diff --git a/IPython/frontend/html/notebook/static/js/codecell.js b/IPython/frontend/html/notebook/static/js/codecell.js index 450da1c..0c57d3d 100644 --- a/IPython/frontend/html/notebook/static/js/codecell.js +++ b/IPython/frontend/html/notebook/static/js/codecell.js @@ -58,10 +58,10 @@ var IPython = (function (IPython) { /** @method create_element */ CodeCell.prototype.create_element = function () { - this.metaui = new IPython.MetaUI(this); + this.celltoolbar = new IPython.CellToolbar(this); var cell = $('
').addClass('cell border-box-sizing code_cell vbox'); - cell.append(this.metaui.$element); + cell.append(this.celltoolbar.element); cell.attr('tabindex','2'); var input = $('
').addClass('input hbox'); input.append($('
').addClass('prompt input_prompt')); diff --git a/IPython/frontend/html/notebook/static/js/custom.js b/IPython/frontend/html/notebook/static/js/custom.js index d1f01b6..c565753 100644 --- a/IPython/frontend/html/notebook/static/js/custom.js +++ b/IPython/frontend/html/notebook/static/js/custom.js @@ -34,10 +34,10 @@ * to load custom script into the notebook. * * // to load the metadata ui extension example. - * $.getScript('/static/js/examples/metaui.example.js'); + * $.getScript('/static/js/examples/celltoolbar.example.js'); * // or * // to load the metadata ui extension to control slideshow mode / reveal js for nbconvert - * $.getScript('/static/js/examples/metaui.slideshow.js'); + * $.getScript('/static/js/examples/celltoolbar.slideshow.js'); * * * @module IPython diff --git a/IPython/frontend/html/notebook/static/js/examples/metaui.example.js b/IPython/frontend/html/notebook/static/js/examples/celltoolbar.example.js similarity index 92% rename from IPython/frontend/html/notebook/static/js/examples/metaui.example.js rename to IPython/frontend/html/notebook/static/js/examples/celltoolbar.example.js index 414d05a..e190a62 100644 --- a/IPython/frontend/html/notebook/static/js/examples/metaui.example.js +++ b/IPython/frontend/html/notebook/static/js/examples/celltoolbar.example.js @@ -6,23 +6,23 @@ //---------------------------------------------------------------------------- //============================================================================ -// MetaUI Example +// CellToolbar Example //============================================================================ /** - * Example Use for the MetaUI library + * Example Use for the CellToolbar library * add the following to your custom.js to load - * metadata UI for slideshow + * Celltoolbar UI for slideshow * * ``` - * $.getScript('/static/js/examples/metaui.example.js'); + * $.getScript('/static/js/examples/celltoolbar.example.js'); * ``` */ // IIFE without asignement, we don't modifiy the IPython namespace (function (IPython) { "use strict"; - var MetaUI = IPython.MetaUI; + var CellToolbar = IPython.CellToolbar; var raw_edit = function(cell){ @@ -89,7 +89,7 @@ button_container.append(button); } - MetaUI.register_callback('example.rawedit',add_raw_edit_button); + CellToolbar.register_callback('example.rawedit',add_raw_edit_button); var example_preset = [] example_preset.push('example.rawedit'); @@ -121,7 +121,7 @@ button_container.append(button); } - MetaUI.register_callback('example.lock',simple_button); + CellToolbar.register_callback('example.lock',simple_button); example_preset.push('example.lock'); var toggle_test = function(div, cell) { @@ -135,7 +135,7 @@ button_container.append(button); } - MetaUI.register_callback('example.toggle',toggle_test); + CellToolbar.register_callback('example.toggle',toggle_test); example_preset.push('example.toggle'); var checkbox_test = function(div, cell) { @@ -154,7 +154,7 @@ } - MetaUI.register_callback('example.checkbox',checkbox_test); + CellToolbar.register_callback('example.checkbox',checkbox_test); example_preset.push('example.checkbox'); var select_test = function(div, cell) { @@ -174,11 +174,11 @@ } - MetaUI.register_callback('example.select',select_test); + CellToolbar.register_callback('example.select',select_test); example_preset.push('example.select'); - MetaUI.register_preset('example',example_preset); - MetaUI.set_preset('example'); + CellToolbar.register_preset('example',example_preset); + CellToolbar.set_preset('example'); console.log('Example extension for metadata editting loaded.'); }(IPython)); diff --git a/IPython/frontend/html/notebook/static/js/maintoolbar.js b/IPython/frontend/html/notebook/static/js/maintoolbar.js index a73e12d..a58c1e4 100644 --- a/IPython/frontend/html/notebook/static/js/maintoolbar.js +++ b/IPython/frontend/html/notebook/static/js/maintoolbar.js @@ -18,8 +18,8 @@ var IPython = (function (IPython) { this.add_drop_down_list(); this.bind_events(); $(this.selector) - .append($('