diff --git a/src/modules/constants/constant.ts b/src/modules/constants/constant.ts index df50774..20f0200 100644 --- a/src/modules/constants/constant.ts +++ b/src/modules/constants/constant.ts @@ -678,8 +678,9 @@ export const DEFAULT_JDBC_POOL = { }; export const CONNECTION_LAYOUT = { - hgap: 15, + hgap: 5, vgap: 15, + labelHeight: 24, }; diff --git a/src/modules/pages/connection/components/form_item/form_item.ts b/src/modules/pages/connection/components/form_item/form_item.ts index 24dacd8..723ecaa 100644 --- a/src/modules/pages/connection/components/form_item/form_item.ts +++ b/src/modules/pages/connection/components/form_item/form_item.ts @@ -7,6 +7,7 @@ export class FormItem extends BI.Widget { name: '', value: '', unit: '', + isBold: true, nameWidth: 140, } @@ -20,7 +21,7 @@ export class FormItem extends BI.Widget { { el: { type: Label, - cls: 'bi-font-bold', + cls: this.options.isBold ? 'bi-font-bold' : '', textAlign: 'left', text: this.options.name, }, diff --git a/src/modules/pages/connection/connection.ts b/src/modules/pages/connection/connection.ts index 6714de9..b7bab2b 100644 --- a/src/modules/pages/connection/connection.ts +++ b/src/modules/pages/connection/connection.ts @@ -49,17 +49,18 @@ export class Connection extends BI.Widget { return { type: Htape, + hgap: 10, items: [ { el: { type: Vtape, cls: 'bi-border-right', + rgap: 10, items: [ { el: { type: VerticalAdapt, cls: 'bi-border-bottom', - lgap: 10, items: [{ type: Button, text: BI.i18nText('Dec-Dcm_Connection_New'), @@ -72,7 +73,7 @@ export class Connection extends BI.Widget { }, { type: ConnectionListXtype, - tgap: 5, + tgap: 10, }, ], }, @@ -91,7 +92,6 @@ export class Connection extends BI.Widget { items: [ { type: Label, - lgap: 5, textAlign: 'left', ref: (_ref: any) => { this.connectionTitleWidget = _ref; @@ -102,7 +102,6 @@ export class Connection extends BI.Widget { type: VerticalAdapt, items: [{ type: Button, - level: 'ignore', invisible: true, text: BI.i18nText('Dec-Dcm_Edit'), ref: (_ref: any) => { @@ -125,7 +124,6 @@ export class Connection extends BI.Widget { }, { type: ListView, - vgap: 15, ref: (_ref: any) => { this.listView = _ref; }, diff --git a/src/modules/pages/connection/connection_jdbc/connection_jdbc.ts b/src/modules/pages/connection/connection_jdbc/connection_jdbc.ts index 1c1c9af..627438d 100644 --- a/src/modules/pages/connection/connection_jdbc/connection_jdbc.ts +++ b/src/modules/pages/connection/connection_jdbc/connection_jdbc.ts @@ -96,6 +96,7 @@ export class ConnectionJdbc extends BI.Widget { }, { type: Vertical, + tgap: -15, vgap, invisible: true, ref: (_ref: any) => { diff --git a/src/modules/pages/connection/connection_jndi/connection_jndi.ts b/src/modules/pages/connection/connection_jndi/connection_jndi.ts index db04856..db99250 100644 --- a/src/modules/pages/connection/connection_jndi/connection_jndi.ts +++ b/src/modules/pages/connection/connection_jndi/connection_jndi.ts @@ -32,7 +32,7 @@ export class ConnectionJdbc extends BI.Widget { }, { type: Htape, - height: 120, + height: 115, items: [ { el: { @@ -50,31 +50,37 @@ export class ConnectionJdbc extends BI.Widget { }, { type: Vertical, - bgap: 10, + bgap: 15, + height: 115, items: [ { type: FormItemXtype, name: 'INTIAL_CONTEXT_FACTORY', nameWidth: 200, + isBold: false, value: contextHashtable['java.naming.factory.initial'], }, { type: FormItemXtype, name: 'PROVIDER_URL', nameWidth: 200, + isBold: false, value: contextHashtable['java.naming.provider.url'], }, { type: FormItemXtype, name: 'SECURITY_PRINCIPAL', nameWidth: 200, + isBold: false, value: contextHashtable['java.naming.security.principal'], }, { type: FormItemXtype, name: 'SECURITY_CREDENTIALS', nameWidth: 200, + isBold: false, value: contextHashtable['java.naming.security.credentials'], + bgap: -15, }, ], }, @@ -102,6 +108,7 @@ export class ConnectionJdbc extends BI.Widget { { type: Vertical, vgap, + tgap: -15, invisible: true, ref: (_ref: any) => { this.advancedSet = _ref; diff --git a/src/modules/pages/connection/list/list_item/list_item.ts b/src/modules/pages/connection/list/list_item/list_item.ts index d4b1ebf..be73a60 100644 --- a/src/modules/pages/connection/list/list_item/list_item.ts +++ b/src/modules/pages/connection/list/list_item/list_item.ts @@ -1,5 +1,5 @@ import { shortcut, store } from '@core/core'; -import { Label, LeftRightVerticalAdapt, IconLabel, IconButton, DownListCombo, SignEditor, Layout } from 'ui'; +import { Label, IconLabel, IconButton, DownListCombo, SignEditor, Layout, Htape, Vertical } from 'ui'; import './list_item.less'; import { ListItemModel, ListItemModelXtype } from './list_item.model'; import { PAGE_INDEX } from '@constants/constant'; @@ -41,20 +41,22 @@ export class ListItem extends BI.BasicButton { const { name, databaseType } = this.options; return { - type: LeftRightVerticalAdapt, - items: { - left: [ - { - type: IconLabel, - cls: 'dcm-link-font icon-size-16', - width: 25, - title: name, - }, + type: Htape, + items: [{ + el: { + type: IconLabel, + cls: 'dcm-link-font icon-size-16', + title: name, + }, + width: 25, + }, { + type: Vertical, + items: [ { type: Label, text: name, - width: 200, textAlign: 'left', + height: 25, title: name, ref: (_ref: any) => { this.nameLabel = _ref; @@ -63,7 +65,6 @@ export class ListItem extends BI.BasicButton { { type: SignEditor, value: name, - width: 200, invisible: !this.model.isEdit, ref: (_ref: any) => { this.nameEditor = _ref; @@ -98,37 +99,37 @@ export class ListItem extends BI.BasicButton { }], }, ], - right: [ - databaseType ? { - type: DownListCombo, - cls: 'link-item-icon', - stopPropagation: true, - hgap: 8, - el: { - type: IconButton, - cls: 'dcm-link-other-font icon-size-16', + }, { + el: databaseType ? { + type: DownListCombo, + cls: 'link-item-icon', + stopPropagation: true, + hgap: 8, + el: { + type: IconButton, + cls: 'dcm-link-other-font icon-size-16', + }, + items: this.renderDownList(), + ref: (_ref: any) => { + this.downListCombo = _ref; + }, + listeners: [{ + eventName: BI.DownListCombo.EVENT_CHANGE, + action: (value: string) => { + this.itemActionCalculate().actionClac(value); }, - items: this.renderDownList(), - ref: (_ref: any) => { - this.downListCombo = _ref; + }, { + eventName: BI.DownListCombo.EVENT_BEFORE_POPUPVIEW, + action: () => { + this.downListCombo.setValue(''); }, - listeners: [{ - eventName: BI.DownListCombo.EVENT_CHANGE, - action: (value: string) => { - this.itemActionCalculate().actionClac(value); - }, - }, { - eventName: BI.DownListCombo.EVENT_BEFORE_POPUPVIEW, - action: () => { - this.downListCombo.setValue(''); - }, - }], - - } : { - type: Layout, - }, - ], - }, + }], + + } : { + type: Layout, + }, + width: 25, + }], }; } diff --git a/src/modules/pages/maintain/components/form_item/form_item.ts b/src/modules/pages/maintain/components/form_item/form_item.ts index 6635e56..159332d 100644 --- a/src/modules/pages/maintain/components/form_item/form_item.ts +++ b/src/modules/pages/maintain/components/form_item/form_item.ts @@ -1,5 +1,6 @@ import { shortcut } from '@core/core'; import { Label, Left } from 'ui'; +import { CONNECTION_LAYOUT } from '@constants/constant'; export const FormItemXtype = 'dec.dcm.Maintain_form_item'; @shortcut(FormItemXtype) export class FormItem extends BI.Widget { @@ -7,6 +8,7 @@ export class FormItem extends BI.Widget { name: '', forms: '', nameWidth: 140, + isBold: true, } render () { @@ -15,9 +17,10 @@ export class FormItem extends BI.Widget { items: [ { type: Label, - cls: 'bi-font-bold', + cls: this.options.isBold ? 'bi-font-bold' : '', width: this.options.nameWidth, textAlign: 'left', + height: CONNECTION_LAYOUT.labelHeight, text: this.options.name, }, ...this.options.forms, diff --git a/src/modules/pages/maintain/forms/components/form.jdbc.ts b/src/modules/pages/maintain/forms/components/form.jdbc.ts index d3fa953..972ebc3 100644 --- a/src/modules/pages/maintain/forms/components/form.jdbc.ts +++ b/src/modules/pages/maintain/forms/components/form.jdbc.ts @@ -1,5 +1,5 @@ import { shortcut } from '@core/core'; -import { Vertical, TextEditor, TextValueCombo, Label, TextAreaEditor, Editor, EdirotIconCheckCombo, Left, TextButton } from 'ui'; +import { Vertical, TextEditor, TextValueCombo, Label, TextAreaEditor, Editor, EdirotIconCheckCombo, Left, TextButton, Layout } from 'ui'; import { CollapseXtype, EVENT_CHANGE } from 'src/modules/components/collapse/collapse'; import { FormItemXtype } from '../../components/form_item/form_item'; import { Connection, ConnectionJDBC, ConnectionPoolJDBC } from 'src/modules/crud/crud.typings'; @@ -313,6 +313,7 @@ export class FormJdbc extends BI.Widget { { type: FormItemXtype, invisible: !databaseType.hasSchema, + height: 64, name: BI.i18nText('Dec-Dcm_Connection_Form_Pattern'), forms: [{ type: Vertical, @@ -344,6 +345,11 @@ export class FormJdbc extends BI.Widget { }], }], }, + { + type: Layout, + cls: 'bi-border-top', + bgap: 8, + }, { type: FormItemXtype, name: BI.i18nText('Dec-Dcm_Connection_Form_Database_URL'), @@ -383,6 +389,7 @@ export class FormJdbc extends BI.Widget { { type: Vertical, vgap, + tgap: -15, invisible: true, ref: (_ref: any) => { this.advancedSet = _ref; @@ -486,6 +493,7 @@ export class FormJdbc extends BI.Widget { { type: Label, lgap: 5, + height: CONNECTION_LAYOUT.labelHeight, text: BI.i18nText('Dec-Dcm_Millisecond'), }, ], @@ -573,6 +581,7 @@ export class FormJdbc extends BI.Widget { { type: Label, lgap: 5, + height: CONNECTION_LAYOUT.labelHeight, text: BI.i18nText('Dec-Dcm_Millisecond'), }, ], @@ -618,6 +627,7 @@ export class FormJdbc extends BI.Widget { { type: Label, lgap: 5, + height: CONNECTION_LAYOUT.labelHeight, text: BI.i18nText('BI-Basic_Seconds'), }, ], diff --git a/src/modules/pages/maintain/forms/components/form.jndi.ts b/src/modules/pages/maintain/forms/components/form.jndi.ts index 5be5737..360e3bb 100644 --- a/src/modules/pages/maintain/forms/components/form.jndi.ts +++ b/src/modules/pages/maintain/forms/components/form.jndi.ts @@ -74,7 +74,7 @@ export class FormJndi extends BI.Widget { }, { type: Htape, - height: 180, + height: 175, items: [ { el: { @@ -92,12 +92,14 @@ export class FormJndi extends BI.Widget { }, { type: Vertical, - bgap: 10, + bgap: 15, + height: 175, items: [ { type: FormItemXtype, name: 'INTIAL_CONTEXT_FACTORY', nameWidth: 200, + isBold: false, forms: [{ type: EdirotIconCheckCombo, width: 300, @@ -124,6 +126,7 @@ export class FormJndi extends BI.Widget { { type: FormItemXtype, name: 'PROVIDER_URL', + isBold: false, nameWidth: 200, forms: [{ type: TextEditor, @@ -138,6 +141,7 @@ export class FormJndi extends BI.Widget { { type: FormItemXtype, name: 'SECURITY_PRINCIPAL', + isBold: false, nameWidth: 200, forms: [{ type: TextEditor, @@ -152,6 +156,7 @@ export class FormJndi extends BI.Widget { { type: FormItemXtype, name: 'SECURITY_CREDENTIALS', + isBold: false, nameWidth: 200, forms: [{ type: TextEditor, @@ -165,6 +170,7 @@ export class FormJndi extends BI.Widget { }, { type: Label, + bgap: -15, cls: 'bi-tips', textAlign: 'left', text: BI.i18nText('Dec-Dcm_Connection_JNDI_Warning'), @@ -203,6 +209,7 @@ export class FormJndi extends BI.Widget { { type: Vertical, vgap, + tgap: -15, invisible: true, ref: (_ref: any) => { this.advancedSet = _ref; diff --git a/src/modules/pages/maintain/maintain.ts b/src/modules/pages/maintain/maintain.ts index 526dd10..7f25441 100644 --- a/src/modules/pages/maintain/maintain.ts +++ b/src/modules/pages/maintain/maintain.ts @@ -25,17 +25,18 @@ export class Maintain extends BI.Widget { return { type: Vtape, - hgap: 10, - vgap: 10, + hgap: 5, items: [ { type: VerticalAdapt, cls: 'bi-border-bottom', + height: 40, + hgap: 5, items: [ { type: IconButton, - hgap: 5, cls: 'dcm-back-font', + height: 15, invisible: this.model.isCopy || isEdit, handler: () => { this.store.setPageIndex(PAGE_INDEX.DATEBASE); @@ -44,9 +45,9 @@ export class Maintain extends BI.Widget { { type: Label, text: titleText, + height: 15, }, ], - height: 40, }, { type: ListView,