Browse Source

REPORT-62438 远程模板锁定优化 更新下国际化和一个展示相关业务逻辑

feature/x
hades 3 years ago
parent
commit
42c68b1832
  1. 4
      designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java
  2. 5
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

4
designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java

@ -224,6 +224,10 @@ public class TemplateTreePane extends JPanel implements FileOperations {
}
String reportPath = reportletsTree.getSelectedTemplatePath();
final String selectedFilePath = StableUtils.pathJoin(ProjectConstants.REPORTLETS_NAME, reportPath);
if (WorkContext.getCurrent().get(LockInfoOperator.class).isTplUnLocked(selectedFilePath)) {
FineLoggerFactory.getLogger().info("{} has been unlocked", selectedFilePath);
return;
}
String lock = node.getLock();
boolean showLockInfo = (lock != null && !lock.equals(node.getUserID()))
|| WorkContext.getCurrent().get(LockInfoOperator.class).isTplLocked(selectedFilePath);

5
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

@ -204,7 +204,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
button.setBorderPainted(false);
button.setContentAreaFilled(false);
button.set4ToolbarButton();
button.setToolTipText(Toolkit.i18nText("Fine_Design_Template_Lock_Status"));
button.setToolTipText(Toolkit.i18nText("Fine_Design_Template_Unlock_Tip"));
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -599,7 +599,8 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
boolean visible = fileNode != null
&& StringUtils.isNotEmpty(fileNode.getLock())
&& WorkContext.getCurrent().isRoot()
&& WorkContext.getCurrent().get(LockInfoOperator.class).isUnLockable();
&& WorkContext.getCurrent().get(LockInfoOperator.class).isUnLockable()
&& !WorkContext.getCurrent().get(LockInfoOperator.class).isTplUnLocked(fileNode.getEnvPath());
rightToolBar.setVisible(visible);
}
}

Loading…
Cancel
Save