alan
6 years ago
16 changed files with 94 additions and 133 deletions
@ -0,0 +1,43 @@
|
||||
import {WidgetType, Icon, BubbleCombo, TextBubblePopupBarView} from '@ui'; |
||||
import Model from '../../link_set.model'; |
||||
|
||||
const className = 'dec.dcm.component.linkSet.left.item.icon.delete'; |
||||
const Widget: WidgetType = { |
||||
_store() { |
||||
return BI.Models.getModel(Model); |
||||
}, |
||||
render() { |
||||
const {title, id} = this.options; |
||||
const that = this; |
||||
|
||||
return { |
||||
type: BubbleCombo, |
||||
stopPropagation: true, |
||||
direction: 'bottom', |
||||
ref: _ref => { |
||||
this.combo = _ref; |
||||
}, |
||||
el: { |
||||
type: Icon, |
||||
height: 24, |
||||
width: 26, |
||||
title, |
||||
}, |
||||
popup: { |
||||
type: TextBubblePopupBarView, |
||||
text: BI.i18nText('Dec-Dcm_Connection_Make_Sure_Delete'), |
||||
listeners: [{ |
||||
eventName: BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, |
||||
action (type: boolean) { |
||||
that.combo.hideView(); |
||||
if (type) { |
||||
that.store.onIconClick(title, id); |
||||
} |
||||
}, |
||||
}], |
||||
}, |
||||
}; |
||||
}, |
||||
}; |
||||
BI.shortcut(className, BI.inherit(BI.Widget, Widget)); |
||||
export default className; |
Loading…
Reference in new issue