From 43042ed8fc07d7b8954776fd6a73107e7147f2d5 Mon Sep 17 00:00:00 2001 From: Olivier Barais Date: Tue, 19 Mar 2024 08:42:39 +0100 Subject: [PATCH] add keyboardshortcut --- .../corrigequestion.component.ts | 29 +++++++++++++++++++ src/main/webapp/i18n/en/scanexammodule.json | 4 ++- src/main/webapp/i18n/fr/scanexammodule.json | 4 ++- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/app/scanexam/corrigequestion/corrigequestion.component.ts b/src/main/webapp/app/scanexam/corrigequestion/corrigequestion.component.ts index 6c5c9226..477fc9f0 100644 --- a/src/main/webapp/app/scanexam/corrigequestion/corrigequestion.component.ts +++ b/src/main/webapp/app/scanexam/corrigequestion/corrigequestion.component.ts @@ -510,6 +510,35 @@ export class CorrigequestionComponent implements OnInit, AfterViewInit { command: () => this.toggleFocusView(), preventDefault: true, }, + { + key: ['shift + right'], + label: this.translateService.instant('scanexam.togglefocusViewLabel'), + description: this.translateService.instant('scanexam.showbar'), + command: () => (this.layoutsidebarVisible = true), + preventDefault: true, + }, + { + key: ['shift + left'], + label: this.translateService.instant('scanexam.togglefocusViewLabel'), + description: this.translateService.instant('scanexam.hidebar'), + command: () => (this.layoutsidebarVisible = false), + preventDefault: true, + }, + { + key: ['ctrl + backspace', 'cmd + backspace'], + label: this.translateService.instant('scanexam.togglefocusViewLabel'), + description: this.translateService.instant('scanexam.gotolistquestion'), + command: () => this.gotoMarkingSummary(), + preventDefault: true, + }, + { + key: ['ctrl + enter', 'cmd + enter'], + label: this.translateService.instant('scanexam.togglefocusViewLabel'), + description: this.translateService.instant('scanexam.showgalleria'), + command: () => this.showGalleria(), + preventDefault: true, + }, + { // ArrowRight key: ['ctrl + right', 'cmd + right'], diff --git a/src/main/webapp/i18n/en/scanexammodule.json b/src/main/webapp/i18n/en/scanexammodule.json index f6c13320..ed65c8b2 100644 --- a/src/main/webapp/i18n/en/scanexammodule.json +++ b/src/main/webapp/i18n/en/scanexammodule.json @@ -476,6 +476,8 @@ "randomcorrectionTooltip": "Allows the marker to propose a random order in which the exam sheets are evaluated for this question.", "defaultpointTooltip": "Default point for this question", "togglefocusViewLabel": "Layout", - "togglefocusView": "Hides non-essential widgets, so you can focus on correcting them" + "togglefocusView": "Hides non-essential widgets, so you can focus on correcting them", + "showbar": "Show the parameter sidebar", + "hidebar": "Hide the parameter sidebar" } } diff --git a/src/main/webapp/i18n/fr/scanexammodule.json b/src/main/webapp/i18n/fr/scanexammodule.json index 0f9ea477..b46aed63 100644 --- a/src/main/webapp/i18n/fr/scanexammodule.json +++ b/src/main/webapp/i18n/fr/scanexammodule.json @@ -480,6 +480,8 @@ "randomcorrectionTooltip": "Permet de proposer au correcteur un tirage aléatoire pour l'ordre de correction des copies pour cette question", "defaultpointTooltip": "Point par défaut pour cette question", "togglefocusViewLabel": "Disposition", - "togglefocusView": "Masque les widgets non essentiels, pour se focaliser sur la correction" + "togglefocusView": "Masque les widgets non essentiels, pour se focaliser sur la correction", + "showbar": "Voir le tirroir de paramètre", + "hidebar": "Masquer le tirroir de paramètre" } }