Browse Source

组件复用传下dev

master
xiaoxia 8 years ago
parent
commit
7a7f1c9b56
  1. 2
      designer_base/src/com/fr/design/extra/WebManagerPaneFactory.java
  2. 14
      designer_base/src/com/fr/env/RemoteEnv.java
  3. 71
      designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java

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

@ -26,7 +26,7 @@ public class WebManagerPaneFactory {
}
public BasicPane createPluginPane() {
if (StableUtils.getMajorJavaVersion() != 8) {
if (StableUtils.getMajorJavaVersion() == 8) {
return new ShopManagerPane(new ShopPaneConfig() {
@Override
String getMainJS() {

14
designer_base/src/com/fr/env/RemoteEnv.java vendored

@ -31,10 +31,7 @@ import com.fr.plugin.Plugin;
import com.fr.plugin.PluginLicense;
import com.fr.plugin.PluginLicenseManager;
import com.fr.plugin.PluginLoader;
<<<<<<< HEAD
import com.fr.share.ShareConstants;
=======
>>>>>>> 86c666e44132d7f8fa1727a6d78965b2423ce510
import com.fr.stable.*;
import com.fr.stable.file.XMLFileManagerProvider;
import com.fr.stable.project.ProjectConstants;
@ -2112,11 +2109,7 @@ public class RemoteEnv implements Env {
@Override
public File[] loadREUFile() throws Exception {
File target = new File(CacheManager.getProviderInstance().getCacheDirectory(),
<<<<<<< HEAD
ShareConstants.DIR_SHARE_CACHE);
=======
"fr_share");
>>>>>>> 86c666e44132d7f8fa1727a6d78965b2423ce510
StableUtils.deleteFile(target);
StableUtils.mkdirs(target);
File cacheDir = null;
@ -2131,11 +2124,7 @@ public class RemoteEnv implements Env {
HttpClient client = createHttpMethod(para);
InputStream input = client.getResponseStream();
zip = new File(StableUtils.pathJoin(CacheManager.getProviderInstance().getCacheDirectory().getAbsolutePath()), "share.zip");
<<<<<<< HEAD
cacheDir = new File(StableUtils.pathJoin(CacheManager.getProviderInstance().getCacheDirectory().getAbsolutePath()), ShareConstants.DIR_SHARE_CACHE);
=======
cacheDir = new File(StableUtils.pathJoin(CacheManager.getProviderInstance().getCacheDirectory().getAbsolutePath()), "fr_share");
>>>>>>> 86c666e44132d7f8fa1727a6d78965b2423ce510
StableUtils.deleteFile(cacheDir);
StableUtils.mkdirs(cacheDir);
StableUtils.makesureFileExist(zip);
@ -2159,7 +2148,6 @@ public class RemoteEnv implements Env {
}
return new File[0];
}
<<<<<<< HEAD
@Override
public boolean installREUFile(File reuFile) {
@ -2221,6 +2209,4 @@ public class RemoteEnv implements Env {
return StringUtils.EMPTY;
}
}
=======
>>>>>>> 86c666e44132d7f8fa1727a6d78965b2423ce510
}

71
designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java

@ -257,69 +257,11 @@ public class FormWidgetDetailPane extends FormDockView{
downloadButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
<<<<<<< HEAD
initPopMenu();
}
});
return downloadButton;
}
=======
UIPopupMenu menu = new UIPopupMenu();
UIMenuItem downloadItem = new UIMenuItem(Inter.getLocText("FR-Designer_Download_Template"), BaseUtils.readIcon("/com/fr/design/form/images/download icon.png"));
UIMenuItem installItem = new UIMenuItem(Inter.getLocText("FR-Designer_Install_Template"), BaseUtils.readIcon("/com/fr/design/form/images/install icon.png"));
UIMenuItem deleteItem = new UIMenuItem(Inter.getLocText("FR-Designer_Delete_Template"), BaseUtils.readIcon("/com/fr/design/form/images/delete icon.png"));
menu.add(downloadItem);
menu.add(installItem);
menu.add(deleteItem);
downloadItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
String url = SiteCenter.getInstance().acquireUrlByKind("reuse.url");
if (StringUtils.isEmpty(url)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer_Set_default_browser"));
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp);
} catch (Exception exp) {
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp);
FRContext.getLogger().error("Can not open the browser for URL: " + url);
}
}
});
installItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
JFileChooser fileChooser = new JFileChooser();
fileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
fileChooser.setFileFilter(new FileNameExtensionFilter(".reu", "reu"));
int returnValue = fileChooser.showDialog(new JLabel(), Inter.getLocText("FR-Designer_Select"));
if (returnValue == JFileChooser.APPROVE_OPTION) {
final File chosenFile = fileChooser.getSelectedFile();
installFromDiskZipFile(chosenFile);
}
}
});
deleteItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
deleteFromDiskZipFile();
}
});
GUICoreUtils.showPopupMenu(menu, tabbedPane, tabbedPane.getX() + OFFSET_X, OFFSET_Y);
>>>>>>> 86c666e44132d7f8fa1727a6d78965b2423ce510
/**
* 初始化下拉面板
@ -403,7 +345,6 @@ public class FormWidgetDetailPane extends FormDockView{
}
<<<<<<< HEAD
private void replaceButtonPanel(boolean isEdit) {
this.isEdit = isEdit;
if (isEdit) {
@ -413,18 +354,6 @@ public class FormWidgetDetailPane extends FormDockView{
menutPanel.remove(resetPanel);
menutPanel.add(initEditButtonPane(), BorderLayout.EAST);
ShareLoader.getLoader().resetRemovedModuleList();
=======
private void installFromDiskZipFile(File chosenFile) {
try {
ShareLoader.getLoader().installModuleFromDiskZipFile(chosenFile);
refreshShareMoudule();
elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList();
refreshDownPanel(false);
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_OK"));
} catch (IOException e) {
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_Error"));
FRLogger.getLogger().error(e.getMessage(), e);
>>>>>>> 86c666e44132d7f8fa1727a6d78965b2423ce510
}

Loading…
Cancel
Save