Skip to content
Permalink
Browse files

Menu: Expose the submenu indicator icon as an icon option

  • Loading branch information
kborchers committed Jul 10, 2012
1 parent 1a22a67 commit db3fabedb46011224a5a2a1dd300cb954dd61b8d
Showing with 7 additions and 3 deletions.
  1. +1 −0 tests/unit/menu/menu_common.js
  2. +3 −2 tests/visual/menu/menu.html
  3. +3 −1 ui/jquery.ui.menu.js
@@ -7,6 +7,7 @@ TestHelpers.commonWidgetTests( "menu", {
at: "right top"
},
role: "menu",
icon: "ui-icon-carat-1-e",

// callbacks
blur: null,
@@ -26,7 +26,8 @@

$( "#menu6" ).menu({
menus: ".menuElement",
select: logger
select: logger,
icon: "ui-icon-carat-1-s"
});
});
</script>
@@ -212,7 +213,7 @@ <h2>Menu with custom markup</h2>
</blockquote>
</div>

<h2>Menu with custom markup, multi-line items</h2>
<h2>Menu with custom markup, multi-line items and a custom submenu icon</h2>
<div class="menuElement" id="menu6">
<div class="address-item">
<a href="#">
@@ -28,6 +28,7 @@ $.widget( "ui.menu", {
at: "right top"
},
role: "menu",
icon: "ui-icon-carat-1-e",

// callbacks
blur: null,
@@ -279,6 +280,7 @@ $.widget( "ui.menu", {
refresh: function() {
// Initialize nested menus
var menus,
icon = this.options.icon,
submenus = this.element.find( this.options.menus + ":not(.ui-menu)" )
.addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )
.hide()
@@ -318,7 +320,7 @@ $.widget( "ui.menu", {
var menu = $( this ),
item = menu.prev( "a" ),
submenuCarat = $( "<span>" )
.addClass( "ui-menu-icon ui-icon ui-icon-carat-1-e" )
.addClass( "ui-menu-icon ui-icon " + icon )
.data( "ui-menu-submenu-carat", true );

item

0 comments on commit db3fabe

Please sign in to comment.
You can’t perform that action at this time.