diff --git a/notebook/static/acc_overwrite.less b/notebook/static/acc_overwrite.less index 8acbd9f67b..4209ea633b 100644 --- a/notebook/static/acc_overwrite.less +++ b/notebook/static/acc_overwrite.less @@ -51,4 +51,11 @@ // background-color: @navbar-default-link-hover-bg; } } - } +} + +.menu_focus_highlight{ + a:focus { + outline: -webkit-focus-ring-color auto 5px; +} +} + diff --git a/notebook/static/notebook/js/main.js b/notebook/static/notebook/js/main.js index 5a1eaf4a5c..641c40ad3f 100644 --- a/notebook/static/notebook/js/main.js +++ b/notebook/static/notebook/js/main.js @@ -45,7 +45,8 @@ requirejs([ 'notebook/js/about', 'notebook/js/searchandreplace', 'notebook/js/clipboard', - 'bidi/bidi' + 'bidi/bidi', + 'notebook/js/celltoolbarpresets/tags' ], function( $, contents_service, diff --git a/notebook/static/notebook/js/menubar.js b/notebook/static/notebook/js/menubar.js index 83ee61de69..36209ca6bf 100644 --- a/notebook/static/notebook/js/menubar.js +++ b/notebook/static/notebook/js/menubar.js @@ -152,12 +152,24 @@ define([ this.events.trigger('resize-header.Page'); }; + (function($){ + $(document).ready(function(){ + $('ul.dropdown-menu [data-toggle=dropdown]').on('click', function(event) { + event.preventDefault(); + event.stopPropagation(); + $(this).parent().siblings().removeClass('open'); + $(this).parent().toggleClass('open'); + }); + }); + })(jQuery); + MenuBar.prototype.bind_events = function () { /** * File */ var that = this; + this.element.find('#open_notebook').click(function () { var parent = utils.url_path_split(that.notebook.notebook_path)[0]; window.open( diff --git a/notebook/static/notebook/less/menubar.less b/notebook/static/notebook/less/menubar.less index 414557aee4..e5209f257b 100644 --- a/notebook/static/notebook/less/menubar.less +++ b/notebook/static/notebook/less/menubar.less @@ -1,4 +1,7 @@ + + #menubar { + .border-box-sizing(); margin-top: 1px; @@ -44,6 +47,8 @@ } } +ul.dropdown-menu:focus + [dir="rtl"] ul.dropdown-menu { text-align: right; left : auto; @@ -86,6 +91,8 @@ ul#help_menu li a{ } } + + // Make sub menus work in BS3. // Credit: http://www.bootply.com/86684 .dropdown-submenu { diff --git a/notebook/templates/notebook.html b/notebook/templates/notebook.html index a36a945d9c..1ca21cb6cd 100644 --- a/notebook/templates/notebook.html +++ b/notebook/templates/notebook.html @@ -77,11 +77,12 @@