Browse Source

Merge pull request #5733 in DESIGN/design from bugfix/10.0 to feature/10.0

* commit '712638e5dc1f506fcfb0c55f14688da44343a214':
  REPORT-58588 FR11-二轮回归-设计器菜单栏-社区-帮助文档跳转地址的首页面不正确
feature/10.0
superman 3 years ago
parent
commit
4025e0c702
  1. 5
      designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java
  2. 11
      designer-base/src/main/java/com/fr/design/login/AbstractDesignerSSO.java

5
designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java

@ -1,5 +1,6 @@
package com.fr.design.actions.help; package com.fr.design.actions.help;
import com.fr.design.i18n.Toolkit;
import com.fr.design.login.AbstractDesignerSSO; import com.fr.design.login.AbstractDesignerSSO;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.general.CloudCenter; import com.fr.general.CloudCenter;
@ -30,6 +31,10 @@ public class TutorialAction extends AbstractDesignerSSO {
return CloudCenter.getInstance().acquireUrlByKind(createDocKey()); return CloudCenter.getInstance().acquireUrlByKind(createDocKey());
} }
public String getOffLineWarnMessage() {
return Toolkit.i18nText("Fine-Design_Offline_Helptutorial_Msg");
}
// 生成帮助文档 sitecenter key, help.zh_CN.10 // 生成帮助文档 sitecenter key, help.zh_CN.10
protected String createDocKey() { protected String createDocKey() {
String locale = GeneralContext.getLocale().toString(); String locale = GeneralContext.getLocale().toString();

11
designer-base/src/main/java/com/fr/design/login/AbstractDesignerSSO.java

@ -6,6 +6,9 @@ import com.fr.design.actions.UpdateAction;
import com.fr.design.login.utils.DesignerLoginUtils; import com.fr.design.login.utils.DesignerLoginUtils;
import com.fr.design.os.impl.SupportOSImpl; import com.fr.design.os.impl.SupportOSImpl;
import com.fr.design.utils.BrowseUtils; import com.fr.design.utils.BrowseUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@ -21,6 +24,10 @@ public abstract class AbstractDesignerSSO extends UpdateAction {
public void actionPerformed(ActionEvent event) { public void actionPerformed(ActionEvent event) {
String url = getJumpUrl(); String url = getJumpUrl();
if (!DesignerLoginUtils.isOnline()) { if (!DesignerLoginUtils.isOnline()) {
String message = getOffLineWarnMessage();
if (StringUtils.isNotEmpty(message)) {
FineLoggerFactory.getLogger().warn(message);
}
BrowseUtils.browser(url); BrowseUtils.browser(url);
return; return;
} }
@ -47,4 +54,8 @@ public abstract class AbstractDesignerSSO extends UpdateAction {
} }
public abstract String getJumpUrl(); public abstract String getJumpUrl();
public String getOffLineWarnMessage() {
return StringUtils.EMPTY;
}
} }

Loading…
Cancel
Save