|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
import {WidgetType, Left, Label, Icon} from '@ui'; |
|
|
|
|
import {WidgetType, Left, Label, Icon, TextButton} from '@ui'; |
|
|
|
|
import ItemIcon from './left.item.icon.component'; |
|
|
|
|
import Model from '../../link-set.model'; |
|
|
|
|
import {ACTION_COPY, ACTION_TEST, ACTION_DELETE, DEFAULT_INFO} from '@private/constants'; |
|
|
|
|
const className = 'fr.component.linkSet.left.item'; |
|
|
|
|
const Widget: WidgetType = { |
|
|
|
|
props: { |
|
|
|
@ -28,11 +29,14 @@ const Widget: WidgetType = {
|
|
|
|
|
title, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
type: Label, |
|
|
|
|
type: TextButton, |
|
|
|
|
cls:'link-title', |
|
|
|
|
textAlign: 'left', |
|
|
|
|
text: title, |
|
|
|
|
title, |
|
|
|
|
handler: () => { |
|
|
|
|
this.store.setLinkSelected(title); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
type: Left, |
|
|
|
@ -42,24 +46,27 @@ const Widget: WidgetType = {
|
|
|
|
|
type: ItemIcon, |
|
|
|
|
cls: 'link-text-font', |
|
|
|
|
title: BI.i18nText('Dec-Dcm_Test_Connection'), |
|
|
|
|
value: ACTION_TEST, |
|
|
|
|
id, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
type: ItemIcon, |
|
|
|
|
cls: 'copy-font', |
|
|
|
|
title: BI.i18nText('Dec-Dcm_Copy'), |
|
|
|
|
value: ACTION_COPY, |
|
|
|
|
id, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
type: ItemIcon, |
|
|
|
|
cls: 'info-font', |
|
|
|
|
title: `${BI.i18nText('Dec-Dcm_Type')}:${text === 'DESIGNER' ? BI.i18nText('Dec-Dcm_Other') : text} \r\n${BI.i18nText('Dec-Dcm_Creator')}:${creator}`, |
|
|
|
|
title: `${BI.i18nText('Dec-Dcm_Type')}:${text === DEFAULT_INFO ? BI.i18nText('Dec-Dcm_Other') : text} \r\n${BI.i18nText('Dec-Dcm_Creator')}:${creator}`, |
|
|
|
|
id, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
type: ItemIcon, |
|
|
|
|
cls: 'delete-font', |
|
|
|
|
title: BI.i18nText('Dec-Dcm_Delete'), |
|
|
|
|
value: ACTION_DELETE, |
|
|
|
|
id, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
@ -68,12 +75,6 @@ const Widget: WidgetType = {
|
|
|
|
|
], |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
const {title} = this.options; |
|
|
|
|
this.element.on('click', () => { |
|
|
|
|
this.store.setLinkSelected(title); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
BI.shortcut(className, BI.inherit(BI.Widget, Widget)); |
|
|
|
|
export default className; |
|
|
|
|