Browse Source

Pull request #1760: REPORT-33599 设计器菜单栏导出txt,当修改导出的参数时模版会被刷新为待保存状态 && REPORT-33525 删除引用的Js或者css 有歧义

Merge in DESIGN/design from ~HADES/design:release/10.0 to release/10.0

* commit '90394c357d4933e24a8bf9145eba7d611796327a':
  REPORT-33599 设计器菜单栏导出txt,当修改导出的参数时模版会被刷新为待保存状态 && REPORT-33525 删除引用的Js或者css 有歧义
feature/big-screen
Hades 5 years ago
parent
commit
06ae14dcc2
  1. 6
      designer-base/src/main/java/com/fr/design/gui/frpane/EditingStringListPane.java
  2. 17
      designer-base/src/main/java/com/fr/design/parameter/ParameterInputPane.java
  3. 10
      designer-realize/src/main/java/com/fr/design/actions/file/export/AbstractWorkBookExportAction.java

6
designer-base/src/main/java/com/fr/design/gui/frpane/EditingStringListPane.java

@ -3,6 +3,7 @@ package com.fr.design.gui.frpane;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.JListUtils; import com.fr.design.utils.gui.JListUtils;
@ -150,7 +151,10 @@ public abstract class EditingStringListPane extends BasicBeanPane<List<String>>
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
Object selected = jlist.getSelectedValue(); Object selected = jlist.getSelectedValue();
if (selected != null) { if (selected != null) {
int re = FineJOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(EditingStringListPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Sure_To_Delete") + selected.toString() + "?"); int re = FineJOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(EditingStringListPane.this),
Toolkit.i18nText("Fine-Design_Basic_Sure_To_Delete") + selected.toString() + "?",
Toolkit.i18nText("Fine-Design_Basic_Confirm"),
JOptionPane.OK_CANCEL_OPTION);
if (re == JOptionPane.OK_OPTION) { if (re == JOptionPane.OK_OPTION) {
JListUtils.removeSelectedListItems(jlist); JListUtils.removeSelectedListItems(jlist);
} }

17
designer-base/src/main/java/com/fr/design/parameter/ParameterInputPane.java

@ -106,12 +106,8 @@ public class ParameterInputPane extends BasicPane {
contentPane.add(flowTableLayoutHelper.createLabelFlowPane(parameterDisplayName + ":", editPane)); contentPane.add(flowTableLayoutHelper.createLabelFlowPane(parameterDisplayName + ":", editPane));
//add editor to parameter hashtable. //add editor to parameter hashtable.
textF.getCurrentEditor().addChangeListener(new ChangeListener() { initTextListener(textF);
@Override
public void stateChanged(ChangeEvent e) {
HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().fireTargetModified();
}
});
this.editorNameMap.put(textF, parameter.getName()); this.editorNameMap.put(textF, parameter.getName());
nameAddedList.add(parameter.getName()); nameAddedList.add(parameter.getName());
} }
@ -120,6 +116,15 @@ public class ParameterInputPane extends BasicPane {
flowTableLayoutHelper.adjustLabelWidth(); flowTableLayoutHelper.adjustLabelWidth();
} }
protected void initTextListener(ValueEditorPane textF) {
textF.getCurrentEditor().addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().fireTargetModified();
}
});
}
private Editor[] makeEditorByValue(Object pv) { private Editor[] makeEditorByValue(Object pv) {
Editor[] editors = {null}; Editor[] editors = {null};
if (pv instanceof Integer) { if (pv instanceof Integer) {

10
designer-realize/src/main/java/com/fr/design/actions/file/export/AbstractWorkBookExportAction.java

@ -5,6 +5,7 @@ package com.fr.design.actions.file.export;
import com.fr.base.Parameter; import com.fr.base.Parameter;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.editor.ValueEditorPane;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JWorkBook; import com.fr.design.mainframe.JWorkBook;
import com.fr.design.parameter.ParameterInputPane; import com.fr.design.parameter.ParameterInputPane;
@ -43,8 +44,13 @@ public abstract class AbstractWorkBookExportAction extends AbstractExportAction<
Parameter[] parameters = tpl.getParameters(); Parameter[] parameters = tpl.getParameters();
// 检查Parameter // 检查Parameter
if (parameters != null && parameters.length > 0) { if (parameters != null && parameters.length > 0) {
final ParameterInputPane pPane = new ParameterInputPane( final ParameterInputPane pPane = new ParameterInputPane(parameters) {
parameters); @Override
protected void initTextListener(ValueEditorPane textF) {
// 导出不做处理
// do noting
}
};
pPane.showSmallWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { pPane.showSmallWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
@Override @Override
public void doOk() { public void doOk() {

Loading…
Cancel
Save