diff --git a/src/app/connection/left/item/left_item.ts b/src/app/connection/left/item/left_item.ts index 23e53a5..621b1a3 100644 --- a/src/app/connection/left/item/left_item.ts +++ b/src/app/connection/left/item/left_item.ts @@ -1,4 +1,4 @@ -import {WidgetType, Left, Label, Icon, TextButton, Right, LeftRightVerticalAdapt} from '@ui'; +import {WidgetType, Icon, TextButton, LeftRightVerticalAdapt} from '@ui'; import ItemIcon from './left_item_icon'; import Model from '../../link_set.model'; import {ACTION_COPY, ACTION_TEST, ACTION_DELETE, DEFAULT_INFO} from '@private/constants'; @@ -36,9 +36,6 @@ const Widget: WidgetType = { textAlign: 'left', text: title, title, - handler: () => { - this.store.setLinkSelected(title); - }, }, ], right: [ @@ -73,6 +70,10 @@ const Widget: WidgetType = { }, }; }, + doClick() { + const {title} = this.options; + this.store.setLinkSelected(title); + }, }; -BI.shortcut(className, BI.inherit(BI.Widget, Widget)); +BI.shortcut(className, BI.inherit(BI.BasicButton, Widget)); export default className; diff --git a/src/app/connection/left/item/left_item_icon.ts b/src/app/connection/left/item/left_item_icon.ts index 91c7a05..094b8b6 100644 --- a/src/app/connection/left/item/left_item_icon.ts +++ b/src/app/connection/left/item/left_item_icon.ts @@ -64,6 +64,7 @@ const Widget: WidgetType = { type: IconButton, height: 24, width: 26, + stopEvent: true, title, handler: () => { const {value, id, title} = this.options; diff --git a/src/app/status/left/left_item.ts b/src/app/status/left/left_item.ts index 36b62b0..8936982 100644 --- a/src/app/status/left/left_item.ts +++ b/src/app/status/left/left_item.ts @@ -26,13 +26,14 @@ const Widget: WidgetType = { textAlign: 'left', text: title, title, - handler: () => { - this.store.setStatusSelected(title); - }, }, ], }; }, + doClick() { + const {title} = this.options; + this.store.setStatusSelected(title); + }, }; BI.shortcut(className, BI.inherit(BI.BasicButton, Widget)); export default className; diff --git a/src/app/title/item/title_item.ts b/src/app/title/item/title_item.ts index bc52f81..31fdd44 100644 --- a/src/app/title/item/title_item.ts +++ b/src/app/title/item/title_item.ts @@ -26,7 +26,7 @@ const Widget = BI.inherit(BI.BasicButton, { text, }; }, - select() { + doClick() { const {value} = this.options; this.store.setTab(value); }, diff --git a/src/app/title/title.ts b/src/app/title/title.ts index 0b993eb..1fae123 100644 --- a/src/app/title/title.ts +++ b/src/app/title/title.ts @@ -17,17 +17,11 @@ const Widget: WidgetType = { cls: 'title-item-selected', text: BI.i18nText('Dec-Dcm_Connection_Management'), value: TAB_LINK_SET, - handler() { - this.select(); - }, }, { type: TitleItem, text: BI.i18nText('Dec-Dcm_Pool_Connection_Management'), value: TAB_LINK_POOL, - handler() { - this.select(); - }, }, ], right: [