commit
a12a54231c
8 changed files with 4691 additions and 0 deletions
@ -0,0 +1,6 @@
|
||||
# open-JSD-9725 |
||||
|
||||
JSD-9725 隐藏标题,直接上传图片\ |
||||
免责说明:该源码为第三方爱好者提供,不保证源码和方案的可靠性,也不提供任何形式的源码教学指导和协助!\ |
||||
仅作为开发者学习参考使用!禁止用于任何商业用途!\ |
||||
为保护开发者隐私,开发者信息已隐去!若原开发者希望公开自己的信息,可联系【pioneer】处理。 |
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||
<plugin> |
||||
<id>com.fr.plugin.custom.logo</id> |
||||
<name><![CDATA[logo优化显示]]></name> |
||||
<active>yes</active> |
||||
<version>1.0.0</version> |
||||
<env-version>10.0</env-version> |
||||
<jartime>2020-03-10</jartime> |
||||
<vendor>fr。open</vendor> |
||||
<description><![CDATA[logo优化显示]]></description> |
||||
<function-recorder class="com.fr.plugin.LogoJSHander"/> |
||||
<change-notes> |
||||
<![CDATA[ |
||||
<p>[2019-6-19]项目启动</p> |
||||
]]> |
||||
</change-notes> |
||||
<main-package>com.fr.plugin</main-package> |
||||
|
||||
<extra-decision> |
||||
<WebResourceProvider class="com.fr.plugin.LogoJSHander"/> |
||||
</extra-decision> |
||||
</plugin> |
@ -0,0 +1,54 @@
|
||||
package com.fr.plugin; |
||||
|
||||
import com.fr.plugin.transform.ExecuteFunctionRecord; |
||||
import com.fr.plugin.transform.FunctionRecorder; |
||||
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.ScriptPath; |
||||
import com.fr.web.struct.category.StylePath; |
||||
@FunctionRecorder() |
||||
public class CustomLogoComponent extends Component { |
||||
public static final CustomLogoComponent KEY = new CustomLogoComponent(); |
||||
/** |
||||
* 返回需要引入的JS脚本路径 |
||||
* @param client 请求客户端描述 |
||||
* @return JS脚本路径 |
||||
*/ |
||||
@ExecuteFunctionRecord |
||||
public ScriptPath script( RequestClient client ) { |
||||
PluginLicense pluginLicense = PluginLicenseManager.getInstance().getPluginLicenseByID("com.fr.plugin.custom.logo"); |
||||
if (pluginLicense.isAvailable()) { |
||||
// 做认证通过的事情
|
||||
return ScriptPath.build("com/fr/plugin/web/logoweb.js"); |
||||
} else { |
||||
// 做认证未通过的事情
|
||||
return ScriptPath.build("com/fr/plugin/web/webnuy.js"); |
||||
} |
||||
|
||||
} |
||||
|
||||
/** |
||||
* 返回需要引入的CSS样式路径 |
||||
* @param client 请求客户端描述 |
||||
* @return CSS样式路径 |
||||
*/ |
||||
public StylePath style( RequestClient client ) { |
||||
//如果不需要就直接返回 StylePath.EMPTY;
|
||||
return StylePath.EMPTY; |
||||
} |
||||
|
||||
/** |
||||
* 通过给定的资源过滤器控制是否加载这个资源 |
||||
* @return 资源过滤器 |
||||
*/ |
||||
public Filter filter() { |
||||
return new Filter(){ |
||||
@Override |
||||
public boolean accept() { |
||||
//任何情况下我们都在平台组件加载时加载我们的组件
|
||||
return true; |
||||
} |
||||
}; |
||||
} |
||||
} |
@ -0,0 +1,34 @@
|
||||
package com.fr.plugin; |
||||
|
||||
import com.fr.decision.fun.impl.AbstractWebResourceProvider; |
||||
import com.fr.decision.web.MainComponent; |
||||
import com.fr.plugin.transform.ExecuteFunctionRecord; |
||||
import com.fr.plugin.transform.FunctionRecorder; |
||||
import com.fr.stable.fun.Authorize; |
||||
import com.fr.web.struct.Atom; |
||||
@Authorize(callSignKey = "com.fr.plugin.custom.logo" ) |
||||
@FunctionRecorder |
||||
public class LogoJSHander extends AbstractWebResourceProvider { |
||||
|
||||
/** |
||||
* 需要附加到的主组件 |
||||
* |
||||
* @return 主组件 |
||||
*/ |
||||
|
||||
@Override |
||||
@ExecuteFunctionRecord |
||||
public Atom attach() { |
||||
return MainComponent.KEY; |
||||
} |
||||
|
||||
/** |
||||
* 客户端所需的组件 |
||||
* |
||||
* @return 组件 |
||||
*/ |
||||
@Override |
||||
public Atom client() { |
||||
return CustomLogoComponent.KEY; |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,19 @@
|
||||
;(function ($){ |
||||
BI.config("dec.provider.layout", function (provider) { |
||||
provider.inject({ |
||||
layoutConfig: { |
||||
north: { |
||||
height: 60, |
||||
invisible: false, |
||||
}, |
||||
}, |
||||
}); |
||||
}); |
||||
BI.config("dec.header", function (options) { |
||||
options.ref=function (e){ |
||||
e.title.setVisible(false) |
||||
}; // 将组件的type替换为自定义的组件
|
||||
return options; |
||||
}); |
||||
|
||||
})(jQuery) |
Loading…
Reference in new issue