From 7f5516ff55846fb5317099a066693cdf2e0394e8 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Fri, 30 Jun 2017 11:04:54 -0400 Subject: [PATCH] Simple jslint fixes. --- themes/bootstrap3/js/cart.js | 9 +++++---- themes/bootstrap3/js/channels.js | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/themes/bootstrap3/js/cart.js b/themes/bootstrap3/js/cart.js index 929e8714262..bafd2829626 100644 --- a/themes/bootstrap3/js/cart.js +++ b/themes/bootstrap3/js/cart.js @@ -53,6 +53,11 @@ VuFind.register('cart', function Cart() { return full; } + function hasItem(id, _source) { + var source = _source || VuFind.defaultSearchBackend; + return _getItems().indexOf(String.fromCharCode(65 + _getSources().indexOf(source)) + id) > -1; + } + function _refreshToggles() { var $toggleBtns = $('.btn-bookbag-toggle'); if ($toggleBtns.length > 0) { @@ -79,10 +84,6 @@ VuFind.register('cart', function Cart() { _refreshToggles(); } - function hasItem(id, _source) { - var source = _source || VuFind.defaultSearchBackend; - return _getItems().indexOf(String.fromCharCode(65 + _getSources().indexOf(source)) + id) > -1; - } function addItem(id, _source) { var source = _source || VuFind.defaultSearchBackend; var cartItems = _getItems(); diff --git a/themes/bootstrap3/js/channels.js b/themes/bootstrap3/js/channels.js index 42d05569f64..5be449d5402 100644 --- a/themes/bootstrap3/js/channels.js +++ b/themes/bootstrap3/js/channels.js @@ -29,9 +29,9 @@ function channelAddLinkButtons(elem) { for (var i = 0; i < links.length; i++) { $cont.append( $('<a/> ', { - href: links[i].url, - class: links[i].label + " btn btn-default", - html: '<i class="fa ' + links[i].icon + '"></i> ' + VuFind.translate(links[i].label) + 'href': links[i].url, + 'class': links[i].label + " btn btn-default", + 'html': '<i class="fa ' + links[i].icon + '"></i> ' + VuFind.translate(links[i].label) }) ); } -- GitLab