aboutsummaryrefslogtreecommitdiffstats
path: root/tests/visual/menu/drilldown.html
diff options
context:
space:
mode:
authorjzaefferer <joern.zaefferer@gmail.com>2010-12-22 18:31:27 +0100
committerjzaefferer <joern.zaefferer@gmail.com>2010-12-22 18:31:27 +0100
commit3552947c19b8ea1b779dc9809783c6ac6a218d68 (patch)
tree61b23078b9ff83f65bd5258bc4dd9efed5ac5f7a /tests/visual/menu/drilldown.html
parent8d39171fa285519203688084f3cf66c1e2ae0ada (diff)
parent70e8e9f294729f120f7b52fb9803fddfd37e464e (diff)
downloadjquery-ui-3552947c19b8ea1b779dc9809783c6ac6a218d68.tar.gz
jquery-ui-3552947c19b8ea1b779dc9809783c6ac6a218d68.zip
Merge remote branch 'origin/menu'
Conflicts: demos/autocomplete/categories.html demos/autocomplete/combobox.html demos/autocomplete/custom-data.html demos/autocomplete/default.html demos/autocomplete/folding.html demos/autocomplete/multiple-remote.html demos/autocomplete/multiple.html demos/autocomplete/remote-jsonp.html demos/autocomplete/remote-with-cache.html demos/autocomplete/remote.html demos/autocomplete/xml.html demos/button/splitbutton.html demos/index.html tests/visual/menu/nested.html themes/base/jquery.ui.autocomplete.css ui/jquery.ui.autocomplete.js
Diffstat (limited to 'tests/visual/menu/drilldown.html')
-rw-r--r--tests/visual/menu/drilldown.html17
1 files changed, 13 insertions, 4 deletions
diff --git a/tests/visual/menu/drilldown.html b/tests/visual/menu/drilldown.html
index 7bb7b03a2..65cdf1111 100644
--- a/tests/visual/menu/drilldown.html
+++ b/tests/visual/menu/drilldown.html
@@ -9,9 +9,16 @@
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.position.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.button.js"></script>
- <script type="text/javascript" src="../../../ui/jquery.ui.autocomplete.js"></script>
+ <script type="text/javascript" src="../../../ui/jquery.ui.menu.js"></script>
+ <script type="text/javascript" src="http://jqueryui.com/themeroller/themeswitchertool/"></script>
<script type="text/javascript">
$(function() {
+ $.fn.themeswitcher && $('<div/>').css({
+ position: "absolute",
+ right: 10,
+ top: 10
+ }).appendTo(document.body).themeswitcher();
+
$.widget("ui.drilldown", {
_init: function() {
var self = this;
@@ -21,10 +28,12 @@
this.element.find("ul").hide().prev("a").prepend('<span class="ui-icon ui-icon-carat-1-e"></span>').end().filter(":first").show();
this.element.find("ul").menu({
+ // disable built-in key handling
+ input: $(),
focus: function(event, ui) {
self.activeItem = ui.item;
},
- selected: function(event, ui) {
+ select: function(event, ui) {
if (this != self.active[0]) {
return;
}
@@ -33,7 +42,7 @@
self._open(nested);
} else {
self.element.find("h3").text(ui.item.text());
- self.options.selected.apply(this, arguments);
+ self.options.select.apply(this, arguments);
}
}
});
@@ -115,7 +124,7 @@
});
var drilldown = $("#drilldown").drilldown({
- selected: function(event, ui) {
+ select: function(event, ui) {
$("#log").append("<div>Selected " + ui.item.text() + "</div>");
}
});