From e8ece2ca512113e9d0184b809afb1bdcb03e3ed8 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Fri, 9 Oct 2020 23:51:31 +0800 Subject: [PATCH 1/6] =?UTF-8?q?CHART-16111=20=E5=AF=8C=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E6=A0=B7=E5=BC=8F=E5=88=87=E6=8D=A2=E6=97=B6?= =?UTF-8?q?=E4=B8=8D=E4=BF=9D=E7=95=99content?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/com/fr/design/editor/script/editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 494be9525..f87d8b6c0 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 @@ -232,7 +232,7 @@ content = this.editor.getValue(BI.NicEditor.FormatType.ESCAPE), origin = content; if (isAuto) { - // content = this._switchToAutoStyle(); + content = this._switchToAutoStyle(); this.setFocus(); } else if (editorService.isRichTextEqual(content, this.options.placeholder)) { content = ""; From def7bcf41eac47214a09b04d6c93f0a31b866299 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Sat, 10 Oct 2020 13:50:34 +0800 Subject: [PATCH 2/6] =?UTF-8?q?CHART-16097=20=E6=9F=B1=E5=BD=A2=E5=9B=BE?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=AF=8C=E6=96=87=E6=9C=AC=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E6=96=B9=E5=90=91=E7=81=B0=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../VanChartColumnPlotLabelDetailPane.java | 17 +++++++++++++++++ .../label/VanChartPlotLabelDetailPane.java | 4 ++++ 2 files changed, 21 insertions(+) diff --git a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java index 3243bad71..b32a23c69 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java @@ -1,6 +1,8 @@ package com.fr.van.chart.column; import com.fr.chart.chartattr.Plot; +import com.fr.plugin.chart.base.AttrLabelDetail; +import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.plugin.chart.column.VanChartColumnPlot; import com.fr.van.chart.designer.style.VanChartStylePane; import com.fr.van.chart.designer.style.label.VanChartPlotLabelDetailPane; @@ -14,4 +16,19 @@ public class VanChartColumnPlotLabelDetailPane extends VanChartPlotLabelDetailPa protected boolean hasLabelOrientationPane() { return !((VanChartColumnPlot) this.getPlot()).isBar(); } + + private void checkOrientationEnable(AttrLabelDetail detail) { + AttrTooltipContent content = detail.getContent(); + getOrientation().setEnabled(content != null && !content.isRichText()); + } + + public void populate(AttrLabelDetail detail) { + super.populate(detail); + checkOrientationEnable(detail); + } + + public void update(AttrLabelDetail detail) { + super.update(detail); + checkOrientationEnable(detail); + } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java index fd387654e..6f577965b 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java @@ -88,6 +88,10 @@ public class VanChartPlotLabelDetailPane extends BasicPane { return plot; } + public UIButtonGroup getOrientation() { + return orientation; + } + //默认从factory中取 protected void initToolTipContentPane(Plot plot) { dataLabelContentPane = PlotFactory.createPlotLabelContentPane(plot, parent, VanChartPlotLabelDetailPane.this); From aa138dd69481c2083c4ec80334d03e196364d8c7 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Sat, 10 Oct 2020 14:11:14 +0800 Subject: [PATCH 3/6] =?UTF-8?q?CHART-16116=20=E4=BF=AE=E6=94=B9=E6=B0=94?= =?UTF-8?q?=E6=B3=A1=E5=9B=BE=E6=95=A3=E7=82=B9=E5=9B=BE=E6=A0=87=E7=AD=BE?= =?UTF-8?q?HTMl=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/van/chart/scatter/VanChartScatterLabelContentPane.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterLabelContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterLabelContentPane.java index 72ab39c9a..160cfb25e 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterLabelContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterLabelContentPane.java @@ -1,6 +1,7 @@ package com.fr.van.chart.scatter; import com.fr.van.chart.designer.component.VanChartHtmlLabelPane; +import com.fr.van.chart.designer.component.VanChartHtmlLabelPaneWithBackGroundLabel; import com.fr.van.chart.designer.style.VanChartStylePane; import javax.swing.JPanel; @@ -17,7 +18,7 @@ public class VanChartScatterLabelContentPane extends VanChartScatterTooltipCont @Override protected VanChartHtmlLabelPane createHtmlLabelPane() { - return new VanChartHtmlLabelPane(); + return new VanChartHtmlLabelPaneWithBackGroundLabel(); } } From 1a646fa03d2460b75ef1f4f73740ee1cb5e91ceb Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Sun, 11 Oct 2020 20:12:40 +0800 Subject: [PATCH 4/6] =?UTF-8?q?CHART-15948=20=E5=AF=8C=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E9=BB=98=E8=AE=A4=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../box/VanChartBoxTooltipContentPane.java | 2 + .../VanChartColumnPlotLabelDetailPane.java | 7 +++- .../component/VanChartRichEditorPane.java | 21 ++++++++++- .../component/VanChartTooltipContentPane.java | 12 ++++++ .../TooltipContentPaneWithOutSeries.java | 2 + .../style/VanChartFunnelLabelContentPane.java | 6 +++ .../VanChartFunnelTooltipContentPane.java | 10 ++++- .../VanChartGanttTooltipContentPane.java | 2 + .../VanChartScatterTooltipContentPane.java | 2 + .../VanChartStructureTooltipContentPane.java | 2 + .../com/fr/design/editor/rich_editor.html | 37 +++++++++++++++++-- 11 files changed, 96 insertions(+), 7 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java index c23a5c921..abba5f753 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java @@ -308,6 +308,8 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { populateRichTextFormat(formatPaneGroup, formatGroup); populateRichText(attrTooltipContent.getRichTextAttr()); + + checkRichEditorState(attrTooltipContent); } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java index b32a23c69..7da396c51 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java @@ -1,6 +1,7 @@ package com.fr.van.chart.column; import com.fr.chart.chartattr.Plot; +import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.plugin.chart.base.AttrLabelDetail; import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.plugin.chart.column.VanChartColumnPlot; @@ -19,7 +20,11 @@ public class VanChartColumnPlotLabelDetailPane extends VanChartPlotLabelDetailPa private void checkOrientationEnable(AttrLabelDetail detail) { AttrTooltipContent content = detail.getContent(); - getOrientation().setEnabled(content != null && !content.isRichText()); + UIButtonGroup orientation = getOrientation(); + + if (orientation != null) { + orientation.setEnabled(content != null && !content.isRichText()); + } } public void populate(AttrLabelDetail detail) { diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java index d1f294e41..615979f30 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java @@ -69,18 +69,27 @@ public class VanChartRichEditorPane { paramsStr.deleteCharAt(len - 1); } - return new RichEditorModel(richText.getContent(), richText.isAuto(), paramsStr.toString()); + String content = richText.getContent(); + String initParams = StringUtils.EMPTY; + + if (content.contains("data-id") && !content.contains("class")) { + initParams = richText.getInitParamsContent(); + } + + return new RichEditorModel(content, richText.isAuto(), paramsStr.toString(), initParams); } public static class RichEditorModel { private String content; private boolean auto; private String params; + private String initParams; - public RichEditorModel(String content, boolean auto, String params) { + public RichEditorModel(String content, boolean auto, String params, String initParams) { this.content = content; this.auto = auto; this.params = params; + this.initParams = initParams; } public String getContent() { @@ -106,5 +115,13 @@ public class VanChartRichEditorPane { public void setParams(String params) { this.params = params; } + + public String getInitParams() { + return initParams; + } + + public void setInitParams(String initParams) { + this.initParams = initParams; + } } } 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 847cd3891..fe2b4e365 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 @@ -12,9 +12,11 @@ import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; import com.fr.design.ui.ModernUIPane; +import com.fr.general.ComparatorUtils; import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.plugin.chart.base.AttrTooltipRichText; import com.fr.plugin.chart.base.format.AttrTooltipFormat; +import com.fr.stable.StringUtils; import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithCheckBox; import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithoutCheckBox; @@ -683,6 +685,8 @@ public class VanChartTooltipContentPane extends BasicBeanPane -1) { + content += '

' + editorService.getEditorParamImage(key) + '

'; + } + } + + return content; + } + var dimensionIds = getDimensionIds(params); + if (initParams) { + content = getInitContent(params, initParams); + } + var rich_editor = BI.createWidget({ type: "bi.design.chart.common.editor", element: "body", @@ -92,10 +114,19 @@ }); Pool.dispatch = function () { + var content = Pool.data.getContent(); + var isAuto = Pool.data.isAuto(); + var params = Pool.data.getParams(); + var initParams = Pool.data.getInitParams(); + + if (initParams) { + content = getInitContent(params, initParams); + } + rich_editor.setValue({ - content: Pool.data.getContent(), - isAuto: Pool.data.isAuto(), - dimensionIds: getDimensionIds(Pool.data.getParams()) + content: content, + isAuto: isAuto, + dimensionIds: getDimensionIds(params) }); } From 3ed4b1c9098d544ff44e376d9b92aaffaa96661b Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Sun, 11 Oct 2020 20:40:10 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E5=A1=AB=E5=85=85=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E6=97=B6=E6=9B=B4=E6=96=B0=E5=88=9D=E5=A7=8B=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../van/chart/designer/component/VanChartTooltipContentPane.java | 1 + 1 file changed, 1 insertion(+) 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 fe2b4e365..632198dbd 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 @@ -706,6 +706,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane Date: Sun, 11 Oct 2020 21:39:35 +0800 Subject: [PATCH 6/6] =?UTF-8?q?CHART-16117=20=E9=80=89=E6=8B=A9=E5=AF=8C?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E7=BC=96=E8=BE=91=E5=99=A8=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E5=BA=94=E8=AE=BE=E7=BD=AEdirty?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/designer/component/VanChartTooltipContentPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 632198dbd..4c81493e4 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 @@ -606,7 +606,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane