From 32d2581e1c05365956a1c5327aa38878892a5ce6 Mon Sep 17 00:00:00 2001
From: Chris Hallberg <crhallberg@gmail.com>
Date: Thu, 4 Sep 2014 10:19:52 -0400
Subject: [PATCH] Bootstrap 3 checkstyle part 2.

---
 themes/bootstrap3/js/common.js        | 2 +-
 themes/bootstrap3/js/embedGBS.js      | 2 ++
 themes/bootstrap3/js/hierarchyTree.js | 2 +-
 themes/bootstrap3/js/preview.js       | 2 +-
 4 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/themes/bootstrap3/js/common.js b/themes/bootstrap3/js/common.js
index 81547fe2901..57b75ab71ac 100644
--- a/themes/bootstrap3/js/common.js
+++ b/themes/bootstrap3/js/common.js
@@ -1,4 +1,4 @@
-/*global ajaxLoadTab, Bloodhound, checkSaveStatuses, console, extractSource, hexEncode, Lightbox, path, rc4Encrypt, refreshCommentList, vufindString */
+/*global ajaxLoadTab, Bloodhound, btoa, checkSaveStatuses, console, extractSource, hexEncode, Lightbox, path, rc4Encrypt, refreshCommentList, unescape, vufindString */
 
 /* --- GLOBAL FUNCTIONS --- */
 function htmlEncode(value){
diff --git a/themes/bootstrap3/js/embedGBS.js b/themes/bootstrap3/js/embedGBS.js
index a6dfa1abfcd..ae81464ebee 100644
--- a/themes/bootstrap3/js/embedGBS.js
+++ b/themes/bootstrap3/js/embedGBS.js
@@ -1,3 +1,5 @@
+/*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');
 google.load("books", "0", {"language":lang});
diff --git a/themes/bootstrap3/js/hierarchyTree.js b/themes/bootstrap3/js/hierarchyTree.js
index a0384a7cc5d..4d68b2b6f14 100644
--- a/themes/bootstrap3/js/hierarchyTree.js
+++ b/themes/bootstrap3/js/hierarchyTree.js
@@ -77,7 +77,7 @@ function doTreeSearch()
             tree._open_to(id);
           }
           for(i=data.results.length;i--;) {
-            id = htmlEncodeId(data.results[i]);
+            var id = htmlEncodeId(data.results[i]);
             $('#hierarchyTree').find('#'+id).addClass('jstree-search');
           }
           changeNoResultLabel(false);
diff --git a/themes/bootstrap3/js/preview.js b/themes/bootstrap3/js/preview.js
index 5cff592c0cb..621bde15bee 100644
--- a/themes/bootstrap3/js/preview.js
+++ b/themes/bootstrap3/js/preview.js
@@ -5,7 +5,7 @@ function getHathiOptions() {
 function getGoogleOptions() {
     var opts_temp = $('[class*="googlePreviewSpan"]').attr("class").split('__')[1].split(';');
     var options = {};
-    for (key in opts_temp) {
+    for(var key in opts_temp) {
         var arr = opts_temp[key].split(':');
         options[arr[0]] = arr[1].split(',');
     }
-- 
GitLab