From 64060650ed594601a08dcb29d0ec077adb6724ac Mon Sep 17 00:00:00 2001 From: Dailer Date: Mon, 26 Nov 2018 21:28:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0demo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin.xml | 6 +- pom.xml | 2 +- .../{BaiduOption.java => FanruanOption.java} | 10 ++-- ...duComponent.java => FanruanComponent.java} | 6 +- .../com/fr/plugin/web/resources/js/bundle.js | 60 +++++++++---------- 5 files changed, 40 insertions(+), 44 deletions(-) rename src/main/java/com/fr/plugin/{BaiduOption.java => FanruanOption.java} (75%) rename src/main/java/com/fr/plugin/web/{BaiduComponent.java => FanruanComponent.java} (74%) diff --git a/plugin.xml b/plugin.xml index 5fc0f58..6199f53 100755 --- a/plugin.xml +++ b/plugin.xml @@ -1,5 +1,5 @@ - com.fr.plugin.decision.baidu + com.fr.plugin.decision.fanruan yes 2.0 @@ -14,7 +14,7 @@ ]]> - + - + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 08d8ce4..6b7dd1e 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ demo-system-management - ${project.basedir}/../webroot/WEB-INF/plugins/plugin-com.fr.plugin.decision.baidu-1.0/classes + ${project.basedir}/../webroot/WEB-INF/plugins/plugin-com.fr.plugin.decision.fanruan-1.0/classes org.apache.maven.plugins diff --git a/src/main/java/com/fr/plugin/BaiduOption.java b/src/main/java/com/fr/plugin/FanruanOption.java similarity index 75% rename from src/main/java/com/fr/plugin/BaiduOption.java rename to src/main/java/com/fr/plugin/FanruanOption.java index 00aa2f1..3dec9dd 100644 --- a/src/main/java/com/fr/plugin/BaiduOption.java +++ b/src/main/java/com/fr/plugin/FanruanOption.java @@ -5,24 +5,24 @@ import com.fr.decision.fun.impl.AbstractSystemOptionProvider; import com.fr.decision.web.MainComponent; import com.fr.plugin.transform.ExecuteFunctionRecord; import com.fr.plugin.transform.FunctionRecorder; -import com.fr.plugin.web.BaiduComponent; +import com.fr.plugin.web.FanruanComponent; import com.fr.stable.fun.mark.API; import com.fr.web.struct.Atom; @FunctionRecorder @API(level = SystemOptionProvider.CURRENT_LEVEL) -public class BaiduOption extends AbstractSystemOptionProvider { +public class FanruanOption extends AbstractSystemOptionProvider { @Override @ExecuteFunctionRecord public String id() { - return "baidu"; + return "decision-management-fanruan-help"; } @Override public String displayName() { - return "Dec_System_Option_baidu"; + return "Dec_System_Option_Fanruan_Help"; } @Override @@ -37,6 +37,6 @@ public class BaiduOption extends AbstractSystemOptionProvider { @Override public Atom client() { - return BaiduComponent.KEY; + return FanruanComponent.KEY; } } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/web/BaiduComponent.java b/src/main/java/com/fr/plugin/web/FanruanComponent.java similarity index 74% rename from src/main/java/com/fr/plugin/web/BaiduComponent.java rename to src/main/java/com/fr/plugin/web/FanruanComponent.java index 0c537e8..525b901 100644 --- a/src/main/java/com/fr/plugin/web/BaiduComponent.java +++ b/src/main/java/com/fr/plugin/web/FanruanComponent.java @@ -5,11 +5,11 @@ import com.fr.web.struct.category.ScriptPath; import com.fr.web.struct.category.StylePath; -public class BaiduComponent extends Component { +public class FanruanComponent extends Component { - public static BaiduComponent KEY = new BaiduComponent(); + public static FanruanComponent KEY = new FanruanComponent(); - private BaiduComponent(){ + private FanruanComponent(){ } diff --git a/src/main/resources/com/fr/plugin/web/resources/js/bundle.js b/src/main/resources/com/fr/plugin/web/resources/js/bundle.js index 8efe35b..956019c 100644 --- a/src/main/resources/com/fr/plugin/web/resources/js/bundle.js +++ b/src/main/resources/com/fr/plugin/web/resources/js/bundle.js @@ -1,59 +1,55 @@ !(function () { - BI.module("my.management", { - version: 1.0, - components: [], - constants: ["dec.constant.menu.items", "dec.constant.nav.items"], - services: [], - models: [] - }) - - - // 示例,向menus中加入百度搜索按钮. + // 示例,向menus中加入帆软官网. BI.config("dec.constant.menu.items", function (items) { items.push({ - value: "baidu", - text: BI.i18nText("百度一下"), + value: "fanruan", + text: BI.i18nText("帆软"), cardType: { - src: "http://baidu.com" + src: "http://www.fanruan.com/" }, - cls: "analysis-menu-font" + cls: "fr-logo-font" }); return items; }); - // 示例,向管理系统节点加入百度搜索节点 - BI.config("dec.constant.nav.items", function (items) { + // 示例,向管理系统节点加入帆软帮助文档 + BI.config("dec.constant.management.navigation", function (items) { items.push({ - value: "baidu", // 地址栏显示的hash值 - id: "decision-management-baidu", // id - text: BI.i18nText("百度一下"), // 文字 - cardType: "dec.management.baidu", // 组件的shortcut,适用于用fineui开发的页面. - cls: "management-directory-font" // 图标类名 + value: "frhelp", // 地址栏显示的hash值 + id: "decision-management-fanruan-help", // id + text: BI.i18nText("帮助文档"), // 文字 + cardType: "dec.management.fanruan_help", // 组件的shortcut,适用于用fineui开发的页面. + cls: "fr-logo-font" // 图标类名 }); return items; }); // 组件实现 - var Baidu = BI.inherit(BI.Widget, { + var Fanruan = BI.inherit(BI.Widget, { props: { - baseCls: "dec-management-baidu" + baseCls: "dec-management-fanruan" }, render: function () { return { - el: { - type: "bi.iframe", - src: "http://www.baidu.com" - }, - top: 0, - left: 0, - right: 0, - bottom: 0 + type: "bi.absolute", + items: [ + { + el: { + type: "bi.iframe", + src: "http://help.finereport.com/" + }, + top: 0, + left: 0, + right: 0, + bottom: 0 + } + ] }; } }); - BI.shortcut("dec.management.baidu", Baidu); + BI.shortcut("dec.management.fanruan_help", Fanruan); }()); \ No newline at end of file