From 09ccbd29c2acc8b4325bb717d9ddd136991e6b56 2013-01-17 23:26:08 From: Matthias BUSSONNIER Date: 2013-01-17 23:26:08 Subject: [PATCH] gshow --- diff --git a/IPython/frontend/html/notebook/static/css/celltoolbar.css b/IPython/frontend/html/notebook/static/css/celltoolbar.css index 549e547..7153672 100644 --- a/IPython/frontend/html/notebook/static/css/celltoolbar.css +++ b/IPython/frontend/html/notebook/static/css/celltoolbar.css @@ -23,6 +23,27 @@ display: block; } +.ctb_wrapper{ + display: none; +} + +.toolbaron .ctb_wrapper{ + display: block; + display: -webkit-box; +} + +.toolbaron .ctb_wrapper + div > div.input_area, +.toolbaron .ctb_wrapper + div.text_cell_input{ + border-top-right-radius: 0px; + border-top-left-radius: 0px; +} + +.toolbaron > .celltoolbar { + border-bottom-right-radius: 0px; + border-bottom-left-radius: 0px; +} + + .button_container { float: right; } diff --git a/IPython/frontend/html/notebook/static/js/celltoolbar.js b/IPython/frontend/html/notebook/static/js/celltoolbar.js index 1ebb6a6..82cb18f 100644 --- a/IPython/frontend/html/notebook/static/js/celltoolbar.js +++ b/IPython/frontend/html/notebook/static/js/celltoolbar.js @@ -53,25 +53,30 @@ var IPython = (function (IPython) { CellToolbar.dropdown_preset_element.change(function() { var val = CellToolbar.dropdown_preset_element.val() if(val ==''){ - CellToolbar.hide(); + CellToolbar.global_hide(); } else { - CellToolbar.show(); + CellToolbar.global_show(); CellToolbar.activate_preset(val); } }) - CellToolbar.hide = function () { - $('.ctb_wrapper').hide(); - $('.input_area').addClass('no_input_radius'); - $('.text_cell_input').addClass('no_input_radius'); + CellToolbar.global_hide = function () { + $('body').removeClass('toolbaron'); } - CellToolbar.show = function () { - $('.ctb_wrapper').show(); - $('.input_area').removeClass('no_input_radius'); - $('.text_cell_input').removeClass('no_input_radius'); + CellToolbar.global_show = function () { + $('body').addClass('toolbaron'); + } + + CellToolbar.prototype.hide = function () { + this.element.removeClass('toolbaron'); + } + + + CellToolbar.prototype.show = function () { + this.element.addClass('toolbaron'); }