From c0873f5da91ba6ece02c92e605e1e7c4c1d7db6f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rn=20Zaefferer?= Date: Fri, 18 May 2012 15:18:19 +0200 Subject: [PATCH] Menu: Update default visual test, remove the disable/toggle buttons, that behaviour must be covered by unit tests --- tests/visual/menu/menu.html | 50 ++++++++++++------------------------- 1 file changed, 16 insertions(+), 34 deletions(-) diff --git a/tests/visual/menu/menu.html b/tests/visual/menu/menu.html index ba4017e65..b73588bce 100644 --- a/tests/visual/menu/menu.html +++ b/tests/visual/menu/menu.html @@ -18,39 +18,24 @@ top: 10 }).appendTo(document.body).themeswitcher(); - function create() { - menus.menu({ - select: function(event, ui) { - $("
").text("Selected: " + ui.item.text()).appendTo("#log"); - } - }); - - $("#menu5").menu({ - select: function(event, ui) { - $("
").text("Selected: " + ui.item.text()).appendTo("#log"); - }, - menus: "div" - }); - - $("#menu6").menu({ - select: function(event, ui) { - $("
").text("Selected: " + ui.item.text()).appendTo("#log"); - }, - menus: ".menuElement" - }); - } + $("#menu1, #menu2, #menu3, .menu4").menu({ + select: function(event, ui) { + $("
").text("Selected: " + ui.item.text()).appendTo("#log"); + } + }); - var menus = $("#menu1, #menu2, #menu3, .menu4"), - all = menus.add("#menu5, #menu6"); - create(); + $("#menu5").menu({ + select: function(event, ui) { + $("
").text("Selected: " + ui.item.text()).appendTo("#log"); + }, + menus: "div" + }); - $("#toggle-destroy").toggle(function() { - all.menu("destroy"); - }, create); - $("#toggle-disable").toggle(function() { - all.menu("disable"); - }, function() { - all.menu("enable"); + $("#menu6").menu({ + select: function(event, ui) { + $("
").text("Selected: " + ui.item.text()).appendTo("#log"); + }, + menus: ".menuElement" }); }); @@ -286,8 +271,5 @@
- - - \ No newline at end of file -- 2.39.5