Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[popup] Use ui-overlay-* for overlay theme

  • Loading branch information...
commit b9768954d7482b4236932affe1771b673d6e767d 1 parent 52f2eaf
Gabriel "_|Nix|_" Schulhof gabrielschulhof authored
Showing with 6 additions and 7 deletions.
  1. +0 −1  css/structure/jquery.mobile.popup.css
  2. +6 −6 js/widgets/popup.js
1  css/structure/jquery.mobile.popup.css
View
@@ -3,7 +3,6 @@
left: 0;
width: 100%;
height: 100%;
- border: 0;
position: absolute;
filter: Alpha(Opacity=50);
opacity: 0;
12 js/widgets/popup.js
View
@@ -182,7 +182,7 @@ define( [ "jquery",
});
},
- _applyTheme: function( dst, theme ) {
+ _applyTheme: function( dst, theme, prefix ) {
var classes = ( dst.attr( "class" ) || "").split( " " ),
alreadyAdded = true,
currentTheme = null,
@@ -191,7 +191,7 @@ define( [ "jquery",
while ( classes.length > 0 ) {
currentTheme = classes.pop();
- matches = currentTheme.match( /^ui-body-([a-z])$/ );
+ matches = ( new RegExp( "^ui-" + prefix + "-([a-z])$" ) ).exec( currentTheme );
if ( matches && matches.length > 1 ) {
currentTheme = matches[ 1 ];
break;
@@ -201,19 +201,19 @@ define( [ "jquery",
}
if ( theme !== currentTheme ) {
- dst.removeClass( "ui-body-" + currentTheme );
+ dst.removeClass( "ui-" + prefix + "-" + currentTheme );
if ( ! ( theme === null || theme === "none" ) ) {
- dst.addClass( "ui-body-" + themeStr );
+ dst.addClass( "ui-" + prefix + "-" + themeStr );
}
}
},
_setTheme: function( value ) {
- this._applyTheme( this.element, value );
+ this._applyTheme( this.element, value, "body" );
},
_setOverlayTheme: function( value ) {
- this._applyTheme( this._ui.screen, value );
+ this._applyTheme( this._ui.screen, value, "overlay" );
if ( $.mobile.browser.ie ) {
this._ui.screen.toggleClass(
Please sign in to comment.
Something went wrong with that request. Please try again.