From c58eb63ddb252c98fdf6f82d9cf3992d3eb4177e Mon Sep 17 00:00:00 2001 From: CupCakeArmy <nicco.borgioli@gmail.com> Date: Thu, 31 Mar 2016 15:36:10 +0200 Subject: [PATCH] Fix getTool() --- admin/lib/cust/main.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/admin/lib/cust/main.js b/admin/lib/cust/main.js index 2a07a2c..583c5f0 100644 --- a/admin/lib/cust/main.js +++ b/admin/lib/cust/main.js @@ -22,12 +22,13 @@ var tools = { }, // Ajax loading gunction and getting the tools - curHash: null, + curTool: null, getTool: function(tool) { - var nextTool = tool || window.location.hash.slice(1); - if(tools.curTool != nextTool){ - tools.curTool = window.location.hash = nextTool; - } + var nextTool = (typeof tool != 'object')? tool : window.location.hash.slice(1); + if(tools.curTool == nextTool) + return; + tools.curTool = nextTool; + window.location.hash = nextTool; $('#wheel-logo').css('transform', 'rotate(360deg)'); $('#main-content').fadeOut(100,function() { $.ajax({ -- GitLab