|
|
|
@ -13,6 +13,7 @@ import com.fr.design.mainframe.share.ui.online.installation.ComponentInstallatio
|
|
|
|
|
import com.fr.design.mainframe.share.ui.online.installation.ComponentsPackageInstallation; |
|
|
|
|
import com.fr.design.mainframe.share.ui.online.installation.TemplateThemeInstallation; |
|
|
|
|
import com.fr.design.mainframe.share.ui.online.mini.MiniComponentShopDialog; |
|
|
|
|
import com.fr.design.mainframe.share.util.OnlineShopUtils; |
|
|
|
|
import com.fr.form.share.Group; |
|
|
|
|
import com.fr.form.share.SharableWidgetProvider; |
|
|
|
|
import com.fr.form.share.bean.OnlineShareWidget; |
|
|
|
@ -306,23 +307,31 @@ public class NativeProductBridge {
|
|
|
|
|
@Override |
|
|
|
|
public void run() { |
|
|
|
|
boolean allowedDownload; |
|
|
|
|
if (!widget.isCompatibleWithCurrentEnv()) { |
|
|
|
|
int result = FineJOptionPane.showConfirmDialog( |
|
|
|
|
OnlineShareWidget[] childrenWidgets = OnlineShopUtils.getPackageWidgets(widget, false); |
|
|
|
|
boolean isCompatibleWithCurrentEnv = true; |
|
|
|
|
for (OnlineShareWidget children: childrenWidgets) { |
|
|
|
|
if (!children.isCompatibleWithCurrentEnv()) { |
|
|
|
|
isCompatibleWithCurrentEnv = false; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
int result; |
|
|
|
|
if (!isCompatibleWithCurrentEnv) { |
|
|
|
|
result = FineJOptionPane.showConfirmDialog( |
|
|
|
|
MiniComponentShopDialog.getInstance().getContentPane(), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Share_Online_Mini_Shop_Download_Incompatible_Components_Package_Tip", childrenCount), |
|
|
|
|
"", |
|
|
|
|
FineJOptionPane.YES_NO_OPTION |
|
|
|
|
); |
|
|
|
|
allowedDownload = result == JOptionPane.YES_OPTION; |
|
|
|
|
} else { |
|
|
|
|
int result = FineJOptionPane.showConfirmDialog( |
|
|
|
|
result = FineJOptionPane.showConfirmDialog( |
|
|
|
|
MiniComponentShopDialog.getInstance().getContentPane(), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Share_Online_Mini_Shop_Download_Components_Package_Tip", childrenCount), |
|
|
|
|
"", |
|
|
|
|
FineJOptionPane.YES_NO_OPTION |
|
|
|
|
); |
|
|
|
|
allowedDownload = result == JOptionPane.YES_OPTION; |
|
|
|
|
} |
|
|
|
|
allowedDownload = result == JOptionPane.YES_OPTION; |
|
|
|
|
if (allowedDownload) { |
|
|
|
|
fireStartEvent(null); |
|
|
|
|
action.install(); |
|
|
|
|