From 9da648b4d06c3d5a901ceae51bb74e2139a75222 Mon Sep 17 00:00:00 2001 From: MinRK Date: Fri, 31 May 2013 13:51:23 -0700 Subject: [PATCH] bootstrap menubar --- .../notebook/static/notebook/js/menubar.js | 6 +- .../static/notebook/less/menubar.less | 11 +++ .../html/notebook/templates/notebook.html | 96 ++++++++++--------- 3 files changed, 65 insertions(+), 48 deletions(-) diff --git a/IPython/frontend/html/notebook/static/notebook/js/menubar.js b/IPython/frontend/html/notebook/static/notebook/js/menubar.js index 6c2320507..8773dfdae 100644 --- a/IPython/frontend/html/notebook/static/notebook/js/menubar.js +++ b/IPython/frontend/html/notebook/static/notebook/js/menubar.js @@ -52,15 +52,13 @@ var IPython = (function (IPython) { MenuBar.prototype.style = function () { this.element.addClass('border-box-sizing'); - $('ul#menus').menubar({ - select : function (event, ui) { + this.element.find("li").click(function (event, ui) { // The selected cell loses focus when the menu is entered, so we // re-select it upon selection. var i = IPython.notebook.get_selected_index(); IPython.notebook.select(i); } - }); - this.element.find("#restore_checkpoint").find("ul").find("li").hide(); + ); }; diff --git a/IPython/frontend/html/notebook/static/notebook/less/menubar.less b/IPython/frontend/html/notebook/static/notebook/less/menubar.less index 954f3eac1..68e2df299 100644 --- a/IPython/frontend/html/notebook/static/notebook/less/menubar.less +++ b/IPython/frontend/html/notebook/static/notebook/less/menubar.less @@ -23,3 +23,14 @@ #menubar_container { position: relative; } + +#menubar { + margin-bottom: 0px; +} + +#menubar .nav > li > a { + padding: 4px 15px 4px; +} +#menubar .navbar-inner { + min-height: 28px; +} \ No newline at end of file diff --git a/IPython/frontend/html/notebook/templates/notebook.html b/IPython/frontend/html/notebook/templates/notebook.html index 6b16017d2..b01049d03 100644 --- a/IPython/frontend/html/notebook/templates/notebook.html +++ b/IPython/frontend/html/notebook/templates/notebook.html @@ -45,19 +45,23 @@ class="notebook_app" {% block site %}