Browse Source

Merge pull request #11002 in DESIGN/design from bugfix/11.0 to feature/x

* commit '594c30e797a2dcce9450bf37ac3726409be89e44':
  REPORT-86482 更新日志获取时间范围问题
  REPORT-87124 国际化设计器需要对服务平台做下隐藏
  REPORT-85618 【FR设计器-移动端】组件顺序-frm模板,组件修改名称后,body-移动端-组件顺序会排到最后一位
  REPORT-85618 【FR设计器-移动端】组件顺序-frm模板,组件修改名称后,body-移动端-组件顺序会排到最后一位
feature/x
superman 2 years ago
parent
commit
4a6db2d6e5
  1. 7
      designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  2. 14
      designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java
  3. 7
      designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormSingleWidgetCardPane.java

7
designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -574,8 +574,11 @@ public abstract class ToolBarMenuDock {
} }
shortCuts.add(new EnvDetectorAction()); shortCuts.add(new EnvDetectorAction());
//服务平台 //服务平台(仅针对中国大陆)
shortCuts.add(new ServicePlatformAction()); if (GeneralContext.getLocale().equals(Locale.CHINA)) {
shortCuts.add(new ServicePlatformAction());
}
shortCuts.add(SeparatorDef.DEFAULT); shortCuts.add(SeparatorDef.DEFAULT);
if (DesignerEnvManager.getEnvManager().isOpenDebug()) { if (DesignerEnvManager.getEnvManager().isOpenDebug()) {

14
designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java

@ -488,7 +488,7 @@ public class UpdateMainDialog extends UIDialog {
continue; continue;
} }
} }
if (isValidLogInfo(updateInfo[UpdateInfoTable.UPDATE_TITLE_INDEX]) && curJarDate != null) { if (isValid(updateInfo, GeneralUtils.objectToString(curJarDate))) {
updateInfoList.add(new Object[]{UPDATELOG_FORMAT.format(updateTime), updateInfo[UpdateInfoTable.UPDATE_VERSION_INDEX], updateInfo[UpdateInfoTable.UPDATE_TITLE_INDEX], updateTime.after(curJarDate)}); updateInfoList.add(new Object[]{UPDATELOG_FORMAT.format(updateTime), updateInfo[UpdateInfoTable.UPDATE_VERSION_INDEX], updateInfo[UpdateInfoTable.UPDATE_TITLE_INDEX], updateTime.after(curJarDate)});
} }
} }
@ -499,6 +499,11 @@ public class UpdateMainDialog extends UIDialog {
} }
} }
private boolean isValid(String[] updateInfo, String curJarDate) {
return isValidLogInfo(updateInfo[UpdateInfoTable.UPDATE_TITLE_INDEX]) && curJarDate != null && curJarDate.compareTo(updateInfo[UpdateInfoTable.UPDATE_DATE_INDEX]) <= 0;
}
private void updateCachedInfoFile(JSONArray jsonArray) throws Exception { private void updateCachedInfoFile(JSONArray jsonArray) throws Exception {
String cacheDirPath = StableUtils.pathJoin(WorkContext.getCurrent().getPath(), "resources", "offlineres"); String cacheDirPath = StableUtils.pathJoin(WorkContext.getCurrent().getPath(), "resources", "offlineres");
File cacheFileDir = new File(cacheDirPath); File cacheFileDir = new File(cacheDirPath);
@ -554,13 +559,18 @@ public class UpdateMainDialog extends UIDialog {
continue; continue;
} }
} }
if (isValidLogInfo(updateTitle)) { Date curDate = UPDATE_INFO_TABLE_FORMAT.parse(currentNO, new ParsePosition(currentNO.indexOf("-") + 1));
if (isValid4GenerateInfo(updateTitle, GeneralUtils.objectToString(curDate), updateTimeStr)) {
updateInfoList.add(new Object[]{updateTimeStr, updateVersionStr, updateTitle, updateTime.after(curJarDate)}); updateInfoList.add(new Object[]{updateTimeStr, updateVersionStr, updateTitle, updateTime.after(curJarDate)});
} }
} }
return new ArrayList<>(updateInfoList); return new ArrayList<>(updateInfoList);
} }
private boolean isValid4GenerateInfo(String updateTitle, String curDate, String updateTimeStr) {
return isValidLogInfo(updateTitle) && curDate.compareTo(updateTimeStr) <= 0;
}
private boolean containsKeyword(String str, String keyword) { private boolean containsKeyword(String str, String keyword) {
return str.toUpperCase().contains(keyword.toUpperCase()); return str.toUpperCase().contains(keyword.toUpperCase());
} }

7
designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormSingleWidgetCardPane.java

@ -28,9 +28,11 @@ import com.fr.design.widget.Operator;
import com.fr.design.widget.ui.designer.component.WidgetAbsoluteBoundPane; import com.fr.design.widget.ui.designer.component.WidgetAbsoluteBoundPane;
import com.fr.design.widget.ui.designer.component.WidgetBoundPane; import com.fr.design.widget.ui.designer.component.WidgetBoundPane;
import com.fr.design.widget.ui.designer.component.WidgetCardTagBoundPane; import com.fr.design.widget.ui.designer.component.WidgetCardTagBoundPane;
import com.fr.form.main.WidgetUtil;
import com.fr.form.ui.ChartEditor; import com.fr.form.ui.ChartEditor;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.form.ui.container.WScaleLayout; import com.fr.form.ui.container.WScaleLayout;
import com.fr.form.ui.container.WSortLayout;
import com.fr.form.ui.container.WTitleLayout; import com.fr.form.ui.container.WTitleLayout;
import com.fr.form.ui.widget.CRBoundsWidget; import com.fr.form.ui.widget.CRBoundsWidget;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
@ -241,7 +243,12 @@ public class FormSingleWidgetCardPane extends FormWidgetCardPane {
showNameInvalidDialog(Toolkit.i18nText("Fine-Design_Form_Chart_Widget_Rename_Failure")); showNameInvalidDialog(Toolkit.i18nText("Fine-Design_Form_Chart_Widget_Rename_Failure"));
return; return;
} }
String oldName = widget.getWidgetName();
widgetPropertyPane.update(widget); widgetPropertyPane.update(widget);
Widget innerWidget = WidgetUtil.getInnerWidget(widget);
if (!StringUtils.equals(oldName, innerWidget.getWidgetName())) {
innerWidget.setMobileOldWidgetName(oldName);
}
// 上面一行更新了组件 这里必须重新调用getWidgetName // 上面一行更新了组件 这里必须重新调用getWidgetName
xCreator.resetCreatorName(widget.getWidgetName()); xCreator.resetCreatorName(widget.getWidgetName());
xCreator.resetVisible(widget.isVisible()); xCreator.resetVisible(widget.isVisible());

Loading…
Cancel
Save