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
898447d2
Commit
898447d2
authored
6 years ago
by
Lukas Mauß
Browse files
Options
Downloads
Patches
Plain Diff
Show notification before open blog, dsgvo or imprint
parent
0f7ec400
1 merge request
!139
Resolve "Various improvements"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/components/shared/footer/footer.component.ts
+23
-5
23 additions, 5 deletions
src/app/components/shared/footer/footer.component.ts
src/app/services/util/notification.service.ts
+3
-2
3 additions, 2 deletions
src/app/services/util/notification.service.ts
with
26 additions
and
7 deletions
src/app/components/shared/footer/footer.component.ts
+
23
−
5
View file @
898447d2
...
...
@@ -23,16 +23,34 @@ export class FooterComponent implements OnInit {
}
navToBlog
()
{
this
.
notificationService
.
show
(
'
Der Blog wird in einem neuen Fenster geöffnet
'
,
'
Okay!
'
,
{
duration
:
3000
this
.
notificationService
.
show
(
'
Der Blog wird in einem neuen Fenster geöffnet..
'
,
'
Öffnen
'
,
{
duration
:
5000
});
this
.
notificationService
.
snackRef
.
afterDismissed
().
subscribe
(
info
=>
{
if
(
info
.
dismissedByAction
===
true
)
{
window
.
open
(
this
.
blogUrl
,
'
_blank
'
);
}
});
window
.
open
(
this
.
blogUrl
,
'
_blank
'
);
}
navToDSGVO
()
{
window
.
open
(
this
.
dsgvoUrl
,
'
_blank
'
);
this
.
notificationService
.
show
(
'
Die Datenschutzverordnung wird in einem neuen Fenster geöffnet..
'
,
'
Öffnen
'
,
{
duration
:
5000
});
this
.
notificationService
.
snackRef
.
afterDismissed
().
subscribe
(
info
=>
{
if
(
info
.
dismissedByAction
===
true
)
{
window
.
open
(
this
.
dsgvoUrl
,
'
_blank
'
);
}
});
}
navToImprint
()
{
window
.
open
(
this
.
imprUrl
,
'
_blank
'
);
this
.
notificationService
.
show
(
'
Das Impressum wird in einem neuen Fenster geöffnet..
'
,
'
Öffnen
'
,
{
duration
:
5000
});
this
.
notificationService
.
snackRef
.
afterDismissed
().
subscribe
(
info
=>
{
if
(
info
.
dismissedByAction
===
true
)
{
window
.
open
(
this
.
imprUrl
,
'
_blank
'
);
}
});
}
}
This diff is collapsed.
Click to expand it.
src/app/services/util/notification.service.ts
+
3
−
2
View file @
898447d2
...
...
@@ -6,12 +6,13 @@ export class NotificationService {
private
defaultConfig
=
{
duration
:
2000
};
public
snackRef
:
any
;
constructor
(
p
rivate
snackBar
:
MatSnackBar
)
{
constructor
(
p
ublic
snackBar
:
MatSnackBar
)
{
}
show
(
message
:
string
,
action
?:
string
,
config
?:
MatSnackBarConfig
)
{
// Delegate the message and merge the (optionally) passed config with the default config
this
.
snackBar
.
open
(
message
,
action
,
Object
.
assign
({},
this
.
defaultConfig
,
config
));
this
.
snackRef
=
this
.
snackBar
.
open
(
message
,
action
,
Object
.
assign
({},
this
.
defaultConfig
,
config
));
}
}
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