Browse Source

refactor: 调整命名

qufenxi
alan 6 years ago
parent
commit
f83871023f
  1. 16
      src/plugins/jndi/jndi.edit.ts
  2. 16
      src/plugins/jndi/jndi.preview.ts

16
src/plugins/jndi/jndi.edit.ts

@ -31,7 +31,7 @@ const Widget = BI.inherit(BI.Widget, {
text: BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Context'),
height: 160,
ref: _ref => {
this.JndiForm = _ref;
this.jndiFormRef = _ref;
},
form: {
type: Vertical,
@ -100,16 +100,16 @@ const Widget = BI.inherit(BI.Widget, {
textAlign: 'right',
value: true,
ref: _ref => {
this.Collapse = _ref;
this.collapseRef = _ref;
},
handler: () => {
const isCollapse = this.Collapse.getValue();
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.JndiForm.setHeight(height);
this.Collapse.setValue(!isCollapse);
this.Collapse.setText(text);
this.OtherAttributes.setVisible(isCollapse);
this.jndiFormRef.setHeight(height);
this.collapseRef.setValue(!isCollapse);
this.collapseRef.setText(text);
this.otherAttributesRef.setVisible(isCollapse);
},
},
},
@ -118,7 +118,7 @@ const Widget = BI.inherit(BI.Widget, {
cls: 'right-form',
invisible: false,
ref: _ref => {
this.OtherAttributes = _ref;
this.otherAttributesRef = _ref;
},
items: BI.map(otherAttributes, (index: number, item: AttributeType) => {
return {

16
src/plugins/jndi/jndi.preview.ts

@ -26,7 +26,7 @@ const jndiWidget = BI.inherit(BI.Widget, {
text: BI.i18nText('Dec-Dcm_Connection_Form_JNDI_Context'),
height: 160,
ref: _ref => {
this.JndiForm = _ref;
this.jndiFormRef = _ref;
},
form: {
type: Vertical,
@ -78,16 +78,16 @@ const jndiWidget = BI.inherit(BI.Widget, {
textAlign: 'right',
value: true,
ref: _ref => {
this.Collapse = _ref;
this.collapseRef = _ref;
},
handler: () => {
const isCollapse = this.Collapse.getValue();
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.JndiForm.setHeight(height);
this.Collapse.setValue(!isCollapse);
this.Collapse.setText(text);
this.OtherAttributes.setVisible(isCollapse);
this.jndiFormRef.setHeight(height);
this.collapseRef.setValue(!isCollapse);
this.collapseRef.setText(text);
this.otherAttributesRef.setVisible(isCollapse);
},
},
},
@ -96,7 +96,7 @@ const jndiWidget = BI.inherit(BI.Widget, {
cls: 'right-form',
invisible: false,
ref: _ref => {
this.OtherAttributes = _ref;
this.otherAttributesRef = _ref;
},
items: BI.map(otherAttributes, (index: number, item: AttributeType) => {
return {

Loading…
Cancel
Save