From b4ebef16a967e0465c5ed151bc133d53412404eb Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 25 Feb 2016 08:01:15 +0100 Subject: [PATCH] Close keyboard shortcuts modal on alt+ctrl+h again. --- .../javascripts/app/controllers/keyboard_shortcurs.coffee | 2 ++ .../app/controllers/widget/keyboard_shortcuts.coffee | 3 +++ 2 files changed, 5 insertions(+) diff --git a/app/assets/javascripts/app/controllers/keyboard_shortcurs.coffee b/app/assets/javascripts/app/controllers/keyboard_shortcurs.coffee index ec5f5fd03..29df4a210 100644 --- a/app/assets/javascripts/app/controllers/keyboard_shortcurs.coffee +++ b/app/assets/javascripts/app/controllers/keyboard_shortcurs.coffee @@ -11,6 +11,8 @@ class Index extends App.ControllerModal return if !@authenticate() + @bind('keyboard_shortcuts_close', @close) + content: -> App.view('keyboard_shortcuts')( areas: App.Config.get('keyboard_shortcuts') diff --git a/app/assets/javascripts/app/controllers/widget/keyboard_shortcuts.coffee b/app/assets/javascripts/app/controllers/widget/keyboard_shortcuts.coffee index 2f7569bbc..7109d1489 100644 --- a/app/assets/javascripts/app/controllers/widget/keyboard_shortcuts.coffee +++ b/app/assets/javascripts/app/controllers/widget/keyboard_shortcuts.coffee @@ -73,6 +73,9 @@ App.Config.set( hotkeys: true description: 'List of shortcuts' callback: -> + if window.location.hash is '#keyboard_shortcuts' + App.Event.trigger('keyboard_shortcuts_close') + return window.location.hash = '#keyboard_shortcuts' } {