From 2e6cae4233fed717c366437290b8141bebd335ee Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 24 Nov 2016 16:59:37 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=8A=A0=E8=BD=BDdesign=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E5=9B=BD=E9=99=85=E5=8C=96=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/module/DesignModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/module/DesignModule.java b/designer_base/src/com/fr/design/module/DesignModule.java index 7dca3803ff..14ed20aea8 100644 --- a/designer_base/src/com/fr/design/module/DesignModule.java +++ b/designer_base/src/com/fr/design/module/DesignModule.java @@ -62,7 +62,7 @@ public abstract class DesignModule extends TopModule { * @return 国际化文件路径 */ public String[] getLocaleFile() { - return ArrayUtils.EMPTY_STRING_ARRAY; + return new String[]{"com/fr/design/locale/designer"}; } public Class[] actionsForInsertCellElement() { From e46f1fe461c77b19eb66c940ceb3292c96f614a1 Mon Sep 17 00:00:00 2001 From: sunmondong Date: Fri, 25 Nov 2016 10:19:53 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E6=96=87=E4=BB=B6=EF=BC=9Aapplet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.dev.gradle | 10 ++--- build.dev.gradle.bak | 4 +- build.master.gradle | 10 ++--- build.master.gradle.bak | 86 ++++++++++++++++++++++++++++++++++++++++ build.release.gradle | 10 ++--- build.release.gradle.bak | 85 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 188 insertions(+), 17 deletions(-) create mode 100644 build.master.gradle.bak create mode 100644 build.release.gradle.bak diff --git a/build.dev.gradle b/build.dev.gradle index c5cc1b92da..1efdd55cc8 100644 --- a/build.dev.gradle +++ b/build.dev.gradle @@ -13,7 +13,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ("\\")+1) task appletJar<<{ ant{ - mkdir(dir:"${libDir}/tmp-${branchName}") + mkdir(dir:"./tmp") mkdir(dir:"build/classes/") copy(todir:"build/classes/"){ fileset(dir:"${basicDir}/finereport-core-stable/${branchName}/build/classes/main") @@ -27,8 +27,8 @@ task appletJar<<{ fileset(dir:"${basicDir}/finereport-performance-stable/${branchName}/build/classes/main") } - unjar(src:"${libDir}/${branchName}/3rd.jar",dest:"${libDir}/tmp-${branchName}") - unjar(src:"${libDir}/${branchName}/servlet-api.jar",dest:"${libDir}/tmp-${branchName}") + unjar(src:"${libDir}/${branchName}/3rd.jar",dest:"./tmp") + unjar(src:"${libDir}/${branchName}/servlet-api.jar",dest:"./tmp") jar(jarfile:"build/libs/fr-applet-8.0.jar"){ fileset(dir:"build/classes"){ exclude(name:"*.*") @@ -44,7 +44,7 @@ task appletJar<<{ exclude(name:"com/fr/start/**") exclude(name:"com/fr/process/**") } - fileset(dir:"${libDir}/tmp-${branchName}"){ + fileset(dir:"./tmp"){ include(name:"javax/mail/**") include(name:"javax/servlet/**") include(name:"org/freehep/**") @@ -60,7 +60,7 @@ task appletJar<<{ include(name:"com/fr/web/attr/*.class") } } - delete(dir:"${libDir}/tmp-${branchName}") + delete(dir:"./tmp") def jdk6home= "D:/FineReport/develop/java/jdk1.6u35" def keystore="frapplet.store" def keycert="fr.cert" diff --git a/build.dev.gradle.bak b/build.dev.gradle.bak index cc3bea2327..c5cc1b92da 100644 --- a/build.dev.gradle.bak +++ b/build.dev.gradle.bak @@ -27,8 +27,8 @@ task appletJar<<{ fileset(dir:"${basicDir}/finereport-performance-stable/${branchName}/build/classes/main") } - unjar(src:"${libDir}/3rd.jar",dest:"${libDir}/tmp-${branchName}") - unjar(src:"${libDir}/servlet-api.jar",dest:"${libDir}/tmp-${branchName}") + unjar(src:"${libDir}/${branchName}/3rd.jar",dest:"${libDir}/tmp-${branchName}") + unjar(src:"${libDir}/${branchName}/servlet-api.jar",dest:"${libDir}/tmp-${branchName}") jar(jarfile:"build/libs/fr-applet-8.0.jar"){ fileset(dir:"build/classes"){ exclude(name:"*.*") diff --git a/build.master.gradle b/build.master.gradle index c5cc1b92da..1efdd55cc8 100644 --- a/build.master.gradle +++ b/build.master.gradle @@ -13,7 +13,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ("\\")+1) task appletJar<<{ ant{ - mkdir(dir:"${libDir}/tmp-${branchName}") + mkdir(dir:"./tmp") mkdir(dir:"build/classes/") copy(todir:"build/classes/"){ fileset(dir:"${basicDir}/finereport-core-stable/${branchName}/build/classes/main") @@ -27,8 +27,8 @@ task appletJar<<{ fileset(dir:"${basicDir}/finereport-performance-stable/${branchName}/build/classes/main") } - unjar(src:"${libDir}/${branchName}/3rd.jar",dest:"${libDir}/tmp-${branchName}") - unjar(src:"${libDir}/${branchName}/servlet-api.jar",dest:"${libDir}/tmp-${branchName}") + unjar(src:"${libDir}/${branchName}/3rd.jar",dest:"./tmp") + unjar(src:"${libDir}/${branchName}/servlet-api.jar",dest:"./tmp") jar(jarfile:"build/libs/fr-applet-8.0.jar"){ fileset(dir:"build/classes"){ exclude(name:"*.*") @@ -44,7 +44,7 @@ task appletJar<<{ exclude(name:"com/fr/start/**") exclude(name:"com/fr/process/**") } - fileset(dir:"${libDir}/tmp-${branchName}"){ + fileset(dir:"./tmp"){ include(name:"javax/mail/**") include(name:"javax/servlet/**") include(name:"org/freehep/**") @@ -60,7 +60,7 @@ task appletJar<<{ include(name:"com/fr/web/attr/*.class") } } - delete(dir:"${libDir}/tmp-${branchName}") + delete(dir:"./tmp") def jdk6home= "D:/FineReport/develop/java/jdk1.6u35" def keystore="frapplet.store" def keycert="fr.cert" diff --git a/build.master.gradle.bak b/build.master.gradle.bak new file mode 100644 index 0000000000..c5cc1b92da --- /dev/null +++ b/build.master.gradle.bak @@ -0,0 +1,86 @@ +apply plugin: "java" +tasks.withType(JavaCompile){ + options.encoding = "UTF-8" +} + +def basicDir="../../" +def libDir="${basicDir}/finereport-lib-stable" +//获取什么分支名 +FileTree files =fileTree(dir:"./",include:"build.*.gradle") +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ("\\")) +def branchName=buildDir.substring(buildDir.lastIndexOf ("\\")+1) + +task appletJar<<{ + + ant{ + mkdir(dir:"${libDir}/tmp-${branchName}") + mkdir(dir:"build/classes/") + copy(todir:"build/classes/"){ + fileset(dir:"${basicDir}/finereport-core-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-chart-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-report-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-platform-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-performance-stable/${branchName}/build/classes/main") + + } + unjar(src:"${libDir}/${branchName}/3rd.jar",dest:"${libDir}/tmp-${branchName}") + unjar(src:"${libDir}/${branchName}/servlet-api.jar",dest:"${libDir}/tmp-${branchName}") + jar(jarfile:"build/libs/fr-applet-8.0.jar"){ + fileset(dir:"build/classes"){ + exclude(name:"*.*") + exclude(name:"bin/*.*") + exclude(name:"classes/**") + exclude(name:"com/fr/schedule/**") + exclude(name:"com/fr/cell/**") + exclude(name:"com/fr/dialog/**") + exclude(name:"com/fr/view/**") + exclude(name:"com/fr/web/**") + exclude(name:"com/fr/fs/**") + exclude(name:"com/fr/design/**") + exclude(name:"com/fr/start/**") + exclude(name:"com/fr/process/**") + } + fileset(dir:"${libDir}/tmp-${branchName}"){ + include(name:"javax/mail/**") + include(name:"javax/servlet/**") + include(name:"org/freehep/**") + include(name:"com/fr/third/JAI/**") + include(name:"com/fr/third/antlr/**") + include(name:"com/fr/third/javax/**") + include(name:"com/sun/xml/**") + include(name:"javax/xml/**") + + } + fileset(dir:"build/classes"){ + include(name:"com/fr/web/*.class") + include(name:"com/fr/web/attr/*.class") + } + } + delete(dir:"${libDir}/tmp-${branchName}") + def jdk6home= "D:/FineReport/develop/java/jdk1.6u35" + def keystore="frapplet.store" + def keycert="fr.cert" + def keypassword="123456" + def keyalias="fr" + + exec(executable:"${jdk6home}/bin/keytool"){ + arg(line:"-genkey -dname "CN=FineReport L=NanJing C=China" -keystore ${keystore} -alias ${keyalias} -validity 3650 -storepass ${keypassword}") + } + exec(executable:"${jdk6home}/bin/keytool"){ + arg(line:"-export -keystore ${keystore} -alias ${keyalias} -file ${keycert} -storepass ${keypassword}") + } + + exec(executable:"${jdk6home}/bin/jarsigner"){ + arg(line:"-keystore ${keystore} -storepass ${keypassword} 'build/libs/fr-applet-8.0.jar' ${keyalias}") + } + delete(file:"${keystore}") + delete(file:"${keycert}") + delete(dir:"build/classes") + + } + +} \ No newline at end of file diff --git a/build.release.gradle b/build.release.gradle index 44aacadb4d..1c00529e68 100644 --- a/build.release.gradle +++ b/build.release.gradle @@ -12,7 +12,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ("\\")+1) task appletJar<<{ ant{ - mkdir(dir:"${libDir}/tmp-${branchName}") + mkdir(dir:"./tmp") mkdir(dir:"build/classes/") copy(todir:"build/classes/"){ fileset(dir:"${basicDir}/finereport-core-stable/${branchName}/build/classes/main") @@ -26,8 +26,8 @@ task appletJar<<{ fileset(dir:"${basicDir}/finereport-performance-stable/${branchName}/build/classes/main") } - unjar(src:"${libDir}/3rd.jar",dest:"${libDir}/tmp-${branchName}") - unjar(src:"${libDir}/servlet-api.jar",dest:"${libDir}/tmp-${branchName}") + unjar(src:"${libDir}/3rd.jar",dest:"./tmp") + unjar(src:"${libDir}/servlet-api.jar",dest:"./tmp") jar(jarfile:"build/libs/fr-applet-8.0.jar"){ fileset(dir:"build/classes"){ exclude(name:"*.*") @@ -43,7 +43,7 @@ task appletJar<<{ exclude(name:"com/fr/start/**") exclude(name:"com/fr/process/**") } - fileset(dir:"${libDir}/tmp-${branchName}"){ + fileset(dir:"./tmp"){ include(name:"javax/mail/**") include(name:"javax/servlet/**") include(name:"org/freehep/**") @@ -59,7 +59,7 @@ task appletJar<<{ include(name:"com/fr/web/attr/*.class") } } - delete(dir:"${libDir}/tmp-${branchName}") + delete(dir:"./tmp") def jdk6home= "D:/FineReport/develop/java/jdk1.6u35" def keystore="frapplet.store" def keycert="fr.cert" diff --git a/build.release.gradle.bak b/build.release.gradle.bak new file mode 100644 index 0000000000..44aacadb4d --- /dev/null +++ b/build.release.gradle.bak @@ -0,0 +1,85 @@ +apply plugin: "java" +tasks.withType(JavaCompile){ + options.encoding = "UTF-8" +} +def basicDir="../../" +def libDir="${basicDir}/finereport-lib-stable/master" +//获取什么分支名 +FileTree files =fileTree(dir:"./",include:"build.*.gradle") +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ("\\")) +def branchName=buildDir.substring(buildDir.lastIndexOf ("\\")+1) + +task appletJar<<{ + + ant{ + mkdir(dir:"${libDir}/tmp-${branchName}") + mkdir(dir:"build/classes/") + copy(todir:"build/classes/"){ + fileset(dir:"${basicDir}/finereport-core-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-chart-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-report-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-platform-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-performance-stable/${branchName}/build/classes/main") + + } + unjar(src:"${libDir}/3rd.jar",dest:"${libDir}/tmp-${branchName}") + unjar(src:"${libDir}/servlet-api.jar",dest:"${libDir}/tmp-${branchName}") + jar(jarfile:"build/libs/fr-applet-8.0.jar"){ + fileset(dir:"build/classes"){ + exclude(name:"*.*") + exclude(name:"bin/*.*") + exclude(name:"classes/**") + exclude(name:"com/fr/schedule/**") + exclude(name:"com/fr/cell/**") + exclude(name:"com/fr/dialog/**") + exclude(name:"com/fr/view/**") + exclude(name:"com/fr/web/**") + exclude(name:"com/fr/fs/**") + exclude(name:"com/fr/design/**") + exclude(name:"com/fr/start/**") + exclude(name:"com/fr/process/**") + } + fileset(dir:"${libDir}/tmp-${branchName}"){ + include(name:"javax/mail/**") + include(name:"javax/servlet/**") + include(name:"org/freehep/**") + include(name:"com/fr/third/JAI/**") + include(name:"com/fr/third/antlr/**") + include(name:"com/fr/third/javax/**") + include(name:"com/sun/xml/**") + include(name:"javax/xml/**") + + } + fileset(dir:"build/classes"){ + include(name:"com/fr/web/*.class") + include(name:"com/fr/web/attr/*.class") + } + } + delete(dir:"${libDir}/tmp-${branchName}") + def jdk6home= "D:/FineReport/develop/java/jdk1.6u35" + def keystore="frapplet.store" + def keycert="fr.cert" + def keypassword="123456" + def keyalias="fr" + + exec(executable:"${jdk6home}/bin/keytool"){ + arg(line:"-genkey -dname "CN=FineReport L=NanJing C=China" -keystore ${keystore} -alias ${keyalias} -validity 3650 -storepass ${keypassword}") + } + exec(executable:"${jdk6home}/bin/keytool"){ + arg(line:"-export -keystore ${keystore} -alias ${keyalias} -file ${keycert} -storepass ${keypassword}") + } + + exec(executable:"${jdk6home}/bin/jarsigner"){ + arg(line:"-keystore ${keystore} -storepass ${keypassword} 'build/libs/fr-applet-8.0.jar' ${keyalias}") + } + delete(file:"${keystore}") + delete(file:"${keycert}") + delete(dir:"build/classes") + + } + +} \ No newline at end of file From 2686f1f4661893c3ce75f8243d25e2aa22d4f7e9 Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 25 Nov 2016 10:26:59 +0800 Subject: [PATCH 3/4] =?UTF-8?q?REPORT-881=20=E8=BF=9C=E7=A8=8B=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=EF=BC=8C=E9=9D=9E=E7=AE=A1=E7=90=86=E5=91=98=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=EF=BC=8C=E4=B8=8D=E5=BA=94=E8=AF=A5=E7=9C=8B=E5=88=B0?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E6=A0=8F=E7=9A=84=E2=80=9C=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E2=80=9D=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/toolbar/ToolBarMenuDock.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java index 8df23d70d9..3e862cf288 100644 --- a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java +++ b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java @@ -133,7 +133,9 @@ public abstract class ToolBarMenuDock { menuList.addAll(Arrays.asList(menuDefs)); // 添加服务器菜单 - menuList.add(createServerMenuDef(plus)); + if (FRContext.getCurrentEnv() != null && FRContext.getCurrentEnv().isRoot()) { + menuList.add(createServerMenuDef(plus)); + } // 添加帮助菜单 menuList.add(createHelpMenuDef()); @@ -245,11 +247,6 @@ public abstract class ToolBarMenuDock { protected MenuDef createServerMenuDef(ToolBarMenuDockPlus plus) { MenuDef menuDef = new MenuDef(Inter.getLocText("FR-Designer_M-Server"), 'S'); - if (FRContext.getCurrentEnv() == null || !FRContext.getCurrentEnv().isRoot()) { - menuDef.addShortCut(new ConnectionListAction()); - return menuDef; - } - if (!BaseUtils.isAuthorityEditing()) { menuDef.addShortCut( new ConnectionListAction(), From 87718bd2263227d2b192189e147e54ea867ce7aa Mon Sep 17 00:00:00 2001 From: zack Date: Fri, 25 Nov 2016 10:40:02 +0800 Subject: [PATCH 4/4] =?UTF-8?q?REPORT-841=20=E9=AA=8C=E6=94=B6=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/mainframe/FormCreatorDropTarget.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/FormCreatorDropTarget.java b/designer_form/src/com/fr/design/mainframe/FormCreatorDropTarget.java index 18ad2ab71c..6390b64f89 100644 --- a/designer_form/src/com/fr/design/mainframe/FormCreatorDropTarget.java +++ b/designer_form/src/com/fr/design/mainframe/FormCreatorDropTarget.java @@ -15,6 +15,7 @@ import com.fr.design.icon.IconPathConstants; import com.fr.design.utils.ComponentUtils; import com.fr.form.share.ShareLoader; import com.fr.form.ui.ElCaseBindInfo; +import com.fr.form.ui.ElementCaseEditor; import com.fr.form.ui.SharableElementCaseEditor; import com.fr.form.ui.Widget; import com.fr.general.Inter; @@ -79,6 +80,7 @@ public class FormCreatorDropTarget extends DropTarget { //SetSelection时要确保选中的是最顶层的布局 //tab布局添加的时候是初始化了XWCardLayout,实际上最顶层的布局是XWCardMainBorderLayout XCreator addingXCreator = addingModel.getXCreator(); + Widget widget = (addingXCreator.getTopLayout() != null) ? (addingXCreator.getTopLayout().toData()) : addingXCreator.toData(); if (addingXCreator.isShared()) { String shareId = addingXCreator.getShareId(); SharableElementCaseEditor sharableEditor = ShareLoader.getLoader().getSharedElCaseEditorById(shareId); @@ -86,10 +88,11 @@ public class FormCreatorDropTarget extends DropTarget { if (sharableEditor != null && bindInfo != null) { Map tdNameMap = TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()).addTableData(bindInfo.getName(), sharableEditor.getTableDataSource()); //合并数据集之后,可能会有数据集名称变化,做一下联动 - sharableEditor.batchRenameTdName(tdNameMap); + //共享的组件拿的时候都是克隆的,这边改拖拽中克隆的对象而非新克隆对象,上面这个新克隆的对象只是为了拿数据集 + ElementCaseEditor elementCaseEditor = (ElementCaseEditor) widget; + elementCaseEditor.batchRenameTdName(tdNameMap); } } - Widget widget = (addingXCreator.getTopLayout() != null) ? (addingXCreator.getTopLayout().toData()) : addingXCreator.toData(); designer.getSelectionModel().setSelectedCreators( FormSelectionUtils.rebuildSelection(xCreator, new Widget[]{widget})); designer.getEditListenerTable().fireCreatorModified(addingModel.getXCreator(), DesignerEvent.CREATOR_ADDED);