Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions js/widgets/forms/select.custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,8 @@ $.widget( "mobile.selectmenu", $.mobile.selectmenu, {
.find( "a" ).removeClass( $.mobile.activeBtnClass ).end()
.attr( "aria-selected", false )
.each(function( i ) {

var item = $( this );
if ( $.inArray( i, indices ) > -1 ) {
var item = $( this );

// Aria selected attr
item.attr( "aria-selected", true );

Expand All @@ -348,6 +346,9 @@ $.widget( "mobile.selectmenu", $.mobile.selectmenu, {
}
}
}
else if ( self.isMultiple ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this to the next line up on same line as closing curly brace

item.find( "a" ).removeClass( "ui-checkbox-on" ).addClass( "ui-checkbox-off" );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Break this onto multiple lines max length 100 characters

}
});
},

Expand Down
14 changes: 14 additions & 0 deletions tests/unit/select/select_core.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@
deepEqual( $( "#enhance-test-listbox a:first" ).attr( "role" ), "button", "The close button for a multiple choice select popup has the " + '"' + "role='button'" + '"' + " set" );
deepEqual( popup.popup( "option", "overlayTheme" ), "b", "Popup has overlayTheme b" );
deepEqual( popup.popup( "option", "theme" ), "x", "Popup has theme x" );

});

module( "Custom select Multiple" );

test( "Custom select multiple is cleared correctly", function() {
var popup = $( "#enhance-test-listbox" );
$("#enhance-test")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need spaces inside the parentheses

.find("option")
.attr("selected", false)
.prop("selected", false)
.end()
.selectmenu("refresh");
deepEqual(popup.find(".ui-checkbox-on").length,0,"Checkboxes should not have ui-checkbox-on class");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The above 6 lines are all indented with spaces switch to tabs and add spaces inside the parentheses

});

module( "Native select" );
Expand Down