onlyxx
4 years ago
commit
6d46a09a2a
35 changed files with 10714 additions and 0 deletions
@ -0,0 +1,129 @@ |
|||||||
|
|
||||||
|
apply plugin: 'java' |
||||||
|
|
||||||
|
|
||||||
|
ext { |
||||||
|
/** |
||||||
|
* 项目中依赖的jar的路径 |
||||||
|
* 1.如果依赖的jar需要打包到zip中,放置在lib根目录下 |
||||||
|
* 2.如果依赖的jar仅仅是编译时需要,防止在lib下子目录下即可 |
||||||
|
*/ |
||||||
|
libPath = "$projectDir/../webroot/WEB-INF/lib" |
||||||
|
|
||||||
|
/** |
||||||
|
* 是否对插件的class进行加密保护,防止反编译 |
||||||
|
*/ |
||||||
|
guard = true |
||||||
|
|
||||||
|
def pluginInfo = getPluginInfo() |
||||||
|
pluginPre = "fine-plugin" |
||||||
|
pluginName = pluginInfo.id |
||||||
|
pluginVersion = pluginInfo.version |
||||||
|
|
||||||
|
outputPath = "$projectDir/../webroot/WEB-INF/plugins/plugin-" + pluginName + "-1.0/classes" |
||||||
|
} |
||||||
|
|
||||||
|
group = 'com.fr.plugin' |
||||||
|
version = '10.0' |
||||||
|
sourceCompatibility = '8' |
||||||
|
|
||||||
|
sourceSets { |
||||||
|
main { |
||||||
|
java.outputDir = file(outputPath) |
||||||
|
output.resourcesDir = file(outputPath) |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
ant.importBuild("encrypt.xml") |
||||||
|
//定义ant变量 |
||||||
|
ant.projectDir = projectDir |
||||||
|
ant.references["compile.classpath"] = ant.path { |
||||||
|
fileset(dir: libPath, includes: '**/*.jar') |
||||||
|
fileset(dir: ".",includes:"**/*.jar" ) |
||||||
|
} |
||||||
|
|
||||||
|
classes.dependsOn('clean') |
||||||
|
|
||||||
|
task copyFiles(type: Copy,dependsOn: 'classes'){ |
||||||
|
from outputPath |
||||||
|
into "$projectDir/classes" |
||||||
|
} |
||||||
|
|
||||||
|
task preJar(type:Copy,dependsOn: guard ? 'compile_encrypt_javas' : 'compile_plain_javas'){ |
||||||
|
from "$projectDir/classes" |
||||||
|
into "$projectDir/transform-classes" |
||||||
|
include "**/*.*" |
||||||
|
} |
||||||
|
jar.dependsOn("preJar") |
||||||
|
|
||||||
|
classes.dependsOn("copyPluginXML") |
||||||
|
|
||||||
|
task copyPluginXML(type: Copy) { |
||||||
|
print "copyed plugin.xml file" |
||||||
|
from "$projectDir/plugin.xml" |
||||||
|
into file("$projectDir/../webroot/WEB-INF/plugins/plugin-" + pluginName + "-1.0/") |
||||||
|
} |
||||||
|
task makeJar(type: Jar,dependsOn: preJar){ |
||||||
|
from fileTree(dir: "$projectDir/transform-classes") |
||||||
|
baseName pluginPre |
||||||
|
appendix pluginName |
||||||
|
version pluginVersion |
||||||
|
destinationDir = file("$buildDir/libs") |
||||||
|
|
||||||
|
doLast(){ |
||||||
|
delete file("$projectDir/classes") |
||||||
|
delete file("$projectDir/transform-classes") |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
task copyFile(type: Copy,dependsOn: ["makeJar"]){ |
||||||
|
from "$buildDir/libs" |
||||||
|
from("$projectDir/lib") { |
||||||
|
include "*.jar" |
||||||
|
} |
||||||
|
from "$projectDir/plugin.xml" |
||||||
|
into file("$buildDir/temp/plugin") |
||||||
|
} |
||||||
|
|
||||||
|
task zip(type:Zip,dependsOn:["copyFile"]){ |
||||||
|
from "$buildDir/temp/plugin" |
||||||
|
destinationDir file("$buildDir/install") |
||||||
|
baseName pluginPre |
||||||
|
appendix pluginName |
||||||
|
version pluginVersion |
||||||
|
} |
||||||
|
|
||||||
|
//控制build时包含哪些文件,排除哪些文件 |
||||||
|
processResources { |
||||||
|
// exclude everything |
||||||
|
// 用*.css没效果 |
||||||
|
// exclude '**/*.css' |
||||||
|
// except this file |
||||||
|
// include 'xx.xml' |
||||||
|
} |
||||||
|
|
||||||
|
/*读取plugin.xml中的version*/ |
||||||
|
def getPluginInfo(){ |
||||||
|
def xmlFile = file("plugin.xml") |
||||||
|
if (!xmlFile.exists()) { |
||||||
|
return ["id":"none", "version":"1.0.0"] |
||||||
|
} |
||||||
|
def plugin = new XmlParser().parse(xmlFile) |
||||||
|
def version = plugin.version[0].text() |
||||||
|
def id = plugin.id[0].text() |
||||||
|
return ["id":id,"version":version] |
||||||
|
} |
||||||
|
|
||||||
|
repositories { |
||||||
|
mavenLocal() |
||||||
|
maven { |
||||||
|
url = uri('http://mvn.finedevelop.com/repository/maven-public/') |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
dependencies { |
||||||
|
//使用本地jar |
||||||
|
implementation fileTree(dir: 'lib', include: ['**/*.jar']) |
||||||
|
implementation fileTree(dir: libPath, include: ['**/*.jar']) |
||||||
|
} |
||||||
|
|
Binary file not shown.
@ -0,0 +1,13 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||||
|
<project> |
||||||
|
<target name="compile_encrypt_javas" depends="copyFiles"> |
||||||
|
<echo message="加密文件"/> |
||||||
|
<echo message="${projectDir}"/> |
||||||
|
<taskdef name="pretreatment" classname="com.fr.plugin.pack.PluginPretreatmentTask"> |
||||||
|
<classpath refid="compile.classpath"/> |
||||||
|
</taskdef> |
||||||
|
<pretreatment baseDir="${projectDir}"/> |
||||||
|
</target> |
||||||
|
<target name="compile_plain_javas" depends="copyFiles"> |
||||||
|
</target> |
||||||
|
</project> |
Binary file not shown.
@ -0,0 +1,39 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?><plugin> |
||||||
|
<id>com.fr.plugin.function.my.editor</id> |
||||||
|
<name><![CDATA[我的编辑器控件]]></name> |
||||||
|
<active>yes</active> |
||||||
|
<version>1.0</version> |
||||||
|
<env-version>10.0</env-version> |
||||||
|
<jartime>2018-07-31</jartime> |
||||||
|
<vendor>author</vendor> |
||||||
|
<description><![CDATA[编辑器]]></description> |
||||||
|
<change-notes><![CDATA[ |
||||||
|
]]></change-notes> |
||||||
|
|
||||||
|
<!-- 第一步 注册设计器配置界面--> |
||||||
|
<extra-designer> |
||||||
|
<CellWidgetOptionProvider class="com.fr.plugin.MyCellWidgetOptionProvider"/> |
||||||
|
<!-- <FormWidgetOptionProvider class="com.fr.plugin.MyParameterFormOptionProvider"/>--> |
||||||
|
<!-- <ParameterWidgetOptionProvider class="com.fr.plugin.MyParameterWidgetOptionProvider"/>--> |
||||||
|
</extra-designer> |
||||||
|
|
||||||
|
<!--第二步 注册js 如果只是cpt用不用form--> |
||||||
|
<extra-form> |
||||||
|
<JavaScriptFileHandler class="com.fr.plugin.MyJSFileHandler"/> |
||||||
|
</extra-form> |
||||||
|
<extra-report> |
||||||
|
<JavaScriptFieHandler class="com.fr.plugin.MyJSFileHandler"/> |
||||||
|
</extra-report> |
||||||
|
<!-- 注册js结束--> |
||||||
|
|
||||||
|
<!-- 第三步 注册css 如果只是cpt用不用form--> |
||||||
|
<extra-form> |
||||||
|
<CssFileHandler class="com.fr.plugin.MyCSSFileHandler"/> |
||||||
|
</extra-form> |
||||||
|
<extra-report> |
||||||
|
<CssFileHandler class="com.fr.plugin.MyCSSFileHandler"/> |
||||||
|
</extra-report> |
||||||
|
<!-- 注册css结束--> |
||||||
|
|
||||||
|
<function-recorder class="com.fr.plugin.MyJSFileHandler"/> |
||||||
|
</plugin> |
@ -0,0 +1,16 @@ |
|||||||
|
package com.fr.plugin; |
||||||
|
|
||||||
|
import com.fr.plugin.transform.ExecuteFunctionRecord; |
||||||
|
import com.fr.plugin.transform.FunctionRecorder; |
||||||
|
import com.fr.stable.fun.impl.AbstractCssFileHandler; |
||||||
|
@FunctionRecorder |
||||||
|
public class MyCSSFileHandler extends AbstractCssFileHandler { |
||||||
|
@Override |
||||||
|
@ExecuteFunctionRecord |
||||||
|
public String[] pathsForFiles() { |
||||||
|
return new String[]{ |
||||||
|
"com/fr/plugin/web/css/bootstrap.css", |
||||||
|
"com/fr/plugin/web/js/my.css" |
||||||
|
}; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,59 @@ |
|||||||
|
package com.fr.plugin; |
||||||
|
|
||||||
|
import com.fr.design.beans.BasicBeanPane; |
||||||
|
import com.fr.design.fun.impl.AbstractCellWidgetOptionProvider; |
||||||
|
import com.fr.form.ui.Widget; |
||||||
|
import com.fr.general.Inter; |
||||||
|
import com.fr.locale.InterProvider; |
||||||
|
import com.fr.locale.InterProviderFactory; |
||||||
|
import com.fr.plugin.pane.MyWidgetConfigPane; |
||||||
|
import com.fr.plugin.widget.ICEEditorWidget; |
||||||
|
|
||||||
|
/* |
||||||
|
第一步继承 AbstractCellWidgetOptionProvider |
||||||
|
*/ |
||||||
|
public class MyCellWidgetOptionProvider extends AbstractCellWidgetOptionProvider { |
||||||
|
|
||||||
|
/** |
||||||
|
* 第二步实现控件子类 |
||||||
|
* 控件类,封装控件标识,封装配置读写等 |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Class<? extends Widget> classForWidget() { |
||||||
|
return ICEEditorWidget.class; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 控件的配置界面 |
||||||
|
* 第三步实现配置界面 |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Class<? extends BasicBeanPane<? extends Widget>> appearanceForWidget() { |
||||||
|
return MyWidgetConfigPane.class; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 控件的logo |
||||||
|
* 第四步配置插件的url |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public String iconPathForWidget() { |
||||||
|
return "com/fr/plugin/web/icon/icon.png"; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 第五步 |
||||||
|
* 这里是显示在控件选择窗口的名称,可以做国际化 |
||||||
|
* 配置插件的国际化名称 |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public String nameForWidget() { |
||||||
|
// InterProviderFactory.getProvider().getLocText("国际化标签")
|
||||||
|
return "myeditor"; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,8 @@ |
|||||||
|
package com.fr.plugin; |
||||||
|
|
||||||
|
public class MyFunctionConstants { |
||||||
|
|
||||||
|
public static final String PLUGIN_ID = "com.fr.plugin.function.my.editor"; |
||||||
|
public static final String WIDGET_NAME = "my.editor"; |
||||||
|
|
||||||
|
} |
@ -0,0 +1,16 @@ |
|||||||
|
package com.fr.plugin; |
||||||
|
|
||||||
|
import com.fr.plugin.transform.ExecuteFunctionRecord; |
||||||
|
import com.fr.plugin.transform.FunctionRecorder; |
||||||
|
import com.fr.stable.fun.impl.AbstractJavaScriptFileHandler; |
||||||
|
@FunctionRecorder |
||||||
|
public class MyJSFileHandler extends AbstractJavaScriptFileHandler { |
||||||
|
@Override |
||||||
|
@ExecuteFunctionRecord |
||||||
|
public String[] pathsForFiles() { |
||||||
|
return new String[]{ |
||||||
|
"com/fr/plugin/web/js/boot/bootstrap.js", |
||||||
|
"com/fr/plugin/web/js/my.js" |
||||||
|
}; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,53 @@ |
|||||||
|
package com.fr.plugin; |
||||||
|
|
||||||
|
import com.fr.design.beans.BasicBeanPane; |
||||||
|
import com.fr.design.fun.impl.AbstractCellWidgetOptionProvider; |
||||||
|
import com.fr.design.fun.impl.AbstractFormWidgetOptionProvider; |
||||||
|
import com.fr.form.ui.Widget; |
||||||
|
import com.fr.plugin.pane.MyWidgetConfigPane; |
||||||
|
import com.fr.plugin.widget.ICEEditorWidget; |
||||||
|
|
||||||
|
/** |
||||||
|
* MyCellWidgetOptionProvider继承AbstractCellWidgetOptionProvider |
||||||
|
* 就相当于实现了ParameterWidgetOptionProvider |
||||||
|
* 并且类实现了FormWidgetOptionProvider |
||||||
|
*/ |
||||||
|
public class MyParameterFormOptionProvider extends AbstractFormWidgetOptionProvider { |
||||||
|
|
||||||
|
/** |
||||||
|
* 控件类,封装控件标识,封装配置读写等 |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Class<? extends Widget> classForWidget() { |
||||||
|
return ICEEditorWidget.class; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 控件的配置界面 |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Class<?> appearanceForWidget() { |
||||||
|
return ParameterPane.class; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 控件的logo |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public String iconPathForWidget() { |
||||||
|
return "com/fr/plugin/web/icon/icon.png"; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 这里是显示在控件选择窗口的名称,可以做国际化 |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public String nameForWidget() { |
||||||
|
return "myeditor"; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,46 @@ |
|||||||
|
package com.fr.plugin; |
||||||
|
|
||||||
|
import com.fr.design.beans.BasicBeanPane; |
||||||
|
import com.fr.design.fun.impl.AbstractFormWidgetOptionProvider; |
||||||
|
import com.fr.design.fun.impl.AbstractParameterWidgetOptionProvider; |
||||||
|
import com.fr.form.ui.Widget; |
||||||
|
import com.fr.plugin.pane.MyWidgetConfigPane; |
||||||
|
import com.fr.plugin.widget.ICEEditorWidget; |
||||||
|
|
||||||
|
|
||||||
|
public class MyParameterWidgetOptionProvider extends AbstractParameterWidgetOptionProvider { |
||||||
|
|
||||||
|
|
||||||
|
@Override |
||||||
|
public Class<? extends Widget> classForWidget() { |
||||||
|
return ICEEditorWidget.class; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 控件的配置界面 |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Class<? extends BasicBeanPane<? extends Widget>> appearanceForWidget() { |
||||||
|
return MyWidgetConfigPane.class; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 控件的logo |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public String iconPathForWidget() { |
||||||
|
return "com/fr/plugin/web/icon/icon.png"; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 这里是显示在控件选择窗口的名称,可以做国际化 |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public String nameForWidget() { |
||||||
|
return "myeditor"; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,76 @@ |
|||||||
|
package com.fr.plugin; |
||||||
|
|
||||||
|
import com.fr.design.designer.creator.CRPropertyDescriptor; |
||||||
|
import com.fr.design.designer.creator.XLayoutContainer; |
||||||
|
import com.fr.design.designer.creator.XWidgetCreator; |
||||||
|
import com.fr.design.gui.ilable.UILabel; |
||||||
|
import com.fr.form.ui.Widget; |
||||||
|
|
||||||
|
import javax.swing.*; |
||||||
|
import java.awt.*; |
||||||
|
import java.beans.IntrospectionException; |
||||||
|
|
||||||
|
public class ParameterPane extends XWidgetCreator { |
||||||
|
|
||||||
|
public ParameterPane(Widget widget, Dimension dimension) { |
||||||
|
super(widget, dimension); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected String getIconName() { |
||||||
|
return "text_pane_16.png"; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected JComponent initEditor() { |
||||||
|
UILabel uiLabel = new UILabel("我的编辑框"); |
||||||
|
uiLabel.setForeground(Color.BLUE); |
||||||
|
uiLabel.setBackground(Color.BLUE); |
||||||
|
uiLabel.setVerticalAlignment(SwingConstants.CENTER); |
||||||
|
uiLabel.setHorizontalAlignment(SwingConstants.CENTER); |
||||||
|
setBorder(DEFALUTBORDER); |
||||||
|
editor=uiLabel; |
||||||
|
return uiLabel; |
||||||
|
} |
||||||
|
/** |
||||||
|
* 返回当前XCreator的一个封装父容器,可以直接返回XWScaleLayout即可 |
||||||
|
* |
||||||
|
* @param widgetName 当前控件名字 |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected XLayoutContainer getCreatorWrapper(String widgetName) { |
||||||
|
return super.getCreatorWrapper(widgetName); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 将当前组件添加父组件, |
||||||
|
* @param xLayoutContainer 父组件getCreatorWrapper 方法返回 |
||||||
|
* @param width 宽 |
||||||
|
* @param minHeight 高 |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected void addToWrapper(XLayoutContainer xLayoutContainer, int width, int minHeight) { |
||||||
|
super.addToWrapper(xLayoutContainer, width, minHeight); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 画图的方法,在initEditor方法返回的组件上面画图,比如文本框实时显示当前的值 |
||||||
|
* @param g |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public void paintComponent(Graphics g) { |
||||||
|
super.paintComponent(g); |
||||||
|
g.drawString("呵呵呵",0,0); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 返回控件支持的属性 |
||||||
|
* @return |
||||||
|
* @throws IntrospectionException |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { |
||||||
|
return super.supportedDescriptor(); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,67 @@ |
|||||||
|
package com.fr.plugin.pane; |
||||||
|
|
||||||
|
import com.fr.design.designer.IntervalConstants; |
||||||
|
import com.fr.design.gui.ilable.UILabel; |
||||||
|
import com.fr.design.gui.itextarea.UITextArea; |
||||||
|
import com.fr.design.gui.itextfield.UITextField; |
||||||
|
import com.fr.design.layout.TableLayout; |
||||||
|
import com.fr.design.layout.TableLayoutHelper; |
||||||
|
import com.fr.design.widget.ui.AbstractDataModify; |
||||||
|
import com.fr.plugin.widget.ICEEditorWidget; |
||||||
|
|
||||||
|
import javax.swing.*; |
||||||
|
import java.awt.*; |
||||||
|
|
||||||
|
|
||||||
|
public class MyWidgetConfigPane extends AbstractDataModify<ICEEditorWidget> { |
||||||
|
UITextField ui = new UITextField(); |
||||||
|
|
||||||
|
public MyWidgetConfigPane() { |
||||||
|
//初始化配置界面
|
||||||
|
this.setLayout(new BorderLayout()); |
||||||
|
double f = TableLayout.FILL; |
||||||
|
double p = TableLayout.PREFERRED; |
||||||
|
Component[][] components = new Component[][]{ |
||||||
|
new Component[]{new UILabel("水印文字"), ui}, |
||||||
|
}; |
||||||
|
double[] rowSize = {p}; |
||||||
|
double[] columnSize = {p, f}; |
||||||
|
int[][] rowCount = {{1, 1}}; |
||||||
|
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W3, IntervalConstants.INTERVAL_L1); |
||||||
|
this.add(panel, BorderLayout.CENTER); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 根据传递进来控件类,刷新当前的界面 |
||||||
|
* |
||||||
|
* @param iceEditorWidget |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public void populateBean(ICEEditorWidget iceEditorWidget) { |
||||||
|
String config1 = iceEditorWidget.getConfig1(); |
||||||
|
ui.setText(config1); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 根据当前属性界面返回一个控件类 |
||||||
|
* |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public ICEEditorWidget updateBean() { |
||||||
|
ICEEditorWidget iceEditorWidget = new ICEEditorWidget(); |
||||||
|
String config1 = ui.getText(); |
||||||
|
iceEditorWidget.setConfig1(config1); |
||||||
|
return iceEditorWidget; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 标题 |
||||||
|
* |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected String title4PopupWindow() { |
||||||
|
return "ICEConfig"; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,112 @@ |
|||||||
|
package com.fr.plugin.widget; |
||||||
|
|
||||||
|
|
||||||
|
import com.fr.form.ui.TextEditor; |
||||||
|
import com.fr.general.ComparatorUtils; |
||||||
|
import com.fr.json.JSONException; |
||||||
|
import com.fr.json.JSONObject; |
||||||
|
import com.fr.plugin.MyFunctionConstants; |
||||||
|
import com.fr.script.Calculator; |
||||||
|
import com.fr.stable.core.NodeVisitor; |
||||||
|
import com.fr.stable.web.Repository; |
||||||
|
import com.fr.stable.xml.XMLPrintWriter; |
||||||
|
import com.fr.stable.xml.XMLableReader; |
||||||
|
|
||||||
|
/* |
||||||
|
继承自TextEditor 可以帮我们节省很多配置的开发工作 |
||||||
|
如果实在不知道控件类型可以直接继承 Widget |
||||||
|
这些类都再 com.fr.form.ui包中 |
||||||
|
*/ |
||||||
|
public class ICEEditorWidget extends TextEditor { |
||||||
|
|
||||||
|
private String config1="this is test config"; |
||||||
|
private String config2=null; |
||||||
|
private String config3=null; |
||||||
|
|
||||||
|
public String getConfig1() { |
||||||
|
return config1; |
||||||
|
} |
||||||
|
|
||||||
|
public void setConfig1(String config1) { |
||||||
|
this.config1 = config1; |
||||||
|
} |
||||||
|
|
||||||
|
public String getConfig2() { |
||||||
|
return config2; |
||||||
|
} |
||||||
|
|
||||||
|
public void setConfig2(String config2) { |
||||||
|
this.config2 = config2; |
||||||
|
} |
||||||
|
|
||||||
|
public String getConfig3() { |
||||||
|
return config3; |
||||||
|
} |
||||||
|
|
||||||
|
public void setConfig3(String config3) { |
||||||
|
this.config3 = config3; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 控件的类型 |
||||||
|
* 注意这个类型要和前端js注册的名称一致!!! |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public String getXType() { |
||||||
|
return MyFunctionConstants.WIDGET_NAME; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 返回控件的属性json,这个对应的就是前端控件widget.options属性的, |
||||||
|
* 这里可以获取参数,返回给前端js |
||||||
|
* @param repository |
||||||
|
* @param calculator |
||||||
|
* @param nodeVisitor |
||||||
|
* @return |
||||||
|
* @throws JSONException |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public JSONObject createJSONConfig(Repository repository, Calculator calculator, NodeVisitor nodeVisitor) throws JSONException { |
||||||
|
//这里先将父类的json拿到再添加我们自己的配置(我这里没有配置,就随便返回了一个配置)
|
||||||
|
return super.createJSONConfig(repository, calculator, nodeVisitor).put("customTitle", config1).put("config2",config2).put("config3",config3); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 保存时候将设置保存在模板里面。 |
||||||
|
* @param xmLableReader |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public void readXML(XMLableReader xmLableReader) { |
||||||
|
super.readXML(xmLableReader); |
||||||
|
if (xmLableReader.isChildNode()) { |
||||||
|
String tagName = xmLableReader.getTagName(); |
||||||
|
if (ComparatorUtils.equals(tagName, "config1")) { |
||||||
|
this.config1= xmLableReader.getAttrAsString("config1",""); |
||||||
|
} |
||||||
|
if (ComparatorUtils.equals(tagName, "config2")) { |
||||||
|
this.config2= xmLableReader.getAttrAsString("config2",""); |
||||||
|
} |
||||||
|
if (ComparatorUtils.equals(tagName, "config1")) { |
||||||
|
this.config3= xmLableReader.getAttrAsString("config3",""); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 从模板里面读取对应的属性 cpt解析之后实际上还是xml所以这里就是将配置转成xml |
||||||
|
* @param xmlPrintWriter |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public void writeXML(XMLPrintWriter xmlPrintWriter) { |
||||||
|
super.writeXML(xmlPrintWriter); |
||||||
|
xmlPrintWriter.startTAG("config1").textNode(config1).end(); |
||||||
|
xmlPrintWriter.startTAG("config2").textNode(config2).end(); |
||||||
|
xmlPrintWriter.startTAG("config3").textNode(config3).end(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public boolean isEditor() { |
||||||
|
return true; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,587 @@ |
|||||||
|
/*! |
||||||
|
* Bootstrap v3.3.7 (http://getbootstrap.com) |
||||||
|
* Copyright 2011-2016 Twitter, Inc. |
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) |
||||||
|
*/ |
||||||
|
.btn-default, |
||||||
|
.btn-primary, |
||||||
|
.btn-success, |
||||||
|
.btn-info, |
||||||
|
.btn-warning, |
||||||
|
.btn-danger { |
||||||
|
text-shadow: 0 -1px 0 rgba(0, 0, 0, .2); |
||||||
|
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); |
||||||
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); |
||||||
|
} |
||||||
|
.btn-default:active, |
||||||
|
.btn-primary:active, |
||||||
|
.btn-success:active, |
||||||
|
.btn-info:active, |
||||||
|
.btn-warning:active, |
||||||
|
.btn-danger:active, |
||||||
|
.btn-default.active, |
||||||
|
.btn-primary.active, |
||||||
|
.btn-success.active, |
||||||
|
.btn-info.active, |
||||||
|
.btn-warning.active, |
||||||
|
.btn-danger.active { |
||||||
|
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); |
||||||
|
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); |
||||||
|
} |
||||||
|
.btn-default.disabled, |
||||||
|
.btn-primary.disabled, |
||||||
|
.btn-success.disabled, |
||||||
|
.btn-info.disabled, |
||||||
|
.btn-warning.disabled, |
||||||
|
.btn-danger.disabled, |
||||||
|
.btn-default[disabled], |
||||||
|
.btn-primary[disabled], |
||||||
|
.btn-success[disabled], |
||||||
|
.btn-info[disabled], |
||||||
|
.btn-warning[disabled], |
||||||
|
.btn-danger[disabled], |
||||||
|
fieldset[disabled] .btn-default, |
||||||
|
fieldset[disabled] .btn-primary, |
||||||
|
fieldset[disabled] .btn-success, |
||||||
|
fieldset[disabled] .btn-info, |
||||||
|
fieldset[disabled] .btn-warning, |
||||||
|
fieldset[disabled] .btn-danger { |
||||||
|
-webkit-box-shadow: none; |
||||||
|
box-shadow: none; |
||||||
|
} |
||||||
|
.btn-default .badge, |
||||||
|
.btn-primary .badge, |
||||||
|
.btn-success .badge, |
||||||
|
.btn-info .badge, |
||||||
|
.btn-warning .badge, |
||||||
|
.btn-danger .badge { |
||||||
|
text-shadow: none; |
||||||
|
} |
||||||
|
.btn:active, |
||||||
|
.btn.active { |
||||||
|
background-image: none; |
||||||
|
} |
||||||
|
.btn-default { |
||||||
|
text-shadow: 0 1px 0 #fff; |
||||||
|
background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%); |
||||||
|
background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0)); |
||||||
|
background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); |
||||||
|
background-repeat: repeat-x; |
||||||
|
border-color: #dbdbdb; |
||||||
|
border-color: #ccc; |
||||||
|
} |
||||||
|
.btn-default:hover, |
||||||
|
.btn-default:focus { |
||||||
|
background-color: #e0e0e0; |
||||||
|
background-position: 0 -15px; |
||||||
|
} |
||||||
|
.btn-default:active, |
||||||
|
.btn-default.active { |
||||||
|
background-color: #e0e0e0; |
||||||
|
border-color: #dbdbdb; |
||||||
|
} |
||||||
|
.btn-default.disabled, |
||||||
|
.btn-default[disabled], |
||||||
|
fieldset[disabled] .btn-default, |
||||||
|
.btn-default.disabled:hover, |
||||||
|
.btn-default[disabled]:hover, |
||||||
|
fieldset[disabled] .btn-default:hover, |
||||||
|
.btn-default.disabled:focus, |
||||||
|
.btn-default[disabled]:focus, |
||||||
|
fieldset[disabled] .btn-default:focus, |
||||||
|
.btn-default.disabled.focus, |
||||||
|
.btn-default[disabled].focus, |
||||||
|
fieldset[disabled] .btn-default.focus, |
||||||
|
.btn-default.disabled:active, |
||||||
|
.btn-default[disabled]:active, |
||||||
|
fieldset[disabled] .btn-default:active, |
||||||
|
.btn-default.disabled.active, |
||||||
|
.btn-default[disabled].active, |
||||||
|
fieldset[disabled] .btn-default.active { |
||||||
|
background-color: #e0e0e0; |
||||||
|
background-image: none; |
||||||
|
} |
||||||
|
.btn-primary { |
||||||
|
background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%); |
||||||
|
background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88)); |
||||||
|
background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); |
||||||
|
background-repeat: repeat-x; |
||||||
|
border-color: #245580; |
||||||
|
} |
||||||
|
.btn-primary:hover, |
||||||
|
.btn-primary:focus { |
||||||
|
background-color: #265a88; |
||||||
|
background-position: 0 -15px; |
||||||
|
} |
||||||
|
.btn-primary:active, |
||||||
|
.btn-primary.active { |
||||||
|
background-color: #265a88; |
||||||
|
border-color: #245580; |
||||||
|
} |
||||||
|
.btn-primary.disabled, |
||||||
|
.btn-primary[disabled], |
||||||
|
fieldset[disabled] .btn-primary, |
||||||
|
.btn-primary.disabled:hover, |
||||||
|
.btn-primary[disabled]:hover, |
||||||
|
fieldset[disabled] .btn-primary:hover, |
||||||
|
.btn-primary.disabled:focus, |
||||||
|
.btn-primary[disabled]:focus, |
||||||
|
fieldset[disabled] .btn-primary:focus, |
||||||
|
.btn-primary.disabled.focus, |
||||||
|
.btn-primary[disabled].focus, |
||||||
|
fieldset[disabled] .btn-primary.focus, |
||||||
|
.btn-primary.disabled:active, |
||||||
|
.btn-primary[disabled]:active, |
||||||
|
fieldset[disabled] .btn-primary:active, |
||||||
|
.btn-primary.disabled.active, |
||||||
|
.btn-primary[disabled].active, |
||||||
|
fieldset[disabled] .btn-primary.active { |
||||||
|
background-color: #265a88; |
||||||
|
background-image: none; |
||||||
|
} |
||||||
|
.btn-success { |
||||||
|
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%); |
||||||
|
background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641)); |
||||||
|
background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); |
||||||
|
background-repeat: repeat-x; |
||||||
|
border-color: #3e8f3e; |
||||||
|
} |
||||||
|
.btn-success:hover, |
||||||
|
.btn-success:focus { |
||||||
|
background-color: #419641; |
||||||
|
background-position: 0 -15px; |
||||||
|
} |
||||||
|
.btn-success:active, |
||||||
|
.btn-success.active { |
||||||
|
background-color: #419641; |
||||||
|
border-color: #3e8f3e; |
||||||
|
} |
||||||
|
.btn-success.disabled, |
||||||
|
.btn-success[disabled], |
||||||
|
fieldset[disabled] .btn-success, |
||||||
|
.btn-success.disabled:hover, |
||||||
|
.btn-success[disabled]:hover, |
||||||
|
fieldset[disabled] .btn-success:hover, |
||||||
|
.btn-success.disabled:focus, |
||||||
|
.btn-success[disabled]:focus, |
||||||
|
fieldset[disabled] .btn-success:focus, |
||||||
|
.btn-success.disabled.focus, |
||||||
|
.btn-success[disabled].focus, |
||||||
|
fieldset[disabled] .btn-success.focus, |
||||||
|
.btn-success.disabled:active, |
||||||
|
.btn-success[disabled]:active, |
||||||
|
fieldset[disabled] .btn-success:active, |
||||||
|
.btn-success.disabled.active, |
||||||
|
.btn-success[disabled].active, |
||||||
|
fieldset[disabled] .btn-success.active { |
||||||
|
background-color: #419641; |
||||||
|
background-image: none; |
||||||
|
} |
||||||
|
.btn-info { |
||||||
|
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); |
||||||
|
background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2)); |
||||||
|
background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); |
||||||
|
background-repeat: repeat-x; |
||||||
|
border-color: #28a4c9; |
||||||
|
} |
||||||
|
.btn-info:hover, |
||||||
|
.btn-info:focus { |
||||||
|
background-color: #2aabd2; |
||||||
|
background-position: 0 -15px; |
||||||
|
} |
||||||
|
.btn-info:active, |
||||||
|
.btn-info.active { |
||||||
|
background-color: #2aabd2; |
||||||
|
border-color: #28a4c9; |
||||||
|
} |
||||||
|
.btn-info.disabled, |
||||||
|
.btn-info[disabled], |
||||||
|
fieldset[disabled] .btn-info, |
||||||
|
.btn-info.disabled:hover, |
||||||
|
.btn-info[disabled]:hover, |
||||||
|
fieldset[disabled] .btn-info:hover, |
||||||
|
.btn-info.disabled:focus, |
||||||
|
.btn-info[disabled]:focus, |
||||||
|
fieldset[disabled] .btn-info:focus, |
||||||
|
.btn-info.disabled.focus, |
||||||
|
.btn-info[disabled].focus, |
||||||
|
fieldset[disabled] .btn-info.focus, |
||||||
|
.btn-info.disabled:active, |
||||||
|
.btn-info[disabled]:active, |
||||||
|
fieldset[disabled] .btn-info:active, |
||||||
|
.btn-info.disabled.active, |
||||||
|
.btn-info[disabled].active, |
||||||
|
fieldset[disabled] .btn-info.active { |
||||||
|
background-color: #2aabd2; |
||||||
|
background-image: none; |
||||||
|
} |
||||||
|
.btn-warning { |
||||||
|
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); |
||||||
|
background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316)); |
||||||
|
background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); |
||||||
|
background-repeat: repeat-x; |
||||||
|
border-color: #e38d13; |
||||||
|
} |
||||||
|
.btn-warning:hover, |
||||||
|
.btn-warning:focus { |
||||||
|
background-color: #eb9316; |
||||||
|
background-position: 0 -15px; |
||||||
|
} |
||||||
|
.btn-warning:active, |
||||||
|
.btn-warning.active { |
||||||
|
background-color: #eb9316; |
||||||
|
border-color: #e38d13; |
||||||
|
} |
||||||
|
.btn-warning.disabled, |
||||||
|
.btn-warning[disabled], |
||||||
|
fieldset[disabled] .btn-warning, |
||||||
|
.btn-warning.disabled:hover, |
||||||
|
.btn-warning[disabled]:hover, |
||||||
|
fieldset[disabled] .btn-warning:hover, |
||||||
|
.btn-warning.disabled:focus, |
||||||
|
.btn-warning[disabled]:focus, |
||||||
|
fieldset[disabled] .btn-warning:focus, |
||||||
|
.btn-warning.disabled.focus, |
||||||
|
.btn-warning[disabled].focus, |
||||||
|
fieldset[disabled] .btn-warning.focus, |
||||||
|
.btn-warning.disabled:active, |
||||||
|
.btn-warning[disabled]:active, |
||||||
|
fieldset[disabled] .btn-warning:active, |
||||||
|
.btn-warning.disabled.active, |
||||||
|
.btn-warning[disabled].active, |
||||||
|
fieldset[disabled] .btn-warning.active { |
||||||
|
background-color: #eb9316; |
||||||
|
background-image: none; |
||||||
|
} |
||||||
|
.btn-danger { |
||||||
|
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%); |
||||||
|
background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a)); |
||||||
|
background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); |
||||||
|
background-repeat: repeat-x; |
||||||
|
border-color: #b92c28; |
||||||
|
} |
||||||
|
.btn-danger:hover, |
||||||
|
.btn-danger:focus { |
||||||
|
background-color: #c12e2a; |
||||||
|
background-position: 0 -15px; |
||||||
|
} |
||||||
|
.btn-danger:active, |
||||||
|
.btn-danger.active { |
||||||
|
background-color: #c12e2a; |
||||||
|
border-color: #b92c28; |
||||||
|
} |
||||||
|
.btn-danger.disabled, |
||||||
|
.btn-danger[disabled], |
||||||
|
fieldset[disabled] .btn-danger, |
||||||
|
.btn-danger.disabled:hover, |
||||||
|
.btn-danger[disabled]:hover, |
||||||
|
fieldset[disabled] .btn-danger:hover, |
||||||
|
.btn-danger.disabled:focus, |
||||||
|
.btn-danger[disabled]:focus, |
||||||
|
fieldset[disabled] .btn-danger:focus, |
||||||
|
.btn-danger.disabled.focus, |
||||||
|
.btn-danger[disabled].focus, |
||||||
|
fieldset[disabled] .btn-danger.focus, |
||||||
|
.btn-danger.disabled:active, |
||||||
|
.btn-danger[disabled]:active, |
||||||
|
fieldset[disabled] .btn-danger:active, |
||||||
|
.btn-danger.disabled.active, |
||||||
|
.btn-danger[disabled].active, |
||||||
|
fieldset[disabled] .btn-danger.active { |
||||||
|
background-color: #c12e2a; |
||||||
|
background-image: none; |
||||||
|
} |
||||||
|
.thumbnail, |
||||||
|
.img-thumbnail { |
||||||
|
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); |
||||||
|
box-shadow: 0 1px 2px rgba(0, 0, 0, .075); |
||||||
|
} |
||||||
|
.dropdown-menu > li > a:hover, |
||||||
|
.dropdown-menu > li > a:focus { |
||||||
|
background-color: #e8e8e8; |
||||||
|
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); |
||||||
|
background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); |
||||||
|
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); |
||||||
|
background-repeat: repeat-x; |
||||||
|
} |
||||||
|
.dropdown-menu > .active > a, |
||||||
|
.dropdown-menu > .active > a:hover, |
||||||
|
.dropdown-menu > .active > a:focus { |
||||||
|
background-color: #2e6da4; |
||||||
|
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); |
||||||
|
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); |
||||||
|
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); |
||||||
|
background-repeat: repeat-x; |
||||||
|
} |
||||||
|
.navbar-default { |
||||||
|
background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%); |
||||||
|
background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8)); |
||||||
|
background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); |
||||||
|
background-repeat: repeat-x; |
||||||
|
border-radius: 4px; |
||||||
|
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); |
||||||
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); |
||||||
|
} |
||||||
|
.navbar-default .navbar-nav > .open > a, |
||||||
|
.navbar-default .navbar-nav > .active > a { |
||||||
|
background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); |
||||||
|
background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2)); |
||||||
|
background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0); |
||||||
|
background-repeat: repeat-x; |
||||||
|
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); |
||||||
|
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); |
||||||
|
} |
||||||
|
.navbar-brand, |
||||||
|
.navbar-nav > li > a { |
||||||
|
text-shadow: 0 1px 0 rgba(255, 255, 255, .25); |
||||||
|
} |
||||||
|
.navbar-inverse { |
||||||
|
background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%); |
||||||
|
background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222)); |
||||||
|
background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); |
||||||
|
background-repeat: repeat-x; |
||||||
|
border-radius: 4px; |
||||||
|
} |
||||||
|
.navbar-inverse .navbar-nav > .open > a, |
||||||
|
.navbar-inverse .navbar-nav > .active > a { |
||||||
|
background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%); |
||||||
|
background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f)); |
||||||
|
background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0); |
||||||
|
background-repeat: repeat-x; |
||||||
|
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); |
||||||
|
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); |
||||||
|
} |
||||||
|
.navbar-inverse .navbar-brand, |
||||||
|
.navbar-inverse .navbar-nav > li > a { |
||||||
|
text-shadow: 0 -1px 0 rgba(0, 0, 0, .25); |
||||||
|
} |
||||||
|
.navbar-static-top, |
||||||
|
.navbar-fixed-top, |
||||||
|
.navbar-fixed-bottom { |
||||||
|
border-radius: 0; |
||||||
|
} |
||||||
|
@media (max-width: 767px) { |
||||||
|
.navbar .navbar-nav .open .dropdown-menu > .active > a, |
||||||
|
.navbar .navbar-nav .open .dropdown-menu > .active > a:hover, |
||||||
|
.navbar .navbar-nav .open .dropdown-menu > .active > a:focus { |
||||||
|
color: #fff; |
||||||
|
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); |
||||||
|
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); |
||||||
|
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); |
||||||
|
background-repeat: repeat-x; |
||||||
|
} |
||||||
|
} |
||||||
|
.alert { |
||||||
|
text-shadow: 0 1px 0 rgba(255, 255, 255, .2); |
||||||
|
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); |
||||||
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); |
||||||
|
} |
||||||
|
.alert-success { |
||||||
|
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); |
||||||
|
background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc)); |
||||||
|
background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0); |
||||||
|
background-repeat: repeat-x; |
||||||
|
border-color: #b2dba1; |
||||||
|
} |
||||||
|
.alert-info { |
||||||
|
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%); |
||||||
|
background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0)); |
||||||
|
background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0); |
||||||
|
background-repeat: repeat-x; |
||||||
|
border-color: #9acfea; |
||||||
|
} |
||||||
|
.alert-warning { |
||||||
|
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); |
||||||
|
background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0)); |
||||||
|
background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0); |
||||||
|
background-repeat: repeat-x; |
||||||
|
border-color: #f5e79e; |
||||||
|
} |
||||||
|
.alert-danger { |
||||||
|
background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); |
||||||
|
background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3)); |
||||||
|
background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0); |
||||||
|
background-repeat: repeat-x; |
||||||
|
border-color: #dca7a7; |
||||||
|
} |
||||||
|
.progress { |
||||||
|
background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); |
||||||
|
background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5)); |
||||||
|
background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0); |
||||||
|
background-repeat: repeat-x; |
||||||
|
} |
||||||
|
.progress-bar { |
||||||
|
background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%); |
||||||
|
background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090)); |
||||||
|
background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0); |
||||||
|
background-repeat: repeat-x; |
||||||
|
} |
||||||
|
.progress-bar-success { |
||||||
|
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%); |
||||||
|
background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44)); |
||||||
|
background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0); |
||||||
|
background-repeat: repeat-x; |
||||||
|
} |
||||||
|
.progress-bar-info { |
||||||
|
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); |
||||||
|
background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5)); |
||||||
|
background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0); |
||||||
|
background-repeat: repeat-x; |
||||||
|
} |
||||||
|
.progress-bar-warning { |
||||||
|
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); |
||||||
|
background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f)); |
||||||
|
background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0); |
||||||
|
background-repeat: repeat-x; |
||||||
|
} |
||||||
|
.progress-bar-danger { |
||||||
|
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%); |
||||||
|
background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c)); |
||||||
|
background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0); |
||||||
|
background-repeat: repeat-x; |
||||||
|
} |
||||||
|
.progress-bar-striped { |
||||||
|
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); |
||||||
|
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); |
||||||
|
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); |
||||||
|
} |
||||||
|
.list-group { |
||||||
|
border-radius: 4px; |
||||||
|
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); |
||||||
|
box-shadow: 0 1px 2px rgba(0, 0, 0, .075); |
||||||
|
} |
||||||
|
.list-group-item.active, |
||||||
|
.list-group-item.active:hover, |
||||||
|
.list-group-item.active:focus { |
||||||
|
text-shadow: 0 -1px 0 #286090; |
||||||
|
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%); |
||||||
|
background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a)); |
||||||
|
background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0); |
||||||
|
background-repeat: repeat-x; |
||||||
|
border-color: #2b669a; |
||||||
|
} |
||||||
|
.list-group-item.active .badge, |
||||||
|
.list-group-item.active:hover .badge, |
||||||
|
.list-group-item.active:focus .badge { |
||||||
|
text-shadow: none; |
||||||
|
} |
||||||
|
.panel { |
||||||
|
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05); |
||||||
|
box-shadow: 0 1px 2px rgba(0, 0, 0, .05); |
||||||
|
} |
||||||
|
.panel-default > .panel-heading { |
||||||
|
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); |
||||||
|
background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); |
||||||
|
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); |
||||||
|
background-repeat: repeat-x; |
||||||
|
} |
||||||
|
.panel-primary > .panel-heading { |
||||||
|
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); |
||||||
|
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); |
||||||
|
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); |
||||||
|
background-repeat: repeat-x; |
||||||
|
} |
||||||
|
.panel-success > .panel-heading { |
||||||
|
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); |
||||||
|
background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6)); |
||||||
|
background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0); |
||||||
|
background-repeat: repeat-x; |
||||||
|
} |
||||||
|
.panel-info > .panel-heading { |
||||||
|
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); |
||||||
|
background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3)); |
||||||
|
background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0); |
||||||
|
background-repeat: repeat-x; |
||||||
|
} |
||||||
|
.panel-warning > .panel-heading { |
||||||
|
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); |
||||||
|
background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc)); |
||||||
|
background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0); |
||||||
|
background-repeat: repeat-x; |
||||||
|
} |
||||||
|
.panel-danger > .panel-heading { |
||||||
|
background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%); |
||||||
|
background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc)); |
||||||
|
background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0); |
||||||
|
background-repeat: repeat-x; |
||||||
|
} |
||||||
|
.well { |
||||||
|
background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); |
||||||
|
background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); |
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5)); |
||||||
|
background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%); |
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0); |
||||||
|
background-repeat: repeat-x; |
||||||
|
border-color: #dcdcdc; |
||||||
|
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); |
||||||
|
box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); |
||||||
|
} |
||||||
|
/*# sourceMappingURL=bootstrap-theme.css.map */ |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
After Width: | Height: | Size: 106 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 368 B |
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -0,0 +1,13 @@ |
|||||||
|
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
|
||||||
|
require('../../js/transition.js') |
||||||
|
require('../../js/alert.js') |
||||||
|
require('../../js/button.js') |
||||||
|
require('../../js/carousel.js') |
||||||
|
require('../../js/collapse.js') |
||||||
|
require('../../js/dropdown.js') |
||||||
|
require('../../js/modal.js') |
||||||
|
require('../../js/tooltip.js') |
||||||
|
require('../../js/popover.js') |
||||||
|
require('../../js/scrollspy.js') |
||||||
|
require('../../js/tab.js') |
||||||
|
require('../../js/affix.js') |
@ -0,0 +1,32 @@ |
|||||||
|
; |
||||||
|
!(function ($) {//闭包的写法,前面最好是带一个; 要不然容易出问题。。
|
||||||
|
/** |
||||||
|
* 还是直接继承默认的文本框对象,默认的文本框就是FR.TextEditor |
||||||
|
*/ |
||||||
|
FR.StyleTextEditor = FR.extend(FR.TextEditor, { |
||||||
|
/** |
||||||
|
* 初始化方法, |
||||||
|
* @private |
||||||
|
*/ |
||||||
|
_init: function () { |
||||||
|
debugger |
||||||
|
FR.StyleTextEditor.superclass._init.apply(this, arguments); |
||||||
|
}, |
||||||
|
/** |
||||||
|
* 这个是针对颜色需要修改的方法, 从控件的options方法里面获取后台传递过来的属性,这边直接获取fontColor属性值,可以上面去看下DemoWidget |
||||||
|
* 的返回 |
||||||
|
* @returns {*|jQuery|HTMLElement} |
||||||
|
* @private |
||||||
|
*/ |
||||||
|
_createEditComp: function () { |
||||||
|
|
||||||
|
debugger |
||||||
|
return $(' <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Email">');//返回的文本框带上颜色属性
|
||||||
|
} |
||||||
|
|
||||||
|
}) |
||||||
|
/** |
||||||
|
* 使用shortcut方法注册控件,styletext 这个是一个控件名称需要唯一而且和widget的getXType返回的值需要是一样的 |
||||||
|
*/ |
||||||
|
$.shortcut("my.editor", FR.StyleTextEditor); |
||||||
|
})(jQuery); |
Loading…
Reference in new issue