Browse Source

Merge pull request #739 in DESIGN/design from ~HADES/design:release/10.0 to release/10.0

* commit 'ba9bc4cf17648077a0f9b021ef8b2c599fd4a9a9':
  REPORT-13544 填报属性设置-自定义按钮有点问题,9.0也存在
bugfix/10.0
Hades 6 years ago
parent
commit
e711002ac9
  1. 18
      designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java

18
designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java

@ -513,6 +513,12 @@ public class EditToolBar extends BasicPane {
javaScriptPane.setPreferredSize(new Dimension(750, 500)); javaScriptPane.setPreferredSize(new Dimension(750, 500));
BasicDialog dialog = javaScriptPane.showWindow(SwingUtilities.getWindowAncestor(ButtonPane.this)); BasicDialog dialog = javaScriptPane.showWindow(SwingUtilities.getWindowAncestor(ButtonPane.this));
dialog.addDialogActionListener(new DialogActionAdapter() { dialog.addDialogActionListener(new DialogActionAdapter() {
@Override
public void doCancel() {
javaScriptPane.populateBean(((CustomToolBarButton) widget).getJSImpl());
}
@Override @Override
public void doOk() { public void doOk() {
((CustomToolBarButton) widget).setJSImpl(javaScriptPane.updateBean()); ((CustomToolBarButton) widget).setJSImpl(javaScriptPane.updateBean());
@ -619,7 +625,7 @@ public class EditToolBar extends BasicPane {
} else if (widget instanceof Submit) { } else if (widget instanceof Submit) {
updateSubmit(); updateSubmit();
} else if (widget instanceof CustomToolBarButton) { } else if (widget instanceof CustomToolBarButton) {
((CustomToolBarButton) widget).setJSImpl(this.javaScriptPane.updateBean()); updateCustomToolBarButton();
} else if (widget instanceof Email) { } else if (widget instanceof Email) {
updateEmail(); updateEmail();
} }
@ -670,6 +676,16 @@ public class EditToolBar extends BasicPane {
email.setConsigneeByDepartment(this.consigneeByDepartment.isSelected()); email.setConsigneeByDepartment(this.consigneeByDepartment.isSelected());
email.setConsigneeByRole(this.consigneeByRole.isSelected()); email.setConsigneeByRole(this.consigneeByRole.isSelected());
} }
private void updateCustomToolBarButton() {
CustomToolBarButton customToolBarButton = (CustomToolBarButton) widget;
if (customToolBarButton.getJSImpl() != null) {
customToolBarButton.setJSImpl(this.javaScriptPane.updateBean());
} else {
customToolBarButton.setJSImpl(JavaScriptActionPane.createDefault().updateBean());
}
}
} }
} }

Loading…
Cancel
Save