Permalink
Browse files

Theme: Carat should be named caret

Fixes #10683
Closes gh-1382
  • Loading branch information...
ldeluca authored and scottgonzalez committed Nov 3, 2014
1 parent e9643f6 commit 2500bb39c2af32770944488aa9c4bb45e8c305fa
@@ -2,7 +2,7 @@ TestHelpers.commonWidgetTests( "menu", {
defaults: {
disabled: false,
icons: {
submenu: "ui-icon-carat-1-e"
submenu: "ui-icon-caret-1-e"
},
items: "> *",
menus: "ul",
@@ -43,7 +43,7 @@ test( "{ disabled: false }", function() {
test( "{ icons: default }", function() {
expect( 2 );
var element = $( "#menu2" ).menu();
equal( element.find( ".ui-menu-icon" ).attr( "class" ), "ui-menu-icon ui-icon ui-icon-carat-1-e" );
equal( element.find( ".ui-menu-icon" ).attr( "class" ), "ui-menu-icon ui-icon ui-icon-caret-1-e" );
element.menu( "option", "icons.submenu", "ui-icon-triangle-1-e" );
equal( element.find( ".ui-menu-icon" ).attr( "class" ), "ui-menu-icon ui-icon ui-icon-triangle-1-e" );
@@ -11,11 +11,11 @@ test( "icons: default ", function() {
equal( element.spinner( "widget" ).find( ".ui-icon:last" ).attr( "class" ), "ui-icon ui-icon-triangle-1-s" );
element.spinner( "option", "icons", {
up: "ui-icon-carat-1-n",
down: "ui-icon-carat-1-s"
up: "ui-icon-caret-1-n",
down: "ui-icon-caret-1-s"
});
equal( element.spinner( "widget" ).find( ".ui-icon:first" ).attr( "class" ), "ui-icon ui-icon-carat-1-n" );
equal( element.spinner( "widget" ).find( ".ui-icon:last" ).attr( "class" ), "ui-icon ui-icon-carat-1-s" );
equal( element.spinner( "widget" ).find( ".ui-icon:first" ).attr( "class" ), "ui-icon ui-icon-caret-1-n" );
equal( element.spinner( "widget" ).find( ".ui-icon:last" ).attr( "class" ), "ui-icon ui-icon-caret-1-s" );
});
test( "icons: custom ", function() {
@@ -35,7 +35,7 @@
$( "#menu6" ).menu({
menus: ".menuElement",
select: logger,
icon: "ui-icon-carat-1-s"
icon: "ui-icon-caret-1-s"
});
$( "#menu7" ).menu({
View
@@ -188,16 +188,16 @@
/* positioning */
.ui-icon-blank { background-position: 16px 16px; }
.ui-icon-carat-1-n { background-position: 0 0; }
.ui-icon-carat-1-ne { background-position: -16px 0; }
.ui-icon-carat-1-e { background-position: -32px 0; }
.ui-icon-carat-1-se { background-position: -48px 0; }
.ui-icon-carat-1-s { background-position: -64px 0; }
.ui-icon-carat-1-sw { background-position: -80px 0; }
.ui-icon-carat-1-w { background-position: -96px 0; }
.ui-icon-carat-1-nw { background-position: -112px 0; }
.ui-icon-carat-2-n-s { background-position: -128px 0; }
.ui-icon-carat-2-e-w { background-position: -144px 0; }
.ui-icon-caret-1-n { background-position: 0 0; }
.ui-icon-caret-1-ne { background-position: -16px 0; }
.ui-icon-caret-1-e { background-position: -32px 0; }
.ui-icon-caret-1-se { background-position: -48px 0; }
.ui-icon-caret-1-s { background-position: -64px 0; }
.ui-icon-caret-1-sw { background-position: -80px 0; }
.ui-icon-caret-1-w { background-position: -96px 0; }
.ui-icon-caret-1-nw { background-position: -112px 0; }
.ui-icon-caret-2-n-s { background-position: -128px 0; }
.ui-icon-caret-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
View
@@ -31,7 +31,7 @@ return $.widget( "ui.menu", {
delay: 300,
options: {
icons: {
submenu: "ui-icon-carat-1-e"
submenu: "ui-icon-caret-1-e"
},
items: "> *",
menus: "ul",
@@ -178,7 +178,7 @@ return $.widget( "ui.menu", {
.removeAttr( "aria-haspopup" )
.children().each(function() {
var elem = $( this );
if ( elem.data( "ui-menu-submenu-carat" ) ) {
if ( elem.data( "ui-menu-submenu-caret" ) ) {
elem.remove();
}
});
@@ -297,13 +297,13 @@ return $.widget( "ui.menu", {
.each(function() {
var menu = $( this ),
item = menu.prev(),
submenuCarat = $( "<span>" )
submenuCaret = $( "<span>" )
.addClass( "ui-menu-icon ui-icon " + icon )
.data( "ui-menu-submenu-carat", true );
.data( "ui-menu-submenu-caret", true );
item
.attr( "aria-haspopup", "true" )
.prepend( submenuCarat );
.prepend( submenuCaret );
menu.attr( "aria-labelledby", item.attr( "id" ) );
});
@@ -438,7 +438,7 @@ return $.widget( "ui.menu", {
clearTimeout( this.timer );
// Don't open if already open fixes a Firefox bug that caused a .5 pixel
// shift in the submenu position when mousing over the carat icon
// shift in the submenu position when mousing over the caret icon
if ( submenu.attr( "aria-hidden" ) !== "true" ) {
return;
}

0 comments on commit 2500bb3

Please sign in to comment.