|
|
@ -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 ItemIcon from './left.item.icon.component'; |
|
|
|
import Model from '../../link-set.model'; |
|
|
|
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 className = 'fr.component.linkSet.left.item'; |
|
|
|
const Widget: WidgetType = { |
|
|
|
const Widget: WidgetType = { |
|
|
|
props: { |
|
|
|
props: { |
|
|
@ -28,11 +29,14 @@ const Widget: WidgetType = { |
|
|
|
title, |
|
|
|
title, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: Label, |
|
|
|
type: TextButton, |
|
|
|
cls:'link-title', |
|
|
|
cls:'link-title', |
|
|
|
textAlign: 'left', |
|
|
|
textAlign: 'left', |
|
|
|
text: title, |
|
|
|
text: title, |
|
|
|
title, |
|
|
|
title, |
|
|
|
|
|
|
|
handler: () => { |
|
|
|
|
|
|
|
this.store.setLinkSelected(title); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: Left, |
|
|
|
type: Left, |
|
|
@ -42,24 +46,27 @@ const Widget: WidgetType = { |
|
|
|
type: ItemIcon, |
|
|
|
type: ItemIcon, |
|
|
|
cls: 'link-text-font', |
|
|
|
cls: 'link-text-font', |
|
|
|
title: BI.i18nText('Dec-Dcm_Test_Connection'), |
|
|
|
title: BI.i18nText('Dec-Dcm_Test_Connection'), |
|
|
|
|
|
|
|
value: ACTION_TEST, |
|
|
|
id, |
|
|
|
id, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: ItemIcon, |
|
|
|
type: ItemIcon, |
|
|
|
cls: 'copy-font', |
|
|
|
cls: 'copy-font', |
|
|
|
title: BI.i18nText('Dec-Dcm_Copy'), |
|
|
|
title: BI.i18nText('Dec-Dcm_Copy'), |
|
|
|
|
|
|
|
value: ACTION_COPY, |
|
|
|
id, |
|
|
|
id, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: ItemIcon, |
|
|
|
type: ItemIcon, |
|
|
|
cls: 'info-font', |
|
|
|
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, |
|
|
|
id, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
type: ItemIcon, |
|
|
|
type: ItemIcon, |
|
|
|
cls: 'delete-font', |
|
|
|
cls: 'delete-font', |
|
|
|
title: BI.i18nText('Dec-Dcm_Delete'), |
|
|
|
title: BI.i18nText('Dec-Dcm_Delete'), |
|
|
|
|
|
|
|
value: ACTION_DELETE, |
|
|
|
id, |
|
|
|
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)); |
|
|
|
BI.shortcut(className, BI.inherit(BI.Widget, Widget)); |
|
|
|
export default className; |
|
|
|
export default className; |
|
|
|