From 25b2b65066dca667207f2bdd62c0b7464721aee1 Mon Sep 17 00:00:00 2001 From: pengda Date: Fri, 15 Oct 2021 17:24:43 +0800 Subject: [PATCH 1/4] =?UTF-8?q?REPORT-60992=20=E5=AF=BC=E5=87=BA-=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E4=BA=8B=E4=BB=B6-=E5=85=B6=E4=BB=96=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF-=E7=82=B9=E5=87=BB=E6=A8=A1=E6=9D=BF=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=90=8E=E6=95=88=E6=9E=9C=E9=94=99=E4=B9=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/javascript/ExportJavaScriptPane.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java b/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java index a0a8e6b11..4060eb13e 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java @@ -326,16 +326,19 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane Date: Sun, 17 Oct 2021 23:00:01 +0800 Subject: [PATCH 2/4] =?UTF-8?q?REPORT-60995=20=E5=AF=BC=E5=87=BA-=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E4=BA=8B=E4=BB=B6-=E5=8F=82=E6=95=B0=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE-=E5=8F=96=E6=B6=88=E5=8B=BE=E9=80=89=E7=BB=A7?= =?UTF-8?q?=E6=89=BF=E6=8A=A5=E8=A1=A8=E5=90=8E=E5=BC=B9=E7=AA=97=E5=85=B3?= =?UTF-8?q?=E4=B8=8D=E6=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/javascript/ExportJavaScriptPane.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java b/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java index 4060eb13e..ba64b4d4d 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java @@ -780,11 +780,13 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane parameterList = parameterViewPane.update(); - if (!parameterList.isEmpty()) { - Parameter[] parameters = new Parameter[parameterList.size()]; - parameterList.toArray(parameters); - js.setParameters(parameters); + if (parameterViewPane != null) { + List parameterList = parameterViewPane.update(); + if (!parameterList.isEmpty()) { + Parameter[] parameters = new Parameter[parameterList.size()]; + parameterList.toArray(parameters); + js.setParameters(parameters); + } } } exportJavaScript.addJS(js); From 0dbd17e431c6ae4437eae844966cd24f4ef2f7a1 Mon Sep 17 00:00:00 2001 From: Starryi Date: Mon, 18 Oct 2021 11:00:02 +0800 Subject: [PATCH 3/4] =?UTF-8?q?REPORT-61054=20=E3=80=90=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E3=80=91=E6=9C=89=E4=B8=BB=E9=A2=98xml?= =?UTF-8?q?=E7=9A=84=E7=BB=84=E4=BB=B6=E5=92=8C=E7=BB=84=E4=BB=B6=E5=8C=85?= =?UTF-8?q?=E7=9A=84=E9=A2=84=E8=A7=88=E5=9B=BE=E6=8F=90=E7=A4=BA=E7=BC=BA?= =?UTF-8?q?=E5=A4=B1=E6=96=87=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 共享组件预览弹窗中主题名称前添加前缀文本 【改动思路】 同上 --- .../mainframe/share/ui/online/OnlineWidgetPopupPreviewPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetPopupPreviewPane.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetPopupPreviewPane.java index 736377f06..84083b404 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetPopupPreviewPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetPopupPreviewPane.java @@ -162,7 +162,7 @@ public class OnlineWidgetPopupPreviewPane extends AbstractWidgetPopupPreviewPane String themeName = widget.getThemeName(); if (StringUtils.isNotEmpty(themeName)) { suitableThemeNamePane.setVisible(true); - suitableThemeNameLabel.setText(themeName); + suitableThemeNameLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Share_Suitable_Theme_Prefix") + themeName); } else { suitableThemeNamePane.setVisible(false); } From 304eb116e14d4c078d295dedb561e3cc91fe1dc1 Mon Sep 17 00:00:00 2001 From: Starryi Date: Mon, 18 Oct 2021 11:02:55 +0800 Subject: [PATCH 4/4] =?UTF-8?q?REPORT-61055=20=E3=80=90=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E3=80=91=E4=B8=BB=E9=A2=98=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E5=87=A0=E4=B8=AA=E5=B0=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 主题编辑面板开放交互接口,便于与插件中的导出按钮交互 【改动思路】 同上 --- .../theme/TemplateThemeEditorPane.java | 4 ++++ .../theme/TemplateThemeProfilePane.java | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeEditorPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeEditorPane.java index c2e28332d..e924080ef 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeEditorPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeEditorPane.java @@ -267,6 +267,10 @@ public abstract class TemplateThemeEditorPane extends J return nameTextField.checkValid(); } + public String getThemeName() { + return nameTextField.getText(); + } + public List getCurrentColorScheme() { return colorListPane.update(); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java index f3187acaa..4fc65badb 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java @@ -60,6 +60,8 @@ public abstract class TemplateThemeProfilePane extends private UIButton saveButton = new UIButton(); private UIButton saveAsButton = new UIButton(); + private TemplateThemeProfileActionListener actionListener = new TemplateThemeProfileActionAdapter(); + public TemplateThemeProfilePane(TemplateThemeConfig config) { super(); this.config = config; @@ -112,6 +114,7 @@ public abstract class TemplateThemeProfilePane extends return; } saveButton.setEnabled(valid && isMutable); + actionListener.onThemeNameChecked(themeEditorPane.getThemeName(), valid); } }); @@ -138,6 +141,7 @@ public abstract class TemplateThemeProfilePane extends if (saveAsButton != null) { saveAsButton.setEnabled(StringUtils.isNotEmpty(name)); } + isPopulating = false; } @@ -330,4 +334,19 @@ public abstract class TemplateThemeProfilePane extends this.dispose(); } } + + public void addProfileActionListener(TemplateThemeProfileActionListener actionListener) { + if (actionListener != null) { + this.actionListener = actionListener; + } + } + public interface TemplateThemeProfileActionListener { + + void onThemeNameChecked(String name, boolean valid); + } + public static class TemplateThemeProfileActionAdapter implements TemplateThemeProfileActionListener { + + @Override + public void onThemeNameChecked(String name, boolean valid) { } + } } \ No newline at end of file