Browse Source

Merge branch 'release/10.0' of http://cloud.finedevelop.com:2015/scm/~xiaoxia/design into release/10.0

* 'release/10.0' of http://cloud.finedevelop.com:2015/scm/~xiaoxia/design:
  REPORT-16604 【10.0.3回归】设计器-更新日志推送-弹窗显示问题
  无jira 删除错误import
  REPORT-16986 模板制作埋点的tpl.info里,用户如果是中文名会乱码=>调整代码
  延时任务单位写错了
  REPORT-16986 模板制作埋点的tpl.info里,用户如果是中文名会乱码
  REPORT-14831 新多选下拉树插件,高级属性国际化问题
bugfix/10.0
XiaXiang 6 years ago
parent
commit
b6e0908dcf
  1. 35
      designer-base/src/main/java/com/fr/design/mainframe/template/info/TemplateInfoCollector.java
  2. 4
      designer-base/src/main/resources/com/fr/design/ui/update/push/pushUpdate.css
  3. 2
      designer-form/src/main/java/com/fr/design/designer/creator/XTreeEditor.java
  4. 2
      designer-realize/src/main/java/com/fr/design/mainframe/InformationCollector.java
  5. 2
      designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java

35
designer-base/src/main/java/com/fr/design/mainframe/template/info/TemplateInfoCollector.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe.template.info; package com.fr.design.mainframe.template.info;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.io.XMLReadHelper;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
@ -12,12 +13,15 @@ import com.fr.stable.xml.XMLTools;
import com.fr.stable.xml.XMLWriter; import com.fr.stable.xml.XMLWriter;
import com.fr.stable.xml.XMLableReader; import com.fr.stable.xml.XMLableReader;
import com.fr.third.javax.xml.stream.XMLStreamException; import com.fr.third.javax.xml.stream.XMLStreamException;
import com.fr.workspace.WorkContext; import com.fr.third.org.apache.commons.io.FileUtils;
import java.io.ByteArrayOutputStream;
import java.io.File; import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.FileOutputStream; import java.io.IOException;
import java.io.FileReader; import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -132,13 +136,24 @@ public class TemplateInfoCollector implements XMLReadable, XMLWriter {
if (!getInfoFile().exists()) { if (!getInfoFile().exists()) {
return; return;
} }
XMLableReader reader = null;
try (InputStream in = new FileInputStream(getInfoFile())) {
// XMLableReader 还是应该考虑实现 Closable 接口的,这样就能使用 try-with 语句了
reader = XMLReadHelper.createXMLableReader(in, XMLPrintWriter.XML_ENCODER);
reader.readXMLObject(this);
} catch (FileNotFoundException e) {
// do nothing
} catch (XMLStreamException | IOException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
} finally {
try { try {
XMLableReader xmlReader = XMLableReader.createXMLableReader(new FileReader(getInfoFile())); if (reader != null) {
xmlReader.readXMLObject(this); reader.close();
}
} catch (XMLStreamException e) { } catch (XMLStreamException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
} catch (FileNotFoundException e) { }
// do nothing
} }
} }
@ -160,8 +175,12 @@ public class TemplateInfoCollector implements XMLReadable, XMLWriter {
*/ */
private void saveInfo() { private void saveInfo() {
try { try {
FileOutputStream out = new FileOutputStream(getInfoFile()); ByteArrayOutputStream out = new ByteArrayOutputStream();
XMLTools.writeOutputStreamXML(this, out); XMLTools.writeOutputStreamXML(this, out);
out.flush();
out.close();
String fileContent = new String(out.toByteArray(), StandardCharsets.UTF_8);
FileUtils.writeStringToFile(getInfoFile(), fileContent, StandardCharsets.UTF_8);
} catch (Exception ex) { } catch (Exception ex) {
FineLoggerFactory.getLogger().error(ex.getMessage()); FineLoggerFactory.getLogger().error(ex.getMessage());
} }

4
designer-base/src/main/resources/com/fr/design/ui/update/push/pushUpdate.css

@ -5,7 +5,7 @@ body {
background-size: 100% 100% !important; background-size: 100% 100% !important;
-moz-background-size: 100% 100% !important; -moz-background-size: 100% 100% !important;
font-family: PingFangSC-Regular, Georgia, "Nimbus Roman No9 L", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif CN", STSong, "AR PL New Sung", "AR PL SungtiL GB", NSimSun, SimSun, "TW\-Sung", "WenQuanYi Bitmap Song", "AR PL UMing CN", "AR PL UMing HK", "AR PL UMing TW", "AR PL UMing TW MBE", PMingLiU, MingLiU, serif !important; font-family: "PingFang SC", "Microsoft YaHei", "Myriad Pro", "OpenSans", Verdana, SimSun, sans-serif !important;
} }
.close-btn { .close-btn {
@ -27,7 +27,7 @@ body {
} }
.font-bold { .font-bold {
font-weight: bold; font-weight: 500;
} }
.title { .title {

2
designer-form/src/main/java/com/fr/design/designer/creator/XTreeEditor.java

@ -73,7 +73,7 @@ public class XTreeEditor extends XWidgetCreator {
crp = (CRPropertyDescriptor[]) ArrayUtils.add(crp, new CRPropertyDescriptor("ajax", this.data.getClass()).setI18NName( crp = (CRPropertyDescriptor[]) ArrayUtils.add(crp, new CRPropertyDescriptor("ajax", this.data.getClass()).setI18NName(
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Load_By_Async")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Load_By_Async")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY,
"Advanced")); "Fine-Design_Basic_Advanced"));
crp = this.addAllowEdit(crp); crp = this.addAllowEdit(crp);
crp = this.addCustomData(crp); crp = this.addCustomData(crp);

2
designer-realize/src/main/java/com/fr/design/mainframe/InformationCollector.java

@ -205,7 +205,7 @@ public class InformationCollector implements XMLReadable, XMLWriter {
TemplateInfoCollector.getInstance().sendTemplateInfo(); TemplateInfoCollector.getInstance().sendTemplateInfo();
ErrorInfoUploader.getInstance().sendErrorInfo(); ErrorInfoUploader.getInstance().sendErrorInfo();
} }
}, SEND_DELAY, TimeUnit.SECONDS); }, SEND_DELAY, TimeUnit.MILLISECONDS);
} }
/** /**

2
designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java

@ -27,7 +27,6 @@ import com.fr.base.vcs.DesignerMode;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIButtonUI; import com.fr.design.gui.ibutton.UIButtonUI;
import com.fr.design.menu.MenuDef; import com.fr.design.menu.MenuDef;
@ -45,7 +44,6 @@ import com.fr.report.poly.PolyWorkSheet;
import com.fr.report.report.TemplateReport; import com.fr.report.report.TemplateReport;
import com.fr.report.worksheet.WorkSheet; import com.fr.report.worksheet.WorkSheet;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
import org.apache.tools.ant.taskdefs.Sleep;
/** /**
* NameTabPane of sheets * NameTabPane of sheets

Loading…
Cancel
Save