diff --git a/private/constants.ts b/private/constants.ts index 04f5faa..69ddc79 100644 --- a/private/constants.ts +++ b/private/constants.ts @@ -3,3 +3,6 @@ export const DEFAULT_INFO = 'DESIGNER'; export const ACTION_DELETE = 'ACTION_DELETE'; export const ACTION_COPY = 'ACTION_COPY'; export const ACTION_TEST = 'ACTION_TEST'; + +export const TAB_LINK_SET = 'TAB_LINK_SET'; +export const TAB_LINK_POOL = 'TAB_LINK_POOL'; diff --git a/src/app/app.component.scss b/src/app/app.component.scss index bbe7843..84bed04 100644 --- a/src/app/app.component.scss +++ b/src/app/app.component.scss @@ -20,7 +20,7 @@ cursor: pointer; } .dec-title-item-selected{ - color: '#3685f2'; + color: #3685f2; border-bottom: solid 2px #3685f2; } .close-button { diff --git a/src/app/link_set/link-set.component.ts b/src/app/link_set/link-set.component.ts index c39e192..4795ca7 100644 --- a/src/app/link_set/link-set.component.ts +++ b/src/app/link_set/link-set.component.ts @@ -3,14 +3,15 @@ import LeftList from './left/left.component'; import linkSetModel from './link-set.model'; import Select from './select/select.component'; import Right from './right/right.component'; +import {TAB_LINK_SET} from '@private/constants'; const className = 'fr.linkset'; const Widget: WidgetType = { _store() { return BI.Models.getModel(linkSetModel); }, - watch:{ + watch: { tab(tab: string) { - this.setVisible(tab === BI.i18nText('Dec-Dcm_Connection_Management')); + this.setVisible(tab === TAB_LINK_SET); }, }, render() { @@ -25,8 +26,8 @@ const Widget: WidgetType = { { el: { type: Left, - cls:'select-group', - items:[ + cls: 'select-group', + items: [ { type: Select, }, diff --git a/src/app/link_status/link_status.component.ts b/src/app/link_status/link_status.component.ts index 6ff84da..c68caaf 100644 --- a/src/app/link_status/link_status.component.ts +++ b/src/app/link_status/link_status.component.ts @@ -2,15 +2,16 @@ import {WidgetType, Htape, Vtape, Left, Label} from '@ui'; import linkStatusModel from './link_status.model'; import LeftList from './left/left.component'; import Right from './right/right.component'; +import {TAB_LINK_POOL} from '@private/constants'; const className = 'fr.linkstatus'; const Widget: WidgetType = { _store() { return BI.Models.getModel(linkStatusModel); }, - watch:{ + watch: { tab(tab: string) { - this.setVisible(tab === BI.i18nText('Dec-Dcm_Pool_Connection_Management')); + this.setVisible(tab === TAB_LINK_POOL); }, }, render() { @@ -25,11 +26,11 @@ const Widget: WidgetType = { { el: { type: Left, - cls:'select-group', - items:[ + cls: 'select-group', + items: [ { type: Label, - cls:'status-title', + cls: 'status-title', text: BI.i18nText('Dec-Dcm_Data_Connections'), }, ], diff --git a/src/app/title/title.component.ts b/src/app/title/title.component.ts index 26de592..7a7afb6 100644 --- a/src/app/title/title.component.ts +++ b/src/app/title/title.component.ts @@ -1,6 +1,7 @@ import {Left, WidgetType, IconButton} from '@ui/index'; import TitleItem from './title_item/title_item.component'; import {isDesigner, closeWindow} from '@shared/crud/crud.request'; +import {TAB_LINK_SET, TAB_LINK_POOL} from '@private/constants'; const className = 'fr.title'; const Widget: WidgetType = { render() { @@ -12,6 +13,7 @@ const Widget: WidgetType = { type: TitleItem, cls: 'dec-title-item-selected', text: BI.i18nText('Dec-Dcm_Connection_Management'), + value: TAB_LINK_SET, ref: _ref => { this.ConnectSet = _ref; }, @@ -22,6 +24,7 @@ const Widget: WidgetType = { { type: TitleItem, text: BI.i18nText('Dec-Dcm_Pool_Connection_Management'), + value: TAB_LINK_POOL, ref: _ref => { this.ConnectPool = _ref; }, @@ -30,8 +33,8 @@ const Widget: WidgetType = { }, }, { - type:IconButton, - cls:'close-button', + type: IconButton, + cls: 'close-button', handler() { closeWindow(); }, diff --git a/src/app/title/title_item/title_item.component.ts b/src/app/title/title_item/title_item.component.ts index 7ee5f28..84b0981 100644 --- a/src/app/title/title_item/title_item.component.ts +++ b/src/app/title/title_item/title_item.component.ts @@ -11,8 +11,8 @@ const Widget = BI.inherit(BI.BasicButton, { }, watch: { tab(tab: string) { - const {text} = this.options; - this.element.css(getSelectStyle(text, tab)); + const {value} = this.options; + this.element.css(getSelectStyle(value, tab)); }, }, render() { @@ -25,8 +25,8 @@ const Widget = BI.inherit(BI.BasicButton, { }; }, select() { - const {text} = this.options; - this.store.setTab(text); + const {value} = this.options; + this.store.setTab(value); }, }); BI.shortcut(className, Widget); diff --git a/src/shared/service/dialog.service.ts b/src/shared/service/dialog.service.ts index a3fd4f2..4f087ae 100644 --- a/src/shared/service/dialog.service.ts +++ b/src/shared/service/dialog.service.ts @@ -204,8 +204,7 @@ class Dialog { }; BI.Popovers.create(id, { type: 'bi.popover', - cls: 'popover-notitle', - extraCls: 'bi-custom-show', + cls: 'popover-notitle bi-custom-show', size: 'normal', width: 450, height: 220, @@ -225,8 +224,7 @@ class Dialog { const id = BI.UUID(); BI.Popovers.create(id, { type: 'bi.popover', - cls: 'popover-notitle', - extraCls: 'bi-custom-show', + cls: 'popover-notitle bi-custom-show', size: 'normal', width: 450, height: 220,