Skip to content

Commit e3ad4a0

Browse files
author
Gabriel Schulhof
committed
Select: Normalize capitalization of the word "ID" in variables. Now "Id" is used everywhere.
1 parent bd30ca9 commit e3ad4a0

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

js/widgets/forms/select.custom.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,32 +49,32 @@ $.widget( "mobile.selectmenu", $.mobile.selectmenu, {
4949
},
5050

5151
build: function() {
52-
var selectID, prefix, popupID, dialogID, label, thisPage, isMultiple, menuId, themeAttr, overlayThemeAttr,
52+
var selectId, prefix, popupId, dialogId, label, thisPage, isMultiple, menuId, themeAttr, overlayThemeAttr,
5353
dividerThemeAttr, menuPage, listbox, list, header, headerTitle, menuPageContent, menuPageClose, headerClose, self;
5454

5555
if ( this.options.nativeMenu ) {
5656
return this._super();
5757
}
5858

5959
self = this;
60-
selectID = this.selectID;
61-
prefix = ( selectID ? selectID : ( ( $.mobile.ns || "" ) + "uuid-" + this.uuid ) );
62-
popupID = prefix + "-listbox";
63-
dialogID = prefix + "-dialog";
60+
selectId = this.selectId;
61+
prefix = ( selectId ? selectId : ( ( $.mobile.ns || "" ) + "uuid-" + this.uuid ) );
62+
popupId = prefix + "-listbox";
63+
dialogId = prefix + "-dialog";
6464
label = this.label;
6565
thisPage = this.element.closest( ".ui-page" );
6666
isMultiple = this.element[ 0 ].multiple;
67-
menuId = selectID + "-menu";
67+
menuId = selectId + "-menu";
6868
themeAttr = this.options.theme ? ( " data-" + $.mobile.ns + "theme='" + this.options.theme + "'" ) : "";
6969
overlayThemeAttr = this.options.overlayTheme ? ( " data-" + $.mobile.ns + "theme='" + this.options.overlayTheme + "'" ) : "";
7070
dividerThemeAttr = ( this.options.dividerTheme && isMultiple ) ? ( " data-" + $.mobile.ns + "divider-theme='" + this.options.dividerTheme + "'" ) : "";
71-
menuPage = $( "<div data-" + $.mobile.ns + "role='dialog' class='ui-selectmenu' id='" + dialogID + "'" + themeAttr + overlayThemeAttr + ">" +
71+
menuPage = $( "<div data-" + $.mobile.ns + "role='dialog' class='ui-selectmenu' id='" + dialogId + "'" + themeAttr + overlayThemeAttr + ">" +
7272
"<div data-" + $.mobile.ns + "role='header'>" +
7373
"<div class='ui-title'>" + label.getEncodedText() + "</div>"+
7474
"</div>"+
7575
"<div data-" + $.mobile.ns + "role='content'></div>"+
7676
"</div>" );
77-
listbox = $( "<div id='" + popupID + "' class='ui-selectmenu'>" ).insertAfter( this.select ).popup({ theme: this.options.overlayTheme });
77+
listbox = $( "<div id='" + popupId + "' class='ui-selectmenu'>" ).insertAfter( this.select ).popup({ theme: this.options.overlayTheme });
7878
list = $( "<ul class='ui-selectmenu-list' id='" + menuId + "' role='listbox' aria-labelledby='" + this.buttonId + "'" + themeAttr + dividerThemeAttr + ">" ).appendTo( listbox );
7979
header = $( "<div class='ui-header ui-bar-" + ( this.options.theme ? this.options.theme : "inherit" ) + "'>" ).prependTo( listbox );
8080
headerTitle = $( "<h1 class='ui-title'>" ).appendTo( header );
@@ -88,10 +88,10 @@ $.widget( "mobile.selectmenu", $.mobile.selectmenu, {
8888
}
8989

9090
$.extend( this, {
91-
selectID: selectID,
91+
selectId: selectId,
9292
menuId: menuId,
93-
popupID: popupID,
94-
dialogID: dialogID,
93+
popupId: popupId,
94+
dialogId: dialogId,
9595
thisPage: thisPage,
9696
menuPage: menuPage,
9797
label: label,
@@ -134,9 +134,9 @@ $.widget( "mobile.selectmenu", $.mobile.selectmenu, {
134134

135135
self._decideFormat();
136136
if ( self.menuType === "overlay" ) {
137-
self.button.attr( "href", "#" + self.popupID ).attr( "data-" + ( $.mobile.ns || "" ) + "rel", "popup" );
137+
self.button.attr( "href", "#" + self.popupId ).attr( "data-" + ( $.mobile.ns || "" ) + "rel", "popup" );
138138
} else {
139-
self.button.attr( "href", "#" + self.dialogID ).attr( "data-" + ( $.mobile.ns || "" ) + "rel", "dialog" );
139+
self.button.attr( "href", "#" + self.dialogId ).attr( "data-" + ( $.mobile.ns || "" ) + "rel", "dialog" );
140140
}
141141
self.isOpen = true;
142142
// Do not prevent default, so the navigation may have a chance to actually open the chosen format

js/widgets/forms/select.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ $.widget( "mobile.selectmenu", $.mobile.widget, $.extend( {
7676
}
7777

7878
this.select = this.element.removeClass( "ui-btn-left ui-btn-right" ).wrap( "<div class='ui-select" + classes + "'>" );
79-
this.selectID = this.select.attr( "id" );
80-
this.buttonId = this.selectID + "-button";
81-
this.label = $( "label[for='"+ this.selectID +"']" );
79+
this.selectId = this.select.attr( "id" );
80+
this.buttonId = this.selectId + "-button";
81+
this.label = $( "label[for='"+ this.selectId +"']" );
8282
this.isMultiple = this.select[ 0 ].multiple;
8383
},
8484

0 commit comments

Comments
 (0)