Browse Source

REPORT-57806 主题获取

【问题原因】
改进在线组件数据模型中获取主题名称和主题文件的方式

【改动思路】
同上
research/11.0
Starryi 3 years ago
parent
commit
6e1d2ba1aa
  1. 3
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/AbstractOnlineWidgetBlock.java
  2. 6
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetPopupPreviewPane.java

3
designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/AbstractOnlineWidgetBlock.java

@ -117,8 +117,7 @@ public abstract class AbstractOnlineWidgetBlock extends PreviewWidgetBlock<Onlin
popupMenu.setBackground(UIConstants.DEFAULT_BG_RULER);
OnlineShareWidget widget = getWidget();
OnlineShareWidget parentPackage = widget.getParentPackage();
String suitableThemeFile = parentPackage != null ? parentPackage.getThemePath() : null;
String suitableThemeFile = widget.getThemePath();
if (StringUtils.isNotEmpty(suitableThemeFile)) {
popupMenu.add(new DownloadSuitableThemeAction(suitableThemeFile).createMenuItem());
}

6
designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetPopupPreviewPane.java

@ -159,10 +159,10 @@ public class OnlineWidgetPopupPreviewPane extends AbstractWidgetPopupPreviewPane
@Override
public void populateBean(PreviewWidgetBlock<OnlineShareWidget> block) {
OnlineShareWidget widget = block.getWidget();
OnlineShareWidget parentPackage = widget.getParentPackage();
if (parentPackage != null && StringUtils.isNotEmpty(parentPackage.getThemeName())) {
String themeName = widget.getThemeName();
if (StringUtils.isNotEmpty(themeName)) {
suitableThemeNamePane.setVisible(true);
suitableThemeNameLabel.setText(parentPackage.getThemeName());
suitableThemeNameLabel.setText(themeName);
} else {
suitableThemeNamePane.setVisible(false);
}

Loading…
Cancel
Save