Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arsnova-lite
Manage
Activity
Members
Labels
Plan
Issues
24
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
ARSnova
arsnova-lite
Commits
7c62d422
"git@git.thm.de:mtrl12/frag-jetzt-swtp-2022.git" did not exist on "0327ec40d78cee0c06f96df30f08d7d96a96acb8"
Commit
7c62d422
authored
6 years ago
by
Lukas Mauß
Committed by
Tom Käsler
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix input field, so that the number is splitted in two 4-digit-blocks
parent
de76c207
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!141
Resolve "Session ID input field enhancement"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/components/shared/room-join/room-join.component.html
+5
-3
5 additions, 3 deletions
src/app/components/shared/room-join/room-join.component.html
src/app/components/shared/room-join/room-join.component.ts
+3
-3
3 additions, 3 deletions
src/app/components/shared/room-join/room-join.component.ts
with
8 additions
and
6 deletions
src/app/components/shared/room-join/room-join.component.html
+
5
−
3
View file @
7c62d422
...
@@ -2,9 +2,11 @@
...
@@ -2,9 +2,11 @@
<form
(ngSubmit)=
"joinRoom(roomId.value)"
>
<form
(ngSubmit)=
"joinRoom(roomId.value)"
>
<div
fxLayout=
"row"
fxLayoutAlign=
"center"
fxLayoutGap=
"10px"
>
<div
fxLayout=
"row"
fxLayoutAlign=
"center"
fxLayoutGap=
"10px"
>
<mat-form-field>
<mat-form-field>
<input
matInput
#roomId
type=
"number"
min=
"00000000"
max=
"99999999"
onkeydown=
"if(this.value.length === 8 && event.keyCode != 8) return false;"
placeholder=
"Session-Id"
[formControl]=
"roomFormControl"
<input
matInput
#roomId
type=
"text"
inputmode=
"numeric"
min=
"00000000"
max=
"99999999"
[errorStateMatcher]=
"matcher"
/>
onkeydown=
"if(this.value.length - (this.value.split(' ').length -1) === 8 && event.keyCode != 8) return false;
<mat-hint
align=
"end"
>
{{roomId.value.split(' ').join(' ').length}} / 8
</mat-hint>
if(this.value.length === 4 && event.keyCode != 8) this.value = this.value + ' ';"
placeholder=
"Session-Id"
[formControl]=
"roomFormControl"
[errorStateMatcher]=
"matcher"
/>
<mat-hint
align=
"end"
>
{{ roomId.value.length - (roomId.value.split(' ').length -1) }} / 8
</mat-hint>
<mat-error
*ngIf=
"roomFormControl.hasError('required')"
>
{{ 'home-page.please-enter' | translate}}
</mat-error>
<mat-error
*ngIf=
"roomFormControl.hasError('required')"
>
{{ 'home-page.please-enter' | translate}}
</mat-error>
<mat-error
*ngIf=
"roomFormControl.hasError('minlength')"
>
{{ 'home-page.exactly-8' | translate}}
</mat-error>
<mat-error
*ngIf=
"roomFormControl.hasError('minlength')"
>
{{ 'home-page.exactly-8' | translate}}
</mat-error>
</mat-form-field>
</mat-form-field>
...
...
This diff is collapsed.
Click to expand it.
src/app/components/shared/room-join/room-join.component.ts
+
3
−
3
View file @
7c62d422
...
@@ -29,8 +29,8 @@ export class RoomJoinComponent implements OnInit {
...
@@ -29,8 +29,8 @@ export class RoomJoinComponent implements OnInit {
room
:
Room
;
room
:
Room
;
demoId
=
'
95680586
'
;
demoId
=
'
95680586
'
;
user
:
User
;
user
:
User
;
roomFormControl
=
new
FormControl
(
''
,
[
Validators
.
required
,
Validators
.
minLength
(
8
),
Validators
.
maxLength
(
8
)]);
roomFormControl
=
new
FormControl
(
''
,
[
Validators
.
required
,
Validators
.
minLength
(
9
),
Validators
.
maxLength
(
9
)]);
matcher
=
new
RegisterErrorStateMatcher
();
matcher
=
new
RegisterErrorStateMatcher
();
...
@@ -46,7 +46,7 @@ export class RoomJoinComponent implements OnInit {
...
@@ -46,7 +46,7 @@ export class RoomJoinComponent implements OnInit {
}
}
getRoom
(
id
:
string
):
void
{
getRoom
(
id
:
string
):
void
{
this
.
roomService
.
getRoomByShortId
(
id
)
this
.
roomService
.
getRoomByShortId
(
id
.
replace
(
/
\s
/g
,
""
)
)
.
subscribe
(
room
=>
{
.
subscribe
(
room
=>
{
this
.
room
=
room
;
this
.
room
=
room
;
if
(
!
room
)
{
if
(
!
room
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment