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;
public ShopPaneConfig() {
this.mainJS = getMainJS();
this.scriptsId = getScriptsId();
this.webPane = getWebPane();
this.mainJS = setMainJS();
this.scriptsId = setScriptsId();
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) {
return new ShopManagerPane(new ShopPaneConfig() {
@Override
String getMainJS() {
String setMainJS() {
String relativePath = "/scripts/store/web/index.html";
return StableUtils.pathJoin(new File(installHome).getAbsolutePath(), relativePath);
}
@Override
String getScriptsId() {
String setScriptsId() {
return "shop_scripts";
}
@Override
JFXPanel getWebPane() {
return new PluginWebPane(getMainJS());
JFXPanel setWebPane() {
return new PluginWebPane(setMainJS());
}
});
@ -61,19 +61,19 @@ public class WebManagerPaneFactory {
public BasicPane createReusePane() {
return new ShopManagerPane(new ShopPaneConfig() {
@Override
String getMainJS() {
String setMainJS() {
String relativePath = "/scripts/store/reuse/index.html";
return StableUtils.pathJoin(new File(installHome).getAbsolutePath(), relativePath);
}
@Override
String getScriptsId() {
String setScriptsId() {
return "reuse_scripts";
}
@Override
JFXPanel getWebPane() {
return new ReuseWebPane(getMainJS());
JFXPanel setWebPane() {
return new ReuseWebPane(setMainJS());
}
});
}

Loading…
Cancel
Save