@@ -50,9 +50,10 @@ $.widget( "mobile.selectmenu", $.mobile.selectmenu, {
50
50
51
51
build : function ( ) {
52
52
var selectId , prefix , popupId , dialogId , label , thisPage , isMultiple , menuId , themeAttr , overlayThemeAttr ,
53
- dividerThemeAttr , menuPage , listbox , list , header , headerTitle , menuPageContent , menuPageClose , headerClose , self ;
53
+ dividerThemeAttr , menuPage , listbox , list , header , headerTitle , menuPageContent , menuPageClose , headerClose , self ,
54
+ o = this . options ;
54
55
55
- if ( this . options . nativeMenu ) {
56
+ if ( o . nativeMenu ) {
56
57
return this . _super ( ) ;
57
58
}
58
59
@@ -65,23 +66,23 @@ $.widget( "mobile.selectmenu", $.mobile.selectmenu, {
65
66
thisPage = this . element . closest ( ".ui-page" ) ;
66
67
isMultiple = this . element [ 0 ] . multiple ;
67
68
menuId = selectId + "-menu" ;
68
- themeAttr = this . options . theme ? ( " data-" + $ . mobile . ns + "theme='" + this . options . theme + "'" ) : "" ;
69
- overlayThemeAttr = this . options . overlayTheme ? ( " data-" + $ . mobile . ns + "theme='" + this . options . overlayTheme + "'" ) : "" ;
70
- dividerThemeAttr = ( this . options . dividerTheme && isMultiple ) ? ( " data-" + $ . mobile . ns + "divider-theme='" + this . options . dividerTheme + "'" ) : "" ;
69
+ themeAttr = o . theme ? ( " data-" + $ . mobile . ns + "theme='" + o . theme + "'" ) : "" ;
70
+ overlayThemeAttr = o . overlayTheme ? ( " data-" + $ . mobile . ns + "theme='" + o . overlayTheme + "'" ) : "" ;
71
+ dividerThemeAttr = ( o . dividerTheme && isMultiple ) ? ( " data-" + $ . mobile . ns + "divider-theme='" + o . dividerTheme + "'" ) : "" ;
71
72
menuPage = $ ( "<div data-" + $ . mobile . ns + "role='dialog' class='ui-selectmenu' id='" + dialogId + "'" + themeAttr + overlayThemeAttr + ">" +
72
73
"<div data-" + $ . mobile . ns + "role='header'>" +
73
74
"<div class='ui-title'>" + label . getEncodedText ( ) + "</div>" +
74
75
"</div>" +
75
76
"<div data-" + $ . mobile . ns + "role='content'></div>" +
76
77
"</div>" ) ;
77
- listbox = $ ( "<div id='" + popupId + "' class='ui-selectmenu'>" ) . insertAfter ( this . select ) . popup ( { theme : this . options . overlayTheme } ) ;
78
+ listbox = $ ( "<div id='" + popupId + "' class='ui-selectmenu'>" ) . insertAfter ( this . select ) . popup ( { theme : o . overlayTheme } ) ;
78
79
list = $ ( "<ul class='ui-selectmenu-list' id='" + menuId + "' role='listbox' aria-labelledby='" + this . buttonId + "'" + themeAttr + dividerThemeAttr + ">" ) . appendTo ( listbox ) ;
79
- header = $ ( "<div class='ui-header ui-bar-" + ( this . options . theme ? this . options . theme : "inherit" ) + "'>" ) . prependTo ( listbox ) ;
80
+ header = $ ( "<div class='ui-header ui-bar-" + ( o . theme ? o . theme : "inherit" ) + "'>" ) . prependTo ( listbox ) ;
80
81
headerTitle = $ ( "<h1 class='ui-title'>" ) . appendTo ( header ) ;
81
82
82
83
if ( this . isMultiple ) {
83
84
headerClose = $ ( "<a>" , {
84
- "text" : this . options . closeText ,
85
+ "text" : o . closeText ,
85
86
"href" : "#" ,
86
87
"class" : "ui-btn ui-corner-all ui-btn-left ui-btn-icon-notext ui-icon-delete"
87
88
} ) . appendTo ( header ) ;
@@ -96,7 +97,7 @@ $.widget( "mobile.selectmenu", $.mobile.selectmenu, {
96
97
menuPage : menuPage ,
97
98
label : label ,
98
99
isMultiple : isMultiple ,
99
- theme : this . options . theme ,
100
+ theme : o . theme ,
100
101
listbox : listbox ,
101
102
list : list ,
102
103
header : header ,
0 commit comments