From 565f86d4c3dc0e6400384c7b29f467aa363665e9 Mon Sep 17 00:00:00 2001 From: Dailer Date: Sun, 18 Nov 2018 20:10:53 +0800 Subject: [PATCH] update --- .../decision/theme/original/web/js/config.js | 69 --------------- .../theme/original/OriginalComponent.java | 2 +- .../theme/original/OriginalTheme.java | 8 +- .../fr/plugin/theme/original/web/js/config.js | 53 ++++++++++++ .../theme/original/web/js/modules.js | 0 .../theme/original/web/js/modules.model.js | 0 .../theme/original/web/style.css | 0 .../theme/original/web/theme.js | 85 +++++++++---------- 8 files changed, 95 insertions(+), 122 deletions(-) delete mode 100644 src/com/fr/plugin/decision/theme/original/web/js/config.js rename src/com/fr/plugin/{decision => }/theme/original/OriginalComponent.java (95%) rename src/com/fr/plugin/{decision => }/theme/original/OriginalTheme.java (74%) create mode 100644 src/com/fr/plugin/theme/original/web/js/config.js rename src/com/fr/plugin/{decision => }/theme/original/web/js/modules.js (100%) rename src/com/fr/plugin/{decision => }/theme/original/web/js/modules.model.js (100%) rename src/com/fr/plugin/{decision => }/theme/original/web/style.css (100%) rename src/com/fr/plugin/{decision => }/theme/original/web/theme.js (84%) diff --git a/src/com/fr/plugin/decision/theme/original/web/js/config.js b/src/com/fr/plugin/decision/theme/original/web/js/config.js deleted file mode 100644 index 5a5bd41..0000000 --- a/src/com/fr/plugin/decision/theme/original/web/js/config.js +++ /dev/null @@ -1,69 +0,0 @@ -!(function () { - - BI.module("my.theme", { - version: 1.0, - components: ["dec.menu"], - constants: ["dec.constant.config"], - services: ["dec.service.tabs"], - models: [""] - }); - - - BI.config("dec.constant.config", function (config) { - config.theme.config4Frame.west.width = 240; - config.theme.config4EntryPane.pinable = false; - return config; - }); - - - Dec.injection.injectLayoutStrategy({ - layout: function (config, header, footer, menu, body) { - return { - type: "bi.absolute", - items: [ - { - el: { - type: "bi.absolute", - items: [ - { - el: body, - top: 0, bottom: 0, right: 0, - left: config.west.invisible ? 0 : config.west.width - }, { - el: menu, - top: 0, bottom: 0, - left: 0 - } - ] - }, - top: 40, left: 0, right: 0, bottom: 0 - }, { - el: header, - height: 40, - top: 0, left: 0, right: 0 - } - ] - }; - } - }); - - Dec.injection.injectMenu({ - widget: function (config) { - return { - type: "dec.workbench.panel", - width: 240 - }; - } - }); - Dec.injection.injectBody({ - widget: function () { - return { - type: "dec.workbench.tabs" - }; - } - }); - - BI.config("dec.workbench.directory", function (ob) { - return BI.extend(ob, {type: "dec.theme.modules"}); - }); -}()); diff --git a/src/com/fr/plugin/decision/theme/original/OriginalComponent.java b/src/com/fr/plugin/theme/original/OriginalComponent.java similarity index 95% rename from src/com/fr/plugin/decision/theme/original/OriginalComponent.java rename to src/com/fr/plugin/theme/original/OriginalComponent.java index 2dd7c45..8c76593 100644 --- a/src/com/fr/plugin/decision/theme/original/OriginalComponent.java +++ b/src/com/fr/plugin/theme/original/OriginalComponent.java @@ -1,4 +1,4 @@ -package com.fr.plugin.decision.theme.original; +package com.fr.plugin.theme.original; import com.fr.decision.config.AppearanceConfig; import com.fr.web.struct.Component; diff --git a/src/com/fr/plugin/decision/theme/original/OriginalTheme.java b/src/com/fr/plugin/theme/original/OriginalTheme.java similarity index 74% rename from src/com/fr/plugin/decision/theme/original/OriginalTheme.java rename to src/com/fr/plugin/theme/original/OriginalTheme.java index 1d791b1..6192a80 100644 --- a/src/com/fr/plugin/decision/theme/original/OriginalTheme.java +++ b/src/com/fr/plugin/theme/original/OriginalTheme.java @@ -1,15 +1,14 @@ -package com.fr.plugin.decision.theme.original; +package com.fr.plugin.theme.original; import com.fr.decision.fun.impl.AbstractThemeVariousProvider; import com.fr.decision.web.MainComponent; -import com.fr.plugin.transform.ExecuteFunctionRecord; -import com.fr.plugin.transform.FunctionRecorder; +import com.fr.record.analyzer.EnableMetrics; import com.fr.web.struct.Atom; /** * Created by dailer on 18/10/10. */ -@FunctionRecorder(localeKey = "OriginalTheme") +@EnableMetrics public class OriginalTheme extends AbstractThemeVariousProvider { @@ -24,7 +23,6 @@ public class OriginalTheme extends AbstractThemeVariousProvider { } @Override - @ExecuteFunctionRecord public String name() { return "OriginalTheme"; } diff --git a/src/com/fr/plugin/theme/original/web/js/config.js b/src/com/fr/plugin/theme/original/web/js/config.js new file mode 100644 index 0000000..1265313 --- /dev/null +++ b/src/com/fr/plugin/theme/original/web/js/config.js @@ -0,0 +1,53 @@ +!(function () { + + + + BI.config("dec.constant.config", function (config) { + config.theme.config4Frame.west.width = 240; + config.theme.config4EntryPane.pinable = false; + return config; + }); + + + BI.config("dec.provider.layout", function (provider) { + provider.setConfig({ + type: "bi.absolute", + items: [ + { + el: { + type: "bi.absolute", + items: [ + { + el: { + type: "dec.workbench.tabs" + }, + top: 0, bottom: 0, right: 0, + left: 240 + }, { + el: { + type: "dec.workbench.panel", + width: 240 + }, + top: 0, bottom: 0, + left: 0 + } + ] + }, + top: 40, left: 0, right: 0, bottom: 0 + }, { + el: { + type: "dec.header" + }, + height: 40, + top: 0, left: 0, right: 0 + } + ] + }); + return provider; + }); + + BI.config("dec.workbench.directory", function (config) { + config.type = "my.theme.directory"; + return config; + }); +}()); diff --git a/src/com/fr/plugin/decision/theme/original/web/js/modules.js b/src/com/fr/plugin/theme/original/web/js/modules.js similarity index 100% rename from src/com/fr/plugin/decision/theme/original/web/js/modules.js rename to src/com/fr/plugin/theme/original/web/js/modules.js diff --git a/src/com/fr/plugin/decision/theme/original/web/js/modules.model.js b/src/com/fr/plugin/theme/original/web/js/modules.model.js similarity index 100% rename from src/com/fr/plugin/decision/theme/original/web/js/modules.model.js rename to src/com/fr/plugin/theme/original/web/js/modules.model.js diff --git a/src/com/fr/plugin/decision/theme/original/web/style.css b/src/com/fr/plugin/theme/original/web/style.css similarity index 100% rename from src/com/fr/plugin/decision/theme/original/web/style.css rename to src/com/fr/plugin/theme/original/web/style.css diff --git a/src/com/fr/plugin/decision/theme/original/web/theme.js b/src/com/fr/plugin/theme/original/web/theme.js similarity index 84% rename from src/com/fr/plugin/decision/theme/original/web/theme.js rename to src/com/fr/plugin/theme/original/web/theme.js index b2afdf3..f18f3f8 100644 --- a/src/com/fr/plugin/decision/theme/original/web/theme.js +++ b/src/com/fr/plugin/theme/original/web/theme.js @@ -8,55 +8,46 @@ }); - Dec.injection.injectLayoutStrategy({ - layout: function (config, header, footer, menu, body) { - return { - type: "bi.absolute", - items: [ - { - el: { - type: "bi.absolute", - items: [ - { - el: body, - top: 0, bottom: 0, right: 0, - left: config.west.invisible ? 0 : config.west.width - }, { - el: menu, - top: 0, bottom: 0, - left: 0 - } - ] - }, - top: 40, left: 0, right: 0, bottom: 0 - }, { - el: header, - height: 40, - top: 0, left: 0, right: 0 - } - ] - }; - } - }); - - Dec.injection.injectMenu({ - widget: function (config) { - return { - type: "dec.workbench.panel", - width: 240 - }; - } - }); - Dec.injection.injectBody({ - widget: function () { - return { - type: "dec.workbench.tabs" - }; - } + BI.config("dec.provider.layout", function (provider) { + provider.setConfig({ + type: "bi.absolute", + items: [ + { + el: { + type: "bi.absolute", + items: [ + { + el: { + type: "dec.workbench.tabs" + }, + top: 0, bottom: 0, right: 0, + left: 240 + }, { + el: { + type: "dec.workbench.panel", + width: 240 + }, + top: 0, bottom: 0, + left: 0 + } + ] + }, + top: 40, left: 0, right: 0, bottom: 0 + }, { + el: { + type: "dec.header" + }, + height: 40, + top: 0, left: 0, right: 0 + } + ] + }); + return provider; }); - BI.Plugin.registerWidget("dec.workbench.directory", function (ob) { - return BI.extend(ob, {type: "dec.theme.modules"}); + BI.config("dec.workbench.directory", function (config) { + config.type = "my.theme.directory"; + return config; }); }()); !(function () {