|
|
|
@ -46,11 +46,8 @@ public class TemplateTool {
|
|
|
|
|
if (AdaptiveSwitchUtil.isSwitchJFromIng()) { |
|
|
|
|
currentType = DesignerUIModeConfig.getInstance().newUIMode() ? JFormType.NEW_TYPE : JFormType.OLD_TYPE; |
|
|
|
|
} else { |
|
|
|
|
if (jTemplate instanceof NewJForm) { |
|
|
|
|
NewJForm newJForm = (NewJForm) jTemplate; |
|
|
|
|
if (LightTool.containNewFormFlag(newJForm.getTarget()) || newJForm.getTarget().getTemplateID() == null) { |
|
|
|
|
currentType = JFormType.NEW_TYPE; |
|
|
|
|
} |
|
|
|
|
if (isNewJForm(jTemplate)) { |
|
|
|
|
currentType = JFormType.NEW_TYPE; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//UI转换
|
|
|
|
@ -62,6 +59,16 @@ public class TemplateTool {
|
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
private static boolean isNewJForm(JTemplate jTemplate) { |
|
|
|
|
if (jTemplate instanceof NewJForm) { |
|
|
|
|
NewJForm newJForm = (NewJForm) jTemplate; |
|
|
|
|
if (LightTool.containNewFormFlag(newJForm.getTarget()) || newJForm.getTarget().getTemplateID() == null) { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static Listener<JTemplate> getSwitchListener() { |
|
|
|
|
return switchListener; |
|
|
|
|
} |
|
|
|
|