Browse Source

Pull request #9864: 无jira问题

Merge in DESIGN/design from ~LINK.ZHAO/design:release/11.0 to release/11.0

* commit '378df2403c280fa32dc4525f35cd76e5b8d3f4a5':
  无jira问题 手动合release11
newui
Link.Zhao 2 years ago
parent
commit
4573d410e8
  1. 11
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java
  2. 8
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/TemplateShopPane.java
  3. 3
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/TemplateResourceSearchWorkerManager.java

11
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java

@ -349,7 +349,7 @@ public class AlphaFineFrame extends JFrame {
popupMenu.addPopupMenuListener(new PopupMenuListener() { popupMenu.addPopupMenuListener(new PopupMenuListener() {
@Override @Override
public void popupMenuWillBecomeVisible(PopupMenuEvent e) { public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
// do nothing // do nothing
} }
@Override @Override
@ -584,7 +584,7 @@ public class AlphaFineFrame extends JFrame {
switchType(CellType.PLUGIN); switchType(CellType.PLUGIN);
break; break;
case TEMPLATE_SHOP: case TEMPLATE_SHOP:
TemplateShopPane.getInstance().showPagePane(); TemplateShopPane.getInstance().showResult();
switchType(CellType.TEMPLATE_SHOP); switchType(CellType.TEMPLATE_SHOP);
break; break;
} }
@ -602,9 +602,8 @@ public class AlphaFineFrame extends JFrame {
if (alphaFineConfigManager.isProductDynamics()) { if (alphaFineConfigManager.isProductDynamics()) {
selectedLabelList.add(new SelectedLabel(PRODUCT_NEWS, CellType.PRODUCT_NEWS)); selectedLabelList.add(new SelectedLabel(PRODUCT_NEWS, CellType.PRODUCT_NEWS));
} }
// 默认选中模板商城
if (alphaFineConfigManager.hasTemplateShop()) { if (alphaFineConfigManager.hasTemplateShop()) {
selectedLabelList.add(new SelectedLabel(TEMPLATE_SHOP, CellType.TEMPLATE_SHOP, true)); selectedLabelList.add(new SelectedLabel(TEMPLATE_SHOP, CellType.TEMPLATE_SHOP));
} }
if (alphaFineConfigManager.isContainDocument()) { if (alphaFineConfigManager.isContainDocument()) {
selectedLabelList.add(new SelectedLabel(HELP, CellType.DOCUMENT)); selectedLabelList.add(new SelectedLabel(HELP, CellType.DOCUMENT));
@ -620,8 +619,8 @@ public class AlphaFineFrame extends JFrame {
} }
// 如果不展示模板商城,则list中第一个被选中 // 默认选中第一个tab
if (!alphaFineConfigManager.hasTemplateShop() && !selectedLabelList.isEmpty()) { if (!selectedLabelList.isEmpty()) {
selectedLabelList.get(0).setSelected(true); selectedLabelList.get(0).setSelected(true);
} }

8
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/TemplateShopPane.java

@ -71,8 +71,12 @@ public class TemplateShopPane extends JPanel {
} }
} }
public void showPagePane() { public void showResult() {
switchCard(PAGE_PANEL); if (Strings.isEmpty(AlphaFineHelper.getAlphaFineDialog().getSearchText())) {
switchCard(DEFAULT_PAGE_PANEL);
} else {
switchCard(PAGE_PANEL);
}
} }
// 打开二级页面,显示详细信息 // 打开二级页面,显示详细信息

3
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/TemplateResourceSearchWorkerManager.java

@ -38,13 +38,12 @@ public class TemplateResourceSearchWorkerManager implements SearchManager {
public void doSearch(SearchTextBean searchTextBean) { public void doSearch(SearchTextBean searchTextBean) {
checkSearchWork(); checkSearchWork();
searchOver = false; searchOver = false;
networkError = false;
this.searchWorker = new SwingWorker<List<TemplateResource>, Void>() { this.searchWorker = new SwingWorker<List<TemplateResource>, Void>() {
@Override @Override
protected List<TemplateResource> doInBackground() { protected List<TemplateResource> doInBackground() {
List<TemplateResource> list; List<TemplateResource> list;
if (!AlphaFineHelper.isNetworkOk() && cellType.isNeedNetWork()) { if (!AlphaFineHelper.isNetworkOk()) {
networkError = true; networkError = true;
FineLoggerFactory.getLogger().warn("alphaFine network error"); FineLoggerFactory.getLogger().warn("alphaFine network error");
} }

Loading…
Cancel
Save