Browse Source

refactor: 去掉text_value_combo的boder样式,因为已经自带了

qufenxi
alan 6 years ago
parent
commit
4696a2553f
  1. 2
      src/app/connection/right/right_edit/right_edit.model.ts
  2. 2
      src/app/connection/right/right_edit/right_edit.ts
  3. 7
      src/app/connection/right/right_edit/right_edit_jndi.ts
  4. 2
      src/app/connection/right/right_edit/right_edit_mysql.ts
  5. 20
      src/app/connection/right/right_show/right_show.model.ts
  6. 26
      src/app/connection/right/right_show/right_show_jndi.ts

2
src/app/connection/right/right_edit/right_edit.model.ts

@ -1,4 +1,4 @@
export const className = 'report.model.components.right.edit';
export const className = 'dec.dcm.model.components.right.edit';
export const Model = BI.inherit(Fix.Model, {
state() {
return {

2
src/app/connection/right/right_edit/right_edit.ts

@ -71,7 +71,6 @@ const Widget: WidgetType = {
text: BI.i18nText('Dec-Dcm_Connection_Form_Driver'),
form: {
type: TextValueCombo,
cls: 'bi-border',
width: 300,
text: linkSelected.driver,
items: getDrivers(linkSelected),
@ -111,7 +110,6 @@ const Widget: WidgetType = {
text: BI.i18nText('Dec-Dcm_Connection_Form_OriginalCharsetName'),
form: {
type: TextValueCombo,
cls: 'bi-border',
width: 300,
text: linkSelected.originalCharsetName === '' ? BI.i18nText('Dec-Dcm_Connection_Form_Auto') : linkSelected.originalCharsetName,
items: [

7
src/app/connection/right/right_edit/right_edit_jndi.ts

@ -11,7 +11,7 @@ const Widget = BI.inherit(BI.Widget, {
},
watch: {
isCollapse(isCollapse) {
const height = isCollapse ? 550 : 180;
const height = isCollapse ? 550 : 200;
const text = isCollapse ? BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Collapse-Attributes') : BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Other_Attributes');
this.jndiFormRef.setHeight(height);
this.collapseRef.setText(text);
@ -39,12 +39,13 @@ const Widget = BI.inherit(BI.Widget, {
{
type: FormItem,
text: BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Context'),
height: 180,
height: 200,
ref: _ref => {
this.jndiFormRef = _ref;
},
form: {
type: Vertical,
vgap: 10,
items: [
{
type: FormItem,
@ -52,7 +53,6 @@ const Widget = BI.inherit(BI.Widget, {
width: 180,
form: {
type: TextValueCombo,
cls: 'bi-border',
width: 300,
value: factory,
items: BI.map(JNDI_FACTORYS, (index: number, item: string) => {
@ -162,7 +162,6 @@ const Widget = BI.inherit(BI.Widget, {
width: 180,
form: {
type: TextValueCombo,
cls: 'bi-border',
width: 300,
items: [{
text: BI.i18nText('Dec-Dcm_Connection_Form_Auto'),

2
src/app/connection/right/right_edit/right_edit_mysql.ts

@ -43,7 +43,6 @@ const Widget: WidgetType = {
text: BI.i18nText('Dec-Dcm_Connection_Form_Driver'),
form: {
type: TextValueCombo,
cls: 'bi-border',
width: 300,
text: linkSelected.driver,
items: getDrivers(linkSelected),
@ -83,7 +82,6 @@ const Widget: WidgetType = {
text: BI.i18nText('Dec-Dcm_Connection_Form_OriginalCharsetName'),
form: {
type: TextValueCombo,
cls: 'bi-border',
width: 300,
text: linkSelected.originalCharsetName === '' ? BI.i18nText('Dec-Dcm_Connection_Form_Auto') : linkSelected.originalCharsetName,
items: [

20
src/app/connection/right/right_show/right_show.model.ts

@ -0,0 +1,20 @@
export const className = 'dec.dcm.model.components.right.show';
export const Model = BI.inherit(Fix.Model, {
state() {
return {
isCollapse: false,
};
},
computed: {
},
actions: {
setIsCollapse(status: boolean) {
this.model.isCollapse = status;
},
},
});
BI.model(className, Model);
export default className;

26
src/app/connection/right/right_show/right_show_jndi.ts

@ -2,9 +2,22 @@ import {Vertical, TextButton, Label} from '@ui';
import FormItem from '@shared/components/form_item';
import {OTHER_ATTRIBUTES} from '@private/constants';
import {AttributeType} from '../right.typing';
import ModelName from './right_show.model';
const className = 'dec.dcm.component.right.show.jndi';
const Widget = BI.inherit(BI.Widget, {
_store() {
return BI.Models.getModel(ModelName);
},
watch: {
isCollapse(isCollapse) {
const height = isCollapse ? 550 : 200;
const text = isCollapse ? BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Collapse-Attributes') : BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Other_Attributes');
this.jndiFormRef.setHeight(height);
this.collapseRef.setText(text);
this.otherAttributesRef.setVisible(isCollapse);
},
},
render() {
const {connectionName, url, factory, principal, credentials, originalCharsetName} = this.options;
@ -23,12 +36,13 @@ const Widget = BI.inherit(BI.Widget, {
{
type: FormItem,
text: BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Context'),
height: 160,
height: 200,
ref: _ref => {
this.jndiFormRef = _ref;
},
form: {
type: Vertical,
vgap: 10,
items: [
{
type: FormItem,
@ -79,19 +93,13 @@ const Widget = BI.inherit(BI.Widget, {
this.collapseRef = _ref;
},
handler: () => {
const isCollapse = this.collapseRef.getValue();
const height = isCollapse ? 550 : 160;
const text = isCollapse ? BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Collapse-Attributes') : BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Other_Attributes');
this.jndiFormRef.setHeight(height);
this.collapseRef.setValue(!isCollapse);
this.collapseRef.setText(text);
this.otherAttributesRef.setVisible(isCollapse);
this.store.setIsCollapse(!this.model.isCollapse);
},
},
},
{
type: Vertical,
invisible: false,
invisible: true,
ref: _ref => {
this.otherAttributesRef = _ref;
},

Loading…
Cancel
Save