diff --git a/designer-base/src/main/java/com/fr/design/dialog/UIDialog.java b/designer-base/src/main/java/com/fr/design/dialog/UIDialog.java index 8f2021c696..dd3ddab3b9 100644 --- a/designer-base/src/main/java/com/fr/design/dialog/UIDialog.java +++ b/designer-base/src/main/java/com/fr/design/dialog/UIDialog.java @@ -116,6 +116,11 @@ public abstract class UIDialog extends JDialog { doCancel(); } }); + + applyEnterAction(); + } + + protected void applyEnterAction() { JPanel defaultPane = (JPanel) this.getContentPane(); InputMap inputMapAncestor = defaultPane.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); ActionMap actionMap = defaultPane.getActionMap(); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorDialog.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorDialog.java new file mode 100644 index 0000000000..2cc0463f92 --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorDialog.java @@ -0,0 +1,31 @@ +package com.fr.van.chart.designer.component; + +import com.fr.design.dialog.BasicDialog; +import com.fr.design.dialog.BasicPane; +import com.fr.design.i18n.Toolkit; +import com.fr.design.utils.gui.GUICoreUtils; + +import java.awt.Dimension; +import java.awt.Frame; + +public class VanChartRichEditorDialog extends BasicDialog { + + public static final Dimension DEFAULT = new Dimension(660, 600); + + public VanChartRichEditorDialog(Frame parent, BasicPane pane) { + super(parent, pane); + + this.setTitle(Toolkit.i18nText("Fine-Design_Report_RichTextEditor")); + this.setBasicDialogSize(DEFAULT); + GUICoreUtils.centerWindow(this); + this.setResizable(false); + } + + protected void applyEnterAction() { + + } + + public void checkValid() { + + } +} diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java index 523d39a3e1..98616c4e52 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java @@ -407,7 +407,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane pane = VanChartRichEditorPane.createRichEditorPane(richText); - BasicDialog dialog = pane.showWindow(new JFrame()); + BasicDialog dialog = new VanChartRichEditorDialog(new JFrame(), pane); pane.populate(VanChartRichEditorPane.getRichEditorModel(richText)); diff --git a/designer-chart/src/main/resources/com/fr/design/editor/script/editor.js b/designer-chart/src/main/resources/com/fr/design/editor/script/editor.js index d42f978cd8..1a2a07dc4b 100644 --- a/designer-chart/src/main/resources/com/fr/design/editor/script/editor.js +++ b/designer-chart/src/main/resources/com/fr/design/editor/script/editor.js @@ -128,8 +128,8 @@ } str += " " + key + "=\"" + value + "\""; - if (key === "alt" && dataIdMap[value]) { - str += " " + "data-id" + "=\"" + dataIdMap[value] + "\""; + if (key === "alt" && dataIdMap[value.trim()]) { + str += " " + "data-id" + "=\"" + dataIdMap[value.trim()] + "\""; } });