Skip to content

Commit 5dc3555

Browse files
author
scottjehl
committed
restored dialog theming, which overrides default page theming, but not custom page theming.
1 parent 3da4bd3 commit 5dc3555

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

js/jquery.mobile.dialog.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,15 @@ $.widget( "mobile.dialog", $.mobile.widget, {
1717
theme : "a"
1818
},
1919
_create: function() {
20-
var $el = this.element;
20+
var $el = this.element,
21+
pageTheme = $el.attr( "class" ).match( /ui-body-[a-z]/ );
22+
23+
if( pageTheme.length ){
24+
$el.removeClass( pageTheme[ 0 ] );
25+
}
26+
27+
$el.addClass( "ui-body-" + this.options.theme );
2128

22-
$el.jqmData( "theme", this.options.theme );
23-
2429
// Class the markup for dialog styling
2530
// Set aria role
2631
$el.attr( "role", "dialog" )

0 commit comments

Comments
 (0)