popup.find( ":jqmData(role='check-bg')" )
.wrapAll( "<div class='popup-check-bg'></div>" );
popup.find( ":jqmData(role='scroller-bg')" )
- .wrapAll( "<div class='popup-scroller-bg'></div>" );
+ .addClass( "popup-scroller-bg" );
popup.find( ":jqmData(role='text-bottom-bg')" )
.wrapAll( "<div class='popup-text-bottom-bg'></div>" );
popup.find( ":jqmData(role='text-left')" )
},
_create: function () {
+ console.warn("popupwindow() was deprecated. use popup() instead.");
var thisPage = this.element.closest(":jqmData(role='page')"),
self = this;
maxwidth = parseFloat( this._ui.container.css( "max-width" ) );
newtop = ( screenHeight - menuHeight ) / 2;
- if ( menuWidth < maxwidth ) {
+ if ( !maxwidth || menuWidth < maxwidth ) {
newleft = ( screenWidth - menuWidth ) / 2;
} else {
newleft = x - menuWidth / 2;
this._ui.screen.css( "height", screenHeight );
},
-
- open: function ( x_where, y_where ) {
+ open: function ( x_where, y_where, backgroundclose ) {
var self = this,
zIndexMax = 0;
}
} );
- this._ui.screen.css( "height", $( window ).height() )
- .removeClass("ui-screen-hidden");
+ this._ui.screen.css( "height", $( window ).height() );
- if ( this.options.fade ) {
- this._ui.screen.animate( {opacity: this.options.opacity}, "fast" );
+ if( backgroundclose ) {
+ this._ui.screen.css( "opacity", 0 )
+ .removeClass("ui-screen-hidden");
} else {
- this._ui.screen.css( {opacity: this.options.opacity} );
+ this._ui.removeClass("ui-screen-hidden");
+
+ if ( this.options.fade ) {
+ this._ui.screen.animate( {opacity: this.options.opacity}, "fast" );
+ } else {
+ this._ui.screen.css( {opacity: this.options.opacity} );
+ }
}
this._setPosition( x_where, y_where );