Skip to content
Snippets Groups Projects
Commit 29729918 authored by Chris Hallberg's avatar Chris Hallberg
Browse files

eslint

parent e673646b
Branches
Tags
No related merge requests found
...@@ -176,7 +176,7 @@ VuFind.register('cart', function Cart() { ...@@ -176,7 +176,7 @@ VuFind.register('cart', function Cart() {
var $parent = $(this).parent(); var $parent = $(this).parent();
$parent.find('.cart-add.correct,.cart-remove.correct').removeClass('correct hidden'); $parent.find('.cart-add.correct,.cart-remove.correct').removeClass('correct hidden');
$parent.find('.cart-add').click(function cartAddClick() { $parent.find('.cart-add').click(function cartAddClick() {
if(addItem(currentId, currentSource)) { if (addItem(currentId, currentSource)) {
$parent.find('.cart-add,.cart-remove').toggleClass('hidden'); $parent.find('.cart-add,.cart-remove').toggleClass('hidden');
} else { } else {
$parent.popover({content: VuFind.translate('bookbagFull')}); $parent.popover({content: VuFind.translate('bookbagFull')});
......
...@@ -24,8 +24,8 @@ function setUpHoldRequestForm(recordId) { ...@@ -24,8 +24,8 @@ function setUpHoldRequestForm(recordId) {
var defaultValue = $('#pickUpLocation').data('default'); var defaultValue = $('#pickUpLocation').data('default');
$.each(response.data.locations, function holdPickupLocationEach() { $.each(response.data.locations, function holdPickupLocationEach() {
var option = $('<option></option>').attr('value', this.locationID).text(this.locationDisplay); var option = $('<option></option>').attr('value', this.locationID).text(this.locationDisplay);
// Weak comparison between locationID and defaultValue since locationID may be an integer // Weak comparison between locationID and defaultValue since locationID may be an integer
if (this.locationID == defaultValue || (defaultValue === '' && this.isDefault && $emptyOption.length === 0)) { if (this.locationID === defaultValue || (defaultValue === '' && this.isDefault && $emptyOption.length === 0)) {
option.attr('selected', 'selected'); option.attr('selected', 'selected');
} }
$('#pickUpLocation').append(option); $('#pickUpLocation').append(option);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment