From aadde87f42e4b705b652f009a9681c48de2b9c61 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Thu, 19 Apr 2018 12:04:49 +0100 Subject: [PATCH] moved keycodes constants to common lib file updated markup to use buttons instead of links --- .../javascripts/ide/components/file_finder/index.vue | 12 +++++++----- .../javascripts/ide/components/file_finder/item.vue | 6 +++--- app/assets/javascripts/ide/constants.js | 4 ---- app/assets/javascripts/lib/utils/keycodes.js | 4 ++++ app/assets/stylesheets/framework/common.scss | 1 + .../ide/components/file_finder/index_spec.js | 2 +- 6 files changed, 16 insertions(+), 13 deletions(-) create mode 100644 app/assets/javascripts/lib/utils/keycodes.js diff --git a/app/assets/javascripts/ide/components/file_finder/index.vue b/app/assets/javascripts/ide/components/file_finder/index.vue index deddc38c970..ea2b13a8b21 100644 --- a/app/assets/javascripts/ide/components/file_finder/index.vue +++ b/app/assets/javascripts/ide/components/file_finder/index.vue @@ -8,11 +8,13 @@ import { MAX_FILE_FINDER_RESULTS, FILE_FINDER_ROW_HEIGHT, FILE_FINDER_EMPTY_ROW_HEIGHT, +} from '../../constants'; +import { UP_KEY_CODE, DOWN_KEY_CODE, ENTER_KEY_CODE, ESC_KEY_CODE, -} from '../../constants'; +} from '../../../lib/utils/keycodes'; export default { components: { @@ -191,7 +193,7 @@ export default { >