From c19f6811e7f98abeed97626fad9c4636e44d83f4 Mon Sep 17 00:00:00 2001 From: "Yuan.Wang" <1536296691@qq.com> Date: Wed, 1 Sep 2021 10:18:15 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-56134=20js=E6=8F=90=E4=BA=A4=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E6=8A=A5=E9=94=99=E4=B8=AD=E6=B7=BB=E5=8A=A0=E5=AE=9A?= =?UTF-8?q?=E4=BD=8D=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/javascript/ListenerEditPane.java | 5 +- .../com/fr/design/webattr/EditToolBar.java | 84 ++++++++++-------- .../com/fr/design/widget/WidgetEventPane.java | 86 ++++++++++--------- 3 files changed, 97 insertions(+), 78 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/javascript/ListenerEditPane.java b/designer-realize/src/main/java/com/fr/design/javascript/ListenerEditPane.java index f7f5ef16b..914b389a5 100644 --- a/designer-realize/src/main/java/com/fr/design/javascript/ListenerEditPane.java +++ b/designer-realize/src/main/java/com/fr/design/javascript/ListenerEditPane.java @@ -182,7 +182,10 @@ public class ListenerEditPane extends BasicBeanPane { @Override public Listener updateBean() { String actionLocaleName = ReportEngineEventMapping.getLocaleName(listener.getEventName()); - javaScriptActionPane.setResourceInfo(new JavaScriptResourceInfo(JavaScriptResourceInfo.Type.WEB_CONFIG, Toolkit.i18nText(actionLocaleName))); + + JavaScriptResourceInfo.PathNode pathNode = JavaScriptResourceInfo.PathNode.create(JavaScriptResourceInfo.Type.WEB_CONFIG, Toolkit.i18nText(actionLocaleName)); + JavaScriptResourceInfo javaScriptResourceInfo = new JavaScriptResourceInfo().addFirstPathNode(pathNode); + javaScriptActionPane.setResourceInfo(javaScriptResourceInfo); this.listener.setEventName(this.nameText.getText()); FurtherBasicBeanPane pane = this.cards.get(this.styleBox.getSelectedIndex()); this.listener.setAction(pane.updateBean()); diff --git a/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java b/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java index c75c6607c..f22d44cb3 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java @@ -519,7 +519,10 @@ public class EditToolBar extends BasicPane { if (javaScriptPane == null || ((CustomToolBarButton) widget).getJSImpl() == null) { javaScriptPane = JavaScriptActionPane.createDefault(); } - javaScriptPane.setResourceInfo(new JavaScriptResourceInfo(JavaScriptResourceInfo.Type.WIDGET, ((Button) widget).getText())); + + JavaScriptResourceInfo.PathNode pathNode = JavaScriptResourceInfo.PathNode.create(JavaScriptResourceInfo.Type.WIDGET, ((Button) widget).getText()); + JavaScriptResourceInfo javaScriptResourceInfo = new JavaScriptResourceInfo().addFirstPathNode(pathNode); + javaScriptPane.setResourceInfo(javaScriptResourceInfo); javaScriptPane.setPreferredSize(new Dimension(750, 500)); BasicDialog dialog = javaScriptPane.showWindow(SwingUtilities.getWindowAncestor(ButtonPane.this)); @@ -539,27 +542,28 @@ public class EditToolBar extends BasicPane { } }; - /** - * 更新 - * @param widget 对应组件 - */ - public void populate(Widget widget) { - this.widget = widget; - card.show(centerPane, "none"); - if (widget instanceof Button) { - populateDefault(); - } - if (widget instanceof Export) { - populateExport(); - } else if (widget instanceof AppendColumnRow) { - populateAppendColumnRow(); - } else if (widget instanceof Submit) { - populateSubmit(); - } else if (widget instanceof CustomToolBarButton) { - populateCustomToolBarButton(); - } else if (widget instanceof Email) { - populateEmail(); - } + /** + * 更新 + * + * @param widget 对应组件 + */ + public void populate(Widget widget) { + this.widget = widget; + card.show(centerPane, "none"); + if (widget instanceof Button) { + populateDefault(); + } + if (widget instanceof Export) { + populateExport(); + } else if (widget instanceof AppendColumnRow) { + populateAppendColumnRow(); + } else if (widget instanceof Submit) { + populateSubmit(); + } else if (widget instanceof CustomToolBarButton) { + populateCustomToolBarButton(); + } else if (widget instanceof Email) { + populateEmail(); + } Set extraButtonSet = ExtraDesignClassManager.getInstance().getArray(ExtraButtonToolBarProvider.XML_TAG); for (ExtraButtonToolBarProvider provider : extraButtonSet) { @@ -572,21 +576,22 @@ public class EditToolBar extends BasicPane { count.setValue(((AppendColumnRow) widget).getCount()); } - private void populateExport(){ - card.show(centerPane, "export"); - Export export = (Export) widget; - this.pdf.setSelected(export.isPdfAvailable()); - this.excelP.setSelected(export.isExcelPAvailable()); - this.excelO.setSelected(export.isExcelOAvailable()); - this.excelS.setSelected(export.isExcelSAvailable()); - this.word.setSelected(export.isWordAvailable()); - this.image.setSelected(export.isImageAvailable()); - if(exportToolBarProviders != null){ - for(int i=0; i