Fixed shortcuts.

This commit is contained in:
Martin Edenhofer 2016-04-06 16:06:26 +02:00
parent 691f2006b2
commit e5c0c7f109
2 changed files with 19 additions and 18 deletions

View file

@ -31,6 +31,7 @@ class App.KeyboardShortcutWidget extends Spine.Module
for area in areas
for item in area.content
for shortcut in item.shortcuts
do (shortcut) =>
modifier = ''
if shortcut.hotkeys
modifier += navigationHotkeys
@ -127,7 +128,7 @@ App.Config.set(
hotkeys: true
description: 'List of shortcuts'
globalEvent: 'list-of-shortcuts'
callback: (e) =>
callback: =>
if @dialog && @dialog.exists()
@dialog.close()
@dialog = false
@ -135,7 +136,7 @@ App.Config.set(
@dialog = new App.KeyboardShortcutModal()
}
{
key: 'x'
key: 'w'
hotkeys: true
description: 'Close current tab'
globalEvent: 'close-current-tab'
@ -397,7 +398,7 @@ App.Config.set(
globalEvent: 'richtext-h3'
}
{
key: 'w'
key: 'x'
hotkeys: true,
description: 'Removes any hyperlink'
globalEvent: 'richtext-remove-hyperlink'

View file

@ -75,7 +75,7 @@ class KeyboardShortcutsTest < TestCase
)
# close again
shortcut(key: 'x')
shortcut(key: 'w')
watch_for_disappear(
css: '.active.content',
@ -94,7 +94,7 @@ class KeyboardShortcutsTest < TestCase
sleep 5
# close again
shortcut(key: 'x')
shortcut(key: 'w')
watch_for_disappear(
css: '.active.content',
value: ticket1[:number],