From a3859392c685f4c961789b8de8e6bd6d2fccc0a4 Mon Sep 17 00:00:00 2001 From: Cindy Lu Date: Thu, 23 Apr 2015 11:23:14 -0700 Subject: [PATCH] Jshint unused and undef cleanup for accordion_nav, tabs JS Removing unused and undefined variables in accordion_nav, tabs javascript. This ensures that once we enable it globally, the gate will not barf. Change-Id: I9a8f6c6b71ebc770b4f060ccf4b0b3a1cce8f7d9 Partial-bug: #1438620 --- horizon/static/horizon/js/horizon.accordion_nav.js | 2 +- horizon/static/horizon/js/horizon.tabs.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/horizon/static/horizon/js/horizon.accordion_nav.js b/horizon/static/horizon/js/horizon.accordion_nav.js index ee718b807f..2a8c962fa5 100644 --- a/horizon/static/horizon/js/horizon.accordion_nav.js +++ b/horizon/static/horizon/js/horizon.accordion_nav.js @@ -58,7 +58,7 @@ horizon.addInitFunction(function() { // panel group click $('.nav_accordion > dd > div > h4').click(function() { var myPanelGroupHeader = $(this); - myPanelGroupWasActive = myPanelGroupHeader.hasClass("active"); + var myPanelGroupWasActive = myPanelGroupHeader.hasClass("active"); // collapse all panel groups var allPanelGroupHeaders = $('.nav_accordion > dd > div > h4'); diff --git a/horizon/static/horizon/js/horizon.tabs.js b/horizon/static/horizon/js/horizon.tabs.js index 5b659aa780..67d0bfcf0b 100644 --- a/horizon/static/horizon/js/horizon.tabs.js +++ b/horizon/static/horizon/js/horizon.tabs.js @@ -12,7 +12,7 @@ horizon.tabs.initTabLoad = function (tab) { }); }; -horizon.tabs.load_tab = function (evt) { +horizon.tabs.load_tab = function () { var $this = $(this), tab_id = $this.attr('data-target'), tab_pane = $(tab_id); @@ -60,7 +60,7 @@ horizon.addInitFunction(horizon.tabs.init = function () { }); // Initialize stored tab state for tab groups on this page. - $(".nav-tabs[data-sticky-tabs='sticky']").each(function (index, item) { + $(".nav-tabs[data-sticky-tabs='sticky']").each(function () { var $this = $(this), id = $this.attr("id"), active_tab = data[id];