commit 5c3a80b5bd201023c18742584f6c8481a985b351 Author: pioneer Date: Fri Mar 31 16:09:32 2023 +0800 open diff --git a/README.md b/README.md new file mode 100644 index 0000000..80cb2bd --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# open-JSD-10752 + +JSD-10752 主题UI定制\ +免责说明:该源码为第三方爱好者提供,不保证源码和方案的可靠性,也不提供任何形式的源码教学指导和协助!\ +仅作为开发者学习参考使用!禁止用于任何商业用途!\ +为保护开发者隐私,开发者信息已隐去!若原开发者希望公开自己的信息,可联系【pioneer】处理。 \ No newline at end of file diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..e321211 --- /dev/null +++ b/build.xml @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/finekit-10.0.jar b/lib/finekit-10.0.jar new file mode 100644 index 0000000..546f2f5 Binary files /dev/null and b/lib/finekit-10.0.jar differ diff --git a/plugin.xml b/plugin.xml new file mode 100644 index 0000000..54078ab --- /dev/null +++ b/plugin.xml @@ -0,0 +1,19 @@ + + com.fr.plugin.third.party.jsdbahfc + + yes + 1.0.2 + 10.0~11.0 + 2019-01-01 + fr.open + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..4d70a96 --- /dev/null +++ b/pom.xml @@ -0,0 +1,56 @@ + + + 4.0.0 + + com.fr.plugin + starter + 10.0 + + jar + plugin-jsd-10752 + + + com.fanruan.api + finekit + 10.0 + system + ${project.basedir}/lib/finekit-10.0.jar + + + + + + ${project.basedir}/../webroot/WEB-INF/plugins/plugin-com.fr.plugin.third.party.jsdbahfc-1.0 + + + + ${plugin-path}/classes + + + ${plugin-path} + ${project.basedir} + + plugin.xml + + + + ${plugin-path} + ${project.basedir}/lib + + *.jar + *.dll + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 8 + 8 + + + + + \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/third/party/jsdbahfc/PluginLifecycleMonitor.java b/src/main/java/com/fr/plugin/third/party/jsdbahfc/PluginLifecycleMonitor.java new file mode 100644 index 0000000..7a0c34f --- /dev/null +++ b/src/main/java/com/fr/plugin/third/party/jsdbahfc/PluginLifecycleMonitor.java @@ -0,0 +1,20 @@ +package com.fr.plugin.third.party.jsdbahfc; + +import com.fr.decision.webservice.bean.config.ThemeConfigBean; +import com.fr.plugin.context.PluginContext; +import com.fr.plugin.observer.inner.AbstractPluginLifecycleMonitor; + + +/** + * 配置信息初始化 + */ +public class PluginLifecycleMonitor extends AbstractPluginLifecycleMonitor { + @Override + public void afterRun(PluginContext pluginContext) { + ThemeConfigBean.THEME_ID_TEXT_MAP.put(ThemeConstants.PLUGIN_ID,ThemeConstants.PLUGIN_ID); + } + + @Override + public void beforeStop(PluginContext pluginContext) { + } +} diff --git a/src/main/java/com/fr/plugin/third/party/jsdbahfc/ThemeConstants.java b/src/main/java/com/fr/plugin/third/party/jsdbahfc/ThemeConstants.java new file mode 100644 index 0000000..b3f1700 --- /dev/null +++ b/src/main/java/com/fr/plugin/third/party/jsdbahfc/ThemeConstants.java @@ -0,0 +1,6 @@ +package com.fr.plugin.third.party.jsdbahfc; + + +public class ThemeConstants { + public static final String PLUGIN_ID = "com.fr.plugin.third.party.jsdbahfc"; +} diff --git a/src/main/java/com/fr/plugin/third/party/jsdbahfc/Utils.java b/src/main/java/com/fr/plugin/third/party/jsdbahfc/Utils.java new file mode 100644 index 0000000..6db8f3e --- /dev/null +++ b/src/main/java/com/fr/plugin/third/party/jsdbahfc/Utils.java @@ -0,0 +1,14 @@ +package com.fr.plugin.third.party.jsdbahfc; + +import com.fr.intelli.record.Focus; +import com.fr.intelli.record.Original; +import com.fr.record.analyzer.EnableMetrics; + +@EnableMetrics +public class Utils { + @Focus(id = ThemeConstants.PLUGIN_ID, text = "plugin-jsdbahfc", source = Original.PLUGIN) + public static void logFunction() { + //功能点记录 + } + +} diff --git a/src/main/java/com/fr/plugin/third/party/jsdbahfc/config/CustomDataConfig.java b/src/main/java/com/fr/plugin/third/party/jsdbahfc/config/CustomDataConfig.java new file mode 100644 index 0000000..578064f --- /dev/null +++ b/src/main/java/com/fr/plugin/third/party/jsdbahfc/config/CustomDataConfig.java @@ -0,0 +1,55 @@ +package com.fr.plugin.third.party.jsdbahfc.config; + +import com.fr.config.*; +import com.fr.config.holder.Conf; +import com.fr.config.holder.factory.Holders; + +/** + * 配置数据保存 + */ +@Visualization(category = "定制化主题") +public class CustomDataConfig extends DefaultConfiguration { + @Override + public String getNameSpace() { + return this.getClass().getName(); + } + + private static volatile CustomDataConfig config = null; + + public static CustomDataConfig getInstance() { + if (config == null) { + config = ConfigContext.getConfigInstance(CustomDataConfig.class); + } + return config; + } + + @Identifier(value = "showSystemMessage", name = "显示系统消息图标", description = "", status = Status.SHOW) + private Conf showSystemMessage = Holders.simple(true); + + @Identifier(value = "showFullScreen", name = "显示全屏图标", description = "", status = Status.SHOW) + private Conf showFullScreen = Holders.simple(true); + + public Boolean isShowSystemMessage() { + return showSystemMessage.get(); + } + + public void setShowSystemMessage(Boolean showSystemMessage) { + this.showSystemMessage.set(showSystemMessage); + } + + public Boolean isShowFullScreen() { + return showFullScreen.get(); + } + + public void setShowFullScreen(Boolean showFullScreen) { + this.showFullScreen.set(showFullScreen); + } + + @Override + public Object clone() throws CloneNotSupportedException { + CustomDataConfig cloned = (CustomDataConfig) super.clone(); + cloned.showSystemMessage = (Conf) showSystemMessage.clone(); + cloned.showFullScreen = (Conf) showFullScreen.clone(); + return cloned; + } +} diff --git a/src/main/java/com/fr/plugin/third/party/jsdbahfc/web/CustomisedThemeMain.java b/src/main/java/com/fr/plugin/third/party/jsdbahfc/web/CustomisedThemeMain.java new file mode 100644 index 0000000..6b4a4c6 --- /dev/null +++ b/src/main/java/com/fr/plugin/third/party/jsdbahfc/web/CustomisedThemeMain.java @@ -0,0 +1,42 @@ +package com.fr.plugin.third.party.jsdbahfc.web; + +import com.fr.decision.fun.impl.AbstractThemeVariousProvider; +import com.fr.decision.web.MainComponent; +import com.fr.plugin.third.party.jsdbahfc.ThemeConstants; +import com.fr.plugin.third.party.jsdbahfc.Utils; +import com.fr.stable.fun.Authorize; +import com.fr.web.struct.Atom; + +/** + * 决策平台页面 + */ +@Authorize(callSignKey = ThemeConstants.PLUGIN_ID) +public class CustomisedThemeMain extends AbstractThemeVariousProvider { + @Override + public Atom attach() { + //在平台主组件加载时添加我们自己的组件 + return MainComponent.KEY; + } + + @Override + public Atom client() { + //我们自己要引入的组件 + Utils.logFunction(); + return MainFilesComponent.KEY; + } + + @Override + public String name() { + return "定制化主题"; + } + + @Override + public String text() { + return "定制化主题"; + } + + @Override + public String coverPath() { + return "com/fr/plugin/third/party/jsdbahfc/image/theme-logo.png"; + } +} diff --git a/src/main/java/com/fr/plugin/third/party/jsdbahfc/web/MainFilesComponent.java b/src/main/java/com/fr/plugin/third/party/jsdbahfc/web/MainFilesComponent.java new file mode 100644 index 0000000..301c5bc --- /dev/null +++ b/src/main/java/com/fr/plugin/third/party/jsdbahfc/web/MainFilesComponent.java @@ -0,0 +1,57 @@ +package com.fr.plugin.third.party.jsdbahfc.web; + +import com.fr.decision.config.AppearanceConfig; +import com.fr.plugin.context.PluginContexts; +import com.fr.plugin.third.party.jsdbahfc.ThemeConstants; +import com.fr.plugin.third.party.jsdbahfc.Utils; +import com.fr.web.struct.Component; +import com.fr.web.struct.Filter; +import com.fr.web.struct.browser.RequestClient; +import com.fr.web.struct.category.ParserType; +import com.fr.web.struct.category.ScriptPath; +import com.fr.web.struct.category.StylePath; + +public class MainFilesComponent extends Component { + public static final MainFilesComponent KEY = new MainFilesComponent(); + private MainFilesComponent(){} + /** + * 返回需要引入的JS脚本路径 + * @param client 请求客户端描述 + * @return JS脚本路径 + */ + @Override + public ScriptPath script(RequestClient client ) { + //如果不需要就直接返回 ScriptPath.EMPTY + return ScriptPath.build("com/fr/plugin/third/party/jsdbahfc/web/main.js"); + } + + /** + * 返回需要引入的CSS样式路径 + * @param client 请求客户端描述 + * @return CSS样式路径 + */ + @Override + public StylePath style(RequestClient client ) { + //如果不需要就直接返回 StylePath.EMPTY; + return StylePath.build("com/fr/plugin/third/party/jsdbahfc/web/main.css", ParserType.DYNAMIC); + } + + /** + * 通过给定的资源过滤器控制是否加载这个资源 + * @return 资源过滤器 + */ + @Override + public Filter filter() { + return new Filter(){ + @Override + public boolean accept() { + Utils.logFunction(); + if (!PluginContexts.currentContext().isAvailable()) { + return false; + } + String loginPageId = AppearanceConfig.getInstance().getThemeId(); + return ThemeConstants.PLUGIN_ID.equals(loginPageId); + } + }; + } +} \ No newline at end of file diff --git a/src/main/resources/com/fr/plugin/third/party/jsdbahfc/image/decison-logo.png b/src/main/resources/com/fr/plugin/third/party/jsdbahfc/image/decison-logo.png new file mode 100644 index 0000000..66b75ac Binary files /dev/null and b/src/main/resources/com/fr/plugin/third/party/jsdbahfc/image/decison-logo.png differ diff --git a/src/main/resources/com/fr/plugin/third/party/jsdbahfc/image/theme-logo.png b/src/main/resources/com/fr/plugin/third/party/jsdbahfc/image/theme-logo.png new file mode 100644 index 0000000..29fa270 Binary files /dev/null and b/src/main/resources/com/fr/plugin/third/party/jsdbahfc/image/theme-logo.png differ diff --git a/src/main/resources/com/fr/plugin/third/party/jsdbahfc/web/main.css b/src/main/resources/com/fr/plugin/third/party/jsdbahfc/web/main.css new file mode 100644 index 0000000..68cdd1f --- /dev/null +++ b/src/main/resources/com/fr/plugin/third/party/jsdbahfc/web/main.css @@ -0,0 +1,141 @@ +.dec-platform-img-jsdbahfc { + left: 16px; + background: url(${fineServletURL}/resources?path=/com/fr/plugin/third/party/jsdbahfc/image/decison-logo.png) center center no-repeat !important; + background-size: 100% 100% !important; + image-rendering: -moz-crisp-edges; /* Firefox */ + image-rendering: -o-crisp-edges; /* Opera */ + image-rendering: -webkit-optimize-contrast; /*Webkit (non-standard naming) */ + image-rendering: crisp-edges; + -ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */ +} + + +.dec-frame-menu .dec-frame-menu-item.active { + color: #D8D8D8 !important; +} + +.dec-frame-menu .dec-frame-menu-item { + color: #7D849C !important; +} + +.dec-frame-menu { + background-color: #131A33 !important; +} + + +.dec-frame-classic-nav-item.active { + color: #D8D8D8 !important; + background: linear-gradient(90deg, #67A2FB 0%, #757EF1 100%) !important; + border-radius: 15px !important; +} + +.dec-frame-classic-nav-item { + color: #7A84A2 !important; +} + +.dec-frame-popover { + background-color: #272D45 !important; +} + + +.dec-frame-platform-list-item-active.active { + color: #FFFFFF !important; + background: linear-gradient(90deg, #4B8AE9 0%, #4D45CA 100%) !important; +} + +.dec-frame-platform-list-item-active.active .dec-frame-text { + color: #FFFFFF !important; +} + +.dec-frame-platform-list-item { + color: #C9D4F5 !important; +} + +.dec-frame-popover .dec-frame-text { + color: #C9D4F5 !important; +} + +.dec-frame-platform-list-item-active { + color: #C9D4F5 !important; +} + + +.dec-frame-header { + background-color: #D8DFEC !important; +} + +.dec-frame-header .dec-frame-header-account .dec-frame-text { + color: #405BB7 !important; +} + +.dec-frame-header .dec-frame-header-account .dec-frame-icon { + color: #405BB7 !important; +} + + +.dec-workbench-tabs-bubble-combo > .bi-text { + color: #576084 !important; + text-align: center !important; +} + +.dec-frame-tab-pane .dec-frame-tab-pane-tabs-container { + background-color: #e8edf6 !important; +} + +.dec-frame-tab-pane .dec-frame-tab-pane-tabs-normal-item { + background-color: #e8edf6 !important; + color: #576084 !important; + border-left-width: 1px !important; + border-left-color: #B4BDDC !important; + +} + +.dec-frame-tab-pane .dec-frame-tab-pane-tabs-normal-item.active { + color: #313959 !important; + font-weight: 600 !important; +} + +.dec-workbench-tabs-bubble-combo > .bi-text.active { + color: #313959 !important; + font-weight: 600 !important; + text-decoration: underline !important; + text-decoration-line: underline !important; + text-decoration-thickness: auto !important; + text-decoration-style: solid !important; + text-decoration-color: #313959 !important; +} + +.dec-frame-tab-pane-tabs-homepage-item { + display: none; +} + +.dec-tabs-down-list-combo.dec-frame-tab-pane-tabs-down-list { + width: 60px !important; +} + +.dec-frame-header-message.dec-header-message { + /*display: none;*/ + left: 12px; +} + +.menu-others-jsdbahfc-theme { + position: absolute !important; + bottom: 20px; +} + +.tab_divider_jsdbahfc_theme { + position: absolute; + top: 7px; + width: 1px; + height: 16px; + background-color: #B4BDDC; + border-radius: 0.5px; +} + +.dec-workbench-tabs-button-wrapper.bi-border-left { + border-left: unset !important; +} + +.dec-workbench-tabs-button-wrapper.bi-border-right { + border-right: unset !important; +} diff --git a/src/main/resources/com/fr/plugin/third/party/jsdbahfc/web/main.js b/src/main/resources/com/fr/plugin/third/party/jsdbahfc/web/main.js new file mode 100644 index 0000000..1acee41 --- /dev/null +++ b/src/main/resources/com/fr/plugin/third/party/jsdbahfc/web/main.js @@ -0,0 +1,870 @@ +/* +"entryType": 201,BI模板 +"entryType": 102,模板 +"entryType": 101,上报标签 +"entryType": 5,链接 +"entryType": 3,目录 +*/ + +Dec.Utils = Dec.Utils || {}; +Dec.Utils.jsdbagdbTheme = Dec.Utils.jsdbagdbTheme || {}; + +Dec.Utils.jsdbagdbTheme.globleCurrentMenuId = "0"; + +!(function () { + var e = BI.inherit(BI.Widget, { + props: { + baseCls: "bi-card dec-frame-header", + $testId: "dec-frame-header", + height: 40 + }, + _store: function () { + return BI.Models.getModel("dec.model.frame.header") + }, + watch: { + platformTitle: function (e) { + this.title.setText(e) + }, + headerType: function () { + this.logoContainer.populate(this._assertLogo()), + this._resizeWrapper() + }, + headerLogoAttachUrl: function (e) { + this.logoImg.setSrc(e) + } + }, + render: function () { + var t = this + , e = BI.Constants.getConstant("dec.constant.header.items"); + return { + type: "bi.absolute", + ref: function (e) { + t.headWrapper = e + }, + items: [{ + el: { + type: "bi.button_group", + items: this._assertLogo(), + layouts: [{ + type: "bi.vertical_adapt" + }], + ref: function (e) { + t.logoContainer = e + } + }, + top: 0, + bottom: 0, + left: 0 + }, { + el: { + type: "bi.right_vertical_adapt", + items: BI.createItems(e, {}, { + rgap: 15 + }) + }, + top: 0, + bottom: 0, + right: 0 + }] + } + }, + created: function () { + BI.Services.getService("dec.service.main").registerGlobalComponent("Header", this) + }, + _assertLogo: function () { + var t = this + , e = BI.Providers.getProvider("dec.provider.frame.header").getLogoConfig() + , e = this.model.headerType === DecCst.PlatformStyle.HeaderType.INTEGRATED ? { + el: { + type: "bi.label", + cls: "dec-platform-img-jsdbahfc", + height: 34, + width: 110, + + }, + /*el: { + type: "bi.img", + $testId: "dec-header-logo", + src: this.model.headerLogoAttachUrl, + height: e.imgHeight, + width: "auto", + ref: function(e) { + t.logoImg = e + } + },*/ + hgap: 25 + } : BI.extend({ + type: "dec.logo.img.button", + cls: "dec-pane dec-frame-panel", + ref: function (e) { + t.logoImg = e + }, + src: this.model.headerLogoAttachUrl, + width: 70, + height: 40 + }, e); + return [e /*, { + type: "bi.label", + $testId: "dec-header-platform-title", + ref: function(e) { + t.title = e + }, + textAlign: "left", + height: 40, + lgap: this.model.headerType === DecCst.PlatformStyle.HeaderType.INTEGRATED ? 0 : 15, + cls: "dec-banner dec-frame-text", + text: this.model.platformTitle + }*/ + ] + }, + _resizeWrapper: function () { + this.headWrapper.attr("items")[1].left = 1 === this.model.headerType ? 70 : 50, + this.headWrapper.resize() + } + }); + BI.shortcut("dec.header_jsdbahfc_theme", e); +})(); +!(function () { + var e = BI.inherit(BI.Widget, { + props: { + baseCls: "dec-frame-classic dec-frame-popover", + $testId: "dec-frame-classic" + }, + _store: function () { + return BI.Models.getModel("dec.model.frame.classic") + }, + watch: { + isPin: function (e) { + this.resizer.setResizeable(e) + } + }, + created: function () { + BI.Providers.getProvider("dec.provider.frame.classic").registerEntryPaneInstance(this) + }, + mounted: function () { + this.store.initHomepage() + }, + render: function () { + var i = this + , e = BI.get(BI.Providers.getProvider("dec.provider.layout").getLayoutConfig(), "config4Frame.center"); + return { + type: "dec.common.drag_resize", + $value: "frame-classic", + ref: function (e) { + i.resizer = e + }, + resizeable: this.model.isPin, + open: this.model.isPin, + leftWidth: e.left.width || 240, + maxSize: e.left.maxSize, + minSize: e.left.minSize, + content: BI.Providers.getProvider("dec.provider.tab_pane").getTabPaneComponent({ + ref: function (e) { + i.container = e + }, + listeners: [{ + eventName: "EVENT_SHOW", + action: function (e) { + i.store.handleTabChange(e) + } + }, { + eventName: "EVENT_CLOSE", + action: function (e, t) { + i.store.handleTabClose(e, t) + } + }] + }), + popup: { + type: "dec.frame.classic.aside", + pinedPane: this.model.isPin, + cls: this.model.isPin ? "pined" : "un-pined" + }, + listeners: [{ + eventName: BI.Controller.EVENT_CHANGE, + action: function (e) { + e === BI.Events.COLLAPSE && BI.Providers.getProvider("dec.provider.tab_pane").fireEvent("EVENT_COLLAPSE", arguments) + } + }, { + eventName: "EVENT_RESIZE", + action: function (e) { + BI.Cache.setItem(DecCst.Web.Cache.DIRECTORY_WIDTH, e) + } + }] + } + }, + keepalive: function () { + return !0 + } + }); + BI.shortcut("dec.frame.classic_jsdbahfc_theme", e); +})(); +!(function () { + var e = BI.inherit(BI.Widget, { + props: { + baseCls: "dec-tabs-down-list-combo dec-frame-tab-pane-tabs-down-list", + $testId: "dec-frame-tab-pane-tabs-down-list", + items: [], + adjustLength: 0, + direction: "bottom", + trigger: "click", + container: null, + stopPropagation: !1, + el: {} + }, + render: function () { + var t = this; + return { + type: "bi.center_adapt", + items: [{ + type: "bi.combo", + ref: function (e) { + t.downlistcombo = e + }, + trigger: "", + destroyWhenHide: !0, + direction: "bottom,left", + adjustXOffset: 8, + adjustYOffset: -2, + stopPropagation: this.options.stopPropagation, + el: { + type: "bi.horizontal", + verticalAlign: "middle", + height: 30, + width: 60, + items: [{ + type: "bi.icon_button", + $value: "more-tabs", + cls: "delete-user-font dec-frame-icon", + width: 30, + height: 30, + handler: function () { + t.closeTab() + } + }, { + type: "bi.icon_button", + $value: "more-tabs", + cls: "home-font dec-frame-icon", + width: 30, + height: 30, + handler: function () { + t.showHomePage() + } + }] + }, + popup: { + el: { + type: "dec.frame.tab_pane.down_list_popup", + ref: function (e) { + t.popup = e + }, + listeners: [{ + eventName: "EVENT_CHANGE", + action: function () { + t.hideView() + } + }] + }, + cls: "dec-beautified-border", + maxHeight: 1e3, + minWidth: 120 + }, + listeners: [{ + eventName: BI.Combo.EVENT_AFTER_POPUPVIEW, + action: function () { + } + }, { + eventName: BI.Combo.EVENT_AFTER_HIDEVIEW, + action: function () { + } + }] + }] + } + }, + showView: function () { + var e = this; + this.downlistcombo.showView(); + var t = null; + e.downlistcombo.element.hover(function () { + window.clearTimeout(t) + }, function () { + t = window.setTimeout(function () { + e.hideView() + }, 300) + }) + }, + hideView: function () { + this.downlistcombo.hideView() + }, + showHomePage: function () { + BI.Providers.getProvider("dec.provider.tab_pane").behaviour("showCardByName", -1); + }, + closeTab: function () { + var menuId = Dec.Utils.jsdbagdbTheme.globleCurrentMenuId; + if ((menuId == undefined) || (menuId == "0") || (menuId == -1)) { + return; + } + BI.Services.getService("dec.service.frame.tab_pane").closeTab(menuId) + } + }); + //切换成主页按钮 + BI.shortcut("dec.frame.tab_pane.down_list_home_jsdbahfc_theme", e); +})(); +!(function () { + var i = BI.inherit(BI.BasicButton, { + props: { + baseCls: "dec-workbench-tabs-button-wrapper dec-frame-tab-pane-tabs-normal-item bi-border-left bi-border-right", + $testId: "dec-frame-tab-pane-tabs-tab", + text: "", + value: "", + height: 30, + width: 134, + textWidth: 115, + entry: !1 + }, + _store: function () { + return BI.Models.getModel("dec.model.frame.tab_pane.tabs.tab", this.options) + }, + render: function () { + var t = this + , e = this.options; + return { + type: "bi.absolute", + items: [{ + el: { + type: "bi.label", + cls: "tab_divider_jsdbahfc_theme" + } + }, + { + el: { + type: "bi.bubble_combo", + cls: "dec-workbench-tabs-bubble-combo", + trigger: "", + offsetStyle: "center", + isNeedAdjustWidth: this._isFirst = !1, + el: { + type: "bi.text_button", + cls: "dec-frame-text", + height: e.height, + textAlign: "left", + hgap: 10, + text: e.cardName || e.text, + title: e.cardName || e.text, + value: e.value, + selected: e.selected, + ref: function (e) { + t.tabButton = e + }, + listeners: [{ + eventName: BI.Controller.EVENT_CHANGE, + action: function () { + t.fireEvent(BI.Controller.EVENT_CHANGE, arguments) + } + }] + }, + popup: { + el: { + type: "dec.frame.tab_pane.tabs.tab.tools", + value: e.value, + entry: e.entry, + collectable: e.collectable, + collectHandleService: e.collectHandleService, + isFavorite: e.isFavorite, + ref: function (e) { + t.popup = e + }, + listeners: [{ + eventName: "EVENT_CHANGE", + action: function () { + t.combo.hideView() + } + }] + }, + cls: "dec-frame-tab-pane-tabs-item-popup-view", + maxWidth: null, + minWidth: null, + minHeight: "" + }, + ref: function (e) { + t.combo = e + } + }, + top: 0, + right: 0, + bottom: 0, + left: 0 + }, { + el: { + type: "bi.center_adapt", + cls: "close-button-container blur-background", + invisible: true, + items: [{ + type: "bi.icon_button", + width: 16, + stopPropagation: !0, + cls: "close-h-font close-button", + title: BI.i18nText("Dec-Basic_Close"), + ref: function (e) { + t.closeButton = e + }, + listeners: [{ + eventName: BI.IconButton.EVENT_CHANGE, + action: function () { + t.fireEvent("EVENT_CLOSE", t.getValue()) + } + }] + }] + }, + top: 0, + right: 2, + bottom: 0 + }] + } + }, + _isFirstClick: function () { + return this._isFirst + }, + setSelected: function (e) { + var t = this; + if (e && (true == e)) { + Dec.Utils.jsdbagdbTheme.globleCurrentMenuId = this.options.key; + } + i.superclass.setSelected.apply(this, arguments), + e ? this.element.hover(function () { + t._isFirstClick() && t.combo.showView() + }, function () { + t.combo.hideView() + }) : (this.element.unbind("mouseenter").unbind("mouseleave"), + t._isFirst = !1), + t.tabButton.setSelected(e), + BI.delay(function () { + t._isFirst = !0 + }, 80) + }, + doClick: function () { + this.store.showTab(this.getValue()) + }, + getValue: function () { + return this.options.value + } + }); + i.EVENT_CHANGE = "EVENT_CHANGE"; + BI.shortcut("dec.frame.tab_pane.tabs.tab_jsdbahfc_theme", i); +})(); +!(function () { + var i = BI.inherit(BI.Widget, { + props: { + baseCls: "dec-frame-tab-pane", + $testId: "dec-frame-tab-pane", + buttons: { + left: [], + right: [] + } + }, + _store: function () { + return BI.Models.getModel("dec.model.frame.tab_pane", this.options) + }, + watch: { + tabs: function (e) { + this._populate(e) + }, + activeCard: function (e) { + BI.isNull(e) || (this.isCardExisted(e.value) || this._addCardByName(e.value, e), + this._showCardByName(e.value, e)) + }, + inactiveTabs: function () { + BI.each(this.model.inactiveTabs, function (e, t) { + this._deleteCardByName(t) + }, this) + } + }, + render: function () { + var t = this + , e = this.options; + return { + type: "bi.absolute", + items: [{ + el: { + type: "dec.header_jsdbahfc_theme", + height: 60, + }, + height: 60, + left: 0, + right: 0, + bottom: 0, + top: 0 + }, { + el: { + type: "dec.frame.tab_pane.card.display", + ref: function (e) { + t.cards = e + }, + items: BI.isNotNull(this.model.activeCard) ? [this.model.activeCard] : [] + }, + left: 0, + right: 0, + bottom: 0, + top: 91 + }, { + el: { + type: "bi.htape", + height: 30, + cls: "dec-frame-tab-pane-tabs-container dec-frame-tab-pane-split-line", + $testId: "dec-frame-tab-pane-tabs-container", + ref: function (e) { + t.header = e + }, + items: e.buttons.left.concat([{ + type: "dec.frame.tab_pane.tabs", + items: this.model.tabs, + ref: function (e) { + t.tabs = e + } + }]).concat(e.buttons.right) + }, + top: 60, + left: 0, + right: 0 + }] + } + }, + _addCardByName: function (e, t) { + this.cards.addCardByName(e, t) + }, + _showCardByName: function (e, t) { + this.cards.showCardByName(e, t), + this.tabs.setValue(e) + }, + _deleteCardByName: function (e) { + this.cards.deleteCardByName(e) + }, + _populate: function (e) { + this.tabs.populate(e) + }, + _dealWithTabsFullScreen: function (e) { + var t = this + , i = null; + + function n(e) { + BI.isNull(i) && (i = setTimeout(function () { + e() + }, 300)) + } + + function o() { + clearTimeout(i), + i = null + } + + e ? (this.cards.element.css({ + top: 0 + }), + this.header.element.css("opacity", 0), + this.header.element.css({ + top: -29 + }), + this.header.element.hover(function () { + o(), + BI.FullScreen.isFullScreen() && n(function () { + t.header.element.css("opacity", 1), + t.header.element.css({ + top: 0 + }) + }) + }, function () { + o(), + n(function () { + BI.FullScreen.isFullScreen() && (t.header.element.css("opacity", 0), + t.header.element.css({ + top: -29 + })) + }) + })) : (o(), + this.header.element.unbind("mouseenter").unbind("mouseleave"), + this.header.element.css("opacity", 1), + this.header.element.css({ + //top: 0 + top: 60 + }), + this.cards.element.css({ + //top: 31 + top: 91 + })) + }, + fullscreen: function (e) { + var t = this; + e ? BI.FullScreen.requestFullScreen(this, function (e) { + e && t._dealWithTabsFullScreen(!0) + }, function () { + t._dealWithTabsFullScreen(!1) + }) : BI.FullScreen.isFullScreen() && BI.FullScreen.exitFullScreen() + }, + isCardExisted: function (e) { + return this.cards.isCardExisted(e) + }, + getOpenedTabs: function () { + return this.model.openedTabs + }, + getActiveTab: function () { + return this.model.activeTab + }, + showCardByName: function (e, t) { + this.store.showCardByName(e, t), + this.fireEvent(i.EVENT_SHOW, e) + }, + addCardByName: function (e, t) { + this.store.addCardByName(e, t), + this.fireEvent(i.EVENT_ADD, e) + }, + closeTabByName: function (e) { + this.store.closeTab(e), + this.fireEvent(i.EVENT_CLOSE, e, this.model.activeTab) + }, + refreshCardByName: function (e) { + this.cards.deleteCardByName(e), + this._addCardByName(e, this.store.assertCard(e)), + e === this.model.activeTab && this._showCardByName(e) + } + }); + i.EVENT_SHOW = "EVENT_SHOW"; + i.EVENT_ADD = "EVENT_ADD"; + i.EVENT_CLOSE = "EVENT_CLOSE"; + BI.shortcut("dec.frame.tab_pane_jsdbahfc_theme", i); +})(); +!(function () { + var e = BI.inherit(BI.Widget, { + render: function () { + return { + type: "bi.label", + invisible: true + }; + } + }); + BI.shortcut("dec.header_none_display_jsdbahfc_theme", e); +})(); +!(function () { + var e = BI.inherit(BI.Widget, { + props: { + baseCls: "dec-tabs-down-list-combo dec-frame-tab-pane-tabs-down-list", + $testId: "dec-frame-tab-pane-tabs-down-list", + items: [], + adjustLength: 0, + direction: "bottom", + trigger: "click", + container: null, + stopPropagation: !1, + el: {} + }, + render: function () { + var t = this; + return { + type: "bi.center_adapt", + items: [{ + type: "bi.combo", + ref: function (e) { + t.downlistcombo = e + }, + trigger: "", + destroyWhenHide: !0, + direction: "bottom,left", + adjustXOffset: 8, + adjustYOffset: -2, + stopPropagation: this.options.stopPropagation, + el: { + type: "bi.icon_button", + $value: "more-tabs", + cls: "more-tabs-font dec-frame-icon", + width: 30, + height: 30, + handler: function () { + t.showView() + } + }, + popup: { + el: { + type: "dec.frame.tab_pane.down_list_popup", + ref: function (e) { + t.popup = e + }, + listeners: [{ + eventName: "EVENT_CHANGE", + action: function () { + t.hideView() + } + }] + }, + cls: "dec-beautified-border", + maxHeight: 1e3, + minWidth: 120 + }, + listeners: [{ + eventName: BI.Combo.EVENT_AFTER_POPUPVIEW, + action: function () { + } + }, { + eventName: BI.Combo.EVENT_AFTER_HIDEVIEW, + action: function () { + } + }] + }] + } + }, + showView: function () { + var e = this; + this.downlistcombo.showView(); + var t = null; + e.downlistcombo.element.hover(function () { + window.clearTimeout(t) + }, function () { + t = window.setTimeout(function () { + e.hideView() + }, 300) + }) + }, + hideView: function () { + this.downlistcombo.hideView() + } + }); + BI.shortcut("dec.frame.tab_pane.down_list_bak_jsdbahfc_theme", e); +})(); + +!(function () { + var e = BI.inherit(BI.Widget, { + props: { + baseCls: "dec-menu dec-frame-menu", + $testId: "dec-frame-menu", + width: 70 + }, + _store: function () { + return BI.Models.getModel("dec.model.menu") + }, + watch: { + selectedMenu: function (e) { + this.list.setValue(e) + }, + extraMenus: function () { + this.extraContainer.populate(this.model.extraMenus) + } + }, + mounted: function () { + this.store.initExtraMenuItems() + }, + render: function () { + var i = this; + return { + type: "bi.vertical", + scrollable: !1, + scrolly: !1, + items: [{ + type: "bi.button_group", + ref: function () { + i.list = this + }, + layouts: [{ + type: "bi.vertical", + vgap: 20 + }], + value: this.model.selectedMenu, + listeners: [{ + eventName: BI.Controller.EVENT_CHANGE, + action: function (e, t) { + i.store.selectMenu(t) + } + }], + items: this.store.createMenuItems() + }, { + type: "bi.button_group", + ref: function () { + i.extraContainer = this + }, + layouts: [{ + type: "bi.vertical" + }], + chooseType: BI.Selection.None, + listeners: [{ + eventName: BI.Controller.EVENT_CHANGE, + action: function (e, t) { + i.store.selectMenu(t) + } + }], + items: this.model.extraMenus + }, { + type: "bi.button_group", + cls: "menu-others-jsdbahfc-theme", + layouts: [{ + type: "bi.vertical" + }], + chooseType: BI.Selection.None, + items: [{ + type: "dec.header.message" + }, { + type: "dec.frame.tab_pane.down_list_bak_jsdbahfc_theme" + } + ] + }] + } + }, + created: function () { + BI.Services.getService("dec.service.main").registerGlobalComponent("Menu", this) + } + }); + e.EVENT_VALUE_CHANGE = "EVENT_VALUE_CHANGE"; + BI.shortcut("dec.menu_jsdbahfc_theme", e); +})(); + + +!(function () { + BI.config("dec.constant.config", function (config) { + config.config4Frame.north.height = 0; + //config.config4Frame.west.width = 80; + //config.config4Frame.west.invisible = false; + //config.config4Frame.center.left.width = 0; + // config.config4Frame.center.left.maxSize = 0; + //config.config4Frame.center.left.minSize = 0; + return config; + }); + + BI.config("dec.constant.header.items", function (items) { + var tempItems = []; + var item; + for (var i = 0, max = items.length - 1; i <= max; i++) { + item = items[i]; + if ("dec.header.message" == item.type) { + continue; + } + tempItems.push(item); + } + return tempItems; + }); + + BI.config("dec.header", function (config) { + config.type = "dec.header_none_display_jsdbahfc_theme"; + return config; + }); + + BI.config("dec.frame.classic", function (config) { + config.type = "dec.frame.classic_jsdbahfc_theme"; + return config; + }); + + BI.config("dec.frame.tab_pane.down_list", function (config) { + config.type = "dec.frame.tab_pane.down_list_home_jsdbahfc_theme"; + return config; + }); + + BI.config("dec.frame.tab_pane.tabs.tab", function (config) { + config.type = "dec.frame.tab_pane.tabs.tab_jsdbahfc_theme"; + return config; + }); + + BI.config("dec.frame.tab_pane", function (config) { + config.type = "dec.frame.tab_pane_jsdbahfc_theme"; + return config; + }); + + + BI.config("dec.menu", function (config) { + config.type = "dec.menu_jsdbahfc_theme"; + return config; + }); +})(); \ No newline at end of file