diff --git a/AUTHORS b/AUTHORS index 3f19bdaf1..e1a6a2c23 100644 --- a/AUTHORS +++ b/AUTHORS @@ -28,3 +28,4 @@ Authors of OpenSlides in chronological order of first contribution: Andreas Engler (Russian translation) Raimund Renkert Jochen Saalfeld + Fadi Abbud diff --git a/client/.prettierrc b/client/.prettierrc index 9ab259ab1..cc8a98bbc 100644 --- a/client/.prettierrc +++ b/client/.prettierrc @@ -6,6 +6,6 @@ "bracketSpacing": true, "htmlWhitespaceSensitivity": "strict", "semi": true, - "trailingComma": "es5", + "trailingComma": "none", "arrowParens": "avoid" } diff --git a/client/src/app/site/agenda/components/topic-detail/topic-detail.component.html b/client/src/app/site/agenda/components/topic-detail/topic-detail.component.html index 0a9438a2d..4b4481046 100644 --- a/client/src/app/site/agenda/components/topic-detail/topic-detail.component.html +++ b/client/src/app/site/agenda/components/topic-detail/topic-detail.component.html @@ -1,5 +1,10 @@ - +

@@ -20,15 +25,13 @@
-

{{ topic.title }}

-

{{ topicForm.get('title').value }}

+

{{ topic.title }}

{{ topicForm.get('title').value }}

- {{ topic.text }} -
No description provided.
+ {{ topic.text }}
No description provided.
@@ -39,11 +42,17 @@

-
+
- + A name is required
diff --git a/client/src/app/site/agenda/components/topic-detail/topic-detail.component.ts b/client/src/app/site/agenda/components/topic-detail/topic-detail.component.ts index 0983c9e8a..c9c123711 100644 --- a/client/src/app/site/agenda/components/topic-detail/topic-detail.component.ts +++ b/client/src/app/site/agenda/components/topic-detail/topic-detail.component.ts @@ -174,11 +174,17 @@ export class TopicDetailComponent { } /** + * clicking Shift and Enter will save automatically * Hitting escape while in topicForm should cancel editing + * * @param event has the code */ - public keyDownFunction(event: KeyboardEvent): void { - if (event.key === "Escape") { + public onKeyDown(event: KeyboardEvent): void { + if (event.key === 'Enter' && event.shiftKey) { + this.saveTopic(); + } + + if (event.key === 'Escape') { this.setEditMode(false); } } diff --git a/client/src/app/site/motions/components/motion-detail/motion-detail.component.html b/client/src/app/site/motions/components/motion-detail/motion-detail.component.html index 3be254624..555cff31c 100644 --- a/client/src/app/site/motions/components/motion-detail/motion-detail.component.html +++ b/client/src/app/site/motions/components/motion-detail/motion-detail.component.html @@ -137,7 +137,7 @@ - +
@@ -256,7 +256,7 @@ - +
diff --git a/client/src/app/site/motions/components/motion-detail/motion-detail.component.ts b/client/src/app/site/motions/components/motion-detail/motion-detail.component.ts index 6b26ebfcb..6a1003182 100644 --- a/client/src/app/site/motions/components/motion-detail/motion-detail.component.ts +++ b/client/src/app/site/motions/components/motion-detail/motion-detail.component.ts @@ -291,6 +291,17 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit { }); } + /** + * clicking Shift and Enter will save automatically + * + * @param event has the code + */ + public onKeyDown(event: KeyboardEvent): void { + if (event.key === 'Enter' && event.shiftKey) { + this.saveMotion(); + } + } + /** * Save a motion. Calls the "patchValues" function in the MotionObject * diff --git a/client/src/app/site/users/components/user-detail/user-detail.component.html b/client/src/app/site/users/components/user-detail/user-detail.component.html index b06b05a17..223458d48 100644 --- a/client/src/app/site/users/components/user-detail/user-detail.component.html +++ b/client/src/app/site/users/components/user-detail/user-detail.component.html @@ -29,7 +29,7 @@ - +
diff --git a/client/src/app/site/users/components/user-detail/user-detail.component.ts b/client/src/app/site/users/components/user-detail/user-detail.component.ts index 7bd465424..57dd73600 100644 --- a/client/src/app/site/users/components/user-detail/user-detail.component.ts +++ b/client/src/app/site/users/components/user-detail/user-detail.component.ts @@ -274,6 +274,17 @@ export class UserDetailComponent extends BaseViewComponent implements OnInit { }); } + /** + * clicking Shift and Enter will save automatically + * + * @param event has the code + */ + public onKeyDown(event: KeyboardEvent): void { + if (event.key === 'Enter' && event.shiftKey) { + this.saveUser(); + } + } + /** * Save / Submit a user */