From faa4b970a78a78ff93ecbff5cf9bfd679a3a6eda Mon Sep 17 00:00:00 2001 From: jzaefferer Date: Tue, 22 Feb 2011 16:15:11 +0100 Subject: [PATCH] Menu: Rename nested.html to flyoutmenu.html, updated headers --- tests/visual/index.html | 3 ++- tests/visual/menu/{nested.html => flyoutmenu.html} | 0 tests/visual/menu/flyoutmenu.js | 11 ++++------- tests/visual/menu/menubar.js | 8 ++------ 4 files changed, 8 insertions(+), 14 deletions(-) rename tests/visual/menu/{nested.html => flyoutmenu.html} (100%) diff --git a/tests/visual/index.html b/tests/visual/index.html index 2a556dc89..4138e21ba 100644 --- a/tests/visual/index.html +++ b/tests/visual/index.html @@ -46,7 +46,8 @@ Menu diff --git a/tests/visual/menu/nested.html b/tests/visual/menu/flyoutmenu.html similarity index 100% rename from tests/visual/menu/nested.html rename to tests/visual/menu/flyoutmenu.html diff --git a/tests/visual/menu/flyoutmenu.js b/tests/visual/menu/flyoutmenu.js index 54ee8bb67..665426796 100644 --- a/tests/visual/menu/flyoutmenu.js +++ b/tests/visual/menu/flyoutmenu.js @@ -1,12 +1,7 @@ /* - * jQuery UI flyout menu - * - written for jQuery UI 1.9 milestone 2 using the widget factory - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - * - * modified from: http://view.jqueryui.com/menu/tests/visual/menu/nested.html - * by: Michael Lang, http://nexul.com/ + * jQuery UI flyoutmenu * + * backported from Michael Lang's fork: http://www.nexul.com/prototypes/toolbar/demo.html */ (function($) { @@ -64,11 +59,13 @@ $.widget("ui.flyoutmenu", { return value.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); } var match = self.activeItem.parent("ul").children("li").filter(function() { + // TODO why filter child anchor here, but not in the filter below? return new RegExp("^" + escape(character), "i").test($("a", this).text()); }); var match = skip && match.index(self.active.next()) != -1 ? match.next() : match; if (!match.length) { character = String.fromCharCode(event.keyCode); + // TODO why use self.widget() here instead of self.activeItem?? match = self.widget().children("li").filter(function() { return new RegExp("^" + escape(character), "i").test($(this).text()); }); diff --git a/tests/visual/menu/menubar.js b/tests/visual/menu/menubar.js index a6bf636e0..b660ea0df 100644 --- a/tests/visual/menu/menubar.js +++ b/tests/visual/menu/menubar.js @@ -1,11 +1,7 @@ /* - * jQuery UI flyout menu - * - written for jQuery UI 1.9 milestone 2 using the widget factory - * - * Copyright (c) 2010 Michael Lang, http://nexul.com/ - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. + * jQuery UI menubar * + * backported from Michael Lang's fork: http://www.nexul.com/prototypes/toolbar/demo.html */ (function($) {