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

Merge branch 'release-3.1'

parents 3f50211a 29729918
Branches
Tags
No related merge requests found
......@@ -176,7 +176,7 @@ VuFind.register('cart', function Cart() {
var $parent = $(this).parent();
$parent.find('.cart-add.correct,.cart-remove.correct').removeClass('correct hidden');
$parent.find('.cart-add').click(function cartAddClick() {
if(addItem(currentId, currentSource)) {
if (addItem(currentId, currentSource)) {
$parent.find('.cart-add,.cart-remove').toggleClass('hidden');
} else {
$parent.popover({content: VuFind.translate('bookbagFull')});
......
......@@ -24,8 +24,8 @@ function setUpHoldRequestForm(recordId) {
var defaultValue = $('#pickUpLocation').data('default');
$.each(response.data.locations, function holdPickupLocationEach() {
var option = $('<option></option>').attr('value', this.locationID).text(this.locationDisplay);
// Weak comparison between locationID and defaultValue since locationID may be an integer
if (this.locationID == defaultValue || (defaultValue === '' && this.isDefault && $emptyOption.length === 0)) {
// Weak comparison between locationID and defaultValue since locationID may be an integer
if (this.locationID === defaultValue || (defaultValue === '' && this.isDefault && $emptyOption.length === 0)) {
option.attr('selected', 'selected');
}
$('#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