From 97fdf72346879f5eb028b30f2ae97fe5cd41afd4 Mon Sep 17 00:00:00 2001 From: Jessica Lawshe Date: Mon, 15 Oct 2018 14:53:52 -0500 Subject: [PATCH] If hash not empty and remove unused file --- services/web/app/views/_scripts/active_tab.pug | 10 ---------- .../public/coffee/directives/bookmarkableTabset.coffee | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 services/web/app/views/_scripts/active_tab.pug diff --git a/services/web/app/views/_scripts/active_tab.pug b/services/web/app/views/_scripts/active_tab.pug deleted file mode 100644 index c54832586a..0000000000 --- a/services/web/app/views/_scripts/active_tab.pug +++ /dev/null @@ -1,10 +0,0 @@ -//- script(type="text/javascript"). -//- if (window.location.hash) { -//- setTimeout(function(){ -//- tabID = window.location.hash.replace(/#!?/, '') -//- tab = document.getElementById(tabID) -//- if (tab && typeof(tab) != 'undefined' && tab != null) { -//- tab.setAttribute('active', true) -//- } -//- }, 500); -//- } \ No newline at end of file diff --git a/services/web/public/coffee/directives/bookmarkableTabset.coffee b/services/web/public/coffee/directives/bookmarkableTabset.coffee index 84251075df..e6434467a1 100644 --- a/services/web/public/coffee/directives/bookmarkableTabset.coffee +++ b/services/web/public/coffee/directives/bookmarkableTabset.coffee @@ -7,7 +7,7 @@ define [ link: (scope, el, attrs, tabset) -> scope.$applyAsync () -> hash = $location.hash() - if hash? + if hash? and hash != "" matchingTab = _.find tabset.tabs, (tab) -> tab.bookmarkableTabId == hash if matchingTab?