|
|
|
@ -131,17 +131,16 @@ class Dialog {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public linkFail(text: string, more: string, cb?: Function): string { |
|
|
|
|
let dialogPopover = null; |
|
|
|
|
let dialogMore = null; |
|
|
|
|
let showErrMessage = false; |
|
|
|
|
const id = BI.UUID(); |
|
|
|
|
const that = this; |
|
|
|
|
const body = { |
|
|
|
|
type: Vertical, |
|
|
|
|
items: [ |
|
|
|
|
{ |
|
|
|
|
type: 'bi.center_adapt', |
|
|
|
|
type: CenterAdapt, |
|
|
|
|
cls: 'bi-card', |
|
|
|
|
tgap: 10, |
|
|
|
|
vgap: 10, |
|
|
|
|
items: [ |
|
|
|
|
{ |
|
|
|
|
type: Vertical, |
|
|
|
@ -160,7 +159,6 @@ class Dialog {
|
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
type: VerticalAdapt, |
|
|
|
|
cls: 'buttons', |
|
|
|
|
hgap: 5, |
|
|
|
|
items: [ |
|
|
|
|
{ |
|
|
|
@ -168,27 +166,24 @@ class Dialog {
|
|
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_Detailed_Information'), |
|
|
|
|
level: 'ignore', |
|
|
|
|
handler() { |
|
|
|
|
const isHide = !dialogMore.isVisible(); |
|
|
|
|
dialogPopover.element.css({ |
|
|
|
|
height: isHide ? '290' : '220', |
|
|
|
|
}); |
|
|
|
|
dialogMore.setVisible(isHide); |
|
|
|
|
this.setText(isHide ? BI.i18nText('Dec-Dcm_Connection_Handup_Information') : BI.i18nText('Dec-Dcm_Connection_Detailed_Information')); |
|
|
|
|
showErrMessage = !showErrMessage; |
|
|
|
|
dialogMore.setVisible(showErrMessage); |
|
|
|
|
this.setText(showErrMessage ? BI.i18nText('Dec-Dcm_Connection_Handup_Information') : BI.i18nText('Dec-Dcm_Connection_Detailed_Information')); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
type: Button, |
|
|
|
|
text: BI.i18nText('Dec-Dcm_Back'), |
|
|
|
|
level: 'ignore', |
|
|
|
|
handler() { |
|
|
|
|
that.remove(id); |
|
|
|
|
handler: () => { |
|
|
|
|
this.remove(id); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
type: Button, |
|
|
|
|
text: BI.i18nText('Dec-Dcm_Connection_ReConnect'), |
|
|
|
|
handler() { |
|
|
|
|
that.close(id); |
|
|
|
|
handler: () => { |
|
|
|
|
this.remove(id); |
|
|
|
|
cb ? cb() : null; |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
@ -202,10 +197,12 @@ class Dialog {
|
|
|
|
|
type: Label, |
|
|
|
|
cls: 'bi-header-background', |
|
|
|
|
text: more, |
|
|
|
|
invisible: true, |
|
|
|
|
invisible: !showErrMessage, |
|
|
|
|
textAlign: 'left', |
|
|
|
|
height: 73, |
|
|
|
|
width: 400, |
|
|
|
|
value: false, |
|
|
|
|
vgap: 10, |
|
|
|
|
lgap: 5, |
|
|
|
|
ref: _ref => { |
|
|
|
|
dialogMore = _ref; |
|
|
|
|
}, |
|
|
|
@ -219,14 +216,10 @@ class Dialog {
|
|
|
|
|
cls: 'bi-z-index-mask', |
|
|
|
|
items: [{ |
|
|
|
|
el: { |
|
|
|
|
type: 'bi.center_adapt', |
|
|
|
|
type: CenterAdapt, |
|
|
|
|
cls: 'bi-card', |
|
|
|
|
width: 450, |
|
|
|
|
height: 220, |
|
|
|
|
items: [body], |
|
|
|
|
ref: _ref => { |
|
|
|
|
dialogPopover = _ref; |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}], |
|
|
|
|
}, |
|
|
|
|