Browse Source

Pull request #11903: REPORT-93250 不打开任何报表,服务器配置,添加事件点击没反应 & REPORT-93234 不打开任何报表,触发切换工作目录,模板tab会自动弹出

Merge in DESIGN/design from ~DESTINY.LIN/design:feature/x to feature/x

* commit '5728ed0fb0a05f41cab69b9d974ccc8bacaa2016':
  REPORT-93234 不打开任何报表,触发切换工作目录,模板tab会自动弹出
  REPORT-93250 不打开任何报表,服务器配置,添加事件点击没反应
feature/x
Destiny.Lin-林锦龙 2 years ago
parent
commit
bb4ecf5e08
  1. 6
      designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  2. 20
      designer-realize/src/main/java/com/fr/design/webattr/EventPane.java

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

@ -42,6 +42,7 @@ import com.fr.design.actions.server.GlobalTableDataAction;
import com.fr.design.actions.server.PlatformManagerAction;
import com.fr.design.actions.server.PluginManagerAction;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.file.NewTemplatePane;
import com.fr.design.fun.MenuHandler;
import com.fr.design.fun.OemProcessor;
@ -275,7 +276,10 @@ public abstract class ToolBarMenuDock {
insertTemplateExtendMenu(plus, menuDefs);
// 添加模板菜单
menuList.addAll(Arrays.asList(menuDefs));
// 如果是JNullTemplate不能添加模板菜单,之前没有这个JNullTemplate所以没考虑
if (JTemplate.isValid(HistoryTemplateListCache.getInstance().getCurrentEditingTemplate())) {
menuList.addAll(Arrays.asList(menuDefs));
}
// 添加服务器菜单
if (WorkContext.getCurrent() != null && WorkContext.getCurrent().isRoot()) {

20
designer-realize/src/main/java/com/fr/design/webattr/EventPane.java

@ -5,8 +5,11 @@ import com.fr.design.actions.UpdateAction;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.i18n.Toolkit;
import com.fr.design.javascript.ListenerEditPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.menu.MenuDef;
import com.fr.design.menu.ToolBarDef;
import com.fr.design.widget.EventCreator;
@ -238,6 +241,23 @@ public class EventPane extends BasicPane {
}
public void actionPerformed(ActionEvent e) {
JTemplate jTemplate = DesignerContext.getDesignerFrame().getSelectedJTemplate();
if (!JTemplate.isValid(jTemplate)) {
//如果当前没打开模板就跳出弹窗
Object[] options = new Object[]{Toolkit.i18nText("Fine-Design_Basic_Button_OK")};
FineJOptionPane.showOptionDialog(
EventPane.this,
Toolkit.i18nText("Fine-Design_Please_Open_Template_First"),
Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"),
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.WARNING_MESSAGE,
null,
options,
options[0]
);
//如果不支持就直接返回,不提供事件功能
return ;
}
String[] def = WebContent.getDefaultArg(menuName[j]);
final ListenerEditPane listenerPane = def == null ? new ListenerEditPane() : new ListenerEditPane(def);
Listener lis = new Listener(menuName[j], new JavaScriptImpl());

Loading…
Cancel
Save