Skip to content
Snippets Groups Projects
Commit c26becd2 authored by Demian Katz's avatar Demian Katz
Browse files

Style fixes.

parent 1ac7ab9d
No related merge requests found
...@@ -17,13 +17,15 @@ ...@@ -17,13 +17,15 @@
minLength: 3 minLength: 3
}; };
var xhr = false;
function align(input) { function align(input) {
var position = input.offset(); var position = input.offset();
element.css({ element.css({
top: position.top + input.outerHeight(), top: position.top + input.outerHeight(),
left: position.left, left: position.left,
minWidth: input.width(), 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 @@ ...@@ -275,7 +277,6 @@
}; };
var timer = false; var timer = false;
var xhr = false;
$.fn.autocomplete.ajax = function(ops) { $.fn.autocomplete.ajax = function(ops) {
if (timer) { clearTimeout(timer); } if (timer) { clearTimeout(timer); }
if (xhr) { xhr.abort(); } if (xhr) { xhr.abort(); }
......
...@@ -8,7 +8,7 @@ VuFind.register('cart', function() { ...@@ -8,7 +8,7 @@ VuFind.register('cart', function() {
var setDomain = function(domain) { var setDomain = function(domain) {
_COOKIE_DOMAIN = domain; _COOKIE_DOMAIN = domain;
} };
var _uniqueArray = function(op) { var _uniqueArray = function(op) {
var ret = []; var ret = [];
...@@ -18,7 +18,7 @@ VuFind.register('cart', function() { ...@@ -18,7 +18,7 @@ VuFind.register('cart', function() {
} }
} }
return ret; return ret;
} };
var _getItems = function() { var _getItems = function() {
var items = Cookies.getItem(_COOKIE); var items = Cookies.getItem(_COOKIE);
...@@ -26,14 +26,14 @@ VuFind.register('cart', function() { ...@@ -26,14 +26,14 @@ VuFind.register('cart', function() {
return items.split(_COOKIE_DELIM); return items.split(_COOKIE_DELIM);
} }
return []; return [];
} };
var _getSources = function() { var _getSources = function() {
var items = Cookies.getItem(_COOKIE_SOURCES); var items = Cookies.getItem(_COOKIE_SOURCES);
if(items) { if(items) {
return items.split(_COOKIE_DELIM); return items.split(_COOKIE_DELIM);
} }
return []; return [];
} };
var getFullItems = function() { var getFullItems = function() {
var items = _getItems(); var items = _getItems();
var sources = _getSources(); var sources = _getSources();
...@@ -45,12 +45,12 @@ VuFind.register('cart', function() { ...@@ -45,12 +45,12 @@ VuFind.register('cart', function() {
full[full.length] = sources[items[i].charCodeAt(0)-65]+'|'+items[i].substr(1); full[full.length] = sources[items[i].charCodeAt(0)-65]+'|'+items[i].substr(1);
} }
return full; return full;
} };
var updateCount = function() { var updateCount = function() {
var items = _getItems(); var items = _getItems();
$('#cartItems strong').html(items.length); $('#cartItems strong').html(items.length);
} };
var addItem = function(id,source) { var addItem = function(id,source) {
if(!source) { if(!source) {
...@@ -70,7 +70,7 @@ VuFind.register('cart', function() { ...@@ -70,7 +70,7 @@ VuFind.register('cart', function() {
Cookies.setItem(_COOKIE, $.unique(cartItems).join(_COOKIE_DELIM), false, '/', _COOKIE_DOMAIN); Cookies.setItem(_COOKIE, $.unique(cartItems).join(_COOKIE_DELIM), false, '/', _COOKIE_DOMAIN);
updateCount(); updateCount();
return true; return true;
} };
var removeItem = function(id,source) { var removeItem = function(id,source) {
var cartItems = _getItems(); var cartItems = _getItems();
var cartSources = _getSources(); var cartSources = _getSources();
...@@ -113,7 +113,7 @@ VuFind.register('cart', function() { ...@@ -113,7 +113,7 @@ VuFind.register('cart', function() {
return true; return true;
} }
return false; return false;
} };
var _cartNotificationTimeout = false; var _cartNotificationTimeout = false;
var _registerUpdate = function($form) { var _registerUpdate = function($form) {
...@@ -163,7 +163,7 @@ VuFind.register('cart', function() { ...@@ -163,7 +163,7 @@ VuFind.register('cart', function() {
return false; return false;
}); });
} }
} };
var init = function() { var init = function() {
// Record buttons // Record buttons
......
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