Browse Source

Merge remote-tracking branch 'origin/master'

es6
Young 7 years ago
parent
commit
6fd4cb0e31
  1. 246
      Gruntfile.js
  2. 28
      demo/js/base/button/demo.button.js
  3. 1
      demo/js/base/editor/demo.editor.js
  4. 1
      demo/js/base/editor/demo.sql_editor.js
  5. 9
      demo/js/case/combo/demo.icon_combo.js
  6. 7
      demo/js/case/combo/demo.icon_text_value_combo.js
  7. 10
      demo/js/case/combo/demo.text_value_combo.js
  8. 134
      demo/js/case/tree/demo.simple_tree.js
  9. 45
      demo/js/core/layout/demo.flow.js
  10. 1
      demo/js/core/layout/demo.horizontal.js
  11. 1
      demo/js/core/layout/demo.vertical.js
  12. 5
      demo/js/core/layout/demo.vtape.js
  13. 6
      demo/js/widget/basewidget/demo.buttons.js
  14. 4
      demo/js/widget/basewidget/demo.items.js
  15. 56
      demo/js/widget/basewidget/demo.mask.loading.js
  16. 3
      demo/js/widget/selecttree/demo.multilayer_select_tree_combo.js
  17. 3
      demo/js/widget/selecttree/demo.select_tree_combo.js
  18. 5
      demo/js/widget/singletree/demo.single_tree_combo.js
  19. 3
      demo/js/widget/tree/demo.multilayer_select_level_tree.js
  20. 3
      demo/js/widget/tree/demo.multilayer_single_level_tree.js
  21. 5
      demo/js/widget/tree/demo.select_level_tree.js
  22. 5
      demo/js/widget/tree/demo.single_level_tree.js
  23. 3
      demo/js/widget/tree/demo.switchtree.js
  24. 31
      dist/README.md
  25. 458
      dist/base.css
  26. 127
      dist/base.js
  27. 1296
      dist/bundle.css
  28. 1169
      dist/bundle.js
  29. 2
      dist/bundle.min.css
  30. 86
      dist/bundle.min.js
  31. 449
      dist/case.js
  32. 502
      dist/core.css
  33. 500
      dist/core.js
  34. 495
      dist/core_without_normalize.css
  35. 341
      dist/demo.js
  36. 4746
      dist/fineui.css
  37. 100368
      dist/fineui.js
  38. 1
      dist/fineui.min.css
  39. 50
      dist/fineui.min.js
  40. 7
      dist/fix/fix.js
  41. 1
      dist/resource.css
  42. 274
      dist/widget.css
  43. 93
      dist/widget.js
  44. 834
      package-lock.json
  45. 2
      package.json
  46. 23
      src/base/combination/combo.js
  47. 23
      src/base/combination/expander.js
  48. 9
      src/base/combination/group.button.js
  49. 10
      src/base/combination/searcher.js
  50. 21
      src/base/combination/switcher.js
  51. 2
      src/base/layer/layer.popup.js
  52. 6
      src/base/layer/layer.searcher.js
  53. 3
      src/base/single/button/button.basic.js
  54. 7
      src/base/single/button/buttons/button.js
  55. 4
      src/base/single/editor/editor.js
  56. 3
      src/base/single/input/input.js
  57. 7
      src/base/sql/editor.sql.js
  58. 3
      src/base/tree/customtree.js
  59. 6
      src/base/tree/treeview.js
  60. 10
      src/case/button/icon/icon.change.js
  61. 5
      src/case/button/item.singleselect.icontext.js
  62. 4
      src/case/checkbox/check.arrowtreegroupnode.js
  63. 4
      src/case/checkbox/check.checkingmarknode.js
  64. 4
      src/case/checkbox/check.treegroupnode.js
  65. 50
      src/case/colorchooser/colorchooser.js
  66. 9
      src/case/colorchooser/colorchooser.popup.js
  67. 3
      src/case/colorchooser/colorpicker/colorpicker.js
  68. 4
      src/case/combo/iconcombo/combo.icon.js
  69. 14
      src/case/combo/iconcombo/trigger.iconcombo.js
  70. 1
      src/case/combo/icontextvaluecombo/combo.icontextvalue.js
  71. 4
      src/case/combo/staticcombo/combo.static.js
  72. 3
      src/case/combo/textvaluecombo/combo.textvalue.js
  73. 3
      src/case/combo/textvaluecombo/popup.textvalue.js
  74. 4
      src/case/layer/panel.js
  75. 188
      src/case/richeditor/bar/action.richeditor.param.js
  76. 24
      src/case/toolbar/toolbar.multiselect.js
  77. 4
      src/case/tree/tree.level.js
  78. 10
      src/case/tree/tree.simple.js
  79. 7
      src/case/trigger/trigger.icon.text.js
  80. 32
      src/case/trigger/trigger.icon.text.select.js
  81. 9
      src/case/trigger/trigger.text.js
  82. 22
      src/case/trigger/trigger.text.select.js
  83. 30
      src/case/trigger/trigger.text.select.small.js
  84. 0
      src/core/config.js
  85. 26
      src/core/controller/controller.layer.js
  86. 8
      src/core/wrapper/layout/adapt/absolute.center.js
  87. 12
      src/core/wrapper/layout/adapt/absolute.horizontal.js
  88. 12
      src/core/wrapper/layout/adapt/absolute.vertical.js
  89. 16
      src/core/wrapper/layout/adapt/adapt.center.js
  90. 16
      src/core/wrapper/layout/adapt/adapt.horizontal.js
  91. 16
      src/core/wrapper/layout/adapt/adapt.vertical.js
  92. 16
      src/core/wrapper/layout/adapt/auto.horizontal.js
  93. 16
      src/core/wrapper/layout/flex/flex.horizontal.js
  94. 16
      src/core/wrapper/layout/flex/flex.vertical.center.js
  95. 16
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js
  96. 16
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.center.js
  97. 48
      src/core/wrapper/layout/layout.flow.js
  98. 17
      src/core/wrapper/layout/layout.horizontal.js
  99. 20
      src/core/wrapper/layout/layout.tape.js
  100. 16
      src/core/wrapper/layout/layout.vertical.js
  101. Some files were not shown because too many files have changed in this diff Show More

246
Gruntfile.js

@ -2,172 +2,181 @@ module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
pkg: grunt.file.readJSON("package.json"),
concat: {
options: {
separator: ''
separator: ""
},
polyfillJs: {
src: ['src/polyfill/**/*.js'],
dest: 'dist/polyfill.js'
src: ["src/polyfill/**/*.js"],
dest: "dist/polyfill.js"
},
coreJs: {
src: [
'src/core/jquery.js',
'src/core/underscore.js',
'src/core/foundation.js',
"src/core/jquery.js",
"src/core/underscore.js",
"src/core/foundation.js",
// 'src/core/mvc/**/*.js',
'src/core/base.js',
'src/core/ob.js',
'src/core/widget.js',
"src/core/base.js",
"src/core/ob.js",
"src/core/widget.js",
// 'src/core/model.js',
// 'src/core/view.js',
'src/core/shortcut.js',
'src/core/utils/*.js',
'src/core/behavior/behavior.js',
'src/core/wrapper/layout.js',
'src/core/**/*.js',
'src/data/data.js',
'src/data/**/*.js'
"src/core/shortcut.js",
"src/core/utils/*.js",
"src/core/behavior/behavior.js",
"src/core/wrapper/layout.js",
"src/core/plugin.js",
"src/core/**/*.js",
"src/data/data.js",
"src/data/**/*.js"
],
dest: 'dist/core.js'
dest: "dist/core.js"
},
//最基础的控件
// 最基础的控件
baseJs: {
src: [
'src/third/**/*.js',
'src/base/formula/config.js',
'src/base/pane.js',
'src/base/single/single.js',
'src/base/single/text.js',
'src/base/single/button/button.basic.js',
'src/base/single/button/button.node.js',
'src/base/single/tip/tip.js',
'src/base/combination/group.button.js',
'src/base/combination/tree.button.js',
'src/base/combination/map.button.js',
'src/base/tree/treeview.js',
'src/base/tree/asynctree.js',
'src/base/tree/parttree.js',
'src/base/**/*.js'
"src/third/**/*.js",
"src/base/formula/config.js",
"src/base/pane.js",
"src/base/single/single.js",
"src/base/single/text.js",
"src/base/single/button/button.basic.js",
"src/base/single/button/button.node.js",
"src/base/single/tip/tip.js",
"src/base/combination/group.button.js",
"src/base/combination/tree.button.js",
"src/base/combination/map.button.js",
"src/base/tree/treeview.js",
"src/base/tree/asynctree.js",
"src/base/tree/parttree.js",
"src/base/**/*.js"
],
dest: 'dist/base.js'
dest: "dist/base.js"
},
//实现好的一些基础实例
// 实现好的一些基础实例
caseJs: {
src: [
'src/case/combo/popup.bubble.js',
'src/case/**/*.js'
"src/case/combo/popup.bubble.js",
"src/case/**/*.js"
],
dest: 'dist/case.js'
dest: "dist/case.js"
},
widgetJs: {
src: [
'src/widget/paramsettingcombo/popup.param.js',
'src/widget/sequencetable/treenumber.sequencetable.js',
'src/widget/**/*.js',
'src/component/**/*.js'
"src/widget/paramsettingcombo/popup.param.js",
"src/widget/sequencetable/treenumber.sequencetable.js",
"src/widget/**/*.js",
"src/component/**/*.js"
],
dest: 'dist/widget.js'
dest: "dist/widget.js"
},
routerJs: {
src: [
'src/router/**/*.js'
"src/router/**/*.js"
],
dest: 'dist/router.js'
dest: "dist/router.js"
},
chartJs: {
src: [
'src/addons/chart/chart.js',
'src/addons/chart/chart.combine.js',
'src/addons/chart/factory.charts.js',
'src/addons/chart/**/*.js'
"src/addons/chart/chart.js",
"src/addons/chart/chart.combine.js",
"src/addons/chart/factory.charts.js",
"src/addons/chart/**/*.js"
],
dest: 'dist/chart.js'
dest: "dist/chart.js"
},
coreCss: {
src: ['src/css/core/**/*.css', 'src/css/theme/**/*.css'],
dest: 'dist/core.css'
src: ["src/css/core/**/*.css", "src/css/theme/**/*.css"],
dest: "dist/core.css"
},
coreWithoutNormalizeCss: {
src: ['src/css/core/**/*.css', 'src/css/theme/**/*.css', '!src/css/core/normalize.css','!src/css/core/normalize2.css'],
dest: 'dist/core_without_normalize.css'
src: ["src/css/core/**/*.css", "src/css/theme/**/*.css", "!src/css/core/normalize.css", "!src/css/core/normalize2.css"],
dest: "dist/core_without_normalize.css"
},
baseCss: {
src: ['src/css/base/**/*.css'],
dest: 'dist/base.css'
src: ["src/css/base/**/*.css"],
dest: "dist/base.css"
},
widgetCss: {
src: ['src/css/widget/**/*.css'],
dest: 'dist/widget.css'
src: ["src/css/widget/**/*.css"],
dest: "dist/widget.css"
},
resourceCss: {
src: ['src/css/resource/**/*.css'],
dest: 'dist/resource.css'
src: ["src/css/resource/**/*.css"],
dest: "dist/resource.css"
},
publicBundleJs: {
src: ['public/js/**/*.js', 'public/js/index.js'],
dest: 'public/bundle.js'
src: ["public/js/**/*.js", "public/js/index.js"],
dest: "public/bundle.js"
},
bundleJs: {
src: ['dist/core.js', 'dist/base.js', 'dist/case.js', 'dist/widget.js', 'dist/router.js', 'public/js/**/*.js', 'public/js/index.js'],
dest: 'dist/bundle.js'
src: ["dist/core.js", "dist/base.js", "dist/case.js", "dist/widget.js", "dist/router.js", "public/js/**/*.js", "public/js/index.js"],
dest: "dist/bundle.js"
},
publicBundleCss: {
src: ['public/css/app.css', 'public/css/**/*.css'],
dest: 'public/bundle.css'
src: ["public/css/app.css", "public/css/**/*.css"],
dest: "public/bundle.css"
},
bundleCss: {
src: ['dist/core.css', 'dist/base.css', 'dist/widget.css', 'public/css/app.css', 'public/css/**/*.css'],
dest: 'dist/bundle.css'
src: ["dist/core.css", "dist/base.css", "dist/widget.css", "public/css/app.css", "public/css/**/*.css"],
dest: "dist/bundle.css"
},
configJs: {
src: ['demo/version.js'],
dest: 'dist/config.js'
src: ["demo/version.js"],
dest: "dist/config.js"
},
demoJs: {
src: ['demo/app.js', 'demo/js/**/*.js', ' demo/config.js'],
dest: 'dist/demo.js'
src: ["demo/app.js", "demo/js/**/*.js", " demo/config.js"],
dest: "dist/demo.js"
},
demoCss: {
src: ['demo/css/**/*.css'],
dest: 'dist/demo.css'
src: ["demo/css/**/*.css"],
dest: "dist/demo.css"
},
fineuiJs: {
src: ["dist/polyfill.js", "dist/core.js", "dist/fix/fix.js", "dist/fix/fix.compact.js", "dist/base.js", "dist/case.js", "dist/widget.js"],
dest: "dist/fineui.js"
},
fineuiCss: {
src: ["dist/core.css", "dist/base.css", "dist/widget.css"],
dest: "dist/fineui.css"
},
utilsJs: {
src: [
'src/core/underscore.js',
'src/core/foundation.js',
'src/core/var.js',
'src/core/proto/array.js',
'src/core/proto/number.js',
'src/core/proto/string.js',
'src/core/base.js',
'src/core/ob.js',
'src/core/alias.js',
'src/core/inject.js',
'src/core/utils/*.js',
'src/data/data.js',
'src/data/**/*.js'
"src/core/underscore.js",
"src/core/foundation.js",
"src/core/var.js",
"src/core/proto/array.js",
"src/core/proto/number.js",
"src/core/proto/string.js",
"src/core/base.js",
"src/core/ob.js",
"src/core/alias.js",
"src/core/inject.js",
"src/core/utils/*.js",
"src/data/data.js",
"src/data/**/*.js"
],
dest: 'utils/utils.js'
},
dest: "utils/utils.js"
}
},
less: {
demo: {
expand: true,
cwd: 'demo/less',
src: ['**/*.less'],
dest: 'demo/css/',
ext: '.css'
cwd: "demo/less",
src: ["**/*.less"],
dest: "demo/css/",
ext: ".css"
},
main: {
expand: true,
@ -176,6 +185,13 @@ module.exports = function (grunt) {
dest: "public/css",
ext: ".css"
},
src: {
expand: true,
cwd: "src/less",
src: ["**/*.less"],
dest: "src/css",
ext: ".css"
},
dev: {
options: {
compress: true,
@ -186,11 +202,12 @@ module.exports = function (grunt) {
uglify: {
options: {
banner: '/*! <%= pkg.name %> */\n'
banner: "/*! <%= pkg.name %> */\n"
},
dist: {
files: {
'dist/bundle.min.js': ['<%= concat.bundleJs.dest %>'],
"dist/bundle.min.js": ["<%= concat.bundleJs.dest %>"],
"dist/fineui.min.js": ["<%= concat.fineuiJs.dest %>"]
}
}
},
@ -199,15 +216,22 @@ module.exports = function (grunt) {
bundleCss: {
src: '<%= concat.bundleCss.dest %>',
src: "<%= concat.bundleCss.dest %>",
dest: 'dist/bundle.min.css'
dest: "dist/bundle.min.css"
},
fineuiCss: {
src: "<%= concat.fineuiCss.dest %>",
dest: "dist/fineui.min.css"
}
},
jshint: {
files: ['Gruntfile.js', 'src/**/*.js'],
files: ["Gruntfile.js", "src/**/*.js"],
options: {
globals: {
jQuery: true,
@ -219,8 +243,8 @@ module.exports = function (grunt) {
},
watch: {
scripts: {
files: ['src/**/*.js', 'demo/js/**/*.js', 'demo/version.js', 'demo/config.js', 'demo/less/**/*.less'],
tasks: ['less', 'concat'],
files: ["src/**/*.js", "demo/js/**/*.js", "demo/version.js", "demo/config.js", "demo/less/**/*.less"],
tasks: ["less", "concat"],
options: {
spanw: true,
interrupt: true
@ -229,13 +253,13 @@ module.exports = function (grunt) {
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-less");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-contrib-concat");
grunt.loadNpmTasks("grunt-contrib-cssmin");
grunt.registerTask('default', ['less', 'concat', 'watch']);
grunt.registerTask('min', ['less', 'concat', 'uglify', 'cssmin']);
grunt.registerTask("default", ["less", "concat", "watch"]);
grunt.registerTask("min", ["less", "concat", "uglify", "cssmin"]);
};

28
demo/js/base/button/demo.button.js

@ -54,7 +54,7 @@ Demo.Button = BI.inherit(BI.Widget, {
type: "bi.button",
text: "带图标的按钮",
// level: 'ignore',
iconClass: "close-font",
iconCls: "close-font",
height: 30
}
}, {
@ -114,7 +114,7 @@ Demo.Button = BI.inherit(BI.Widget, {
text: "带图标的按钮",
block: true,
// level: 'ignore',
iconClass: "close-font",
iconCls: "close-font",
height: 30
}
}, {
@ -174,9 +174,31 @@ Demo.Button = BI.inherit(BI.Widget, {
text: "带图标的按钮",
clear: true,
// level: 'ignore',
iconClass: "close-font",
iconCls: "close-font",
height: 30
}
}, {
el: {
type: "bi.multi_select_bar",
selected: true,
halfSelected: true
}
}, {
el: {
type: "bi.multi_select_bar",
selected: true,
halfSelected: false
}
}, {
el: {
type: "bi.multi_select_bar",
selected: false,
halfSelected: true
}
}, {
el: {
type: "bi.multi_select_bar"
}
}
];
BI.each(items, function (i, item) {

1
demo/js/base/editor/demo.editor.js

@ -35,6 +35,7 @@ Demo.Editor = BI.inherit(BI.Widget, {
cls: "mvc-border",
watermark: "输入'a'会有错误信息且回车键不能退出编辑",
errorText: "字段不可重名",
value: "a",
validationChecker: function (v) {
if (v == "a") {
return false;

1
demo/js/base/editor/demo.sql_editor.js

@ -9,6 +9,7 @@ Demo.SQLEditor = BI.inherit(BI.Widget, {
var self = this;
this.formula = BI.createWidget({
type : 'bi.sql_editor',
supportParam: true,
width : 300,
height : 200,
value : "select * from DEMO_CONTRACT where 合同类型 = ${长期协议} and 购买数量 = sum([1,2,3,4])"

9
demo/js/case/combo/demo.icon_combo.js

@ -15,21 +15,20 @@ Demo.IconCombo = BI.inherit(BI.Widget, {
type: "bi.horizontal_auto",
items: [{
type: "bi.icon_combo",
trigger: "click-hover",
container: "body",
ref: function (_ref) {
self.refs = _ref;
},
iconClass: "search-font",
iconCls: "search-font",
items: [{
value: "第一项",
iconClass: "close-font"
iconCls: "close-font"
}, {
value: "第二项",
iconClass: "search-font"
iconCls: "search-font"
}, {
value: "第三项",
iconClass: "copy-font"
iconCls: "copy-font"
}]
}],
vgap: 20

7
demo/js/case/combo/demo.icon_text_value_combo.js

@ -12,18 +12,19 @@ Demo.IconTextValueCombo = BI.inherit(BI.Widget, {
items: [{
type: "bi.icon_text_value_combo",
text: "默认值",
value: 1,
width: 300,
items: [{
text: "MVC-1",
iconClass: "close-font",
iconCls: "close-font",
value: 1
}, {
text: "MVC-2",
iconClass: "date-font",
iconCls: "date-font",
value: 2
}, {
text: "MVC-3",
iconClass: "search-close-h-font",
iconCls: "search-close-h-font",
value: 3
}]
}],

10
demo/js/case/combo/demo.text_value_combo.js

@ -10,20 +10,20 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, {
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.icon_text_value_combo",
text: "默认值",
type: "bi.text_value_combo",
value: "默认值",
width: 300,
items: [{
text: "MVC-1",
iconClass: "date-font",
iconCls: "date-font",
value: 1
}, {
text: "MVC-2",
iconClass: "search-font",
iconCls: "search-font",
value: 2
}, {
text: "MVC-3",
iconClass: "pull-right-font",
iconCls: "pull-right-font",
value: 3
}]
}],

134
demo/js/case/tree/demo.simple_tree.js

@ -7,53 +7,97 @@ Demo.Func = BI.inherit(BI.Widget, {
// value值一定要是字符串
var tree = BI.createWidget({
type: "bi.simple_tree",
items: []
items: [{
id: 1,
text: "第一项",
value: "1"
}, {
id: 2,
text: "第二项",
value: "2"
}, {
id: 3,
text: "第三项",
value: "3",
open: true
}, {
id: 11,
pId: 1,
text: "子项1",
value: "11"
}, {
id: 12,
pId: 1,
text: "子项2",
value: "12"
}, {
id: 13,
pId: 1,
text: "子项3",
value: "13"
}, {
id: 31,
pId: 3,
text: "子项1",
value: "31"
}, {
id: 32,
pId: 3,
text: "子项2",
value: "32"
}, {
id: 33,
pId: 3,
text: "子项3",
value: "33"
}],
value: ["31", "32", "33"]
});
tree.populate([{
id: 1,
text: "第一项",
value: "1"
}, {
id: 2,
text: "第二项",
value: "2"
}, {
id: 3,
text: "第三项",
value: "3",
open: true
}, {
id: 11,
pId: 1,
text: "子项1",
value: "11"
}, {
id: 12,
pId: 1,
text: "子项2",
value: "12"
}, {
id: 13,
pId: 1,
text: "子项3",
value: "13"
}, {
id: 31,
pId: 3,
text: "子项1",
value: "31"
}, {
id: 32,
pId: 3,
text: "子项2",
value: "32"
}, {
id: 33,
pId: 3,
text: "子项3",
value: "33"
}], "z");
// tree.populate([{
// id: 1,
// text: "第一项",
// value: "1"
// }, {
// id: 2,
// text: "第二项",
// value: "2"
// }, {
// id: 3,
// text: "第三项",
// value: "3",
// open: true
// }, {
// id: 11,
// pId: 1,
// text: "子项1",
// value: "11"
// }, {
// id: 12,
// pId: 1,
// text: "子项2",
// value: "12"
// }, {
// id: 13,
// pId: 1,
// text: "子项3",
// value: "13"
// }, {
// id: 31,
// pId: 3,
// text: "子项1",
// value: "31"
// }, {
// id: 32,
// pId: 3,
// text: "子项2",
// value: "32"
// }, {
// id: 33,
// pId: 3,
// text: "子项3",
// value: "33"
// }], "z");
BI.createWidget({
type: "bi.vtape",
element: this,

45
demo/js/core/layout/demo.flow.js

@ -14,69 +14,68 @@ Demo.FlowLayout = BI.inherit(BI.Widget, {
type: "bi.label",
height: 30,
text: "Left-1",
cls: "layout-bg1",
hgap: 20
cls: "layout-bg1"
}, {
type: "bi.label",
height: 30,
text: "Left-2",
cls: "layout-bg2",
hgap: 20
cls: "layout-bg2"
}, {
type: "bi.label",
height: 30,
text: "Left-3",
cls: "layout-bg3",
hgap: 20
cls: "layout-bg3"
}, {
type: "bi.label",
height: 30,
text: "Left-4",
cls: "layout-bg4",
hgap: 20
cls: "layout-bg4"
}, {
type: "bi.label",
height: 30,
text: "Left-5",
cls: "layout-bg5",
hgap: 20
cls: "layout-bg5"
}],
hgap: 20,
vgap: 20
hgap: 20
}, {
type: "bi.right",
hgap: 20,
items: [{
type: "bi.label",
height: 30,
text: "Right-1",
cls: "layout-bg1",
hgap: 20
cls: "layout-bg1"
}, {
type: "bi.label",
height: 30,
text: "Right-2",
cls: "layout-bg2",
hgap: 20
cls: "layout-bg2"
}, {
type: "bi.label",
height: 30,
text: "Right-3",
cls: "layout-bg3",
hgap: 20
cls: "layout-bg3"
}, {
type: "bi.label",
height: 30,
text: "Right-4",
cls: "layout-bg4",
hgap: 20
cls: "layout-bg4"
}, {
type: "bi.label",
height: 30,
text: "Right-5",
cls: "layout-bg5",
hgap: 20
cls: "layout-bg5"
}],
hgap: 20,
vgap: 20
}]
};

1
demo/js/core/layout/demo.horizontal.js

@ -8,6 +8,7 @@ Demo.Horizontal = BI.inherit(BI.Widget, {
render: function () {
return {
type: "bi.horizontal",
hgap: 10,
items: [{
type: "bi.label",
whiteSpace: "normal",

1
demo/js/core/layout/demo.vertical.js

@ -8,6 +8,7 @@ Demo.VerticalLayout = BI.inherit(BI.Widget, {
render: function () {
return {
type: "bi.vertical",
vgap: 10,
items: [{
type: "bi.label",
cls: "layout-bg3",

5
demo/js/core/layout/demo.vtape.js

@ -8,6 +8,7 @@ Demo.VtapeLayout = BI.inherit(BI.Widget, {
render: function () {
return {
type: "bi.vtape",
vgap: 10,
items: [
{
height: 100,
@ -15,7 +16,9 @@ Demo.VtapeLayout = BI.inherit(BI.Widget, {
type: "bi.label",
text: "1",
cls: "layout-bg1"
}
},
tgap: 10,
vgap: 10
}, {
height: 200,
el: {

6
demo/js/widget/basewidget/demo.buttons.js

@ -58,7 +58,7 @@ Demo.Buttons = BI.inherit(BI.Widget, {
type: "bi.button",
text: "带图标的按钮",
// level: 'ignore',
iconClass: "close-font",
iconCls: "close-font",
height: 30
}
}, {
@ -118,7 +118,7 @@ Demo.Buttons = BI.inherit(BI.Widget, {
text: "带图标的按钮",
block: true,
// level: 'ignore',
iconClass: "close-font",
iconCls: "close-font",
height: 30
}
}, {
@ -178,7 +178,7 @@ Demo.Buttons = BI.inherit(BI.Widget, {
text: "带图标的按钮",
clear: true,
// level: 'ignore',
iconClass: "close-font",
iconCls: "close-font",
height: 30
}
}, {

4
demo/js/widget/basewidget/demo.items.js

@ -9,8 +9,10 @@ Demo.Items = BI.inherit(BI.Widget, {
return {
type: "bi.vertical",
items: [{
type: "bi.label",
type: "bi.text_button",
cls: "bi-list-item-select bi-high-light-border bi-border",
height: 30,
level: "warning",
text: "单选item"
}, {
type: "bi.single_select_item",

56
demo/js/widget/basewidget/demo.mask.loading.js

@ -1,56 +0,0 @@
/**
* Created by Dailer on 2017/7/25.
*/
Demo.LoadingMask = BI.inherit(BI.Widget, {
render: function () {
var vessel = this;
var self = this;
var left = BI.createWidget({
type: "bi.center_adapt",
items: [{
type: "bi.button",
text: "LoadingMask",
height: 30,
handler: function () {
var mask = BI.createWidget({
type: "bi.loading_mask",
masker: vessel,
text: "加载中...3s后结束"
});
setTimeout(function () {
mask.destroy();
}, 3000);
}
}]
});
var right = BI.createWidget({
type: "bi.center_adapt",
items: [{
type: "bi.button",
text: "CancelLoadingMask",
height: 30,
handler: function () {
var mask = BI.createWidget({
type: "bi.loading_cancel_mask",
masker: vessel,
text: "正在加载数据"
});
mask.on(BI.LoadingCancelMask.EVENT_VALUE_CANCEL, function () {
mask.destroy();
BI.Msg.toast("取消加载了...");
});
}
}]
});
BI.createWidget({
type: "bi.center_adapt",
element: vessel,
items: [left, right],
hgap: 20
});
}
});
BI.shortcut("demo.loading_mask", Demo.LoadingMask);

3
demo/js/widget/selecttree/demo.multilayer_select_tree_combo.js

@ -18,7 +18,8 @@ Demo.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
},
text: "默认值",
items: items,
width: 300
width: 300,
value: ["第五级文件1"]
}, {
type: "bi.button",
text: "getVlaue",

3
demo/js/widget/selecttree/demo.select_tree_combo.js

@ -16,6 +16,7 @@ Demo.SelectTreeCombo = BI.inherit(BI.Widget, {
ref: function (_ref) {
self.tree = _ref;
},
value: "11",
text: "默认值",
items: items,
width: 300
@ -30,7 +31,7 @@ Demo.SelectTreeCombo = BI.inherit(BI.Widget, {
type: "bi.button",
text: "setVlaue (第二级文件1)",
handler: function () {
self.tree.setValue(["第二级文件1"]);
self.tree.setValue(["2"]);
},
width: 300
}],

5
demo/js/widget/singletree/demo.single_tree_combo.js

@ -18,7 +18,8 @@ Demo.SingleTreeCombo = BI.inherit(BI.Widget, {
},
text: "默认值",
items: items,
width: 300
width: 300,
value: "11"
}, {
type: "bi.button",
text: "getVlaue",
@ -30,7 +31,7 @@ Demo.SingleTreeCombo = BI.inherit(BI.Widget, {
type: "bi.button",
text: "setVlaue (第二级文件1)",
handler: function () {
self.tree.setValue(["第二级文件1"]);
self.tree.setValue(["2"]);
},
width: 300
}],

3
demo/js/widget/tree/demo.multilayer_select_level_tree.js

@ -9,7 +9,8 @@ Demo.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
var self = this;
var tree = BI.createWidget({
type: "bi.multilayer_select_level_tree",
items: BI.deepClone(Demo.CONSTANTS.TREE)
items: BI.deepClone(Demo.CONSTANTS.TREE),
value: "第五级文件1"
});
return {

3
demo/js/widget/tree/demo.multilayer_single_level_tree.js

@ -9,7 +9,8 @@ Demo.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
var self = this;
var tree = BI.createWidget({
type: "bi.multilayer_single_level_tree",
items: BI.deepClone(Demo.CONSTANTS.TREE)
items: BI.deepClone(Demo.CONSTANTS.TREE),
value: "第五级文件1"
});
return {

5
demo/js/widget/tree/demo.select_level_tree.js

@ -9,7 +9,8 @@ Demo.SelectLevelTree = BI.inherit(BI.Widget, {
var self = this;
var tree = BI.createWidget({
type: "bi.select_level_tree",
items: BI.deepClone(Demo.CONSTANTS.LEVELTREE)
items: BI.deepClone(Demo.CONSTANTS.LEVELTREE),
value: "11"
});
return {
@ -32,7 +33,7 @@ Demo.SelectLevelTree = BI.inherit(BI.Widget, {
height: 25,
text: "setValue (第二级文件1)",
handler: function () {
tree.setValue(["第二级文件1"]);
tree.setValue(["2"]);
}
},
height: 25

5
demo/js/widget/tree/demo.single_level_tree.js

@ -9,7 +9,8 @@ Demo.SingleLevelTree = BI.inherit(BI.Widget, {
var self = this;
var tree = BI.createWidget({
type: "bi.single_level_tree",
items: BI.deepClone(Demo.CONSTANTS.LEVELTREE)
items: BI.deepClone(Demo.CONSTANTS.LEVELTREE),
value: "11"
});
return {
@ -32,7 +33,7 @@ Demo.SingleLevelTree = BI.inherit(BI.Widget, {
height: 25,
text: "setValue (第二级文件1)",
handler: function () {
tree.setValue(["第二级文件1"]);
tree.setValue(["2"]);
}
},
height: 25

3
demo/js/widget/tree/demo.switchtree.js

@ -9,7 +9,8 @@ Demo.SwitchTree = BI.inherit(BI.Widget, {
var self = this;
var tree = BI.createWidget({
type: "bi.switch_tree",
items: BI.deepClone(Demo.CONSTANTS.TREE)
items: BI.deepClone(Demo.CONSTANTS.TREE),
value: "第五级文件1"
});
return {

31
dist/README.md vendored

@ -0,0 +1,31 @@
#### fineui.js
整个fineui打包文件,不包括配置文件和路由
#### fineui.css
整个fineui打包文件,不包括资源文件
#### config.js
配置文件,这只是一个案例,集成进系统的时候需要进行配置
#### resource.css
app.css background.css icon.css font.css的合并文件,集成进系统的时候需要进行配置
#### router.js
#### 路由文件,使用fineui路由的时候才需要引入
#### bundle.js bundle.css
所有文件的合并文件, 主要给在线demo和文档用的
#### core_without_normalize.css
不带标准化的core.css文件,只引入通用css样式的时候才需要
#### chart.js
封装好的一层图表api

458
dist/base.css vendored

@ -6,6 +6,20 @@
-webkit-box-shadow: 0px 0px 2px 1px #d4dadd inset;
-moz-box-shadow: 0px 0px 2px 1px #d4dadd inset;
}
.bi-color-chooser-trigger {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
box-shadow: 0px 0px 2px 1px #d4dadd inset;
-webkit-box-shadow: 0px 0px 2px 1px #d4dadd inset;
-moz-box-shadow: 0px 0px 2px 1px #d4dadd inset;
}
.bi-color-picker-button .color-picker-button-mask {
border: 1px solid #1a1a1a;
}
.bi-theme-dark .bi-color-picker-button .color-picker-button-mask {
border: 1px solid #ffffff;
}
.bi-color-picker-button .color-picker-button-mask {
border: 1px solid #1a1a1a;
}
@ -20,6 +34,14 @@
-webkit-box-shadow: 0px 0px 2px 1px #d4dadd inset;
-moz-box-shadow: 0px 0px 2px 1px #d4dadd inset;
}
.bi-color-picker-editor .color-picker-editor-display {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
box-shadow: 0px 0px 2px 1px #d4dadd inset;
-webkit-box-shadow: 0px 0px 2px 1px #d4dadd inset;
-moz-box-shadow: 0px 0px 2px 1px #d4dadd inset;
}
.farbtastic {
position: relative;
}
@ -84,12 +106,83 @@
border-right: 6px solid transparent;
border-bottom: 6px solid #3f8ce8;
}
.bi-bubble-combo .button-combo-triangle-wrapper {
position: fixed !important;
}
.bi-bubble-combo .bubble-combo-triangle-left {
z-index: 1;
width: 0;
height: 0;
border-top: 6px solid transparent;
border-left: 6px solid #3f8ce8;
border-bottom: 6px solid transparent;
}
.bi-bubble-combo .bubble-combo-triangle-right {
z-index: 1;
width: 0;
height: 0;
border-top: 6px solid transparent;
border-right: 6px solid #3f8ce8;
border-bottom: 6px solid transparent;
}
.bi-bubble-combo .bubble-combo-triangle-top {
z-index: 1;
width: 0;
height: 0;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-top: 6px solid #3f8ce8;
}
.bi-bubble-combo .bubble-combo-triangle-bottom {
z-index: 1;
width: 0;
height: 0;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #3f8ce8;
}
.bi-combo.bi-combo-popup {
display: block !important;
}
.bi-bubble-popup-view {
}
.bi-adapt-editor .adapt-editor-text {
font-size: 14px;
}
.bi-adapt-editor .adapt-editor-text {
font-size: 14px;
}
/*************BI.SearchEditor******************/
.bi-search-editor .close-font {
font-size: 20px;
}
.bi-search-editor .search-font {
font-size: 20px;
}
/*************BI.SearchEditor******************/
.bi-small-search-editor .bi-editor {
font-size: 12px;
}
.bi-small-search-editor .bi-editor .bi-input {
font-size: 12px;
}
.bi-small-search-editor .bi-editor .bi-label {
font-size: 12px;
}
.bi-small-search-editor .close-font {
font-size: 18px;
}
.bi-small-search-editor .search-font {
font-size: 18px;
}
.bi-sign-initial-editor .sign-initial-editor-text {
font-size: 14px;
}
/*************BI.SearchEditor******************/
.bi-search-editor .close-font {
font-size: 20px;
@ -615,6 +708,29 @@ li.CodeMirror-hint-active {
.bi-message-close {
font-size: 25px;
}
.bi-message-title {
font-size: 16px;
cursor: pointer;
}
.bi-message-text {
font-size: 16px;
-webkit-user-select: text;
-khtml-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
-o-user-select: text;
user-select: text;
}
.bi-message-content {
font-size: 16px;
}
.bi-message-close {
font-size: 25px;
}
.bi-multi-list-view .bi-button-mask {
opacity: 0.1;
filter: alpha(opacity=10);
}
.bi-multi-list-view .bi-button-mask {
opacity: 0.1;
filter: alpha(opacity=10);
@ -634,6 +750,20 @@ li.CodeMirror-hint-active {
.bi-all-count-pager .all-pager-next {
font-size: 16px;
}
.bi-all-count-pager .all-pager-prev {
font-size: 16px;
}
.bi-all-count-pager .all-pager-next {
font-size: 16px;
}
.bi-direction-pager .direction-pager-prev {
font-size: 16px;
}
.bi-direction-pager .direction-pager-next {
font-size: 16px;
}
.bi-pager .page-item {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
@ -897,6 +1027,13 @@ body .bi-button.button-ignore.disabled.clear:active,
filter: alpha(opacity=20);
background-color: #1a1a1a;
}
.bi-single-select-icon-text-item:active .b-font:before,
.bi-single-select-icon-text-item.active .b-font:before {
color: #3685f2;
}
.bi-single-select-icon-text-item:active .b-font:before,
.bi-single-select-icon-text-item.active .b-font:before {
color: #3685f2;
@ -917,8 +1054,43 @@ body .bi-button.button-ignore.disabled.clear:active,
margin: 1px 1px;
display: inline-block;
}
.bi-editor {
.bi-code-editor .param {
color: #ffffff;
padding: 0 5px;
margin: 1px 1px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
background: #3f8ce8;
display: inline-block;
}
.bi-code-editor .error-param {
color: #ff4949;
padding: 0 5px;
margin: 1px 1px;
display: inline-block;
}
.bi-multifile-editor .multifile-editor {
text-align: right;
cursor: pointer;
font-size: 100px;
z-index: 2;
}
.bi-textarea-editor {
overflow: hidden;
overflow-x: hidden;
overflow-y: hidden;
}
.bi-textarea-editor .textarea-editor-content {
font-size: 12px;
border: none;
}
.bi-multifile-editor .multifile-editor {
text-align: right;
@ -943,6 +1115,9 @@ body .bi-button.button-ignore.disabled.clear:active,
.bi-textarea-editor .textarea-editor-content {
border: none;
}
.x-icon.b-font {
margin: auto;
}
.bi-file {
opacity: 0;
filter: alpha(opacity=0);
@ -997,12 +1172,24 @@ body .bi-button.button-ignore.disabled.clear:active,
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
background: #fddddd;
background: #ffecec;
color: #ff4949;
}
.bi-bubble {
font-size: 14px;
}
.bi-bubble .bubble-text {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
background: #ffecec;
color: #ff4949;
}
.bi-tip {
position: fixed !important;
}
.bi-toast {
font-size: 14px;
-webkit-border-radius: 2px;
@ -1014,9 +1201,10 @@ body .bi-button.button-ignore.disabled.clear:active,
color: #5cb75d;
}
.bi-toast.toast-warning {
background: #fddddd;
background: #ffecec;
color: #ff4949;
}
.bi-tooltip {
max-width: 250px;
-webkit-border-radius: 2px;
@ -1030,7 +1218,38 @@ body .bi-button.button-ignore.disabled.clear:active,
color: #1a1a1a;
}
.bi-tooltip.tooltip-warning {
background: #fddddd;
background: #ffecec;
color: #ff4949;
border: 1px solid #f4cbcb;
}
.bi-toast {
font-size: 14px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-toast.toast-success {
background: #e1f4e7;
color: #5cb75d;
}
.bi-toast.toast-warning {
background: #ffecec;
color: #ff4949;
}
.bi-tooltip {
max-width: 250px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
font-size: 12px;
}
.bi-tooltip.tooltip-success {
background: #fff5c1;
border: 1px solid #fff5c1;
color: #1a1a1a;
}
.bi-tooltip.tooltip-warning {
background: #ffecec;
color: #ff4949;
border: 1px solid #f4cbcb;
}
@ -1086,6 +1305,172 @@ body .bi-button.button-ignore.disabled.clear:active,
overflow-x: hidden !important;
overflow-y: hidden !important;
}
.bi-collection-table-cell {
-webkit-box-sizing: border-box;
/*Safari3.2+*/
-moz-box-sizing: border-box;
/*Firefox3.5+*/
-ms-box-sizing: border-box;
/*IE8*/
box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
}
.bi-collection-table-cell.first-row {
border-top: 1px solid #d4dadd;
}
.bi-collection-table-cell.first-col {
border-left: 1px solid #d4dadd;
}
.bi-theme-dark .bi-collection-table-cell.first-row {
border-top: 1px solid #525466;
}
.bi-theme-dark .bi-collection-table-cell.first-col {
border-left: 1px solid #525466;
}
.bi-quick-collection-table > div > .bi-collection {
overflow: hidden !important;
overflow-x: hidden !important;
overflow-y: hidden !important;
}
.bi-grid-table-cell {
-webkit-box-sizing: border-box;
/*Safari3.2+*/
-moz-box-sizing: border-box;
/*Firefox3.5+*/
-ms-box-sizing: border-box;
/*IE8*/
box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
}
.bi-grid-table-cell.first-row {
border-top: 1px solid #d4dadd;
}
.bi-grid-table-cell.first-col {
border-left: 1px solid #d4dadd;
}
.bi-theme-dark .bi-grid-table-cell.first-row {
border-top: 1px solid #525466;
}
.bi-theme-dark .bi-grid-table-cell.first-col {
border-left: 1px solid #525466;
}
.scrollbar-layout-main {
box-sizing: border-box;
outline: none;
overflow: hidden;
position: absolute;
transition-duration: 250ms;
transition-timing-function: ease;
user-select: none;
background-color: rgba(102, 102, 102, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666,endColorstr=#0d666666);
border-radius: 5px;
}
.bi-theme-dark .scrollbar-layout-main {
background-color: rgba(204, 204, 204, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc,endColorstr=#0dcccccc);
}
.scrollbar-layout-main-vertical {
bottom: 0;
right: 0;
top: 0;
transition-property: background-color;
width: 10px;
}
.scrollbar-layout-main-vertical.public-scrollbar-main-active,
.scrollbar-layout-main-vertical:hover {
width: 10px;
}
.scrollbar-layout-main-horizontal {
bottom: 0;
height: 10px;
left: 0;
transition-property: background-color;
background-color: rgba(102, 102, 102, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666,endColorstr=#0d666666);
}
.bi-theme-dark .scrollbar-layout-main-horizontal {
background-color: rgba(204, 204, 204, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc,endColorstr=#0dcccccc);
}
/* Touching the scroll-track directly makes the scroll-track bolder */
.scrollbar-layout-main-horizontal.public-scrollbar-main-active,
.scrollbar-layout-main-horizontal:hover {
height: 10px;
}
.scrollbar-layout-face {
left: 0;
overflow: hidden;
position: absolute;
z-index: 1;
}
/**
* This selector renders the "nub" of the scrollface. The nub must
* be rendered as pseudo-element so that it won't receive any UI events then
* we can get the correct `event.offsetX` and `event.offsetY` from the
* scrollface element while dragging it.
*/
.scrollbar-layout-face:after {
border-radius: 6px;
content: '';
display: block;
position: absolute;
transition: background-color 250ms ease;
}
.scrollbar-layout-face-horizontal {
bottom: 0;
left: 0;
top: 0;
}
.scrollbar-layout-face-horizontal:after {
bottom: 2px;
left: 0;
top: 2px;
width: 100%;
}
.scrollbar-layout-face-vertical {
left: 0;
right: 0;
top: 0;
}
.scrollbar-layout-face-vertical:after {
height: 100%;
left: 2px;
right: 2px;
top: 0;
}
/**
* scrollbars.
*/
/* Touching the scroll-track directly makes the scroll-track bolder */
.public-scrollbar-face:after {
background-color: rgba(102, 102, 102, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666,endColorstr=#4d666666);
}
.bi-theme-dark .public-scrollbar-face:after {
background-color: rgba(204, 204, 204, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc,endColorstr=#4dcccccc);
}
.public-scrollbar-main:hover .public-scrollbar-face:after,
.public-scrollbar-main-active .public-scrollbar-face:after,
.public-scrollbar-face-active:after {
background-color: rgba(102, 102, 102, 0.7);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666,endColorstr=#b3666666);
}
.bi-theme-dark .public-scrollbar-main:hover .public-scrollbar-face:after,
.bi-theme-dark .public-scrollbar-main-active .public-scrollbar-face:after,
.bi-theme-dark .public-scrollbar-face-active:after {
background-color: rgba(204, 204, 204, 0.7);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc,endColorstr=#b3cccccc);
}
.horizontal-scrollbar {
bottom: 0;
position: absolute;
}
.bi-table > .first-col {
border-left: none;
}
@ -1164,6 +1549,36 @@ body .bi-button.button-ignore.disabled.clear:active,
border-top: 1px solid #525466;
border-left: 1px solid #525466;
}
.bi-resizable-table-cell .resizable-table-cell-resizer-container {
cursor: ew-resize;
z-index: 1;
}
.bi-resizable-table-cell .resizable-table-cell-resizer-container:hover .resizable-table-cell-resizer-knob,
.bi-resizable-table-cell .resizable-table-cell-resizer-container.dragging .resizable-table-cell-resizer-knob {
background-color: #3f8ce8;
}
.bi-resizable-table-cell .resizable-table-cell-resizer-container.suitable .resizable-table-cell-resizer-knob {
background-color: #58cc7d;
}
.bi-resizable-table .resizable-table-resizer {
cursor: ew-resize;
z-index: 1;
background-color: #3f8ce8;
}
.bi-resizable-table .resizable-table-resizer.suitable {
background-color: #58cc7d;
}
.bi-resizable-table .resizable-table-region-resizer {
cursor: ew-resize;
z-index: 1;
}
.bi-resizable-table .resizable-table-region-resizer:hover .resizable-table-region-resizer-knob,
.bi-resizable-table .resizable-table-region-resizer.dragging .resizable-table-region-resizer-knob {
background-color: #3f8ce8;
}
.bi-grid-table-cell {
-webkit-box-sizing: border-box;
/*Safari3.2+*/
@ -1329,6 +1744,27 @@ body .bi-button.button-ignore.disabled.clear:active,
.bi-branch-tree .bi-branch-tree-view {
min-width: 300px;
}
.bi-branch-tree .bi-branch-tree-view {
min-width: 300px;
}
.bi-display-tree .ztree * {
color: #999999;
}
.bi-display-tree .ztree li a,
.bi-display-tree .ztree li span {
cursor: default !important;
}
.bi-display-tree .ztree li a:hover {
text-decoration: none;
}
.bi-display-tree .ztree li a.curSelectedNode {
padding-top: 1px;
border: none;
background-color: inherit;
opacity: 1;
filter: alpha(opacity=100);
}
.bi-display-tree .ztree * {
color: #999999;
}
@ -1560,9 +1996,23 @@ ul.ztree.zTreeDragUL {
padding:0;
background:none;
}*/
.bi-trigger .bi-trigger-icon-button {
font-size: 16px;
}
.bi-select-text-trigger {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-small-select-text-trigger {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-select-text-trigger {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;

127
dist/base.js vendored

@ -630,6 +630,9 @@ BI.BasicButton = BI.inherit(BI.Single, {
if (opts.shadow) {
this._createShadow();
}
if (opts.level) {
this.element.addClass("button-" + opts.level);
}
},
_createShadow: function () {
@ -1018,6 +1021,7 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
baseCls: "bi-button-group",
behaviors: {},
items: [],
value: "",
chooseType: BI.Selection.Single,
layouts: [{
type: "bi.center",
@ -1029,14 +1033,18 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
_init: function () {
BI.ButtonGroup.superclass._init.apply(this, arguments);
var o = this.options;
var behaviors = {};
BI.each(this.options.behaviors, function (key, rule) {
BI.each(o.behaviors, function (key, rule) {
behaviors[key] = BI.BehaviorFactory.createBehavior(key, {
rule: rule
});
});
this.behaviors = behaviors;
this.populate(this.options.items);
this.populate(o.items);
if(BI.isKey(o.value) || BI.isNotEmptyArray(o.value)){
this.setValue(o.value);
}
},
_createBtns: function (items) {
@ -1955,11 +1963,15 @@ BI.TreeView = BI.inherit(BI.Pane, {
});
}
if (!this.nodes) {
return;
}
BI.each(this.nodes.getNodes(), function (i, node) {
node.halfCheck = false;
setNode(node.children);
});
this.nodes && this.nodes.checkAllNodes(checked);
this.nodes.checkAllNodes(checked);
},
expandAll: function (flag) {
@ -3121,14 +3133,17 @@ BI.Combo = BI.inherit(BI.Widget, {
},
_initCombo: function () {
this.combo = BI.createWidget(this.options.el);
this.combo = BI.createWidget(this.options.el, {
value: this.options.value
});
},
_assertPopupView: function () {
var self = this;
var self = this, o = this.options;
if (this.popupView == null) {
this.popupView = BI.createWidget(this.options.popup, {
type: "bi.popup_view"
type: "bi.popup_view",
value: o.value
});
this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
if (type === BI.Events.CLICK) {
@ -3319,14 +3334,20 @@ BI.Combo = BI.inherit(BI.Widget, {
},
setValue: function (v) {
this._assertPopupView();
this.combo.setValue(v);
this.popupView && this.popupView.setValue(v);
if (BI.isNull(this.popupView)) {
this.options.popup.value = v;
} else {
this.popupView.setValue(v);
}
},
getValue: function () {
this._assertPopupView();
return this.popupView && this.popupView.getValue();
if (BI.isNull(this.popupView)) {
return this.options.popup.value;
} else {
return this.popupView.getValue();
}
},
isViewVisible: function () {
@ -3505,11 +3526,13 @@ BI.Expander = BI.inherit(BI.Widget, {
},
_initExpander: function () {
this.expander = BI.createWidget(this.options.el);
this.expander = BI.createWidget(this.options.el, {
value: this.options.value
});
},
_assertPopupView: function () {
var self = this;
var self = this, o = this.options;
if (this.popupView == null) {
this.popupView = BI.createWidget(this.options.popup, {
type: "bi.button_group",
@ -3518,7 +3541,8 @@ BI.Expander = BI.inherit(BI.Widget, {
type: "bi.vertical",
hgap: 0,
vgap: 0
}]
}],
value: o.value
});
this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
@ -3582,14 +3606,20 @@ BI.Expander = BI.inherit(BI.Widget, {
},
setValue: function (v) {
// this._assertPopupView();
this.expander.setValue(v);
this.popupView && this.popupView.setValue(v);
if (BI.isNull(this.popupView)) {
this.options.popup.value = v;
} else {
this.popupView.setValue(v);
}
},
getValue: function () {
// this._assertPopupView();
return this.popupView ? this.popupView.getValue() : [];
if (BI.isNull(this.popupView)) {
return this.options.popup.value;
} else {
return this.popupView.getValue();
}
},
isViewVisible: function () {
@ -4481,8 +4511,11 @@ BI.Searcher = BI.inherit(BI.Widget, {
},
setValue: function (v) {
this._assertPopupView();
this.popupView && this.popupView.setValue(v);
if (BI.isNull(this.popupView)) {
this.options.popup.value = v;
} else {
this.popupView.setValue(v);
}
},
getKeyword: function () {
@ -4503,6 +4536,9 @@ BI.Searcher = BI.inherit(BI.Widget, {
} else if (o.adapter && o.adapter.getValue) {
return o.adapter.getValue();
}
if (BI.isNull(this.popupView)) {
return o.popup.value;
}
return this.popupView.getValue();
},
@ -4657,7 +4693,9 @@ BI.Switcher = BI.inherit(BI.Widget, {
},
_initSwitcher: function () {
this.switcher = BI.createWidget(this.options.el);
this.switcher = BI.createWidget(this.options.el, {
value: o.value
});
},
_assertPopupView: function () {
@ -4671,7 +4709,8 @@ BI.Switcher = BI.inherit(BI.Widget, {
type: "bi.vertical",
hgap: 0,
vgap: 0
}]
}],
value: o.value
});
this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
@ -4731,14 +4770,20 @@ BI.Switcher = BI.inherit(BI.Widget, {
},
setValue: function (v) {
this._assertPopupView();
this.switcher.setValue(v);
this.popupView && this.popupView.setValue(v);
if (BI.isNull(this.popupView)) {
this.options.popup.value = v;
} else {
this.popupView.setValue(v);
}
},
getValue: function () {
this._assertPopupView();
return this.popupView ? this.popupView.getValue() : [];
if (BI.isNull(this.popupView)) {
return this.options.popup.value;
} else {
return this.popupView.getValue();
}
},
setAdapter: function (adapter) {
@ -15369,7 +15414,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
_createView: function () {
var o = this.options;
this.button_group = BI.createWidget(o.el, {type: "bi.button_group"});
this.button_group = BI.createWidget(o.el, {type: "bi.button_group", value: o.value});
this.button_group.element.css({"min-height": o.minHeight + "px"});
return this.button_group;
},
@ -15501,7 +15546,8 @@ BI.SearcherView = BI.inherit(BI.Pane, {
},
layouts: [{
type: "bi.vertical"
}]
}],
value: o.value
});
this.matcher.on(BI.Controller.EVENT_CHANGE, function (type, val, ob) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
@ -15529,7 +15575,8 @@ BI.SearcherView = BI.inherit(BI.Pane, {
},
layouts: [{
type: "bi.vertical"
}]
}],
value: o.value
});
this.searcher.on(BI.Controller.EVENT_CHANGE, function (type, val, ob) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
@ -16424,7 +16471,7 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) {
shadow: props.clear !== true,
isShadowShowingOnSelected: true,
readonly: true,
iconClass: "",
iconCls: "",
level: "common",
block: false, // 是否块状显示,即不显示边框,没有最小宽度的限制
clear: false, // 是否去掉边框和背景
@ -16450,7 +16497,7 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) {
} else {
this.element.css({lineHeight: o.height + "px"});
}
if (BI.isKey(o.iconClass)) {
if (BI.isKey(o.iconCls)) {
this.icon = BI.createWidget({
type: "bi.icon",
width: 18
@ -16462,7 +16509,7 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) {
});
BI.createWidget({
type: "bi.horizontal_auto",
cls: "button-" + o.level + " " + o.iconClass,
cls: o.iconCls,
element: this,
hgap: o.hgap,
vgap: o.vgap,
@ -16478,7 +16525,6 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) {
} else {
this.text = BI.createWidget({
type: "bi.label",
cls: "button-" + o.level,
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
forceCenter: o.forceCenter,
@ -18069,6 +18115,7 @@ BI.Editor = BI.inherit(BI.Single, {
type: "bi.input",
element: "<input type='" + o.inputType + "'/>",
root: true,
value: o.value,
watermark: o.watermark,
validationChecker: o.validationChecker,
quitChecker: o.quitChecker,
@ -18211,7 +18258,8 @@ BI.Editor = BI.inherit(BI.Single, {
return false;
});
if (BI.isKey(this.options.value) || BI.isEmptyString(this.options.value)) {
this.setValue(this.options.value);
this._checkError();
this._checkWaterMark();
} else {
this._checkWaterMark();
}
@ -19415,6 +19463,9 @@ BI.Input = BI.inherit(BI.Single, {
.focusout(function (e) {
self._blurDebounce();
});
if (BI.isKey(this.options.value) || BI.isEmptyString(this.options.value)) {
this.setValue(this.options.value);
}
},
_focus: function () {
@ -21065,7 +21116,8 @@ BI.SQLEditor = BI.inherit(BI.Widget, {
value: "",
lineHeight: 2,
showHint: true,
supportFunction: false
supportFunction: false,
supportParam: false
});
},
_init: function () {
@ -21189,14 +21241,14 @@ BI.SQLEditor = BI.inherit(BI.Widget, {
},
setValue: function (v) {
var self = this, result;
var self = this, result, o = this.options;
this.refresh();
self.editor.setValue("");
result = this._analyzeContent(v || "");
BI.each(result, function (i, item) {
var fieldRegx = /\$[\{][^\}]*[\}]/;
var str = item.match(fieldRegx);
if (BI.isNotEmptyArray(str)) {
if (BI.isNotEmptyArray(str) && o.supportParam) {
self.insertParam(str[0].substring(2, item.length - 1));
} else {
self.insertString(item);
@ -33966,7 +34018,8 @@ BI.CustomTree = BI.inherit(BI.Widget, {
args[0] = self._formatItems(items);
callback.apply(null, args);
}]);
}
},
value: o.value
});
this.tree.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);

1296
dist/bundle.css vendored

File diff suppressed because it is too large Load Diff

1169
dist/bundle.js vendored

File diff suppressed because it is too large Load Diff

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

86
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

449
dist/case.js vendored

@ -11,7 +11,7 @@ BI.IconChangeButton = BI.inherit(BI.Single, {
var conf = BI.IconChangeButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: "bi-icon-change-button",
iconClass: "",
iconCls: "",
iconWidth: null,
iconHeight: null,
@ -36,7 +36,7 @@ BI.IconChangeButton = BI.inherit(BI.Single, {
this.button = BI.createWidget({
type: "bi.icon_button",
element: this,
cls: o.iconClass,
cls: o.iconCls,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight,
@ -73,9 +73,9 @@ BI.IconChangeButton = BI.inherit(BI.Single, {
setIcon: function (cls) {
var o = this.options;
if (o.iconClass !== cls) {
this.element.removeClass(o.iconClass).addClass(cls);
o.iconClass = cls;
if (o.iconCls !== cls) {
this.element.removeClass(o.iconCls).addClass(cls);
o.iconCls = cls;
}
}
});
@ -224,8 +224,7 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectIconTextItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-icon-text-item bi-list-item-active",
iconClass: "",
hgap: 10,
iconCls: "",
height: 25
});
},
@ -235,7 +234,7 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
this.text = BI.createWidget({
type: "bi.icon_text_item",
element: this,
cls: o.iconClass,
cls: o.iconCls,
once: o.once,
selected: o.selected,
height: o.height,
@ -2047,9 +2046,7 @@ BI.shortcut("bi.complex_canvas", BI.ComplexCanvas);/**
BI.ArrowTreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {
_defaultConfig: function () {
return BI.extend(BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-arrow-tree-group-node",
iconWidth: 13,
iconHeight: 13
extraCls: "bi-arrow-tree-group-node"
});
},
_init: function () {
@ -2072,9 +2069,7 @@ BI.shortcut("bi.arrow_tree_group_node_checkbox", BI.ArrowTreeGroupNodeCheckbox);
BI.CheckingMarkNode = BI.inherit(BI.IconButton, {
_defaultConfig: function () {
return BI.extend( BI.CheckingMarkNode.superclass._defaultConfig.apply(this, arguments), {
extraCls: "check-mark-font",
iconWidth: 13,
iconHeight: 13
extraCls: "check-mark-font"
});
},
_init: function () {
@ -2178,9 +2173,7 @@ BI.shortcut("bi.mid_tree_node_checkbox", BI.MidTreeNodeCheckbox);/**
BI.TreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {
_defaultConfig: function () {
return BI.extend( BI.TreeGroupNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {
extraCls: "tree-node-triangle-collapse-font",
iconWidth: 13,
iconHeight: 13
extraCls: "tree-node-triangle-collapse-font"
});
},
_init: function () {
@ -3665,25 +3658,42 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
_init: function () {
BI.ColorChooser.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.trigger = BI.createWidget(BI.extend({
type: "bi.color_chooser_trigger",
width: o.width,
height: o.height
}, o.el));
this.colorPicker = BI.createWidget({
type: "bi.color_chooser_popup"
});
this.combo = BI.createWidget({
type: "bi.combo",
element: this,
adjustLength: 1,
el: this.trigger,
el: BI.extend({
type: "bi.color_chooser_trigger",
ref: function (_ref) {
self.trigger = _ref;
},
width: o.width,
height: o.height
}, o.el),
popup: {
el: this.colorPicker,
el: {
type: "bi.color_chooser_popup",
ref: function (_ref) {
self.colorPicker = _ref;
},
listeners: [{
eventName: BI.ColorChooserPopup.EVENT_VALUE_CHANGE,
action: function () {
fn();
}
}, {
eventName: BI.ColorChooserPopup.EVENT_CHANGE,
action: function () {
fn();
self.combo.hideView();
}
}]
},
stopPropagation: false,
minWidth: 202
}
},
value: o.value
});
var fn = function () {
@ -3696,15 +3706,6 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
que.unshift(color);
BI.Cache.setItem("colors", BI.array2String(que.toArray()));
};
this.colorPicker.on(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, function () {
fn();
});
this.colorPicker.on(BI.ColorChooserPopup.EVENT_CHANGE, function () {
fn();
self.combo.hideView();
});
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
self.colorPicker.setStoreColors(BI.string2Array(BI.Cache.getItem("colors") || ""));
});
@ -3731,7 +3732,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
},
getValue: function () {
return this.colorPicker.getValue();
return this.combo.getValue();
}
});
BI.ColorChooser.EVENT_CHANGE = "ColorChooser.EVENT_CHANGE";
@ -3756,7 +3757,8 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
BI.ColorChooserPopup.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.colorEditor = BI.createWidget({
type: "bi.color_picker_editor"
type: "bi.color_picker_editor",
value: o.value
});
this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () {
@ -3792,7 +3794,8 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
disabled: true
}]],
width: 190,
height: 25
height: 25,
value: o.value
});
this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () {
self.setValue(this.getValue()[0]);
@ -3802,7 +3805,8 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.colorPicker = BI.createWidget({
type: "bi.color_picker",
width: 190,
height: 50
height: 50,
value: o.value
});
this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE, function () {
@ -4215,7 +4219,8 @@ BI.ColorPicker = BI.inherit(BI.Widget, {
}),
layouts: [{
type: "bi.grid"
}]
}],
value: o.value
});
this.colors.on(BI.ButtonGroup.EVENT_CHANGE, function () {
self.fireEvent(BI.ColorPicker.EVENT_CHANGE, arguments);
@ -5209,7 +5214,7 @@ BI.IconCombo = BI.inherit(BI.Widget, {
baseCls: "bi-icon-combo",
width: 24,
height: 24,
iconClass: "",
iconCls: "",
el: {},
popup: {},
minWidth: 100,
@ -5229,7 +5234,7 @@ BI.IconCombo = BI.inherit(BI.Widget, {
var self = this, o = this.options;
this.trigger = BI.createWidget(o.el, {
type: "bi.icon_combo_trigger",
iconClass: o.iconClass,
iconCls: o.iconCls,
title: o.title,
items: o.items,
width: o.width,
@ -5366,7 +5371,7 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
extraCls: "bi-icon-combo-trigger",
el: {},
items: [],
iconClass: "",
iconCls: "",
width: 25,
height: 25,
isShowDown: true
@ -5378,7 +5383,7 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
var o = this.options, self = this;
this.button = BI.createWidget(o.el, {
type: "bi.icon_change_button",
cls: "icon-combo-trigger-icon " + o.iconClass,
cls: "icon-combo-trigger-icon " + o.iconCls,
disableSelected: true,
width: o.width,
height: o.height,
@ -5416,7 +5421,7 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
populate: function (items) {
var o = this.options;
this.options.items = items || [];
this.button.setIcon(o.iconClass);
this.button.setIcon(o.iconCls);
this.button.setSelected(false);
this.down.setSelected(false);
},
@ -5424,19 +5429,19 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
setValue: function (v) {
BI.IconComboTrigger.superclass.setValue.apply(this, arguments);
var o = this.options;
var iconClass = "";
var iconCls = "";
v = BI.isArray(v) ? v[0] : v;
if (BI.any(this.options.items, function (i, item) {
if (v === item.value) {
iconClass = item.iconClass;
iconCls = item.iconCls;
return true;
}
})) {
this.button.setIcon(iconClass);
this.button.setIcon(iconCls);
this.button.setSelected(true);
this.down.setSelected(true);
} else {
this.button.setIcon(o.iconClass);
this.button.setIcon(o.iconCls);
this.button.setSelected(false);
this.down.setSelected(false);
}
@ -5464,6 +5469,7 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
type: "bi.select_icon_text_trigger",
items: o.items,
height: o.height,
text: o.text,
value: o.value
});
this.popup = BI.createWidget({
@ -5590,6 +5596,7 @@ BI.StaticCombo = BI.inherit(BI.Widget, {
type: "bi.text_icon_item",
cls: "bi-select-text-trigger bi-border pull-down-font",
text: o.text,
value: o.value,
readonly: true,
textLgap: 5,
height: o.height - 2
@ -5598,7 +5605,8 @@ BI.StaticCombo = BI.inherit(BI.Widget, {
type: "bi.text_value_combo_popup",
textAlign: o.textAlign,
chooseType: o.chooseType,
items: o.items
items: o.items,
value: o.value
});
this.popup.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
@ -5851,7 +5859,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
this.trigger = BI.createWidget(o.el, {
type: "bi.select_text_trigger",
items: o.items,
height: o.height
height: o.height,
text: o.value
});
this.popup = BI.createWidget({
type: "bi.text_value_combo_popup",
@ -5981,7 +5990,8 @@ BI.shortcut("bi.small_text_value_combo", BI.SmallTextValueCombo);BI.TextValueCom
chooseType: o.chooseType,
layouts: [{
type: "bi.vertical"
}]
}],
value: o.value
});
this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) {
@ -8027,8 +8037,8 @@ BI.Panel = BI.inherit(BI.Widget, {
return {
el: {
type: "bi.left_right_vertical_adapt",
cls: "panel-title bi-tips bi-border-bottom bi-background",
height: 30,
cls: "panel-title bi-border-bottom bi-background",
height: 29,
items: {
left: [this.text],
right: [this.button_group]
@ -9561,10 +9571,6 @@ BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
BI.RichEditorParamAction.superclass._init.apply(this, arguments);
},
_isParam: function (sel) {
return sel.attr("data-type") === "param";
},
_createBlankNode: function () {
return $("<span>").html("&nbsp;");
},
@ -9573,10 +9579,8 @@ BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
var o = this.options;
var instance = o.editor.selectedInstance;
var next = $param.next();
if (next.length === 0 || this._isParam(next)) {
var preNode = this._createBlankNode();
if (next.length === 0) {
var nextNode = this._createBlankNode();
$param.before(preNode);
$param.after(nextNode);
instance.setFocus(nextNode[0]);
} else {
@ -9584,70 +9588,131 @@ BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
}
},
_get$Sel: function () {
var o = this.options;
var instance = o.editor.selectedInstance;
var sel = $(instance.selElm());
if (sel[0].nodeType === 3 && this._isParam(sel.parent())) {
sel = sel.parent();
}
return sel;
},
addParam: function (param) {
var o = this.options;
var sel = this._get$Sel();
var $param = $("<span>").attr({
"data-type": "param",
"data-value": param
}).css({
color: "white",
backgroundColor: "#009de3",
padding: "0 5px"
}).text(param).keydown(function (e) {
if (e.keyCode === BI.KeyCode.BACKSPACE || e.keyCode === BI.KeyCode.DELETE) {
$param.destroy();
}
e.stopEvent();
return false;
});
var wrapper = o.editor.instance.getElm().element;
if (wrapper.find(sel).length <= 0) {
wrapper.append($param);
} else {
sel.after($param);
}
this._addBlank($param);
},
var instance = o.editor.instance;
var image = new Image();
var canvas = document.createElement("canvas");
$("body").append(canvas);
canvas.width = BI.DOM.getTextSizeWidth(param, 14) + 6;
canvas.height = 16;
var ctx = canvas.getContext("2d");
ctx.font = "14px Georgia";
ctx.fillStyle = "#ffffff";
ctx.fillText(param, 3, 14);
image.src = canvas.toDataURL("image/png");
image.alt = param;
$(image).css({"background-color": "#3f8ce8", "vertical-align": "sub", "margin": "0 3px;"});
instance.getElm().element.append(image);
this._addBlank($(image));
$(canvas).destroy();
}
});
keydown: function (e) {
var o = this.options;
var sel = this._get$Sel();
if (e.keyCode === 229) {// 中文输入法
if (this._isParam(sel)) {
this._addBlank(sel);
e.stopEvent();
return false;
}
}
if (BI.Key[e.keyCode] || e.keyCode === BI.KeyCode.TAB || e.keyCode === BI.KeyCode.ENTER || e.keyCode === BI.KeyCode.SPACE) {
if (this._isParam(sel)) {
e.stopEvent();
return false;
}
}
if (e.keyCode === BI.KeyCode.BACKSPACE || e.keyCode === BI.KeyCode.DELETE) {
if (this._isParam(sel)) {
sel.destroy();
e.preventDefault();
return false;
}
}
},
// /**
// *
// * Created by GUY on 2017/09/18.
// * @class BI.RichEditorParamAction
// * @extends BI.Widget
// */
// BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
// _defaultConfig: function () {
// return BI.extend(BI.RichEditorParamAction.superclass._defaultConfig.apply(this, arguments), {});
// },
//
// _init: function () {
// BI.RichEditorParamAction.superclass._init.apply(this, arguments);
// },
//
// _isParam: function (sel) {
// return sel.attr("data-type") === "param";
// },
//
// _createBlankNode: function () {
// return $("<span>").html("&nbsp;");
// },
//
// _addBlank: function ($param) {
// var o = this.options;
// var instance = o.editor.selectedInstance;
// var next = $param.next();
// if (next.length === 0 || this._isParam(next)) {
// var preNode = this._createBlankNode();
// var nextNode = this._createBlankNode();
// $param.before(preNode);
// $param.after(nextNode);
// instance.setFocus(nextNode[0]);
// } else {
// instance.setFocus(next[0]);
// }
// },
//
// _get$Sel: function () {
// var o = this.options;
// var instance = o.editor.selectedInstance;
// var sel = $(instance.selElm());
// if (sel[0].nodeType === 3 && this._isParam(sel.parent())) {
// sel = sel.parent();
// }
// return sel;
// },
//
// addParam: function (param) {
// var o = this.options;
// var sel = this._get$Sel();
// var $param = $("<span>").attr({
// "data-type": "param",
// "data-value": param
// }).css({
// color: "white",
// backgroundColor: "#009de3",
// padding: "0 5px"
// }).text(param).keydown(function (e) {
// if (e.keyCode === BI.KeyCode.BACKSPACE || e.keyCode === BI.KeyCode.DELETE) {
// $param.destroy();
// }
// e.stopEvent();
// return false;
// });
// var wrapper = o.editor.instance.getElm().element;
// if (wrapper.find(sel).length <= 0) {
// wrapper.append($param);
// } else {
// sel.after($param);
// }
// this._addBlank($param);
// },
//
// keydown: function (e) {
// var o = this.options;
// var sel = this._get$Sel();
// if (e.keyCode === 229) {// 中文输入法
// if (this._isParam(sel)) {
// this._addBlank(sel);
// e.stopEvent();
// return false;
// }
// }
// if (BI.Key[e.keyCode] || e.keyCode === BI.KeyCode.TAB || e.keyCode === BI.KeyCode.ENTER || e.keyCode === BI.KeyCode.SPACE) {
// if (this._isParam(sel)) {
// e.stopEvent();
// return false;
// }
// }
// if (e.keyCode === BI.KeyCode.BACKSPACE || e.keyCode === BI.KeyCode.DELETE) {
// if (this._isParam(sel)) {
// sel.destroy();
// e.preventDefault();
// return false;
// }
// }
// },
//
// key: function (e) {
// }
// });
key: function (e) {
}
});/**
/**
* 颜色选择
*
* Created by GUY on 2015/11/26.
@ -12357,25 +12422,31 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
disableSelected: true,
isHalfCheckedBySelectedValue: function (selectedValues) {
return selectedValues.length > 0;
}
},
halfSelected: false
});
},
_init: function () {
BI.MultiSelectBar.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var isSelect = o.selected === true;
var isHalfSelect = !o.selected && o.halfSelected;
this.checkbox = BI.createWidget({
type: "bi.checkbox",
stopPropagation: true,
handler: function () {
self.setSelected(self.isSelected());
}
},
selected: isSelect,
invisible: isHalfSelect
});
this.half = BI.createWidget({
type: "bi.half_icon_button",
stopPropagation: true,
handler: function () {
self.setSelected(true);
}
},
invisible: isSelect || !isHalfSelect
});
this.checkbox.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, self.isSelected(), self);
@ -12414,7 +12485,10 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
el: this.text
}]
});
this.half.invisible();
},
_setSelected: function (v) {
this.checkbox.setSelected(!!v);
},
// 自己手动控制选中
@ -12433,8 +12507,9 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
},
setHalfSelected: function (b) {
this._half = !!b;
this.halfSelected = !!b;
if (b === true) {
this.checkbox.setSelected(false);
this.half.visible();
this.checkbox.invisible();
} else {
@ -12444,7 +12519,7 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
},
isHalfSelected: function () {
return !!this._half;
return !this.isSelected() && !!this.halfSelected;
},
isSelected: function () {
@ -12454,7 +12529,7 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
setValue: function (selectedValues) {
BI.MultiSelectBar.superclass.setValue.apply(this, arguments);
var isAllChecked = this.options.isAllCheckedBySelectedValue.apply(this, arguments);
this.setSelected(isAllChecked);
this._setSelected(isAllChecked);
!isAllChecked && this.setHalfSelected(this.options.isHalfCheckedBySelectedValue.apply(this, arguments));
}
});
@ -13266,7 +13341,8 @@ BI.LevelTree = BI.inherit(BI.Widget, {
chooseType: 0
},
expander: {},
items: []
items: [],
value: ""
});
},
@ -13335,6 +13411,7 @@ BI.LevelTree = BI.inherit(BI.Widget, {
}, o.expander),
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),
value: o.value,
el: BI.extend({
type: "bi.button_tree",
@ -13426,6 +13503,9 @@ BI.SimpleTreeView = BI.inherit(BI.Widget, {
if (BI.isNotEmptyArray(o.items)) {
this.populate();
}
if (BI.isNotNull(o.value)) {
this.setValue(o.value);
}
},
populate: function (items, keyword) {
@ -13437,7 +13517,7 @@ BI.SimpleTreeView = BI.inherit(BI.Widget, {
});
},
setValue: function (v) {
_digest: function (v) {
v || (v = []);
var self = this, map = {};
var selected = [];
@ -13465,8 +13545,11 @@ BI.SimpleTreeView = BI.inherit(BI.Widget, {
}
}
});
return BI.makeObject(v.concat(selected));
},
this.tree.setValue(BI.makeObject(v.concat(selected)));
setValue: function (v) {
this.tree.setValue(this._digest(v));
},
_getValue: function () {
@ -13637,6 +13720,9 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
textAlign: "left",
height: o.height,
text: o.text,
title: function () {
return o.text;
},
hgap: c.hgap
});
this.trigerButton = BI.createWidget({
@ -13654,7 +13740,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
items: [{
el: {
type: "bi.icon_change_button",
cls: "icon-combo-trigger-icon " + o.iconClass,
cls: "icon-combo-trigger-icon " + o.iconCls,
ref: function (_ref) {
self.icon = _ref;
},
@ -13674,7 +13760,6 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
setValue: function (value) {
this.text.setValue(value);
this.text.setTitle(value);
},
setIcon: function (iconCls) {
@ -13696,7 +13781,6 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
setText: function (text) {
this.text.setText(text);
this.text.setTitle(text);
}
});
BI.shortcut("bi.icon_text_trigger", BI.IconTextTrigger);/**
@ -13715,40 +13799,50 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
this.options.height -= 2;
BI.SelectIconTextTrigger.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var obj = this._digist(o.value, o.items);
this.trigger = BI.createWidget({
type: "bi.icon_text_trigger",
element: this,
text: obj.text,
iconCls: obj.iconCls,
height: o.height
});
if (BI.isKey(o.value)) {
this.setValue(o.value);
}
},
setValue: function (vals) {
_digist: function (vals, items) {
var o = this.options;
vals = BI.isArray(vals) ? vals : [vals];
var result;
var items = BI.Tree.transformToArrayFormat(this.options.items);
BI.any(items, function (i, item) {
var formatItems = BI.Tree.transformToArrayFormat(items);
BI.any(formatItems, function (i, item) {
if (BI.deepContains(vals, item.value)) {
result = {
text: item.text || item.value,
iconClass: item.iconClass
iconCls: item.iconCls
};
return true;
}
});
if (BI.isNotNull(result)) {
this.trigger.setText(result.text);
this.trigger.setIcon(result.iconClass);
return {
text: result.text,
iconCls: result.iconCls
};
} else {
this.trigger.setText(o.value);
this.trigger.setIcon("");
return {
text: o.text,
iconCls: ""
};
}
},
setValue: function (vals) {
var obj = this._digist(vals, this.options.items);
this.trigger.setText(obj.text);
this.trigger.setIcon(obj.iconCls);
},
populate: function (items) {
this.options.items = items;
}
@ -13781,6 +13875,9 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
textAlign: "left",
height: o.height,
text: o.text,
title: function () {
return o.text;
},
hgap: c.hgap,
readonly: o.readonly
});
@ -13804,14 +13901,8 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
});
},
setValue: function (value) {
this.text.setValue(value);
this.text.setTitle(value);
},
setText: function (text) {
this.text.setText(text);
this.text.setTitle(text);
}
});
BI.shortcut("bi.text_trigger", BI.TextTrigger);/**
@ -13837,31 +13928,33 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
this.trigger = BI.createWidget({
type: "bi.text_trigger",
element: this,
height: o.height
height: o.height,
text: this._digest(o.value, o.items)
});
if (BI.isKey(o.text)) {
this.setValue(o.text);
}
},
setValue: function (vals) {
_digest: function(vals, items){
var o = this.options;
vals = BI.isArray(vals) ? vals : [vals];
var result = [];
var items = BI.Tree.transformToArrayFormat(this.options.items);
BI.each(items, function (i, item) {
var formatItems = BI.Tree.transformToArrayFormat(items);
BI.each(formatItems, function (i, item) {
if (BI.deepContains(vals, item.value) && !result.contains(item.text || item.value)) {
result.push(item.text || item.value);
}
});
if (result.length > 0) {
this.trigger.setText(result.join(","));
return result.join(",");
} else {
this.trigger.setText(o.text);
return o.text;
}
},
setValue: function (vals) {
this.trigger.setText(this._digest(vals, this.options.items));
},
populate: function (items) {
this.options.items = items;
}
@ -13885,36 +13978,44 @@ BI.SmallSelectTextTrigger = BI.inherit(BI.Trigger, {
this.options.height -= 2;
BI.SmallSelectTextTrigger.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var obj = this._digest(o.text, o.items);
this.trigger = BI.createWidget({
type: "bi.small_text_trigger",
element: this,
height: o.height - 2
height: o.height - 2,
text: obj.text,
cls: obj.cls
});
if (BI.isKey(o.text)) {
this.setValue(o.text);
}
},
setValue: function (vals) {
_digest: function(vals, items){
var o = this.options;
vals = BI.isArray(vals) ? vals : [vals];
var result = [];
var items = BI.Tree.transformToArrayFormat(this.options.items);
BI.each(items, function (i, item) {
var formatItems = BI.Tree.transformToArrayFormat(items);
BI.each(formatItems, function (i, item) {
if (BI.deepContains(vals, item.value) && !result.contains(item.text || item.value)) {
result.push(item.text || item.value);
}
});
if (result.length > 0) {
this.trigger.element.removeClass("bi-water-mark");
this.trigger.setText(result.join(","));
return {
cls: "",
text: result.join(",")
}
} else {
this.trigger.element.addClass("bi-water-mark");
this.trigger.setText(o.text);
return {
cls: "bi-water-mark",
text: o.text
}
}
},
setValue: function (vals) {
this.trigger.setText(this._digest(vals, this.options.items));
},
populate: function (items) {
this.options.items = items;
}

502
dist/core.css vendored

@ -87,7 +87,7 @@ dfn {
}
mark {
background: #ff0;
color: #000000;
color: #000;
}
p,
pre {
@ -264,11 +264,6 @@ textarea {
margin: 0;
padding: 0;
outline: none;
border: 1px solid #d4dadd;
}
.bi-theme-dark input,
.bi-theme-dark textarea {
border: 1px solid #525466;
}
ul {
list-style: disc;
@ -281,6 +276,14 @@ i {
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
input,
textarea {
border: 1px solid #d4dadd;
}
.bi-theme-dark input,
.bi-theme-dark textarea {
border: 1px solid #525466;
}
.base-disabled {
cursor: default !important;
color: #9ea6b2 !important;
@ -332,7 +335,7 @@ i {
color: #3d4d66;
}
.bi-theme-dark .bi-background {
background-color: #191b2b;
background-color: #191B2B;
color: #cccccc;
}
.bi-theme-dark .bi-background .bi-input {
@ -931,6 +934,84 @@ i {
.bi-list-item-select.active .bi-high-light {
color: #ffffff;
}
.bi-list-item-select.button-success:active,
.bi-list-item-select.button-success.active {
color: #ffffff;
background-color: #58cc7d;
}
.bi-list-item-select.button-success:active .bi-input,
.bi-list-item-select.button-success.active .bi-input {
color: #ffffff;
}
.bi-list-item-select.button-success:active .bi-textarea,
.bi-list-item-select.button-success.active .bi-textarea {
color: #ffffff;
}
.bi-list-item-select.button-success:active .bi-high-light,
.bi-list-item-select.button-success.active .bi-high-light {
color: #ffffff;
}
.bi-list-item-select.button-success:active.bi-high-light-border,
.bi-list-item-select.button-success.active.bi-high-light-border {
border-color: #58cc7d;
}
.bi-list-item-select.button-warning {
color: #ff4949;
}
.bi-list-item-select.button-warning .bi-input {
color: #ff4949;
}
.bi-list-item-select.button-warning .bi-textarea {
color: #ff4949;
}
.bi-list-item-select.button-warning .bi-high-light {
color: #ff4949;
}
.bi-list-item-select.button-warning.bi-high-light-border {
border-color: #e85050;
}
.bi-list-item-select.button-warning:hover,
.bi-list-item-select.button-warning.hover {
color: #ff4949;
background-color: #ffecec;
}
.bi-list-item-select.button-warning:hover .bi-input,
.bi-list-item-select.button-warning.hover .bi-input {
color: #ff4949;
}
.bi-list-item-select.button-warning:hover .bi-textarea,
.bi-list-item-select.button-warning.hover .bi-textarea {
color: #ff4949;
}
.bi-list-item-select.button-warning:hover .bi-high-light,
.bi-list-item-select.button-warning.hover .bi-high-light {
color: #ff4949;
}
.bi-list-item-select.button-warning:hover.bi-high-light-border,
.bi-list-item-select.button-warning.hover.bi-high-light-border {
border-color: #e85050;
}
.bi-list-item-select.button-warning:active,
.bi-list-item-select.button-warning.active {
color: #ffffff;
background-color: #ff4949;
}
.bi-list-item-select.button-warning:active .bi-input,
.bi-list-item-select.button-warning.active .bi-input {
color: #ffffff;
}
.bi-list-item-select.button-warning:active .bi-textarea,
.bi-list-item-select.button-warning.active .bi-textarea {
color: #ffffff;
}
.bi-list-item-select.button-warning:active .bi-high-light,
.bi-list-item-select.button-warning.active .bi-high-light {
color: #ffffff;
}
.bi-list-item-select.button-warning:active.bi-high-light-border,
.bi-list-item-select.button-warning.active.bi-high-light-border {
border-color: #e85050;
}
.bi-list-item-select.disabled,
.bi-list-item-select.disabled:hover,
.bi-list-item-select.disabled:active {
@ -952,6 +1033,11 @@ i {
.bi-list-item-select.disabled:active .bi-high-light {
color: #9ea6b2 !important;
}
.bi-list-item-select.disabled.bi-high-light-border,
.bi-list-item-select.disabled:hover.bi-high-light-border,
.bi-list-item-select.disabled:active.bi-high-light-border {
border-color: #cccccc;
}
.bi-theme-dark .bi-list-item-select:hover,
.bi-theme-dark .bi-list-item-select.hover {
color: #ffffff;
@ -1237,9 +1323,47 @@ i {
-o-align-items: center;
align-items: center;
}
.bi-flex-center-layout > * {
margin: auto;
.bi-flex-center-layout {
display: box;
/* OLD - Android 4.4- */
display: -webkit-box;
/* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box;
/* OLD - Firefox 19- (buggy but mostly works) */
display: -ms-flexbox;
/* TWEENER - IE 10 */
display: -webkit-flex;
/* NEW - Chrome */
display: flex;
/* NEW, Spec - Opera 12.1, Firefox 20+ */
/* 09版 */
-webkit-box-orient: horizontal;
/* 12版 */
-webkit-flex-direction: row;
-moz-flex-direction: row;
-ms-flex-direction: row;
-o-flex-direction: row;
flex-direction: row;
/* 09版 */
-webkit-box-pack: center;
/* 12版 */
-webkit-justify-content: center;
-moz-justify-content: center;
-ms-justify-content: center;
-o-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
/* 09版 */
-webkit-box-align: center;
/* 12版 */
-webkit-align-items: center;
-moz-align-items: center;
-ms-flex-align: center;
-ms-align-items: center;
-o-align-items: center;
align-items: center;
}
.bi-flex-horizontal-layout {
display: box;
/* OLD - Android 4.4- */
@ -1310,9 +1434,7 @@ i {
-o-align-items: flex-end;
align-items: flex-end;
}
.bi-flex-horizontal-layout > * {
margin: auto;
}
.bi-flex-vertical-center {
display: box;
/* OLD - Android 4.4- */
@ -1389,9 +1511,7 @@ i {
-o-align-items: stretch;
align-items: stretch;
}
.bi-flex-vertical-center > * {
margin: auto;
}
.bi-flex-wrapper-center-layout .flex-wrapper-center-layout-wrapper {
display: box;
/* OLD - Android 4.4- */
@ -1435,9 +1555,7 @@ i {
min-height: 100%;
float: left;
}
.bi-flex-wrapper-center-layout > * {
margin: auto;
}
.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper {
display: box;
/* OLD - Android 4.4- */
@ -1507,9 +1625,7 @@ i {
-o-align-items: flex-end;
align-items: flex-end;
}
.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper > * {
margin: auto;
}
.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper {
display: box;
/* OLD - Android 4.4- */
@ -1587,25 +1703,343 @@ i {
-o-align-items: stretch;
align-items: stretch;
}
.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper > * {
margin: auto;
.bi-flex-horizontal-layout {
display: box;
/* OLD - Android 4.4- */
display: -webkit-box;
/* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box;
/* OLD - Firefox 19- (buggy but mostly works) */
display: -ms-flexbox;
/* TWEENER - IE 10 */
display: -webkit-flex;
/* NEW - Chrome */
display: flex;
/* NEW, Spec - Opera 12.1, Firefox 20+ */
/* 09版 */
-webkit-box-orient: horizontal;
/* 12版 */
-webkit-flex-direction: row;
-moz-flex-direction: row;
-ms-flex-direction: row;
-o-flex-direction: row;
flex-direction: row;
/* 09版 */
-webkit-box-pack: flex-start;
/* 12版 */
-webkit-justify-content: flex-start;
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-o-justify-content: flex-start;
-ms-flex-pack: start;
justify-content: flex-start;
/* 09版 */
-webkit-box-align: start;
/* 12版 */
-webkit-align-items: flex-start;
-moz-align-items: flex-start;
-ms-align-items: flex-start;
-ms-flex-align: start;
-o-align-items: flex-start;
align-items: flex-start;
/* 09版 */
/*-webkit-box-lines: multiple;*/
/* 12版 */
-webkit-flex-wrap: nowrap;
-moz-flex-wrap: nowrap;
-ms-flex-wrap: nowrap;
-o-flex-wrap: nowrap;
flex-wrap: nowrap;
}
.bi-inline-center-adapt-layout:after {
display: inline-block;
width: 0;
.bi-flex-horizontal-layout.middle {
/* 09版 */
-webkit-box-align: center;
/* 12版 */
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
}
.bi-flex-horizontal-layout.bottom {
/* 09版 */
-webkit-box-align: flex-end;
/* 12版 */
-webkit-align-items: flex-end;
-moz-align-items: flex-end;
-ms-align-items: flex-end;
-ms-flex-align: end;
-o-align-items: flex-end;
align-items: flex-end;
}
.bi-flex-vertical-center {
display: box;
/* OLD - Android 4.4- */
display: -webkit-box;
/* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box;
/* OLD - Firefox 19- (buggy but mostly works) */
display: -ms-flexbox;
/* TWEENER - IE 10 */
display: -webkit-flex;
/* NEW - Chrome */
display: flex;
/* NEW, Spec - Opera 12.1, Firefox 20+ */
/* 09版 */
-webkit-box-orient: horizontal;
/* 12版 */
-webkit-flex-direction: row;
-moz-flex-direction: row;
-ms-flex-direction: row;
-o-flex-direction: row;
flex-direction: row;
/* 09版 */
-webkit-box-pack: flex-start;
/* 12版 */
-webkit-justify-content: flex-start;
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-o-justify-content: flex-start;
-ms-flex-pack: start;
justify-content: flex-start;
/* 09版 */
-webkit-box-align: center;
/* 12版 */
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
/* 09版 */
/*-webkit-box-lines: multiple;*/
/* 12版 */
-webkit-flex-wrap: nowrap;
-moz-flex-wrap: nowrap;
-ms-flex-wrap: nowrap;
-o-flex-wrap: nowrap;
flex-wrap: nowrap;
}
.bi-flex-vertical-center.stretch {
/* 09版 */
-webkit-box-orient: vertical;
/* 12版 */
-webkit-flex-direction: column;
-moz-flex-direction: column;
-ms-flex-direction: column;
-o-flex-direction: column;
flex-direction: column;
/* 09版 */
-webkit-box-pack: center;
/* 12版 */
-webkit-justify-content: center;
-moz-justify-content: center;
-ms-justify-content: center;
-ms-flex-pack: center;
-o-justify-content: center;
justify-content: center;
/* 09版 */
-webkit-box-align: stretch;
/* 12版 */
-webkit-align-items: stretch;
-moz-align-items: stretch;
-ms-align-items: stretch;
-ms-flex-align: stretch;
-o-align-items: stretch;
align-items: stretch;
}
.bi-flex-wrapper-center-layout .flex-wrapper-center-layout-wrapper {
display: box;
/* OLD - Android 4.4- */
display: -webkit-box;
/* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box;
/* OLD - Firefox 19- (buggy but mostly works) */
display: -ms-flexbox;
/* TWEENER - IE 10 */
display: -webkit-flex;
/* NEW - Chrome */
display: flex;
/* NEW, Spec - Opera 12.1, Firefox 20+ */
/* 09版 */
-webkit-box-orient: horizontal;
/* 12版 */
-webkit-flex-direction: row;
-moz-flex-direction: row;
-ms-flex-direction: row;
-o-flex-direction: row;
flex-direction: row;
/* 09版 */
-webkit-box-pack: center;
/* 12版 */
-webkit-justify-content: center;
-moz-justify-content: center;
-ms-justify-content: center;
-ms-flex-pack: center;
-o-justify-content: center;
justify-content: center;
/* 09版 */
-webkit-box-align: center;
/* 12版 */
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
min-width: 100%;
min-height: 100%;
vertical-align: middle;
content: ' ';
float: left;
}
.bi-inline-vertical-adapt-layout:after {
display: inline-block;
width: 0;
.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper {
display: box;
/* OLD - Android 4.4- */
display: -webkit-box;
/* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box;
/* OLD - Firefox 19- (buggy but mostly works) */
display: -ms-flexbox;
/* TWEENER - IE 10 */
display: -webkit-flex;
/* NEW - Chrome */
display: flex;
/* NEW, Spec - Opera 12.1, Firefox 20+ */
/* 09版 */
-webkit-box-orient: horizontal;
/* 12版 */
-webkit-flex-direction: row;
-moz-flex-direction: row;
-ms-flex-direction: row;
-o-flex-direction: row;
flex-direction: row;
/* 09版 */
-webkit-box-pack: flex-start;
/* 12版 */
-webkit-justify-content: flex-start;
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-ms-flex-pack: start;
-o-justify-content: flex-start;
justify-content: flex-start;
/* 09版 */
-webkit-box-align: flex-start;
/* 12版 */
-webkit-align-items: flex-start;
-moz-align-items: flex-start;
-ms-align-items: flex-start;
-ms-flex-align: start;
-o-align-items: flex-start;
align-items: flex-start;
/* 09版 */
/*-webkit-box-lines: multiple;*/
/* 12版 */
-webkit-flex-wrap: nowrap;
-moz-flex-wrap: nowrap;
-ms-flex-wrap: nowrap;
-o-flex-wrap: nowrap;
flex-wrap: nowrap;
min-height: 100%;
}
.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.middle {
/* 09版 */
-webkit-box-align: center;
/* 12版 */
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-o-align-items: center;
align-items: center;
}
.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.bottom {
/* 09版 */
-webkit-box-align: flex-end;
/* 12版 */
-webkit-align-items: flex-end;
-moz-align-items: flex-end;
-ms-align-items: flex-end;
-o-align-items: flex-end;
align-items: flex-end;
}
.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper {
display: box;
/* OLD - Android 4.4- */
display: -webkit-box;
/* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box;
/* OLD - Firefox 19- (buggy but mostly works) */
display: -ms-flexbox;
/* TWEENER - IE 10 */
display: -webkit-flex;
/* NEW - Chrome */
display: flex;
/* NEW, Spec - Opera 12.1, Firefox 20+ */
/* 09版 */
-webkit-box-orient: horizontal;
/* 12版 */
-webkit-flex-direction: row;
-moz-flex-direction: row;
-ms-flex-direction: row;
-o-flex-direction: row;
flex-direction: row;
/* 09版 */
-webkit-box-pack: flex-start;
/* 12版 */
-webkit-justify-content: flex-start;
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-ms-flex-pack: start;
-o-justify-content: flex-start;
justify-content: flex-start;
/* 09版 */
-webkit-box-align: center;
/* 12版 */
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
/* 09版 */
/*-webkit-box-lines: multiple;*/
/* 12版 */
-webkit-flex-wrap: nowrap;
-moz-flex-wrap: nowrap;
-ms-flex-wrap: nowrap;
-o-flex-wrap: nowrap;
flex-wrap: nowrap;
min-height: 100%;
vertical-align: middle;
content: ' ';
float: left;
}
.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper.stretch {
width: 100%;
/* 09版 */
-webkit-box-orient: vertical;
/* 12版 */
-webkit-flex-direction: column;
-moz-flex-direction: column;
-ms-flex-direction: column;
-o-flex-direction: column;
flex-direction: column;
/* 09版 */
-webkit-box-pack: center;
/* 12版 */
-webkit-justify-content: center;
-moz-justify-content: center;
-ms-justify-content: center;
-o-justify-content: center;
justify-content: center;
/* 09版 */
-webkit-box-align: stretch;
/* 12版 */
-webkit-align-items: stretch;
-moz-align-items: stretch;
-ms-align-items: stretch;
-o-align-items: stretch;
align-items: stretch;
}
.bi-theme-dark {
background-color: #191b2b;
background-color: #191B2B;
color: #cccccc;
}
.bi-theme-dark .bi-input {

500
dist/core.js vendored

@ -17102,7 +17102,63 @@ BI.Layout = BI.inherit(BI.Widget, {
}
});
BI.shortcut("bi.layout", BI.Layout);/**
BI.shortcut("bi.layout", BI.Layout);BI.Plugin = BI.Plugin || {};
!(function () {
var _WidgetsPlugin = {};
var _ObjectPlugin = {};
BI.extend(BI.Plugin, {
getWidget: function (type, options) {
if (_WidgetsPlugin[type]) {
var res;
for (var i = _WidgetsPlugin[type].length - 1; i >= 0; i--) {
if (res = _WidgetsPlugin[type][i](options)) {
return res;
}
}
}
return options;
},
registerWidget: function (type, fn) {
if (!_WidgetsPlugin[type]) {
_WidgetsPlugin[type] = [];
}
if (_WidgetsPlugin[type].length > 0) {
console.log("组件已经注册过了!");
}
_WidgetsPlugin[type].push(fn);
},
relieveWidget: function (type) {
delete _WidgetsPlugin[type];
},
getObject: function (type, object) {
if (_ObjectPlugin[type]) {
var res;
for (var i = 0, len = _ObjectPlugin[type].length; i < len; i++) {
res = _ObjectPlugin[type][i](object);
}
}
return res || object;
},
registerObject: function (type, fn) {
if (!_ObjectPlugin[type]) {
_ObjectPlugin[type] = [];
}
if (_ObjectPlugin[type].length > 0) {
console.log("对象已经注册过了!");
}
_ObjectPlugin[type].push(fn);
},
relieveObject: function (type) {
delete _ObjectPlugin[type];
}
});
})();/**
* guy
* 由一个元素切换到另一个元素的行为
* @class BI.Action
@ -17952,7 +18008,102 @@ BI.RedMarkBehavior = BI.inherit(BI.Behavior, {
}
});
}
});/**
});// 工程配置
(function () {
// 注册布局
var isSupportFlex = BI.isSupportCss3("flex");
BI.Plugin.registerWidget("bi.horizontal", function (ob) {
if (isSupportFlex) {
return BI.extend(ob, {type: "bi.flex_horizontal"});
}
return ob;
});
BI.Plugin.registerWidget("bi.center_adapt", function (ob) {
if (isSupportFlex && ob.items && ob.items.length <= 1) {
// 有滚动条的情况下需要用到flex_wrapper_center布局
if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) {
// 不是IE用flex_wrapper_center布局
if (!BI.isIE()) {
return BI.extend(ob, {type: "bi.flex_wrapper_center"});
}
return ob;
}
return BI.extend(ob, {type: "bi.flex_center"});
}
return ob;
});
BI.Plugin.registerWidget("bi.vertical_adapt", function (ob) {
if (isSupportFlex) {
// 有滚动条的情况下需要用到flex_wrapper_center布局
if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) {
// 不是IE用flex_wrapper_center布局
if (!BI.isIE()) {
return BI.extend({}, ob, {type: "bi.flex_wrapper_vertical_center"});
}
return ob;
}
return BI.extend(ob, {type: "bi.flex_vertical_center"});
}
return ob;
});
BI.Plugin.registerWidget("bi.float_center_adapt", function (ob) {
if (isSupportFlex) {
// 有滚动条的情况下需要用到flex_wrapper_center布局
if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) {
// 不是IE用flex_wrapper_center布局
if (!BI.isIE()) {
return BI.extend({}, ob, {type: "bi.flex_wrapper_center"});
}
return ob;
}
return BI.extend(ob, {type: "bi.flex_center"});
}
return ob;
});
// 注册滚动条
BI.Plugin.registerWidget("bi.grid_table_scrollbar", function (ob) {
if (BI.isIE9Below()) {
return BI.extend(ob, {type: "bi.native_table_scrollbar"});
}
return ob;
});
BI.Plugin.registerWidget("bi.grid_table_horizontal_scrollbar", function (ob) {
if (BI.isIE9Below()) {
return BI.extend(ob, {type: "bi.native_table_horizontal_scrollbar"});
}
return ob;
});
// 注册控件
BI.Plugin.registerWidget("bi.grid_table", function (ob) {
// 非chrome下滚动条滑动效果不好,禁止掉
if (!(BI.isChrome() && BI.isWindows() && !BI.isEdge())) {
return BI.extend(ob, {type: "bi.quick_grid_table"});
}
return ob;
});
BI.Plugin.registerWidget("bi.collection_table", function (ob) {
// 非chrome下滚动条滑动效果不好,禁止掉
if (!(BI.isChrome() && BI.isWindows() && !BI.isEdge())) {
return BI.extend(ob, {type: "bi.quick_collection_table"});
}
return ob;
});
// IE8下滚动条用原生的
$(function () {
if (BI.isIE9Below()) {
BI.GridTableScrollbar.SIZE = 18;
}
});
}());/**
* guy
* 控制器
* Controller层超类
@ -18404,27 +18555,13 @@ BI.LayerController = BI.inherit(BI.Controller, {
},
make: function (name, container, op) {
if (this.has(name)) {
return this.get(name);
if (BI.isWidget(container)) {
op = op || {};
op.container = container;
} else {
op = container;
}
op || (op = {});
var widget = BI.createWidget((op.render || {}), {
type: "bi.layout"
});
BI.createWidget({
type: "bi.absolute",
element: container || this.options.render,
items: [BI.extend({
el: widget
}, {
top: 0,
left: 0,
right: 0,
bottom: 0
}, op.offset)]
});
this.add(name, widget, widget);
return widget;
return this.create(name, null, op);
},
create: function (name, from, op) {
@ -20602,63 +20739,7 @@ BI.HorizontalFillLayoutLogic = BI.inherit(BI.Logic, {
_init: function () {
BI.HorizontalFillLayoutLogic.superclass._init.apply(this, arguments);
}
});BI.Plugin = BI.Plugin || {};
!(function () {
var _WidgetsPlugin = {};
var _ObjectPlugin = {};
BI.extend(BI.Plugin, {
getWidget: function (type, options) {
if (_WidgetsPlugin[type]) {
var res;
for (var i = _WidgetsPlugin[type].length - 1; i >= 0; i--) {
if (res = _WidgetsPlugin[type][i](options)) {
return res;
}
}
}
return options;
},
registerWidget: function (type, fn) {
if (!_WidgetsPlugin[type]) {
_WidgetsPlugin[type] = [];
}
if (_WidgetsPlugin[type].length > 0) {
console.log("组件已经注册过了!");
}
_WidgetsPlugin[type].push(fn);
},
relieveWidget: function (type) {
delete _WidgetsPlugin[type];
},
getObject: function (type, object) {
if (_ObjectPlugin[type]) {
var res;
for (var i = 0, len = _ObjectPlugin[type].length; i < len; i++) {
res = _ObjectPlugin[type][i](object);
}
}
return res || object;
},
registerObject: function (type, fn) {
if (!_ObjectPlugin[type]) {
_ObjectPlugin[type] = [];
}
if (_ObjectPlugin[type].length > 0) {
console.log("对象已经注册过了!");
}
_ObjectPlugin[type].push(fn);
},
relieveObject: function (type) {
delete _ObjectPlugin[type];
}
});
})();/**
});/**
* 对数组对象的扩展
* @class Array
*/
@ -22188,10 +22269,10 @@ BI.AbsoluteCenterLayout = BI.inherit(BI.Layout, {
var w = BI.AbsoluteCenterLayout.superclass._addElement.apply(this, arguments);
w.element.css({
position: "absolute",
left: o.hgap + o.lgap + (item.lgap || 0),
right: o.hgap + o.rgap + (item.rgap || 0),
top: o.vgap + o.tgap + (item.tgap || 0),
bottom: o.vgap + o.bgap + (item.bgap || 0),
left: o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0),
right: o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0),
top: o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),
bottom: o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0),
margin: "auto"
});
return w;
@ -22234,15 +22315,15 @@ BI.AbsoluteHorizontalLayout = BI.inherit(BI.Layout, {
var w = BI.AbsoluteHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({
position: "absolute",
left: o.hgap + o.lgap + (item.lgap || 0),
right: o.hgap + o.rgap + (item.rgap || 0),
left: o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0),
right: o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0),
margin: "auto"
});
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) {
w.element.css("top", o.vgap + o.tgap + (item.tgap || 0));
if (o.vgap + o.tgap + (item.vgap || 0) + (item.tgap || 0) !== 0) {
w.element.css("top", o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0));
}
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) {
w.element.css("bottom", o.vgap + o.bgap + (item.bgap || 0));
if (o.vgap + o.bgap + (item.vgap || 0) + (item.bgap || 0) !== 0) {
w.element.css("bottom", o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0));
}
return w;
},
@ -22286,15 +22367,15 @@ BI.AbsoluteVerticalLayout = BI.inherit(BI.Layout, {
position: "absolute",
left: item.lgap,
right: item.rgap,
top: o.vgap + o.tgap + (item.tgap || 0),
bottom: o.vgap + o.bgap + (item.bgap || 0),
top: o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),
bottom: o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0),
margin: "auto"
});
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) {
w.element.css("left", o.hgap + o.lgap + (item.lgap || 0));
if (o.hgap + o.lgap + (item.hgap || 0) + (item.lgap || 0) !== 0) {
w.element.css("left", o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0));
}
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) {
w.element.css("right", o.hgap + o.rgap + (item.rgap || 0));
if (o.hgap + o.rgap + (item.hgap || 0) + (item.rgap || 0) !== 0) {
w.element.css("right", o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0));
}
return w;
},
@ -22374,24 +22455,24 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
padding: "0",
border: "none"
});
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) {
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px"
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px"
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
}
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px"
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) {
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px"
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return td;
@ -22491,24 +22572,24 @@ BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {
padding: "0",
border: "none"
});
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) {
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px"
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px"
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
}
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px"
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) {
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px"
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return td;
@ -22781,24 +22862,24 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
padding: "0",
border: "none"
});
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) {
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px"
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px"
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
}
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px"
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) {
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px"
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return td;
@ -22863,24 +22944,24 @@ BI.HorizontalAutoLayout = BI.inherit(BI.Layout, {
position: "relative",
margin: "0px auto"
});
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) {
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px"
"margin-top": (i === 0 ? o.vgap : 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px"
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
}
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px"
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) {
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px"
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return w;
@ -23104,24 +23185,24 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
var o = this.options;
var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative", "flex-shrink": "0"});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) {
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px"
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) > 0) {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px"
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
}
if (o.vgap + o.tgap + (item.tgap || 0) > 0) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px"
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) > 0) {
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px"
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return w;
@ -23168,24 +23249,24 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
var o = this.options;
var w = BI.FlexVerticalCenter.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative", "flex-shrink": "0"});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) {
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px"
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) > 0) {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px"
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
}
if (o.vgap + o.tgap + (item.tgap || 0) > 0) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px"
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) > 0) {
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px"
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return w;
@ -23288,24 +23369,24 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
var o = this.options;
var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) {
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px"
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) > 0) {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px"
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
}
if (o.vgap + o.tgap + (item.tgap || 0) > 0) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px"
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) > 0) {
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px"
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return w;
@ -23373,24 +23454,24 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
var o = this.options;
var w = BI.FlexVerticalCenter.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) {
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px"
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) > 0) {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px"
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
}
if (o.vgap + o.tgap + (item.tgap || 0) > 0) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px"
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) > 0) {
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px"
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return w;
@ -24214,17 +24295,25 @@ BI.FloatLeftLayout = BI.inherit(BI.Layout, {
if (BI.isNotNull(item.top)) {
w.element.css({top: item.top});
}
if ((item.lgap || 0) + o.hgap + o.lgap !== 0) {
w.element.css("margin-left", (item.lgap || 0) + o.hgap + o.lgap);
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if ((item.rgap || 0) + o.hgap + o.rgap !== 0) {
w.element.css("margin-right", (item.rgap || 0) + o.hgap + o.rgap);
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
}
if ((item.tgap || 0) + o.vgap + o.tgap !== 0) {
w.element.css("margin-top", (item.tgap || 0) + o.vgap + o.tgap);
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if ((item.bgap || 0) + o.vgap + o.bgap !== 0) {
w.element.css("margin-bottom", (item.bgap || 0) + o.vgap + o.bgap);
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return w;
},
@ -24279,17 +24368,25 @@ BI.FloatRightLayout = BI.inherit(BI.Layout, {
if (BI.isNotNull(item.top)) {
w.element.css({top: item.top});
}
if ((item.lgap || 0) + o.hgap + o.lgap !== 0) {
w.element.css("margin-left", (item.lgap || 0) + o.hgap + o.lgap);
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if ((item.rgap || 0) + o.hgap + o.rgap !== 0) {
w.element.css("margin-right", (item.rgap || 0) + o.hgap + o.rgap);
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
}
if ((item.tgap || 0) + o.vgap + o.tgap !== 0) {
w.element.css("margin-top", (item.tgap || 0) + o.vgap + o.tgap);
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": (i === 0 ? o.hgap : 0) + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if ((item.bgap || 0) + o.vgap + o.bgap !== 0) {
w.element.css("margin-bottom", (item.bgap || 0) + o.vgap + o.bgap);
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return w;
},
@ -24493,24 +24590,25 @@ BI.HorizontalLayout = BI.inherit(BI.Layout, {
padding: "0",
border: "none"
});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) {
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px"
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) > 0) {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px"
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
}
if (o.vgap + o.tgap + (item.tgap || 0) > 0) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px"
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) > 0) {
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px"
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return td;
@ -24861,7 +24959,7 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
} else {
w = self.getWidgetByName(self.getName() + i + "");
}
w.element.css({position: "absolute", top: o.vgap + o.tgap + "px", bottom: o.vgap + o.bgap + "px"});
w.element.css({position: "absolute", top: (item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap + "px", bottom: (item.bgap || 0) + (item.vgap || 0) + o.vgap + o.bgap + "px"});
});
var left = {}, right = {};
@ -24871,13 +24969,13 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
BI.any(items, function (i, item) {
var w = self.getWidgetByName(self.getName() + i + "");
if (BI.isNull(left[i])) {
left[i] = left[i - 1] + items[i - 1].width + 2 * o.hgap + o.lgap + o.rgap;
left[i] = left[i - 1] + items[i - 1].width + (items[i - 1].lgap || 0) + 2 * (items[i - 1].hgap || 0) + o.hgap + o.lgap + o.rgap;
}
if (item.width < 1 && item.width >= 0) {
w.element.css({left: left[i] * 100 + "%", width: item.width * 100 + "%"});
} else {
w.element.css({
left: left[i] + o.hgap + o.lgap + "px",
left: left[i] + (item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap + "px",
width: BI.isNumber(item.width) ? item.width : ""
});
}
@ -24888,13 +24986,13 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
BI.backAny(items, function (i, item) {
var w = self.getWidgetByName(self.getName() + i + "");
if (BI.isNull(right[i])) {
right[i] = right[i + 1] + items[i + 1].width + 2 * o.hgap + o.lgap + o.rgap;
right[i] = right[i + 1] + items[i + 1].width + (items[i + 1].rgap || 0) + 2 * (items[i + 1].hgap || 0) + o.hgap + o.lgap + o.rgap;
}
if (item.width < 1 && item.width >= 0) {
w.element.css({right: right[i] * 100 + "%", width: item.width * 100 + "%"});
} else {
w.element.css({
right: right[i] + o.hgap + o.rgap + "px",
right: right[i] + (item.rgap || 0) + (item.hgap || 0) + o.hgap + o.rgap + "px",
width: BI.isNumber(item.width) ? item.width : ""
});
}
@ -24966,7 +25064,7 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
} else {
w = self.getWidgetByName(self.getName() + i + "");
}
w.element.css({position: "absolute", left: o.hgap + o.lgap + "px", right: o.hgap + o.rgap + "px"});
w.element.css({position: "absolute", left: (item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap + "px", right: + (item.hgap || 0) + (item.rgap || 0) + o.hgap + o.rgap + "px"});
});
var top = {}, bottom = {};
@ -24976,13 +25074,13 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
BI.any(items, function (i, item) {
var w = self.getWidgetByName(self.getName() + i + "");
if (BI.isNull(top[i])) {
top[i] = top[i - 1] + items[i - 1].height + 2 * o.vgap + o.tgap + o.bgap;
top[i] = top[i - 1] + items[i - 1].height + (items[i - 1].tgap || 0) + 2 * (items[i - 1].vgap || 0) + o.vgap + o.tgap + o.bgap;
}
if (item.height < 1 && item.height >= 0) {
w.element.css({top: top[i] * 100 + "%", height: item.height * 100 + "%"});
} else {
w.element.css({
top: top[i] + o.vgap + o.tgap + "px",
top: top[i] + (item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap + "px",
height: BI.isNumber(item.height) ? item.height : ""
});
}
@ -24993,13 +25091,13 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
BI.backAny(items, function (i, item) {
var w = self.getWidgetByName(self.getName() + i + "");
if (BI.isNull(bottom[i])) {
bottom[i] = bottom[i + 1] + items[i + 1].height + 2 * o.vgap + o.tgap + o.bgap;
bottom[i] = bottom[i + 1] + items[i + 1].height + (items[i + 1].bgap || 0) + 2 * (items[i + 1].vgap || 0) + o.vgap + o.tgap + o.bgap;
}
if (item.height < 1 && item.height >= 0) {
w.element.css({bottom: bottom[i] * 100 + "%", height: item.height * 100 + "%"});
} else {
w.element.css({
bottom: bottom[i] + o.vgap + o.bgap + "px",
bottom: bottom[i] + (item.vgap || 0) + (item.bgap || 0) + o.vgap + o.bgap + "px",
height: BI.isNumber(item.height) ? item.height : ""
});
}
@ -25196,24 +25294,24 @@ BI.VerticalLayout = BI.inherit(BI.Layout, {
w.element.css({
position: "relative"
});
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) {
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px"
"margin-top": (i === 0 ? o.vgap : 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px"
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px"
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) {
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px"
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return w;

495
dist/core_without_normalize.css vendored

@ -1,3 +1,11 @@
input,
textarea {
border: 1px solid #d4dadd;
}
.bi-theme-dark input,
.bi-theme-dark textarea {
border: 1px solid #525466;
}
.base-disabled {
cursor: default !important;
color: #9ea6b2 !important;
@ -49,7 +57,7 @@
color: #3d4d66;
}
.bi-theme-dark .bi-background {
background-color: #191b2b;
background-color: #191B2B;
color: #cccccc;
}
.bi-theme-dark .bi-background .bi-input {
@ -648,6 +656,84 @@
.bi-list-item-select.active .bi-high-light {
color: #ffffff;
}
.bi-list-item-select.button-success:active,
.bi-list-item-select.button-success.active {
color: #ffffff;
background-color: #58cc7d;
}
.bi-list-item-select.button-success:active .bi-input,
.bi-list-item-select.button-success.active .bi-input {
color: #ffffff;
}
.bi-list-item-select.button-success:active .bi-textarea,
.bi-list-item-select.button-success.active .bi-textarea {
color: #ffffff;
}
.bi-list-item-select.button-success:active .bi-high-light,
.bi-list-item-select.button-success.active .bi-high-light {
color: #ffffff;
}
.bi-list-item-select.button-success:active.bi-high-light-border,
.bi-list-item-select.button-success.active.bi-high-light-border {
border-color: #58cc7d;
}
.bi-list-item-select.button-warning {
color: #ff4949;
}
.bi-list-item-select.button-warning .bi-input {
color: #ff4949;
}
.bi-list-item-select.button-warning .bi-textarea {
color: #ff4949;
}
.bi-list-item-select.button-warning .bi-high-light {
color: #ff4949;
}
.bi-list-item-select.button-warning.bi-high-light-border {
border-color: #e85050;
}
.bi-list-item-select.button-warning:hover,
.bi-list-item-select.button-warning.hover {
color: #ff4949;
background-color: #ffecec;
}
.bi-list-item-select.button-warning:hover .bi-input,
.bi-list-item-select.button-warning.hover .bi-input {
color: #ff4949;
}
.bi-list-item-select.button-warning:hover .bi-textarea,
.bi-list-item-select.button-warning.hover .bi-textarea {
color: #ff4949;
}
.bi-list-item-select.button-warning:hover .bi-high-light,
.bi-list-item-select.button-warning.hover .bi-high-light {
color: #ff4949;
}
.bi-list-item-select.button-warning:hover.bi-high-light-border,
.bi-list-item-select.button-warning.hover.bi-high-light-border {
border-color: #e85050;
}
.bi-list-item-select.button-warning:active,
.bi-list-item-select.button-warning.active {
color: #ffffff;
background-color: #ff4949;
}
.bi-list-item-select.button-warning:active .bi-input,
.bi-list-item-select.button-warning.active .bi-input {
color: #ffffff;
}
.bi-list-item-select.button-warning:active .bi-textarea,
.bi-list-item-select.button-warning.active .bi-textarea {
color: #ffffff;
}
.bi-list-item-select.button-warning:active .bi-high-light,
.bi-list-item-select.button-warning.active .bi-high-light {
color: #ffffff;
}
.bi-list-item-select.button-warning:active.bi-high-light-border,
.bi-list-item-select.button-warning.active.bi-high-light-border {
border-color: #e85050;
}
.bi-list-item-select.disabled,
.bi-list-item-select.disabled:hover,
.bi-list-item-select.disabled:active {
@ -669,6 +755,11 @@
.bi-list-item-select.disabled:active .bi-high-light {
color: #9ea6b2 !important;
}
.bi-list-item-select.disabled.bi-high-light-border,
.bi-list-item-select.disabled:hover.bi-high-light-border,
.bi-list-item-select.disabled:active.bi-high-light-border {
border-color: #cccccc;
}
.bi-theme-dark .bi-list-item-select:hover,
.bi-theme-dark .bi-list-item-select.hover {
color: #ffffff;
@ -954,9 +1045,47 @@
-o-align-items: center;
align-items: center;
}
.bi-flex-center-layout > * {
margin: auto;
.bi-flex-center-layout {
display: box;
/* OLD - Android 4.4- */
display: -webkit-box;
/* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box;
/* OLD - Firefox 19- (buggy but mostly works) */
display: -ms-flexbox;
/* TWEENER - IE 10 */
display: -webkit-flex;
/* NEW - Chrome */
display: flex;
/* NEW, Spec - Opera 12.1, Firefox 20+ */
/* 09版 */
-webkit-box-orient: horizontal;
/* 12版 */
-webkit-flex-direction: row;
-moz-flex-direction: row;
-ms-flex-direction: row;
-o-flex-direction: row;
flex-direction: row;
/* 09版 */
-webkit-box-pack: center;
/* 12版 */
-webkit-justify-content: center;
-moz-justify-content: center;
-ms-justify-content: center;
-o-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
/* 09版 */
-webkit-box-align: center;
/* 12版 */
-webkit-align-items: center;
-moz-align-items: center;
-ms-flex-align: center;
-ms-align-items: center;
-o-align-items: center;
align-items: center;
}
.bi-flex-horizontal-layout {
display: box;
/* OLD - Android 4.4- */
@ -1027,9 +1156,7 @@
-o-align-items: flex-end;
align-items: flex-end;
}
.bi-flex-horizontal-layout > * {
margin: auto;
}
.bi-flex-vertical-center {
display: box;
/* OLD - Android 4.4- */
@ -1106,9 +1233,7 @@
-o-align-items: stretch;
align-items: stretch;
}
.bi-flex-vertical-center > * {
margin: auto;
}
.bi-flex-wrapper-center-layout .flex-wrapper-center-layout-wrapper {
display: box;
/* OLD - Android 4.4- */
@ -1152,9 +1277,7 @@
min-height: 100%;
float: left;
}
.bi-flex-wrapper-center-layout > * {
margin: auto;
}
.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper {
display: box;
/* OLD - Android 4.4- */
@ -1224,9 +1347,7 @@
-o-align-items: flex-end;
align-items: flex-end;
}
.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper > * {
margin: auto;
}
.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper {
display: box;
/* OLD - Android 4.4- */
@ -1304,25 +1425,343 @@
-o-align-items: stretch;
align-items: stretch;
}
.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper > * {
margin: auto;
.bi-flex-horizontal-layout {
display: box;
/* OLD - Android 4.4- */
display: -webkit-box;
/* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box;
/* OLD - Firefox 19- (buggy but mostly works) */
display: -ms-flexbox;
/* TWEENER - IE 10 */
display: -webkit-flex;
/* NEW - Chrome */
display: flex;
/* NEW, Spec - Opera 12.1, Firefox 20+ */
/* 09版 */
-webkit-box-orient: horizontal;
/* 12版 */
-webkit-flex-direction: row;
-moz-flex-direction: row;
-ms-flex-direction: row;
-o-flex-direction: row;
flex-direction: row;
/* 09版 */
-webkit-box-pack: flex-start;
/* 12版 */
-webkit-justify-content: flex-start;
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-o-justify-content: flex-start;
-ms-flex-pack: start;
justify-content: flex-start;
/* 09版 */
-webkit-box-align: start;
/* 12版 */
-webkit-align-items: flex-start;
-moz-align-items: flex-start;
-ms-align-items: flex-start;
-ms-flex-align: start;
-o-align-items: flex-start;
align-items: flex-start;
/* 09版 */
/*-webkit-box-lines: multiple;*/
/* 12版 */
-webkit-flex-wrap: nowrap;
-moz-flex-wrap: nowrap;
-ms-flex-wrap: nowrap;
-o-flex-wrap: nowrap;
flex-wrap: nowrap;
}
.bi-flex-horizontal-layout.middle {
/* 09版 */
-webkit-box-align: center;
/* 12版 */
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
}
.bi-inline-center-adapt-layout:after {
display: inline-block;
width: 0;
.bi-flex-horizontal-layout.bottom {
/* 09版 */
-webkit-box-align: flex-end;
/* 12版 */
-webkit-align-items: flex-end;
-moz-align-items: flex-end;
-ms-align-items: flex-end;
-ms-flex-align: end;
-o-align-items: flex-end;
align-items: flex-end;
}
.bi-flex-vertical-center {
display: box;
/* OLD - Android 4.4- */
display: -webkit-box;
/* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box;
/* OLD - Firefox 19- (buggy but mostly works) */
display: -ms-flexbox;
/* TWEENER - IE 10 */
display: -webkit-flex;
/* NEW - Chrome */
display: flex;
/* NEW, Spec - Opera 12.1, Firefox 20+ */
/* 09版 */
-webkit-box-orient: horizontal;
/* 12版 */
-webkit-flex-direction: row;
-moz-flex-direction: row;
-ms-flex-direction: row;
-o-flex-direction: row;
flex-direction: row;
/* 09版 */
-webkit-box-pack: flex-start;
/* 12版 */
-webkit-justify-content: flex-start;
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-o-justify-content: flex-start;
-ms-flex-pack: start;
justify-content: flex-start;
/* 09版 */
-webkit-box-align: center;
/* 12版 */
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
/* 09版 */
/*-webkit-box-lines: multiple;*/
/* 12版 */
-webkit-flex-wrap: nowrap;
-moz-flex-wrap: nowrap;
-ms-flex-wrap: nowrap;
-o-flex-wrap: nowrap;
flex-wrap: nowrap;
}
.bi-flex-vertical-center.stretch {
/* 09版 */
-webkit-box-orient: vertical;
/* 12版 */
-webkit-flex-direction: column;
-moz-flex-direction: column;
-ms-flex-direction: column;
-o-flex-direction: column;
flex-direction: column;
/* 09版 */
-webkit-box-pack: center;
/* 12版 */
-webkit-justify-content: center;
-moz-justify-content: center;
-ms-justify-content: center;
-ms-flex-pack: center;
-o-justify-content: center;
justify-content: center;
/* 09版 */
-webkit-box-align: stretch;
/* 12版 */
-webkit-align-items: stretch;
-moz-align-items: stretch;
-ms-align-items: stretch;
-ms-flex-align: stretch;
-o-align-items: stretch;
align-items: stretch;
}
.bi-flex-wrapper-center-layout .flex-wrapper-center-layout-wrapper {
display: box;
/* OLD - Android 4.4- */
display: -webkit-box;
/* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box;
/* OLD - Firefox 19- (buggy but mostly works) */
display: -ms-flexbox;
/* TWEENER - IE 10 */
display: -webkit-flex;
/* NEW - Chrome */
display: flex;
/* NEW, Spec - Opera 12.1, Firefox 20+ */
/* 09版 */
-webkit-box-orient: horizontal;
/* 12版 */
-webkit-flex-direction: row;
-moz-flex-direction: row;
-ms-flex-direction: row;
-o-flex-direction: row;
flex-direction: row;
/* 09版 */
-webkit-box-pack: center;
/* 12版 */
-webkit-justify-content: center;
-moz-justify-content: center;
-ms-justify-content: center;
-ms-flex-pack: center;
-o-justify-content: center;
justify-content: center;
/* 09版 */
-webkit-box-align: center;
/* 12版 */
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
min-width: 100%;
min-height: 100%;
vertical-align: middle;
content: ' ';
float: left;
}
.bi-inline-vertical-adapt-layout:after {
display: inline-block;
width: 0;
.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper {
display: box;
/* OLD - Android 4.4- */
display: -webkit-box;
/* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box;
/* OLD - Firefox 19- (buggy but mostly works) */
display: -ms-flexbox;
/* TWEENER - IE 10 */
display: -webkit-flex;
/* NEW - Chrome */
display: flex;
/* NEW, Spec - Opera 12.1, Firefox 20+ */
/* 09版 */
-webkit-box-orient: horizontal;
/* 12版 */
-webkit-flex-direction: row;
-moz-flex-direction: row;
-ms-flex-direction: row;
-o-flex-direction: row;
flex-direction: row;
/* 09版 */
-webkit-box-pack: flex-start;
/* 12版 */
-webkit-justify-content: flex-start;
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-ms-flex-pack: start;
-o-justify-content: flex-start;
justify-content: flex-start;
/* 09版 */
-webkit-box-align: flex-start;
/* 12版 */
-webkit-align-items: flex-start;
-moz-align-items: flex-start;
-ms-align-items: flex-start;
-ms-flex-align: start;
-o-align-items: flex-start;
align-items: flex-start;
/* 09版 */
/*-webkit-box-lines: multiple;*/
/* 12版 */
-webkit-flex-wrap: nowrap;
-moz-flex-wrap: nowrap;
-ms-flex-wrap: nowrap;
-o-flex-wrap: nowrap;
flex-wrap: nowrap;
min-height: 100%;
}
.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.middle {
/* 09版 */
-webkit-box-align: center;
/* 12版 */
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-o-align-items: center;
align-items: center;
}
.bi-flex-wrapper-horizontal-layout .flex-wrapper-horizontal-layout-wrapper.bottom {
/* 09版 */
-webkit-box-align: flex-end;
/* 12版 */
-webkit-align-items: flex-end;
-moz-align-items: flex-end;
-ms-align-items: flex-end;
-o-align-items: flex-end;
align-items: flex-end;
}
.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper {
display: box;
/* OLD - Android 4.4- */
display: -webkit-box;
/* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box;
/* OLD - Firefox 19- (buggy but mostly works) */
display: -ms-flexbox;
/* TWEENER - IE 10 */
display: -webkit-flex;
/* NEW - Chrome */
display: flex;
/* NEW, Spec - Opera 12.1, Firefox 20+ */
/* 09版 */
-webkit-box-orient: horizontal;
/* 12版 */
-webkit-flex-direction: row;
-moz-flex-direction: row;
-ms-flex-direction: row;
-o-flex-direction: row;
flex-direction: row;
/* 09版 */
-webkit-box-pack: flex-start;
/* 12版 */
-webkit-justify-content: flex-start;
-moz-justify-content: flex-start;
-ms-justify-content: flex-start;
-ms-flex-pack: start;
-o-justify-content: flex-start;
justify-content: flex-start;
/* 09版 */
-webkit-box-align: center;
/* 12版 */
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-ms-flex-align: center;
-o-align-items: center;
align-items: center;
/* 09版 */
/*-webkit-box-lines: multiple;*/
/* 12版 */
-webkit-flex-wrap: nowrap;
-moz-flex-wrap: nowrap;
-ms-flex-wrap: nowrap;
-o-flex-wrap: nowrap;
flex-wrap: nowrap;
min-height: 100%;
vertical-align: middle;
content: ' ';
float: left;
}
.bi-flex-wrapper-vertical-center .flex-wrapper-vertical-center-wrapper.stretch {
width: 100%;
/* 09版 */
-webkit-box-orient: vertical;
/* 12版 */
-webkit-flex-direction: column;
-moz-flex-direction: column;
-ms-flex-direction: column;
-o-flex-direction: column;
flex-direction: column;
/* 09版 */
-webkit-box-pack: center;
/* 12版 */
-webkit-justify-content: center;
-moz-justify-content: center;
-ms-justify-content: center;
-o-justify-content: center;
justify-content: center;
/* 09版 */
-webkit-box-align: stretch;
/* 12版 */
-webkit-align-items: stretch;
-moz-align-items: stretch;
-ms-align-items: stretch;
-o-align-items: stretch;
align-items: stretch;
}
.bi-theme-dark {
background-color: #191b2b;
background-color: #191B2B;
color: #cccccc;
}
.bi-theme-dark .bi-input {

341
dist/demo.js vendored

@ -73,7 +73,7 @@ $(function () {
type: "bi.button",
text: "带图标的按钮",
// level: 'ignore',
iconClass: "close-font",
iconCls: "close-font",
height: 30
}
}, {
@ -133,7 +133,7 @@ $(function () {
text: "带图标的按钮",
block: true,
// level: 'ignore',
iconClass: "close-font",
iconCls: "close-font",
height: 30
}
}, {
@ -193,9 +193,31 @@ $(function () {
text: "带图标的按钮",
clear: true,
// level: 'ignore',
iconClass: "close-font",
iconCls: "close-font",
height: 30
}
}, {
el: {
type: "bi.multi_select_bar",
selected: true,
halfSelected: true
}
}, {
el: {
type: "bi.multi_select_bar",
selected: true,
halfSelected: false
}
}, {
el: {
type: "bi.multi_select_bar",
selected: false,
halfSelected: true
}
}, {
el: {
type: "bi.multi_select_bar"
}
}
];
BI.each(items, function (i, item) {
@ -704,6 +726,7 @@ BI.shortcut("demo.code_editor", Demo.CodeEditor);Demo.Editor = BI.inherit(BI.Wid
cls: "mvc-border",
watermark: "输入'a'会有错误信息且回车键不能退出编辑",
errorText: "字段不可重名",
value: "a",
validationChecker: function (v) {
if (v == "a") {
return false;
@ -842,6 +865,7 @@ Demo.SQLEditor = BI.inherit(BI.Widget, {
var self = this;
this.formula = BI.createWidget({
type : 'bi.sql_editor',
supportParam: true,
width : 300,
height : 200,
value : "select * from DEMO_CONTRACT where 合同类型 = ${长期协议} and 购买数量 = sum([1,2,3,4])"
@ -1773,21 +1797,20 @@ Demo.IconCombo = BI.inherit(BI.Widget, {
type: "bi.horizontal_auto",
items: [{
type: "bi.icon_combo",
trigger: "click-hover",
container: "body",
ref: function (_ref) {
self.refs = _ref;
},
iconClass: "search-font",
iconCls: "search-font",
items: [{
value: "第一项",
iconClass: "close-font"
iconCls: "close-font"
}, {
value: "第二项",
iconClass: "search-font"
iconCls: "search-font"
}, {
value: "第三项",
iconClass: "copy-font"
iconCls: "copy-font"
}]
}],
vgap: 20
@ -1809,18 +1832,19 @@ Demo.IconTextValueCombo = BI.inherit(BI.Widget, {
items: [{
type: "bi.icon_text_value_combo",
text: "默认值",
value: 1,
width: 300,
items: [{
text: "MVC-1",
iconClass: "close-font",
iconCls: "close-font",
value: 1
}, {
text: "MVC-2",
iconClass: "date-font",
iconCls: "date-font",
value: 2
}, {
text: "MVC-3",
iconClass: "search-close-h-font",
iconCls: "search-close-h-font",
value: 3
}]
}],
@ -1885,20 +1909,20 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, {
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.icon_text_value_combo",
text: "默认值",
type: "bi.text_value_combo",
value: "默认值",
width: 300,
items: [{
text: "MVC-1",
iconClass: "date-font",
iconCls: "date-font",
value: 1
}, {
text: "MVC-2",
iconClass: "search-font",
iconCls: "search-font",
value: 2
}, {
text: "MVC-3",
iconClass: "pull-right-font",
iconCls: "pull-right-font",
value: 3
}]
}],
@ -3711,53 +3735,97 @@ BI.shortcut("demo.level_tree", Demo.Func);Demo.Func = BI.inherit(BI.Widget, {
// value值一定要是字符串
var tree = BI.createWidget({
type: "bi.simple_tree",
items: []
});
tree.populate([{
id: 1,
text: "第一项",
value: "1"
}, {
id: 2,
text: "第二项",
value: "2"
}, {
id: 3,
text: "第三项",
value: "3",
open: true
}, {
id: 11,
pId: 1,
text: "子项1",
value: "11"
}, {
id: 12,
pId: 1,
text: "子项2",
value: "12"
}, {
id: 13,
pId: 1,
text: "子项3",
value: "13"
}, {
id: 31,
pId: 3,
text: "子项1",
value: "31"
}, {
id: 32,
pId: 3,
text: "子项2",
value: "32"
}, {
id: 33,
pId: 3,
text: "子项3",
value: "33"
}], "z");
items: [{
id: 1,
text: "第一项",
value: "1"
}, {
id: 2,
text: "第二项",
value: "2"
}, {
id: 3,
text: "第三项",
value: "3",
open: true
}, {
id: 11,
pId: 1,
text: "子项1",
value: "11"
}, {
id: 12,
pId: 1,
text: "子项2",
value: "12"
}, {
id: 13,
pId: 1,
text: "子项3",
value: "13"
}, {
id: 31,
pId: 3,
text: "子项1",
value: "31"
}, {
id: 32,
pId: 3,
text: "子项2",
value: "32"
}, {
id: 33,
pId: 3,
text: "子项3",
value: "33"
}],
value: ["31", "32", "33"]
});
// tree.populate([{
// id: 1,
// text: "第一项",
// value: "1"
// }, {
// id: 2,
// text: "第二项",
// value: "2"
// }, {
// id: 3,
// text: "第三项",
// value: "3",
// open: true
// }, {
// id: 11,
// pId: 1,
// text: "子项1",
// value: "11"
// }, {
// id: 12,
// pId: 1,
// text: "子项2",
// value: "12"
// }, {
// id: 13,
// pId: 1,
// text: "子项3",
// value: "13"
// }, {
// id: 31,
// pId: 3,
// text: "子项1",
// value: "31"
// }, {
// id: 32,
// pId: 3,
// text: "子项2",
// value: "32"
// }, {
// id: 33,
// pId: 3,
// text: "子项3",
// value: "33"
// }], "z");
BI.createWidget({
type: "bi.vtape",
element: this,
@ -7457,69 +7525,68 @@ Demo.FlowLayout = BI.inherit(BI.Widget, {
type: "bi.label",
height: 30,
text: "Left-1",
cls: "layout-bg1",
hgap: 20
cls: "layout-bg1"
}, {
type: "bi.label",
height: 30,
text: "Left-2",
cls: "layout-bg2",
hgap: 20
cls: "layout-bg2"
}, {
type: "bi.label",
height: 30,
text: "Left-3",
cls: "layout-bg3",
hgap: 20
cls: "layout-bg3"
}, {
type: "bi.label",
height: 30,
text: "Left-4",
cls: "layout-bg4",
hgap: 20
cls: "layout-bg4"
}, {
type: "bi.label",
height: 30,
text: "Left-5",
cls: "layout-bg5",
hgap: 20
cls: "layout-bg5"
}],
hgap: 20,
vgap: 20
hgap: 20
}, {
type: "bi.right",
hgap: 20,
items: [{
type: "bi.label",
height: 30,
text: "Right-1",
cls: "layout-bg1",
hgap: 20
cls: "layout-bg1"
}, {
type: "bi.label",
height: 30,
text: "Right-2",
cls: "layout-bg2",
hgap: 20
cls: "layout-bg2"
}, {
type: "bi.label",
height: 30,
text: "Right-3",
cls: "layout-bg3",
hgap: 20
cls: "layout-bg3"
}, {
type: "bi.label",
height: 30,
text: "Right-4",
cls: "layout-bg4",
hgap: 20
cls: "layout-bg4"
}, {
type: "bi.label",
height: 30,
text: "Right-5",
cls: "layout-bg5",
hgap: 20
cls: "layout-bg5"
}],
hgap: 20,
vgap: 20
}]
};
@ -7787,6 +7854,7 @@ Demo.Horizontal = BI.inherit(BI.Widget, {
render: function () {
return {
type: "bi.horizontal",
hgap: 10,
items: [{
type: "bi.label",
whiteSpace: "normal",
@ -8166,6 +8234,7 @@ Demo.VerticalLayout = BI.inherit(BI.Widget, {
render: function () {
return {
type: "bi.vertical",
vgap: 10,
items: [{
type: "bi.label",
cls: "layout-bg3",
@ -8190,6 +8259,7 @@ Demo.VtapeLayout = BI.inherit(BI.Widget, {
render: function () {
return {
type: "bi.vtape",
vgap: 10,
items: [
{
height: 100,
@ -8197,7 +8267,9 @@ Demo.VtapeLayout = BI.inherit(BI.Widget, {
type: "bi.label",
text: "1",
cls: "layout-bg1"
}
},
tgap: 10,
vgap: 10
}, {
height: 200,
el: {
@ -11699,7 +11771,7 @@ Demo.Buttons = BI.inherit(BI.Widget, {
type: "bi.button",
text: "带图标的按钮",
// level: 'ignore',
iconClass: "close-font",
iconCls: "close-font",
height: 30
}
}, {
@ -11759,7 +11831,7 @@ Demo.Buttons = BI.inherit(BI.Widget, {
text: "带图标的按钮",
block: true,
// level: 'ignore',
iconClass: "close-font",
iconCls: "close-font",
height: 30
}
}, {
@ -11819,7 +11891,7 @@ Demo.Buttons = BI.inherit(BI.Widget, {
text: "带图标的按钮",
clear: true,
// level: 'ignore',
iconClass: "close-font",
iconCls: "close-font",
height: 30
}
}, {
@ -11854,8 +11926,10 @@ Demo.Items = BI.inherit(BI.Widget, {
return {
type: "bi.vertical",
items: [{
type: "bi.label",
type: "bi.text_button",
cls: "bi-list-item-select bi-high-light-border bi-border",
height: 30,
level: "warning",
text: "单选item"
}, {
type: "bi.single_select_item",
@ -11881,61 +11955,6 @@ BI.shortcut("demo.items", Demo.Items);/**
* Created by Dailer on 2017/7/25.
*/
Demo.LoadingMask = BI.inherit(BI.Widget, {
render: function () {
var vessel = this;
var self = this;
var left = BI.createWidget({
type: "bi.center_adapt",
items: [{
type: "bi.button",
text: "LoadingMask",
height: 30,
handler: function () {
var mask = BI.createWidget({
type: "bi.loading_mask",
masker: vessel,
text: "加载中...3s后结束"
});
setTimeout(function () {
mask.destroy();
}, 3000);
}
}]
});
var right = BI.createWidget({
type: "bi.center_adapt",
items: [{
type: "bi.button",
text: "CancelLoadingMask",
height: 30,
handler: function () {
var mask = BI.createWidget({
type: "bi.loading_cancel_mask",
masker: vessel,
text: "正在加载数据"
});
mask.on(BI.LoadingCancelMask.EVENT_VALUE_CANCEL, function () {
mask.destroy();
BI.Msg.toast("取消加载了...");
});
}
}]
});
BI.createWidget({
type: "bi.center_adapt",
element: vessel,
items: [left, right],
hgap: 20
});
}
});
BI.shortcut("demo.loading_mask", Demo.LoadingMask);/**
* Created by Dailer on 2017/7/25.
*/
Demo.Nodes = BI.inherit(BI.Widget, {
render: function (vessel) {
@ -13147,7 +13166,8 @@ Demo.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
},
text: "默认值",
items: items,
width: 300
width: 300,
value: ["第五级文件1"]
}, {
type: "bi.button",
text: "getVlaue",
@ -13186,6 +13206,7 @@ Demo.SelectTreeCombo = BI.inherit(BI.Widget, {
ref: function (_ref) {
self.tree = _ref;
},
value: "11",
text: "默认值",
items: items,
width: 300
@ -13200,7 +13221,7 @@ Demo.SelectTreeCombo = BI.inherit(BI.Widget, {
type: "bi.button",
text: "setVlaue (第二级文件1)",
handler: function () {
self.tree.setValue(["第二级文件1"]);
self.tree.setValue(["2"]);
},
width: 300
}],
@ -13365,7 +13386,8 @@ Demo.SingleTreeCombo = BI.inherit(BI.Widget, {
},
text: "默认值",
items: items,
width: 300
width: 300,
value: "11"
}, {
type: "bi.button",
text: "getVlaue",
@ -13377,7 +13399,7 @@ Demo.SingleTreeCombo = BI.inherit(BI.Widget, {
type: "bi.button",
text: "setVlaue (第二级文件1)",
handler: function () {
self.tree.setValue(["第二级文件1"]);
self.tree.setValue(["2"]);
},
width: 300
}],
@ -14318,7 +14340,8 @@ Demo.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
var self = this;
var tree = BI.createWidget({
type: "bi.multilayer_select_level_tree",
items: BI.deepClone(Demo.CONSTANTS.TREE)
items: BI.deepClone(Demo.CONSTANTS.TREE),
value: "第五级文件1"
});
return {
@ -14363,7 +14386,8 @@ Demo.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
var self = this;
var tree = BI.createWidget({
type: "bi.multilayer_single_level_tree",
items: BI.deepClone(Demo.CONSTANTS.TREE)
items: BI.deepClone(Demo.CONSTANTS.TREE),
value: "第五级文件1"
});
return {
@ -14408,7 +14432,8 @@ Demo.SelectLevelTree = BI.inherit(BI.Widget, {
var self = this;
var tree = BI.createWidget({
type: "bi.select_level_tree",
items: BI.deepClone(Demo.CONSTANTS.LEVELTREE)
items: BI.deepClone(Demo.CONSTANTS.LEVELTREE),
value: "11"
});
return {
@ -14431,7 +14456,7 @@ Demo.SelectLevelTree = BI.inherit(BI.Widget, {
height: 25,
text: "setValue (第二级文件1)",
handler: function () {
tree.setValue(["第二级文件1"]);
tree.setValue(["2"]);
}
},
height: 25
@ -14453,7 +14478,8 @@ Demo.SingleLevelTree = BI.inherit(BI.Widget, {
var self = this;
var tree = BI.createWidget({
type: "bi.single_level_tree",
items: BI.deepClone(Demo.CONSTANTS.LEVELTREE)
items: BI.deepClone(Demo.CONSTANTS.LEVELTREE),
value: "11"
});
return {
@ -14476,7 +14502,7 @@ Demo.SingleLevelTree = BI.inherit(BI.Widget, {
height: 25,
text: "setValue (第二级文件1)",
handler: function () {
tree.setValue(["第二级文件1"]);
tree.setValue(["2"]);
}
},
height: 25
@ -14498,7 +14524,8 @@ Demo.SwitchTree = BI.inherit(BI.Widget, {
var self = this;
var tree = BI.createWidget({
type: "bi.switch_tree",
items: BI.deepClone(Demo.CONSTANTS.TREE)
items: BI.deepClone(Demo.CONSTANTS.TREE),
value: "第五级文件1"
});
return {

4746
dist/fineui.css vendored

File diff suppressed because it is too large Load Diff

100368
dist/fineui.js vendored

File diff suppressed because one or more lines are too long

1
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

50
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

7
dist/fix/fix.js vendored

@ -1303,6 +1303,13 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
return Model;
}();
Model.prototype.state = {};
Model.prototype.computed = {};
Model.prototype.context = [];
Model.prototype.childContext = [];
Model.prototype.watch = {};
Model.prototype.actions = {};
function toJSON(model) {
var result = void 0;
if (_.isArray(model)) {

1
dist/resource.css vendored

@ -330,7 +330,6 @@ textarea::-webkit-scrollbar-thumb:hover {
@font-face {
font-family: 'bi';
src: url('font/iconfont.eot'), /* IE6-IE8 */ url('font/iconfont.woff') format('woff'), /* chrome、firefox */ url('font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('font/iconfont.svg#svgFontName') format('svg');
/* iOS 4.1- */
}
.b-font {

274
dist/widget.css vendored

@ -1,3 +1,8 @@
.bi-arrangement-droppable {
z-index: 100000;
}
.bi-arrangement .arrangement-helper {
background: #3f8ce8;
z-index: 1000000000;
@ -42,12 +47,28 @@
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-date-trigger {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-down-list-popup .list-group-item-text {
max-width: 203px;
}
.bi-down-list-popup .bi-down-list-item .list-item-text {
max-width: 203px;
}
.bi-down-list-popup .list-group-item-text {
max-width: 203px;
}
.bi-down-list-popup .bi-down-list-item .list-item-text {
max-width: 203px;
}
.bi-excel-table-header-cell {
font-weight: bold;
}
.bi-excel-table > div.bottom-right > div > div > table {
border-right: 1px solid #d4dadd;
}
@ -57,6 +78,21 @@
.bi-excel-table-header-cell {
font-weight: bold;
}
.bi-file-manager-nav-button .file-manager-nav-button-text {
max-width: 200px;
}
.bi-file-manager-nav-button .file-manager-nav-button-text.active {
background-color: #fafbfc;
color: #999999;
}
.bi-file-manager-nav-button .file-manager-nav-button-triangle {
z-index: 1;
}
.bi-theme-dark .bi-file-manager-nav-button .file-manager-nav-button-text.active {
background-color: #191B2B;
color: #999999;
}
.bi-file-manager-nav-button .file-manager-nav-button-text {
max-width: 200px;
}
@ -78,6 +114,10 @@
.bi-interactive-arrangement .interactive-arrangement-dragtag-icon {
z-index: 1000000000;
}
.bi-interval-slider-label {
min-height: 50px;
}
.bi-interval-slider {
min-height: 70px;
}
@ -89,11 +129,47 @@
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-month-trigger {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-multidate-combo {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-multidate-combo {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-multidate-popup .multidate-popup-label {
color: #3685f2;
font-size: 14px;
}
.bi-multidate-popup .multidate-popup-item:active,
.bi-multidate-popup .multidate-popup-item.active {
background-color: #3685f2;
color: #ffffff;
-webkit-border-radius: 2px 2px 0 0;
-moz-border-radius: 2px 2px 0 0;
border-radius: 2px 2px 0 0;
}
.bi-multidate-popup .multidate-popup-button {
color: #3685f2;
font-size: 14px;
}
.bi-multidate-segment .bi-multidate-editor {
font-size: 14px;
}
.bi-multidate-popup .multidate-popup-label {
color: #3685f2;
font-size: 14px;
@ -116,9 +192,27 @@
.bi-multi-select-check-pane .multi-select-check-selected {
text-decoration: underline;
}
.bi-multi-select-check-pane .multi-select-check-selected {
text-decoration: underline;
}
.bi-multi-select-combo .multi-select-trigger-icon-button {
font-size: 16px;
}
.bi-multi-select-combo .multi-select-trigger-icon-button {
font-size: 16px;
}
.bi-multi-select-insert-combo .multi-select-trigger-icon-button {
font-size: 16px;
}
.bi-multi-select-trigger {
-webkit-border-radius: 2px 2px 2px 2px;
-moz-border-radius: 2px 2px 2px 2px;
border-radius: 2px 2px 2px 2px;
}
.bi-multi-select-insert-combo .multi-select-trigger-icon-button {
font-size: 16px;
}
@ -130,15 +224,30 @@
.bi-multi-select-search-pane .multi-select-toolbar {
color: #ff4949;
}
.bi-multi-select-search-pane .multi-select-toolbar {
color: #ff4949;
}
.bi-multi-select-check-selected-button {
z-index: 1;
}
.bi-multi-select-check-selected-button {
z-index: 1;
}
.bi-multi-tree-check-pane .multi-tree-check-selected {
color: #3685f2;
}
.bi-multi-tree-check-pane .multi-tree-check-selected {
color: #3685f2;
}
.bi-multi-tree-combo .multi-select-trigger-icon-button {
font-size: 16px;
}
.bi-multi-tree-combo .multi-select-trigger-icon-button {
font-size: 16px;
}
.bi-multi-tree-popup .popup-view-tree {
min-height: 170px;
}
.bi-multi-tree-popup .popup-view-tree {
min-height: 170px;
}
@ -146,6 +255,15 @@
color: #3685f2;
z-index: 1;
}
.bi-multi-tree-check-selected-button .trigger-check-selected {
color: #3685f2;
z-index: 1;
}
.bi-number-editor {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-number-editor {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
@ -200,6 +318,15 @@
-o-user-select: text;
user-select: text;
}
.bi-page-table-cell {
-webkit-user-select: text;
-khtml-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
-o-user-select: text;
user-select: text;
}
.bi-path-chooser .path-chooser-radio {
z-index: 1;
}
@ -211,6 +338,19 @@
min-width: 80px;
max-width: 220px;
}
.bi-preview-table-cell {
min-height: 25px;
min-width: 80px;
max-width: 220px;
}
.bi-preview-table-header-cell {
font-weight: bold;
min-height: 25px;
min-width: 80px;
max-width: 220px;
}
.bi-preview-table {
-webkit-user-select: text;
-khtml-user-select: text;
@ -225,7 +365,7 @@
}
.bi-theme-dark .bi-preview-table > div > table > thead > tr.odd,
.bi-theme-dark .bi-preview-table > div > div > div > table > thead > tr.odd {
background-color: #191b2b;
background-color: #191B2B;
}
.bi-preview-table-header-cell {
font-weight: bold;
@ -238,6 +378,12 @@
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-quarter-trigger {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-relation-view-region .relation-view-region-container {
z-index: 1;
-webkit-border-radius: 2px;
@ -247,6 +393,38 @@
.bi-relation-view-region .relation-view-region-container.other-package {
border-style: dashed;
}
.bi-relation-view-region .relation-view-region-container {
z-index: 1;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-relation-view-region .relation-view-region-container.other-package {
border-style: dashed;
}
.bi-sequence-table-dynamic-number .sequence-table-title-cell {
overflow: hidden;
overflow-x: hidden;
overflow-y: hidden;
-webkit-box-sizing: border-box;
/*Safari3.2+*/
-moz-box-sizing: border-box;
/*Firefox3.5+*/
-ms-box-sizing: border-box;
/*IE8*/
box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
}
.bi-sequence-table-dynamic-number .sequence-table-number-cell {
-webkit-box-sizing: border-box;
/*Safari3.2+*/
-moz-box-sizing: border-box;
/*Firefox3.5+*/
-ms-box-sizing: border-box;
/*IE8*/
box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
}
.bi-sequence-table-dynamic-number .sequence-table-title-cell {
overflow: hidden;
overflow-x: hidden;
@ -293,6 +471,52 @@
box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
}
.bi-sequence-table-list-number .sequence-table-title-cell {
overflow: hidden;
overflow-x: hidden;
overflow-y: hidden;
-webkit-box-sizing: border-box;
/*Safari3.2+*/
-moz-box-sizing: border-box;
/*Firefox3.5+*/
-ms-box-sizing: border-box;
/*IE8*/
box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
}
.bi-sequence-table-list-number .sequence-table-number-cell {
-webkit-box-sizing: border-box;
/*Safari3.2+*/
-moz-box-sizing: border-box;
/*Firefox3.5+*/
-ms-box-sizing: border-box;
/*IE8*/
box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
}
.bi-sequence-table-tree-number .sequence-table-title-cell {
overflow: hidden;
overflow-x: hidden;
overflow-y: hidden;
-webkit-box-sizing: border-box;
/*Safari3.2+*/
-moz-box-sizing: border-box;
/*Firefox3.5+*/
-ms-box-sizing: border-box;
/*IE8*/
box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
}
.bi-sequence-table-tree-number .sequence-table-number-cell {
-webkit-box-sizing: border-box;
/*Safari3.2+*/
-moz-box-sizing: border-box;
/*Firefox3.5+*/
-ms-box-sizing: border-box;
/*IE8*/
box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
}
.bi-sequence-table-tree-number .sequence-table-title-cell {
overflow: hidden;
overflow-x: hidden;
@ -319,6 +543,13 @@
.bi-single-slider-label {
min-height: 50px;
}
.bi-single-slider-normal {
min-height: 30px;
}
.bi-single-slider-label {
min-height: 50px;
}
.bi-single-slider-normal {
min-height: 30px;
}
@ -334,6 +565,27 @@
-moz-border-radius: 7px;
border-radius: 7px;
}
.bi-single-slider-button .slider-button {
cursor: ew-resize;
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
-webkit-border-radius: 7px;
-moz-border-radius: 7px;
border-radius: 7px;
}
.bi-slider-track .gray-track {
background-color: rgba(153, 153, 153, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d999999,endColorstr=#4d999999);
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.bi-slider-track .blue-track {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.bi-slider-track .gray-track {
background-color: rgba(153, 153, 153, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d999999,endColorstr=#4d999999);
@ -367,6 +619,26 @@
.bi-theme-dark .bi-year-popup .year-popup-navigation > .first-element {
border-left: none;
}
.bi-year-popup .year-popup-navigation {
line-height: 30px;
}
.bi-year-popup .year-popup-navigation > .center-element {
border-left: 1px solid #d4dadd;
}
.bi-year-popup .year-popup-navigation > .first-element {
border-left: none;
}
.bi-theme-dark .bi-year-popup .year-popup-navigation > .center-element {
border-left: 1px solid #525466;
}
.bi-theme-dark .bi-year-popup .year-popup-navigation > .first-element {
border-left: none;
}
.bi-year-trigger {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-year-trigger {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;

93
dist/widget.js vendored

@ -3457,8 +3457,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-down-list-combo",
invalid: false,
height: 25,
height: 24,
items: [],
adjustLength: 0,
direction: "bottom",
@ -7742,7 +7741,8 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
isDefaultInit: false,
height: 30,
text: "",
items: []
items: [],
value: ""
});
},
@ -7754,13 +7754,15 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
type: "bi.single_tree_trigger",
text: o.text,
height: o.height,
items: o.items
items: o.items,
value: o.value
});
this.popup = BI.createWidget({
type: "bi.multilayer_select_tree_popup",
isDefaultInit: o.isDefaultInit,
items: o.items
items: o.items,
value: o.value
});
this.combo = BI.createWidget({
@ -7811,7 +7813,8 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
baseCls: "bi-multilayer-select-level-tree",
isDefaultInit: false,
items: [],
itemsCreator: BI.emptyFn
itemsCreator: BI.emptyFn,
value: ""
});
},
@ -7883,6 +7886,7 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),
itemsCreator: o.itemsCreator,
value: o.value,
el: {
type: "bi.button_tree",
@ -7941,7 +7945,8 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
tipText: BI.i18nText("BI-No_Selected_Item"),
isDefaultInit: false,
itemsCreator: BI.emptyFn,
items: []
items: [],
value: ""
});
},
@ -7954,6 +7959,7 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
type: "bi.multilayer_select_level_tree",
isDefaultInit: o.isDefaultInit,
items: o.items,
value: o.value,
itemsCreator: o.itemsCreator
});
@ -8282,7 +8288,8 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
height: 30,
text: "",
itemsCreator: BI.emptyFn,
items: []
items: [],
value: ""
});
},
@ -8294,13 +8301,15 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
type: "bi.single_tree_trigger",
text: o.text,
height: o.height,
items: o.items
items: o.items,
value: o.value
});
this.popup = BI.createWidget({
type: "bi.multilayer_single_tree_popup",
isDefaultInit: o.isDefaultInit,
items: o.items
items: o.items,
value: o.value
});
this.combo = BI.createWidget({
@ -8422,6 +8431,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
},
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),
value: o.value,
itemsCreator: function (op, callback) {
o.itemsCreator(op, function (items) {
callback(BI.Tree.transformToTreeFormat(items), 0);
@ -8499,7 +8509,8 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
type: "bi.multilayer_single_level_tree",
isDefaultInit: o.isDefaultInit,
items: o.items,
itemsCreator: o.itemsCreator
itemsCreator: o.itemsCreator,
value: o.value
});
BI.createWidget({
@ -12971,12 +12982,12 @@ BI.NumberInterval = BI.inherit(BI.Single, {
height: o.height - 2,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
iconClass: "less-font",
iconCls: "less-font",
value: 0
}, {
text: "(" + BI.i18nText("BI-Less_And_Equal") + ")",
value: 1,
iconClass: "less-equal-font"
iconCls: "less-equal-font"
}]
});
if (o.closemin === true) {
@ -12990,12 +13001,12 @@ BI.NumberInterval = BI.inherit(BI.Single, {
height: o.height - 2,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
iconClass: "less-font",
iconCls: "less-font",
value: 0
}, {
text: "(" + BI.i18nText("BI-Less_And_Equal") + ")",
value: 1,
iconClass: "less-equal-font"
iconCls: "less-equal-font"
}]
});
if (o.closemax === true) {
@ -13111,7 +13122,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
self.element.removeClass("number-error");
o.validation = "valid";
return "";
}
if (smallValue > bigValue) {
self.element.addClass("number-error");
@ -13125,11 +13136,11 @@ BI.NumberInterval = BI.inherit(BI.Single, {
self.element.removeClass("number-error");
o.validation = "valid";
return "";
},
_setTitle: function (v) {
@ -14846,7 +14857,7 @@ BI.RelationViewItem = BI.inherit(BI.BasicButton, {
if (o.isPrimary) {
header.items.push({
type: "bi.icon",
width: 16,
width: 12,
height: 16,
title: BI.i18nText("BI-Primary_Key")
});
@ -16096,7 +16107,8 @@ BI.SelectTreeCombo = BI.inherit(BI.Widget, {
baseCls: "bi-select-tree-combo",
height: 30,
text: "",
items: []
items: [],
value: ""
});
},
@ -16108,12 +16120,14 @@ BI.SelectTreeCombo = BI.inherit(BI.Widget, {
type: "bi.single_tree_trigger",
text: o.text,
height: o.height,
items: o.items
items: o.items,
value: o.value
});
this.popup = BI.createWidget({
type: "bi.select_level_tree",
items: o.items
items: o.items,
value: o.value
});
this.combo = BI.createWidget({
@ -16235,7 +16249,8 @@ BI.SelectTreePopup = BI.inherit(BI.Pane, {
return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-level-tree",
tipText: BI.i18nText("BI-No_Selected_Item"),
items: []
items: [],
value: ""
});
},
@ -16284,6 +16299,7 @@ BI.SelectTreePopup = BI.inherit(BI.Pane, {
isDefaultInit: true
},
items: this._formatItems(BI.Tree.transformToTreeFormat(o.items)),
value: o.value,
chooseType: BI.Selection.Single
});
@ -20202,7 +20218,8 @@ BI.SingleTreeCombo = BI.inherit(BI.Widget, {
trigger: {},
height: 24,
text: "",
items: []
items: [],
value: ""
});
},
@ -20214,12 +20231,14 @@ BI.SingleTreeCombo = BI.inherit(BI.Widget, {
type: "bi.single_tree_trigger",
text: o.text,
height: o.height,
items: o.items
items: o.items,
value: o.value
}, o.trigger));
this.popup = BI.createWidget({
type: "bi.single_level_tree",
items: o.items
items: o.items,
value: o.value
});
this.combo = BI.createWidget({
@ -20274,7 +20293,8 @@ BI.SingleTreePopup = BI.inherit(BI.Pane, {
return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-level-tree",
tipText: BI.i18nText("BI-No_Selected_Item"),
items: []
items: [],
value: ""
});
},
@ -20282,13 +20302,14 @@ BI.SingleTreePopup = BI.inherit(BI.Pane, {
BI.SingleTreePopup.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.tree = BI.createWidget({
type: "bi.level_tree",
expander: {
isDefaultInit: true
},
items: o.items,
value: o.value,
chooseType: BI.Selection.Single
});
@ -20337,7 +20358,8 @@ BI.SingleTreeTrigger = BI.inherit(BI.Trigger, {
baseCls: "bi-single-tree-trigger",
height: 24,
text: "",
items: []
items: [],
value: ""
});
},
@ -20351,7 +20373,8 @@ BI.SingleTreeTrigger = BI.inherit(BI.Trigger, {
element: this,
text: o.text,
items: o.items,
height: o.height
height: o.height,
value: o.value
});
},
@ -20418,7 +20441,8 @@ BI.SwitchTree = BI.inherit(BI.Widget, {
this.levelTree = BI.createWidget({
type: "bi.multilayer_single_level_tree",
isDefaultInit: true,
items: BI.deepClone(o.items)
items: BI.deepClone(o.items),
value: o.value
});
this.levelTree.on(BI.LevelTree.EVENT_CHANGE, function () {
self.fireEvent(BI.SwitchTree.EVENT_CHANGE, arguments);
@ -20427,7 +20451,8 @@ BI.SwitchTree = BI.inherit(BI.Widget, {
case BI.SwitchTree.SelectType.MultiSelect:
this.tree = BI.createWidget({
type: "bi.simple_tree",
items: this._removeIsParent(BI.deepClone(o.items))
items: this._removeIsParent(BI.deepClone(o.items)),
value: o.value
});
this.tree.on(BI.SimpleTreeView.EVENT_CHANGE, function () {
self.fireEvent(BI.SwitchTree.EVENT_CHANGE, arguments);

834
package-lock.json generated

File diff suppressed because it is too large Load Diff

2
package.json

@ -1,6 +1,6 @@
{
"name": "fineui",
"version": "1.1.1",
"version": "1.1.2",
"description": "fineui",
"main": "index.js",
"dependencies": {},

23
src/base/combination/combo.js

@ -209,14 +209,17 @@ BI.Combo = BI.inherit(BI.Widget, {
},
_initCombo: function () {
this.combo = BI.createWidget(this.options.el);
this.combo = BI.createWidget(this.options.el, {
value: this.options.value
});
},
_assertPopupView: function () {
var self = this;
var self = this, o = this.options;
if (this.popupView == null) {
this.popupView = BI.createWidget(this.options.popup, {
type: "bi.popup_view"
type: "bi.popup_view",
value: o.value
});
this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
if (type === BI.Events.CLICK) {
@ -407,14 +410,20 @@ BI.Combo = BI.inherit(BI.Widget, {
},
setValue: function (v) {
this._assertPopupView();
this.combo.setValue(v);
this.popupView && this.popupView.setValue(v);
if (BI.isNull(this.popupView)) {
this.options.popup.value = v;
} else {
this.popupView.setValue(v);
}
},
getValue: function () {
this._assertPopupView();
return this.popupView && this.popupView.getValue();
if (BI.isNull(this.popupView)) {
return this.options.popup.value;
} else {
return this.popupView.getValue();
}
},
isViewVisible: function () {

23
src/base/combination/expander.js

@ -126,11 +126,13 @@ BI.Expander = BI.inherit(BI.Widget, {
},
_initExpander: function () {
this.expander = BI.createWidget(this.options.el);
this.expander = BI.createWidget(this.options.el, {
value: this.options.value
});
},
_assertPopupView: function () {
var self = this;
var self = this, o = this.options;
if (this.popupView == null) {
this.popupView = BI.createWidget(this.options.popup, {
type: "bi.button_group",
@ -139,7 +141,8 @@ BI.Expander = BI.inherit(BI.Widget, {
type: "bi.vertical",
hgap: 0,
vgap: 0
}]
}],
value: o.value
});
this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
@ -203,14 +206,20 @@ BI.Expander = BI.inherit(BI.Widget, {
},
setValue: function (v) {
// this._assertPopupView();
this.expander.setValue(v);
this.popupView && this.popupView.setValue(v);
if (BI.isNull(this.popupView)) {
this.options.popup.value = v;
} else {
this.popupView.setValue(v);
}
},
getValue: function () {
// this._assertPopupView();
return this.popupView ? this.popupView.getValue() : [];
if (BI.isNull(this.popupView)) {
return this.options.popup.value;
} else {
return this.popupView.getValue();
}
},
isViewVisible: function () {

9
src/base/combination/group.button.js

@ -10,6 +10,7 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
baseCls: "bi-button-group",
behaviors: {},
items: [],
value: "",
chooseType: BI.Selection.Single,
layouts: [{
type: "bi.center",
@ -21,14 +22,18 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
_init: function () {
BI.ButtonGroup.superclass._init.apply(this, arguments);
var o = this.options;
var behaviors = {};
BI.each(this.options.behaviors, function (key, rule) {
BI.each(o.behaviors, function (key, rule) {
behaviors[key] = BI.BehaviorFactory.createBehavior(key, {
rule: rule
});
});
this.behaviors = behaviors;
this.populate(this.options.items);
this.populate(o.items);
if(BI.isKey(o.value) || BI.isNotEmptyArray(o.value)){
this.setValue(o.value);
}
},
_createBtns: function (items) {

10
src/base/combination/searcher.js

@ -247,8 +247,11 @@ BI.Searcher = BI.inherit(BI.Widget, {
},
setValue: function (v) {
this._assertPopupView();
this.popupView && this.popupView.setValue(v);
if (BI.isNull(this.popupView)) {
this.options.popup.value = v;
} else {
this.popupView.setValue(v);
}
},
getKeyword: function () {
@ -269,6 +272,9 @@ BI.Searcher = BI.inherit(BI.Widget, {
} else if (o.adapter && o.adapter.getValue) {
return o.adapter.getValue();
}
if (BI.isNull(this.popupView)) {
return o.popup.value;
}
return this.popupView.getValue();
},

21
src/base/combination/switcher.js

@ -123,7 +123,9 @@ BI.Switcher = BI.inherit(BI.Widget, {
},
_initSwitcher: function () {
this.switcher = BI.createWidget(this.options.el);
this.switcher = BI.createWidget(this.options.el, {
value: o.value
});
},
_assertPopupView: function () {
@ -137,7 +139,8 @@ BI.Switcher = BI.inherit(BI.Widget, {
type: "bi.vertical",
hgap: 0,
vgap: 0
}]
}],
value: o.value
});
this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
@ -197,14 +200,20 @@ BI.Switcher = BI.inherit(BI.Widget, {
},
setValue: function (v) {
this._assertPopupView();
this.switcher.setValue(v);
this.popupView && this.popupView.setValue(v);
if (BI.isNull(this.popupView)) {
this.options.popup.value = v;
} else {
this.popupView.setValue(v);
}
},
getValue: function () {
this._assertPopupView();
return this.popupView ? this.popupView.getValue() : [];
if (BI.isNull(this.popupView)) {
return this.options.popup.value;
} else {
return this.popupView.getValue();
}
},
setAdapter: function (adapter) {

2
src/base/layer/layer.popup.js

@ -93,7 +93,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
_createView: function () {
var o = this.options;
this.button_group = BI.createWidget(o.el, {type: "bi.button_group"});
this.button_group = BI.createWidget(o.el, {type: "bi.button_group", value: o.value});
this.button_group.element.css({"min-height": o.minHeight + "px"});
return this.button_group;
},

6
src/base/layer/layer.searcher.js

@ -55,7 +55,8 @@ BI.SearcherView = BI.inherit(BI.Pane, {
},
layouts: [{
type: "bi.vertical"
}]
}],
value: o.value
});
this.matcher.on(BI.Controller.EVENT_CHANGE, function (type, val, ob) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
@ -83,7 +84,8 @@ BI.SearcherView = BI.inherit(BI.Pane, {
},
layouts: [{
type: "bi.vertical"
}]
}],
value: o.value
});
this.searcher.on(BI.Controller.EVENT_CHANGE, function (type, val, ob) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);

3
src/base/single/button/button.basic.js

@ -39,6 +39,9 @@ BI.BasicButton = BI.inherit(BI.Single, {
if (opts.shadow) {
this._createShadow();
}
if (opts.level) {
this.element.addClass("button-" + opts.level);
}
},
_createShadow: function () {

7
src/base/single/button/buttons/button.js

@ -18,7 +18,7 @@
shadow: props.clear !== true,
isShadowShowingOnSelected: true,
readonly: true,
iconClass: "",
iconCls: "",
level: "common",
block: false, // 是否块状显示,即不显示边框,没有最小宽度的限制
clear: false, // 是否去掉边框和背景
@ -44,7 +44,7 @@
} else {
this.element.css({lineHeight: o.height + "px"});
}
if (BI.isKey(o.iconClass)) {
if (BI.isKey(o.iconCls)) {
this.icon = BI.createWidget({
type: "bi.icon",
width: 18
@ -56,7 +56,7 @@
});
BI.createWidget({
type: "bi.horizontal_auto",
cls: "button-" + o.level + " " + o.iconClass,
cls: o.iconCls,
element: this,
hgap: o.hgap,
vgap: o.vgap,
@ -72,7 +72,6 @@
} else {
this.text = BI.createWidget({
type: "bi.label",
cls: "button-" + o.level,
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
forceCenter: o.forceCenter,

4
src/base/single/editor/editor.js

@ -32,6 +32,7 @@ BI.Editor = BI.inherit(BI.Single, {
type: "bi.input",
element: "<input type='" + o.inputType + "'/>",
root: true,
value: o.value,
watermark: o.watermark,
validationChecker: o.validationChecker,
quitChecker: o.quitChecker,
@ -174,7 +175,8 @@ BI.Editor = BI.inherit(BI.Single, {
return false;
});
if (BI.isKey(this.options.value) || BI.isEmptyString(this.options.value)) {
this.setValue(this.options.value);
this._checkError();
this._checkWaterMark();
} else {
this._checkWaterMark();
}

3
src/base/single/input/input.js

@ -57,6 +57,9 @@ BI.Input = BI.inherit(BI.Single, {
.focusout(function (e) {
self._blurDebounce();
});
if (BI.isKey(this.options.value) || BI.isEmptyString(this.options.value)) {
this.setValue(this.options.value);
}
},
_focus: function () {

7
src/base/sql/editor.sql.js

@ -8,7 +8,8 @@ BI.SQLEditor = BI.inherit(BI.Widget, {
value: "",
lineHeight: 2,
showHint: true,
supportFunction: false
supportFunction: false,
supportParam: false
});
},
_init: function () {
@ -132,14 +133,14 @@ BI.SQLEditor = BI.inherit(BI.Widget, {
},
setValue: function (v) {
var self = this, result;
var self = this, result, o = this.options;
this.refresh();
self.editor.setValue("");
result = this._analyzeContent(v || "");
BI.each(result, function (i, item) {
var fieldRegx = /\$[\{][^\}]*[\}]/;
var str = item.match(fieldRegx);
if (BI.isNotEmptyArray(str)) {
if (BI.isNotEmptyArray(str) && o.supportParam) {
self.insertParam(str[0].substring(2, item.length - 1));
} else {
self.insertString(item);

3
src/base/tree/customtree.js

@ -90,7 +90,8 @@ BI.CustomTree = BI.inherit(BI.Widget, {
args[0] = self._formatItems(items);
callback.apply(null, args);
}]);
}
},
value: o.value
});
this.tree.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);

6
src/base/tree/treeview.js

@ -442,11 +442,15 @@ BI.TreeView = BI.inherit(BI.Pane, {
});
}
if (!this.nodes) {
return;
}
BI.each(this.nodes.getNodes(), function (i, node) {
node.halfCheck = false;
setNode(node.children);
});
this.nodes && this.nodes.checkAllNodes(checked);
this.nodes.checkAllNodes(checked);
},
expandAll: function (flag) {

10
src/case/button/icon/icon.change.js

@ -11,7 +11,7 @@ BI.IconChangeButton = BI.inherit(BI.Single, {
var conf = BI.IconChangeButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: "bi-icon-change-button",
iconClass: "",
iconCls: "",
iconWidth: null,
iconHeight: null,
@ -36,7 +36,7 @@ BI.IconChangeButton = BI.inherit(BI.Single, {
this.button = BI.createWidget({
type: "bi.icon_button",
element: this,
cls: o.iconClass,
cls: o.iconCls,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight,
@ -73,9 +73,9 @@ BI.IconChangeButton = BI.inherit(BI.Single, {
setIcon: function (cls) {
var o = this.options;
if (o.iconClass !== cls) {
this.element.removeClass(o.iconClass).addClass(cls);
o.iconClass = cls;
if (o.iconCls !== cls) {
this.element.removeClass(o.iconCls).addClass(cls);
o.iconCls = cls;
}
}
});

5
src/case/button/item.singleselect.icontext.js

@ -8,8 +8,7 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectIconTextItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-icon-text-item bi-list-item-active",
iconClass: "",
hgap: 10,
iconCls: "",
height: 25
});
},
@ -19,7 +18,7 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
this.text = BI.createWidget({
type: "bi.icon_text_item",
element: this,
cls: o.iconClass,
cls: o.iconCls,
once: o.once,
selected: o.selected,
height: o.height,

4
src/case/checkbox/check.arrowtreegroupnode.js

@ -5,9 +5,7 @@
BI.ArrowTreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {
_defaultConfig: function () {
return BI.extend(BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-arrow-tree-group-node",
iconWidth: 13,
iconHeight: 13
extraCls: "bi-arrow-tree-group-node"
});
},
_init: function () {

4
src/case/checkbox/check.checkingmarknode.js

@ -6,9 +6,7 @@
BI.CheckingMarkNode = BI.inherit(BI.IconButton, {
_defaultConfig: function () {
return BI.extend( BI.CheckingMarkNode.superclass._defaultConfig.apply(this, arguments), {
extraCls: "check-mark-font",
iconWidth: 13,
iconHeight: 13
extraCls: "check-mark-font"
});
},
_init: function () {

4
src/case/checkbox/check.treegroupnode.js

@ -7,9 +7,7 @@
BI.TreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {
_defaultConfig: function () {
return BI.extend( BI.TreeGroupNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {
extraCls: "tree-node-triangle-collapse-font",
iconWidth: 13,
iconHeight: 13
extraCls: "tree-node-triangle-collapse-font"
});
},
_init: function () {

50
src/case/colorchooser/colorchooser.js

@ -17,25 +17,42 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
_init: function () {
BI.ColorChooser.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.trigger = BI.createWidget(BI.extend({
type: "bi.color_chooser_trigger",
width: o.width,
height: o.height
}, o.el));
this.colorPicker = BI.createWidget({
type: "bi.color_chooser_popup"
});
this.combo = BI.createWidget({
type: "bi.combo",
element: this,
adjustLength: 1,
el: this.trigger,
el: BI.extend({
type: "bi.color_chooser_trigger",
ref: function (_ref) {
self.trigger = _ref;
},
width: o.width,
height: o.height
}, o.el),
popup: {
el: this.colorPicker,
el: {
type: "bi.color_chooser_popup",
ref: function (_ref) {
self.colorPicker = _ref;
},
listeners: [{
eventName: BI.ColorChooserPopup.EVENT_VALUE_CHANGE,
action: function () {
fn();
}
}, {
eventName: BI.ColorChooserPopup.EVENT_CHANGE,
action: function () {
fn();
self.combo.hideView();
}
}]
},
stopPropagation: false,
minWidth: 202
}
},
value: o.value
});
var fn = function () {
@ -48,15 +65,6 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
que.unshift(color);
BI.Cache.setItem("colors", BI.array2String(que.toArray()));
};
this.colorPicker.on(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, function () {
fn();
});
this.colorPicker.on(BI.ColorChooserPopup.EVENT_CHANGE, function () {
fn();
self.combo.hideView();
});
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
self.colorPicker.setStoreColors(BI.string2Array(BI.Cache.getItem("colors") || ""));
});
@ -83,7 +91,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
},
getValue: function () {
return this.colorPicker.getValue();
return this.combo.getValue();
}
});
BI.ColorChooser.EVENT_CHANGE = "ColorChooser.EVENT_CHANGE";

9
src/case/colorchooser/colorchooser.popup.js

@ -19,7 +19,8 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
BI.ColorChooserPopup.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.colorEditor = BI.createWidget({
type: "bi.color_picker_editor"
type: "bi.color_picker_editor",
value: o.value
});
this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () {
@ -55,7 +56,8 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
disabled: true
}]],
width: 190,
height: 25
height: 25,
value: o.value
});
this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () {
self.setValue(this.getValue()[0]);
@ -65,7 +67,8 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.colorPicker = BI.createWidget({
type: "bi.color_picker",
width: 190,
height: 50
height: 50,
value: o.value
});
this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE, function () {

3
src/case/colorchooser/colorpicker/colorpicker.js

@ -161,7 +161,8 @@ BI.ColorPicker = BI.inherit(BI.Widget, {
}),
layouts: [{
type: "bi.grid"
}]
}],
value: o.value
});
this.colors.on(BI.ButtonGroup.EVENT_CHANGE, function () {
self.fireEvent(BI.ColorPicker.EVENT_CHANGE, arguments);

4
src/case/combo/iconcombo/combo.icon.js

@ -10,7 +10,7 @@ BI.IconCombo = BI.inherit(BI.Widget, {
baseCls: "bi-icon-combo",
width: 24,
height: 24,
iconClass: "",
iconCls: "",
el: {},
popup: {},
minWidth: 100,
@ -30,7 +30,7 @@ BI.IconCombo = BI.inherit(BI.Widget, {
var self = this, o = this.options;
this.trigger = BI.createWidget(o.el, {
type: "bi.icon_combo_trigger",
iconClass: o.iconClass,
iconCls: o.iconCls,
title: o.title,
items: o.items,
width: o.width,

14
src/case/combo/iconcombo/trigger.iconcombo.js

@ -10,7 +10,7 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
extraCls: "bi-icon-combo-trigger",
el: {},
items: [],
iconClass: "",
iconCls: "",
width: 25,
height: 25,
isShowDown: true
@ -22,7 +22,7 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
var o = this.options, self = this;
this.button = BI.createWidget(o.el, {
type: "bi.icon_change_button",
cls: "icon-combo-trigger-icon " + o.iconClass,
cls: "icon-combo-trigger-icon " + o.iconCls,
disableSelected: true,
width: o.width,
height: o.height,
@ -60,7 +60,7 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
populate: function (items) {
var o = this.options;
this.options.items = items || [];
this.button.setIcon(o.iconClass);
this.button.setIcon(o.iconCls);
this.button.setSelected(false);
this.down.setSelected(false);
},
@ -68,19 +68,19 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
setValue: function (v) {
BI.IconComboTrigger.superclass.setValue.apply(this, arguments);
var o = this.options;
var iconClass = "";
var iconCls = "";
v = BI.isArray(v) ? v[0] : v;
if (BI.any(this.options.items, function (i, item) {
if (v === item.value) {
iconClass = item.iconClass;
iconCls = item.iconCls;
return true;
}
})) {
this.button.setIcon(iconClass);
this.button.setIcon(iconCls);
this.button.setSelected(true);
this.down.setSelected(true);
} else {
this.button.setIcon(o.iconClass);
this.button.setIcon(o.iconCls);
this.button.setSelected(false);
this.down.setSelected(false);
}

1
src/case/combo/icontextvaluecombo/combo.icontextvalue.js

@ -19,6 +19,7 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
type: "bi.select_icon_text_trigger",
items: o.items,
height: o.height,
text: o.text,
value: o.value
});
this.popup = BI.createWidget({

4
src/case/combo/staticcombo/combo.static.js

@ -23,6 +23,7 @@ BI.StaticCombo = BI.inherit(BI.Widget, {
type: "bi.text_icon_item",
cls: "bi-select-text-trigger bi-border pull-down-font",
text: o.text,
value: o.value,
readonly: true,
textLgap: 5,
height: o.height - 2
@ -31,7 +32,8 @@ BI.StaticCombo = BI.inherit(BI.Widget, {
type: "bi.text_value_combo_popup",
textAlign: o.textAlign,
chooseType: o.chooseType,
items: o.items
items: o.items,
value: o.value
});
this.popup.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);

3
src/case/combo/textvaluecombo/combo.textvalue.js

@ -21,7 +21,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
this.trigger = BI.createWidget(o.el, {
type: "bi.select_text_trigger",
items: o.items,
height: o.height
height: o.height,
text: o.value
});
this.popup = BI.createWidget({
type: "bi.text_value_combo_popup",

3
src/case/combo/textvaluecombo/popup.textvalue.js

@ -19,7 +19,8 @@ BI.TextValueComboPopup = BI.inherit(BI.Pane, {
chooseType: o.chooseType,
layouts: [{
type: "bi.vertical"
}]
}],
value: o.value
});
this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) {

4
src/case/layer/panel.js

@ -57,8 +57,8 @@ BI.Panel = BI.inherit(BI.Widget, {
return {
el: {
type: "bi.left_right_vertical_adapt",
cls: "panel-title bi-tips bi-border-bottom bi-background",
height: 30,
cls: "panel-title bi-border-bottom bi-background",
height: 29,
items: {
left: [this.text],
right: [this.button_group]

188
src/case/richeditor/bar/action.richeditor.param.js

@ -13,10 +13,6 @@ BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
BI.RichEditorParamAction.superclass._init.apply(this, arguments);
},
_isParam: function (sel) {
return sel.attr("data-type") === "param";
},
_createBlankNode: function () {
return $("<span>").html("&nbsp;");
},
@ -25,10 +21,8 @@ BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
var o = this.options;
var instance = o.editor.selectedInstance;
var next = $param.next();
if (next.length === 0 || this._isParam(next)) {
var preNode = this._createBlankNode();
if (next.length === 0) {
var nextNode = this._createBlankNode();
$param.before(preNode);
$param.after(nextNode);
instance.setFocus(nextNode[0]);
} else {
@ -36,67 +30,127 @@ BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
}
},
_get$Sel: function () {
var o = this.options;
var instance = o.editor.selectedInstance;
var sel = $(instance.selElm());
if (sel[0].nodeType === 3 && this._isParam(sel.parent())) {
sel = sel.parent();
}
return sel;
},
addParam: function (param) {
var o = this.options;
var sel = this._get$Sel();
var $param = $("<span>").attr({
"data-type": "param",
"data-value": param
}).css({
color: "white",
backgroundColor: "#009de3",
padding: "0 5px"
}).text(param).keydown(function (e) {
if (e.keyCode === BI.KeyCode.BACKSPACE || e.keyCode === BI.KeyCode.DELETE) {
$param.destroy();
}
e.stopEvent();
return false;
});
var wrapper = o.editor.instance.getElm().element;
if (wrapper.find(sel).length <= 0) {
wrapper.append($param);
} else {
sel.after($param);
}
this._addBlank($param);
},
var instance = o.editor.instance;
var image = new Image();
var canvas = document.createElement("canvas");
$("body").append(canvas);
canvas.width = BI.DOM.getTextSizeWidth(param, 14) + 6;
canvas.height = 16;
var ctx = canvas.getContext("2d");
ctx.font = "14px Georgia";
ctx.fillStyle = "#ffffff";
ctx.fillText(param, 3, 14);
image.src = canvas.toDataURL("image/png");
image.alt = param;
$(image).css({"background-color": "#3f8ce8", "vertical-align": "sub", "margin": "0 3px;"});
instance.getElm().element.append(image);
this._addBlank($(image));
$(canvas).destroy();
}
});
keydown: function (e) {
var o = this.options;
var sel = this._get$Sel();
if (e.keyCode === 229) {// 中文输入法
if (this._isParam(sel)) {
this._addBlank(sel);
e.stopEvent();
return false;
}
}
if (BI.Key[e.keyCode] || e.keyCode === BI.KeyCode.TAB || e.keyCode === BI.KeyCode.ENTER || e.keyCode === BI.KeyCode.SPACE) {
if (this._isParam(sel)) {
e.stopEvent();
return false;
}
}
if (e.keyCode === BI.KeyCode.BACKSPACE || e.keyCode === BI.KeyCode.DELETE) {
if (this._isParam(sel)) {
sel.destroy();
e.preventDefault();
return false;
}
}
},
// /**
// *
// * Created by GUY on 2017/09/18.
// * @class BI.RichEditorParamAction
// * @extends BI.Widget
// */
// BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
// _defaultConfig: function () {
// return BI.extend(BI.RichEditorParamAction.superclass._defaultConfig.apply(this, arguments), {});
// },
//
// _init: function () {
// BI.RichEditorParamAction.superclass._init.apply(this, arguments);
// },
//
// _isParam: function (sel) {
// return sel.attr("data-type") === "param";
// },
//
// _createBlankNode: function () {
// return $("<span>").html("&nbsp;");
// },
//
// _addBlank: function ($param) {
// var o = this.options;
// var instance = o.editor.selectedInstance;
// var next = $param.next();
// if (next.length === 0 || this._isParam(next)) {
// var preNode = this._createBlankNode();
// var nextNode = this._createBlankNode();
// $param.before(preNode);
// $param.after(nextNode);
// instance.setFocus(nextNode[0]);
// } else {
// instance.setFocus(next[0]);
// }
// },
//
// _get$Sel: function () {
// var o = this.options;
// var instance = o.editor.selectedInstance;
// var sel = $(instance.selElm());
// if (sel[0].nodeType === 3 && this._isParam(sel.parent())) {
// sel = sel.parent();
// }
// return sel;
// },
//
// addParam: function (param) {
// var o = this.options;
// var sel = this._get$Sel();
// var $param = $("<span>").attr({
// "data-type": "param",
// "data-value": param
// }).css({
// color: "white",
// backgroundColor: "#009de3",
// padding: "0 5px"
// }).text(param).keydown(function (e) {
// if (e.keyCode === BI.KeyCode.BACKSPACE || e.keyCode === BI.KeyCode.DELETE) {
// $param.destroy();
// }
// e.stopEvent();
// return false;
// });
// var wrapper = o.editor.instance.getElm().element;
// if (wrapper.find(sel).length <= 0) {
// wrapper.append($param);
// } else {
// sel.after($param);
// }
// this._addBlank($param);
// },
//
// keydown: function (e) {
// var o = this.options;
// var sel = this._get$Sel();
// if (e.keyCode === 229) {// 中文输入法
// if (this._isParam(sel)) {
// this._addBlank(sel);
// e.stopEvent();
// return false;
// }
// }
// if (BI.Key[e.keyCode] || e.keyCode === BI.KeyCode.TAB || e.keyCode === BI.KeyCode.ENTER || e.keyCode === BI.KeyCode.SPACE) {
// if (this._isParam(sel)) {
// e.stopEvent();
// return false;
// }
// }
// if (e.keyCode === BI.KeyCode.BACKSPACE || e.keyCode === BI.KeyCode.DELETE) {
// if (this._isParam(sel)) {
// sel.destroy();
// e.preventDefault();
// return false;
// }
// }
// },
//
// key: function (e) {
// }
// });
key: function (e) {
}
});

24
src/case/toolbar/toolbar.multiselect.js

@ -16,25 +16,31 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
disableSelected: true,
isHalfCheckedBySelectedValue: function (selectedValues) {
return selectedValues.length > 0;
}
},
halfSelected: false
});
},
_init: function () {
BI.MultiSelectBar.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var isSelect = o.selected === true;
var isHalfSelect = !o.selected && o.halfSelected;
this.checkbox = BI.createWidget({
type: "bi.checkbox",
stopPropagation: true,
handler: function () {
self.setSelected(self.isSelected());
}
},
selected: isSelect,
invisible: isHalfSelect
});
this.half = BI.createWidget({
type: "bi.half_icon_button",
stopPropagation: true,
handler: function () {
self.setSelected(true);
}
},
invisible: isSelect || !isHalfSelect
});
this.checkbox.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, self.isSelected(), self);
@ -73,7 +79,10 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
el: this.text
}]
});
this.half.invisible();
},
_setSelected: function (v) {
this.checkbox.setSelected(!!v);
},
// 自己手动控制选中
@ -92,8 +101,9 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
},
setHalfSelected: function (b) {
this._half = !!b;
this.halfSelected = !!b;
if (b === true) {
this.checkbox.setSelected(false);
this.half.visible();
this.checkbox.invisible();
} else {
@ -103,7 +113,7 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
},
isHalfSelected: function () {
return !!this._half;
return !this.isSelected() && !!this.halfSelected;
},
isSelected: function () {
@ -113,7 +123,7 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
setValue: function (selectedValues) {
BI.MultiSelectBar.superclass.setValue.apply(this, arguments);
var isAllChecked = this.options.isAllCheckedBySelectedValue.apply(this, arguments);
this.setSelected(isAllChecked);
this._setSelected(isAllChecked);
!isAllChecked && this.setHalfSelected(this.options.isHalfCheckedBySelectedValue.apply(this, arguments));
}
});

4
src/case/tree/tree.level.js

@ -12,7 +12,8 @@ BI.LevelTree = BI.inherit(BI.Widget, {
chooseType: 0
},
expander: {},
items: []
items: [],
value: ""
});
},
@ -81,6 +82,7 @@ BI.LevelTree = BI.inherit(BI.Widget, {
}, o.expander),
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),
value: o.value,
el: BI.extend({
type: "bi.button_tree",

10
src/case/tree/tree.simple.js

@ -40,6 +40,9 @@ BI.SimpleTreeView = BI.inherit(BI.Widget, {
if (BI.isNotEmptyArray(o.items)) {
this.populate();
}
if (BI.isNotNull(o.value)) {
this.setValue(o.value);
}
},
populate: function (items, keyword) {
@ -51,7 +54,7 @@ BI.SimpleTreeView = BI.inherit(BI.Widget, {
});
},
setValue: function (v) {
_digest: function (v) {
v || (v = []);
var self = this, map = {};
var selected = [];
@ -79,8 +82,11 @@ BI.SimpleTreeView = BI.inherit(BI.Widget, {
}
}
});
return BI.makeObject(v.concat(selected));
},
this.tree.setValue(BI.makeObject(v.concat(selected)));
setValue: function (v) {
this.tree.setValue(this._digest(v));
},
_getValue: function () {

7
src/case/trigger/trigger.icon.text.js

@ -26,6 +26,9 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
textAlign: "left",
height: o.height,
text: o.text,
title: function () {
return o.text;
},
hgap: c.hgap
});
this.trigerButton = BI.createWidget({
@ -43,7 +46,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
items: [{
el: {
type: "bi.icon_change_button",
cls: "icon-combo-trigger-icon " + o.iconClass,
cls: "icon-combo-trigger-icon " + o.iconCls,
ref: function (_ref) {
self.icon = _ref;
},
@ -63,7 +66,6 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
setValue: function (value) {
this.text.setValue(value);
this.text.setTitle(value);
},
setIcon: function (iconCls) {
@ -85,7 +87,6 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
setText: function (text) {
this.text.setText(text);
this.text.setTitle(text);
}
});
BI.shortcut("bi.icon_text_trigger", BI.IconTextTrigger);

32
src/case/trigger/trigger.icon.text.select.js

@ -14,40 +14,50 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
this.options.height -= 2;
BI.SelectIconTextTrigger.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var obj = this._digist(o.value, o.items);
this.trigger = BI.createWidget({
type: "bi.icon_text_trigger",
element: this,
text: obj.text,
iconCls: obj.iconCls,
height: o.height
});
if (BI.isKey(o.value)) {
this.setValue(o.value);
}
},
setValue: function (vals) {
_digist: function (vals, items) {
var o = this.options;
vals = BI.isArray(vals) ? vals : [vals];
var result;
var items = BI.Tree.transformToArrayFormat(this.options.items);
BI.any(items, function (i, item) {
var formatItems = BI.Tree.transformToArrayFormat(items);
BI.any(formatItems, function (i, item) {
if (BI.deepContains(vals, item.value)) {
result = {
text: item.text || item.value,
iconClass: item.iconClass
iconCls: item.iconCls
};
return true;
}
});
if (BI.isNotNull(result)) {
this.trigger.setText(result.text);
this.trigger.setIcon(result.iconClass);
return {
text: result.text,
iconCls: result.iconCls
};
} else {
this.trigger.setText(o.value);
this.trigger.setIcon("");
return {
text: o.text,
iconCls: ""
};
}
},
setValue: function (vals) {
var obj = this._digist(vals, this.options.items);
this.trigger.setText(obj.text);
this.trigger.setIcon(obj.iconCls);
},
populate: function (items) {
this.options.items = items;
}

9
src/case/trigger/trigger.text.js

@ -26,6 +26,9 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
textAlign: "left",
height: o.height,
text: o.text,
title: function () {
return o.text;
},
hgap: c.hgap,
readonly: o.readonly
});
@ -49,14 +52,8 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
});
},
setValue: function (value) {
this.text.setValue(value);
this.text.setTitle(value);
},
setText: function (text) {
this.text.setText(text);
this.text.setTitle(text);
}
});
BI.shortcut("bi.text_trigger", BI.TextTrigger);

22
src/case/trigger/trigger.text.select.js

@ -21,31 +21,33 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
this.trigger = BI.createWidget({
type: "bi.text_trigger",
element: this,
height: o.height
height: o.height,
text: this._digest(o.value, o.items)
});
if (BI.isKey(o.text)) {
this.setValue(o.text);
}
},
setValue: function (vals) {
_digest: function(vals, items){
var o = this.options;
vals = BI.isArray(vals) ? vals : [vals];
var result = [];
var items = BI.Tree.transformToArrayFormat(this.options.items);
BI.each(items, function (i, item) {
var formatItems = BI.Tree.transformToArrayFormat(items);
BI.each(formatItems, function (i, item) {
if (BI.deepContains(vals, item.value) && !result.contains(item.text || item.value)) {
result.push(item.text || item.value);
}
});
if (result.length > 0) {
this.trigger.setText(result.join(","));
return result.join(",");
} else {
this.trigger.setText(o.text);
return o.text;
}
},
setValue: function (vals) {
this.trigger.setText(this._digest(vals, this.options.items));
},
populate: function (items) {
this.options.items = items;
}

30
src/case/trigger/trigger.text.select.small.js

@ -17,36 +17,44 @@ BI.SmallSelectTextTrigger = BI.inherit(BI.Trigger, {
this.options.height -= 2;
BI.SmallSelectTextTrigger.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var obj = this._digest(o.text, o.items);
this.trigger = BI.createWidget({
type: "bi.small_text_trigger",
element: this,
height: o.height - 2
height: o.height - 2,
text: obj.text,
cls: obj.cls
});
if (BI.isKey(o.text)) {
this.setValue(o.text);
}
},
setValue: function (vals) {
_digest: function(vals, items){
var o = this.options;
vals = BI.isArray(vals) ? vals : [vals];
var result = [];
var items = BI.Tree.transformToArrayFormat(this.options.items);
BI.each(items, function (i, item) {
var formatItems = BI.Tree.transformToArrayFormat(items);
BI.each(formatItems, function (i, item) {
if (BI.deepContains(vals, item.value) && !result.contains(item.text || item.value)) {
result.push(item.text || item.value);
}
});
if (result.length > 0) {
this.trigger.element.removeClass("bi-water-mark");
this.trigger.setText(result.join(","));
return {
cls: "",
text: result.join(",")
}
} else {
this.trigger.element.addClass("bi-water-mark");
this.trigger.setText(o.text);
return {
cls: "bi-water-mark",
text: o.text
}
}
},
setValue: function (vals) {
this.trigger.setText(this._digest(vals, this.options.items));
},
populate: function (items) {
this.options.items = items;
}

0
src/config.js → src/core/config.js

26
src/core/controller/controller.layer.js

@ -28,27 +28,13 @@ BI.LayerController = BI.inherit(BI.Controller, {
},
make: function (name, container, op) {
if (this.has(name)) {
return this.get(name);
if (BI.isWidget(container)) {
op = op || {};
op.container = container;
} else {
op = container;
}
op || (op = {});
var widget = BI.createWidget((op.render || {}), {
type: "bi.layout"
});
BI.createWidget({
type: "bi.absolute",
element: container || this.options.render,
items: [BI.extend({
el: widget
}, {
top: 0,
left: 0,
right: 0,
bottom: 0
}, op.offset)]
});
this.add(name, widget, widget);
return widget;
return this.create(name, null, op);
},
create: function (name, from, op) {

8
src/core/wrapper/layout/adapt/absolute.center.js

@ -26,10 +26,10 @@ BI.AbsoluteCenterLayout = BI.inherit(BI.Layout, {
var w = BI.AbsoluteCenterLayout.superclass._addElement.apply(this, arguments);
w.element.css({
position: "absolute",
left: o.hgap + o.lgap + (item.lgap || 0),
right: o.hgap + o.rgap + (item.rgap || 0),
top: o.vgap + o.tgap + (item.tgap || 0),
bottom: o.vgap + o.bgap + (item.bgap || 0),
left: o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0),
right: o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0),
top: o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),
bottom: o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0),
margin: "auto"
});
return w;

12
src/core/wrapper/layout/adapt/absolute.horizontal.js

@ -26,15 +26,15 @@ BI.AbsoluteHorizontalLayout = BI.inherit(BI.Layout, {
var w = BI.AbsoluteHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({
position: "absolute",
left: o.hgap + o.lgap + (item.lgap || 0),
right: o.hgap + o.rgap + (item.rgap || 0),
left: o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0),
right: o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0),
margin: "auto"
});
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) {
w.element.css("top", o.vgap + o.tgap + (item.tgap || 0));
if (o.vgap + o.tgap + (item.vgap || 0) + (item.tgap || 0) !== 0) {
w.element.css("top", o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0));
}
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) {
w.element.css("bottom", o.vgap + o.bgap + (item.bgap || 0));
if (o.vgap + o.bgap + (item.vgap || 0) + (item.bgap || 0) !== 0) {
w.element.css("bottom", o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0));
}
return w;
},

12
src/core/wrapper/layout/adapt/absolute.vertical.js

@ -28,15 +28,15 @@ BI.AbsoluteVerticalLayout = BI.inherit(BI.Layout, {
position: "absolute",
left: item.lgap,
right: item.rgap,
top: o.vgap + o.tgap + (item.tgap || 0),
bottom: o.vgap + o.bgap + (item.bgap || 0),
top: o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),
bottom: o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0),
margin: "auto"
});
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) {
w.element.css("left", o.hgap + o.lgap + (item.lgap || 0));
if (o.hgap + o.lgap + (item.hgap || 0) + (item.lgap || 0) !== 0) {
w.element.css("left", o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0));
}
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) {
w.element.css("right", o.hgap + o.rgap + (item.rgap || 0));
if (o.hgap + o.rgap + (item.hgap || 0) + (item.rgap || 0) !== 0) {
w.element.css("right", o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0));
}
return w;
},

16
src/core/wrapper/layout/adapt/adapt.center.js

@ -64,24 +64,24 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
padding: "0",
border: "none"
});
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) {
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px"
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px"
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
}
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px"
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) {
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px"
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return td;

16
src/core/wrapper/layout/adapt/adapt.horizontal.js

@ -63,24 +63,24 @@ BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {
padding: "0",
border: "none"
});
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) {
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px"
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px"
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
}
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px"
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) {
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px"
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return td;

16
src/core/wrapper/layout/adapt/adapt.vertical.js

@ -64,24 +64,24 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
padding: "0",
border: "none"
});
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) {
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px"
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px"
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
}
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px"
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) {
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px"
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return td;

16
src/core/wrapper/layout/adapt/auto.horizontal.js

@ -28,24 +28,24 @@ BI.HorizontalAutoLayout = BI.inherit(BI.Layout, {
position: "relative",
margin: "0px auto"
});
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) {
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px"
"margin-top": (i === 0 ? o.vgap : 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px"
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
}
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px"
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) {
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px"
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return w;

16
src/core/wrapper/layout/flex/flex.horizontal.js

@ -31,24 +31,24 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
var o = this.options;
var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative", "flex-shrink": "0"});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) {
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px"
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) > 0) {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px"
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
}
if (o.vgap + o.tgap + (item.tgap || 0) > 0) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px"
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) > 0) {
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px"
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return w;

16
src/core/wrapper/layout/flex/flex.vertical.center.js

@ -30,24 +30,24 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
var o = this.options;
var w = BI.FlexVerticalCenter.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative", "flex-shrink": "0"});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) {
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px"
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) > 0) {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px"
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
}
if (o.vgap + o.tgap + (item.tgap || 0) > 0) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px"
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) > 0) {
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px"
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return w;

16
src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js

@ -31,24 +31,24 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
var o = this.options;
var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) {
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px"
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) > 0) {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px"
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
}
if (o.vgap + o.tgap + (item.tgap || 0) > 0) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px"
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) > 0) {
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px"
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return w;

16
src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.center.js

@ -31,24 +31,24 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
var o = this.options;
var w = BI.FlexVerticalCenter.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) {
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px"
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) > 0) {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px"
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
}
if (o.vgap + o.tgap + (item.tgap || 0) > 0) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px"
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) > 0) {
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px"
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return w;

48
src/core/wrapper/layout/layout.flow.js

@ -37,17 +37,25 @@ BI.FloatLeftLayout = BI.inherit(BI.Layout, {
if (BI.isNotNull(item.top)) {
w.element.css({top: item.top});
}
if ((item.lgap || 0) + o.hgap + o.lgap !== 0) {
w.element.css("margin-left", (item.lgap || 0) + o.hgap + o.lgap);
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if ((item.rgap || 0) + o.hgap + o.rgap !== 0) {
w.element.css("margin-right", (item.rgap || 0) + o.hgap + o.rgap);
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
}
if ((item.tgap || 0) + o.vgap + o.tgap !== 0) {
w.element.css("margin-top", (item.tgap || 0) + o.vgap + o.tgap);
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if ((item.bgap || 0) + o.vgap + o.bgap !== 0) {
w.element.css("margin-bottom", (item.bgap || 0) + o.vgap + o.bgap);
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return w;
},
@ -102,17 +110,25 @@ BI.FloatRightLayout = BI.inherit(BI.Layout, {
if (BI.isNotNull(item.top)) {
w.element.css({top: item.top});
}
if ((item.lgap || 0) + o.hgap + o.lgap !== 0) {
w.element.css("margin-left", (item.lgap || 0) + o.hgap + o.lgap);
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if ((item.rgap || 0) + o.hgap + o.rgap !== 0) {
w.element.css("margin-right", (item.rgap || 0) + o.hgap + o.rgap);
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
}
if ((item.tgap || 0) + o.vgap + o.tgap !== 0) {
w.element.css("margin-top", (item.tgap || 0) + o.vgap + o.tgap);
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": (i === 0 ? o.hgap : 0) + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if ((item.bgap || 0) + o.vgap + o.bgap !== 0) {
w.element.css("margin-bottom", (item.bgap || 0) + o.vgap + o.bgap);
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return w;
},

17
src/core/wrapper/layout/layout.horizontal.js

@ -63,24 +63,25 @@ BI.HorizontalLayout = BI.inherit(BI.Layout, {
padding: "0",
border: "none"
});
if (o.hgap + o.lgap + (item.lgap || 0) > 0) {
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px"
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) > 0) {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px"
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
}
if (o.vgap + o.tgap + (item.tgap || 0) > 0) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px"
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) > 0) {
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px"
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return td;

20
src/core/wrapper/layout/layout.tape.js

@ -52,7 +52,7 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
} else {
w = self.getWidgetByName(self.getName() + i + "");
}
w.element.css({position: "absolute", top: o.vgap + o.tgap + "px", bottom: o.vgap + o.bgap + "px"});
w.element.css({position: "absolute", top: (item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap + "px", bottom: (item.bgap || 0) + (item.vgap || 0) + o.vgap + o.bgap + "px"});
});
var left = {}, right = {};
@ -62,13 +62,13 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
BI.any(items, function (i, item) {
var w = self.getWidgetByName(self.getName() + i + "");
if (BI.isNull(left[i])) {
left[i] = left[i - 1] + items[i - 1].width + 2 * o.hgap + o.lgap + o.rgap;
left[i] = left[i - 1] + items[i - 1].width + (items[i - 1].lgap || 0) + 2 * (items[i - 1].hgap || 0) + o.hgap + o.lgap + o.rgap;
}
if (item.width < 1 && item.width >= 0) {
w.element.css({left: left[i] * 100 + "%", width: item.width * 100 + "%"});
} else {
w.element.css({
left: left[i] + o.hgap + o.lgap + "px",
left: left[i] + (item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap + "px",
width: BI.isNumber(item.width) ? item.width : ""
});
}
@ -79,13 +79,13 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
BI.backAny(items, function (i, item) {
var w = self.getWidgetByName(self.getName() + i + "");
if (BI.isNull(right[i])) {
right[i] = right[i + 1] + items[i + 1].width + 2 * o.hgap + o.lgap + o.rgap;
right[i] = right[i + 1] + items[i + 1].width + (items[i + 1].rgap || 0) + 2 * (items[i + 1].hgap || 0) + o.hgap + o.lgap + o.rgap;
}
if (item.width < 1 && item.width >= 0) {
w.element.css({right: right[i] * 100 + "%", width: item.width * 100 + "%"});
} else {
w.element.css({
right: right[i] + o.hgap + o.rgap + "px",
right: right[i] + (item.rgap || 0) + (item.hgap || 0) + o.hgap + o.rgap + "px",
width: BI.isNumber(item.width) ? item.width : ""
});
}
@ -157,7 +157,7 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
} else {
w = self.getWidgetByName(self.getName() + i + "");
}
w.element.css({position: "absolute", left: o.hgap + o.lgap + "px", right: o.hgap + o.rgap + "px"});
w.element.css({position: "absolute", left: (item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap + "px", right: + (item.hgap || 0) + (item.rgap || 0) + o.hgap + o.rgap + "px"});
});
var top = {}, bottom = {};
@ -167,13 +167,13 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
BI.any(items, function (i, item) {
var w = self.getWidgetByName(self.getName() + i + "");
if (BI.isNull(top[i])) {
top[i] = top[i - 1] + items[i - 1].height + 2 * o.vgap + o.tgap + o.bgap;
top[i] = top[i - 1] + items[i - 1].height + (items[i - 1].tgap || 0) + 2 * (items[i - 1].vgap || 0) + o.vgap + o.tgap + o.bgap;
}
if (item.height < 1 && item.height >= 0) {
w.element.css({top: top[i] * 100 + "%", height: item.height * 100 + "%"});
} else {
w.element.css({
top: top[i] + o.vgap + o.tgap + "px",
top: top[i] + (item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap + "px",
height: BI.isNumber(item.height) ? item.height : ""
});
}
@ -184,13 +184,13 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
BI.backAny(items, function (i, item) {
var w = self.getWidgetByName(self.getName() + i + "");
if (BI.isNull(bottom[i])) {
bottom[i] = bottom[i + 1] + items[i + 1].height + 2 * o.vgap + o.tgap + o.bgap;
bottom[i] = bottom[i + 1] + items[i + 1].height + (items[i + 1].bgap || 0) + 2 * (items[i + 1].vgap || 0) + o.vgap + o.tgap + o.bgap;
}
if (item.height < 1 && item.height >= 0) {
w.element.css({bottom: bottom[i] * 100 + "%", height: item.height * 100 + "%"});
} else {
w.element.css({
bottom: bottom[i] + o.vgap + o.bgap + "px",
bottom: bottom[i] + (item.vgap || 0) + (item.bgap || 0) + o.vgap + o.bgap + "px",
height: BI.isNumber(item.height) ? item.height : ""
});
}

16
src/core/wrapper/layout/layout.vertical.js

@ -27,24 +27,24 @@ BI.VerticalLayout = BI.inherit(BI.Layout, {
w.element.css({
position: "relative"
});
if (o.vgap + o.tgap + (item.tgap || 0) !== 0) {
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + "px"
"margin-top": (i === 0 ? o.vgap : 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.lgap + (item.lgap || 0) !== 0) {
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + "px"
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) !== 0) {
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + "px"
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) !== 0) {
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + "px"
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return w;

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save