diff --git a/app/assets/javascripts/app/controllers/dashboard.coffee b/app/assets/javascripts/app/controllers/dashboard.coffee index 701519dec..606a9f3dd 100644 --- a/app/assets/javascripts/app/controllers/dashboard.coffee +++ b/app/assets/javascripts/app/controllers/dashboard.coffee @@ -1,4 +1,5 @@ class App.Dashboard extends App.Controller + clueAccess: true events: 'click .tabs .tab': 'toggle' 'click .intro': 'clues' @@ -7,7 +8,7 @@ class App.Dashboard extends App.Controller super if @isRole('Customer') - @navigate '#', true + @clueAccess = false return # render page @@ -37,12 +38,15 @@ class App.Dashboard extends App.Controller ) mayBeClues: => + return if !@clueAccess + return if !@activeState preferences = @Session.get('preferences') + @clueAccess = false return if preferences['intro'] - return if !@el.is(':visible') @clues() clues: (e) => + @clueAccess = false if e e.preventDefault() new App.FirstStepsClues( @@ -70,6 +74,10 @@ class App.Dashboard extends App.Controller show: (params) => + if @isRole('Customer') + @navigate '#', true + return + # set title @title 'Dashboard' diff --git a/test/browser_test_helper.rb b/test/browser_test_helper.rb index 63a03fd34..1b2915548 100644 --- a/test/browser_test_helper.rb +++ b/test/browser_test_helper.rb @@ -238,7 +238,7 @@ class TestCase < Test::Unit::TestCase =end - def clues_close(params) + def clues_close(params = {}) switch_window_focus(params) log('clues_close', params)