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.
|
|
|
import MoreLink from './more_link';
|
|
|
|
let subbitButton = null;
|
|
|
|
let selectKey = '';
|
|
|
|
export const moreLink = (onConfirm?: Function): void => {
|
|
|
|
const id = BI.UUID();
|
|
|
|
BI.Popovers.create(id, {
|
|
|
|
type: 'bi.bar_popover',
|
|
|
|
size: 'normal',
|
|
|
|
header: BI.i18nText('Dec-Dcm_Connection_More_Title'),
|
|
|
|
width: 560,
|
|
|
|
height: 500,
|
|
|
|
body: {
|
|
|
|
type: MoreLink,
|
|
|
|
listeners: [
|
|
|
|
{
|
|
|
|
eventName: 'EVENT_SELECT',
|
|
|
|
action (text: string) {
|
|
|
|
selectKey = text;
|
|
|
|
subbitButton.setEnable(true);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
footer: {
|
|
|
|
type: 'bi.right_vertical_adapt',
|
|
|
|
lgap: 10,
|
|
|
|
items: [{
|
|
|
|
type: 'bi.button',
|
|
|
|
text: BI.i18nText('BI-Basic_Cancel'),
|
|
|
|
value: 1,
|
|
|
|
level: 'ignore',
|
|
|
|
handler () {
|
|
|
|
BI.Popovers.close(id);
|
|
|
|
},
|
|
|
|
}, {
|
|
|
|
type: 'bi.button',
|
|
|
|
text: BI.i18nText('BI-Basic_Sure'),
|
|
|
|
disabled: true,
|
|
|
|
value: 0,
|
|
|
|
ref: _ref => {
|
|
|
|
subbitButton = _ref;
|
|
|
|
},
|
|
|
|
handler () {
|
|
|
|
BI.Popovers.close(id);
|
|
|
|
onConfirm ? onConfirm(selectKey) : null;
|
|
|
|
},
|
|
|
|
}],
|
|
|
|
},
|
|
|
|
}).open(id);
|
|
|
|
};
|