@@ -249,16 +249,14 @@ define( [
$lastVClicked = $( target );

// Try to find a target element to which the active class will be applied
if ( $.data( target, "mobile-button" ) ) {
if ( $.data( target, "ui-button" ) ) {
// If the form will not be submitted via AJAX, do not add active class
if ( !getAjaxFormData( $( target ).closest( "form" ), true ) ) {
return;
}
// We will apply the active state to this button widget - the parent
// of the input that was clicked will have the associated data
if ( target.parentNode ) {
target = target.parentNode;
}

// Otherwise we will apply the active state to this button widget - the input that
// was clicked will have the associated data
} else {
target = findClosestLink( target );
if ( !( target && $.mobile.path.parseUrl( target.getAttribute( "href" ) || "#" ).hash !== "#" ) ) {
@@ -326,7 +324,7 @@ define( [

// If a button was clicked, clean up the active class added by vclick above
if ( $.mobile.activeClickedLink &&
$.mobile.activeClickedLink[ 0 ] === event.target.parentNode ) {
$.mobile.activeClickedLink[ 0 ] === event.target ) {
httpCleanup();
}

@@ -32,8 +32,11 @@ $.widget( "mobile.controlgroup", $.extend( {
}
// Enhance child widgets
$.each( this._childWidgets, $.proxy( function( number, widgetName ) {
if ( $.mobile[ widgetName ] ) {
this.element.find( $.mobile[ widgetName ].initSelector ).not( $.mobile.page.prototype.keepNativeSelector() )[ widgetName ]();
widgetName = widgetName.split( "." );
if ( $[ widgetName[ 0 ] ] && $[ widgetName[ 0 ] ][ widgetName[ 1 ] ] ) {
this.element
.find( $[ widgetName[ 0 ] ][ widgetName[ 1 ] ].initSelector )
.not( $.mobile.page.prototype.keepNativeSelector() )[ widgetName[ 1 ] ]();
}
}, this ));

@@ -53,7 +56,7 @@ $.widget( "mobile.controlgroup", $.extend( {

},

_childWidgets: [ "checkboxradio", "selectmenu", "button" ],
_childWidgets: [ "ui.checkboxradio", "mobile.selectmenu", "ui.button" ],

_themeClassFromOption: function( value ) {
return ( value ? ( value === "none" ? "" : "ui-group-theme-" + value ) : "" );
@@ -13,7 +13,14 @@ define( [

// TODO rename filterCallback/deprecate and default to the item itself as the first argument
var defaultFilterCallback = function( index, searchValue ) {
return ( ( "" + ( $.mobile.getAttribute( this, "filtertext" ) || $( this ).text() ) )
return ( ( "" + ( $.mobile.getAttribute( this, "filtertext" ) ||

// Special case for button widgets for backcompat with the 1.4.0 implementation of the
// button widget where the value appeared as a text node child of the wrapper we no longer
// create for it
( ( this.nodeName.toLowerCase() === "input" && this.getAttribute( "type" ) === "button" ) ?
this.getAttribute( "value" ) :
$( this ).text() ) ) )
.toLowerCase().indexOf( searchValue ) === -1 );
};

@@ -7,6 +7,7 @@
define( [
"jquery",
"../../core",
"../../jquery-ui/button",
"../../widget" ], function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, undefined ) {
@@ -71,14 +71,13 @@ $.widget( "mobile.table", $.mobile.table, {
_addToggles: function( menu, keep ) {
var inputs,
checkboxIndex = 0,
opts = this.options,
container = menu.controlgroup( "container" );
opts = this.options;

// allow update of menu on refresh (fixes #5880)
if ( keep ) {
inputs = menu.find( "input" );
} else {
container.empty();
menu.empty();
}

// create the hide/show toggles
@@ -98,7 +97,7 @@ $.widget( "mobile.table", $.mobile.table, {
( header.children( "abbr" ).first().attr( "title" ) ||
header.text() ) +
"</label>" )
.appendTo( container )
.appendTo( menu )
.children( 0 )
.checkboxradio( {
theme: opts.columnPopupTheme
@@ -20,7 +20,6 @@
$.testHelper.asyncLoad([
[ "widgets/page" ],
[
"buttonMarkup",
"widgets/page.dialog",
"widgets/toolbar"
],
@@ -21,7 +21,6 @@
$.testHelper.asyncLoad([
[ "widgets/page" ],
[
"buttonMarkup",
"widgets/dialog",
//"widgets/dialog-extension",
"widgets/toolbar"
@@ -19,7 +19,6 @@
<script>
$.testHelper.asyncLoad([
[
"buttonMarkup",
"widgets/dialog",
"widgets/page",
"widgets/toolbar"
@@ -20,7 +20,6 @@
<script>
$.testHelper.asyncLoad([
[
"buttonMarkup",
"widgets/dialog",
"widgets/page",
"widgets/toolbar"
@@ -32,8 +32,7 @@
"widgets/controlgroup",
"widgets/forms/select",
"widgets/forms/textinput",
"buttonMarkup",
"widgets/forms/checkboxradio"
"jquery-ui/checkboxradio"
],
[ "init" ],
[ "filterable_core.js" ]
@@ -218,11 +217,11 @@ <h1>Filterable</h1>
data-nstest-filter="true"
data-nstest-input="#search-controlgroup-test-input"
class="helper">
<input type="button" data-role="button" value="acura" id="bt1" />
<input type="button" data-role="button" value="audi" id="bt2" data-nstest-filtertext="opqrstuvwxyz some xyz" />
<input type="button" data-role="button" value="bmw" id="bt3" />
<input type="button" data-role="button" value="cadillac" id="bt4" />
<input type="button" data-role="button" value="chrysel" id="bt5" />
<input type="button" value="acura" id="bt1" />
<input type="button" value="audi" id="bt2" data-nstest-filtertext="opqrstuvwxyz some xyz" />
<input type="button" value="bmw" id="bt3" />
<input type="button" value="cadillac" id="bt4" />
<input type="button" value="chrysel" id="bt5" />
<a data-nstest-role="button" href="#">acporsche</a>
</div>

@@ -15,9 +15,8 @@
$.fn.fixedtoolbar = $.fn.toolbar;
$.testHelper.asyncLoad([
[
"buttonMarkup",
"navigation/method",
"widgets/toolbar",
"navigation/method",
"widgets/toolbar",
"widgets/fixedToolbar",
"widgets/popup"
],
@@ -21,7 +21,7 @@
[ "widgets/page" ],
[
"widgets/controlgroup",
"widgets/forms/checkboxradio",
"jquery-ui/checkboxradio",
"widgets/forms/select",
"widgets/forms/slider",
"widgets/forms/textinput",
@@ -25,8 +25,7 @@
"widgets/listview",
"widgets/listview.autodividers",
"widgets/toolbar",
"widgets/collapsible",
"buttonMarkup"
"widgets/collapsible"
],
[ "init" ],
[ "listview_core.js" ]
@@ -5,10 +5,10 @@ asyncTest( "Active class is removed from reset button", function() {

expect( 2 );

deepEqual( button.parent().hasClass( $.mobile.activeBtnClass ), true, "When clicked, reset button gets active class" );
deepEqual( button.hasClass( $.mobile.activeBtnClass ), true, "When clicked, reset button gets active class" );

setTimeout( function() {
deepEqual( button.parent().hasClass( $.mobile.activeBtnClass ), false, "Active class is removed after a while" );
deepEqual( button.hasClass( $.mobile.activeBtnClass ), false, "Active class is removed after a while" );
start();
}, 700 );
});
@@ -15,8 +15,7 @@
$.testHelper.asyncLoad([
[
"links",
"buttonMarkup",
"widgets/toolbar",
"widgets/toolbar"

],
[ "init" ],
@@ -14,8 +14,7 @@
<script>
$.testHelper.asyncLoad([
[
"widgets/toolbar",
"buttonMarkup"
"widgets/toolbar"
],
[ "init" ],
[ "external_toolbar_core.js" ]
@@ -14,8 +14,7 @@
<script>
$.testHelper.asyncLoad([
[
"widgets/fixedToolbar.workarounds",
"buttonMarkup"
"widgets/fixedToolbar.workarounds"
],
[ "init" ],
[ "fixed_toolbar_core.js" ]
@@ -14,8 +14,7 @@
<script>
$.testHelper.asyncLoad([
[
"widgets/toolbar",
"buttonMarkup"
"widgets/toolbar"
],
[ "init" ],
[ "toolbar_core.js" ]
@@ -2,14 +2,6 @@

module( "Toolbar" );

test( "Links are auto-enhanced, unless data-role is set to 'none'", function() {
var leftLink = $( "#start-page-header a:first" ),
rightLink = $( "#start-page-header a:last" );

deepEqual( leftLink.hasClass( "ui-btn" ), true, "Left link has been enhanced" );
deepEqual( rightLink.hasClass( "ui-btn" ), false, "Right link has not been enhanced" );
});

asyncTest( "Back button appears correctly", function() {

expect( 2 );
@@ -26,8 +26,7 @@
"widgets/controlgroup",
"widgets/forms/select",
"widgets/forms/textinput",
"buttonMarkup",
"widgets/forms/checkboxradio"
"jquery-ui/checkboxradio"
],
[ "init" ],
[ "filterable_core.js" ]
@@ -15,7 +15,6 @@
$.testHelper.asyncLoad([
[
"navigation/method",
"buttonMarkup",
"widgets/toolbar",
"widgets/fixedToolbar"
],

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -15,7 +15,6 @@
$.testHelper.asyncLoad([
[ "widgets/page" ],
[
"buttonMarkup",
"widgets/navbar"
],
[ "init" ],
@@ -17,7 +17,6 @@
"widgets/toolbar"
],
[
"buttonMarkup",
"page_core.js"
],
[ "init" ]