Always use ===
This commit is contained in:
parent
e31da7c319
commit
972ada6867
|
@ -41,9 +41,9 @@ $(function() {
|
||||||
var isWindowOpen = false;
|
var isWindowOpen = false;
|
||||||
var thingIds = [];
|
var thingIds = [];
|
||||||
function addMarker(thingId, point, color) {
|
function addMarker(thingId, point, color) {
|
||||||
if(color == 'green') {
|
if(color === 'green') {
|
||||||
var image = greenMarkerImage;
|
var image = greenMarkerImage;
|
||||||
} else if(color == 'red') {
|
} else if(color === 'red') {
|
||||||
var image = redMarkerImage;
|
var image = redMarkerImage;
|
||||||
}
|
}
|
||||||
var marker = new google.maps.Marker({
|
var marker = new google.maps.Marker({
|
||||||
|
@ -74,7 +74,7 @@ $(function() {
|
||||||
},
|
},
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
// Prevent race condition, which could lead to multiple windows being open at the same time.
|
// Prevent race condition, which could lead to multiple windows being open at the same time.
|
||||||
if(infoWindow == activeInfoWindow) {
|
if(infoWindow === activeInfoWindow) {
|
||||||
infoWindow.setContent(data);
|
infoWindow.setContent(data);
|
||||||
infoWindow.open(map, marker);
|
infoWindow.open(map, marker);
|
||||||
isWindowOpen = true;
|
isWindowOpen = true;
|
||||||
|
@ -108,7 +108,7 @@ $(function() {
|
||||||
$('#address').parent().removeClass('error');
|
$('#address').parent().removeClass('error');
|
||||||
var i = -1;
|
var i = -1;
|
||||||
$(data).each(function(index, thing) {
|
$(data).each(function(index, thing) {
|
||||||
if($.inArray(thing.id, thingIds) == -1) {
|
if($.inArray(thing.id, thingIds) === -1) {
|
||||||
i += 1;
|
i += 1;
|
||||||
} else {
|
} else {
|
||||||
// continue
|
// continue
|
||||||
|
@ -182,14 +182,14 @@ $(function() {
|
||||||
}
|
}
|
||||||
$('#combo-form input[type="radio"]').live('click', function() {
|
$('#combo-form input[type="radio"]').live('click', function() {
|
||||||
var radioInput = $(this);
|
var radioInput = $(this);
|
||||||
if('new' == radioInput.val()) {
|
if('new' === radioInput.val()) {
|
||||||
$('#combo-form').data('state', 'user_sign_up');
|
$('#combo-form').data('state', 'user_sign_up');
|
||||||
$('#user_forgot_password_fields').slideUp();
|
$('#user_forgot_password_fields').slideUp();
|
||||||
$('#user_sign_in_fields').slideUp();
|
$('#user_sign_in_fields').slideUp();
|
||||||
$('#user_sign_up_fields').slideDown(function() {
|
$('#user_sign_up_fields').slideDown(function() {
|
||||||
setComboFormFocus();
|
setComboFormFocus();
|
||||||
});
|
});
|
||||||
} else if('existing' == radioInput.val()) {
|
} else if('existing' === radioInput.val()) {
|
||||||
$('#user_sign_up_fields').slideUp();
|
$('#user_sign_up_fields').slideUp();
|
||||||
$('#user_sign_in_fields').slideDown(function() {
|
$('#user_sign_in_fields').slideDown(function() {
|
||||||
$('#combo-form').data('state', 'user_sign_in');
|
$('#combo-form').data('state', 'user_sign_in');
|
||||||
|
|
Loading…
Reference in New Issue