iapyang 7 years ago
parent
commit
1fe0df90fc
  1. 2
      demo/js/case/editor/demo.sign_editor.js
  2. 68
      dist/_fineui.min.js
  3. 39
      dist/base.css
  4. 9
      dist/base.js
  5. 64
      dist/bundle.css
  6. 228
      dist/bundle.js
  7. 2
      dist/bundle.min.css
  8. 88
      dist/bundle.min.js
  9. 148
      dist/case.js
  10. 13
      dist/core.css
  11. 6
      dist/core.js
  12. 10
      dist/core_without_normalize.css
  13. 2
      dist/demo.js
  14. 64
      dist/fineui.css
  15. 228
      dist/fineui.js
  16. 2
      dist/fineui.min.css
  17. 68
      dist/fineui.min.js
  18. 8
      dist/fix/fix.js
  19. 2
      dist/utils.min.js
  20. 12
      dist/widget.css
  21. 57
      dist/widget.js
  22. 6
      src/base/single/button/listitem/icontexticonitem.js
  23. 3
      src/base/single/button/listitem/icontextitem.js
  24. 5
      src/case/button/item.multiselect.js
  25. 1
      src/case/button/item.singleselect.icontext.js
  26. 53
      src/case/calendar/calendar.date.item.js
  27. 10
      src/case/calendar/calendar.js
  28. 11
      src/case/combo/icontextvaluecombo/combo.icontextvalue.js
  29. 4
      src/case/combo/icontextvaluecombo/popup.icontextvalue.js
  30. 10
      src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js
  31. 5
      src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js
  32. 5
      src/case/combo/textvaluecombo/combo.textvalue.js
  33. 23
      src/case/editor/editor.state.js
  34. 3
      src/case/list/list.select.js
  35. 5
      src/case/toolbar/toolbar.multiselect.js
  36. 9
      src/case/trigger/trigger.icon.text.js
  37. 3
      src/case/trigger/trigger.icon.text.select.js
  38. 2
      src/case/trigger/trigger.text.select.js
  39. 3
      src/core/func/function.js
  40. 3
      src/core/jquery.js
  41. 14
      src/css/base/combo/combo.css
  42. 4
      src/css/base/single/text.css
  43. 21
      src/css/base/tree/ztree.css
  44. 3
      src/css/core/normalize2.css
  45. 10
      src/css/core/utils/common.css
  46. 4
      src/css/widget/multiselect/multiselect.css
  47. 4
      src/css/widget/singleselect/multiselect.css
  48. 4
      src/css/widget/singletreecombo/singletreecombo.css
  49. 4
      src/less/base/combo/combo.less
  50. 8
      src/less/base/combo/combo.searchtextvalue.less
  51. 8
      src/less/base/combo/combo.textvalue.less
  52. 5
      src/less/base/single/text.less
  53. 35
      src/less/base/tree/ztree.less
  54. 4
      src/less/core/normalize2.less
  55. 10
      src/less/core/utils/common.less
  56. 10
      src/less/widget/multiselect/multiselect.combo.less
  57. 10
      src/less/widget/singleselect/multiselect.combo.less
  58. 11
      src/less/widget/singletreecombo/singletreecombo.less
  59. 2
      src/widget/date/calendar/popup.calendar.date.js
  60. 26
      src/widget/dynamicdate/dynamicdate.card.js
  61. 2
      src/widget/editor/editor.search.js
  62. 3
      src/widget/multiselect/multiselect.loader.js
  63. 4
      src/widget/multiselect/multiselect.loader.nobar.js
  64. 4
      src/widget/multiselect/search/multiselect.search.loader.js
  65. 2
      src/widget/numbereditor/number.editor.js
  66. 4
      src/widget/searchmultitextvaluecombo/multitextvalue.loader.search.js
  67. 5
      src/widget/selecttree/selecttree.combo.js
  68. 5
      src/widget/singletree/singletree.combo.js

2
demo/js/case/editor/demo.sign_editor.js

@ -8,7 +8,7 @@ Demo.SignEditor = BI.inherit(BI.Widget, {
render: function () { render: function () {
var editor = BI.createWidget({ var editor = BI.createWidget({
type: "bi.sign_editor", type: "bi.sign_editor",
cls: "bi-border", cls: "bi-border bi-focus-shadow",
validationChecker: function (v) { validationChecker: function (v) {
return v != "abc"; return v != "abc";
}, },

68
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

39
dist/base.css vendored

@ -422,6 +422,12 @@
display: block !important; display: block !important;
visibility: visible !important; visibility: visible !important;
} }
.bi-combo.bi-combo-popup:focus,
.bi-combo.bi-combo-popup:focus-within {
-webkit-box-shadow: 0 0 5px 2px #d7e7fc;
-moz-box-shadow: 0 0 5px 2px #d7e7fc;
box-shadow: 0 0 5px 2px #d7e7fc;
}
.bi-search-text-value-combo .trigger-icon-button { .bi-search-text-value-combo .trigger-icon-button {
font-size: 16px; font-size: 16px;
@ -441,6 +447,10 @@
.bi-search-text-value-combo.combo-show .trigger-down { .bi-search-text-value-combo.combo-show .trigger-down {
display: none; display: none;
} }
.bi-combo.bi-combo-popup > .bi-search-text-value-trigger,
.bi-combo:hover > .bi-search-text-value-trigger {
border-color: #3685f2;
}
.bi-icon-text-value-combo.combo-error .bi-text-trigger .select-text-label { .bi-icon-text-value-combo.combo-error .bi-text-trigger .select-text-label {
color: #ff4949; color: #ff4949;
@ -449,6 +459,10 @@
.bi-text-value-combo.combo-error .bi-select-text-trigger .select-text-label { .bi-text-value-combo.combo-error .bi-select-text-trigger .select-text-label {
color: #ff4949; color: #ff4949;
} }
.bi-combo.bi-combo-popup > .bi-select-text-trigger,
.bi-combo:hover > .bi-select-text-trigger {
border-color: #3685f2;
}
/*************BI.SearchEditor******************/ /*************BI.SearchEditor******************/
.bi-search-editor { .bi-search-editor {
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
@ -1569,6 +1583,10 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ /*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
word-break: break-word; word-break: break-word;
} }
.bi-text:before {
content: '';
display: block;
}
.bi-bubble .bubble-text { .bi-bubble .bubble-text {
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;
@ -1986,6 +2004,15 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
vertical-align: top; vertical-align: top;
display: inline-block; display: inline-block;
} }
.ztree li a:hover {
background-color: rgba(54, 133, 242, 0.06);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0f3685f2,endColorstr=#0f3685f2);
}
.ztree li a:active {
color: #3685f2;
background-color: rgba(54, 133, 242, 0.06);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0f3685f2,endColorstr=#0f3685f2);
}
.ztree li a.curSelectedNode_Edit { .ztree li a.curSelectedNode_Edit {
padding-top: 0px; padding-top: 0px;
background-color: #FFE6B0; background-color: #FFE6B0;
@ -2069,6 +2096,18 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
.ztree li span.button.chk.radio_true_part_focus { .ztree li span.button.chk.radio_true_part_focus {
background-position: -42px -42px; background-position: -42px -42px;
} }
.ztree li span.button.chk.checkbox_true_full + a {
color: #3685f2;
}
.ztree li span.button.chk.checkbox_true_full_focus + a {
color: #3685f2;
}
.ztree li span.button.chk.checkbox_true_part + a {
color: #3685f2;
}
.ztree li span.button.chk.checkbox_true_part_focus + a {
color: #3685f2;
}
.ztree li span.button.chk.radio_true_disable { .ztree li span.button.chk.radio_true_disable {
background-position: -42px -56px; background-position: -42px -56px;
} }

9
dist/base.js vendored

@ -17353,14 +17353,14 @@ BI.IconTextIconItem = BI.inherit(BI.BasicButton, {
var icon1 = BI.createWidget({ var icon1 = BI.createWidget({
type: "bi.icon_label", type: "bi.icon_label",
cls: o.iconCls1, cls: o.iconCls1,
width: o.height, width: o.leftIconWrapperWidth,
height: o.height, height: o.height,
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
iconHeight: o.iconHeight iconHeight: o.iconHeight
}); });
var blank = BI.createWidget({ var blank = BI.createWidget({
type: "bi.layout", type: "bi.layout",
width: o.height, width: o.height
}); });
BI.createWidget({ BI.createWidget({
type: "bi.absolute", type: "bi.absolute",
@ -17369,7 +17369,7 @@ BI.IconTextIconItem = BI.inherit(BI.BasicButton, {
el: { el: {
type: "bi.icon_label", type: "bi.icon_label",
cls: o.iconCls2, cls: o.iconCls2,
width: o.height, width: o.rightIconWrapperWidth,
height: o.height, height: o.height,
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
iconHeight: o.iconHeight iconHeight: o.iconHeight
@ -17446,6 +17446,7 @@ BI.IconTextItem = BI.inherit(BI.BasicButton, {
logic: { logic: {
dynamic: false dynamic: false
}, },
iconWrapperWidth: null,
iconHeight: null, iconHeight: null,
iconWidth: null, iconWidth: null,
textHgap: 0, textHgap: 0,
@ -17472,7 +17473,7 @@ BI.IconTextItem = BI.inherit(BI.BasicButton, {
}); });
this.icon = BI.createWidget({ this.icon = BI.createWidget({
type: "bi.icon_label", type: "bi.icon_label",
width: o.height, width: o.iconWrapperWidth || o.height,
height: o.height, height: o.height,
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
iconHeight: o.iconHeight iconHeight: o.iconHeight

64
dist/bundle.css vendored

@ -249,6 +249,9 @@ a {
a:focus { a:focus {
outline: 0; outline: 0;
} }
div:focus {
outline: none;
}
input::-webkit-contacts-auto-fill-button { input::-webkit-contacts-auto-fill-button {
visibility: hidden; visibility: hidden;
display: none !important; display: none !important;
@ -309,6 +312,16 @@ textarea {
.bi-theme-dark .base-disabled .b-font:before { .bi-theme-dark .base-disabled .b-font:before {
color: #606479 !important; color: #606479 !important;
} }
.bi-focus-shadow:focus-within,
.bi-focus-shadow:focus {
border-color: #3685f2;
-webkit-box-shadow: 0 0 5px 2px #d7e7fc;
-moz-box-shadow: 0 0 5px 2px #d7e7fc;
box-shadow: 0 0 5px 2px #d7e7fc;
}
.bi-focus-shadow:hover {
border-color: #3685f2;
}
.base-invalid { .base-invalid {
cursor: default !important; cursor: default !important;
} }
@ -2271,6 +2284,12 @@ textarea {
display: block !important; display: block !important;
visibility: visible !important; visibility: visible !important;
} }
.bi-combo.bi-combo-popup:focus,
.bi-combo.bi-combo-popup:focus-within {
-webkit-box-shadow: 0 0 5px 2px #d7e7fc;
-moz-box-shadow: 0 0 5px 2px #d7e7fc;
box-shadow: 0 0 5px 2px #d7e7fc;
}
.bi-search-text-value-combo .trigger-icon-button { .bi-search-text-value-combo .trigger-icon-button {
font-size: 16px; font-size: 16px;
@ -2290,6 +2309,10 @@ textarea {
.bi-search-text-value-combo.combo-show .trigger-down { .bi-search-text-value-combo.combo-show .trigger-down {
display: none; display: none;
} }
.bi-combo.bi-combo-popup > .bi-search-text-value-trigger,
.bi-combo:hover > .bi-search-text-value-trigger {
border-color: #3685f2;
}
.bi-icon-text-value-combo.combo-error .bi-text-trigger .select-text-label { .bi-icon-text-value-combo.combo-error .bi-text-trigger .select-text-label {
color: #ff4949; color: #ff4949;
@ -2298,6 +2321,10 @@ textarea {
.bi-text-value-combo.combo-error .bi-select-text-trigger .select-text-label { .bi-text-value-combo.combo-error .bi-select-text-trigger .select-text-label {
color: #ff4949; color: #ff4949;
} }
.bi-combo.bi-combo-popup > .bi-select-text-trigger,
.bi-combo:hover > .bi-select-text-trigger {
border-color: #3685f2;
}
/*************BI.SearchEditor******************/ /*************BI.SearchEditor******************/
.bi-search-editor { .bi-search-editor {
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
@ -3418,6 +3445,10 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ /*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
word-break: break-word; word-break: break-word;
} }
.bi-text:before {
content: '';
display: block;
}
.bi-bubble .bubble-text { .bi-bubble .bubble-text {
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;
@ -3835,6 +3866,15 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
vertical-align: top; vertical-align: top;
display: inline-block; display: inline-block;
} }
.ztree li a:hover {
background-color: rgba(54, 133, 242, 0.06);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0f3685f2,endColorstr=#0f3685f2);
}
.ztree li a:active {
color: #3685f2;
background-color: rgba(54, 133, 242, 0.06);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0f3685f2,endColorstr=#0f3685f2);
}
.ztree li a.curSelectedNode_Edit { .ztree li a.curSelectedNode_Edit {
padding-top: 0px; padding-top: 0px;
background-color: #FFE6B0; background-color: #FFE6B0;
@ -3918,6 +3958,18 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
.ztree li span.button.chk.radio_true_part_focus { .ztree li span.button.chk.radio_true_part_focus {
background-position: -42px -42px; background-position: -42px -42px;
} }
.ztree li span.button.chk.checkbox_true_full + a {
color: #3685f2;
}
.ztree li span.button.chk.checkbox_true_full_focus + a {
color: #3685f2;
}
.ztree li span.button.chk.checkbox_true_part + a {
color: #3685f2;
}
.ztree li span.button.chk.checkbox_true_part_focus + a {
color: #3685f2;
}
.ztree li span.button.chk.radio_true_disable { .ztree li span.button.chk.radio_true_disable {
background-position: -42px -56px; background-position: -42px -56px;
} }
@ -4203,6 +4255,10 @@ ul.ztree.zTreeDragUL {
.bi-multi-select-combo.combo-show .trigger-down { .bi-multi-select-combo.combo-show .trigger-down {
display: none; display: none;
} }
.bi-combo.bi-combo-popup:focus > .bi-multi-select-trigger,
.bi-combo.bi-combo-popup:hover > .bi-multi-select-trigger {
border-color: #3685f2;
}
.bi-multi-select-insert-combo .multi-select-trigger-icon-button { .bi-multi-select-insert-combo .multi-select-trigger-icon-button {
font-size: 16px; font-size: 16px;
@ -4456,6 +4512,10 @@ ul.ztree.zTreeDragUL {
.bi-single-select-combo.combo-show .trigger-down { .bi-single-select-combo.combo-show .trigger-down {
display: none; display: none;
} }
.bi-combo.bi-combo-popup:focus > .bi-single-select-trigger,
.bi-combo.bi-combo-popup:hover > .bi-single-select-trigger {
border-color: #3685f2;
}
.bi-single-slider-label { .bi-single-slider-label {
min-height: 50px; min-height: 50px;
} }
@ -4517,6 +4577,10 @@ ul.ztree.zTreeDragUL {
-moz-border-radius: 3px; -moz-border-radius: 3px;
border-radius: 3px; border-radius: 3px;
} }
.bi-combo.bi-combo-popup:focus > .bi-single-tree-trigger,
.bi-combo.bi-combo-popup:hover > .bi-single-tree-trigger {
border-color: #3685f2;
}
.bi-date-interval.time-error .bi-input { .bi-date-interval.time-error .bi-input {
color: #ff4949; color: #ff4949;
} }

228
dist/bundle.js vendored

@ -9402,6 +9402,9 @@ jQuery.fn.offset = function( options ) {
offsetLeft += el.offsetLeft; offsetLeft += el.offsetLeft;
offsetTop += el.offsetTop; offsetTop += el.offsetTop;
offsetLeft -= el.scrollLeft;
offsetTop -= el.scrollTop;
el = el.offsetParent; el = el.offsetParent;
} while( el ); } while( el );
win = getWindow( doc ); win = getWindow( doc );
@ -28833,11 +28836,12 @@ BI.extend(BI.DOM, {
ctx.fillText(param, 6 * ratio, 12 * ratio); ctx.fillText(param, 6 * ratio, 12 * ratio);
$(canvas).destroy(); $(canvas).destroy();
var backColor = backgroundColor || "#EAF2FD"; var backColor = backgroundColor || "#EAF2FD";
// IE可以放大缩小所以要固定最大最小宽高
return { return {
width: w, width: w,
height: 24, height: 24,
src: canvas.toDataURL("image/png"), src: canvas.toDataURL("image/png"),
style: "background-color: " + backColor + ";vertical-align: middle; margin: 0 3px; width:" + w + "px;height: 24px", style: "background-color: " + backColor + ";vertical-align: middle; margin: 0 3px; width:" + w + "px;height: 24px; max-width:" + w + "px;max-height: 24px; min-width:" + w + "px;min-height: 24px",
param: param param: param
}; };
} }
@ -35106,7 +35110,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
}, },
set: function reactiveSetter(newVal) { set: function reactiveSetter(newVal) {
var value = childOb ? childOb.model : val; var value = childOb ? childOb.model : val;
if (newVal === value || (newVal !== newVal && value !== value)) { if (newVal === value || newVal !== newVal && value !== value) {
return; return;
} }
val = newVal; val = newVal;
@ -35300,7 +35304,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
} catch (e) { } catch (e) {
// if (this.user) { // if (this.user) {
// } else { // } else {
console.error(e); // console.error(e)
// } // }
} finally { } finally {
// "touch" every property so they are all tracked as // "touch" every property so they are all tracked as
@ -35369,13 +35373,13 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
try { try {
this.cb.call(this.vm, value, oldValue, options); this.cb.call(this.vm, value, oldValue, options);
} catch (e) { } catch (e) {
console.log(e); console.error(e);
} }
} else { } else {
try { try {
this.cb.call(this.vm, value, oldValue, options); this.cb.call(this.vm, value, oldValue, options);
} catch (e) { } catch (e) {
console.log(e); console.error(e);
} }
} }
} }
@ -53271,14 +53275,14 @@ BI.IconTextIconItem = BI.inherit(BI.BasicButton, {
var icon1 = BI.createWidget({ var icon1 = BI.createWidget({
type: "bi.icon_label", type: "bi.icon_label",
cls: o.iconCls1, cls: o.iconCls1,
width: o.height, width: o.leftIconWrapperWidth,
height: o.height, height: o.height,
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
iconHeight: o.iconHeight iconHeight: o.iconHeight
}); });
var blank = BI.createWidget({ var blank = BI.createWidget({
type: "bi.layout", type: "bi.layout",
width: o.height, width: o.height
}); });
BI.createWidget({ BI.createWidget({
type: "bi.absolute", type: "bi.absolute",
@ -53287,7 +53291,7 @@ BI.IconTextIconItem = BI.inherit(BI.BasicButton, {
el: { el: {
type: "bi.icon_label", type: "bi.icon_label",
cls: o.iconCls2, cls: o.iconCls2,
width: o.height, width: o.rightIconWrapperWidth,
height: o.height, height: o.height,
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
iconHeight: o.iconHeight iconHeight: o.iconHeight
@ -53364,6 +53368,7 @@ BI.IconTextItem = BI.inherit(BI.BasicButton, {
logic: { logic: {
dynamic: false dynamic: false
}, },
iconWrapperWidth: null,
iconHeight: null, iconHeight: null,
iconWidth: null, iconWidth: null,
textHgap: 0, textHgap: 0,
@ -53390,7 +53395,7 @@ BI.IconTextItem = BI.inherit(BI.BasicButton, {
}); });
this.icon = BI.createWidget({ this.icon = BI.createWidget({
type: "bi.icon_label", type: "bi.icon_label",
width: o.height, width: o.iconWrapperWidth || o.height,
height: o.height, height: o.height,
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
iconHeight: o.iconHeight iconHeight: o.iconHeight
@ -72843,7 +72848,8 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
height: 24, height: 24,
logic: { logic: {
dynamic: false dynamic: false
} },
iconWrapperWidth: 26
}); });
}, },
_init: function () { _init: function () {
@ -72878,7 +72884,7 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
items: BI.LogicFactory.createLogicItemsByDirection("left", { items: BI.LogicFactory.createLogicItemsByDirection("left", {
type: "bi.center_adapt", type: "bi.center_adapt",
items: [this.checkbox], items: [this.checkbox],
width: 26 width: o.iconWrapperWidth
}, this.text) }, this.text)
})))); }))));
}, },
@ -72927,6 +72933,7 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
element: this, element: this,
cls: o.iconCls, cls: o.iconCls,
once: o.once, once: o.once,
iconWrapperWidth: o.iconWrapperWidth,
selected: o.selected, selected: o.selected,
height: o.height, height: o.height,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
@ -74276,6 +74283,58 @@ BI.TreeTextLeafItem = BI.inherit(BI.BasicButton, {
}); });
BI.shortcut("bi.tree_text_leaf_item", BI.TreeTextLeafItem);/** BI.shortcut("bi.tree_text_leaf_item", BI.TreeTextLeafItem);/**
* 专门为calendar的视觉加的button作为私有button,不能配置任何属性也不要用这个玩意
*/
BI.CalendarDateItem = BI.inherit(BI.BasicButton, {
render: function () {
var self = this, o = this.options;
return {
type: "bi.absolute",
items: [{
el: {
type: "bi.text_item",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "normal",
text: o.text,
value: o.value,
ref: function () {
self.text = this;
}
},
left: o.lgap,
right: o.rgap,
top: 0,
bottom: 0
}]
};
},
doHighLight: function () {
this.text.doHighLight.apply(this.text, arguments);
},
unHighLight: function () {
this.text.unHighLight.apply(this.text, arguments);
},
setValue: function () {
if (!this.isReadOnly()) {
this.text.setValue.apply(this.text, arguments);
}
},
setSelected: function (b) {
BI.CalendarDateItem.superclass.setSelected.apply(this, arguments);
this.text.setSelected(b);
},
getValue: function () {
return this.text.getValue();
}
});
BI.shortcut("bi.calendar_date_item", BI.CalendarDateItem);/**
* Created by GUY on 2015/8/28. * Created by GUY on 2015/8/28.
* @class BI.Calendar * @class BI.Calendar
* @extends BI.Widget * @extends BI.Widget
@ -74364,7 +74423,7 @@ BI.Calendar = BI.inherit(BI.Widget, {
items: items, items: items,
layouts: [{ layouts: [{
type: "bi.center", type: "bi.center",
hgap: 10, lgap: 10,
vgap: 10 vgap: 10
}] }]
}); });
@ -74381,15 +74440,16 @@ BI.Calendar = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) { return BI.map(item, function (j, td) {
var month = td.lastMonth ? o.month - 1 : (td.nextMonth ? o.month + 1 : o.month); var month = td.lastMonth ? o.month - 1 : (td.nextMonth ? o.month + 1 : o.month);
return BI.extend(td, { return BI.extend(td, {
type: "bi.text_item", type: "bi.calendar_date_item",
cls: "bi-list-item-select",
textAlign: "center", textAlign: "center",
whiteSpace: "normal", whiteSpace: "normal",
once: false, once: false,
forceSelected: true, forceSelected: true,
height: 24, height: 24,
value: o.year + "-" + month + "-" + td.text, value: o.year + "-" + month + "-" + td.text,
disabled: td.lastMonth || td.nextMonth || td.disabled disabled: td.lastMonth || td.nextMonth || td.disabled,
lgap: 10,
rgap: 0
// selected: td.currentDay // selected: td.currentDay
}); });
}); });
@ -74403,7 +74463,6 @@ BI.Calendar = BI.inherit(BI.Widget, {
rows: 6, rows: 6,
columnSize: [1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7], columnSize: [1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7],
rowSize: 24, rowSize: 24,
hgap: 10,
vgap: 10 vgap: 10
}))] }))]
}); });
@ -78608,7 +78667,10 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
height: 24, height: 24,
iconHeight: null, iconHeight: null,
iconWidth: null, iconWidth: null,
value: "" value: "",
attributes: {
tabIndex: 0
}
}); });
}, },
@ -78623,14 +78685,16 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
iconCls: o.iconCls, iconCls: o.iconCls,
value: o.value, value: o.value,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
iconWidth: o.iconWidth iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth
}); });
this.popup = BI.createWidget({ this.popup = BI.createWidget({
type: "bi.icon_text_value_combo_popup", type: "bi.icon_text_value_combo_popup",
items: o.items, items: o.items,
value: o.value, value: o.value,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
iconWidth: o.iconWidth iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth
}); });
this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE, function () { this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE, function () {
self.setValue(self.popup.getValue()); self.setValue(self.popup.getValue());
@ -78706,7 +78770,8 @@ BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
type: "bi.single_select_icon_text_item", type: "bi.single_select_icon_text_item",
height: 24, height: 24,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
iconWidth: o.iconWidth iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth
}), }),
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
layouts: [{ layouts: [{
@ -78736,6 +78801,7 @@ BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
items = BI.createItems(items, { items = BI.createItems(items, {
type: "bi.single_select_icon_text_item", type: "bi.single_select_icon_text_item",
height: 24, height: 24,
iconWrapperWidth: o.iconWrapperWidth,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
iconWidth: o.iconWidth iconWidth: o.iconWidth
}); });
@ -78779,6 +78845,9 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
ref: function () { ref: function () {
self.combo = this; self.combo = this;
}, },
attributes: {
tabIndex: 0
},
el: { el: {
type: "bi.search_text_value_trigger", type: "bi.search_text_value_trigger",
ref: function () { ref: function () {
@ -78790,6 +78859,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
value: o.value, value: o.value,
tipType: o.tipType, tipType: o.tipType,
warningTitle: o.warningTitle, warningTitle: o.warningTitle,
title: o.title,
listeners: [{ listeners: [{
eventName: BI.SearchTextValueTrigger.EVENT_CHANGE, eventName: BI.SearchTextValueTrigger.EVENT_CHANGE,
action: function () { action: function () {
@ -78800,14 +78870,14 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
}] }]
}, },
popup: { popup: {
el:{ el: {
type: "bi.text_value_combo_popup", type: "bi.text_value_combo_popup",
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
value: o.value, value: o.value,
items: o.items, items: o.items,
ref: function () { ref: function () {
self.popup = this; self.popup = this;
self.trigger.getSearcher().setAdapter(self.popup); // self.trigger.getSearcher().setAdapter(self.popup);
}, },
listeners: [{ listeners: [{
eventName: BI.TextValueComboPopup.EVENT_CHANGE, eventName: BI.TextValueComboPopup.EVENT_CHANGE,
@ -78823,7 +78893,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
listeners: [{ listeners: [{
eventName: BI.Combo.EVENT_AFTER_HIDEVIEW, eventName: BI.Combo.EVENT_AFTER_HIDEVIEW,
action: function () { action: function () {
self.trigger.stopEditing(); // self.trigger.stopEditing();
self.element.removeClass("combo-show"); self.element.removeClass("combo-show");
} }
}, { }, {
@ -78977,7 +79047,7 @@ BI.shortcut("bi.search_text_value_combo_popup", BI.SearchTextValueComboPopup);/*
BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
props: { props: {
baseCls: "bi-search-text-value-trigger bi-border", baseCls: "bi-search-text-value-trigger bi-border bi-focus-shadow",
height: 24 height: 24
}, },
@ -79000,7 +79070,8 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
}, },
text: this._digest(o.value, o.items), text: this._digest(o.value, o.items),
value: o.value, value: o.value,
height: o.height height: o.height,
tipText: ""
}, },
popup: { popup: {
type: "bi.search_text_value_combo_popup", type: "bi.search_text_value_combo_popup",
@ -79367,7 +79438,10 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
height: 24, height: 24,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
text: "", text: "",
value: "" value: "",
attributes: {
tabIndex: 0
}
}); });
}, },
@ -80724,6 +80798,16 @@ BI.StateEditor = BI.inherit(BI.Widget, {
self._showInput(); self._showInput();
self.editor.focus(); self.editor.focus();
self.editor.setValue(""); self.editor.setValue("");
},
title: BI.isNotNull(o.tipText) ? o.tipText : function () {
var title = "";
if (BI.isString(self.stateValue)) {
title = self.stateValue;
}
if (BI.isArray(self.stateValue) && self.stateValue.length === 1) {
title = self.stateValue[0];
}
return title;
} }
}); });
this.text.on(BI.TextButton.EVENT_CHANGE, function () { this.text.on(BI.TextButton.EVENT_CHANGE, function () {
@ -80883,32 +80967,23 @@ BI.StateEditor = BI.inherit(BI.Widget, {
setState: function (v) { setState: function (v) {
var o = this.options; var o = this.options;
BI.StateEditor.superclass.setValue.apply(this, arguments); BI.StateEditor.superclass.setValue.apply(this, arguments);
this.stateValue = v;
if (BI.isNumber(v)) { if (BI.isNumber(v)) {
if (v === BI.Selection.All) { if (v === BI.Selection.All) {
this.text.setText(BI.i18nText("BI-Select_All")); this.text.setText(BI.i18nText("BI-Select_All"));
this.text.setTitle("");
this.text.element.removeClass("state-editor-infinite-text"); this.text.element.removeClass("state-editor-infinite-text");
} else if (v === BI.Selection.Multi) { } else if (v === BI.Selection.Multi) {
this.text.setText(BI.i18nText("BI-Select_Part")); this.text.setText(BI.i18nText("BI-Select_Part"));
this.text.setTitle("");
this.text.element.removeClass("state-editor-infinite-text"); this.text.element.removeClass("state-editor-infinite-text");
} else { } else {
this.text.setText(o.text); this.text.setText(o.text);
this.text.setTitle("");
this.text.element.addClass("state-editor-infinite-text"); this.text.element.addClass("state-editor-infinite-text");
} }
return; return;
} }
if (BI.isString(v)) { if (BI.isString(v)) {
// if (BI.isEmpty(v)) {
// this.text.setText(o.text);
// this.text.setTitle("");
// this.text.element.addClass("state-editor-infinite-text");
// } else {
this.text.setText(v); this.text.setText(v);
this.text.setTitle(v);
this.text.element.removeClass("state-editor-infinite-text"); this.text.element.removeClass("state-editor-infinite-text");
// }
return; return;
} }
if (BI.isArray(v)) { if (BI.isArray(v)) {
@ -80917,11 +80992,9 @@ BI.StateEditor = BI.inherit(BI.Widget, {
this.text.element.addClass("state-editor-infinite-text"); this.text.element.addClass("state-editor-infinite-text");
} else if (v.length === 1) { } else if (v.length === 1) {
this.text.setText(v[0]); this.text.setText(v[0]);
this.text.setTitle(v[0]);
this.text.element.removeClass("state-editor-infinite-text"); this.text.element.removeClass("state-editor-infinite-text");
} else { } else {
this.text.setText(BI.i18nText("BI-Select_Part")); this.text.setText(BI.i18nText("BI-Select_Part"));
this.text.setTitle("");
this.text.element.removeClass("state-editor-infinite-text"); this.text.element.removeClass("state-editor-infinite-text");
} }
} }
@ -81696,7 +81769,8 @@ BI.SelectList = BI.inherit(BI.Widget, {
hasNext: BI.emptyFn, hasNext: BI.emptyFn,
onLoaded: BI.emptyFn, onLoaded: BI.emptyFn,
toolbar: { toolbar: {
type: "bi.multi_select_bar" type: "bi.multi_select_bar",
iconWrapperWidth: 36
}, },
el: { el: {
type: "bi.list_pane" type: "bi.list_pane"
@ -86538,7 +86612,8 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
isHalfCheckedBySelectedValue: function (selectedValues) { isHalfCheckedBySelectedValue: function (selectedValues) {
return selectedValues.length > 0; return selectedValues.length > 0;
}, },
halfSelected: false halfSelected: false,
iconWrapperWidth: 26
}); });
}, },
_init: function () { _init: function () {
@ -86591,7 +86666,7 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
type: "bi.htape", type: "bi.htape",
element: this, element: this,
items: [{ items: [{
width: 26, width: o.iconWrapperWidth,
el: { el: {
type: "bi.center_adapt", type: "bi.center_adapt",
items: [this.checkbox, this.half] items: [this.checkbox, this.half]
@ -87816,8 +87891,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
cls: "select-text-label", cls: "select-text-label",
textAlign: "left", textAlign: "left",
height: o.height, height: o.height,
text: o.text, text: o.text
hgap: c.hgap
}); });
this.trigerButton = BI.createWidget({ this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button", type: "bi.trigger_icon_button",
@ -87842,7 +87916,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
disableSelected: true disableSelected: true
}, },
width: BI.isEmptyString(o.iconCls) ? 0 : (o.triggerWidth || o.height) width: BI.isEmptyString(o.iconCls) ? 0 : (o.iconWrapperWidth || o.height)
}, },
{ {
el: this.text el: this.text
@ -87868,8 +87942,8 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
this.wrapper.resize(); this.wrapper.resize();
} }
}else{ }else{
if(iconItem.width !== (o.triggerWidth || o.height)) { if(iconItem.width !== (o.iconWrapperWidth || o.height)) {
iconItem.width = (o.triggerWidth || o.height); iconItem.width = (o.iconWrapperWidth || o.height);
this.wrapper.resize(); this.wrapper.resize();
} }
} }
@ -87906,7 +87980,8 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
iconCls: obj.iconCls, iconCls: obj.iconCls,
height: o.height, height: o.height,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
iconWidth: o.iconWidth iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth
}); });
}, },
@ -88017,7 +88092,7 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-text-trigger bi-border", baseCls: "bi-select-text-trigger bi-border bi-focus-shadow",
height: 24 height: 24
}); });
}, },
@ -89099,7 +89174,7 @@ BI.DateCalendarPopup = BI.inherit(BI.Widget, {
element: this, element: this,
items: [{ items: [{
el: this.calendar, el: this.calendar,
left: 10, left: 0,
right: 10 right: 10
}, { }, {
el: { el: {
@ -91211,8 +91286,7 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
self.fireEvent("EVENT_CHANGE"); self.fireEvent("EVENT_CHANGE");
} }
}] }]
}, }
bgap: 5
}], }],
ref: function () { ref: function () {
self.workDay = this; self.workDay = this;
@ -91238,16 +91312,19 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
var self = this; var self = this;
var items = BI.map(values, function (idx, value) { var items = BI.map(values, function (idx, value) {
return { return {
type: "bi.dynamic_date_param_item", el: {
dateType: value.dateType, type: "bi.dynamic_date_param_item",
value: value.value, dateType: value.dateType,
offset: value.offset, value: value.value,
listeners: [{ offset: value.offset,
eventName: "EVENT_CHANGE", listeners: [{
action: function () { eventName: "EVENT_CHANGE",
self.fireEvent("EVENT_CHANGE"); action: function () {
} self.fireEvent("EVENT_CHANGE");
}] }
}]
},
tgap: idx === 0 ? 5 : 0
}; };
}); });
@ -93327,7 +93404,7 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.SearchEditor.superclass._defaultConfig.apply(this, arguments); var conf = BI.SearchEditor.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
baseCls: "bi-search-editor bi-border", baseCls: "bi-search-editor bi-border bi-focus-shadow",
height: 24, height: 24,
errorText: "", errorText: "",
watermark: BI.i18nText("BI-Basic_Search"), watermark: BI.i18nText("BI-Basic_Search"),
@ -98822,7 +98899,8 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, {
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active", cls: "bi-list-item-active",
height: 24, height: 24,
selected: this.isAllSelected() selected: this.isAllSelected(),
iconWrapperWidth: 36
}); });
}, },
@ -98996,8 +99074,10 @@ BI.MultiSelectNoBarLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.multi_select_item", type: "bi.multi_select_item",
cls: "bi-list-item-active",
logic: this.options.logic, logic: this.options.logic,
height: 24 height: 24,
iconWrapperWidth: 36
}); });
}, },
@ -99592,7 +99672,9 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
dynamic: false dynamic: false
}, },
height: 24, height: 24,
selected: this.isAllSelected() selected: this.isAllSelected(),
cls: "bi-list-item-active",
iconWrapperWidth: 36
}); });
}, },
@ -102409,7 +102491,7 @@ BI.shortcut("bi.multi_tree_searcher", BI.MultiTreeSearcher);/**
BI.NumberEditor = BI.inherit(BI.Widget, { BI.NumberEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-number-editor bi-border", baseCls: "bi-number-editor bi-border bi-focus-shadow",
validationChecker: function () { validationChecker: function () {
return true; return true;
}, },
@ -105046,8 +105128,10 @@ BI.SearchMultiSelectLoader = BI.inherit(BI.Widget, {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.multi_select_item", type: "bi.multi_select_item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active",
height: 24, height: 24,
selected: this.isAllSelected() selected: this.isAllSelected(),
iconWrapperWidth: 36
}); });
}, },
@ -105628,7 +105712,10 @@ BI.SelectTreeCombo = BI.inherit(BI.Widget, {
height: 30, height: 30,
text: "", text: "",
items: [], items: [],
value: "" value: "",
attributes: {
tabIndex: 0
}
}); });
}, },
@ -109355,7 +109442,10 @@ BI.SingleTreeCombo = BI.inherit(BI.Widget, {
height: 24, height: 24,
text: "", text: "",
items: [], items: [],
value: "" value: "",
attributes: {
tabIndex: 0
}
}); });
}, },

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

88
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

148
dist/case.js vendored

@ -164,7 +164,8 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
height: 24, height: 24,
logic: { logic: {
dynamic: false dynamic: false
} },
iconWrapperWidth: 26
}); });
}, },
_init: function () { _init: function () {
@ -199,7 +200,7 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
items: BI.LogicFactory.createLogicItemsByDirection("left", { items: BI.LogicFactory.createLogicItemsByDirection("left", {
type: "bi.center_adapt", type: "bi.center_adapt",
items: [this.checkbox], items: [this.checkbox],
width: 26 width: o.iconWrapperWidth
}, this.text) }, this.text)
})))); }))));
}, },
@ -248,6 +249,7 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
element: this, element: this,
cls: o.iconCls, cls: o.iconCls,
once: o.once, once: o.once,
iconWrapperWidth: o.iconWrapperWidth,
selected: o.selected, selected: o.selected,
height: o.height, height: o.height,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
@ -1597,6 +1599,58 @@ BI.TreeTextLeafItem = BI.inherit(BI.BasicButton, {
}); });
BI.shortcut("bi.tree_text_leaf_item", BI.TreeTextLeafItem);/** BI.shortcut("bi.tree_text_leaf_item", BI.TreeTextLeafItem);/**
* 专门为calendar的视觉加的button作为私有button,不能配置任何属性也不要用这个玩意
*/
BI.CalendarDateItem = BI.inherit(BI.BasicButton, {
render: function () {
var self = this, o = this.options;
return {
type: "bi.absolute",
items: [{
el: {
type: "bi.text_item",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "normal",
text: o.text,
value: o.value,
ref: function () {
self.text = this;
}
},
left: o.lgap,
right: o.rgap,
top: 0,
bottom: 0
}]
};
},
doHighLight: function () {
this.text.doHighLight.apply(this.text, arguments);
},
unHighLight: function () {
this.text.unHighLight.apply(this.text, arguments);
},
setValue: function () {
if (!this.isReadOnly()) {
this.text.setValue.apply(this.text, arguments);
}
},
setSelected: function (b) {
BI.CalendarDateItem.superclass.setSelected.apply(this, arguments);
this.text.setSelected(b);
},
getValue: function () {
return this.text.getValue();
}
});
BI.shortcut("bi.calendar_date_item", BI.CalendarDateItem);/**
* Created by GUY on 2015/8/28. * Created by GUY on 2015/8/28.
* @class BI.Calendar * @class BI.Calendar
* @extends BI.Widget * @extends BI.Widget
@ -1685,7 +1739,7 @@ BI.Calendar = BI.inherit(BI.Widget, {
items: items, items: items,
layouts: [{ layouts: [{
type: "bi.center", type: "bi.center",
hgap: 10, lgap: 10,
vgap: 10 vgap: 10
}] }]
}); });
@ -1702,15 +1756,16 @@ BI.Calendar = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) { return BI.map(item, function (j, td) {
var month = td.lastMonth ? o.month - 1 : (td.nextMonth ? o.month + 1 : o.month); var month = td.lastMonth ? o.month - 1 : (td.nextMonth ? o.month + 1 : o.month);
return BI.extend(td, { return BI.extend(td, {
type: "bi.text_item", type: "bi.calendar_date_item",
cls: "bi-list-item-select",
textAlign: "center", textAlign: "center",
whiteSpace: "normal", whiteSpace: "normal",
once: false, once: false,
forceSelected: true, forceSelected: true,
height: 24, height: 24,
value: o.year + "-" + month + "-" + td.text, value: o.year + "-" + month + "-" + td.text,
disabled: td.lastMonth || td.nextMonth || td.disabled disabled: td.lastMonth || td.nextMonth || td.disabled,
lgap: 10,
rgap: 0
// selected: td.currentDay // selected: td.currentDay
}); });
}); });
@ -1724,7 +1779,6 @@ BI.Calendar = BI.inherit(BI.Widget, {
rows: 6, rows: 6,
columnSize: [1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7], columnSize: [1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7],
rowSize: 24, rowSize: 24,
hgap: 10,
vgap: 10 vgap: 10
}))] }))]
}); });
@ -5929,7 +5983,10 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
height: 24, height: 24,
iconHeight: null, iconHeight: null,
iconWidth: null, iconWidth: null,
value: "" value: "",
attributes: {
tabIndex: 0
}
}); });
}, },
@ -5944,14 +6001,16 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
iconCls: o.iconCls, iconCls: o.iconCls,
value: o.value, value: o.value,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
iconWidth: o.iconWidth iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth
}); });
this.popup = BI.createWidget({ this.popup = BI.createWidget({
type: "bi.icon_text_value_combo_popup", type: "bi.icon_text_value_combo_popup",
items: o.items, items: o.items,
value: o.value, value: o.value,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
iconWidth: o.iconWidth iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth
}); });
this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE, function () { this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE, function () {
self.setValue(self.popup.getValue()); self.setValue(self.popup.getValue());
@ -6027,7 +6086,8 @@ BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
type: "bi.single_select_icon_text_item", type: "bi.single_select_icon_text_item",
height: 24, height: 24,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
iconWidth: o.iconWidth iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth
}), }),
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
layouts: [{ layouts: [{
@ -6057,6 +6117,7 @@ BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
items = BI.createItems(items, { items = BI.createItems(items, {
type: "bi.single_select_icon_text_item", type: "bi.single_select_icon_text_item",
height: 24, height: 24,
iconWrapperWidth: o.iconWrapperWidth,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
iconWidth: o.iconWidth iconWidth: o.iconWidth
}); });
@ -6100,6 +6161,9 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
ref: function () { ref: function () {
self.combo = this; self.combo = this;
}, },
attributes: {
tabIndex: 0
},
el: { el: {
type: "bi.search_text_value_trigger", type: "bi.search_text_value_trigger",
ref: function () { ref: function () {
@ -6111,6 +6175,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
value: o.value, value: o.value,
tipType: o.tipType, tipType: o.tipType,
warningTitle: o.warningTitle, warningTitle: o.warningTitle,
title: o.title,
listeners: [{ listeners: [{
eventName: BI.SearchTextValueTrigger.EVENT_CHANGE, eventName: BI.SearchTextValueTrigger.EVENT_CHANGE,
action: function () { action: function () {
@ -6121,14 +6186,14 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
}] }]
}, },
popup: { popup: {
el:{ el: {
type: "bi.text_value_combo_popup", type: "bi.text_value_combo_popup",
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
value: o.value, value: o.value,
items: o.items, items: o.items,
ref: function () { ref: function () {
self.popup = this; self.popup = this;
self.trigger.getSearcher().setAdapter(self.popup); // self.trigger.getSearcher().setAdapter(self.popup);
}, },
listeners: [{ listeners: [{
eventName: BI.TextValueComboPopup.EVENT_CHANGE, eventName: BI.TextValueComboPopup.EVENT_CHANGE,
@ -6144,7 +6209,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
listeners: [{ listeners: [{
eventName: BI.Combo.EVENT_AFTER_HIDEVIEW, eventName: BI.Combo.EVENT_AFTER_HIDEVIEW,
action: function () { action: function () {
self.trigger.stopEditing(); // self.trigger.stopEditing();
self.element.removeClass("combo-show"); self.element.removeClass("combo-show");
} }
}, { }, {
@ -6298,7 +6363,7 @@ BI.shortcut("bi.search_text_value_combo_popup", BI.SearchTextValueComboPopup);/*
BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
props: { props: {
baseCls: "bi-search-text-value-trigger bi-border", baseCls: "bi-search-text-value-trigger bi-border bi-focus-shadow",
height: 24 height: 24
}, },
@ -6321,7 +6386,8 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
}, },
text: this._digest(o.value, o.items), text: this._digest(o.value, o.items),
value: o.value, value: o.value,
height: o.height height: o.height,
tipText: ""
}, },
popup: { popup: {
type: "bi.search_text_value_combo_popup", type: "bi.search_text_value_combo_popup",
@ -6688,7 +6754,10 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
height: 24, height: 24,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
text: "", text: "",
value: "" value: "",
attributes: {
tabIndex: 0
}
}); });
}, },
@ -8045,6 +8114,16 @@ BI.StateEditor = BI.inherit(BI.Widget, {
self._showInput(); self._showInput();
self.editor.focus(); self.editor.focus();
self.editor.setValue(""); self.editor.setValue("");
},
title: BI.isNotNull(o.tipText) ? o.tipText : function () {
var title = "";
if (BI.isString(self.stateValue)) {
title = self.stateValue;
}
if (BI.isArray(self.stateValue) && self.stateValue.length === 1) {
title = self.stateValue[0];
}
return title;
} }
}); });
this.text.on(BI.TextButton.EVENT_CHANGE, function () { this.text.on(BI.TextButton.EVENT_CHANGE, function () {
@ -8204,32 +8283,23 @@ BI.StateEditor = BI.inherit(BI.Widget, {
setState: function (v) { setState: function (v) {
var o = this.options; var o = this.options;
BI.StateEditor.superclass.setValue.apply(this, arguments); BI.StateEditor.superclass.setValue.apply(this, arguments);
this.stateValue = v;
if (BI.isNumber(v)) { if (BI.isNumber(v)) {
if (v === BI.Selection.All) { if (v === BI.Selection.All) {
this.text.setText(BI.i18nText("BI-Select_All")); this.text.setText(BI.i18nText("BI-Select_All"));
this.text.setTitle("");
this.text.element.removeClass("state-editor-infinite-text"); this.text.element.removeClass("state-editor-infinite-text");
} else if (v === BI.Selection.Multi) { } else if (v === BI.Selection.Multi) {
this.text.setText(BI.i18nText("BI-Select_Part")); this.text.setText(BI.i18nText("BI-Select_Part"));
this.text.setTitle("");
this.text.element.removeClass("state-editor-infinite-text"); this.text.element.removeClass("state-editor-infinite-text");
} else { } else {
this.text.setText(o.text); this.text.setText(o.text);
this.text.setTitle("");
this.text.element.addClass("state-editor-infinite-text"); this.text.element.addClass("state-editor-infinite-text");
} }
return; return;
} }
if (BI.isString(v)) { if (BI.isString(v)) {
// if (BI.isEmpty(v)) {
// this.text.setText(o.text);
// this.text.setTitle("");
// this.text.element.addClass("state-editor-infinite-text");
// } else {
this.text.setText(v); this.text.setText(v);
this.text.setTitle(v);
this.text.element.removeClass("state-editor-infinite-text"); this.text.element.removeClass("state-editor-infinite-text");
// }
return; return;
} }
if (BI.isArray(v)) { if (BI.isArray(v)) {
@ -8238,11 +8308,9 @@ BI.StateEditor = BI.inherit(BI.Widget, {
this.text.element.addClass("state-editor-infinite-text"); this.text.element.addClass("state-editor-infinite-text");
} else if (v.length === 1) { } else if (v.length === 1) {
this.text.setText(v[0]); this.text.setText(v[0]);
this.text.setTitle(v[0]);
this.text.element.removeClass("state-editor-infinite-text"); this.text.element.removeClass("state-editor-infinite-text");
} else { } else {
this.text.setText(BI.i18nText("BI-Select_Part")); this.text.setText(BI.i18nText("BI-Select_Part"));
this.text.setTitle("");
this.text.element.removeClass("state-editor-infinite-text"); this.text.element.removeClass("state-editor-infinite-text");
} }
} }
@ -9017,7 +9085,8 @@ BI.SelectList = BI.inherit(BI.Widget, {
hasNext: BI.emptyFn, hasNext: BI.emptyFn,
onLoaded: BI.emptyFn, onLoaded: BI.emptyFn,
toolbar: { toolbar: {
type: "bi.multi_select_bar" type: "bi.multi_select_bar",
iconWrapperWidth: 36
}, },
el: { el: {
type: "bi.list_pane" type: "bi.list_pane"
@ -13859,7 +13928,8 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
isHalfCheckedBySelectedValue: function (selectedValues) { isHalfCheckedBySelectedValue: function (selectedValues) {
return selectedValues.length > 0; return selectedValues.length > 0;
}, },
halfSelected: false halfSelected: false,
iconWrapperWidth: 26
}); });
}, },
_init: function () { _init: function () {
@ -13912,7 +13982,7 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
type: "bi.htape", type: "bi.htape",
element: this, element: this,
items: [{ items: [{
width: 26, width: o.iconWrapperWidth,
el: { el: {
type: "bi.center_adapt", type: "bi.center_adapt",
items: [this.checkbox, this.half] items: [this.checkbox, this.half]
@ -15137,8 +15207,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
cls: "select-text-label", cls: "select-text-label",
textAlign: "left", textAlign: "left",
height: o.height, height: o.height,
text: o.text, text: o.text
hgap: c.hgap
}); });
this.trigerButton = BI.createWidget({ this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button", type: "bi.trigger_icon_button",
@ -15163,7 +15232,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
disableSelected: true disableSelected: true
}, },
width: BI.isEmptyString(o.iconCls) ? 0 : (o.triggerWidth || o.height) width: BI.isEmptyString(o.iconCls) ? 0 : (o.iconWrapperWidth || o.height)
}, },
{ {
el: this.text el: this.text
@ -15189,8 +15258,8 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
this.wrapper.resize(); this.wrapper.resize();
} }
}else{ }else{
if(iconItem.width !== (o.triggerWidth || o.height)) { if(iconItem.width !== (o.iconWrapperWidth || o.height)) {
iconItem.width = (o.triggerWidth || o.height); iconItem.width = (o.iconWrapperWidth || o.height);
this.wrapper.resize(); this.wrapper.resize();
} }
} }
@ -15227,7 +15296,8 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
iconCls: obj.iconCls, iconCls: obj.iconCls,
height: o.height, height: o.height,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
iconWidth: o.iconWidth iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth
}); });
}, },
@ -15338,7 +15408,7 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-text-trigger bi-border", baseCls: "bi-select-text-trigger bi-border bi-focus-shadow",
height: 24 height: 24
}); });
}, },

13
dist/core.css vendored

@ -249,6 +249,9 @@ a {
a:focus { a:focus {
outline: 0; outline: 0;
} }
div:focus {
outline: none;
}
input::-webkit-contacts-auto-fill-button { input::-webkit-contacts-auto-fill-button {
visibility: hidden; visibility: hidden;
display: none !important; display: none !important;
@ -309,6 +312,16 @@ textarea {
.bi-theme-dark .base-disabled .b-font:before { .bi-theme-dark .base-disabled .b-font:before {
color: #606479 !important; color: #606479 !important;
} }
.bi-focus-shadow:focus-within,
.bi-focus-shadow:focus {
border-color: #3685f2;
-webkit-box-shadow: 0 0 5px 2px #d7e7fc;
-moz-box-shadow: 0 0 5px 2px #d7e7fc;
box-shadow: 0 0 5px 2px #d7e7fc;
}
.bi-focus-shadow:hover {
border-color: #3685f2;
}
.base-invalid { .base-invalid {
cursor: default !important; cursor: default !important;
} }

6
dist/core.js vendored

@ -9402,6 +9402,9 @@ jQuery.fn.offset = function( options ) {
offsetLeft += el.offsetLeft; offsetLeft += el.offsetLeft;
offsetTop += el.offsetTop; offsetTop += el.offsetTop;
offsetLeft -= el.scrollLeft;
offsetTop -= el.scrollTop;
el = el.offsetParent; el = el.offsetParent;
} while( el ); } while( el );
win = getWindow( doc ); win = getWindow( doc );
@ -28833,11 +28836,12 @@ BI.extend(BI.DOM, {
ctx.fillText(param, 6 * ratio, 12 * ratio); ctx.fillText(param, 6 * ratio, 12 * ratio);
$(canvas).destroy(); $(canvas).destroy();
var backColor = backgroundColor || "#EAF2FD"; var backColor = backgroundColor || "#EAF2FD";
// IE可以放大缩小所以要固定最大最小宽高
return { return {
width: w, width: w,
height: 24, height: 24,
src: canvas.toDataURL("image/png"), src: canvas.toDataURL("image/png"),
style: "background-color: " + backColor + ";vertical-align: middle; margin: 0 3px; width:" + w + "px;height: 24px", style: "background-color: " + backColor + ";vertical-align: middle; margin: 0 3px; width:" + w + "px;height: 24px; max-width:" + w + "px;max-height: 24px; min-width:" + w + "px;min-height: 24px",
param: param param: param
}; };
} }

10
dist/core_without_normalize.css vendored

@ -31,6 +31,16 @@ textarea {
.bi-theme-dark .base-disabled .b-font:before { .bi-theme-dark .base-disabled .b-font:before {
color: #606479 !important; color: #606479 !important;
} }
.bi-focus-shadow:focus-within,
.bi-focus-shadow:focus {
border-color: #3685f2;
-webkit-box-shadow: 0 0 5px 2px #d7e7fc;
-moz-box-shadow: 0 0 5px 2px #d7e7fc;
box-shadow: 0 0 5px 2px #d7e7fc;
}
.bi-focus-shadow:hover {
border-color: #3685f2;
}
.base-invalid { .base-invalid {
cursor: default !important; cursor: default !important;
} }

2
dist/demo.js vendored

@ -2696,7 +2696,7 @@ Demo.SignEditor = BI.inherit(BI.Widget, {
render: function () { render: function () {
var editor = BI.createWidget({ var editor = BI.createWidget({
type: "bi.sign_editor", type: "bi.sign_editor",
cls: "bi-border", cls: "bi-border bi-focus-shadow",
validationChecker: function (v) { validationChecker: function (v) {
return v != "abc"; return v != "abc";
}, },

64
dist/fineui.css vendored

@ -249,6 +249,9 @@ a {
a:focus { a:focus {
outline: 0; outline: 0;
} }
div:focus {
outline: none;
}
input::-webkit-contacts-auto-fill-button { input::-webkit-contacts-auto-fill-button {
visibility: hidden; visibility: hidden;
display: none !important; display: none !important;
@ -309,6 +312,16 @@ textarea {
.bi-theme-dark .base-disabled .b-font:before { .bi-theme-dark .base-disabled .b-font:before {
color: #606479 !important; color: #606479 !important;
} }
.bi-focus-shadow:focus-within,
.bi-focus-shadow:focus {
border-color: #3685f2;
-webkit-box-shadow: 0 0 5px 2px #d7e7fc;
-moz-box-shadow: 0 0 5px 2px #d7e7fc;
box-shadow: 0 0 5px 2px #d7e7fc;
}
.bi-focus-shadow:hover {
border-color: #3685f2;
}
.base-invalid { .base-invalid {
cursor: default !important; cursor: default !important;
} }
@ -2271,6 +2284,12 @@ textarea {
display: block !important; display: block !important;
visibility: visible !important; visibility: visible !important;
} }
.bi-combo.bi-combo-popup:focus,
.bi-combo.bi-combo-popup:focus-within {
-webkit-box-shadow: 0 0 5px 2px #d7e7fc;
-moz-box-shadow: 0 0 5px 2px #d7e7fc;
box-shadow: 0 0 5px 2px #d7e7fc;
}
.bi-search-text-value-combo .trigger-icon-button { .bi-search-text-value-combo .trigger-icon-button {
font-size: 16px; font-size: 16px;
@ -2290,6 +2309,10 @@ textarea {
.bi-search-text-value-combo.combo-show .trigger-down { .bi-search-text-value-combo.combo-show .trigger-down {
display: none; display: none;
} }
.bi-combo.bi-combo-popup > .bi-search-text-value-trigger,
.bi-combo:hover > .bi-search-text-value-trigger {
border-color: #3685f2;
}
.bi-icon-text-value-combo.combo-error .bi-text-trigger .select-text-label { .bi-icon-text-value-combo.combo-error .bi-text-trigger .select-text-label {
color: #ff4949; color: #ff4949;
@ -2298,6 +2321,10 @@ textarea {
.bi-text-value-combo.combo-error .bi-select-text-trigger .select-text-label { .bi-text-value-combo.combo-error .bi-select-text-trigger .select-text-label {
color: #ff4949; color: #ff4949;
} }
.bi-combo.bi-combo-popup > .bi-select-text-trigger,
.bi-combo:hover > .bi-select-text-trigger {
border-color: #3685f2;
}
/*************BI.SearchEditor******************/ /*************BI.SearchEditor******************/
.bi-search-editor { .bi-search-editor {
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
@ -3418,6 +3445,10 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ /*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
word-break: break-word; word-break: break-word;
} }
.bi-text:before {
content: '';
display: block;
}
.bi-bubble .bubble-text { .bi-bubble .bubble-text {
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;
@ -3835,6 +3866,15 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
vertical-align: top; vertical-align: top;
display: inline-block; display: inline-block;
} }
.ztree li a:hover {
background-color: rgba(54, 133, 242, 0.06);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0f3685f2,endColorstr=#0f3685f2);
}
.ztree li a:active {
color: #3685f2;
background-color: rgba(54, 133, 242, 0.06);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0f3685f2,endColorstr=#0f3685f2);
}
.ztree li a.curSelectedNode_Edit { .ztree li a.curSelectedNode_Edit {
padding-top: 0px; padding-top: 0px;
background-color: #FFE6B0; background-color: #FFE6B0;
@ -3918,6 +3958,18 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
.ztree li span.button.chk.radio_true_part_focus { .ztree li span.button.chk.radio_true_part_focus {
background-position: -42px -42px; background-position: -42px -42px;
} }
.ztree li span.button.chk.checkbox_true_full + a {
color: #3685f2;
}
.ztree li span.button.chk.checkbox_true_full_focus + a {
color: #3685f2;
}
.ztree li span.button.chk.checkbox_true_part + a {
color: #3685f2;
}
.ztree li span.button.chk.checkbox_true_part_focus + a {
color: #3685f2;
}
.ztree li span.button.chk.radio_true_disable { .ztree li span.button.chk.radio_true_disable {
background-position: -42px -56px; background-position: -42px -56px;
} }
@ -4203,6 +4255,10 @@ ul.ztree.zTreeDragUL {
.bi-multi-select-combo.combo-show .trigger-down { .bi-multi-select-combo.combo-show .trigger-down {
display: none; display: none;
} }
.bi-combo.bi-combo-popup:focus > .bi-multi-select-trigger,
.bi-combo.bi-combo-popup:hover > .bi-multi-select-trigger {
border-color: #3685f2;
}
.bi-multi-select-insert-combo .multi-select-trigger-icon-button { .bi-multi-select-insert-combo .multi-select-trigger-icon-button {
font-size: 16px; font-size: 16px;
@ -4456,6 +4512,10 @@ ul.ztree.zTreeDragUL {
.bi-single-select-combo.combo-show .trigger-down { .bi-single-select-combo.combo-show .trigger-down {
display: none; display: none;
} }
.bi-combo.bi-combo-popup:focus > .bi-single-select-trigger,
.bi-combo.bi-combo-popup:hover > .bi-single-select-trigger {
border-color: #3685f2;
}
.bi-single-slider-label { .bi-single-slider-label {
min-height: 50px; min-height: 50px;
} }
@ -4517,6 +4577,10 @@ ul.ztree.zTreeDragUL {
-moz-border-radius: 3px; -moz-border-radius: 3px;
border-radius: 3px; border-radius: 3px;
} }
.bi-combo.bi-combo-popup:focus > .bi-single-tree-trigger,
.bi-combo.bi-combo-popup:hover > .bi-single-tree-trigger {
border-color: #3685f2;
}
.bi-date-interval.time-error .bi-input { .bi-date-interval.time-error .bi-input {
color: #ff4949; color: #ff4949;
} }

228
dist/fineui.js vendored

@ -9623,6 +9623,9 @@ jQuery.fn.offset = function( options ) {
offsetLeft += el.offsetLeft; offsetLeft += el.offsetLeft;
offsetTop += el.offsetTop; offsetTop += el.offsetTop;
offsetLeft -= el.scrollLeft;
offsetTop -= el.scrollTop;
el = el.offsetParent; el = el.offsetParent;
} while( el ); } while( el );
win = getWindow( doc ); win = getWindow( doc );
@ -29054,11 +29057,12 @@ BI.extend(BI.DOM, {
ctx.fillText(param, 6 * ratio, 12 * ratio); ctx.fillText(param, 6 * ratio, 12 * ratio);
$(canvas).destroy(); $(canvas).destroy();
var backColor = backgroundColor || "#EAF2FD"; var backColor = backgroundColor || "#EAF2FD";
// IE可以放大缩小所以要固定最大最小宽高
return { return {
width: w, width: w,
height: 24, height: 24,
src: canvas.toDataURL("image/png"), src: canvas.toDataURL("image/png"),
style: "background-color: " + backColor + ";vertical-align: middle; margin: 0 3px; width:" + w + "px;height: 24px", style: "background-color: " + backColor + ";vertical-align: middle; margin: 0 3px; width:" + w + "px;height: 24px; max-width:" + w + "px;max-height: 24px; min-width:" + w + "px;min-height: 24px",
param: param param: param
}; };
} }
@ -35327,7 +35331,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
}, },
set: function reactiveSetter(newVal) { set: function reactiveSetter(newVal) {
var value = childOb ? childOb.model : val; var value = childOb ? childOb.model : val;
if (newVal === value || (newVal !== newVal && value !== value)) { if (newVal === value || newVal !== newVal && value !== value) {
return; return;
} }
val = newVal; val = newVal;
@ -35521,7 +35525,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
} catch (e) { } catch (e) {
// if (this.user) { // if (this.user) {
// } else { // } else {
console.error(e); // console.error(e)
// } // }
} finally { } finally {
// "touch" every property so they are all tracked as // "touch" every property so they are all tracked as
@ -35590,13 +35594,13 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
try { try {
this.cb.call(this.vm, value, oldValue, options); this.cb.call(this.vm, value, oldValue, options);
} catch (e) { } catch (e) {
console.log(e); console.error(e);
} }
} else { } else {
try { try {
this.cb.call(this.vm, value, oldValue, options); this.cb.call(this.vm, value, oldValue, options);
} catch (e) { } catch (e) {
console.log(e); console.error(e);
} }
} }
} }
@ -53492,14 +53496,14 @@ BI.IconTextIconItem = BI.inherit(BI.BasicButton, {
var icon1 = BI.createWidget({ var icon1 = BI.createWidget({
type: "bi.icon_label", type: "bi.icon_label",
cls: o.iconCls1, cls: o.iconCls1,
width: o.height, width: o.leftIconWrapperWidth,
height: o.height, height: o.height,
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
iconHeight: o.iconHeight iconHeight: o.iconHeight
}); });
var blank = BI.createWidget({ var blank = BI.createWidget({
type: "bi.layout", type: "bi.layout",
width: o.height, width: o.height
}); });
BI.createWidget({ BI.createWidget({
type: "bi.absolute", type: "bi.absolute",
@ -53508,7 +53512,7 @@ BI.IconTextIconItem = BI.inherit(BI.BasicButton, {
el: { el: {
type: "bi.icon_label", type: "bi.icon_label",
cls: o.iconCls2, cls: o.iconCls2,
width: o.height, width: o.rightIconWrapperWidth,
height: o.height, height: o.height,
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
iconHeight: o.iconHeight iconHeight: o.iconHeight
@ -53585,6 +53589,7 @@ BI.IconTextItem = BI.inherit(BI.BasicButton, {
logic: { logic: {
dynamic: false dynamic: false
}, },
iconWrapperWidth: null,
iconHeight: null, iconHeight: null,
iconWidth: null, iconWidth: null,
textHgap: 0, textHgap: 0,
@ -53611,7 +53616,7 @@ BI.IconTextItem = BI.inherit(BI.BasicButton, {
}); });
this.icon = BI.createWidget({ this.icon = BI.createWidget({
type: "bi.icon_label", type: "bi.icon_label",
width: o.height, width: o.iconWrapperWidth || o.height,
height: o.height, height: o.height,
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
iconHeight: o.iconHeight iconHeight: o.iconHeight
@ -73064,7 +73069,8 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
height: 24, height: 24,
logic: { logic: {
dynamic: false dynamic: false
} },
iconWrapperWidth: 26
}); });
}, },
_init: function () { _init: function () {
@ -73099,7 +73105,7 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
items: BI.LogicFactory.createLogicItemsByDirection("left", { items: BI.LogicFactory.createLogicItemsByDirection("left", {
type: "bi.center_adapt", type: "bi.center_adapt",
items: [this.checkbox], items: [this.checkbox],
width: 26 width: o.iconWrapperWidth
}, this.text) }, this.text)
})))); }))));
}, },
@ -73148,6 +73154,7 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
element: this, element: this,
cls: o.iconCls, cls: o.iconCls,
once: o.once, once: o.once,
iconWrapperWidth: o.iconWrapperWidth,
selected: o.selected, selected: o.selected,
height: o.height, height: o.height,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
@ -74497,6 +74504,58 @@ BI.TreeTextLeafItem = BI.inherit(BI.BasicButton, {
}); });
BI.shortcut("bi.tree_text_leaf_item", BI.TreeTextLeafItem);/** BI.shortcut("bi.tree_text_leaf_item", BI.TreeTextLeafItem);/**
* 专门为calendar的视觉加的button作为私有button,不能配置任何属性也不要用这个玩意
*/
BI.CalendarDateItem = BI.inherit(BI.BasicButton, {
render: function () {
var self = this, o = this.options;
return {
type: "bi.absolute",
items: [{
el: {
type: "bi.text_item",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "normal",
text: o.text,
value: o.value,
ref: function () {
self.text = this;
}
},
left: o.lgap,
right: o.rgap,
top: 0,
bottom: 0
}]
};
},
doHighLight: function () {
this.text.doHighLight.apply(this.text, arguments);
},
unHighLight: function () {
this.text.unHighLight.apply(this.text, arguments);
},
setValue: function () {
if (!this.isReadOnly()) {
this.text.setValue.apply(this.text, arguments);
}
},
setSelected: function (b) {
BI.CalendarDateItem.superclass.setSelected.apply(this, arguments);
this.text.setSelected(b);
},
getValue: function () {
return this.text.getValue();
}
});
BI.shortcut("bi.calendar_date_item", BI.CalendarDateItem);/**
* Created by GUY on 2015/8/28. * Created by GUY on 2015/8/28.
* @class BI.Calendar * @class BI.Calendar
* @extends BI.Widget * @extends BI.Widget
@ -74585,7 +74644,7 @@ BI.Calendar = BI.inherit(BI.Widget, {
items: items, items: items,
layouts: [{ layouts: [{
type: "bi.center", type: "bi.center",
hgap: 10, lgap: 10,
vgap: 10 vgap: 10
}] }]
}); });
@ -74602,15 +74661,16 @@ BI.Calendar = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) { return BI.map(item, function (j, td) {
var month = td.lastMonth ? o.month - 1 : (td.nextMonth ? o.month + 1 : o.month); var month = td.lastMonth ? o.month - 1 : (td.nextMonth ? o.month + 1 : o.month);
return BI.extend(td, { return BI.extend(td, {
type: "bi.text_item", type: "bi.calendar_date_item",
cls: "bi-list-item-select",
textAlign: "center", textAlign: "center",
whiteSpace: "normal", whiteSpace: "normal",
once: false, once: false,
forceSelected: true, forceSelected: true,
height: 24, height: 24,
value: o.year + "-" + month + "-" + td.text, value: o.year + "-" + month + "-" + td.text,
disabled: td.lastMonth || td.nextMonth || td.disabled disabled: td.lastMonth || td.nextMonth || td.disabled,
lgap: 10,
rgap: 0
// selected: td.currentDay // selected: td.currentDay
}); });
}); });
@ -74624,7 +74684,6 @@ BI.Calendar = BI.inherit(BI.Widget, {
rows: 6, rows: 6,
columnSize: [1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7], columnSize: [1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7],
rowSize: 24, rowSize: 24,
hgap: 10,
vgap: 10 vgap: 10
}))] }))]
}); });
@ -78829,7 +78888,10 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
height: 24, height: 24,
iconHeight: null, iconHeight: null,
iconWidth: null, iconWidth: null,
value: "" value: "",
attributes: {
tabIndex: 0
}
}); });
}, },
@ -78844,14 +78906,16 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
iconCls: o.iconCls, iconCls: o.iconCls,
value: o.value, value: o.value,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
iconWidth: o.iconWidth iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth
}); });
this.popup = BI.createWidget({ this.popup = BI.createWidget({
type: "bi.icon_text_value_combo_popup", type: "bi.icon_text_value_combo_popup",
items: o.items, items: o.items,
value: o.value, value: o.value,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
iconWidth: o.iconWidth iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth
}); });
this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE, function () { this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE, function () {
self.setValue(self.popup.getValue()); self.setValue(self.popup.getValue());
@ -78927,7 +78991,8 @@ BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
type: "bi.single_select_icon_text_item", type: "bi.single_select_icon_text_item",
height: 24, height: 24,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
iconWidth: o.iconWidth iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth
}), }),
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
layouts: [{ layouts: [{
@ -78957,6 +79022,7 @@ BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
items = BI.createItems(items, { items = BI.createItems(items, {
type: "bi.single_select_icon_text_item", type: "bi.single_select_icon_text_item",
height: 24, height: 24,
iconWrapperWidth: o.iconWrapperWidth,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
iconWidth: o.iconWidth iconWidth: o.iconWidth
}); });
@ -79000,6 +79066,9 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
ref: function () { ref: function () {
self.combo = this; self.combo = this;
}, },
attributes: {
tabIndex: 0
},
el: { el: {
type: "bi.search_text_value_trigger", type: "bi.search_text_value_trigger",
ref: function () { ref: function () {
@ -79011,6 +79080,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
value: o.value, value: o.value,
tipType: o.tipType, tipType: o.tipType,
warningTitle: o.warningTitle, warningTitle: o.warningTitle,
title: o.title,
listeners: [{ listeners: [{
eventName: BI.SearchTextValueTrigger.EVENT_CHANGE, eventName: BI.SearchTextValueTrigger.EVENT_CHANGE,
action: function () { action: function () {
@ -79021,14 +79091,14 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
}] }]
}, },
popup: { popup: {
el:{ el: {
type: "bi.text_value_combo_popup", type: "bi.text_value_combo_popup",
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
value: o.value, value: o.value,
items: o.items, items: o.items,
ref: function () { ref: function () {
self.popup = this; self.popup = this;
self.trigger.getSearcher().setAdapter(self.popup); // self.trigger.getSearcher().setAdapter(self.popup);
}, },
listeners: [{ listeners: [{
eventName: BI.TextValueComboPopup.EVENT_CHANGE, eventName: BI.TextValueComboPopup.EVENT_CHANGE,
@ -79044,7 +79114,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
listeners: [{ listeners: [{
eventName: BI.Combo.EVENT_AFTER_HIDEVIEW, eventName: BI.Combo.EVENT_AFTER_HIDEVIEW,
action: function () { action: function () {
self.trigger.stopEditing(); // self.trigger.stopEditing();
self.element.removeClass("combo-show"); self.element.removeClass("combo-show");
} }
}, { }, {
@ -79198,7 +79268,7 @@ BI.shortcut("bi.search_text_value_combo_popup", BI.SearchTextValueComboPopup);/*
BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
props: { props: {
baseCls: "bi-search-text-value-trigger bi-border", baseCls: "bi-search-text-value-trigger bi-border bi-focus-shadow",
height: 24 height: 24
}, },
@ -79221,7 +79291,8 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
}, },
text: this._digest(o.value, o.items), text: this._digest(o.value, o.items),
value: o.value, value: o.value,
height: o.height height: o.height,
tipText: ""
}, },
popup: { popup: {
type: "bi.search_text_value_combo_popup", type: "bi.search_text_value_combo_popup",
@ -79588,7 +79659,10 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
height: 24, height: 24,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
text: "", text: "",
value: "" value: "",
attributes: {
tabIndex: 0
}
}); });
}, },
@ -80945,6 +81019,16 @@ BI.StateEditor = BI.inherit(BI.Widget, {
self._showInput(); self._showInput();
self.editor.focus(); self.editor.focus();
self.editor.setValue(""); self.editor.setValue("");
},
title: BI.isNotNull(o.tipText) ? o.tipText : function () {
var title = "";
if (BI.isString(self.stateValue)) {
title = self.stateValue;
}
if (BI.isArray(self.stateValue) && self.stateValue.length === 1) {
title = self.stateValue[0];
}
return title;
} }
}); });
this.text.on(BI.TextButton.EVENT_CHANGE, function () { this.text.on(BI.TextButton.EVENT_CHANGE, function () {
@ -81104,32 +81188,23 @@ BI.StateEditor = BI.inherit(BI.Widget, {
setState: function (v) { setState: function (v) {
var o = this.options; var o = this.options;
BI.StateEditor.superclass.setValue.apply(this, arguments); BI.StateEditor.superclass.setValue.apply(this, arguments);
this.stateValue = v;
if (BI.isNumber(v)) { if (BI.isNumber(v)) {
if (v === BI.Selection.All) { if (v === BI.Selection.All) {
this.text.setText(BI.i18nText("BI-Select_All")); this.text.setText(BI.i18nText("BI-Select_All"));
this.text.setTitle("");
this.text.element.removeClass("state-editor-infinite-text"); this.text.element.removeClass("state-editor-infinite-text");
} else if (v === BI.Selection.Multi) { } else if (v === BI.Selection.Multi) {
this.text.setText(BI.i18nText("BI-Select_Part")); this.text.setText(BI.i18nText("BI-Select_Part"));
this.text.setTitle("");
this.text.element.removeClass("state-editor-infinite-text"); this.text.element.removeClass("state-editor-infinite-text");
} else { } else {
this.text.setText(o.text); this.text.setText(o.text);
this.text.setTitle("");
this.text.element.addClass("state-editor-infinite-text"); this.text.element.addClass("state-editor-infinite-text");
} }
return; return;
} }
if (BI.isString(v)) { if (BI.isString(v)) {
// if (BI.isEmpty(v)) {
// this.text.setText(o.text);
// this.text.setTitle("");
// this.text.element.addClass("state-editor-infinite-text");
// } else {
this.text.setText(v); this.text.setText(v);
this.text.setTitle(v);
this.text.element.removeClass("state-editor-infinite-text"); this.text.element.removeClass("state-editor-infinite-text");
// }
return; return;
} }
if (BI.isArray(v)) { if (BI.isArray(v)) {
@ -81138,11 +81213,9 @@ BI.StateEditor = BI.inherit(BI.Widget, {
this.text.element.addClass("state-editor-infinite-text"); this.text.element.addClass("state-editor-infinite-text");
} else if (v.length === 1) { } else if (v.length === 1) {
this.text.setText(v[0]); this.text.setText(v[0]);
this.text.setTitle(v[0]);
this.text.element.removeClass("state-editor-infinite-text"); this.text.element.removeClass("state-editor-infinite-text");
} else { } else {
this.text.setText(BI.i18nText("BI-Select_Part")); this.text.setText(BI.i18nText("BI-Select_Part"));
this.text.setTitle("");
this.text.element.removeClass("state-editor-infinite-text"); this.text.element.removeClass("state-editor-infinite-text");
} }
} }
@ -81917,7 +81990,8 @@ BI.SelectList = BI.inherit(BI.Widget, {
hasNext: BI.emptyFn, hasNext: BI.emptyFn,
onLoaded: BI.emptyFn, onLoaded: BI.emptyFn,
toolbar: { toolbar: {
type: "bi.multi_select_bar" type: "bi.multi_select_bar",
iconWrapperWidth: 36
}, },
el: { el: {
type: "bi.list_pane" type: "bi.list_pane"
@ -86759,7 +86833,8 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
isHalfCheckedBySelectedValue: function (selectedValues) { isHalfCheckedBySelectedValue: function (selectedValues) {
return selectedValues.length > 0; return selectedValues.length > 0;
}, },
halfSelected: false halfSelected: false,
iconWrapperWidth: 26
}); });
}, },
_init: function () { _init: function () {
@ -86812,7 +86887,7 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
type: "bi.htape", type: "bi.htape",
element: this, element: this,
items: [{ items: [{
width: 26, width: o.iconWrapperWidth,
el: { el: {
type: "bi.center_adapt", type: "bi.center_adapt",
items: [this.checkbox, this.half] items: [this.checkbox, this.half]
@ -88037,8 +88112,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
cls: "select-text-label", cls: "select-text-label",
textAlign: "left", textAlign: "left",
height: o.height, height: o.height,
text: o.text, text: o.text
hgap: c.hgap
}); });
this.trigerButton = BI.createWidget({ this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button", type: "bi.trigger_icon_button",
@ -88063,7 +88137,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
disableSelected: true disableSelected: true
}, },
width: BI.isEmptyString(o.iconCls) ? 0 : (o.triggerWidth || o.height) width: BI.isEmptyString(o.iconCls) ? 0 : (o.iconWrapperWidth || o.height)
}, },
{ {
el: this.text el: this.text
@ -88089,8 +88163,8 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
this.wrapper.resize(); this.wrapper.resize();
} }
}else{ }else{
if(iconItem.width !== (o.triggerWidth || o.height)) { if(iconItem.width !== (o.iconWrapperWidth || o.height)) {
iconItem.width = (o.triggerWidth || o.height); iconItem.width = (o.iconWrapperWidth || o.height);
this.wrapper.resize(); this.wrapper.resize();
} }
} }
@ -88127,7 +88201,8 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
iconCls: obj.iconCls, iconCls: obj.iconCls,
height: o.height, height: o.height,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
iconWidth: o.iconWidth iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth
}); });
}, },
@ -88238,7 +88313,7 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-text-trigger bi-border", baseCls: "bi-select-text-trigger bi-border bi-focus-shadow",
height: 24 height: 24
}); });
}, },
@ -89320,7 +89395,7 @@ BI.DateCalendarPopup = BI.inherit(BI.Widget, {
element: this, element: this,
items: [{ items: [{
el: this.calendar, el: this.calendar,
left: 10, left: 0,
right: 10 right: 10
}, { }, {
el: { el: {
@ -91432,8 +91507,7 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
self.fireEvent("EVENT_CHANGE"); self.fireEvent("EVENT_CHANGE");
} }
}] }]
}, }
bgap: 5
}], }],
ref: function () { ref: function () {
self.workDay = this; self.workDay = this;
@ -91459,16 +91533,19 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
var self = this; var self = this;
var items = BI.map(values, function (idx, value) { var items = BI.map(values, function (idx, value) {
return { return {
type: "bi.dynamic_date_param_item", el: {
dateType: value.dateType, type: "bi.dynamic_date_param_item",
value: value.value, dateType: value.dateType,
offset: value.offset, value: value.value,
listeners: [{ offset: value.offset,
eventName: "EVENT_CHANGE", listeners: [{
action: function () { eventName: "EVENT_CHANGE",
self.fireEvent("EVENT_CHANGE"); action: function () {
} self.fireEvent("EVENT_CHANGE");
}] }
}]
},
tgap: idx === 0 ? 5 : 0
}; };
}); });
@ -93548,7 +93625,7 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.SearchEditor.superclass._defaultConfig.apply(this, arguments); var conf = BI.SearchEditor.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
baseCls: "bi-search-editor bi-border", baseCls: "bi-search-editor bi-border bi-focus-shadow",
height: 24, height: 24,
errorText: "", errorText: "",
watermark: BI.i18nText("BI-Basic_Search"), watermark: BI.i18nText("BI-Basic_Search"),
@ -99043,7 +99120,8 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, {
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active", cls: "bi-list-item-active",
height: 24, height: 24,
selected: this.isAllSelected() selected: this.isAllSelected(),
iconWrapperWidth: 36
}); });
}, },
@ -99217,8 +99295,10 @@ BI.MultiSelectNoBarLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.multi_select_item", type: "bi.multi_select_item",
cls: "bi-list-item-active",
logic: this.options.logic, logic: this.options.logic,
height: 24 height: 24,
iconWrapperWidth: 36
}); });
}, },
@ -99813,7 +99893,9 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
dynamic: false dynamic: false
}, },
height: 24, height: 24,
selected: this.isAllSelected() selected: this.isAllSelected(),
cls: "bi-list-item-active",
iconWrapperWidth: 36
}); });
}, },
@ -102630,7 +102712,7 @@ BI.shortcut("bi.multi_tree_searcher", BI.MultiTreeSearcher);/**
BI.NumberEditor = BI.inherit(BI.Widget, { BI.NumberEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-number-editor bi-border", baseCls: "bi-number-editor bi-border bi-focus-shadow",
validationChecker: function () { validationChecker: function () {
return true; return true;
}, },
@ -105267,8 +105349,10 @@ BI.SearchMultiSelectLoader = BI.inherit(BI.Widget, {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.multi_select_item", type: "bi.multi_select_item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active",
height: 24, height: 24,
selected: this.isAllSelected() selected: this.isAllSelected(),
iconWrapperWidth: 36
}); });
}, },
@ -105849,7 +105933,10 @@ BI.SelectTreeCombo = BI.inherit(BI.Widget, {
height: 30, height: 30,
text: "", text: "",
items: [], items: [],
value: "" value: "",
attributes: {
tabIndex: 0
}
}); });
}, },
@ -109576,7 +109663,10 @@ BI.SingleTreeCombo = BI.inherit(BI.Widget, {
height: 24, height: 24,
text: "", text: "",
items: [], items: [],
value: "" value: "",
attributes: {
tabIndex: 0
}
}); });
}, },

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

68
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

8
dist/fix/fix.js vendored

@ -563,7 +563,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
}, },
set: function reactiveSetter(newVal) { set: function reactiveSetter(newVal) {
var value = childOb ? childOb.model : val; var value = childOb ? childOb.model : val;
if (newVal === value || (newVal !== newVal && value !== value)) { if (newVal === value || newVal !== newVal && value !== value) {
return; return;
} }
val = newVal; val = newVal;
@ -757,7 +757,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
} catch (e) { } catch (e) {
// if (this.user) { // if (this.user) {
// } else { // } else {
console.error(e); // console.error(e)
// } // }
} finally { } finally {
// "touch" every property so they are all tracked as // "touch" every property so they are all tracked as
@ -826,13 +826,13 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
try { try {
this.cb.call(this.vm, value, oldValue, options); this.cb.call(this.vm, value, oldValue, options);
} catch (e) { } catch (e) {
console.log(e); console.error(e);
} }
} else { } else {
try { try {
this.cb.call(this.vm, value, oldValue, options); this.cb.call(this.vm, value, oldValue, options);
} catch (e) { } catch (e) {
console.log(e); console.error(e);
} }
} }
} }

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

12
dist/widget.css vendored

@ -117,6 +117,10 @@
.bi-multi-select-combo.combo-show .trigger-down { .bi-multi-select-combo.combo-show .trigger-down {
display: none; display: none;
} }
.bi-combo.bi-combo-popup:focus > .bi-multi-select-trigger,
.bi-combo.bi-combo-popup:hover > .bi-multi-select-trigger {
border-color: #3685f2;
}
.bi-multi-select-insert-combo .multi-select-trigger-icon-button { .bi-multi-select-insert-combo .multi-select-trigger-icon-button {
font-size: 16px; font-size: 16px;
@ -370,6 +374,10 @@
.bi-single-select-combo.combo-show .trigger-down { .bi-single-select-combo.combo-show .trigger-down {
display: none; display: none;
} }
.bi-combo.bi-combo-popup:focus > .bi-single-select-trigger,
.bi-combo.bi-combo-popup:hover > .bi-single-select-trigger {
border-color: #3685f2;
}
.bi-single-slider-label { .bi-single-slider-label {
min-height: 50px; min-height: 50px;
} }
@ -431,6 +439,10 @@
-moz-border-radius: 3px; -moz-border-radius: 3px;
border-radius: 3px; border-radius: 3px;
} }
.bi-combo.bi-combo-popup:focus > .bi-single-tree-trigger,
.bi-combo.bi-combo-popup:hover > .bi-single-tree-trigger {
border-color: #3685f2;
}
.bi-date-interval.time-error .bi-input { .bi-date-interval.time-error .bi-input {
color: #ff4949; color: #ff4949;
} }

57
dist/widget.js vendored

@ -917,7 +917,7 @@ BI.DateCalendarPopup = BI.inherit(BI.Widget, {
element: this, element: this,
items: [{ items: [{
el: this.calendar, el: this.calendar,
left: 10, left: 0,
right: 10 right: 10
}, { }, {
el: { el: {
@ -3029,8 +3029,7 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
self.fireEvent("EVENT_CHANGE"); self.fireEvent("EVENT_CHANGE");
} }
}] }]
}, }
bgap: 5
}], }],
ref: function () { ref: function () {
self.workDay = this; self.workDay = this;
@ -3056,16 +3055,19 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
var self = this; var self = this;
var items = BI.map(values, function (idx, value) { var items = BI.map(values, function (idx, value) {
return { return {
type: "bi.dynamic_date_param_item", el: {
dateType: value.dateType, type: "bi.dynamic_date_param_item",
value: value.value, dateType: value.dateType,
offset: value.offset, value: value.value,
listeners: [{ offset: value.offset,
eventName: "EVENT_CHANGE", listeners: [{
action: function () { eventName: "EVENT_CHANGE",
self.fireEvent("EVENT_CHANGE"); action: function () {
} self.fireEvent("EVENT_CHANGE");
}] }
}]
},
tgap: idx === 0 ? 5 : 0
}; };
}); });
@ -5145,7 +5147,7 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.SearchEditor.superclass._defaultConfig.apply(this, arguments); var conf = BI.SearchEditor.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
baseCls: "bi-search-editor bi-border", baseCls: "bi-search-editor bi-border bi-focus-shadow",
height: 24, height: 24,
errorText: "", errorText: "",
watermark: BI.i18nText("BI-Basic_Search"), watermark: BI.i18nText("BI-Basic_Search"),
@ -10640,7 +10642,8 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, {
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active", cls: "bi-list-item-active",
height: 24, height: 24,
selected: this.isAllSelected() selected: this.isAllSelected(),
iconWrapperWidth: 36
}); });
}, },
@ -10814,8 +10817,10 @@ BI.MultiSelectNoBarLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.multi_select_item", type: "bi.multi_select_item",
cls: "bi-list-item-active",
logic: this.options.logic, logic: this.options.logic,
height: 24 height: 24,
iconWrapperWidth: 36
}); });
}, },
@ -11410,7 +11415,9 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
dynamic: false dynamic: false
}, },
height: 24, height: 24,
selected: this.isAllSelected() selected: this.isAllSelected(),
cls: "bi-list-item-active",
iconWrapperWidth: 36
}); });
}, },
@ -14227,7 +14234,7 @@ BI.shortcut("bi.multi_tree_searcher", BI.MultiTreeSearcher);/**
BI.NumberEditor = BI.inherit(BI.Widget, { BI.NumberEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-number-editor bi-border", baseCls: "bi-number-editor bi-border bi-focus-shadow",
validationChecker: function () { validationChecker: function () {
return true; return true;
}, },
@ -16864,8 +16871,10 @@ BI.SearchMultiSelectLoader = BI.inherit(BI.Widget, {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.multi_select_item", type: "bi.multi_select_item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active",
height: 24, height: 24,
selected: this.isAllSelected() selected: this.isAllSelected(),
iconWrapperWidth: 36
}); });
}, },
@ -17446,7 +17455,10 @@ BI.SelectTreeCombo = BI.inherit(BI.Widget, {
height: 30, height: 30,
text: "", text: "",
items: [], items: [],
value: "" value: "",
attributes: {
tabIndex: 0
}
}); });
}, },
@ -21173,7 +21185,10 @@ BI.SingleTreeCombo = BI.inherit(BI.Widget, {
height: 24, height: 24,
text: "", text: "",
items: [], items: [],
value: "" value: "",
attributes: {
tabIndex: 0
}
}); });
}, },

6
src/base/single/button/listitem/icontexticonitem.js

@ -44,14 +44,14 @@ BI.IconTextIconItem = BI.inherit(BI.BasicButton, {
var icon1 = BI.createWidget({ var icon1 = BI.createWidget({
type: "bi.icon_label", type: "bi.icon_label",
cls: o.iconCls1, cls: o.iconCls1,
width: o.height, width: o.leftIconWrapperWidth,
height: o.height, height: o.height,
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
iconHeight: o.iconHeight iconHeight: o.iconHeight
}); });
var blank = BI.createWidget({ var blank = BI.createWidget({
type: "bi.layout", type: "bi.layout",
width: o.height, width: o.height
}); });
BI.createWidget({ BI.createWidget({
type: "bi.absolute", type: "bi.absolute",
@ -60,7 +60,7 @@ BI.IconTextIconItem = BI.inherit(BI.BasicButton, {
el: { el: {
type: "bi.icon_label", type: "bi.icon_label",
cls: o.iconCls2, cls: o.iconCls2,
width: o.height, width: o.rightIconWrapperWidth,
height: o.height, height: o.height,
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
iconHeight: o.iconHeight iconHeight: o.iconHeight

3
src/base/single/button/listitem/icontextitem.js

@ -15,6 +15,7 @@ BI.IconTextItem = BI.inherit(BI.BasicButton, {
logic: { logic: {
dynamic: false dynamic: false
}, },
iconWrapperWidth: null,
iconHeight: null, iconHeight: null,
iconWidth: null, iconWidth: null,
textHgap: 0, textHgap: 0,
@ -41,7 +42,7 @@ BI.IconTextItem = BI.inherit(BI.BasicButton, {
}); });
this.icon = BI.createWidget({ this.icon = BI.createWidget({
type: "bi.icon_label", type: "bi.icon_label",
width: o.height, width: o.iconWrapperWidth || o.height,
height: o.height, height: o.height,
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
iconHeight: o.iconHeight iconHeight: o.iconHeight

5
src/case/button/item.multiselect.js

@ -10,7 +10,8 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
height: 24, height: 24,
logic: { logic: {
dynamic: false dynamic: false
} },
iconWrapperWidth: 26
}); });
}, },
_init: function () { _init: function () {
@ -45,7 +46,7 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
items: BI.LogicFactory.createLogicItemsByDirection("left", { items: BI.LogicFactory.createLogicItemsByDirection("left", {
type: "bi.center_adapt", type: "bi.center_adapt",
items: [this.checkbox], items: [this.checkbox],
width: 26 width: o.iconWrapperWidth
}, this.text) }, this.text)
})))); }))));
}, },

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

@ -20,6 +20,7 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
element: this, element: this,
cls: o.iconCls, cls: o.iconCls,
once: o.once, once: o.once,
iconWrapperWidth: o.iconWrapperWidth,
selected: o.selected, selected: o.selected,
height: o.height, height: o.height,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,

53
src/case/calendar/calendar.date.item.js

@ -0,0 +1,53 @@
/**
* 专门为calendar的视觉加的button作为私有button,不能配置任何属性也不要用这个玩意
*/
BI.CalendarDateItem = BI.inherit(BI.BasicButton, {
render: function () {
var self = this, o = this.options;
return {
type: "bi.absolute",
items: [{
el: {
type: "bi.text_item",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "normal",
text: o.text,
value: o.value,
ref: function () {
self.text = this;
}
},
left: o.lgap,
right: o.rgap,
top: 0,
bottom: 0
}]
};
},
doHighLight: function () {
this.text.doHighLight.apply(this.text, arguments);
},
unHighLight: function () {
this.text.unHighLight.apply(this.text, arguments);
},
setValue: function () {
if (!this.isReadOnly()) {
this.text.setValue.apply(this.text, arguments);
}
},
setSelected: function (b) {
BI.CalendarDateItem.superclass.setSelected.apply(this, arguments);
this.text.setSelected(b);
},
getValue: function () {
return this.text.getValue();
}
});
BI.shortcut("bi.calendar_date_item", BI.CalendarDateItem);

10
src/case/calendar/calendar.js

@ -87,7 +87,7 @@ BI.Calendar = BI.inherit(BI.Widget, {
items: items, items: items,
layouts: [{ layouts: [{
type: "bi.center", type: "bi.center",
hgap: 10, lgap: 10,
vgap: 10 vgap: 10
}] }]
}); });
@ -104,15 +104,16 @@ BI.Calendar = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) { return BI.map(item, function (j, td) {
var month = td.lastMonth ? o.month - 1 : (td.nextMonth ? o.month + 1 : o.month); var month = td.lastMonth ? o.month - 1 : (td.nextMonth ? o.month + 1 : o.month);
return BI.extend(td, { return BI.extend(td, {
type: "bi.text_item", type: "bi.calendar_date_item",
cls: "bi-list-item-select",
textAlign: "center", textAlign: "center",
whiteSpace: "normal", whiteSpace: "normal",
once: false, once: false,
forceSelected: true, forceSelected: true,
height: 24, height: 24,
value: o.year + "-" + month + "-" + td.text, value: o.year + "-" + month + "-" + td.text,
disabled: td.lastMonth || td.nextMonth || td.disabled disabled: td.lastMonth || td.nextMonth || td.disabled,
lgap: 10,
rgap: 0
// selected: td.currentDay // selected: td.currentDay
}); });
}); });
@ -126,7 +127,6 @@ BI.Calendar = BI.inherit(BI.Widget, {
rows: 6, rows: 6,
columnSize: [1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7], columnSize: [1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7],
rowSize: 24, rowSize: 24,
hgap: 10,
vgap: 10 vgap: 10
}))] }))]
}); });

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

@ -9,7 +9,10 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
height: 24, height: 24,
iconHeight: null, iconHeight: null,
iconWidth: null, iconWidth: null,
value: "" value: "",
attributes: {
tabIndex: 0
}
}); });
}, },
@ -24,14 +27,16 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
iconCls: o.iconCls, iconCls: o.iconCls,
value: o.value, value: o.value,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
iconWidth: o.iconWidth iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth
}); });
this.popup = BI.createWidget({ this.popup = BI.createWidget({
type: "bi.icon_text_value_combo_popup", type: "bi.icon_text_value_combo_popup",
items: o.items, items: o.items,
value: o.value, value: o.value,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
iconWidth: o.iconWidth iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth
}); });
this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE, function () { this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE, function () {
self.setValue(self.popup.getValue()); self.setValue(self.popup.getValue());

4
src/case/combo/icontextvaluecombo/popup.icontextvalue.js

@ -17,7 +17,8 @@ BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
type: "bi.single_select_icon_text_item", type: "bi.single_select_icon_text_item",
height: 24, height: 24,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
iconWidth: o.iconWidth iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth
}), }),
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
layouts: [{ layouts: [{
@ -47,6 +48,7 @@ BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
items = BI.createItems(items, { items = BI.createItems(items, {
type: "bi.single_select_icon_text_item", type: "bi.single_select_icon_text_item",
height: 24, height: 24,
iconWrapperWidth: o.iconWrapperWidth,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
iconWidth: o.iconWidth iconWidth: o.iconWidth
}); });

10
src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js

@ -25,6 +25,9 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
ref: function () { ref: function () {
self.combo = this; self.combo = this;
}, },
attributes: {
tabIndex: 0
},
el: { el: {
type: "bi.search_text_value_trigger", type: "bi.search_text_value_trigger",
ref: function () { ref: function () {
@ -36,6 +39,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
value: o.value, value: o.value,
tipType: o.tipType, tipType: o.tipType,
warningTitle: o.warningTitle, warningTitle: o.warningTitle,
title: o.title,
listeners: [{ listeners: [{
eventName: BI.SearchTextValueTrigger.EVENT_CHANGE, eventName: BI.SearchTextValueTrigger.EVENT_CHANGE,
action: function () { action: function () {
@ -46,14 +50,14 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
}] }]
}, },
popup: { popup: {
el:{ el: {
type: "bi.text_value_combo_popup", type: "bi.text_value_combo_popup",
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
value: o.value, value: o.value,
items: o.items, items: o.items,
ref: function () { ref: function () {
self.popup = this; self.popup = this;
self.trigger.getSearcher().setAdapter(self.popup); // self.trigger.getSearcher().setAdapter(self.popup);
}, },
listeners: [{ listeners: [{
eventName: BI.TextValueComboPopup.EVENT_CHANGE, eventName: BI.TextValueComboPopup.EVENT_CHANGE,
@ -69,7 +73,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
listeners: [{ listeners: [{
eventName: BI.Combo.EVENT_AFTER_HIDEVIEW, eventName: BI.Combo.EVENT_AFTER_HIDEVIEW,
action: function () { action: function () {
self.trigger.stopEditing(); // self.trigger.stopEditing();
self.element.removeClass("combo-show"); self.element.removeClass("combo-show");
} }
}, { }, {

5
src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js

@ -4,7 +4,7 @@
BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
props: { props: {
baseCls: "bi-search-text-value-trigger bi-border", baseCls: "bi-search-text-value-trigger bi-border bi-focus-shadow",
height: 24 height: 24
}, },
@ -27,7 +27,8 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
}, },
text: this._digest(o.value, o.items), text: this._digest(o.value, o.items),
value: o.value, value: o.value,
height: o.height height: o.height,
tipText: ""
}, },
popup: { popup: {
type: "bi.search_text_value_combo_popup", type: "bi.search_text_value_combo_popup",

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

@ -11,7 +11,10 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
height: 24, height: 24,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
text: "", text: "",
value: "" value: "",
attributes: {
tabIndex: 0
}
}); });
}, },

23
src/case/editor/editor.state.js

@ -55,6 +55,16 @@ BI.StateEditor = BI.inherit(BI.Widget, {
self._showInput(); self._showInput();
self.editor.focus(); self.editor.focus();
self.editor.setValue(""); self.editor.setValue("");
},
title: BI.isNotNull(o.tipText) ? o.tipText : function () {
var title = "";
if (BI.isString(self.stateValue)) {
title = self.stateValue;
}
if (BI.isArray(self.stateValue) && self.stateValue.length === 1) {
title = self.stateValue[0];
}
return title;
} }
}); });
this.text.on(BI.TextButton.EVENT_CHANGE, function () { this.text.on(BI.TextButton.EVENT_CHANGE, function () {
@ -214,32 +224,23 @@ BI.StateEditor = BI.inherit(BI.Widget, {
setState: function (v) { setState: function (v) {
var o = this.options; var o = this.options;
BI.StateEditor.superclass.setValue.apply(this, arguments); BI.StateEditor.superclass.setValue.apply(this, arguments);
this.stateValue = v;
if (BI.isNumber(v)) { if (BI.isNumber(v)) {
if (v === BI.Selection.All) { if (v === BI.Selection.All) {
this.text.setText(BI.i18nText("BI-Select_All")); this.text.setText(BI.i18nText("BI-Select_All"));
this.text.setTitle("");
this.text.element.removeClass("state-editor-infinite-text"); this.text.element.removeClass("state-editor-infinite-text");
} else if (v === BI.Selection.Multi) { } else if (v === BI.Selection.Multi) {
this.text.setText(BI.i18nText("BI-Select_Part")); this.text.setText(BI.i18nText("BI-Select_Part"));
this.text.setTitle("");
this.text.element.removeClass("state-editor-infinite-text"); this.text.element.removeClass("state-editor-infinite-text");
} else { } else {
this.text.setText(o.text); this.text.setText(o.text);
this.text.setTitle("");
this.text.element.addClass("state-editor-infinite-text"); this.text.element.addClass("state-editor-infinite-text");
} }
return; return;
} }
if (BI.isString(v)) { if (BI.isString(v)) {
// if (BI.isEmpty(v)) {
// this.text.setText(o.text);
// this.text.setTitle("");
// this.text.element.addClass("state-editor-infinite-text");
// } else {
this.text.setText(v); this.text.setText(v);
this.text.setTitle(v);
this.text.element.removeClass("state-editor-infinite-text"); this.text.element.removeClass("state-editor-infinite-text");
// }
return; return;
} }
if (BI.isArray(v)) { if (BI.isArray(v)) {
@ -248,11 +249,9 @@ BI.StateEditor = BI.inherit(BI.Widget, {
this.text.element.addClass("state-editor-infinite-text"); this.text.element.addClass("state-editor-infinite-text");
} else if (v.length === 1) { } else if (v.length === 1) {
this.text.setText(v[0]); this.text.setText(v[0]);
this.text.setTitle(v[0]);
this.text.element.removeClass("state-editor-infinite-text"); this.text.element.removeClass("state-editor-infinite-text");
} else { } else {
this.text.setText(BI.i18nText("BI-Select_Part")); this.text.setText(BI.i18nText("BI-Select_Part"));
this.text.setTitle("");
this.text.element.removeClass("state-editor-infinite-text"); this.text.element.removeClass("state-editor-infinite-text");
} }
} }

3
src/case/list/list.select.js

@ -19,7 +19,8 @@ BI.SelectList = BI.inherit(BI.Widget, {
hasNext: BI.emptyFn, hasNext: BI.emptyFn,
onLoaded: BI.emptyFn, onLoaded: BI.emptyFn,
toolbar: { toolbar: {
type: "bi.multi_select_bar" type: "bi.multi_select_bar",
iconWrapperWidth: 36
}, },
el: { el: {
type: "bi.list_pane" type: "bi.list_pane"

5
src/case/toolbar/toolbar.multiselect.js

@ -17,7 +17,8 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
isHalfCheckedBySelectedValue: function (selectedValues) { isHalfCheckedBySelectedValue: function (selectedValues) {
return selectedValues.length > 0; return selectedValues.length > 0;
}, },
halfSelected: false halfSelected: false,
iconWrapperWidth: 26
}); });
}, },
_init: function () { _init: function () {
@ -70,7 +71,7 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
type: "bi.htape", type: "bi.htape",
element: this, element: this,
items: [{ items: [{
width: 26, width: o.iconWrapperWidth,
el: { el: {
type: "bi.center_adapt", type: "bi.center_adapt",
items: [this.checkbox, this.half] items: [this.checkbox, this.half]

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

@ -28,8 +28,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
cls: "select-text-label", cls: "select-text-label",
textAlign: "left", textAlign: "left",
height: o.height, height: o.height,
text: o.text, text: o.text
hgap: c.hgap
}); });
this.trigerButton = BI.createWidget({ this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button", type: "bi.trigger_icon_button",
@ -54,7 +53,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
disableSelected: true disableSelected: true
}, },
width: BI.isEmptyString(o.iconCls) ? 0 : (o.triggerWidth || o.height) width: BI.isEmptyString(o.iconCls) ? 0 : (o.iconWrapperWidth || o.height)
}, },
{ {
el: this.text el: this.text
@ -80,8 +79,8 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
this.wrapper.resize(); this.wrapper.resize();
} }
}else{ }else{
if(iconItem.width !== (o.triggerWidth || o.height)) { if(iconItem.width !== (o.iconWrapperWidth || o.height)) {
iconItem.width = (o.triggerWidth || o.height); iconItem.width = (o.iconWrapperWidth || o.height);
this.wrapper.resize(); this.wrapper.resize();
} }
} }

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

@ -25,7 +25,8 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
iconCls: obj.iconCls, iconCls: obj.iconCls,
height: o.height, height: o.height,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
iconWidth: o.iconWidth iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth
}); });
}, },

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

@ -9,7 +9,7 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-text-trigger bi-border", baseCls: "bi-select-text-trigger bi-border bi-focus-shadow",
height: 24 height: 24
}); });
}, },

3
src/core/func/function.js

@ -315,11 +315,12 @@ BI.extend(BI.DOM, {
ctx.fillText(param, 6 * ratio, 12 * ratio); ctx.fillText(param, 6 * ratio, 12 * ratio);
$(canvas).destroy(); $(canvas).destroy();
var backColor = backgroundColor || "#EAF2FD"; var backColor = backgroundColor || "#EAF2FD";
// IE可以放大缩小所以要固定最大最小宽高
return { return {
width: w, width: w,
height: 24, height: 24,
src: canvas.toDataURL("image/png"), src: canvas.toDataURL("image/png"),
style: "background-color: " + backColor + ";vertical-align: middle; margin: 0 3px; width:" + w + "px;height: 24px", style: "background-color: " + backColor + ";vertical-align: middle; margin: 0 3px; width:" + w + "px;height: 24px; max-width:" + w + "px;max-height: 24px; min-width:" + w + "px;min-height: 24px",
param: param param: param
}; };
} }

3
src/core/jquery.js vendored

@ -9402,6 +9402,9 @@ jQuery.fn.offset = function( options ) {
offsetLeft += el.offsetLeft; offsetLeft += el.offsetLeft;
offsetTop += el.offsetTop; offsetTop += el.offsetTop;
offsetLeft -= el.scrollLeft;
offsetTop -= el.scrollTop;
el = el.offsetParent; el = el.offsetParent;
} while( el ); } while( el );
win = getWindow( doc ); win = getWindow( doc );

14
src/css/base/combo/combo.css

@ -89,6 +89,12 @@
display: block !important; display: block !important;
visibility: visible !important; visibility: visible !important;
} }
.bi-combo.bi-combo-popup:focus,
.bi-combo.bi-combo-popup:focus-within {
-webkit-box-shadow: 0 0 5px 2px #d7e7fc;
-moz-box-shadow: 0 0 5px 2px #d7e7fc;
box-shadow: 0 0 5px 2px #d7e7fc;
}
.bi-search-text-value-combo .trigger-icon-button { .bi-search-text-value-combo .trigger-icon-button {
font-size: 16px; font-size: 16px;
@ -108,6 +114,10 @@
.bi-search-text-value-combo.combo-show .trigger-down { .bi-search-text-value-combo.combo-show .trigger-down {
display: none; display: none;
} }
.bi-combo.bi-combo-popup > .bi-search-text-value-trigger,
.bi-combo:hover > .bi-search-text-value-trigger {
border-color: #3685f2;
}
.bi-icon-text-value-combo.combo-error .bi-text-trigger .select-text-label { .bi-icon-text-value-combo.combo-error .bi-text-trigger .select-text-label {
color: #ff4949; color: #ff4949;
@ -116,3 +126,7 @@
.bi-text-value-combo.combo-error .bi-select-text-trigger .select-text-label { .bi-text-value-combo.combo-error .bi-select-text-trigger .select-text-label {
color: #ff4949; color: #ff4949;
} }
.bi-combo.bi-combo-popup > .bi-select-text-trigger,
.bi-combo:hover > .bi-select-text-trigger {
border-color: #3685f2;
}

4
src/css/base/single/text.css

@ -13,3 +13,7 @@
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/ /*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
word-break: break-word; word-break: break-word;
} }
.bi-text:before {
content: '';
display: block;
}

21
src/css/base/tree/ztree.css

@ -29,6 +29,15 @@
vertical-align: top; vertical-align: top;
display: inline-block; display: inline-block;
} }
.ztree li a:hover {
background-color: rgba(54, 133, 242, 0.06);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0f3685f2,endColorstr=#0f3685f2);
}
.ztree li a:active {
color: #3685f2;
background-color: rgba(54, 133, 242, 0.06);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0f3685f2,endColorstr=#0f3685f2);
}
.ztree li a.curSelectedNode_Edit { .ztree li a.curSelectedNode_Edit {
padding-top: 0px; padding-top: 0px;
background-color: #FFE6B0; background-color: #FFE6B0;
@ -112,6 +121,18 @@
.ztree li span.button.chk.radio_true_part_focus { .ztree li span.button.chk.radio_true_part_focus {
background-position: -42px -42px; background-position: -42px -42px;
} }
.ztree li span.button.chk.checkbox_true_full + a {
color: #3685f2;
}
.ztree li span.button.chk.checkbox_true_full_focus + a {
color: #3685f2;
}
.ztree li span.button.chk.checkbox_true_part + a {
color: #3685f2;
}
.ztree li span.button.chk.checkbox_true_part_focus + a {
color: #3685f2;
}
.ztree li span.button.chk.radio_true_disable { .ztree li span.button.chk.radio_true_disable {
background-position: -42px -56px; background-position: -42px -56px;
} }

3
src/css/core/normalize2.css

@ -19,6 +19,9 @@ a {
a:focus { a:focus {
outline: 0; outline: 0;
} }
div:focus {
outline: none;
}
input::-webkit-contacts-auto-fill-button { input::-webkit-contacts-auto-fill-button {
visibility: hidden; visibility: hidden;
display: none !important; display: none !important;

10
src/css/core/utils/common.css

@ -31,6 +31,16 @@ textarea {
.bi-theme-dark .base-disabled .b-font:before { .bi-theme-dark .base-disabled .b-font:before {
color: #606479 !important; color: #606479 !important;
} }
.bi-focus-shadow:focus-within,
.bi-focus-shadow:focus {
border-color: #3685f2;
-webkit-box-shadow: 0 0 5px 2px #d7e7fc;
-moz-box-shadow: 0 0 5px 2px #d7e7fc;
box-shadow: 0 0 5px 2px #d7e7fc;
}
.bi-focus-shadow:hover {
border-color: #3685f2;
}
.base-invalid { .base-invalid {
cursor: default !important; cursor: default !important;
} }

4
src/css/widget/multiselect/multiselect.css

@ -13,6 +13,10 @@
.bi-multi-select-combo.combo-show .trigger-down { .bi-multi-select-combo.combo-show .trigger-down {
display: none; display: none;
} }
.bi-combo.bi-combo-popup:focus > .bi-multi-select-trigger,
.bi-combo.bi-combo-popup:hover > .bi-multi-select-trigger {
border-color: #3685f2;
}
.bi-multi-select-insert-combo .multi-select-trigger-icon-button { .bi-multi-select-insert-combo .multi-select-trigger-icon-button {
font-size: 16px; font-size: 16px;

4
src/css/widget/singleselect/multiselect.css

@ -13,3 +13,7 @@
.bi-single-select-combo.combo-show .trigger-down { .bi-single-select-combo.combo-show .trigger-down {
display: none; display: none;
} }
.bi-combo.bi-combo-popup:focus > .bi-single-select-trigger,
.bi-combo.bi-combo-popup:hover > .bi-single-select-trigger {
border-color: #3685f2;
}

4
src/css/widget/singletreecombo/singletreecombo.css

@ -0,0 +1,4 @@
.bi-combo.bi-combo-popup:focus > .bi-single-tree-trigger,
.bi-combo.bi-combo-popup:hover > .bi-single-tree-trigger {
border-color: #3685f2;
}

4
src/less/base/combo/combo.less

@ -1,6 +1,10 @@
@import "../../index";
.bi-combo { .bi-combo {
&.bi-combo-popup { &.bi-combo-popup {
display: block !important; display: block !important;
visibility: visible !important; visibility: visible !important;
&:focus, &:focus-within {
.box-shadow(0 0 5px 2px, @color-bi-blue-20);
}
} }
} }

8
src/less/base/combo/combo.searchtextvalue.less

@ -25,4 +25,12 @@
display: none; display: none;
} }
} }
}
.bi-combo {
&.bi-combo-popup, &:hover{
& > .bi-search-text-value-trigger {
border-color: @color-bi-border-highlight;
}
}
} }

8
src/less/base/combo/combo.textvalue.less

@ -8,4 +8,12 @@
} }
} }
} }
}
.bi-combo {
&.bi-combo-popup, &:hover{
& > .bi-select-text-trigger {
border-color: @color-bi-border-highlight;
}
}
} }

5
src/less/base/single/text.less

@ -5,4 +5,9 @@
.box-sizing(border-box); .box-sizing(border-box);
// BI-9141 加的,但是去掉后在firefox下没有问题,先去掉以适配ie9 // BI-9141 加的,但是去掉后在firefox下没有问题,先去掉以适配ie9
word-break: break-word; word-break: break-word;
// safari下text-overflow:ellipsis且显示不下会有title
&:before {
content: '';
display: block;
}
} }

35
src/less/base/tree/ztree.less

@ -33,7 +33,14 @@
background-color: transparent; background-color: transparent;
text-decoration: none; text-decoration: none;
vertical-align: top; vertical-align: top;
display: inline-block display: inline-block;
&:hover {
.background-color(@color-bi-background-highlight, 6%);
}
&:active {
color: @color-bi-text-highlight;
.background-color(@color-bi-background-highlight, 6%);
}
} }
.ztree li a.curSelectedNode { .ztree li a.curSelectedNode {
@ -134,7 +141,7 @@
} }
.ztree li span.button.chk.radio_true_full_focus { .ztree li span.button.chk.radio_true_full_focus {
background-position: -42px -14px background-position: -42px -14px;
} }
.ztree li span.button.chk.radio_true_part { .ztree li span.button.chk.radio_true_part {
@ -145,6 +152,30 @@
background-position: -42px -42px background-position: -42px -42px
} }
.ztree li span.button.chk.checkbox_true_full {
& + a {
color: @color-bi-text-highlight;
}
}
.ztree li span.button.chk.checkbox_true_full_focus {
& + a {
color: @color-bi-text-highlight;
}
}
.ztree li span.button.chk.checkbox_true_part {
& + a {
color: @color-bi-text-highlight;
}
}
.ztree li span.button.chk.checkbox_true_part_focus {
& + a {
color: @color-bi-text-highlight;
}
}
.ztree li span.button.chk.radio_true_disable { .ztree li span.button.chk.radio_true_disable {
background-position: -42px -56px background-position: -42px -56px
} }

4
src/less/core/normalize2.less

@ -24,6 +24,10 @@ a:focus {
outline: 0; outline: 0;
} }
div:focus {
outline: none;
}
input { input {
&::-webkit-contacts-auto-fill-button { &::-webkit-contacts-auto-fill-button {
visibility: hidden; visibility: hidden;

10
src/less/core/utils/common.less

@ -41,6 +41,16 @@ textarea {
} }
} }
.bi-focus-shadow {
&:focus-within, &:focus {
border-color: @color-bi-border-highlight;
.box-shadow(0 0 5px 2px, @color-bi-blue-20);
}
&:hover {
border-color: @color-bi-border-highlight;
}
}
.base-invalid { .base-invalid {
cursor: default !important; cursor: default !important;
} }

10
src/less/widget/multiselect/multiselect.combo.less

@ -18,4 +18,14 @@
display: none; display: none;
} }
} }
}
.bi-combo {
&.bi-combo-popup {
&:focus, &:hover {
& > .bi-multi-select-trigger {
border-color: @color-bi-border-highlight;
}
}
}
} }

10
src/less/widget/singleselect/multiselect.combo.less

@ -18,4 +18,14 @@
display: none; display: none;
} }
} }
}
.bi-combo {
&.bi-combo-popup {
&:focus, &:hover {
& > .bi-single-select-trigger {
border-color: @color-bi-border-highlight;
}
}
}
} }

11
src/less/widget/singletreecombo/singletreecombo.less

@ -0,0 +1,11 @@
@import "../../index";
.bi-combo {
&.bi-combo-popup {
&:focus, &:hover {
& > .bi-single-tree-trigger {
border-color: @color-bi-border-highlight;
}
}
}
}

2
src/widget/date/calendar/popup.calendar.date.js

@ -86,7 +86,7 @@ BI.DateCalendarPopup = BI.inherit(BI.Widget, {
element: this, element: this,
items: [{ items: [{
el: this.calendar, el: this.calendar,
left: 10, left: 0,
right: 10 right: 10
}, { }, {
el: { el: {

26
src/widget/dynamicdate/dynamicdate.card.js

@ -111,8 +111,7 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
self.fireEvent("EVENT_CHANGE"); self.fireEvent("EVENT_CHANGE");
} }
}] }]
}, }
bgap: 5
}], }],
ref: function () { ref: function () {
self.workDay = this; self.workDay = this;
@ -138,16 +137,19 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
var self = this; var self = this;
var items = BI.map(values, function (idx, value) { var items = BI.map(values, function (idx, value) {
return { return {
type: "bi.dynamic_date_param_item", el: {
dateType: value.dateType, type: "bi.dynamic_date_param_item",
value: value.value, dateType: value.dateType,
offset: value.offset, value: value.value,
listeners: [{ offset: value.offset,
eventName: "EVENT_CHANGE", listeners: [{
action: function () { eventName: "EVENT_CHANGE",
self.fireEvent("EVENT_CHANGE"); action: function () {
} self.fireEvent("EVENT_CHANGE");
}] }
}]
},
tgap: idx === 0 ? 5 : 0
}; };
}); });

2
src/widget/editor/editor.search.js

@ -5,7 +5,7 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.SearchEditor.superclass._defaultConfig.apply(this, arguments); var conf = BI.SearchEditor.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
baseCls: "bi-search-editor bi-border", baseCls: "bi-search-editor bi-border bi-focus-shadow",
height: 24, height: 24,
errorText: "", errorText: "",
watermark: BI.i18nText("BI-Basic_Search"), watermark: BI.i18nText("BI-Basic_Search"),

3
src/widget/multiselect/multiselect.loader.js

@ -118,7 +118,8 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, {
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active", cls: "bi-list-item-active",
height: 24, height: 24,
selected: this.isAllSelected() selected: this.isAllSelected(),
iconWrapperWidth: 36
}); });
}, },

4
src/widget/multiselect/multiselect.loader.nobar.js

@ -114,8 +114,10 @@ BI.MultiSelectNoBarLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.multi_select_item", type: "bi.multi_select_item",
cls: "bi-list-item-active",
logic: this.options.logic, logic: this.options.logic,
height: 24 height: 24,
iconWrapperWidth: 36
}); });
}, },

4
src/widget/multiselect/search/multiselect.search.loader.js

@ -87,7 +87,9 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
dynamic: false dynamic: false
}, },
height: 24, height: 24,
selected: this.isAllSelected() selected: this.isAllSelected(),
cls: "bi-list-item-active",
iconWrapperWidth: 36
}); });
}, },

2
src/widget/numbereditor/number.editor.js

@ -5,7 +5,7 @@
BI.NumberEditor = BI.inherit(BI.Widget, { BI.NumberEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-number-editor bi-border", baseCls: "bi-number-editor bi-border bi-focus-shadow",
validationChecker: function () { validationChecker: function () {
return true; return true;
}, },

4
src/widget/searchmultitextvaluecombo/multitextvalue.loader.search.js

@ -111,8 +111,10 @@ BI.SearchMultiSelectLoader = BI.inherit(BI.Widget, {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.multi_select_item", type: "bi.multi_select_item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active",
height: 24, height: 24,
selected: this.isAllSelected() selected: this.isAllSelected(),
iconWrapperWidth: 36
}); });
}, },

5
src/widget/selecttree/selecttree.combo.js

@ -10,7 +10,10 @@ BI.SelectTreeCombo = BI.inherit(BI.Widget, {
height: 30, height: 30,
text: "", text: "",
items: [], items: [],
value: "" value: "",
attributes: {
tabIndex: 0
}
}); });
}, },

5
src/widget/singletree/singletree.combo.js

@ -11,7 +11,10 @@ BI.SingleTreeCombo = BI.inherit(BI.Widget, {
height: 24, height: 24,
text: "", text: "",
items: [], items: [],
value: "" value: "",
attributes: {
tabIndex: 0
}
}); });
}, },

Loading…
Cancel
Save