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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
11 deletions
+22
-11
changeLanWarning.html
src/app/elements/nav/changeLanWarning.html
+4
-4
nav.component.ts
src/app/elements/nav/nav.component.ts
+18
-7
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>
<h3>
{{
"The page will be reload, can you acceptable?"|trans
}}
{{
data.note
}}
</h3>
</h3>
<div
style=
"float: right"
>
<div
style=
"float: right"
>
<button
mat-raised-button
(
click
)="
onNoClick
()"
>
{{
"Cancel"|trans
}}
</button>
<button
mat-raised-button
(
click
)="
onNoClick
()"
>
{{
data.cancel
}}
</button>
<button
mat-raised-button
color=
"primary"
[
mat-dialog-close
]="
selected
"
cdkFocusInitial
>
{{"Confirm"|trans
}}
</button>
<button
mat-raised-button
color=
"primary"
[
mat-dialog-close
]="
true
"
cdkFocusInitial
>
{{data.confirm
}}
</button>
</div>
</div>
src/app/elements/nav/nav.component.ts
View file @
72f139d1
...
@@ -99,14 +99,19 @@ export class ElementNavComponent implements OnInit {
...
@@ -99,14 +99,19 @@ export class ElementNavComponent implements OnInit {
break
;
break
;
}
}
case
'English'
:
{
case
'English'
:
{
this
.
ChangeLanWarningD
ialog
=
this
.
_dialog
.
open
(
const
d
ialog
=
this
.
_dialog
.
open
(
ChangLanWarningDialogComponent
,
ChangLanWarningDialogComponent
,
{
{
height
:
'200px'
,
height
:
'200px'
,
width
:
'300px'
,
width
:
'300px'
,
data
:
{
title
:
'Warning'
,
note
:
'The page will be reload, can you acceptable?'
,
cancel
:
'Cancel'
,
confirm
:
'Confirm'
,
},
});
});
this
.
ChangeLanWarningDialog
.
afterClosed
().
subscribe
(
dialog
.
afterClosed
().
subscribe
(
result
=>
{
result
=>
{
if
(
result
)
{
if
(
result
)
{
this
.
English
();
this
.
English
();
}
}
...
@@ -114,14 +119,19 @@ export class ElementNavComponent implements OnInit {
...
@@ -114,14 +119,19 @@ export class ElementNavComponent implements OnInit {
break
;
break
;
}
}
case
'Chinese'
:
{
case
'Chinese'
:
{
this
.
ChangeLanWarningD
ialog
=
this
.
_dialog
.
open
(
const
d
ialog
=
this
.
_dialog
.
open
(
ChangLanWarningDialogComponent
,
ChangLanWarningDialogComponent
,
{
{
height
:
'200px'
,
height
:
'200px'
,
width
:
'300px'
,
width
:
'300px'
,
data
:
{
title
:
'警告'
,
note
:
'此页将被重载,是否确认?'
,
cancel
:
'取消'
,
confirm
:
'确认'
,
},
});
});
this
.
ChangeLanWarningDialog
.
afterClosed
().
subscribe
(
dialog
.
afterClosed
().
subscribe
(
result
=>
{
result
=>
{
if
(
result
)
{
if
(
result
)
{
this
.
Language
(
'cn'
);
this
.
Language
(
'cn'
);
}
}
...
@@ -338,7 +348,8 @@ export class ElementNavComponent implements OnInit {
...
@@ -338,7 +348,8 @@ export class ElementNavComponent implements OnInit {
})
})
export
class
ChangLanWarningDialogComponent
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
()
{
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