diff --git a/themes/bootstrap3/js/autocomplete.js b/themes/bootstrap3/js/autocomplete.js index d09b108ecfcde000db971921cefb6fe9dd33effc..efa8b06d37ab3ce03b9669ba04aaa134da2180a1 100644 --- a/themes/bootstrap3/js/autocomplete.js +++ b/themes/bootstrap3/js/autocomplete.js @@ -17,13 +17,15 @@ minLength: 3 }; + var xhr = false; + function align(input) { var position = input.offset(); element.css({ top: position.top + input.outerHeight(), left: position.left, minWidth: input.width(), - maxWidth: Math.max(input.width(), input.closest('form').width()), + maxWidth: Math.max(input.width(), input.closest('form').width()) }); } @@ -275,7 +277,6 @@ }; var timer = false; - var xhr = false; $.fn.autocomplete.ajax = function(ops) { if (timer) { clearTimeout(timer); } if (xhr) { xhr.abort(); } diff --git a/themes/bootstrap3/js/cart.js b/themes/bootstrap3/js/cart.js index 701dc92d54a08a4291ed4b7981b51b6016eee767..448dbb1fce38e69049acfd4ce71c8f0ce159c2c4 100644 --- a/themes/bootstrap3/js/cart.js +++ b/themes/bootstrap3/js/cart.js @@ -8,7 +8,7 @@ VuFind.register('cart', function() { var setDomain = function(domain) { _COOKIE_DOMAIN = domain; - } + }; var _uniqueArray = function(op) { var ret = []; @@ -18,7 +18,7 @@ VuFind.register('cart', function() { } } return ret; - } + }; var _getItems = function() { var items = Cookies.getItem(_COOKIE); @@ -26,14 +26,14 @@ VuFind.register('cart', function() { return items.split(_COOKIE_DELIM); } return []; - } + }; var _getSources = function() { var items = Cookies.getItem(_COOKIE_SOURCES); if(items) { return items.split(_COOKIE_DELIM); } return []; - } + }; var getFullItems = function() { var items = _getItems(); var sources = _getSources(); @@ -45,12 +45,12 @@ VuFind.register('cart', function() { full[full.length] = sources[items[i].charCodeAt(0)-65]+'|'+items[i].substr(1); } return full; - } + }; var updateCount = function() { var items = _getItems(); $('#cartItems strong').html(items.length); - } + }; var addItem = function(id,source) { if(!source) { @@ -70,7 +70,7 @@ VuFind.register('cart', function() { Cookies.setItem(_COOKIE, $.unique(cartItems).join(_COOKIE_DELIM), false, '/', _COOKIE_DOMAIN); updateCount(); return true; - } + }; var removeItem = function(id,source) { var cartItems = _getItems(); var cartSources = _getSources(); @@ -113,7 +113,7 @@ VuFind.register('cart', function() { return true; } return false; - } + }; var _cartNotificationTimeout = false; var _registerUpdate = function($form) { @@ -163,7 +163,7 @@ VuFind.register('cart', function() { return false; }); } - } + }; var init = function() { // Record buttons