Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

custom selectmenu: dialog page creation improvements.

  • Loading branch information...
commit 9afaf8bc1e67ed9c02c0e441c7291066c8a2f9e9 1 parent ca2ada8
sgrebnov authored
Showing with 9 additions and 4 deletions.
  1. +9 −4 js/jquery.mobile.forms.select.custom.js
View
13 js/jquery.mobile.forms.select.custom.js
@@ -19,7 +19,7 @@
"<div class='ui-title'>" + label.getEncodedText() + "</div>"+
"</div>"+
"<div data-" + $.mobile.ns + "role='content'></div>"+
- "</div>" ).appendTo( $.mobile.pageContainer ).page(),
+ "</div>" ),
listbox = $("<div>", { "class": "ui-selectmenu ui-selectmenu-hidden ui-overlay-shadow ui-corner-all ui-body-" + widget.options.overlayTheme + " " + $.mobile.defaultDialogTransition } ).insertAfter(screen),
@@ -44,9 +44,9 @@
"class": "ui-btn-left"
}).attr( "data-" + $.mobile.ns + "iconpos", "notext" ).attr( "data-" + $.mobile.ns + "icon", "delete" ).appendTo( header ).buttonMarkup(),
- menuPageContent = menuPage.find( ".ui-content" ),
-
- menuPageClose = menuPage.find( ".ui-header a" );
+ menuPageContent,
+
+ menuPageClose;
$.extend( widget, {
@@ -316,6 +316,11 @@
}
if ( menuHeight > screenHeight - 80 || !$.support.scrollTop ) {
+
+ self.menuPage.appendTo( $.mobile.pageContainer ).page();
+ self.menuPageContent = menuPage.find( ".ui-content" );
+ self.menuPageClose = menuPage.find( ".ui-header a" );
+
// prevent the parent page from being removed from the DOM,
// otherwise the results of selecting a list item in the dialog
// fall into a black hole

0 comments on commit 9afaf8b

Please sign in to comment.
Something went wrong with that request. Please try again.