You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.2 KiB
55 lines
1.2 KiB
6 years ago
|
import MoreLink from './more_link';
|
||
6 years ago
|
let SubbitButton: any = null;
|
||
|
let selectKey = '';
|
||
|
export const moreLink = (onConfirm?: Function): void => {
|
||
|
const id = BI.UUID();
|
||
|
let Popovers: any = null;
|
||
|
BI.Popovers.create(id, {
|
||
|
type: 'bi.bar_popover',
|
||
|
size: 'normal',
|
||
6 years ago
|
header: BI.i18nText('Dec-Dcm_Connection_More-Title'),
|
||
6 years ago
|
width: 550,
|
||
|
height: 500,
|
||
|
body: {
|
||
|
type: MoreLink,
|
||
|
listeners: [
|
||
|
{
|
||
|
eventName: 'EVENT_SELECT',
|
||
|
action (text: string) {
|
||
|
selectKey = text;
|
||
|
SubbitButton.setEnable(true);
|
||
|
},
|
||
|
},
|
||
|
],
|
||
|
},
|
||
6 years ago
|
footer: {
|
||
6 years ago
|
type: 'bi.right_vertical_adapt',
|
||
|
lgap: 10,
|
||
|
items: [{
|
||
|
type: 'bi.button',
|
||
6 years ago
|
text: BI.i18nText('BI-Basic_Cancel'),
|
||
6 years ago
|
value: 1,
|
||
|
level: 'ignore',
|
||
|
handler (v: any) {
|
||
|
Popovers.close(v);
|
||
|
},
|
||
|
}, {
|
||
|
type: 'bi.button',
|
||
6 years ago
|
text: BI.i18nText('BI-Basic_Sure'),
|
||
6 years ago
|
disabled: true,
|
||
|
value: 0,
|
||
|
ref(ref: any) {
|
||
|
SubbitButton = ref;
|
||
|
},
|
||
|
handler (v: any) {
|
||
|
Popovers.close(v);
|
||
|
onConfirm ? onConfirm(selectKey) : null;
|
||
|
},
|
||
|
}],
|
||
|
},
|
||
|
ref(ref: any) {
|
||
|
Popovers = ref;
|
||
|
},
|
||
|
}).open(id);
|
||
|
};
|