From 0a6b126413a98e0a7e0bb969fa68f037dd8aeaff Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Mon, 23 Apr 2012 19:07:03 +0200 Subject: Fix various issues in our html files, fourth batch --- tests/visual/menu/drilldown.html | 31 ++++++++++++++++--------------- tests/visual/menu/menu.html | 3 ++- tests/visual/menu/tablemenu.html | 7 ++++--- 3 files changed, 22 insertions(+), 19 deletions(-) (limited to 'tests/visual/menu') diff --git a/tests/visual/menu/drilldown.html b/tests/visual/menu/drilldown.html index 8bc30a793..7b40fc62f 100644 --- a/tests/visual/menu/drilldown.html +++ b/tests/visual/menu/drilldown.html @@ -1,6 +1,7 @@ + Menu Visual Test: Default @@ -18,15 +19,15 @@ right: 10, top: 10 }).appendTo(document.body).themeswitcher(); - + $.widget("ui.drilldown", { _init: function() { var that = this; this.active = this.element.find(">ul").attr("tabindex", 0); - + // hide submenus and create indicator icons - this.element.find("ul").hide().prev("a").prepend('').end().filter(":first").show(); - + this.element.find("ul").hide().prev("a").prepend('').end().filter(":first").show(); + this.element.find("ul").menu({ // disable built-in key handling input: $(), @@ -46,7 +47,7 @@ } } }); - + this.back = this.element.children(":last").button({ icons: { primary: "ui-icon-carat-1-w" @@ -56,7 +57,7 @@ return false; }).hide(); }, - + _open: function(submenu) { this.active = submenu.show().css({ opacity: 0 @@ -78,7 +79,7 @@ }); this.back.show(); }, - + up: function() { if (this.active.parent()[0] == this.element[0]) { return; @@ -101,7 +102,7 @@ this.back.hide(); } }, - + down: function(event) { var nested = this.activeItem.find(">ul"); if (nested.length) { @@ -109,24 +110,24 @@ nested.menu("focus", event, nested.children(":first")) } }, - + show: function() { }, - + hide: function() { }, - + widget: function() { return this.element.find(">ul"); } }); - + var drilldown = $("#drilldown").drilldown({ select: function(event, ui) { $("#log").append("
Selected " + ui.item.text() + "
"); } }); - + drilldown.drilldown("widget").keydown(function(event) { var menu = drilldown.data("drilldown").active.data("menu"); if (menu.widget().is(":hidden")) @@ -171,7 +172,7 @@ } else { character = prev + character; } - + var match = menu.widget().children("li").filter(function() { return new RegExp("^" + character, "i").test($("a", this).text()); }); @@ -207,7 +208,7 @@ - +

Make a selection...