Skip to content
This repository
Browse code

custom selectmenu: dialog page creation improvements.

  • Loading branch information...
commit 9afaf8bc1e67ed9c02c0e441c7291066c8a2f9e9 1 parent ca2ada8
authored December 16, 2011

Showing 1 changed file with 9 additions and 4 deletions. Show diff stats Hide diff stats

  1. 13  js/jquery.mobile.forms.select.custom.js
13  js/jquery.mobile.forms.select.custom.js
@@ -19,7 +19,7 @@
19 19
 				"<div class='ui-title'>" + label.getEncodedText() + "</div>"+
20 20
 				"</div>"+
21 21
 				"<div data-" + $.mobile.ns + "role='content'></div>"+
22  
-				"</div>" ).appendTo( $.mobile.pageContainer ).page(),
  22
+				"</div>" ),
23 23
 
24 24
 			listbox =  $("<div>", { "class": "ui-selectmenu ui-selectmenu-hidden ui-overlay-shadow ui-corner-all ui-body-" + widget.options.overlayTheme + " " + $.mobile.defaultDialogTransition } ).insertAfter(screen),
25 25
 
@@ -44,9 +44,9 @@
44 44
 				"class": "ui-btn-left"
45 45
 			}).attr( "data-" + $.mobile.ns + "iconpos", "notext" ).attr( "data-" + $.mobile.ns + "icon", "delete" ).appendTo( header ).buttonMarkup(),
46 46
 
47  
-			menuPageContent = menuPage.find( ".ui-content" ),
48  
-
49  
-			menuPageClose = menuPage.find( ".ui-header a" );
  47
+			menuPageContent,
  48
+			
  49
+			menuPageClose;
50 50
 
51 51
 
52 52
 		$.extend( widget, {
@@ -316,6 +316,11 @@
316 316
 				}
317 317
 
318 318
 				if ( menuHeight > screenHeight - 80 || !$.support.scrollTop ) {
  319
+					
  320
+					self.menuPage.appendTo( $.mobile.pageContainer ).page();					
  321
+					self.menuPageContent = menuPage.find( ".ui-content" );
  322
+					self.menuPageClose = menuPage.find( ".ui-header a" );
  323
+					
319 324
 					// prevent the parent page from being removed from the DOM,
320 325
 					// otherwise the results of selecting a list item in the dialog
321 326
 					// fall into a black hole

0 notes on commit 9afaf8b

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