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
30b249d3
Commit
30b249d3
authored
6 years ago
by
Lukas Mauß
Browse files
Options
Downloads
Patches
Plain Diff
Add ellipse function to content-list
parent
cfc501d7
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!139
Resolve "Various improvements"
This commit is part of merge request
!139
. Comments created here will be created in the context of that merge request.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/components/creator/content-list/content-list.component.ts
+11
-0
11 additions, 0 deletions
...components/creator/content-list/content-list.component.ts
with
11 additions
and
0 deletions
src/app/components/creator/content-list/content-list.component.ts
+
11
−
0
Edit
View file @
30b249d3
...
@@ -15,6 +15,7 @@ import { TranslateService } from '@ngx-translate/core';
...
@@ -15,6 +15,7 @@ import { TranslateService } from '@ngx-translate/core';
import
{
LanguageService
}
from
'
../../../services/util/language.service
'
;
import
{
LanguageService
}
from
'
../../../services/util/language.service
'
;
import
{
ContentDeleteComponent
}
from
'
../_dialogs/content-delete/content-delete.component
'
;
import
{
ContentDeleteComponent
}
from
'
../_dialogs/content-delete/content-delete.component
'
;
import
{
ContentEditComponent
}
from
'
../_dialogs/content-edit/content-edit.component
'
;
import
{
ContentEditComponent
}
from
'
../_dialogs/content-edit/content-edit.component
'
;
import
{
InnerSubscriber
}
from
'
rxjs/internal/InnerSubscriber
'
;
@
Component
({
@
Component
({
...
@@ -42,6 +43,8 @@ export class ContentListComponent implements OnInit {
...
@@ -42,6 +43,8 @@ export class ContentListComponent implements OnInit {
collectionName
:
string
;
collectionName
:
string
;
labelMaxLength
:
number
;
constructor
(
private
contentService
:
ContentService
,
constructor
(
private
contentService
:
ContentService
,
private
roomService
:
RoomService
,
private
roomService
:
RoomService
,
private
route
:
ActivatedRoute
,
private
route
:
ActivatedRoute
,
...
@@ -54,6 +57,7 @@ export class ContentListComponent implements OnInit {
...
@@ -54,6 +57,7 @@ export class ContentListComponent implements OnInit {
}
}
ngOnInit
()
{
ngOnInit
()
{
this
.
labelMaxLength
=
innerWidth
/
30
;
this
.
roomId
=
localStorage
.
getItem
(
`roomId`
);
this
.
roomId
=
localStorage
.
getItem
(
`roomId`
);
this
.
roomService
.
getRoom
(
this
.
roomId
).
subscribe
(
room
=>
{
this
.
roomService
.
getRoom
(
this
.
roomId
).
subscribe
(
room
=>
{
this
.
room
=
room
;
this
.
room
=
room
;
...
@@ -62,6 +66,13 @@ export class ContentListComponent implements OnInit {
...
@@ -62,6 +66,13 @@ export class ContentListComponent implements OnInit {
this
.
contentGroup
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'
contentGroup
'
));
this
.
contentGroup
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'
contentGroup
'
));
this
.
contentService
.
getContentsByIds
(
this
.
contentGroup
.
contentIds
).
subscribe
(
contents
=>
{
this
.
contentService
.
getContentsByIds
(
this
.
contentGroup
.
contentIds
).
subscribe
(
contents
=>
{
this
.
contents
=
contents
;
this
.
contents
=
contents
;
for
(
let
i
=
0
;
i
<
this
.
contents
.
length
;
i
++
)
{
if
(
this
.
contents
[
i
].
subject
.
length
>
this
.
labelMaxLength
)
{
this
.
contents
[
i
].
subject
=
this
.
contents
[
i
].
subject
.
substr
(
0
,
this
.
labelMaxLength
)
+
'
..
'
;
console
.
log
(
this
.
contents
);
}
}
});
});
this
.
route
.
params
.
subscribe
(
params
=>
{
this
.
route
.
params
.
subscribe
(
params
=>
{
sessionStorage
.
setItem
(
'
collection
'
,
params
[
'
contentGroup
'
]);
sessionStorage
.
setItem
(
'
collection
'
,
params
[
'
contentGroup
'
]);
...
...
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