Browse Source

REPORT-4992 插件管理脚本index.html名称修改

master
vito 7 years ago
parent
commit
248cbbcefe
  1. 2
      designer_base/src/com/fr/design/extra/LoginWebPane.java
  2. 2
      designer_base/src/com/fr/design/extra/QQLoginWebPane.java
  3. 12
      designer_base/src/com/fr/design/extra/WebViewDlgHelper.java

2
designer_base/src/com/fr/design/extra/LoginWebPane.java

@ -27,7 +27,7 @@ public class LoginWebPane extends JFXPanel {
LoginWebPane.this.setScene(scene); LoginWebPane.this.setScene(scene);
WebView webView = new WebView(); WebView webView = new WebView();
WebEngine webEngine = webView.getEngine(); WebEngine webEngine = webView.getEngine();
webEngine.load("file:///" + installHome + "/scripts/qqLogin/web/login.html"); webEngine.load("file:///" + installHome + "/scripts/login.html");
webEngine.setOnAlert(new EventHandler<WebEvent<String>>() { webEngine.setOnAlert(new EventHandler<WebEvent<String>>() {
@Override @Override
public void handle(WebEvent<String> event) { public void handle(WebEvent<String> event) {

2
designer_base/src/com/fr/design/extra/QQLoginWebPane.java

@ -62,7 +62,7 @@ public class QQLoginWebPane extends JFXPanel {
QQLoginWebPane.this.setScene(scene); QQLoginWebPane.this.setScene(scene);
final WebView webView = new WebView(); final WebView webView = new WebView();
webEngine = webView.getEngine(); webEngine = webView.getEngine();
url = "file:///" + installHome + "/scripts/qqLogin/web/qqLogin.html"; url = "file:///" + installHome + "/scripts/qqLogin.html";
webEngine.load(url); webEngine.load(url);
final Stage primaryStage = new Stage(); final Stage primaryStage = new Stage();

12
designer_base/src/com/fr/design/extra/WebViewDlgHelper.java

@ -37,7 +37,7 @@ public class WebViewDlgHelper {
public static void createPluginDialog() { public static void createPluginDialog() {
if (StableUtils.getMajorJavaVersion() >= VERSION_8) { if (StableUtils.getMajorJavaVersion() >= VERSION_8) {
String relativePath = "/scripts/store/web/index.html"; String relativePath = "/scripts/plugin.html";
String mainJsPath = StableUtils.pathJoin(installHome, relativePath); String mainJsPath = StableUtils.pathJoin(installHome, relativePath);
File file = new File(mainJsPath); File file = new File(mainJsPath);
if (!file.exists()) { if (!file.exists()) {
@ -52,7 +52,7 @@ public class WebViewDlgHelper {
downloadShopScripts(SHOP_SCRIPTS); downloadShopScripts(SHOP_SCRIPTS);
} }
} else { } else {
String indexPath = "index.html"; String indexPath = "plugin.html";
String mainIndexPath = StableUtils.pathJoin(installHome, indexPath); String mainIndexPath = StableUtils.pathJoin(installHome, indexPath);
checkAndCopyMainFile(mainIndexPath, mainJsPath); checkAndCopyMainFile(mainIndexPath, mainJsPath);
showPluginDlg(mainIndexPath); showPluginDlg(mainIndexPath);
@ -73,7 +73,7 @@ public class WebViewDlgHelper {
} }
/** /**
* 检查script文件夹中的index.html文件 * 检查script文件夹中的plugin.html文件
* *
*/ */
public static void checkAndCopyMainFile(String indexPath, String mainJsPath){ public static void checkAndCopyMainFile(String indexPath, String mainJsPath){
@ -84,7 +84,7 @@ public class WebViewDlgHelper {
} }
/** /**
* 將script文件夹中的index.html文件复制到webreport下 * 將script文件夹中的plugin.html文件复制到webreport下
* *
*/ */
public static void copyMainFile(String indexPath, String mainJsPath){ public static void copyMainFile(String indexPath, String mainJsPath){
@ -191,9 +191,9 @@ public class WebViewDlgHelper {
try { try {
if (get()) { if (get()) {
String relativePath = "/scripts/store/web/index.html"; String relativePath = "/scripts/plugin.html";
IOUtils.unzip(new File(StableUtils.pathJoin(PluginConstants.DOWNLOAD_PATH, PluginConstants.TEMP_FILE)), installHome); IOUtils.unzip(new File(StableUtils.pathJoin(PluginConstants.DOWNLOAD_PATH, PluginConstants.TEMP_FILE)), installHome);
copyMainFile(StableUtils.pathJoin(installHome, "index.html"), StableUtils.pathJoin(installHome, relativePath)); copyMainFile(StableUtils.pathJoin(installHome, "plugin.html"), StableUtils.pathJoin(installHome, relativePath));
// TODO: 2017/4/17 删除之前存放在安装目录下的script // TODO: 2017/4/17 删除之前存放在安装目录下的script
PluginStoreConstants.refreshProps(); // 下载完刷新一下版本号等 PluginStoreConstants.refreshProps(); // 下载完刷新一下版本号等
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Plugin_Shop_Installed"), Inter.getLocText("FR-Designer_Tooltips"), JOptionPane.INFORMATION_MESSAGE); JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Plugin_Shop_Installed"), Inter.getLocText("FR-Designer_Tooltips"), JOptionPane.INFORMATION_MESSAGE);

Loading…
Cancel
Save