Browse Source

open

master
pioneer 2 years ago
commit
5c3a80b5bd
  1. 6
      README.md
  2. 131
      build.xml
  3. BIN
      lib/finekit-10.0.jar
  4. 19
      plugin.xml
  5. 56
      pom.xml
  6. 20
      src/main/java/com/fr/plugin/third/party/jsdbahfc/PluginLifecycleMonitor.java
  7. 6
      src/main/java/com/fr/plugin/third/party/jsdbahfc/ThemeConstants.java
  8. 14
      src/main/java/com/fr/plugin/third/party/jsdbahfc/Utils.java
  9. 55
      src/main/java/com/fr/plugin/third/party/jsdbahfc/config/CustomDataConfig.java
  10. 42
      src/main/java/com/fr/plugin/third/party/jsdbahfc/web/CustomisedThemeMain.java
  11. 57
      src/main/java/com/fr/plugin/third/party/jsdbahfc/web/MainFilesComponent.java
  12. BIN
      src/main/resources/com/fr/plugin/third/party/jsdbahfc/image/decison-logo.png
  13. BIN
      src/main/resources/com/fr/plugin/third/party/jsdbahfc/image/theme-logo.png
  14. 141
      src/main/resources/com/fr/plugin/third/party/jsdbahfc/web/main.css
  15. 870
      src/main/resources/com/fr/plugin/third/party/jsdbahfc/web/main.js

6
README.md

@ -0,0 +1,6 @@
# open-JSD-10752
JSD-10752 主题UI定制\
免责说明:该源码为第三方爱好者提供,不保证源码和方案的可靠性,也不提供任何形式的源码教学指导和协助!\
仅作为开发者学习参考使用!禁止用于任何商业用途!\
为保护开发者隐私,开发者信息已隐去!若原开发者希望公开自己的信息,可联系【pioneer】处理。

131
build.xml

@ -0,0 +1,131 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="jar" name="plugin-jsd-10752">
<!-- JDK路径,根据自己机器上实际位置修改-->
<property name="jdk.home" value="C:\Program Files\Java\jdk1.8.0_152"/>
<property name="libs" value="${basedir}/lib"/>
<property name="publicLibs" value=""/>
<property name="reportLibs" value="${basedir}/../webroot/WEB-INF/lib"/>
<property name="destLoc" value="."/>
<property name="classes" value="classes"/>
<xmlproperty file="${basedir}/plugin.xml"/>
<property name="current-version" value="${plugin.version}"/>
<!-- 插件版本-->
<property name="plugin-version" value="${current-version}"/>
<!-- 插件名字-->
<property name="plugin-name" value="custom-theme-jsdbahfc"/>
<property name="plugin-jar" value="fr-plugin-${plugin-name}-${plugin-version}.jar"/>
<target name="prepare">
<mkdir dir ="${basedir}/lib"/>
<delete dir="${classes}"/>
<delete dir="fr-plugin-${plugin-name}-${plugin-version}"/>
<xmlproperty file="${basedir}/plugin.xml"/>
<delete dir="${destLoc}/${plugin.name}"/>
</target>
<path id="compile.classpath">
<fileset dir="${libs}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${publicLibs}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${reportLibs}">
<include name="**/*.jar"/>
</fileset>
</path>
<patternset id="resources4Jar">
<exclude name="**/.settings/**"/>
<exclude name=".classpath"/>
<exclude name=".project"/>
<exclude name="**/*.java"/>
<exclude name="**/*.db"/>
<exclude name="**/*.g"/>
<exclude name="**/package.html"/>
</patternset>
<target name="copy_resources">
<echo message="从${resources_from}拷贝图片,JS,CSS等资源文件"/>
<delete dir="tmp"/>
<copy todir="tmp">
<fileset dir="${resources_from}/src/main/resources">
<patternset refid="resources4Jar"/>
</fileset>
</copy>
<copy todir="${classes}">
<fileset dir="tmp"/>
</copy>
<delete dir="tmp"/>
</target>
<target name="compile_javas">
<echo message="编译${compile_files}下的Java文件"/>
<javac destdir="${classes}" debug="false" optimize="on" source="${source_jdk_version}"
target="${target_jdk_version}"
fork="true" memoryMaximumSize="512m" listfiles="false" srcdir="${basedir}"
executable="${compile_jdk_version}/bin/javac">
<src path="${basedir}/src/main/java"/>
<exclude name="**/.svn/**"/>
<compilerarg line="-encoding UTF8 "/>
<classpath refid="compile.classpath"/>
</javac>
<taskdef name="pretreatment" classname="com.fr.plugin.pack.PluginPretreatmentTask">
<classpath refid="compile.classpath"/>
</taskdef>
<pretreatment baseDir="${basedir}"/>
</target>
<target name="jar_classes">
<echo message="打Jar包:${jar_name}"/>
<delete file="${basedir}/${jar_name}"/>
<jar jarfile="${basedir}/${jar_name}">
<fileset dir="${classes}">
</fileset>
</jar>
</target>
<target name="super_jar" depends="prepare">
<antcall target="copy_resources">
<param name="resources_from" value="${basedir}"/>
</antcall>
<antcall target="compile_javas">
<param name="source_jdk_version" value="1.8"/>
<param name="target_jdk_version" value="1.8"/>
<param name="compile_jdk_version" value="${jdk.home}"/>
<param name="compile_files" value="${basedir}/src"/>
</antcall>
<echo message="compile plugin success!"/>
<antcall target="jar_classes">
<param name="jar_name" value="${plugin-jar}"/>
</antcall>
<delete dir="${classes}"/>
</target>
<target name="jar" depends="super_jar">
<antcall target="zip"/>
</target>
<target name="zip">
<property name="plugin-folder" value="fr-plugin-${plugin-name}-${plugin-version}"/>
<echo message="----------zip files----------"/>
<mkdir dir="${plugin-folder}"/>
<copy todir="${plugin-folder}">
<fileset dir=".">
<include name="${plugin-jar}"/>
<include name="plugin.xml"/>
</fileset>
<fileset dir="${libs}">
<include name="*.jar"/>
<include name="*.dll"/>
</fileset>
</copy>
<zip destfile="${basedir}/${plugin-folder}.zip" basedir=".">
<include name="${plugin-folder}/*.jar"/>
<include name="${plugin-folder}/*.dll"/>
<include name="${plugin-folder}/plugin.xml"/>
</zip>
<move file="${plugin-folder}.zip" todir="${destLoc}/install"/>
</target>
</project>

BIN
lib/finekit-10.0.jar

Binary file not shown.

19
plugin.xml

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><plugin>
<id>com.fr.plugin.third.party.jsdbahfc</id>
<name><![CDATA[定制化主题_EK]]></name>
<active>yes</active>
<version>1.0.2</version>
<env-version>10.0~11.0</env-version>
<jartime>2019-01-01</jartime>
<vendor>fr.open</vendor>
<description><![CDATA[
定制化主题
]]></description>
<change-notes><![CDATA[
]]></change-notes>
<extra-decision>
<ThemeVariousProvider class="com.fr.plugin.third.party.jsdbahfc.web.CustomisedThemeMain"/>
</extra-decision>
<function-recorder class="com.fr.plugin.third.party.jsdbahfc.Utils"/>
<lifecycle-monitor class="com.fr.plugin.third.party.jsdbahfc.PluginLifecycleMonitor"/>
</plugin>

56
pom.xml

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.fr.plugin</groupId>
<artifactId>starter</artifactId>
<version>10.0</version>
</parent>
<packaging>jar</packaging>
<artifactId>plugin-jsd-10752</artifactId>
<dependencies>
<dependency>
<groupId>com.fanruan.api</groupId>
<artifactId>finekit</artifactId>
<version>10.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/finekit-10.0.jar</systemPath>
</dependency>
</dependencies>
<properties>
<!---如果要更改调试插件,改这里的配置就可以了-->
<plugin-path>
${project.basedir}/../webroot/WEB-INF/plugins/plugin-com.fr.plugin.third.party.jsdbahfc-1.0
</plugin-path>
</properties>
<build>
<outputDirectory>${plugin-path}/classes</outputDirectory>
<resources>
<resource>
<targetPath>${plugin-path}</targetPath>
<directory>${project.basedir}</directory>
<includes>
<include>plugin.xml</include>
</includes>
</resource>
<resource>
<targetPath>${plugin-path}</targetPath>
<directory>${project.basedir}/lib</directory>
<includes>
<include>*.jar</include>
<include>*.dll</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>

20
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) {
}
}

6
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";
}

14
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() {
//功能点记录
}
}

55
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<Boolean> showSystemMessage = Holders.simple(true);
@Identifier(value = "showFullScreen", name = "显示全屏图标", description = "", status = Status.SHOW)
private Conf<Boolean> 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<Boolean>) showSystemMessage.clone();
cloned.showFullScreen = (Conf<Boolean>) showFullScreen.clone();
return cloned;
}
}

42
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";
}
}

57
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);
}
};
}
}

BIN
src/main/resources/com/fr/plugin/third/party/jsdbahfc/image/decison-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
src/main/resources/com/fr/plugin/third/party/jsdbahfc/image/theme-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

141
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;
}

870
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;
});
})();
Loading…
Cancel
Save