Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
L
luna
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
luna
Commits
72f139d1
Commit
72f139d1
authored
Mar 28, 2018
by
zheng liu
Browse files
Options
Browse Files
Download
Plain Diff
Merged in dev (pull request #92)
feat: update
parents
21d0a0e7
fb64474a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
19 deletions
+30
-19
changeLanWarning.html
src/app/elements/nav/changeLanWarning.html
+4
-4
nav.component.ts
src/app/elements/nav/nav.component.ts
+26
-15
No files found.
src/app/elements/nav/changeLanWarning.html
View file @
72f139d1
<h1
mat-dialog-title
>
{{
"Warning"|trans
}}
</h1>
<h1
mat-dialog-title
>
{{
data.title
}}
</h1>
<h3>
{{
"The page will be reload, can you acceptable?"|trans
}}
{{
data.note
}}
</h3>
<div
style=
"float: right"
>
<button
mat-raised-button
(
click
)="
onNoClick
()"
>
{{
"Cancel"|trans
}}
</button>
<button
mat-raised-button
color=
"primary"
[
mat-dialog-close
]="
selected
"
cdkFocusInitial
>
{{"Confirm"|trans
}}
</button>
<button
mat-raised-button
(
click
)="
onNoClick
()"
>
{{
data.cancel
}}
</button>
<button
mat-raised-button
color=
"primary"
[
mat-dialog-close
]="
true
"
cdkFocusInitial
>
{{data.confirm
}}
</button>
</div>
src/app/elements/nav/nav.component.ts
View file @
72f139d1
...
...
@@ -99,33 +99,43 @@ export class ElementNavComponent implements OnInit {
break
;
}
case
'English'
:
{
this
.
ChangeLanWarningD
ialog
=
this
.
_dialog
.
open
(
const
d
ialog
=
this
.
_dialog
.
open
(
ChangLanWarningDialogComponent
,
{
height
:
'200px'
,
width
:
'300px'
,
data
:
{
title
:
'Warning'
,
note
:
'The page will be reload, can you acceptable?'
,
cancel
:
'Cancel'
,
confirm
:
'Confirm'
,
},
});
this
.
ChangeLanWarningDialog
.
afterClosed
().
subscribe
(
result
=>
{
if
(
result
)
{
this
.
English
();
}
});
dialog
.
afterClosed
().
subscribe
(
result
=>
{
if
(
result
)
{
this
.
English
();
}
});
break
;
}
case
'Chinese'
:
{
this
.
ChangeLanWarningD
ialog
=
this
.
_dialog
.
open
(
const
d
ialog
=
this
.
_dialog
.
open
(
ChangLanWarningDialogComponent
,
{
height
:
'200px'
,
width
:
'300px'
,
data
:
{
title
:
'警告'
,
note
:
'此页将被重载,是否确认?'
,
cancel
:
'取消'
,
confirm
:
'确认'
,
},
});
this
.
ChangeLanWarningDialog
.
afterClosed
().
subscribe
(
result
=>
{
if
(
result
)
{
this
.
Language
(
'cn'
);
}
});
dialog
.
afterClosed
().
subscribe
(
result
=>
{
if
(
result
)
{
this
.
Language
(
'cn'
);
}
});
break
;
}
default
:
{
...
...
@@ -338,7 +348,8 @@ export class ElementNavComponent implements OnInit {
})
export
class
ChangLanWarningDialogComponent
implements
OnInit
{
constructor
(
public
dialogRef
:
MatDialogRef
<
ChangLanWarningDialogComponent
>
)
{
constructor
(
public
dialogRef
:
MatDialogRef
<
ChangLanWarningDialogComponent
>
,
@
Inject
(
MAT_DIALOG_DATA
)
public
data
:
any
)
{
}
ngOnInit
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment