diff --git a/themes/bootstrap3/js/autocomplete.js b/themes/bootstrap3/js/autocomplete.js index 9199eb7436318d4f33a3800bc82c1b39151fc8f9..b148bb4cf3a6ebb7704a10c188e63154f0d9c08e 100644 --- a/themes/bootstrap3/js/autocomplete.js +++ b/themes/bootstrap3/js/autocomplete.js @@ -46,7 +46,7 @@ function createList(fulldata, input) { // Limit results - data = fulldata.slice(0, Math.min(options.maxResults, data.length)); + var data = fulldata.slice(0, Math.min(options.maxResults, data.length)); input.data('length', data.length); // highlighting setup // escape term for regex - https://github.com/sindresorhus/escape-string-regexp/blob/master/index.js @@ -241,7 +241,7 @@ return this.each(function acJQueryEach() { - input = $(this); + var input = $(this); if (typeof settings === "string") { if (settings === "show") { diff --git a/themes/bootstrap3/js/cart.js b/themes/bootstrap3/js/cart.js index d764a2850f8151d87f493dac0e5b34effa3ca2bc..fbc1ef063dd15ed9cebfca2de99e802e00d5adb9 100644 --- a/themes/bootstrap3/js/cart.js +++ b/themes/bootstrap3/js/cart.js @@ -1,4 +1,4 @@ -/*global Cookies, VuFind */ +/* global Cookies, VuFind, setTimeout, clearTimeout */ /* exported cartFormHandler */ VuFind.register('cart', function Cart() { diff --git a/themes/bootstrap3/js/check_item_statuses.js b/themes/bootstrap3/js/check_item_statuses.js index 985427d4e5a39c9b40a14bb7cbe8b5a935ae4156..75e1c17a269207486cd5b38f84b1d5a5e9ad7e9a 100644 --- a/themes/bootstrap3/js/check_item_statuses.js +++ b/themes/bootstrap3/js/check_item_statuses.js @@ -1,4 +1,4 @@ -/*global VuFind */ +/* global VuFind */ function checkItemStatuses(_container) { var container = _container || $('body'); diff --git a/themes/bootstrap3/js/check_save_statuses.js b/themes/bootstrap3/js/check_save_statuses.js index a18e4c6787f025748b1d43de8921baa9bcd4eb22..a13c5fa31a68f972a40af22df5eb0c771428fc7a 100644 --- a/themes/bootstrap3/js/check_save_statuses.js +++ b/themes/bootstrap3/js/check_save_statuses.js @@ -1,6 +1,6 @@ -/*global htmlEncode, VuFind, userIsLoggedIn */ +/* global htmlEncode, VuFind, userIsLoggedIn */ -function checkSaveStatuses(container) { +function checkSaveStatuses(_container) { if (!userIsLoggedIn) { return; } diff --git a/themes/bootstrap3/js/combined-search.js b/themes/bootstrap3/js/combined-search.js index dd4c75d9117eb51142b04e646f50ccf42edc8fba..2a4f9b71da4e63ad3383f58721fed7bc62588547 100644 --- a/themes/bootstrap3/js/combined-search.js +++ b/themes/bootstrap3/js/combined-search.js @@ -1,4 +1,4 @@ -/*global VuFind, checkItemStatuses, checkSaveStatuses */ +/* global VuFind, checkItemStatuses, checkSaveStatuses */ VuFind.combinedSearch = (function CombinedSearch() { var init = function init(container, url) { container.load(url, '', function containerLoad(responseText) { diff --git a/themes/bootstrap3/js/common.js b/themes/bootstrap3/js/common.js index fc9ec1d92a21e6dc589f8331f7413a3fb301109f..72826c1f1bbaece08cdf3fb3e9f5d097c0be83e7 100644 --- a/themes/bootstrap3/js/common.js +++ b/themes/bootstrap3/js/common.js @@ -1,4 +1,4 @@ -/*global isPhoneNumberValid, unescape */ +/* global isPhoneNumberValid, unescape */ /* exported VuFind, htmlEncode, deparam, moreFacets, lessFacets, phoneNumberFormHandler, bulkFormHandler */ // IE 9< console polyfill @@ -54,7 +54,7 @@ var VuFind = (function VuFind() { /* --- GLOBAL FUNCTIONS --- */ function htmlEncode(value) { if (value) { - return jQuery('<div />').text(value).html(); + return $('<div />').text(value).html(); } else { return ''; } diff --git a/themes/bootstrap3/js/embedGBS.js b/themes/bootstrap3/js/embedGBS.js index 515a6fca77b7be78268304c174d0c782592808f2..1388dd1d57f5b87b636c92c65b97c866427f0a7e 100644 --- a/themes/bootstrap3/js/embedGBS.js +++ b/themes/bootstrap3/js/embedGBS.js @@ -1,4 +1,4 @@ -/*global getBibKeyString, google */ +/* global getBibKeyString, google */ // we don't need to wait for dom ready since lang is in the dom root var lang = document.documentElement.getAttribute('lang'); diff --git a/themes/bootstrap3/js/facets.js b/themes/bootstrap3/js/facets.js index a19d6d4aceadb16ba611ac8b46c73d6b33fdfb95..4c0fb043e797c940faa85b0eb8bb8ef9d1946c86 100644 --- a/themes/bootstrap3/js/facets.js +++ b/themes/bootstrap3/js/facets.js @@ -1,4 +1,4 @@ -/*global htmlEncode, VuFind */ +/* global htmlEncode, VuFind */ /* exported initFacetTree */ function buildFacetNodes(data, currentPath, allowExclude, excludeTitle, counts) { diff --git a/themes/bootstrap3/js/hierarchyTree.js b/themes/bootstrap3/js/hierarchyTree.js index a2caa4f84143f030219e3e2d7181ee42f850907a..70ab809310b1092bc6f38733e8af28fae65b3653 100644 --- a/themes/bootstrap3/js/hierarchyTree.js +++ b/themes/bootstrap3/js/hierarchyTree.js @@ -1,4 +1,4 @@ -/*global VuFind */ +/* global VuFind */ var hierarchyID, recordID, htmlID, hierarchyContext; diff --git a/themes/bootstrap3/js/hold.js b/themes/bootstrap3/js/hold.js index 904ed12b8433e1289fbe4ff28eb5dfe8b8108857..0f3cb34b34dad83819ceef6350e937e65d452bbd 100644 --- a/themes/bootstrap3/js/hold.js +++ b/themes/bootstrap3/js/hold.js @@ -1,4 +1,4 @@ -/*global VuFind */ +/* global VuFind */ /* exported setUpHoldRequestForm */ function setUpHoldRequestForm(recordId) { $('#requestGroupId').change(function requestGroupChange() { diff --git a/themes/bootstrap3/js/ill.js b/themes/bootstrap3/js/ill.js index 72272194797181e1e94957c490b7a4494decc2ca..0817e027fcbda385dc29ffaf4010492239cae7fd 100644 --- a/themes/bootstrap3/js/ill.js +++ b/themes/bootstrap3/js/ill.js @@ -1,4 +1,4 @@ -/*global VuFind */ +/* global VuFind */ /* exported setUpILLRequestForm */ function setUpILLRequestForm(recordId) { $("#ILLRequestForm #pickupLibrary").change(function illPickupChange() { diff --git a/themes/bootstrap3/js/keep_alive.js b/themes/bootstrap3/js/keep_alive.js index 65a7e252f16c52d36e67a6ab825fb0960bb7f33b..9bef1a9ef6c74d7c9a29098efef7584ca754c1e0 100644 --- a/themes/bootstrap3/js/keep_alive.js +++ b/themes/bootstrap3/js/keep_alive.js @@ -1,4 +1,4 @@ -/*global keepAliveInterval, VuFind */ +/* global keepAliveInterval, VuFind */ $(document).ready(function keepAliveReady() { window.setInterval(function keepAliveInterval() { diff --git a/themes/bootstrap3/js/lightbox.js b/themes/bootstrap3/js/lightbox.js index d76ea8a752b844e3a57b9801285579629a0779a2..089307b53d664690c5c98aab0300e62c0cbd1a88 100644 --- a/themes/bootstrap3/js/lightbox.js +++ b/themes/bootstrap3/js/lightbox.js @@ -1,4 +1,4 @@ -/*global $, document, CustomEvent, VuFind, window */ +/* global $, document, CustomEvent, VuFind, window */ VuFind.register('lightbox', function Lightbox() { // State var _originalUrl = false; @@ -240,7 +240,7 @@ VuFind.register('lightbox', function Lightbox() { // Add submit button information var submit = $(_clickedButton); _clickedButton = null; - var buttonData = { name: name, value: 1 }; + var buttonData = { name: 'submit', value: 1 }; if (submit.length > 0) { if (typeof submit.data('lightbox-ignore') !== 'undefined') { return true; diff --git a/themes/bootstrap3/js/openurl.js b/themes/bootstrap3/js/openurl.js index fb9312fedafc2156c673be8c78b647d927d9baf2..3d23e11d8d2a46a90224dc5718aadf7549f97732 100644 --- a/themes/bootstrap3/js/openurl.js +++ b/themes/bootstrap3/js/openurl.js @@ -1,4 +1,4 @@ -/*global extractClassParams, VuFind */ +/* global extractClassParams, VuFind */ VuFind.register('openurl', function OpenUrl() { function _loadResolverLinks($target, openUrl, searchClassId) { $target.addClass('ajax_availability'); diff --git a/themes/bootstrap3/js/pubdate_vis.js b/themes/bootstrap3/js/pubdate_vis.js index 1fac0bbb65c266350668665a85832fb403767c42..9863e90040aafe47bcbf6b20d6a4d9f225bd0b8e 100644 --- a/themes/bootstrap3/js/pubdate_vis.js +++ b/themes/bootstrap3/js/pubdate_vis.js @@ -1,4 +1,4 @@ -/*global htmlEncode*/ +/* global htmlEncode */ /* exported loadVis */ function PadDigits(number, totalDigits) { @@ -115,7 +115,7 @@ function loadVis(facetFields, searchParams, baseURL, zooming) { placeholder.bind("plotselected", function plotselected(event, ranges) { var from = Math.floor(ranges.xaxis.from); var to = Math.ceil(ranges.xaxis.to); - location.href = val.removalURL + '&daterange[]=' + key + '&' + key + 'to=' + PadDigits(to,4) + '&' + key + 'from=' + PadDigits(from,4); + window.location.href = val.removalURL + '&daterange[]=' + key + '&' + key + 'to=' + PadDigits(to,4) + '&' + key + 'from=' + PadDigits(from,4); }); if (hasFilter) { diff --git a/themes/bootstrap3/js/record.js b/themes/bootstrap3/js/record.js index ffa1be627bc845deae9e1c097a2d97f5efd541b8..840b93e224e398aaec8d8a437519ea981442b317 100644 --- a/themes/bootstrap3/js/record.js +++ b/themes/bootstrap3/js/record.js @@ -1,4 +1,4 @@ -/*global deparam, syn_get_widget, userIsLoggedIn, VuFind */ +/* global deparam, syn_get_widget, userIsLoggedIn, VuFind */ /* exported ajaxTagUpdate, recordDocReady */ /**