Browse Source

Merge branch 'master' of ssh://www.finedevelop.com:7999/~fay/fineui

es6
李丰豪 8 years ago
parent
commit
ce7cca566e
  1. 9
      Gruntfile.js
  2. 391
      bi/base.css
  3. 297
      bi/base.js
  4. 340
      bi/case.js
  5. 12794
      bi/core.css
  6. 5158
      bi/core.js
  7. 1
      bi/widget.css
  8. 799
      bi/widget.js
  9. 2
      demo.html
  10. 2
      demo/js/base/button/demo.button.js
  11. 2
      demo/js/base/button/demo.icon_button.js
  12. 2
      demo/js/base/button/demo.image_button.js
  13. 2
      demo/js/base/button/demo.text_button.js
  14. 2
      demo/js/base/demo.label.js
  15. 2
      demo/js/base/demo.message.js
  16. 2
      demo/js/base/demo.pager.js
  17. 2
      demo/js/base/demo.svg.js
  18. 2
      demo/js/base/editor/demo.code_editor.js
  19. 2
      demo/js/base/editor/demo.editor.js
  20. 2
      demo/js/base/editor/demo.formula_editor.js
  21. 2
      demo/js/base/editor/demo.multifile_editor.js
  22. 2
      demo/js/base/editor/demo.textarea_editor.js
  23. 2
      demo/js/base/table/demo.collection_table.js
  24. 2
      demo/js/base/table/demo.grid_table.js
  25. 2
      demo/js/base/table/demo.resizable_table.js
  26. 2
      demo/js/base/table/demo.table_view.js
  27. 2
      demo/js/base/tip/demo.bubble.js
  28. 2
      demo/js/base/tip/demo.title.js
  29. 2
      demo/js/base/tip/demo.toast.js
  30. 2
      demo/js/base/tree/demo.part_tree.js
  31. 2
      demo/js/base/tree/demo.sync_tree.js
  32. 2
      demo/js/base/tree/demo.tree_view.js
  33. 2
      demo/js/case/combo/demo.bubble_combo.js
  34. 2
      demo/js/case/demo.calendar.js
  35. 2
      demo/js/case/demo.color_chooser.js
  36. 2
      demo/js/case/demo.complex_canvas.js
  37. 2
      demo/js/case/demo.zclip.js
  38. 2
      demo/js/case/tree/demo.branch_relation.js
  39. 2
      demo/js/case/tree/demo.branch_tree.js
  40. 2
      demo/js/case/tree/demo.display_tree.js
  41. 2
      demo/js/case/tree/demo.handstand_branch_tree.js
  42. 2
      demo/js/case/tree/demo.level_tree.js
  43. 2
      demo/js/case/tree/demo.simple_tree.js
  44. 2
      demo/js/center.js
  45. 2
      demo/js/component/demo.treevaluechooser.js
  46. 2
      demo/js/component/demo.valuechooser.js
  47. 12
      demo/js/config/widget.js
  48. 2
      demo/js/core/abstract/combination/demo.combo.js
  49. 46
      demo/js/core/abstract/demo.button_group.js
  50. 2
      demo/js/core/abstract/demo.button_tree.js
  51. 2
      demo/js/core/abstract/demo.collection_view.js
  52. 2
      demo/js/core/abstract/demo.grid_view.js
  53. 5
      demo/js/core/abstract/demo.virtual_group.js
  54. 2
      demo/js/core/abstract/mvc.custom_tree.js
  55. 2
      demo/js/core/layout/demo.absolute.js
  56. 2
      demo/js/core/layout/demo.border.js
  57. 2
      demo/js/core/layout/demo.center.js
  58. 2
      demo/js/core/layout/demo.center_adapt.js
  59. 2
      demo/js/core/layout/demo.float_center.js
  60. 2
      demo/js/core/layout/demo.flow.js
  61. 2
      demo/js/core/layout/demo.grid.js
  62. 2
      demo/js/core/layout/demo.horizontal.js
  63. 2
      demo/js/core/layout/demo.horizontal_adapt.js
  64. 2
      demo/js/core/layout/demo.horizontal_auto.js
  65. 2
      demo/js/core/layout/demo.horizontal_float.js
  66. 2
      demo/js/core/layout/demo.htape.js
  67. 2
      demo/js/core/layout/demo.inline.js
  68. 2
      demo/js/core/layout/demo.left_right_vertical_adapt.js
  69. 2
      demo/js/core/layout/demo.table.js
  70. 2
      demo/js/core/layout/demo.td.js
  71. 2
      demo/js/core/layout/demo.vertical.js
  72. 2
      demo/js/core/layout/demo.vertical_adapt.js
  73. 2
      demo/js/core/layout/demo.vtape.js
  74. 2
      demo/js/face.js
  75. 2
      demo/js/main.js
  76. 2
      demo/js/north.js
  77. 2
      demo/js/west.js
  78. 2
      demo/js/widget/demo.multiselectcombo.js
  79. 2
      demo/js/widget/demo.pathchooser.js
  80. 2
      demo/js/widget/demo.relationview.js
  81. 233
      demo/js/widget/table/demo.preview_table.js
  82. 158
      demo/js/widget/table/demo.responsive_table.js
  83. 4
      demo/version.js
  84. 391
      dist/base.css
  85. 297
      dist/base.js
  86. 340
      dist/case.js
  87. 12794
      dist/core.css
  88. 7282
      dist/core.js
  89. BIN
      dist/icon/loading.gif
  90. 6683
      dist/resource.css
  91. 0
      dist/resource/ZeroClipboard.swf
  92. 1
      dist/widget.css
  93. 799
      dist/widget.js
  94. 3
      src/base/base.js
  95. 2
      src/base/canvas/canvas.js
  96. 2
      src/base/collection/collection.js
  97. 2
      src/base/combination/combo.js
  98. 2
      src/base/combination/expander.js
  99. 69
      src/base/combination/group.button.js
  100. 2
      src/base/combination/group.combo.js
  101. Some files were not shown because too many files have changed in this diff Show More

9
Gruntfile.js

@ -103,7 +103,7 @@ module.exports = function (grunt) {
dest: "dist/widget.js"
},
coreCss: {
src: ['src/css/core/**/*.css', 'src/css/utils/**/*.css'],
src: ['src/css/core/**/*.css'],
dest: 'dist/core.css'
},
baseCss: {
@ -114,6 +114,10 @@ module.exports = function (grunt) {
src: ['src/css/widget/**/*.css'],
dest: 'dist/widget.css'
},
resourceCss: {
src: ['src/css/resource/**/*.css'],
dest: 'dist/resource.css'
},
demoJs: {
src: ['demo/version.js', 'demo/app.js', 'demo/js/**/*.js', 'demo/config.js'],
@ -126,7 +130,6 @@ module.exports = function (grunt) {
bi_coreJs: {
src: [
'src/core/underscore.js',
'src/core/foundation.js',
'src/core/mvc/**/*.js',
'src/core/base.js',
@ -199,7 +202,7 @@ module.exports = function (grunt) {
dest: "bi/widget.js"
},
bi_coreCss: {
src: ['src/css/core/**/*.css', 'src/css/utils/**/*.css'],
src: ['src/css/core/**/*.css'],
dest: 'bi/core.css'
},
bi_baseCss: {

391
bi/base.css

@ -1,27 +1,6 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
@font-face {
font-family: 'bbr';
src: url('/resources/fonts/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('/resources/fonts/iconfont.woff') format('woff'), /* chrome、firefox */ url('/resources/fonts/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('/resources/fonts/iconfont.svg#svgFontName') format('svg');
/* iOS 4.1- */
}
.b-font {
font-family: "bi";
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
.bi-base-request-fail-mask .mask-pane {
background: #ffffff;
opacity: 0.8;
filter: alpha(opacity=80);
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
@ -58,57 +37,36 @@
-webkit-box-shadow: 0px 0px 2px 1px #d4dadd inset;
-moz-box-shadow: 0px 0px 2px 1px #d4dadd inset;
}
/**
* Farbtastic Color Picker 1.2
* © 2008 Steven Wittens
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
.farbtastic {
position: relative;
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-color-picker-button {
background-color: #eaeaea;
}
.farbtastic * {
position: absolute;
cursor: crosshair;
.bi-color-picker-button .color-picker-button-mask {
border: 1px solid #1a1a1a;
}
.farbtastic,
.farbtastic .wheel {
width: 195px;
height: 195px;
}
.farbtastic .color,
.farbtastic .overlay {
top: 47px;
left: 47px;
width: 101px;
height: 101px;
}
.farbtastic .wheel {
background: url(farbtastic/wheel.png) no-repeat;
width: 195px;
height: 195px;
}
.farbtastic .overlay {
background: url(farbtastic/mask.png) no-repeat;
}
.farbtastic .marker {
width: 17px;
height: 17px;
margin: -8px 0 0 -8px;
overflow: hidden;
background: url(farbtastic/marker.png) no-repeat;
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-color-picker > .center-element {
border-left: 1px solid #ffffff;
border-top: 1px solid #ffffff;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-color-picker-editor .color-picker-editor-label {
color: #808080;
}
.bi-color-picker-editor .color-picker-editor-display {
background: #ffffff;
-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;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
@ -1077,7 +1035,7 @@ li.CodeMirror-hint-active {
overflow-x: hidden;
overflow-y: hidden;
white-space: nowrap;
word-break: break-all;
word-break: break-word;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
@ -1239,9 +1197,6 @@ li.CodeMirror-hint-active {
.bi-grid-table-cell.first-col {
border-left: 1px solid #eaeaea;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.scrollbar-layout-main {
box-sizing: border-box;
outline: none;
@ -1407,294 +1362,6 @@ li.CodeMirror-hint-active {
opacity: 1;
filter: alpha(opacity=100);
}
/*-------------------------------------
zTree Style
version: 3.5.17
author: Hunter.z
email: hunter.z@263.net
website: http://code.google.com/p/jquerytree/
-------------------------------------*/
.ztree * {
padding: 0;
margin: 0;
}
.ztree {
margin: 0;
padding: 5px;
}
.ztree li {
padding: 0;
margin: 0;
list-style: none;
line-height: 14px;
text-align: left;
white-space: nowrap;
outline: 0;
}
.ztree li ul {
margin: 0;
padding: 0 0 0 18px;
}
.ztree li ul.line {
background: url(icon/tree-vertical-line-1.png) 0 0 repeat-y;
}
.ztree li a {
padding: 1px 3px 0 0;
margin: 0;
cursor: pointer;
height: 24px;
background-color: transparent;
text-decoration: none;
vertical-align: top;
display: inline-block;
}
.ztree li a.curSelectedNode_Edit {
padding-top: 0px;
background-color: #FFE6B0;
color: black;
height: 16px;
border: 1px #FFB951 solid;
opacity: 0.8;
}
.ztree li a.tmpTargetNode_inner {
padding-top: 0px;
background-color: #316AC5;
color: white;
height: 16px;
border: 1px #316AC5 solid;
opacity: 0.8;
filter: alpha(opacity=80);
}
.ztree li a input.rename {
height: 14px;
width: 80px;
padding: 0;
margin: 0;
font-size: 12px;
border: 1px #7EC4CC solid;
*border: 0px;
}
.ztree li span {
line-height: 24px;
margin-right: 2px;
}
.ztree li span.button {
line-height: 0;
margin: 0;
width: 16px;
height: 16px;
display: inline-block;
vertical-align: middle;
border: 0 none;
cursor: pointer;
outline: none;
background-color: transparent;
background-repeat: no-repeat;
background-attachment: scroll;
background-image: url("ztree/img/zTreeStandard.png");
*background-image: url("ztree/img/zTreeStandard.gif");
}
.ztree li span.button.chk {
width: 16px;
height: 16px;
margin: 0 3px 0 0;
cursor: auto;
}
.ztree li span.button.chk.checkbox_false_full {
background-image: url("icon/check-box-normal.png");
}
.ztree li span.button.chk.checkbox_false_full_focus {
background-image: url("icon/check-box-normal.png");
}
.ztree li span.button.chk.checkbox_false_part {
background-image: url("icon/half_selected.png");
}
.ztree li span.button.chk.checkbox_false_part_focus {
background-image: url("icon/half_selected.png");
}
.ztree li span.button.chk.checkbox_false_disable {
background-position: 0 -56px;
}
.ztree li span.button.chk.checkbox_true_full {
background-image: url("icon/check-box-active.png");
}
.ztree li span.button.chk.checkbox_true_full_focus {
background-image: url("icon/check-box-active.png");
}
.ztree li span.button.chk.checkbox_true_part {
background-image: url("icon/half_selected.png");
}
.ztree li span.button.chk.checkbox_true_part_focus {
background-image: url("icon/half_selected.png");
}
.ztree li span.button.chk.checkbox_true_disable {
background-position: -14px -56px;
}
.ztree li span.button.chk.radio_false_full {
background-position: -28px 0;
}
.ztree li span.button.chk.radio_false_full_focus {
background-position: -28px -14px;
}
.ztree li span.button.chk.radio_false_part {
background-position: -28px -28px;
}
.ztree li span.button.chk.radio_false_part_focus {
background-position: -28px -42px;
}
.ztree li span.button.chk.radio_false_disable {
background-position: -28px -56px;
}
.ztree li span.button.chk.radio_true_full {
background-position: -42px 0;
}
.ztree li span.button.chk.radio_true_full_focus {
background-position: -42px -14px;
}
.ztree li span.button.chk.radio_true_part {
background-position: -42px -28px;
}
.ztree li span.button.chk.radio_true_part_focus {
background-position: -42px -42px;
}
.ztree li span.button.chk.radio_true_disable {
background-position: -42px -56px;
}
.ztree li span.button.switch {
width: 25px;
height: 25px;
}
.ztree li span.button.root_open {
background-image: url("icon/tree-expand-1.png");
}
.ztree li span.button.root_close {
background-image: url("icon/tree-collapse-1.png");
}
.ztree li span.button.roots_open {
background-image: url("icon/tree-expand-2.png");
}
.ztree li span.button.roots_close {
background-image: url("icon/tree-collapse-2.png");
}
.ztree li span.button.center_open {
background-image: url("icon/tree-expand-3.png");
}
.ztree li span.button.center_close {
background-image: url("icon/tree-collapse-3.png");
}
.ztree li span.button.bottom_open {
background-image: url("icon/tree-expand-4.png");
}
.ztree li span.button.bottom_close {
background-image: url("icon/tree-collapse-4.png");
}
.ztree li span.button.noline_open {
background-position: -92px -72px;
}
.ztree li span.button.noline_close {
background-position: -74px -72px;
}
.ztree li span.button.root_docu {
background: none;
}
.ztree li span.button.roots_docu {
background-image: url("icon/tree-vertical-line-2.png");
}
.ztree li span.button.center_docu {
background-image: url("icon/tree-vertical-line-3.png");
}
.ztree li span.button.bottom_docu {
background-image: url("icon/tree-vertical-line-4.png");
}
.ztree li span.button.noline_docu {
background: none;
}
.ztree li span.button.ico_open {
margin-right: 2px;
background-position: -110px -16px;
vertical-align: top;
*vertical-align: middle;
}
.ztree li span.button.ico_close {
margin-right: 2px;
background-position: -110px 0;
vertical-align: top;
*vertical-align: middle;
}
.ztree li span.button.ico_docu {
margin-right: 2px;
background-position: -110px -32px;
vertical-align: top;
*vertical-align: middle;
}
.ztree li span.button.edit {
margin-right: 2px;
background-position: -110px -48px;
vertical-align: top;
*vertical-align: middle;
}
.ztree li span.button.remove {
margin-right: 2px;
background-position: -110px -64px;
vertical-align: top;
*vertical-align: middle;
}
.ztree li span.button.ico_loading {
width: 0px;
margin-right: 2px;
background: url("ztree/img/loading.gif") no-repeat scroll 0 0 transparent;
vertical-align: top;
*vertical-align: middle;
}
ul.tmpTargetzTree {
background-color: #FFE6B0;
opacity: 0.8;
filter: alpha(opacity=80);
}
span.tmpzTreeMove_arrow {
width: 16px;
height: 16px;
display: inline-block;
padding: 0;
margin: 2px 0 0 1px;
border: 0 none;
position: absolute;
background-color: transparent;
background-repeat: no-repeat;
background-attachment: scroll;
background-position: -110px -80px;
background-image: url("ztree/img/zTreeStandard.png");
*background-image: url("ztree/img/zTreeStandard.gif");
}
ul.ztree.zTreeDragUL {
margin: 0;
padding: 0;
position: absolute;
width: auto;
height: auto;
overflow: hidden;
background-color: #cfcfcf;
border: 1px #00B83F dotted;
opacity: 0.8;
filter: alpha(opacity=80);
}
.zTreeMask {
z-index: 10000;
background-color: #cfcfcf;
opacity: 0.0;
filter: alpha(opacity=0);
position: absolute;
}
/* level style*/
/*.ztree li span.button.level0 {
display:none;
}
.ztree li ul.level0 {
padding:0;
background:none;
}*/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/

297
bi/base.js

@ -596,7 +596,7 @@ BI.Text = BI.inherit(BI.Single, {
}
});
$.shortcut("bi.text", BI.Text);/**
BI.shortcut("bi.text", BI.Text);/**
* guy
* @class BI.BasicButton
* @extends BI.Single
@ -1020,9 +1020,11 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
self.setValue([]);
break;
}
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
self.fireEvent(BI.ButtonGroup.EVENT_CHANGE, value, obj);
}
} else {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
}
});
btn.on(BI.Events.DESTROY, function () {
BI.remove(self.buttons, btn);
@ -1034,7 +1036,6 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
_packageBtns: function (btns) {
var o = this.options;
for (var i = o.layouts.length - 1; i > 0; i--) {
btns = BI.map(btns, function (k, it) {
return BI.extend({}, o.layouts[i], {
@ -1049,6 +1050,18 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
return btns;
},
_packageSimpleItems: function (btns) {
var o = this.options;
return BI.map(o.items, function (i, item) {
if (BI.stripEL(item) === item) {
return btns[i];
}
return BI.extend({}, item, {
el: btns[i]
})
})
},
_packageItems: function (items, packBtns) {
return BI.createItems(BI.makeArrayByArray(items, {}), BI.clone(packBtns));
},
@ -1064,6 +1077,11 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
return layout;
},
//如果是一个简单的layout
_isSimpleLayout: function () {
var o = this.options;
return o.layouts.length === 1 && !BI.isArray(o.items[0])
},
doBehavior: function () {
var args = Array.prototype.slice.call(arguments);
@ -1078,9 +1096,7 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
var btns = this._btnsCreator.apply(this, arguments);
this.buttons = BI.concat(btns, this.buttons);
//如果是一个简单的layout
if (o.layouts.length === 1 && !BI.isNotEmptyArray(o.layouts[0].items)
&& this.layouts && this.layouts.prependItems) {
if (this._isSimpleLayout() && this.layouts && this.layouts.prependItems) {
this.layouts.prependItems(btns);
return;
}
@ -1095,8 +1111,7 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
this.buttons = BI.concat(this.buttons, btns);
//如果是一个简单的layout
if (o.layouts.length === 1 && !BI.isNotEmptyArray(o.layouts[0].items)
&& this.layouts && this.layouts.addItems) {
if (this._isSimpleLayout() && this.layouts && this.layouts.addItems) {
this.layouts.addItems(btns);
return;
}
@ -1106,35 +1121,33 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
},
removeItemAt: function (indexes) {
var self = this;
indexes = BI.isArray(indexes) ? indexes : [indexes];
var buttons = [];
BI.each(indexes, function (i, index) {
buttons.push(self.buttons[index]);
});
BI.each(buttons, function (i, btn) {
btn && btn.destroy();
})
BI.remove(this.buttons, indexes);
this.layouts.removeItemAt(indexes);
},
removeItems: function (v) {
v = BI.isArray(v) ? v : [v];
var indexes = [];
BI.each(this.buttons, function (i, item) {
if (BI.deepContains(v, item.getValue())) {
indexes.push(i);
removeItems: function (values) {
values = BI.isArray(values) ? values : [values];
var deleted = [];
BI.each(this.buttons, function (i, button) {
if (BI.deepContains(values, button.getValue())) {
deleted.push(i);
}
});
this.removeItemAt(indexes);
BI.remove(this.buttons, deleted);
this.layouts.removeItemAt(deleted);
},
populate: function (items) {
items = items || [];
this.options.items = items;
this.empty();
this.options.items = items;
this.buttons = this._btnsCreator.apply(this, arguments);
if (this._isSimpleLayout()) {
items = this._packageSimpleItems(this.buttons);
} else {
items = this._packageItems(items, this._packageBtns(this.buttons));
}
this.layouts = BI.createWidget(BI.extend({element: this}, this._packageLayout(items)));
},
@ -1260,8 +1273,14 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
return node;
},
empty: function () {
BI.ButtonGroup.superclass.empty.apply(this, arguments);
this.options.items = [];
},
destroy: function () {
BI.ButtonGroup.superclass.destroy.apply(this, arguments);
this.options.items = [];
}
});
BI.extend(BI.ButtonGroup, {
@ -1273,7 +1292,7 @@ BI.extend(BI.ButtonGroup, {
});
BI.ButtonGroup.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.button_group", BI.ButtonGroup);/**
BI.shortcut("bi.button_group", BI.ButtonGroup);/**
* Created by GUY on 2015/8/10.
* @class BI.ButtonTree
* @extends BI.ButtonGroup
@ -1454,7 +1473,7 @@ BI.ButtonTree = BI.inherit(BI.ButtonGroup, {
});
BI.ButtonTree.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.button_tree", BI.ButtonTree);/**
BI.shortcut("bi.button_tree", BI.ButtonTree);/**
* guy
* 异步树
* @class BI.TreeView
@ -1960,7 +1979,7 @@ BI.TreeView.EVENT_CHANGE = "EVENT_CHANGE";
BI.TreeView.EVENT_INIT = BI.Events.INIT;
BI.TreeView.EVENT_AFTERINIT = BI.Events.AFTERINIT;
$.shortcut("bi.tree_view", BI.TreeView);/**
BI.shortcut("bi.tree_view", BI.TreeView);/**
* guy
* 同步树
* @class BI.SyncTree
@ -2168,7 +2187,7 @@ BI.SyncTree = BI.inherit(BI.TreeView, {
}
});
$.shortcut("bi.sync_tree", BI.SyncTree);/**
BI.shortcut("bi.sync_tree", BI.SyncTree);/**
* guy
* 局部树两个请求树 第一个请求构造树第二个请求获取节点
* @class BI.PartTree
@ -2342,17 +2361,14 @@ BI.PartTree = BI.inherit(BI.SyncTree, {
}
});
$.shortcut("bi.part_tree", BI.PartTree);BI.Resizers = new BI.ResizeController();
BI.shortcut("bi.part_tree", BI.PartTree);BI.Resizers = new BI.ResizeController();
BI.Layers = new BI.LayerController();
BI.Maskers = new BI.MaskersController();
BI.Bubbles = new BI.BubblesController();
BI.Tooltips = new BI.TooltipsController();
BI.Popovers = new BI.FloatBoxController();
BI.Broadcasts = new BI.BroadcastController();
BI.StyleLoaders = new BI.StyleLoaderManager();
BI.servletURL = "dist/";
BI.i18n = {};/**
BI.StyleLoaders = new BI.StyleLoaderManager();/**
* canvas绘图
*
* Created by GUY on 2015/11/18.
@ -2483,7 +2499,7 @@ BI.Canvas = BI.inherit(BI.Widget, {
});
}
});
$.shortcut("bi.canvas", BI.Canvas);/**
BI.shortcut("bi.canvas", BI.Canvas);/**
* Collection
*
* Created by GUY on 2016/1/15.
@ -2774,7 +2790,7 @@ BI.Collection = BI.inherit(BI.Widget, {
}
});
BI.Collection.EVENT_SCROLL = "EVENT_SCROLL";
$.shortcut('bi.collection_view', BI.Collection);/**
BI.shortcut('bi.collection_view', BI.Collection);/**
* @class BI.Combo
* @extends BI.Widget
*/
@ -3172,7 +3188,7 @@ BI.Combo.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW";
BI.Combo.EVENT_BEFORE_HIDEVIEW = "EVENT_BEFORE_HIDEVIEW";
BI.Combo.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW";
$.shortcut("bi.combo", BI.Combo);/**
BI.shortcut("bi.combo", BI.Combo);/**
*
* 某个可以展开的节点
*
@ -3449,7 +3465,7 @@ BI.Expander.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW";
BI.Expander.EVENT_BEFORE_HIDEVIEW = "EVENT_BEFORE_HIDEVIEW";
BI.Expander.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW";
$.shortcut("bi.expander", BI.Expander);/**
BI.shortcut("bi.expander", BI.Expander);/**
* Created by GUY on 2015/8/10.
*/
@ -3549,7 +3565,7 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
});
BI.ComboGroup.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.combo_group", BI.ComboGroup);BI.VirtualGroup = BI.inherit(BI.Widget, {
BI.shortcut("bi.combo_group", BI.ComboGroup);BI.VirtualGroup = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.VirtualGroup.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-virtual-group",
@ -3606,21 +3622,33 @@ $.shortcut("bi.combo_group", BI.ComboGroup);BI.VirtualGroup = BI.inherit(BI.Widg
this.layouts.prependItems(items);
},
setValue: function (v) {
this.layouts.setValue(v);
},
getValue: function () {
return this.layouts.getValue();
},
empty: function () {
this.layouts.empty();
},
populate: function (items) {
var self = this;
items = items || [];
this.options.items = items;
items = this._packageItems(items, this._packageBtns(items));
items = this._packageBtns(items);
if (!this.layouts) {
this.layouts = BI.createWidget(BI.extend({element: this}, this._packageLayout(items)));
} else {
this.layouts.populate(this._packageLayout(items).items);
this.layouts.populate(items);
}
}
});
BI.VirtualGroup.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.virtual_group", BI.VirtualGroup);/**
BI.shortcut("bi.virtual_group", BI.VirtualGroup);/**
* 加载控件
*
* Created by GUY on 2015/8/31.
@ -3881,13 +3909,13 @@ BI.Loader = BI.inherit(BI.Widget, {
}
});
BI.Loader.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.loader", BI.Loader);/**
BI.shortcut("bi.loader", BI.Loader);/**
* Created by GUY on 2015/6/26.
*/
BI.Navigation = BI.inherit(BI.Widget, {
_defaultConfig: function(){
return BI.extend(BI.Navigation.superclass._defaultConfig.apply(this,arguments), {
_defaultConfig: function () {
return BI.extend(BI.Navigation.superclass._defaultConfig.apply(this, arguments), {
direction: "bottom",//top, bottom, left, right, custom
logic: {
dynamic: false
@ -3898,7 +3926,7 @@ BI.Navigation = BI.inherit(BI.Widget, {
items: [],
layouts: []
},
cardCreator: function(v){
cardCreator: function (v) {
return BI.createWidget();
},
@ -3907,8 +3935,7 @@ BI.Navigation = BI.inherit(BI.Widget, {
})
},
_init: function(){
BI.Navigation.superclass._init.apply(this,arguments);
render: function () {
var self = this, o = this.options;
this.tab = BI.createWidget(this.options.tab, {type: "bi.button_group"});
this.cardMap = {};
@ -3926,10 +3953,10 @@ BI.Navigation = BI.inherit(BI.Widget, {
new BI.ShowListener({
eventObj: this.tab,
cardLayout: this.layout,
cardNameCreator: function(v){
cardNameCreator: function (v) {
return self.showIndex + v;
},
cardCreator: function(v){
cardCreator: function (v) {
var card = o.cardCreator(v);
self.cardMap[v] = card;
return card;
@ -3937,37 +3964,41 @@ BI.Navigation = BI.inherit(BI.Widget, {
afterCardCreated: BI.bind(this.afterCardCreated, this),
afterCardShow: BI.bind(this.afterCardShow, this)
})
if(o.defaultShowIndex !== false){
},
mounted: function () {
var o = this.options;
if (o.defaultShowIndex !== false) {
this.setSelect(o.defaultShowIndex);
}
},
afterCardCreated: function(v){
afterCardCreated: function (v) {
var self = this;
this.cardMap[v].on(BI.Controller.EVENT_CHANGE, function(type, value, obj){
this.cardMap[v].on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
if(type === BI.Events.CLICK) {
if (type === BI.Events.CLICK) {
self.fireEvent(BI.Navigation.EVENT_CHANGE, obj);
}
})
this.options.afterCardCreated.apply(this, arguments);
},
afterCardShow: function(v){
afterCardShow: function (v) {
this.showIndex = v;
this.options.afterCardShow.apply(this, arguments);
},
populate: function(){
populate: function () {
var card = this.layout.getShowingCard();
if(card){
if (card) {
return card.populate.apply(card, arguments);
}
},
setSelect: function(v){
setSelect: function (v) {
this.showIndex = v;
if(!this.layout.isCardExisted(v)){
if (!this.layout.isCardExisted(v)) {
var card = this.options.cardCreator(v);
this.cardMap[v] = card;
this.layout.addCardByName(v, card);
@ -3977,12 +4008,12 @@ BI.Navigation = BI.inherit(BI.Widget, {
BI.nextTick(BI.bind(this.afterCardShow, this, v));
},
getSelect: function(){
getSelect: function () {
return this.showIndex;
},
getSelectedCard: function(){
if(BI.isKey(this.showIndex)){
getSelectedCard: function () {
if (BI.isKey(this.showIndex)) {
return this.cardMap[this.showIndex];
}
},
@ -3990,9 +4021,9 @@ BI.Navigation = BI.inherit(BI.Widget, {
/**
* @override
*/
setValue: function(v){
setValue: function (v) {
var card = this.layout.getShowingCard();
if(card){
if (card) {
card.setValue(v);
}
},
@ -4000,25 +4031,25 @@ BI.Navigation = BI.inherit(BI.Widget, {
/**
* @override
*/
getValue: function(){
getValue: function () {
var card = this.layout.getShowingCard();
if(card){
if (card) {
return card.getValue();
}
},
empty: function(){
empty: function () {
this.layout.deleteAllCard();
this.cardMap = {};
},
destroy: function(){
destroy: function () {
BI.Navigation.superclass.destroy.apply(this, arguments);
}
});
BI.Navigation.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.navigation", BI.Navigation);/**
BI.shortcut("bi.navigation", BI.Navigation);/**
* 搜索逻辑控件
*
* Created by GUY on 2015/9/28.
@ -4320,7 +4351,7 @@ BI.Searcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.Searcher.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.Searcher.EVENT_AFTER_INIT = "EVENT_AFTER_INIT";
$.shortcut("bi.searcher", BI.Searcher);/**
BI.shortcut("bi.searcher", BI.Searcher);/**
*
* 切换显示或隐藏面板
*
@ -4596,7 +4627,7 @@ BI.Switcher.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW";
BI.Switcher.EVENT_BEFORE_HIDEVIEW = "EVENT_BEFORE_HIDEVIEW";
BI.Switcher.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW";
$.shortcut("bi.switcher", BI.Switcher);/**
BI.shortcut("bi.switcher", BI.Switcher);/**
* Created by GUY on 2015/6/26.
*/
@ -4608,7 +4639,7 @@ BI.Tab = BI.inherit(BI.Widget, {
logic: {
dynamic: false
},
defaultShowIndex: 0,
defaultShowIndex: false,
tab: false,
cardCreator: function (v) {
return BI.createWidget();
@ -4722,7 +4753,7 @@ BI.Tab = BI.inherit(BI.Widget, {
});
BI.Tab.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.tab", BI.Tab);/**
BI.shortcut("bi.tab", BI.Tab);/**
* 表示当前对象
*
* Created by GUY on 2015/9/7.
@ -4763,7 +4794,7 @@ BI.EL = BI.inherit(BI.Widget, {
this.ele.populate.apply(this, arguments);
}
});
$.shortcut('bi.el', BI.EL);// CodeMirror, copyright (c) by Marijn Haverbeke and others
BI.shortcut('bi.el', BI.EL);// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
// This is CodeMirror (http://codemirror.net), a code editor
@ -14330,7 +14361,7 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
BI.FormulaEditor.EVENT_CHANGE = "EVENT_CHANGE";
BI.FormulaEditor.EVENT_BLUR = "EVENT_BLUR";
BI.FormulaEditor.EVENT_FOCUS = "EVENT_FOCUS";
$.shortcut("bi.formula_editor", BI.FormulaEditor);
BI.shortcut("bi.formula_editor", BI.FormulaEditor);
/**
* z-index在1亿层级
* 弹出提示消息框用于模拟阻塞操作通过回调函数实现
@ -14802,7 +14833,7 @@ BI.Grid = BI.inherit(BI.Widget, {
}
});
BI.Grid.EVENT_SCROLL = "EVENT_SCROLL";
$.shortcut('bi.grid_view', BI.Grid);/**
BI.shortcut('bi.grid_view', BI.Grid);/**
* floatBox弹出层
* @class BI.FloatBox
* @extends BI.Widget
@ -14943,7 +14974,7 @@ BI.FloatBox = BI.inherit(BI.Widget, {
}
});
$.shortcut("bi.float_box", BI.FloatBox);
BI.shortcut("bi.float_box", BI.FloatBox);
BI.FloatBox.EVENT_FLOAT_BOX_CLOSED = "EVENT_FLOAT_BOX_CLOSED";
BI.FloatBox.EVENT_FLOAT_BOX_OPEN = "EVENT_FLOAT_BOX_CLOSED";
@ -15127,7 +15158,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
}
});
BI.PopupView.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.popup_view", BI.PopupView);/**
BI.shortcut("bi.popup_view", BI.PopupView);/**
* 搜索面板
*
* Created by GUY on 2015/9/28.
@ -15265,7 +15296,7 @@ BI.SearcherView = BI.inherit(BI.Pane, {
});
BI.SearcherView.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.searcher_view", BI.SearcherView);/**
BI.shortcut("bi.searcher_view", BI.SearcherView);/**
* 分页控件
*
* Created by GUY on 2015/8/31.
@ -15552,7 +15583,7 @@ BI.Pager = BI.inherit(BI.Widget, {
});
BI.Pager.EVENT_CHANGE = "EVENT_CHANGE";
BI.Pager.EVENT_AFTER_POPULATE = "EVENT_AFTER_POPULATE";
$.shortcut("bi.pager", BI.Pager);/**
BI.shortcut("bi.pager", BI.Pager);/**
* 超链接
*
* Created by GUY on 2015/9/9.
@ -15583,7 +15614,7 @@ BI.A = BI.inherit(BI.Text, {
}
});
$.shortcut("bi.a", BI.A);/**
BI.shortcut("bi.a", BI.A);/**
* guy
* 加载条
* @type {*|void|Object}
@ -15666,7 +15697,7 @@ BI.LoadingBar = BI.inherit(BI.Single, {
}
});
$.shortcut("bi.loading_bar", BI.LoadingBar);/**
BI.shortcut("bi.loading_bar", BI.LoadingBar);/**
* @class BI.IconButton
* @extends BI.BasicButton
* 图标的button
@ -15716,7 +15747,7 @@ BI.IconButton = BI.inherit(BI.BasicButton, {
}
});
BI.IconButton.EVENT_CHANGE = "IconButton.EVENT_CHANGE";
$.shortcut("bi.icon_button", BI.IconButton);/**
BI.shortcut("bi.icon_button", BI.IconButton);/**
* 图片的button
*
* Created by GUY on 2016/1/27.
@ -15802,7 +15833,7 @@ BI.ImageButton = BI.inherit(BI.BasicButton, {
}
});
BI.ImageButton.EVENT_CHANGE = "ImageButton.EVENT_CHANGE";
$.shortcut("bi.image_button", BI.ImageButton);(function ($) {
BI.shortcut("bi.image_button", BI.ImageButton);(function ($) {
/**
* 文字类型的按钮
@ -15939,7 +15970,7 @@ $.shortcut("bi.image_button", BI.ImageButton);(function ($) {
BI.Button.superclass.destroy.apply(this, arguments);
}
});
$.shortcut('bi.button', BI.Button);
BI.shortcut('bi.button', BI.Button);
BI.Button.EVENT_CHANGE = "EVENT_CHANGE";
})(jQuery);/**
* guy
@ -16030,7 +16061,7 @@ BI.TextButton = BI.inherit(BI.BasicButton, {
}
});
BI.TextButton.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.text_button", BI.TextButton);/**
BI.shortcut("bi.text_button", BI.TextButton);/**
* 带有一个占位
*
* Created by GUY on 2015/9/11.
@ -16148,7 +16179,7 @@ BI.BlankIconIconTextItem = BI.inherit(BI.BasicButton, {
}
});
BI.BlankIconIconTextItem.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.blank_icon_icon_text_item", BI.BlankIconIconTextItem);/**
BI.shortcut("bi.blank_icon_icon_text_item", BI.BlankIconIconTextItem);/**
* guy
* 一个占位符和两个icon和一行数 组成的一行listitem
*
@ -16284,7 +16315,7 @@ BI.BlankIconTextIconItem = BI.inherit(BI.BasicButton, {
}
});
BI.BlankIconTextIconItem.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.blank_icon_text_icon_item", BI.BlankIconTextIconItem);/**
BI.shortcut("bi.blank_icon_text_icon_item", BI.BlankIconTextIconItem);/**
* 带有一个占位
*
* Created by GUY on 2015/9/11.
@ -16394,7 +16425,7 @@ BI.BlankIconTextItem = BI.inherit(BI.BasicButton, {
}
});
BI.BlankIconTextItem.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.blank_icon_text_item", BI.BlankIconTextItem);/**
BI.shortcut("bi.blank_icon_text_item", BI.BlankIconTextItem);/**
* guy
* 两个icon和一行数 组成的一行listitem
*
@ -16527,7 +16558,7 @@ BI.IconTextIconItem = BI.inherit(BI.BasicButton, {
}
});
BI.IconTextIconItem.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.icon_text_icon_item", BI.IconTextIconItem);/**
BI.shortcut("bi.icon_text_icon_item", BI.IconTextIconItem);/**
* guy
*
* Created by GUY on 2015/9/9.
@ -16632,7 +16663,7 @@ BI.IconTextItem = BI.inherit(BI.BasicButton, {
}
});
BI.IconTextItem.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.icon_text_item", BI.IconTextItem);/**
BI.shortcut("bi.icon_text_item", BI.IconTextItem);/**
*
* 图标的button
*
@ -16738,7 +16769,7 @@ BI.TextIconItem = BI.inherit(BI.BasicButton, {
}
});
BI.TextIconItem.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.text_icon_item", BI.TextIconItem);/**
BI.shortcut("bi.text_icon_item", BI.TextIconItem);/**
* guy
* 一个button和一行数 组成的一行listitem
*
@ -16823,7 +16854,7 @@ BI.TextItem = BI.inherit(BI.BasicButton, {
}
});
BI.TextItem.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.text_item", BI.TextItem);/**
BI.shortcut("bi.text_item", BI.TextItem);/**
* guy
* Created by GUY on 2015/9/9.
* @class BI.IconTextIconNode
@ -16946,7 +16977,7 @@ BI.IconTextIconNode = BI.inherit(BI.NodeButton, {
}
});
BI.IconTextIconNode.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.icon_text_icon_node", BI.IconTextIconNode);/**
BI.shortcut("bi.icon_text_icon_node", BI.IconTextIconNode);/**
* guy
* Created by GUY on 2015/9/9.
* @class BI.IconTextNode
@ -17042,7 +17073,7 @@ BI.IconTextNode = BI.inherit(BI.NodeButton, {
}
});
BI.IconTextNode.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.icon_text_node", BI.IconTextNode);/**
BI.shortcut("bi.icon_text_node", BI.IconTextNode);/**
* Created by GUY on 2015/9/9.
* @class BI.TextIconNode
* @extends BI.NodeButton
@ -17137,7 +17168,7 @@ BI.TextIconNode = BI.inherit(BI.NodeButton, {
}
});
BI.TextIconNode.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.text_icon_node", BI.TextIconNode);/**
BI.shortcut("bi.text_icon_node", BI.TextIconNode);/**
* guy
*
* Created by GUY on 2015/9/9.
@ -17213,7 +17244,7 @@ BI.TextNode = BI.inherit(BI.NodeButton, {
}
});
BI.TextNode.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.text_node", BI.TextNode);/**
BI.shortcut("bi.text_node", BI.TextNode);/**
*
* Created by GUY on 2016/1/15.
* @class BI.CodeEditor
@ -17358,7 +17389,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
BI.CodeEditor.EVENT_CHANGE = "EVENT_CHANGE";
BI.CodeEditor.EVENT_BLUR = "EVENT_BLUR";
BI.CodeEditor.EVENT_FOCUS = "EVENT_FOCUS";
$.shortcut("bi.code_editor", BI.CodeEditor);/**
BI.shortcut("bi.code_editor", BI.CodeEditor);/**
* Created by GUY on 2015/4/15.
* @class BI.Editor
* @extends BI.Single
@ -17689,7 +17720,7 @@ BI.Editor.EVENT_RESTRICT = "EVENT_RESTRICT";
BI.Editor.EVENT_REMOVE = "EVENT_REMOVE";
BI.Editor.EVENT_EMPTY = "EVENT_EMPTY";
$.shortcut("bi.editor", BI.Editor);/**
BI.shortcut("bi.editor", BI.Editor);/**
* 多文件
*
* Created by GUY on 2016/4/13.
@ -17782,7 +17813,7 @@ BI.MultifileEditor.EVENT_UPLOADSTART = "MultifileEditor.EVENT_UPLOADSTART";
BI.MultifileEditor.EVENT_ERROR = "MultifileEditor.EVENT_ERROR";
BI.MultifileEditor.EVENT_PROGRESS = "MultifileEditor.EVENT_PROGRESS";
BI.MultifileEditor.EVENT_UPLOADED = "MultifileEditor.EVENT_UPLOADED";
$.shortcut("bi.multifile_editor", BI.MultifileEditor);/**
BI.shortcut("bi.multifile_editor", BI.MultifileEditor);/**
*
* Created by GUY on 2016/1/18.
* @class BI.TextAreaEditor
@ -17947,7 +17978,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
BI.TextAreaEditor.EVENT_CHANGE = "EVENT_CHANGE";
BI.TextAreaEditor.EVENT_BLUR = "EVENT_BLUR";
BI.TextAreaEditor.EVENT_FOCUS = "EVENT_FOCUS";
$.shortcut("bi.textarea_editor", BI.TextAreaEditor);/**
BI.shortcut("bi.textarea_editor", BI.TextAreaEditor);/**
* guy 图标
* @class BI.Icon
* @extends BI.Single
@ -17964,7 +17995,7 @@ BI.Icon = BI.inherit(BI.Single, {
BI.Icon.superclass._init.apply(this, arguments);
}
});
$.shortcut("bi.icon", BI.Icon);/**
BI.shortcut("bi.icon", BI.Icon);/**
* @class BI.Iframe
* @extends BI.Single
* @abstract
@ -18005,7 +18036,7 @@ BI.Iframe = BI.inherit(BI.Single, {
}
});
$.shortcut("bi.iframe", BI.Iframe);/**
BI.shortcut("bi.iframe", BI.Iframe);/**
* ͼƬ
*
* Created by GUY on 2016/1/26.
@ -18040,7 +18071,7 @@ BI.Img = BI.inherit(BI.Single, {
}
});
$.shortcut("bi.img", BI.Img);
BI.shortcut("bi.img", BI.Img);
/**
* guy
* @extends BI.Single
@ -18073,7 +18104,7 @@ BI.Checkbox = BI.inherit(BI.IconButton, {
});
BI.Checkbox.EVENT_CHANGE = "Checkbox.EVENT_CHANGE";
$.shortcut("bi.checkbox", BI.Checkbox);/**
BI.shortcut("bi.checkbox", BI.Checkbox);/**
* 文件
*
* Created by GUY on 2016/1/27.
@ -18228,7 +18259,7 @@ $.shortcut("bi.checkbox", BI.Checkbox);/**
},
false
);
xhr.open("post", handler.url + '&filename=' + BI.cjkEncode(handler.file.fileName), true);
xhr.open("post", handler.url + '&filename=' + window.encodeURIComponent(handler.file.fileName), true);
if (!xhr.upload) {
var rpe = {loaded: 0, total: handler.file.fileSize || handler.file.size, simulation: true};
rpe.interval = setInterval(function () {
@ -18677,7 +18708,7 @@ $.shortcut("bi.checkbox", BI.Checkbox);/**
},
setEnable: function (enable) {
BI.MultiFile.superclass.setEnable.apply(this, arguments);
BI.File.superclass.setEnable.apply(this, arguments);
if (enable === true) {
this.element.attr("disabled", "disabled");
} else {
@ -18690,7 +18721,7 @@ $.shortcut("bi.checkbox", BI.Checkbox);/**
BI.File.EVENT_ERROR = "EVENT_ERROR";
BI.File.EVENT_PROGRESS = "EVENT_PROGRESS";
BI.File.EVENT_UPLOADED = "EVENT_UPLOADED";
$.shortcut("bi.file", BI.File);
BI.shortcut("bi.file", BI.File);
})();/**
* guy
* @class BI.Input 一个button和一行数 组成的一行listitem
@ -18974,7 +19005,7 @@ BI.Input.EVENT_VALID = "EVENT_VALID";
BI.Input.EVENT_ERROR = "EVENT_ERROR";
BI.Input.EVENT_ENTER = "EVENT_ENTER";
BI.Input.EVENT_RESTRICT = "EVENT_RESTRICT";
$.shortcut("bi.input", BI.Input);/**
BI.shortcut("bi.input", BI.Input);/**
* guy
* @extends BI.Single
* @type {*|void|Object}
@ -19006,7 +19037,7 @@ BI.Radio = BI.inherit(BI.IconButton, {
});
BI.Radio.EVENT_CHANGE = "Radio.EVENT_CHANGE";
$.shortcut("bi.radio", BI.Radio);/**
BI.shortcut("bi.radio", BI.Radio);/**
* Created by GUY on 2015/6/26.
*/
@ -19476,7 +19507,7 @@ BI.Label = BI.inherit(BI.Single, {
}
});
$.shortcut("bi.label", BI.Label);/**
BI.shortcut("bi.label", BI.Label);/**
* guy a元素
* @class BI.Link
* @extends BI.Text
@ -19512,7 +19543,7 @@ BI.Link = BI.inherit(BI.Label, {
}
});
$.shortcut("bi.link", BI.Link);/**
BI.shortcut("bi.link", BI.Link);/**
* guy
* 气泡提示
* @class BI.Bubble
@ -19618,7 +19649,7 @@ BI.Bubble = BI.inherit(BI.Tip, {
}
});
$.shortcut("bi.bubble", BI.Bubble);/**
BI.shortcut("bi.bubble", BI.Bubble);/**
* toast提示
*
* Created by GUY on 2015/9/7.
@ -19671,7 +19702,7 @@ BI.Toast = BI.inherit(BI.Tip, {
}
});
$.shortcut("bi.toast", BI.Toast);/**
BI.shortcut("bi.toast", BI.Toast);/**
* toast提示
*
* Created by GUY on 2015/9/7.
@ -19753,7 +19784,7 @@ BI.Tooltip = BI.inherit(BI.Tip, {
}
});
$.shortcut("bi.tooltip", BI.Tooltip);/**
BI.shortcut("bi.tooltip", BI.Tooltip);/**
* 下拉
* @class BI.Trigger
* @extends BI.Single
@ -28153,7 +28184,7 @@ BI.Svg = BI.inherit(BI.Widget, {
return this.paper.clear.apply(this.paper, arguments);
}
});
$.shortcut("bi.svg", BI.Svg);/**
BI.shortcut("bi.svg", BI.Svg);/**
*
* 表格
*
@ -28185,7 +28216,7 @@ BI.TableCell = BI.inherit(BI.Widget, {
}
});
$.shortcut("bi.table_cell", BI.TableCell);/**
BI.shortcut("bi.table_cell", BI.TableCell);/**
*
* 表格单元格
*
@ -28241,7 +28272,7 @@ BI.CollectionTableCell = BI.inherit(BI.Widget, {
}
});
$.shortcut("bi.collection_table_cell", BI.CollectionTableCell);/**
BI.shortcut("bi.collection_table_cell", BI.CollectionTableCell);/**
* CollectionTable
*
* Created by GUY on 2016/1/12.
@ -28787,7 +28818,7 @@ BI.CollectionTable = BI.inherit(BI.Widget, {
this._restore();
}
});
$.shortcut('bi.collection_table', BI.CollectionTable);/**
BI.shortcut('bi.collection_table', BI.CollectionTable);/**
* QuickCollectionTable
*
* Created by GUY on 2016/1/12.
@ -28926,7 +28957,7 @@ BI.QuickCollectionTable = BI.inherit(BI.CollectionTable, {
this.bottomRightCollection.populate(rightItems);
}
});
$.shortcut('bi.quick_collection_table', BI.QuickCollectionTable);/**
BI.shortcut('bi.quick_collection_table', BI.QuickCollectionTable);/**
*
* 表格单元格
*
@ -28984,7 +29015,7 @@ BI.GridTableCell = BI.inherit(BI.Widget, {
}
});
$.shortcut("bi.grid_table_cell", BI.GridTableCell);/**
BI.shortcut("bi.grid_table_cell", BI.GridTableCell);/**
* GridTable
*
* Created by GUY on 2016/1/12.
@ -29454,7 +29485,7 @@ BI.GridTable = BI.inherit(BI.Widget, {
this._restore();
}
});
$.shortcut('bi.grid_table', BI.GridTable);/**
BI.shortcut('bi.grid_table', BI.GridTable);/**
* QuickGridTable
*
* Created by GUY on 2016/1/12.
@ -29618,7 +29649,7 @@ BI.QuickGridTable = BI.inherit(BI.GridTable, {
this.bottomRightGrid.populate(rightItems);
}
});
$.shortcut('bi.quick_grid_table', BI.QuickGridTable);/**
BI.shortcut('bi.quick_grid_table', BI.QuickGridTable);/**
*
* 表格滚动条
*
@ -29944,7 +29975,7 @@ BI.GridTableScrollbar = BI.inherit(BI.Widget, {
});
BI.GridTableScrollbar.SIZE = 10;
BI.GridTableScrollbar.EVENT_SCROLL = "EVENT_SCROLL";
$.shortcut("bi.grid_table_scrollbar", BI.GridTableScrollbar);
BI.shortcut("bi.grid_table_scrollbar", BI.GridTableScrollbar);
BI.GridTableHorizontalScrollbar = BI.inherit(BI.Widget, {
@ -30024,7 +30055,7 @@ BI.GridTableHorizontalScrollbar = BI.inherit(BI.Widget, {
}
});
BI.GridTableHorizontalScrollbar.EVENT_SCROLL = "EVENT_SCROLL";
$.shortcut("bi.grid_table_horizontal_scrollbar", BI.GridTableHorizontalScrollbar);/**
BI.shortcut("bi.grid_table_horizontal_scrollbar", BI.GridTableHorizontalScrollbar);/**
*
* 表格
*
@ -30053,7 +30084,7 @@ BI.TableHeaderCell = BI.inherit(BI.Widget, {
}
});
$.shortcut("bi.table_header_cell", BI.TableHeaderCell);/**
BI.shortcut("bi.table_header_cell", BI.TableHeaderCell);/**
*
* 表格
*
@ -30414,11 +30445,9 @@ BI.Table = BI.inherit(BI.Widget, {
self.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT);
}
});
BI.Resizers.add(this.getName(), function (e) {
if (BI.isWindow(e.target) && self.element.is(":visible")) {
BI.ResizeDetector.addResizeListener(this, function () {
self._resize();
self.fireEvent(BI.Table.EVENT_TABLE_RESIZE);
}
});
},
@ -30800,6 +30829,7 @@ BI.Table = BI.inherit(BI.Widget, {
.addClass(c === rows.length - 1 ? "last-col" : "");
var w = BI.createWidget(map[r][c], {
type: "bi.table_cell",
root: true,
textAlign: "left",
width: BI.isNumeric(width) ? width : "",
height: BI.isNumeric(height) ? height : "",
@ -30879,6 +30909,7 @@ BI.Table = BI.inherit(BI.Widget, {
return this.footer;
},
_createBody: function () {
var self = this, o = this.options;
this.body = this._body();
@ -31991,7 +32022,7 @@ BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE = "EVENT_TABLE_AFTER_COLUMN_RESIZE";
BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE = "EVENT_TABLE_BEFORE_REGION_RESIZE";
BI.Table.EVENT_TABLE_REGION_RESIZE = "EVENT_TABLE_REGION_RESIZE";
BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE = "EVENT_TABLE_AFTER_REGION_RESIZE";
$.shortcut("bi.table_view", BI.Table);
BI.shortcut("bi.table_view", BI.Table);
/**
*
* 表格单元格
@ -32087,7 +32118,7 @@ BI.ResizableTableCell = BI.inherit(BI.Widget, {
this.cell.setHeight(o.height);
}
});
$.shortcut("bi.resizable_table_cell", BI.ResizableTableCell);/**
BI.shortcut("bi.resizable_table_cell", BI.ResizableTableCell);/**
*
* 可调整列宽的grid表格
*
@ -32435,7 +32466,7 @@ BI.ResizableTable = BI.inherit(BI.Widget, {
}
});
$.shortcut("bi.resizable_table", BI.ResizableTable);/**
BI.shortcut("bi.resizable_table", BI.ResizableTable);/**
*
* 自定义树
*
@ -32589,7 +32620,7 @@ BI.CustomTree = BI.inherit(BI.Widget, {
});
BI.CustomTree.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.custom_tree", BI.CustomTree);/*
BI.shortcut("bi.custom_tree", BI.CustomTree);/*
* JQuery zTree core v3.5.18
* http://zTree.me/
*

340
bi/case.js

File diff suppressed because it is too large Load Diff

12794
bi/core.css

File diff suppressed because it is too large Load Diff

5158
bi/core.js

File diff suppressed because it is too large Load Diff

1
bi/widget.css

@ -236,6 +236,7 @@
border-bottom: 1px solid #d4dadd;
}
.bi-fine-tuning-number-editor .bottom-button {
border-top: 1px solid #d4dadd;
border-left: 1px solid #d4dadd;
}
/****添加计算宽度的--运算符直接需要space****/

799
bi/widget.js

File diff suppressed because it is too large Load Diff

2
demo.html

@ -10,6 +10,8 @@
href="./dist/base.css"/>
<link rel="stylesheet" type="text/css"
href="./dist/widget.css"/>
<link rel="stylesheet" type="text/css"
href="./dist/resource.css"/>
<link rel="stylesheet" type="text/css"
href="demo/dist/demo.css"/>

2
demo/js/base/button/demo.button.js

@ -72,4 +72,4 @@ Demo.Button = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.button", Demo.Button);
BI.shortcut("demo.button", Demo.Button);

2
demo/js/base/button/demo.icon_button.js

@ -21,4 +21,4 @@ Demo.Button = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.icon_button", Demo.Button);
BI.shortcut("demo.icon_button", Demo.Button);

2
demo/js/base/button/demo.image_button.js

@ -21,4 +21,4 @@ Demo.Button = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.image_button", Demo.Button);
BI.shortcut("demo.image_button", Demo.Button);

2
demo/js/base/button/demo.text_button.js

@ -20,4 +20,4 @@ Demo.Button = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.text_button", Demo.Button);
BI.shortcut("demo.text_button", Demo.Button);

2
demo/js/base/demo.label.js

@ -135,4 +135,4 @@ Demo.Label = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.label", Demo.Label);
BI.shortcut("demo.label", Demo.Label);

2
demo/js/base/demo.message.js

@ -20,4 +20,4 @@ Demo.Message = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.message", Demo.Message);
BI.shortcut("demo.message", Demo.Message);

2
demo/js/base/demo.pager.js

@ -117,4 +117,4 @@ Demo.Func = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.pager", Demo.Func);
BI.shortcut("demo.pager", Demo.Func);

2
demo/js/base/demo.svg.js

@ -29,4 +29,4 @@ Demo.Func = BI.inherit(BI.Widget, {
})
}
});
$.shortcut("demo.svg", Demo.Func);
BI.shortcut("demo.svg", Demo.Func);

2
demo/js/base/editor/demo.code_editor.js

@ -30,4 +30,4 @@ Demo.CodeEditor = BI.inherit(BI.Widget, {
})
}
});
$.shortcut("demo.code_editor", Demo.CodeEditor);
BI.shortcut("demo.code_editor", Demo.CodeEditor);

2
demo/js/base/editor/demo.editor.js

@ -93,4 +93,4 @@ Demo.Editor = BI.inherit(BI.Widget, {
})
}
});
$.shortcut("demo.editor", Demo.Editor);
BI.shortcut("demo.editor", Demo.Editor);

2
demo/js/base/editor/demo.formula_editor.js

@ -18,4 +18,4 @@ Demo.CodeEditor = BI.inherit(BI.Widget, {
})
}
});
$.shortcut("demo.formula_editor", Demo.CodeEditor);
BI.shortcut("demo.formula_editor", Demo.CodeEditor);

2
demo/js/base/editor/demo.multifile_editor.js

@ -23,4 +23,4 @@ Demo.CodeEditor = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.multifile_editor", Demo.CodeEditor);
BI.shortcut("demo.multifile_editor", Demo.CodeEditor);

2
demo/js/base/editor/demo.textarea_editor.js

@ -36,4 +36,4 @@ Demo.CodeEditor = BI.inherit(BI.Widget, {
})
}
});
$.shortcut("demo.textarea_editor", Demo.CodeEditor);
BI.shortcut("demo.textarea_editor", Demo.CodeEditor);

2
demo/js/base/table/demo.collection_table.js

@ -59,4 +59,4 @@ Demo.Func = BI.inherit(BI.Widget, {
})
}
});
$.shortcut("demo.collection_table", Demo.Func);
BI.shortcut("demo.collection_table", Demo.Func);

2
demo/js/base/table/demo.grid_table.js

@ -54,4 +54,4 @@ Demo.Func = BI.inherit(BI.Widget, {
})
}
});
$.shortcut("demo.grid_table", Demo.Func);
BI.shortcut("demo.grid_table", Demo.Func);

2
demo/js/base/table/demo.resizable_table.js

@ -54,4 +54,4 @@ Demo.Func = BI.inherit(BI.Widget, {
})
}
});
$.shortcut("demo.resizable_table", Demo.Func);
BI.shortcut("demo.resizable_table", Demo.Func);

2
demo/js/base/table/demo.table_view.js

@ -364,4 +364,4 @@ Demo.Func = BI.inherit(BI.Widget, {
})
}
});
$.shortcut("demo.table_view", Demo.Func);
BI.shortcut("demo.table_view", Demo.Func);

2
demo/js/base/tip/demo.bubble.js

@ -55,4 +55,4 @@ Demo.Bubble = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.bubble", Demo.Bubble);
BI.shortcut("demo.bubble", Demo.Bubble);

2
demo/js/base/tip/demo.title.js

@ -36,4 +36,4 @@ Demo.Title = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.title", Demo.Title);
BI.shortcut("demo.title", Demo.Title);

2
demo/js/base/tip/demo.toast.js

@ -52,4 +52,4 @@ Demo.Toast = BI.inherit(BI.Widget, {
})
}
});
$.shortcut("demo.toast", Demo.Toast);
BI.shortcut("demo.toast", Demo.Toast);

2
demo/js/base/tree/demo.part_tree.js

@ -6,4 +6,4 @@ Demo.Func = BI.inherit(BI.Widget, {
render: function () {
}
});
$.shortcut("demo.part_tree", Demo.Func);
BI.shortcut("demo.part_tree", Demo.Func);

2
demo/js/base/tree/demo.sync_tree.js

@ -6,4 +6,4 @@ Demo.Func = BI.inherit(BI.Widget, {
render: function () {
}
});
$.shortcut("demo.sync_tree", Demo.Func);
BI.shortcut("demo.sync_tree", Demo.Func);

2
demo/js/base/tree/demo.tree_view.js

@ -49,4 +49,4 @@ Demo.Func = BI.inherit(BI.Widget, {
})
}
});
$.shortcut("demo.tree_view", Demo.Func);
BI.shortcut("demo.tree_view", Demo.Func);

2
demo/js/case/combo/demo.bubble_combo.js

@ -93,4 +93,4 @@ Demo.Func = BI.inherit(BI.Widget, {
})
}
});
$.shortcut("demo.bubble_combo", Demo.Func);
BI.shortcut("demo.bubble_combo", Demo.Func);

2
demo/js/case/demo.calendar.js

@ -81,4 +81,4 @@ Demo.Func = BI.inherit(BI.Widget, {
tip.setText(this._stringfyTimeObject(this.selectedTime));
}
});
$.shortcut("demo.calendar", Demo.Func);
BI.shortcut("demo.calendar", Demo.Func);

2
demo/js/case/demo.color_chooser.js

@ -18,4 +18,4 @@ Demo.Func = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.color_chooser", Demo.Func);
BI.shortcut("demo.color_chooser", Demo.Func);

2
demo/js/case/demo.complex_canvas.js

@ -32,4 +32,4 @@ Demo.Func = BI.inherit(BI.Widget, {
})
}
});
$.shortcut("demo.complex_canvas", Demo.Func);
BI.shortcut("demo.complex_canvas", Demo.Func);

2
demo/js/case/demo.zclip.js

@ -39,4 +39,4 @@ Demo.Func = BI.inherit(BI.Widget, {
})
}
});
$.shortcut("demo.zclip", Demo.Func);
BI.shortcut("demo.zclip", Demo.Func);

2
demo/js/case/tree/demo.branch_relation.js

@ -146,4 +146,4 @@ Demo.Func = BI.inherit(BI.Widget, {
})
}
});
$.shortcut("demo.branch_relation", Demo.Func);
BI.shortcut("demo.branch_relation", Demo.Func);

2
demo/js/case/tree/demo.branch_tree.js

@ -230,4 +230,4 @@ Demo.Func = BI.inherit(BI.Widget, {
})
}
});
$.shortcut("demo.branch_tree", Demo.Func);
BI.shortcut("demo.branch_tree", Demo.Func);

2
demo/js/case/tree/demo.display_tree.js

@ -40,4 +40,4 @@ Demo.Func = BI.inherit(BI.Widget, {
}]);
}
});
$.shortcut("demo.display_tree", Demo.Func);
BI.shortcut("demo.display_tree", Demo.Func);

2
demo/js/case/tree/demo.handstand_branch_tree.js

@ -100,4 +100,4 @@ Demo.Func = BI.inherit(BI.Widget, {
})
}
});
$.shortcut("demo.handstand_branch_tree", Demo.Func);
BI.shortcut("demo.handstand_branch_tree", Demo.Func);

2
demo/js/case/tree/demo.level_tree.js

@ -84,4 +84,4 @@ Demo.Func = BI.inherit(BI.Widget, {
})
}
});
$.shortcut("demo.level_tree", Demo.Func);
BI.shortcut("demo.level_tree", Demo.Func);

2
demo/js/case/tree/demo.simple_tree.js

@ -83,4 +83,4 @@ Demo.Func = BI.inherit(BI.Widget, {
})
}
});
$.shortcut("demo.simple_tree", Demo.Func);
BI.shortcut("demo.simple_tree", Demo.Func);

2
demo/js/center.js

@ -22,4 +22,4 @@ Demo.Center = BI.inherit(BI.Widget, {
this.tab.setSelect(v);
}
});
$.shortcut("demo.center", Demo.Center);
BI.shortcut("demo.center", Demo.Center);

2
demo/js/component/demo.treevaluechooser.js

@ -37,4 +37,4 @@ Demo.TreeValueChooser = BI.inherit(BI.Widget, {
};
}
});
$.shortcut("demo.tree_value_chooser", Demo.TreeValueChooser);
BI.shortcut("demo.tree_value_chooser", Demo.TreeValueChooser);

2
demo/js/component/demo.valuechooser.js

@ -17,4 +17,4 @@ Demo.ValueChooserCombo = BI.inherit(BI.Widget, {
};
}
});
$.shortcut("demo.value_chooser_combo", Demo.ValueChooserCombo);
BI.shortcut("demo.value_chooser_combo", Demo.ValueChooserCombo);

12
demo/js/config/widget.js

@ -1,6 +1,18 @@
Demo.WIDGET_CONFIG = [{
id: 4,
text: "详细控件"
}, {
id: 401,
pId: 4,
text: "table"
}, {
pId: 401,
text: "bi.preview_table",
value: "demo.preview_table"
}, {
pId: 401,
text: "bi.responsive_table",
value: "demo.responsive_table"
}, {
pId: 4,
text: "bi.multi_select_combo",

2
demo/js/core/abstract/combination/demo.combo.js

@ -8,4 +8,4 @@ Demo.Func = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.combo", Demo.Func);
BI.shortcut("demo.combo", Demo.Func);

46
demo/js/core/abstract/demo.button_group.js

@ -3,22 +3,60 @@ Demo.Func = BI.inherit(BI.Widget, {
baseCls: "demo-func"
},
render: function () {
var ref;
return {
type: "bi.vertical",
items: [{
type: "bi.button_group",
ref: function (_ref) {
ref = _ref;
},
chooseType: BI.ButtonGroup.CHOOSE_TYPE_NONE,
layouts: [{
type: "bi.vertical"
}, {
type: "bi.center_adapt",
type: "bi.vertical",
items: [{
type: "bi.vtape",
height: 200,
}]
}],
items: [{
el: {
type: "bi.label",
text: "button_group是一类具有相同属性或相似属性的抽象, 本案例实现的是布局的嵌套(vertical布局下内嵌center_adapt布局)"
},
height: 150,
}, {
el: {
type: "bi.button",
text: "1"
}
}]
}, {
type: "bi.button",
text: "populate",
handler: function () {
ref.populate([{
el: {
type: "bi.label",
text: "1"
},
height: 50
}, {
el: {
type: "bi.button",
text: "2"
},
height: 50
}, {
el: {
type: "bi.label",
text: "3"
}
}])
}
}]
}
}
});
$.shortcut("demo.button_group", Demo.Func);
BI.shortcut("demo.button_group", Demo.Func);

2
demo/js/core/abstract/demo.button_tree.js

@ -23,4 +23,4 @@ Demo.Func = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.button_tree", Demo.Func);
BI.shortcut("demo.button_tree", Demo.Func);

2
demo/js/core/abstract/demo.collection_view.js

@ -36,4 +36,4 @@ Demo.Func = BI.inherit(BI.Widget, {
})
}
});
$.shortcut("demo.collection_view", Demo.Func);
BI.shortcut("demo.collection_view", Demo.Func);

2
demo/js/core/abstract/demo.grid_view.js

@ -47,4 +47,4 @@ Demo.Func = BI.inherit(BI.Widget, {
})
}
});
$.shortcut("demo.grid_view", Demo.Func);
BI.shortcut("demo.grid_view", Demo.Func);

5
demo/js/core/abstract/demo.virtual_group.js

@ -43,7 +43,7 @@ Demo.Func = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.virtual_group", Demo.Func);
BI.shortcut("demo.virtual_group", Demo.Func);
Demo.Item = BI.inherit(BI.Widget, {
props: {
@ -66,6 +66,7 @@ Demo.Item = BI.inherit(BI.Widget, {
update: function (item) {
this.label.setText(item.value);
console.log("更新了一项");
return true;
},
created: function () {
@ -76,4 +77,4 @@ Demo.Item = BI.inherit(BI.Widget, {
console.log("删除了一项");
}
});
$.shortcut("demo.virtual_group_item", Demo.Item);
BI.shortcut("demo.virtual_group_item", Demo.Item);

2
demo/js/core/abstract/mvc.custom_tree.js

@ -242,4 +242,4 @@ Demo.Func = BI.inherit(BI.Widget, {
})
}
});
$.shortcut("demo.custom_tree", Demo.Func);
BI.shortcut("demo.custom_tree", Demo.Func);

2
demo/js/core/layout/demo.absolute.js

@ -16,4 +16,4 @@ Demo.AbsoluteLayout = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.absolute", Demo.AbsoluteLayout);
BI.shortcut("demo.absolute", Demo.AbsoluteLayout);

2
demo/js/core/layout/demo.border.js

@ -94,4 +94,4 @@ Demo.BorderLayout = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.border", Demo.BorderLayout);
BI.shortcut("demo.border", Demo.BorderLayout);

2
demo/js/core/layout/demo.center.js

@ -32,4 +32,4 @@ Demo.CenterLayout = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.center_layout", Demo.CenterLayout);
BI.shortcut("demo.center_layout", Demo.CenterLayout);

2
demo/js/core/layout/demo.center_adapt.js

@ -78,4 +78,4 @@ Demo.CenterAdapt = BI.inherit(BI.Widget, {
})
},
});
$.shortcut("demo.center_adapt", Demo.CenterAdapt);
BI.shortcut("demo.center_adapt", Demo.CenterAdapt);

2
demo/js/core/layout/demo.float_center.js

@ -24,4 +24,4 @@ Demo.FloatCenterLayout = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.float_center", Demo.FloatCenterLayout);
BI.shortcut("demo.float_center", Demo.FloatCenterLayout);

2
demo/js/core/layout/demo.flow.js

@ -82,4 +82,4 @@ Demo.FlowLayout = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.flow", Demo.FlowLayout);
BI.shortcut("demo.flow", Demo.FlowLayout);

2
demo/js/core/layout/demo.grid.js

@ -134,4 +134,4 @@ Demo.GridLayout = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.grid", Demo.GridLayout);
BI.shortcut("demo.grid", Demo.GridLayout);

2
demo/js/core/layout/demo.horizontal.js

@ -47,4 +47,4 @@ Demo.Horizontal = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.horizontal", Demo.Horizontal);
BI.shortcut("demo.horizontal", Demo.Horizontal);

2
demo/js/core/layout/demo.horizontal_adapt.js

@ -39,4 +39,4 @@ Demo.HorizontalAdapt = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.horizontal_adapt", Demo.HorizontalAdapt);
BI.shortcut("demo.horizontal_adapt", Demo.HorizontalAdapt);

2
demo/js/core/layout/demo.horizontal_auto.js

@ -39,4 +39,4 @@ Demo.HorizontalAuto = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.horizontal_auto", Demo.HorizontalAuto);
BI.shortcut("demo.horizontal_auto", Demo.HorizontalAuto);

2
demo/js/core/layout/demo.horizontal_float.js

@ -32,4 +32,4 @@ Demo.HorizontalFloat = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.horizontal_float", Demo.HorizontalFloat);
BI.shortcut("demo.horizontal_float", Demo.HorizontalFloat);

2
demo/js/core/layout/demo.htape.js

@ -35,4 +35,4 @@ Demo.HtapeLayout = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.htape", Demo.HtapeLayout);
BI.shortcut("demo.htape", Demo.HtapeLayout);

2
demo/js/core/layout/demo.inline.js

@ -44,4 +44,4 @@ Demo.InlineLayout = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.inline", Demo.InlineLayout);
BI.shortcut("demo.inline", Demo.InlineLayout);

2
demo/js/core/layout/demo.left_right_vertical_adapt.js

@ -41,4 +41,4 @@ Demo.LeftRightVerticalAdaptLayout = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.left_right_vertical_adapt", Demo.LeftRightVerticalAdaptLayout);
BI.shortcut("demo.left_right_vertical_adapt", Demo.LeftRightVerticalAdaptLayout);

2
demo/js/core/layout/demo.table.js

@ -159,4 +159,4 @@ Demo.TableLayout = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.table_layout", Demo.TableLayout);
BI.shortcut("demo.table_layout", Demo.TableLayout);

2
demo/js/core/layout/demo.td.js

@ -56,4 +56,4 @@ Demo.TdLayout = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.td", Demo.TdLayout);
BI.shortcut("demo.td", Demo.TdLayout);

2
demo/js/core/layout/demo.vertical.js

@ -22,4 +22,4 @@ Demo.VerticalLayout = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.vertical", Demo.VerticalLayout);
BI.shortcut("demo.vertical", Demo.VerticalLayout);

2
demo/js/core/layout/demo.vertical_adapt.js

@ -39,4 +39,4 @@ Demo.VerticalAdaptLayout = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.vertical_adapt", Demo.VerticalAdaptLayout);
BI.shortcut("demo.vertical_adapt", Demo.VerticalAdaptLayout);

2
demo/js/core/layout/demo.vtape.js

@ -35,4 +35,4 @@ Demo.VtapeLayout = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.vtape", Demo.VtapeLayout);
BI.shortcut("demo.vtape", Demo.VtapeLayout);

2
demo/js/face.js

@ -25,4 +25,4 @@ Demo.Face = BI.inherit(BI.Widget, {
circle.animate({fill: "#223fa3", stroke: "#000", "stroke-width": 80, "stroke-opacity": 0.5}, 2000);
}
});
$.shortcut("demo.face", Demo.Face);
BI.shortcut("demo.face", Demo.Face);

2
demo/js/main.js

@ -43,4 +43,4 @@ Demo.Main = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.main", Demo.Main);
BI.shortcut("demo.main", Demo.Main);

2
demo/js/north.js

@ -29,4 +29,4 @@ Demo.North = BI.inherit(BI.Widget, {
}
});
Demo.North.EVENT_VALUE_CHANGE = "EVENT_VALUE_CHANGE";
$.shortcut("demo.north", Demo.North);
BI.shortcut("demo.north", Demo.North);

2
demo/js/west.js

@ -20,4 +20,4 @@ Demo.West = BI.inherit(BI.Widget, {
}
});
Demo.West.EVENT_VALUE_CHANGE = "EVENT_VALUE_CHANGE";
$.shortcut("demo.west", Demo.West);
BI.shortcut("demo.west", Demo.West);

2
demo/js/widget/demo.multiselectcombo.js

@ -80,4 +80,4 @@ Demo.MultiSelectCombo = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.multi_select_combo", Demo.MultiSelectCombo);
BI.shortcut("demo.multi_select_combo", Demo.MultiSelectCombo);

2
demo/js/widget/demo.pathchooser.js

@ -174,4 +174,4 @@ Demo.PathChooser = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.path_chooser", Demo.PathChooser);
BI.shortcut("demo.path_chooser", Demo.PathChooser);

2
demo/js/widget/demo.relationview.js

@ -62,4 +62,4 @@ Demo.RelationView = BI.inherit(BI.Widget, {
}
}
});
$.shortcut("demo.relation_view", Demo.RelationView);
BI.shortcut("demo.relation_view", Demo.RelationView);

233
demo/js/widget/table/demo.preview_table.js

@ -0,0 +1,233 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
var items = [[{
text: "第一行第一列"
}, {
text: "第一行第二列"
}, {
text: "第一行第三列"
}], [{
text: "第二行第一列"
}, {
text: "第二行第二列"
}, {
text: "第二行第三列"
}], [{
text: "第二行第一列"
}, {
text: "第三行第二列"
}, {
text: "第三行第三列"
}], [{
text: "第二行第一列"
}, {
text: "第四行第二列"
}, {
text: "第四行第三列"
}], [{
text: "第五行第一列"
}, {
text: "第五行第二列"
}, {
text: "第五行第三列"
}], [{
text: "第六行第一列"
}, {
text: "第六行第二列"
}, {
text: "第六行第三列"
}], [{
text: "第七行第一列"
}, {
text: "第七行第二列"
}, {
text: "第七行第三列"
}], [{
text: "第八行第一列"
}, {
text: "第八行第二列"
}, {
text: "第八行第三列"
}], [{
text: "第九行第一列"
}, {
text: "第九行第二列"
}, {
text: "第九行第三列"
}], [{
text: "第十行第一列"
}, {
text: "第十行第二列"
}, {
text: "第十行第三列"
}], [{
text: "第十一行第一列"
}, {
text: "第十一行第二列"
}, {
text: "第十一行第三列"
}], [{
text: "第十二行第一列"
}, {
text: "第十二行第二列"
}, {
text: "第十二行第三列"
}], [{
text: "第十三行第一列"
}, {
text: "第十三行第二列"
}, {
text: "第十三行第三列"
}], [{
text: "第十四行第一列"
}, {
text: "第十四行第二列"
}, {
text: "第十四行第三列"
}], [{
text: "第十五行第一列"
}, {
text: "第十五行第二列"
}, {
text: "第十五行第三列"
}], [{
text: "第十六行第一列"
}, {
text: "第十六行第二列"
}, {
text: "第十六行第三列"
}], [{
text: "第十七行第一列"
}, {
text: "第十七行第二列"
}, {
text: "第十七行第三列"
}], [{
text: "第十八行第一列"
}, {
text: "第十八行第二列"
}, {
text: "第十八行第三列"
}]];
var header = [[{
text: "表头1"
}, {
text: "表头2"
}, {
text: "表头3"
}]];
var table1 = BI.createWidget({
type: "bi.preview_table",
columnSize: ["", "", ""],
header: header,
items: items
});
var table2 = BI.createWidget({
type: "bi.preview_table",
header: header,
columnSize: [100, "", 50],
items: items
});
var table3 = BI.createWidget({
type: "bi.preview_table",
header: header,
columnSize: [0.2, 0.4, 0.4],
headerRowSize: 30,
items: items
});
var table4 = BI.createWidget({
type: "bi.preview_table",
header: header,
isNeedFreeze: true,
freezeCols: [0, 1],
columnSize: [0.2, "", 0.4],
items: items
});
var table5 = BI.createWidget({
type: "bi.preview_table",
header: header,
isNeedFreeze: true,
freezeCols: [0, 1],
columnSize: [200, 100, ""],
items: items
});
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.grid",
columns: 3,
rows: 2,
items: [[{
el: {
type: "bi.absolute",
items: [{
el: table1,
left: 5,
right: 5,
top: 5,
bottom: 5
}]
}
}, {
el: {
type: "bi.absolute",
items: [{
el: table2,
left: 5,
right: 5,
top: 5,
bottom: 5
}]
}
}, {
el: {
type: "bi.absolute",
items: [{
el: table3,
left: 5,
right: 5,
top: 5,
bottom: 5
}]
}
}], [{
el: {
type: "bi.absolute",
items: [{
el: table4,
left: 5,
right: 5,
top: 5,
bottom: 5
}]
}
}, {
el: {
type: "bi.absolute",
items: [{
el: table5,
left: 5,
right: 5,
top: 5,
bottom: 5
}]
}
}]]
},
left: 10,
right: 10,
top: 10,
bottom: 10
}]
})
}
});
BI.shortcut("demo.preview_table", Demo.Func);

158
demo/js/widget/table/demo.responsive_table.js

@ -0,0 +1,158 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
var items = [[{
text: "第一行第一列"
}, {
text: "第一行第一列"
}, {
text: "第一行第一列"
}], [{
text: "第一行第一列"
}, {
text: "第一行第一列"
}, {
text: "第一行第一列"
}], [{
text: "第三行第一列"
}, {
text: "第三行第二列"
}, {
text: "第三行第三列"
}], [{
text: "第四行第一列"
}, {
text: "第四行第二列"
}, {
text: "第四行第三列"
}], [{
text: "第五行第一列"
}, {
text: "第五行第二列"
}, {
text: "第五行第三列"
}], [{
text: "第六行第一列"
}, {
text: "第六行第二列"
}, {
text: "第六行第三列"
}], [{
text: "第七行第一列"
}, {
text: "第七行第二列"
}, {
text: "第七行第三列"
}], [{
text: "第八行第一列"
}, {
text: "第八行第二列"
}, {
text: "第八行第三列"
}], [{
text: "第九行第一列"
}, {
text: "第九行第二列"
}, {
text: "第九行第三列"
}], [{
text: "第十行第一列"
}, {
text: "第十行第二列"
}, {
text: "第十行第三列"
}], [{
text: "第十一行第一列"
}, {
text: "第十一行第二列"
}, {
text: "第十一行第三列"
}], [{
text: "第十二行第一列"
}, {
text: "第十二行第二列"
}, {
text: "第十二行第三列"
}], [{
text: "第十三行第一列"
}, {
text: "第十三行第二列"
}, {
text: "第十三行第三列"
}], [{
text: "第十四行第一列"
}, {
text: "第十四行第二列"
}, {
text: "第十四行第三列"
}], [{
text: "第十五行第一列"
}, {
text: "第十五行第二列"
}, {
text: "第十五行第三列"
}], [{
text: "第十六行第一列"
}, {
text: "第十六行第二列"
}, {
text: "第十六行第三列"
}], [{
text: "第十七行第一列"
}, {
text: "第十七行第二列"
}, {
text: "第十七行第三列"
}], [{
text: "第十八行第一列"
}, {
text: "第十八行第二列"
}, {
text: "第十八行第三列"
}]];
var header = [[{
text: "表头1"
}, {
text: "表头2"
}, {
text: "表头3"
}]];
var table1 = BI.createWidget({
type: "bi.responsive_table",
isNeedMerge: true,
isNeedFreeze: true,
mergeCols: [0, 1],
columnSize: ["", "", ""],
items: items,
header: header
});
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.grid",
columns: 2,
rows: 2,
items: [{
column: 0,
row: 0,
el: table1
}]
},
left: 10,
right: 10,
top: 10,
bottom: 10
}]
})
}
});
BI.shortcut("demo.responsive_table", Demo.Func);

4
demo/version.js

@ -5,3 +5,7 @@ Demo = {
BI.i18n = {
"BI-Basic_OK": "确定"
};
BI.servletURL = "dist/";
BI.resourceURL = "dist/resource/";
BI.i18n = {};

391
dist/base.css vendored

@ -1,27 +1,6 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
@font-face {
font-family: 'bbr';
src: url('/resources/fonts/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('/resources/fonts/iconfont.woff') format('woff'), /* chrome、firefox */ url('/resources/fonts/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('/resources/fonts/iconfont.svg#svgFontName') format('svg');
/* iOS 4.1- */
}
.b-font {
font-family: "bi";
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
.bi-base-request-fail-mask .mask-pane {
background: #ffffff;
opacity: 0.8;
filter: alpha(opacity=80);
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
@ -58,57 +37,36 @@
-webkit-box-shadow: 0px 0px 2px 1px #d4dadd inset;
-moz-box-shadow: 0px 0px 2px 1px #d4dadd inset;
}
/**
* Farbtastic Color Picker 1.2
* © 2008 Steven Wittens
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
.farbtastic {
position: relative;
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-color-picker-button {
background-color: #eaeaea;
}
.farbtastic * {
position: absolute;
cursor: crosshair;
.bi-color-picker-button .color-picker-button-mask {
border: 1px solid #1a1a1a;
}
.farbtastic,
.farbtastic .wheel {
width: 195px;
height: 195px;
}
.farbtastic .color,
.farbtastic .overlay {
top: 47px;
left: 47px;
width: 101px;
height: 101px;
}
.farbtastic .wheel {
background: url(third/farbtastic/wheel.png) no-repeat;
width: 195px;
height: 195px;
}
.farbtastic .overlay {
background: url(third/farbtastic/mask.png) no-repeat;
}
.farbtastic .marker {
width: 17px;
height: 17px;
margin: -8px 0 0 -8px;
overflow: hidden;
background: url(third/farbtastic/marker.png) no-repeat;
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-color-picker > .center-element {
border-left: 1px solid #ffffff;
border-top: 1px solid #ffffff;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-color-picker-editor .color-picker-editor-label {
color: #808080;
}
.bi-color-picker-editor .color-picker-editor-display {
background: #ffffff;
-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;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
@ -1077,7 +1035,7 @@ li.CodeMirror-hint-active {
overflow-x: hidden;
overflow-y: hidden;
white-space: nowrap;
word-break: break-all;
word-break: break-word;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
@ -1239,9 +1197,6 @@ li.CodeMirror-hint-active {
.bi-grid-table-cell.first-col {
border-left: 1px solid #eaeaea;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.scrollbar-layout-main {
box-sizing: border-box;
outline: none;
@ -1407,294 +1362,6 @@ li.CodeMirror-hint-active {
opacity: 1;
filter: alpha(opacity=100);
}
/*-------------------------------------
zTree Style
version: 3.5.17
author: Hunter.z
email: hunter.z@263.net
website: http://code.google.com/p/jquerytree/
-------------------------------------*/
.ztree * {
padding: 0;
margin: 0;
}
.ztree {
margin: 0;
padding: 5px;
}
.ztree li {
padding: 0;
margin: 0;
list-style: none;
line-height: 14px;
text-align: left;
white-space: nowrap;
outline: 0;
}
.ztree li ul {
margin: 0;
padding: 0 0 0 18px;
}
.ztree li ul.line {
background: url(icon/tree-vertical-line-1.png) 0 0 repeat-y;
}
.ztree li a {
padding: 1px 3px 0 0;
margin: 0;
cursor: pointer;
height: 24px;
background-color: transparent;
text-decoration: none;
vertical-align: top;
display: inline-block;
}
.ztree li a.curSelectedNode_Edit {
padding-top: 0px;
background-color: #FFE6B0;
color: black;
height: 16px;
border: 1px #FFB951 solid;
opacity: 0.8;
}
.ztree li a.tmpTargetNode_inner {
padding-top: 0px;
background-color: #316AC5;
color: white;
height: 16px;
border: 1px #316AC5 solid;
opacity: 0.8;
filter: alpha(opacity=80);
}
.ztree li a input.rename {
height: 14px;
width: 80px;
padding: 0;
margin: 0;
font-size: 12px;
border: 1px #7EC4CC solid;
*border: 0px;
}
.ztree li span {
line-height: 24px;
margin-right: 2px;
}
.ztree li span.button {
line-height: 0;
margin: 0;
width: 16px;
height: 16px;
display: inline-block;
vertical-align: middle;
border: 0 none;
cursor: pointer;
outline: none;
background-color: transparent;
background-repeat: no-repeat;
background-attachment: scroll;
background-image: url("third/ztree/img/zTreeStandard.png");
*background-image: url("third/ztree/img/zTreeStandard.gif");
}
.ztree li span.button.chk {
width: 16px;
height: 16px;
margin: 0 3px 0 0;
cursor: auto;
}
.ztree li span.button.chk.checkbox_false_full {
background-image: url("icon/check-box-normal.png");
}
.ztree li span.button.chk.checkbox_false_full_focus {
background-image: url("icon/check-box-normal.png");
}
.ztree li span.button.chk.checkbox_false_part {
background-image: url("icon/half_selected.png");
}
.ztree li span.button.chk.checkbox_false_part_focus {
background-image: url("icon/half_selected.png");
}
.ztree li span.button.chk.checkbox_false_disable {
background-position: 0 -56px;
}
.ztree li span.button.chk.checkbox_true_full {
background-image: url("icon/check-box-active.png");
}
.ztree li span.button.chk.checkbox_true_full_focus {
background-image: url("icon/check-box-active.png");
}
.ztree li span.button.chk.checkbox_true_part {
background-image: url("icon/half_selected.png");
}
.ztree li span.button.chk.checkbox_true_part_focus {
background-image: url("icon/half_selected.png");
}
.ztree li span.button.chk.checkbox_true_disable {
background-position: -14px -56px;
}
.ztree li span.button.chk.radio_false_full {
background-position: -28px 0;
}
.ztree li span.button.chk.radio_false_full_focus {
background-position: -28px -14px;
}
.ztree li span.button.chk.radio_false_part {
background-position: -28px -28px;
}
.ztree li span.button.chk.radio_false_part_focus {
background-position: -28px -42px;
}
.ztree li span.button.chk.radio_false_disable {
background-position: -28px -56px;
}
.ztree li span.button.chk.radio_true_full {
background-position: -42px 0;
}
.ztree li span.button.chk.radio_true_full_focus {
background-position: -42px -14px;
}
.ztree li span.button.chk.radio_true_part {
background-position: -42px -28px;
}
.ztree li span.button.chk.radio_true_part_focus {
background-position: -42px -42px;
}
.ztree li span.button.chk.radio_true_disable {
background-position: -42px -56px;
}
.ztree li span.button.switch {
width: 25px;
height: 25px;
}
.ztree li span.button.root_open {
background-image: url("icon/tree-expand-1.png");
}
.ztree li span.button.root_close {
background-image: url("icon/tree-collapse-1.png");
}
.ztree li span.button.roots_open {
background-image: url("icon/tree-expand-2.png");
}
.ztree li span.button.roots_close {
background-image: url("icon/tree-collapse-2.png");
}
.ztree li span.button.center_open {
background-image: url("icon/tree-expand-3.png");
}
.ztree li span.button.center_close {
background-image: url("icon/tree-collapse-3.png");
}
.ztree li span.button.bottom_open {
background-image: url("icon/tree-expand-4.png");
}
.ztree li span.button.bottom_close {
background-image: url("icon/tree-collapse-4.png");
}
.ztree li span.button.noline_open {
background-position: -92px -72px;
}
.ztree li span.button.noline_close {
background-position: -74px -72px;
}
.ztree li span.button.root_docu {
background: none;
}
.ztree li span.button.roots_docu {
background-image: url("icon/tree-vertical-line-2.png");
}
.ztree li span.button.center_docu {
background-image: url("icon/tree-vertical-line-3.png");
}
.ztree li span.button.bottom_docu {
background-image: url("icon/tree-vertical-line-4.png");
}
.ztree li span.button.noline_docu {
background: none;
}
.ztree li span.button.ico_open {
margin-right: 2px;
background-position: -110px -16px;
vertical-align: top;
*vertical-align: middle;
}
.ztree li span.button.ico_close {
margin-right: 2px;
background-position: -110px 0;
vertical-align: top;
*vertical-align: middle;
}
.ztree li span.button.ico_docu {
margin-right: 2px;
background-position: -110px -32px;
vertical-align: top;
*vertical-align: middle;
}
.ztree li span.button.edit {
margin-right: 2px;
background-position: -110px -48px;
vertical-align: top;
*vertical-align: middle;
}
.ztree li span.button.remove {
margin-right: 2px;
background-position: -110px -64px;
vertical-align: top;
*vertical-align: middle;
}
.ztree li span.button.ico_loading {
width: 0px;
margin-right: 2px;
background: url("third/ztree/img/loading.gif") no-repeat scroll 0 0 transparent;
vertical-align: top;
*vertical-align: middle;
}
ul.tmpTargetzTree {
background-color: #FFE6B0;
opacity: 0.8;
filter: alpha(opacity=80);
}
span.tmpzTreeMove_arrow {
width: 16px;
height: 16px;
display: inline-block;
padding: 0;
margin: 2px 0 0 1px;
border: 0 none;
position: absolute;
background-color: transparent;
background-repeat: no-repeat;
background-attachment: scroll;
background-position: -110px -80px;
background-image: url("third/ztree/img/zTreeStandard.png");
*background-image: url("third/ztree/img/zTreeStandard.gif");
}
ul.ztree.zTreeDragUL {
margin: 0;
padding: 0;
position: absolute;
width: auto;
height: auto;
overflow: hidden;
background-color: #cfcfcf;
border: 1px #00B83F dotted;
opacity: 0.8;
filter: alpha(opacity=80);
}
.zTreeMask {
z-index: 10000;
background-color: #cfcfcf;
opacity: 0.0;
filter: alpha(opacity=0);
position: absolute;
}
/* level style*/
/*.ztree li span.button.level0 {
display:none;
}
.ztree li ul.level0 {
padding:0;
background:none;
}*/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/

297
dist/base.js vendored

@ -596,7 +596,7 @@ BI.Text = BI.inherit(BI.Single, {
}
});
$.shortcut("bi.text", BI.Text);/**
BI.shortcut("bi.text", BI.Text);/**
* guy
* @class BI.BasicButton
* @extends BI.Single
@ -1020,9 +1020,11 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
self.setValue([]);
break;
}
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
self.fireEvent(BI.ButtonGroup.EVENT_CHANGE, value, obj);
}
} else {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
}
});
btn.on(BI.Events.DESTROY, function () {
BI.remove(self.buttons, btn);
@ -1034,7 +1036,6 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
_packageBtns: function (btns) {
var o = this.options;
for (var i = o.layouts.length - 1; i > 0; i--) {
btns = BI.map(btns, function (k, it) {
return BI.extend({}, o.layouts[i], {
@ -1049,6 +1050,18 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
return btns;
},
_packageSimpleItems: function (btns) {
var o = this.options;
return BI.map(o.items, function (i, item) {
if (BI.stripEL(item) === item) {
return btns[i];
}
return BI.extend({}, item, {
el: btns[i]
})
})
},
_packageItems: function (items, packBtns) {
return BI.createItems(BI.makeArrayByArray(items, {}), BI.clone(packBtns));
},
@ -1064,6 +1077,11 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
return layout;
},
//如果是一个简单的layout
_isSimpleLayout: function () {
var o = this.options;
return o.layouts.length === 1 && !BI.isArray(o.items[0])
},
doBehavior: function () {
var args = Array.prototype.slice.call(arguments);
@ -1078,9 +1096,7 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
var btns = this._btnsCreator.apply(this, arguments);
this.buttons = BI.concat(btns, this.buttons);
//如果是一个简单的layout
if (o.layouts.length === 1 && !BI.isNotEmptyArray(o.layouts[0].items)
&& this.layouts && this.layouts.prependItems) {
if (this._isSimpleLayout() && this.layouts && this.layouts.prependItems) {
this.layouts.prependItems(btns);
return;
}
@ -1095,8 +1111,7 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
this.buttons = BI.concat(this.buttons, btns);
//如果是一个简单的layout
if (o.layouts.length === 1 && !BI.isNotEmptyArray(o.layouts[0].items)
&& this.layouts && this.layouts.addItems) {
if (this._isSimpleLayout() && this.layouts && this.layouts.addItems) {
this.layouts.addItems(btns);
return;
}
@ -1106,35 +1121,33 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
},
removeItemAt: function (indexes) {
var self = this;
indexes = BI.isArray(indexes) ? indexes : [indexes];
var buttons = [];
BI.each(indexes, function (i, index) {
buttons.push(self.buttons[index]);
});
BI.each(buttons, function (i, btn) {
btn && btn.destroy();
})
BI.remove(this.buttons, indexes);
this.layouts.removeItemAt(indexes);
},
removeItems: function (v) {
v = BI.isArray(v) ? v : [v];
var indexes = [];
BI.each(this.buttons, function (i, item) {
if (BI.deepContains(v, item.getValue())) {
indexes.push(i);
removeItems: function (values) {
values = BI.isArray(values) ? values : [values];
var deleted = [];
BI.each(this.buttons, function (i, button) {
if (BI.deepContains(values, button.getValue())) {
deleted.push(i);
}
});
this.removeItemAt(indexes);
BI.remove(this.buttons, deleted);
this.layouts.removeItemAt(deleted);
},
populate: function (items) {
items = items || [];
this.options.items = items;
this.empty();
this.options.items = items;
this.buttons = this._btnsCreator.apply(this, arguments);
if (this._isSimpleLayout()) {
items = this._packageSimpleItems(this.buttons);
} else {
items = this._packageItems(items, this._packageBtns(this.buttons));
}
this.layouts = BI.createWidget(BI.extend({element: this}, this._packageLayout(items)));
},
@ -1260,8 +1273,14 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
return node;
},
empty: function () {
BI.ButtonGroup.superclass.empty.apply(this, arguments);
this.options.items = [];
},
destroy: function () {
BI.ButtonGroup.superclass.destroy.apply(this, arguments);
this.options.items = [];
}
});
BI.extend(BI.ButtonGroup, {
@ -1273,7 +1292,7 @@ BI.extend(BI.ButtonGroup, {
});
BI.ButtonGroup.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.button_group", BI.ButtonGroup);/**
BI.shortcut("bi.button_group", BI.ButtonGroup);/**
* Created by GUY on 2015/8/10.
* @class BI.ButtonTree
* @extends BI.ButtonGroup
@ -1454,7 +1473,7 @@ BI.ButtonTree = BI.inherit(BI.ButtonGroup, {
});
BI.ButtonTree.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.button_tree", BI.ButtonTree);/**
BI.shortcut("bi.button_tree", BI.ButtonTree);/**
* guy
* 异步树
* @class BI.TreeView
@ -1960,7 +1979,7 @@ BI.TreeView.EVENT_CHANGE = "EVENT_CHANGE";
BI.TreeView.EVENT_INIT = BI.Events.INIT;
BI.TreeView.EVENT_AFTERINIT = BI.Events.AFTERINIT;
$.shortcut("bi.tree_view", BI.TreeView);/**
BI.shortcut("bi.tree_view", BI.TreeView);/**
* guy
* 同步树
* @class BI.SyncTree
@ -2168,7 +2187,7 @@ BI.SyncTree = BI.inherit(BI.TreeView, {
}
});
$.shortcut("bi.sync_tree", BI.SyncTree);/**
BI.shortcut("bi.sync_tree", BI.SyncTree);/**
* guy
* 局部树两个请求树 第一个请求构造树第二个请求获取节点
* @class BI.PartTree
@ -2342,17 +2361,14 @@ BI.PartTree = BI.inherit(BI.SyncTree, {
}
});
$.shortcut("bi.part_tree", BI.PartTree);BI.Resizers = new BI.ResizeController();
BI.shortcut("bi.part_tree", BI.PartTree);BI.Resizers = new BI.ResizeController();
BI.Layers = new BI.LayerController();
BI.Maskers = new BI.MaskersController();
BI.Bubbles = new BI.BubblesController();
BI.Tooltips = new BI.TooltipsController();
BI.Popovers = new BI.FloatBoxController();
BI.Broadcasts = new BI.BroadcastController();
BI.StyleLoaders = new BI.StyleLoaderManager();
BI.servletURL = "dist/";
BI.i18n = {};/**
BI.StyleLoaders = new BI.StyleLoaderManager();/**
* canvas绘图
*
* Created by GUY on 2015/11/18.
@ -2483,7 +2499,7 @@ BI.Canvas = BI.inherit(BI.Widget, {
});
}
});
$.shortcut("bi.canvas", BI.Canvas);/**
BI.shortcut("bi.canvas", BI.Canvas);/**
* Collection
*
* Created by GUY on 2016/1/15.
@ -2774,7 +2790,7 @@ BI.Collection = BI.inherit(BI.Widget, {
}
});
BI.Collection.EVENT_SCROLL = "EVENT_SCROLL";
$.shortcut('bi.collection_view', BI.Collection);/**
BI.shortcut('bi.collection_view', BI.Collection);/**
* @class BI.Combo
* @extends BI.Widget
*/
@ -3172,7 +3188,7 @@ BI.Combo.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW";
BI.Combo.EVENT_BEFORE_HIDEVIEW = "EVENT_BEFORE_HIDEVIEW";
BI.Combo.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW";
$.shortcut("bi.combo", BI.Combo);/**
BI.shortcut("bi.combo", BI.Combo);/**
*
* 某个可以展开的节点
*
@ -3449,7 +3465,7 @@ BI.Expander.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW";
BI.Expander.EVENT_BEFORE_HIDEVIEW = "EVENT_BEFORE_HIDEVIEW";
BI.Expander.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW";
$.shortcut("bi.expander", BI.Expander);/**
BI.shortcut("bi.expander", BI.Expander);/**
* Created by GUY on 2015/8/10.
*/
@ -3549,7 +3565,7 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
});
BI.ComboGroup.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.combo_group", BI.ComboGroup);BI.VirtualGroup = BI.inherit(BI.Widget, {
BI.shortcut("bi.combo_group", BI.ComboGroup);BI.VirtualGroup = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.VirtualGroup.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-virtual-group",
@ -3606,21 +3622,33 @@ $.shortcut("bi.combo_group", BI.ComboGroup);BI.VirtualGroup = BI.inherit(BI.Widg
this.layouts.prependItems(items);
},
setValue: function (v) {
this.layouts.setValue(v);
},
getValue: function () {
return this.layouts.getValue();
},
empty: function () {
this.layouts.empty();
},
populate: function (items) {
var self = this;
items = items || [];
this.options.items = items;
items = this._packageItems(items, this._packageBtns(items));
items = this._packageBtns(items);
if (!this.layouts) {
this.layouts = BI.createWidget(BI.extend({element: this}, this._packageLayout(items)));
} else {
this.layouts.populate(this._packageLayout(items).items);
this.layouts.populate(items);
}
}
});
BI.VirtualGroup.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.virtual_group", BI.VirtualGroup);/**
BI.shortcut("bi.virtual_group", BI.VirtualGroup);/**
* 加载控件
*
* Created by GUY on 2015/8/31.
@ -3881,13 +3909,13 @@ BI.Loader = BI.inherit(BI.Widget, {
}
});
BI.Loader.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.loader", BI.Loader);/**
BI.shortcut("bi.loader", BI.Loader);/**
* Created by GUY on 2015/6/26.
*/
BI.Navigation = BI.inherit(BI.Widget, {
_defaultConfig: function(){
return BI.extend(BI.Navigation.superclass._defaultConfig.apply(this,arguments), {
_defaultConfig: function () {
return BI.extend(BI.Navigation.superclass._defaultConfig.apply(this, arguments), {
direction: "bottom",//top, bottom, left, right, custom
logic: {
dynamic: false
@ -3898,7 +3926,7 @@ BI.Navigation = BI.inherit(BI.Widget, {
items: [],
layouts: []
},
cardCreator: function(v){
cardCreator: function (v) {
return BI.createWidget();
},
@ -3907,8 +3935,7 @@ BI.Navigation = BI.inherit(BI.Widget, {
})
},
_init: function(){
BI.Navigation.superclass._init.apply(this,arguments);
render: function () {
var self = this, o = this.options;
this.tab = BI.createWidget(this.options.tab, {type: "bi.button_group"});
this.cardMap = {};
@ -3926,10 +3953,10 @@ BI.Navigation = BI.inherit(BI.Widget, {
new BI.ShowListener({
eventObj: this.tab,
cardLayout: this.layout,
cardNameCreator: function(v){
cardNameCreator: function (v) {
return self.showIndex + v;
},
cardCreator: function(v){
cardCreator: function (v) {
var card = o.cardCreator(v);
self.cardMap[v] = card;
return card;
@ -3937,37 +3964,41 @@ BI.Navigation = BI.inherit(BI.Widget, {
afterCardCreated: BI.bind(this.afterCardCreated, this),
afterCardShow: BI.bind(this.afterCardShow, this)
})
if(o.defaultShowIndex !== false){
},
mounted: function () {
var o = this.options;
if (o.defaultShowIndex !== false) {
this.setSelect(o.defaultShowIndex);
}
},
afterCardCreated: function(v){
afterCardCreated: function (v) {
var self = this;
this.cardMap[v].on(BI.Controller.EVENT_CHANGE, function(type, value, obj){
this.cardMap[v].on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
if(type === BI.Events.CLICK) {
if (type === BI.Events.CLICK) {
self.fireEvent(BI.Navigation.EVENT_CHANGE, obj);
}
})
this.options.afterCardCreated.apply(this, arguments);
},
afterCardShow: function(v){
afterCardShow: function (v) {
this.showIndex = v;
this.options.afterCardShow.apply(this, arguments);
},
populate: function(){
populate: function () {
var card = this.layout.getShowingCard();
if(card){
if (card) {
return card.populate.apply(card, arguments);
}
},
setSelect: function(v){
setSelect: function (v) {
this.showIndex = v;
if(!this.layout.isCardExisted(v)){
if (!this.layout.isCardExisted(v)) {
var card = this.options.cardCreator(v);
this.cardMap[v] = card;
this.layout.addCardByName(v, card);
@ -3977,12 +4008,12 @@ BI.Navigation = BI.inherit(BI.Widget, {
BI.nextTick(BI.bind(this.afterCardShow, this, v));
},
getSelect: function(){
getSelect: function () {
return this.showIndex;
},
getSelectedCard: function(){
if(BI.isKey(this.showIndex)){
getSelectedCard: function () {
if (BI.isKey(this.showIndex)) {
return this.cardMap[this.showIndex];
}
},
@ -3990,9 +4021,9 @@ BI.Navigation = BI.inherit(BI.Widget, {
/**
* @override
*/
setValue: function(v){
setValue: function (v) {
var card = this.layout.getShowingCard();
if(card){
if (card) {
card.setValue(v);
}
},
@ -4000,25 +4031,25 @@ BI.Navigation = BI.inherit(BI.Widget, {
/**
* @override
*/
getValue: function(){
getValue: function () {
var card = this.layout.getShowingCard();
if(card){
if (card) {
return card.getValue();
}
},
empty: function(){
empty: function () {
this.layout.deleteAllCard();
this.cardMap = {};
},
destroy: function(){
destroy: function () {
BI.Navigation.superclass.destroy.apply(this, arguments);
}
});
BI.Navigation.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.navigation", BI.Navigation);/**
BI.shortcut("bi.navigation", BI.Navigation);/**
* 搜索逻辑控件
*
* Created by GUY on 2015/9/28.
@ -4320,7 +4351,7 @@ BI.Searcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.Searcher.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.Searcher.EVENT_AFTER_INIT = "EVENT_AFTER_INIT";
$.shortcut("bi.searcher", BI.Searcher);/**
BI.shortcut("bi.searcher", BI.Searcher);/**
*
* 切换显示或隐藏面板
*
@ -4596,7 +4627,7 @@ BI.Switcher.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW";
BI.Switcher.EVENT_BEFORE_HIDEVIEW = "EVENT_BEFORE_HIDEVIEW";
BI.Switcher.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW";
$.shortcut("bi.switcher", BI.Switcher);/**
BI.shortcut("bi.switcher", BI.Switcher);/**
* Created by GUY on 2015/6/26.
*/
@ -4608,7 +4639,7 @@ BI.Tab = BI.inherit(BI.Widget, {
logic: {
dynamic: false
},
defaultShowIndex: 0,
defaultShowIndex: false,
tab: false,
cardCreator: function (v) {
return BI.createWidget();
@ -4722,7 +4753,7 @@ BI.Tab = BI.inherit(BI.Widget, {
});
BI.Tab.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.tab", BI.Tab);/**
BI.shortcut("bi.tab", BI.Tab);/**
* 表示当前对象
*
* Created by GUY on 2015/9/7.
@ -4763,7 +4794,7 @@ BI.EL = BI.inherit(BI.Widget, {
this.ele.populate.apply(this, arguments);
}
});
$.shortcut('bi.el', BI.EL);// CodeMirror, copyright (c) by Marijn Haverbeke and others
BI.shortcut('bi.el', BI.EL);// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
// This is CodeMirror (http://codemirror.net), a code editor
@ -14330,7 +14361,7 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
BI.FormulaEditor.EVENT_CHANGE = "EVENT_CHANGE";
BI.FormulaEditor.EVENT_BLUR = "EVENT_BLUR";
BI.FormulaEditor.EVENT_FOCUS = "EVENT_FOCUS";
$.shortcut("bi.formula_editor", BI.FormulaEditor);
BI.shortcut("bi.formula_editor", BI.FormulaEditor);
/**
* z-index在1亿层级
* 弹出提示消息框用于模拟阻塞操作通过回调函数实现
@ -14802,7 +14833,7 @@ BI.Grid = BI.inherit(BI.Widget, {
}
});
BI.Grid.EVENT_SCROLL = "EVENT_SCROLL";
$.shortcut('bi.grid_view', BI.Grid);/**
BI.shortcut('bi.grid_view', BI.Grid);/**
* floatBox弹出层
* @class BI.FloatBox
* @extends BI.Widget
@ -14943,7 +14974,7 @@ BI.FloatBox = BI.inherit(BI.Widget, {
}
});
$.shortcut("bi.float_box", BI.FloatBox);
BI.shortcut("bi.float_box", BI.FloatBox);
BI.FloatBox.EVENT_FLOAT_BOX_CLOSED = "EVENT_FLOAT_BOX_CLOSED";
BI.FloatBox.EVENT_FLOAT_BOX_OPEN = "EVENT_FLOAT_BOX_CLOSED";
@ -15127,7 +15158,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
}
});
BI.PopupView.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.popup_view", BI.PopupView);/**
BI.shortcut("bi.popup_view", BI.PopupView);/**
* 搜索面板
*
* Created by GUY on 2015/9/28.
@ -15265,7 +15296,7 @@ BI.SearcherView = BI.inherit(BI.Pane, {
});
BI.SearcherView.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.searcher_view", BI.SearcherView);/**
BI.shortcut("bi.searcher_view", BI.SearcherView);/**
* 分页控件
*
* Created by GUY on 2015/8/31.
@ -15552,7 +15583,7 @@ BI.Pager = BI.inherit(BI.Widget, {
});
BI.Pager.EVENT_CHANGE = "EVENT_CHANGE";
BI.Pager.EVENT_AFTER_POPULATE = "EVENT_AFTER_POPULATE";
$.shortcut("bi.pager", BI.Pager);/**
BI.shortcut("bi.pager", BI.Pager);/**
* 超链接
*
* Created by GUY on 2015/9/9.
@ -15583,7 +15614,7 @@ BI.A = BI.inherit(BI.Text, {
}
});
$.shortcut("bi.a", BI.A);/**
BI.shortcut("bi.a", BI.A);/**
* guy
* 加载条
* @type {*|void|Object}
@ -15666,7 +15697,7 @@ BI.LoadingBar = BI.inherit(BI.Single, {
}
});
$.shortcut("bi.loading_bar", BI.LoadingBar);/**
BI.shortcut("bi.loading_bar", BI.LoadingBar);/**
* @class BI.IconButton
* @extends BI.BasicButton
* 图标的button
@ -15716,7 +15747,7 @@ BI.IconButton = BI.inherit(BI.BasicButton, {
}
});
BI.IconButton.EVENT_CHANGE = "IconButton.EVENT_CHANGE";
$.shortcut("bi.icon_button", BI.IconButton);/**
BI.shortcut("bi.icon_button", BI.IconButton);/**
* 图片的button
*
* Created by GUY on 2016/1/27.
@ -15802,7 +15833,7 @@ BI.ImageButton = BI.inherit(BI.BasicButton, {
}
});
BI.ImageButton.EVENT_CHANGE = "ImageButton.EVENT_CHANGE";
$.shortcut("bi.image_button", BI.ImageButton);(function ($) {
BI.shortcut("bi.image_button", BI.ImageButton);(function ($) {
/**
* 文字类型的按钮
@ -15939,7 +15970,7 @@ $.shortcut("bi.image_button", BI.ImageButton);(function ($) {
BI.Button.superclass.destroy.apply(this, arguments);
}
});
$.shortcut('bi.button', BI.Button);
BI.shortcut('bi.button', BI.Button);
BI.Button.EVENT_CHANGE = "EVENT_CHANGE";
})(jQuery);/**
* guy
@ -16030,7 +16061,7 @@ BI.TextButton = BI.inherit(BI.BasicButton, {
}
});
BI.TextButton.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.text_button", BI.TextButton);/**
BI.shortcut("bi.text_button", BI.TextButton);/**
* 带有一个占位
*
* Created by GUY on 2015/9/11.
@ -16148,7 +16179,7 @@ BI.BlankIconIconTextItem = BI.inherit(BI.BasicButton, {
}
});
BI.BlankIconIconTextItem.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.blank_icon_icon_text_item", BI.BlankIconIconTextItem);/**
BI.shortcut("bi.blank_icon_icon_text_item", BI.BlankIconIconTextItem);/**
* guy
* 一个占位符和两个icon和一行数 组成的一行listitem
*
@ -16284,7 +16315,7 @@ BI.BlankIconTextIconItem = BI.inherit(BI.BasicButton, {
}
});
BI.BlankIconTextIconItem.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.blank_icon_text_icon_item", BI.BlankIconTextIconItem);/**
BI.shortcut("bi.blank_icon_text_icon_item", BI.BlankIconTextIconItem);/**
* 带有一个占位
*
* Created by GUY on 2015/9/11.
@ -16394,7 +16425,7 @@ BI.BlankIconTextItem = BI.inherit(BI.BasicButton, {
}
});
BI.BlankIconTextItem.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.blank_icon_text_item", BI.BlankIconTextItem);/**
BI.shortcut("bi.blank_icon_text_item", BI.BlankIconTextItem);/**
* guy
* 两个icon和一行数 组成的一行listitem
*
@ -16527,7 +16558,7 @@ BI.IconTextIconItem = BI.inherit(BI.BasicButton, {
}
});
BI.IconTextIconItem.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.icon_text_icon_item", BI.IconTextIconItem);/**
BI.shortcut("bi.icon_text_icon_item", BI.IconTextIconItem);/**
* guy
*
* Created by GUY on 2015/9/9.
@ -16632,7 +16663,7 @@ BI.IconTextItem = BI.inherit(BI.BasicButton, {
}
});
BI.IconTextItem.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.icon_text_item", BI.IconTextItem);/**
BI.shortcut("bi.icon_text_item", BI.IconTextItem);/**
*
* 图标的button
*
@ -16738,7 +16769,7 @@ BI.TextIconItem = BI.inherit(BI.BasicButton, {
}
});
BI.TextIconItem.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.text_icon_item", BI.TextIconItem);/**
BI.shortcut("bi.text_icon_item", BI.TextIconItem);/**
* guy
* 一个button和一行数 组成的一行listitem
*
@ -16823,7 +16854,7 @@ BI.TextItem = BI.inherit(BI.BasicButton, {
}
});
BI.TextItem.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.text_item", BI.TextItem);/**
BI.shortcut("bi.text_item", BI.TextItem);/**
* guy
* Created by GUY on 2015/9/9.
* @class BI.IconTextIconNode
@ -16946,7 +16977,7 @@ BI.IconTextIconNode = BI.inherit(BI.NodeButton, {
}
});
BI.IconTextIconNode.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.icon_text_icon_node", BI.IconTextIconNode);/**
BI.shortcut("bi.icon_text_icon_node", BI.IconTextIconNode);/**
* guy
* Created by GUY on 2015/9/9.
* @class BI.IconTextNode
@ -17042,7 +17073,7 @@ BI.IconTextNode = BI.inherit(BI.NodeButton, {
}
});
BI.IconTextNode.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.icon_text_node", BI.IconTextNode);/**
BI.shortcut("bi.icon_text_node", BI.IconTextNode);/**
* Created by GUY on 2015/9/9.
* @class BI.TextIconNode
* @extends BI.NodeButton
@ -17137,7 +17168,7 @@ BI.TextIconNode = BI.inherit(BI.NodeButton, {
}
});
BI.TextIconNode.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.text_icon_node", BI.TextIconNode);/**
BI.shortcut("bi.text_icon_node", BI.TextIconNode);/**
* guy
*
* Created by GUY on 2015/9/9.
@ -17213,7 +17244,7 @@ BI.TextNode = BI.inherit(BI.NodeButton, {
}
});
BI.TextNode.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.text_node", BI.TextNode);/**
BI.shortcut("bi.text_node", BI.TextNode);/**
*
* Created by GUY on 2016/1/15.
* @class BI.CodeEditor
@ -17358,7 +17389,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
BI.CodeEditor.EVENT_CHANGE = "EVENT_CHANGE";
BI.CodeEditor.EVENT_BLUR = "EVENT_BLUR";
BI.CodeEditor.EVENT_FOCUS = "EVENT_FOCUS";
$.shortcut("bi.code_editor", BI.CodeEditor);/**
BI.shortcut("bi.code_editor", BI.CodeEditor);/**
* Created by GUY on 2015/4/15.
* @class BI.Editor
* @extends BI.Single
@ -17689,7 +17720,7 @@ BI.Editor.EVENT_RESTRICT = "EVENT_RESTRICT";
BI.Editor.EVENT_REMOVE = "EVENT_REMOVE";
BI.Editor.EVENT_EMPTY = "EVENT_EMPTY";
$.shortcut("bi.editor", BI.Editor);/**
BI.shortcut("bi.editor", BI.Editor);/**
* 多文件
*
* Created by GUY on 2016/4/13.
@ -17782,7 +17813,7 @@ BI.MultifileEditor.EVENT_UPLOADSTART = "MultifileEditor.EVENT_UPLOADSTART";
BI.MultifileEditor.EVENT_ERROR = "MultifileEditor.EVENT_ERROR";
BI.MultifileEditor.EVENT_PROGRESS = "MultifileEditor.EVENT_PROGRESS";
BI.MultifileEditor.EVENT_UPLOADED = "MultifileEditor.EVENT_UPLOADED";
$.shortcut("bi.multifile_editor", BI.MultifileEditor);/**
BI.shortcut("bi.multifile_editor", BI.MultifileEditor);/**
*
* Created by GUY on 2016/1/18.
* @class BI.TextAreaEditor
@ -17947,7 +17978,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
BI.TextAreaEditor.EVENT_CHANGE = "EVENT_CHANGE";
BI.TextAreaEditor.EVENT_BLUR = "EVENT_BLUR";
BI.TextAreaEditor.EVENT_FOCUS = "EVENT_FOCUS";
$.shortcut("bi.textarea_editor", BI.TextAreaEditor);/**
BI.shortcut("bi.textarea_editor", BI.TextAreaEditor);/**
* guy 图标
* @class BI.Icon
* @extends BI.Single
@ -17964,7 +17995,7 @@ BI.Icon = BI.inherit(BI.Single, {
BI.Icon.superclass._init.apply(this, arguments);
}
});
$.shortcut("bi.icon", BI.Icon);/**
BI.shortcut("bi.icon", BI.Icon);/**
* @class BI.Iframe
* @extends BI.Single
* @abstract
@ -18005,7 +18036,7 @@ BI.Iframe = BI.inherit(BI.Single, {
}
});
$.shortcut("bi.iframe", BI.Iframe);/**
BI.shortcut("bi.iframe", BI.Iframe);/**
* ͼƬ
*
* Created by GUY on 2016/1/26.
@ -18040,7 +18071,7 @@ BI.Img = BI.inherit(BI.Single, {
}
});
$.shortcut("bi.img", BI.Img);
BI.shortcut("bi.img", BI.Img);
/**
* guy
* @extends BI.Single
@ -18073,7 +18104,7 @@ BI.Checkbox = BI.inherit(BI.IconButton, {
});
BI.Checkbox.EVENT_CHANGE = "Checkbox.EVENT_CHANGE";
$.shortcut("bi.checkbox", BI.Checkbox);/**
BI.shortcut("bi.checkbox", BI.Checkbox);/**
* 文件
*
* Created by GUY on 2016/1/27.
@ -18228,7 +18259,7 @@ $.shortcut("bi.checkbox", BI.Checkbox);/**
},
false
);
xhr.open("post", handler.url + '&filename=' + BI.cjkEncode(handler.file.fileName), true);
xhr.open("post", handler.url + '&filename=' + window.encodeURIComponent(handler.file.fileName), true);
if (!xhr.upload) {
var rpe = {loaded: 0, total: handler.file.fileSize || handler.file.size, simulation: true};
rpe.interval = setInterval(function () {
@ -18677,7 +18708,7 @@ $.shortcut("bi.checkbox", BI.Checkbox);/**
},
setEnable: function (enable) {
BI.MultiFile.superclass.setEnable.apply(this, arguments);
BI.File.superclass.setEnable.apply(this, arguments);
if (enable === true) {
this.element.attr("disabled", "disabled");
} else {
@ -18690,7 +18721,7 @@ $.shortcut("bi.checkbox", BI.Checkbox);/**
BI.File.EVENT_ERROR = "EVENT_ERROR";
BI.File.EVENT_PROGRESS = "EVENT_PROGRESS";
BI.File.EVENT_UPLOADED = "EVENT_UPLOADED";
$.shortcut("bi.file", BI.File);
BI.shortcut("bi.file", BI.File);
})();/**
* guy
* @class BI.Input 一个button和一行数 组成的一行listitem
@ -18974,7 +19005,7 @@ BI.Input.EVENT_VALID = "EVENT_VALID";
BI.Input.EVENT_ERROR = "EVENT_ERROR";
BI.Input.EVENT_ENTER = "EVENT_ENTER";
BI.Input.EVENT_RESTRICT = "EVENT_RESTRICT";
$.shortcut("bi.input", BI.Input);/**
BI.shortcut("bi.input", BI.Input);/**
* guy
* @extends BI.Single
* @type {*|void|Object}
@ -19006,7 +19037,7 @@ BI.Radio = BI.inherit(BI.IconButton, {
});
BI.Radio.EVENT_CHANGE = "Radio.EVENT_CHANGE";
$.shortcut("bi.radio", BI.Radio);/**
BI.shortcut("bi.radio", BI.Radio);/**
* Created by GUY on 2015/6/26.
*/
@ -19476,7 +19507,7 @@ BI.Label = BI.inherit(BI.Single, {
}
});
$.shortcut("bi.label", BI.Label);/**
BI.shortcut("bi.label", BI.Label);/**
* guy a元素
* @class BI.Link
* @extends BI.Text
@ -19512,7 +19543,7 @@ BI.Link = BI.inherit(BI.Label, {
}
});
$.shortcut("bi.link", BI.Link);/**
BI.shortcut("bi.link", BI.Link);/**
* guy
* 气泡提示
* @class BI.Bubble
@ -19618,7 +19649,7 @@ BI.Bubble = BI.inherit(BI.Tip, {
}
});
$.shortcut("bi.bubble", BI.Bubble);/**
BI.shortcut("bi.bubble", BI.Bubble);/**
* toast提示
*
* Created by GUY on 2015/9/7.
@ -19671,7 +19702,7 @@ BI.Toast = BI.inherit(BI.Tip, {
}
});
$.shortcut("bi.toast", BI.Toast);/**
BI.shortcut("bi.toast", BI.Toast);/**
* toast提示
*
* Created by GUY on 2015/9/7.
@ -19753,7 +19784,7 @@ BI.Tooltip = BI.inherit(BI.Tip, {
}
});
$.shortcut("bi.tooltip", BI.Tooltip);/**
BI.shortcut("bi.tooltip", BI.Tooltip);/**
* 下拉
* @class BI.Trigger
* @extends BI.Single
@ -28153,7 +28184,7 @@ BI.Svg = BI.inherit(BI.Widget, {
return this.paper.clear.apply(this.paper, arguments);
}
});
$.shortcut("bi.svg", BI.Svg);/**
BI.shortcut("bi.svg", BI.Svg);/**
*
* 表格
*
@ -28185,7 +28216,7 @@ BI.TableCell = BI.inherit(BI.Widget, {
}
});
$.shortcut("bi.table_cell", BI.TableCell);/**
BI.shortcut("bi.table_cell", BI.TableCell);/**
*
* 表格单元格
*
@ -28241,7 +28272,7 @@ BI.CollectionTableCell = BI.inherit(BI.Widget, {
}
});
$.shortcut("bi.collection_table_cell", BI.CollectionTableCell);/**
BI.shortcut("bi.collection_table_cell", BI.CollectionTableCell);/**
* CollectionTable
*
* Created by GUY on 2016/1/12.
@ -28787,7 +28818,7 @@ BI.CollectionTable = BI.inherit(BI.Widget, {
this._restore();
}
});
$.shortcut('bi.collection_table', BI.CollectionTable);/**
BI.shortcut('bi.collection_table', BI.CollectionTable);/**
* QuickCollectionTable
*
* Created by GUY on 2016/1/12.
@ -28926,7 +28957,7 @@ BI.QuickCollectionTable = BI.inherit(BI.CollectionTable, {
this.bottomRightCollection.populate(rightItems);
}
});
$.shortcut('bi.quick_collection_table', BI.QuickCollectionTable);/**
BI.shortcut('bi.quick_collection_table', BI.QuickCollectionTable);/**
*
* 表格单元格
*
@ -28984,7 +29015,7 @@ BI.GridTableCell = BI.inherit(BI.Widget, {
}
});
$.shortcut("bi.grid_table_cell", BI.GridTableCell);/**
BI.shortcut("bi.grid_table_cell", BI.GridTableCell);/**
* GridTable
*
* Created by GUY on 2016/1/12.
@ -29454,7 +29485,7 @@ BI.GridTable = BI.inherit(BI.Widget, {
this._restore();
}
});
$.shortcut('bi.grid_table', BI.GridTable);/**
BI.shortcut('bi.grid_table', BI.GridTable);/**
* QuickGridTable
*
* Created by GUY on 2016/1/12.
@ -29618,7 +29649,7 @@ BI.QuickGridTable = BI.inherit(BI.GridTable, {
this.bottomRightGrid.populate(rightItems);
}
});
$.shortcut('bi.quick_grid_table', BI.QuickGridTable);/**
BI.shortcut('bi.quick_grid_table', BI.QuickGridTable);/**
*
* 表格滚动条
*
@ -29944,7 +29975,7 @@ BI.GridTableScrollbar = BI.inherit(BI.Widget, {
});
BI.GridTableScrollbar.SIZE = 10;
BI.GridTableScrollbar.EVENT_SCROLL = "EVENT_SCROLL";
$.shortcut("bi.grid_table_scrollbar", BI.GridTableScrollbar);
BI.shortcut("bi.grid_table_scrollbar", BI.GridTableScrollbar);
BI.GridTableHorizontalScrollbar = BI.inherit(BI.Widget, {
@ -30024,7 +30055,7 @@ BI.GridTableHorizontalScrollbar = BI.inherit(BI.Widget, {
}
});
BI.GridTableHorizontalScrollbar.EVENT_SCROLL = "EVENT_SCROLL";
$.shortcut("bi.grid_table_horizontal_scrollbar", BI.GridTableHorizontalScrollbar);/**
BI.shortcut("bi.grid_table_horizontal_scrollbar", BI.GridTableHorizontalScrollbar);/**
*
* 表格
*
@ -30053,7 +30084,7 @@ BI.TableHeaderCell = BI.inherit(BI.Widget, {
}
});
$.shortcut("bi.table_header_cell", BI.TableHeaderCell);/**
BI.shortcut("bi.table_header_cell", BI.TableHeaderCell);/**
*
* 表格
*
@ -30414,11 +30445,9 @@ BI.Table = BI.inherit(BI.Widget, {
self.fireEvent(BI.Table.EVENT_TABLE_AFTER_INIT);
}
});
BI.Resizers.add(this.getName(), function (e) {
if (BI.isWindow(e.target) && self.element.is(":visible")) {
BI.ResizeDetector.addResizeListener(this, function () {
self._resize();
self.fireEvent(BI.Table.EVENT_TABLE_RESIZE);
}
});
},
@ -30800,6 +30829,7 @@ BI.Table = BI.inherit(BI.Widget, {
.addClass(c === rows.length - 1 ? "last-col" : "");
var w = BI.createWidget(map[r][c], {
type: "bi.table_cell",
root: true,
textAlign: "left",
width: BI.isNumeric(width) ? width : "",
height: BI.isNumeric(height) ? height : "",
@ -30879,6 +30909,7 @@ BI.Table = BI.inherit(BI.Widget, {
return this.footer;
},
_createBody: function () {
var self = this, o = this.options;
this.body = this._body();
@ -31991,7 +32022,7 @@ BI.Table.EVENT_TABLE_AFTER_COLUMN_RESIZE = "EVENT_TABLE_AFTER_COLUMN_RESIZE";
BI.Table.EVENT_TABLE_BEFORE_REGION_RESIZE = "EVENT_TABLE_BEFORE_REGION_RESIZE";
BI.Table.EVENT_TABLE_REGION_RESIZE = "EVENT_TABLE_REGION_RESIZE";
BI.Table.EVENT_TABLE_AFTER_REGION_RESIZE = "EVENT_TABLE_AFTER_REGION_RESIZE";
$.shortcut("bi.table_view", BI.Table);
BI.shortcut("bi.table_view", BI.Table);
/**
*
* 表格单元格
@ -32087,7 +32118,7 @@ BI.ResizableTableCell = BI.inherit(BI.Widget, {
this.cell.setHeight(o.height);
}
});
$.shortcut("bi.resizable_table_cell", BI.ResizableTableCell);/**
BI.shortcut("bi.resizable_table_cell", BI.ResizableTableCell);/**
*
* 可调整列宽的grid表格
*
@ -32435,7 +32466,7 @@ BI.ResizableTable = BI.inherit(BI.Widget, {
}
});
$.shortcut("bi.resizable_table", BI.ResizableTable);/**
BI.shortcut("bi.resizable_table", BI.ResizableTable);/**
*
* 自定义树
*
@ -32589,7 +32620,7 @@ BI.CustomTree = BI.inherit(BI.Widget, {
});
BI.CustomTree.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.custom_tree", BI.CustomTree);/*
BI.shortcut("bi.custom_tree", BI.CustomTree);/*
* JQuery zTree core v3.5.18
* http://zTree.me/
*

340
dist/case.js vendored

File diff suppressed because it is too large Load Diff

12794
dist/core.css vendored

File diff suppressed because it is too large Load Diff

7282
dist/core.js vendored

File diff suppressed because it is too large Load Diff

BIN
dist/icon/loading.gif vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

6683
dist/resource.css vendored

File diff suppressed because it is too large Load Diff

0
dist/resources/ZeroClipboard.swf → dist/resource/ZeroClipboard.swf vendored

1
dist/widget.css vendored

@ -236,6 +236,7 @@
border-bottom: 1px solid #d4dadd;
}
.bi-fine-tuning-number-editor .bottom-button {
border-top: 1px solid #d4dadd;
border-left: 1px solid #d4dadd;
}
/****添加计算宽度的--运算符直接需要space****/

799
dist/widget.js vendored

File diff suppressed because it is too large Load Diff

3
src/base/base.js

@ -6,6 +6,3 @@ BI.Tooltips = new BI.TooltipsController();
BI.Popovers = new BI.FloatBoxController();
BI.Broadcasts = new BI.BroadcastController();
BI.StyleLoaders = new BI.StyleLoaderManager();
BI.servletURL = "dist/";
BI.i18n = {};

2
src/base/canvas/canvas.js

@ -129,4 +129,4 @@ BI.Canvas = BI.inherit(BI.Widget, {
});
}
});
$.shortcut("bi.canvas", BI.Canvas);
BI.shortcut("bi.canvas", BI.Canvas);

2
src/base/collection/collection.js

@ -289,4 +289,4 @@ BI.Collection = BI.inherit(BI.Widget, {
}
});
BI.Collection.EVENT_SCROLL = "EVENT_SCROLL";
$.shortcut('bi.collection_view', BI.Collection);
BI.shortcut('bi.collection_view', BI.Collection);

2
src/base/combination/combo.js

@ -396,4 +396,4 @@ BI.Combo.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW";
BI.Combo.EVENT_BEFORE_HIDEVIEW = "EVENT_BEFORE_HIDEVIEW";
BI.Combo.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW";
$.shortcut("bi.combo", BI.Combo);
BI.shortcut("bi.combo", BI.Combo);

2
src/base/combination/expander.js

@ -275,4 +275,4 @@ BI.Expander.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW";
BI.Expander.EVENT_BEFORE_HIDEVIEW = "EVENT_BEFORE_HIDEVIEW";
BI.Expander.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW";
$.shortcut("bi.expander", BI.Expander);
BI.shortcut("bi.expander", BI.Expander);

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

@ -57,9 +57,11 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
self.setValue([]);
break;
}
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
self.fireEvent(BI.ButtonGroup.EVENT_CHANGE, value, obj);
}
} else {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
}
});
btn.on(BI.Events.DESTROY, function () {
BI.remove(self.buttons, btn);
@ -71,7 +73,6 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
_packageBtns: function (btns) {
var o = this.options;
for (var i = o.layouts.length - 1; i > 0; i--) {
btns = BI.map(btns, function (k, it) {
return BI.extend({}, o.layouts[i], {
@ -86,6 +87,18 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
return btns;
},
_packageSimpleItems: function (btns) {
var o = this.options;
return BI.map(o.items, function (i, item) {
if (BI.stripEL(item) === item) {
return btns[i];
}
return BI.extend({}, item, {
el: btns[i]
})
})
},
_packageItems: function (items, packBtns) {
return BI.createItems(BI.makeArrayByArray(items, {}), BI.clone(packBtns));
},
@ -101,6 +114,11 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
return layout;
},
//如果是一个简单的layout
_isSimpleLayout: function () {
var o = this.options;
return o.layouts.length === 1 && !BI.isArray(o.items[0])
},
doBehavior: function () {
var args = Array.prototype.slice.call(arguments);
@ -115,9 +133,7 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
var btns = this._btnsCreator.apply(this, arguments);
this.buttons = BI.concat(btns, this.buttons);
//如果是一个简单的layout
if (o.layouts.length === 1 && !BI.isNotEmptyArray(o.layouts[0].items)
&& this.layouts && this.layouts.prependItems) {
if (this._isSimpleLayout() && this.layouts && this.layouts.prependItems) {
this.layouts.prependItems(btns);
return;
}
@ -132,8 +148,7 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
this.buttons = BI.concat(this.buttons, btns);
//如果是一个简单的layout
if (o.layouts.length === 1 && !BI.isNotEmptyArray(o.layouts[0].items)
&& this.layouts && this.layouts.addItems) {
if (this._isSimpleLayout() && this.layouts && this.layouts.addItems) {
this.layouts.addItems(btns);
return;
}
@ -143,35 +158,33 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
},
removeItemAt: function (indexes) {
var self = this;
indexes = BI.isArray(indexes) ? indexes : [indexes];
var buttons = [];
BI.each(indexes, function (i, index) {
buttons.push(self.buttons[index]);
});
BI.each(buttons, function (i, btn) {
btn && btn.destroy();
})
BI.remove(this.buttons, indexes);
this.layouts.removeItemAt(indexes);
},
removeItems: function (v) {
v = BI.isArray(v) ? v : [v];
var indexes = [];
BI.each(this.buttons, function (i, item) {
if (BI.deepContains(v, item.getValue())) {
indexes.push(i);
removeItems: function (values) {
values = BI.isArray(values) ? values : [values];
var deleted = [];
BI.each(this.buttons, function (i, button) {
if (BI.deepContains(values, button.getValue())) {
deleted.push(i);
}
});
this.removeItemAt(indexes);
BI.remove(this.buttons, deleted);
this.layouts.removeItemAt(deleted);
},
populate: function (items) {
items = items || [];
this.options.items = items;
this.empty();
this.options.items = items;
this.buttons = this._btnsCreator.apply(this, arguments);
if (this._isSimpleLayout()) {
items = this._packageSimpleItems(this.buttons);
} else {
items = this._packageItems(items, this._packageBtns(this.buttons));
}
this.layouts = BI.createWidget(BI.extend({element: this}, this._packageLayout(items)));
},
@ -297,8 +310,14 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
return node;
},
empty: function () {
BI.ButtonGroup.superclass.empty.apply(this, arguments);
this.options.items = [];
},
destroy: function () {
BI.ButtonGroup.superclass.destroy.apply(this, arguments);
this.options.items = [];
}
});
BI.extend(BI.ButtonGroup, {
@ -310,4 +329,4 @@ BI.extend(BI.ButtonGroup, {
});
BI.ButtonGroup.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.button_group", BI.ButtonGroup);
BI.shortcut("bi.button_group", BI.ButtonGroup);

2
src/base/combination/group.combo.js

@ -98,4 +98,4 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
});
BI.ComboGroup.EVENT_CHANGE = "EVENT_CHANGE";
$.shortcut("bi.combo_group", BI.ComboGroup);
BI.shortcut("bi.combo_group", BI.ComboGroup);

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

Loading…
Cancel
Save