Browse Source

Merge branch 'release/10.0' of https://cloud.finedevelop.com/scm/~hades/design into release/10.0

feature/big-screen
hades 5 years ago
parent
commit
c30722518f
  1. 22
      designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateManager.java
  2. 3
      designer-base/src/main/resources/com/fr/design/ui/update/push/pushUpdate.js
  3. 10
      designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

22
designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateManager.java

@ -27,17 +27,6 @@ public class DesignerPushUpdateManager {
private DesignerUpdateInfo updateInfo; private DesignerUpdateInfo updateInfo;
static {
if (DesignerPushUpdateConfigManager.getInstance().isAutoPushUpdateEnabled()) {
DesignerContext.getDesignerFrame().addDesignerOpenedListener(new DesignerOpenedListener() {
@Override
public void designerOpened() {
getInstance().checkAndPop();
}
});
}
}
private DesignerPushUpdateManager() { private DesignerPushUpdateManager() {
} }
@ -48,6 +37,17 @@ public class DesignerPushUpdateManager {
return singleton; return singleton;
} }
public void preparePushUpdate() {
if (DesignerPushUpdateConfigManager.getInstance().isAutoPushUpdateEnabled()) {
DesignerContext.getDesignerFrame().addDesignerOpenedListener(new DesignerOpenedListener() {
@Override
public void designerOpened() {
getInstance().checkAndPop();
}
});
}
}
private void initUpdateInfo(String currentVersion, String latestVersion) { private void initUpdateInfo(String currentVersion, String latestVersion) {
String lastIgnoredVersion = DesignerPushUpdateConfigManager.getInstance().getLastIgnoredVersion(); String lastIgnoredVersion = DesignerPushUpdateConfigManager.getInstance().getLastIgnoredVersion();
String updatePushInfo = CloudCenter.getInstance().acquireUrlByKind("update.push"); String updatePushInfo = CloudCenter.getInstance().acquireUrlByKind("update.push");

3
designer-base/src/main/resources/com/fr/design/ui/update/push/pushUpdate.js

@ -104,8 +104,7 @@ function getMoreInfo() {
function getCloseButton() { function getCloseButton() {
return BI.createWidget({ return BI.createWidget({
type: "bi.button", type: "bi.button",
text: "", text: String.fromCharCode(10005),
iconCls: "close-font",
cls: "close-btn", cls: "close-btn",
clear: true, clear: true,
handler: function () { handler: function () {

10
designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java

@ -60,6 +60,7 @@ import com.fr.design.parameter.FormParameterReader;
import com.fr.design.parameter.ParameterPropertyPane; import com.fr.design.parameter.ParameterPropertyPane;
import com.fr.design.parameter.WorkBookParameterReader; import com.fr.design.parameter.WorkBookParameterReader;
import com.fr.design.update.actions.RecoverForDesigner; import com.fr.design.update.actions.RecoverForDesigner;
import com.fr.design.update.push.DesignerPushUpdateManager;
import com.fr.design.widget.ui.btn.FormSubmitButtonDetailPane; import com.fr.design.widget.ui.btn.FormSubmitButtonDetailPane;
import com.fr.form.stable.ElementCaseThumbnailProcessor; import com.fr.form.stable.ElementCaseThumbnailProcessor;
import com.fr.general.xml.GeneralXMLTools; import com.fr.general.xml.GeneralXMLTools;
@ -102,6 +103,7 @@ import com.fr.stable.script.ValueConverter;
import com.fr.stable.xml.ObjectTokenizer; import com.fr.stable.xml.ObjectTokenizer;
import com.fr.stable.xml.ObjectXMLWriterFinder; import com.fr.stable.xml.ObjectXMLWriterFinder;
import com.fr.start.BBSGuestPaneProvider; import com.fr.start.BBSGuestPaneProvider;
import com.fr.task.Once;
import com.fr.xml.ReportXMLUtils; import com.fr.xml.ReportXMLUtils;
import java.awt.*; import java.awt.*;
@ -119,6 +121,13 @@ public class DesignerActivator extends Activator {
private LogHandler<DesignerLogAppender> logHandler = null; private LogHandler<DesignerLogAppender> logHandler = null;
private final Once pushUpdateTask = new Once(new Runnable() {
@Override
public void run() {
DesignerPushUpdateManager.getInstance().preparePushUpdate();
}
});
@Override @Override
public void start() { public void start() {
List<LocaleMarker> markers = findMutable(InterMutableKey.Path); List<LocaleMarker> markers = findMutable(InterMutableKey.Path);
@ -139,6 +148,7 @@ public class DesignerActivator extends Activator {
storePassport(); storePassport();
AlphaFineHelper.switchConfig4Locale(); AlphaFineHelper.switchConfig4Locale();
RecoverManager.register(new RecoverForDesigner()); RecoverManager.register(new RecoverForDesigner());
pushUpdateTask.run();
} }
@Override @Override

Loading…
Cancel
Save