Browse Source

无jira任务 bugfix:脚本页面加载两遍的bug

master
vito 8 years ago
parent
commit
ffbd32b113
  1. 24
      designer_base/src/com/fr/design/extra/ShopPaneConfig.java
  2. 16
      designer_base/src/com/fr/design/extra/WebManagerPaneFactory.java

24
designer_base/src/com/fr/design/extra/ShopPaneConfig.java

@ -11,14 +11,26 @@ public abstract class ShopPaneConfig {
private JFXPanel webPane; private JFXPanel webPane;
public ShopPaneConfig() { public ShopPaneConfig() {
this.mainJS = getMainJS(); this.mainJS = setMainJS();
this.scriptsId = getScriptsId(); this.scriptsId = setScriptsId();
this.webPane = getWebPane(); this.webPane = setWebPane();
} }
abstract String getMainJS(); abstract String setMainJS();
abstract String getScriptsId(); abstract String setScriptsId();
abstract JFXPanel getWebPane(); abstract JFXPanel setWebPane();
public String getMainJS() {
return mainJS;
}
public String getScriptsId() {
return scriptsId;
}
public JFXPanel getWebPane() {
return webPane;
}
} }

16
designer_base/src/com/fr/design/extra/WebManagerPaneFactory.java

@ -29,19 +29,19 @@ public class WebManagerPaneFactory {
if (StableUtils.getMajorJavaVersion() == 8) { if (StableUtils.getMajorJavaVersion() == 8) {
return new ShopManagerPane(new ShopPaneConfig() { return new ShopManagerPane(new ShopPaneConfig() {
@Override @Override
String getMainJS() { String setMainJS() {
String relativePath = "/scripts/store/web/index.html"; String relativePath = "/scripts/store/web/index.html";
return StableUtils.pathJoin(new File(installHome).getAbsolutePath(), relativePath); return StableUtils.pathJoin(new File(installHome).getAbsolutePath(), relativePath);
} }
@Override @Override
String getScriptsId() { String setScriptsId() {
return "shop_scripts"; return "shop_scripts";
} }
@Override @Override
JFXPanel getWebPane() { JFXPanel setWebPane() {
return new PluginWebPane(getMainJS()); return new PluginWebPane(setMainJS());
} }
}); });
@ -61,19 +61,19 @@ public class WebManagerPaneFactory {
public BasicPane createReusePane() { public BasicPane createReusePane() {
return new ShopManagerPane(new ShopPaneConfig() { return new ShopManagerPane(new ShopPaneConfig() {
@Override @Override
String getMainJS() { String setMainJS() {
String relativePath = "/scripts/store/reuse/index.html"; String relativePath = "/scripts/store/reuse/index.html";
return StableUtils.pathJoin(new File(installHome).getAbsolutePath(), relativePath); return StableUtils.pathJoin(new File(installHome).getAbsolutePath(), relativePath);
} }
@Override @Override
String getScriptsId() { String setScriptsId() {
return "reuse_scripts"; return "reuse_scripts";
} }
@Override @Override
JFXPanel getWebPane() { JFXPanel setWebPane() {
return new ReuseWebPane(getMainJS()); return new ReuseWebPane(setMainJS());
} }
}); });
} }

Loading…
Cancel
Save