mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-05 23:20:59 +00:00
fixed button initialization for regular role=button buttons so they can be used in controlgroups.
This commit is contained in:
parent
b4c3f4b29f
commit
0f40e2d28a
1 changed files with 4 additions and 9 deletions
|
|
@ -18,8 +18,10 @@ $.widget( "mobile.page", $.mobile.widget, {
|
|||
|
||||
this.element.find( "[data-role=nojs]" ).addClass( "ui-nojs" );
|
||||
this._enchanceControls();
|
||||
|
||||
//links in bars, or those with data-role become buttons
|
||||
this.element.find( "[data-role=button], .ui-bar a" ).not( ".ui-btn" ).buttonMarkup();
|
||||
|
||||
//pre-find data els
|
||||
var $dataEls = this.element.find( "[data-role]" ).andSelf().each(function() {
|
||||
var $this = $( this ),
|
||||
role = $this.data( "role" ),
|
||||
|
|
@ -62,7 +64,7 @@ $.widget( "mobile.page", $.mobile.widget, {
|
|||
.prependTo( $this );
|
||||
}
|
||||
|
||||
$headeranchors.buttonMarkup();
|
||||
$this.children( "a" ).buttonMarkup();
|
||||
|
||||
//page title
|
||||
$this.children( ":header" )
|
||||
|
|
@ -103,13 +105,6 @@ $.widget( "mobile.page", $.mobile.widget, {
|
|||
}
|
||||
});
|
||||
|
||||
//links in bars, or those with data-role become buttons
|
||||
$dataEls //MOVETO LINE
|
||||
.filter( "[data-role=button]" )
|
||||
.add( ".ui-bar a, .ui-footer a, .ui-header a")
|
||||
.not( ".ui-btn" )
|
||||
.buttonMarkup();
|
||||
|
||||
//links within content areas
|
||||
this.element.find( ".ui-body a:not(.ui-btn):not(.ui-link-inherit)" )
|
||||
.addClass( "ui-link" );
|
||||
|
|
|
|||
Loading…
Reference in a new issue