Browse Source

BI-28343 && BI-28368 single && combo && date && color && lodash.md && 阴影三角

es6
windy 6 years ago
parent
commit
0ddb56f907
  1. 82
      dist/_fineui.min.js
  2. 107
      dist/base.css
  3. 30
      dist/base.js
  4. 107
      dist/bundle.css
  5. 107
      dist/bundle.js
  6. 2
      dist/bundle.min.css
  7. 84
      dist/bundle.min.js
  8. 35
      dist/case.js
  9. 107
      dist/fineui.css
  10. 107
      dist/fineui.js
  11. 2
      dist/fineui.min.css
  12. 82
      dist/fineui.min.js
  13. 42
      dist/widget.js
  14. 1
      lodash.md
  15. 8
      src/base/combination/combo.js
  16. 3
      src/base/combination/group.combo.js
  17. 7
      src/base/single/editor/editor.js
  18. 12
      src/base/single/single.js
  19. 1
      src/case/colorchooser/colorchooser.popup.js
  20. 2
      src/case/combo/textvaluecombo/combo.textvalue.js
  21. 107
      src/css/base/combo/combo.css
  22. 99
      src/less/visual.less
  23. 4
      src/widget/date/calendar/combo.month.date.js
  24. 4
      src/widget/date/calendar/combo.year.date.js
  25. 34
      src/widget/numberinterval/numberinterval.js

82
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

107
dist/base.css vendored

@ -338,105 +338,78 @@
.bi-bubble-combo .bubble-combo-triangle-left {
z-index: 1;
position: absolute;
width: 5px;
width: 6px;
height: 16px;
border-left: 1px solid #f5f5f5;
}
.bi-bubble-combo .bubble-combo-triangle-left:before {
position: absolute;
left: 0px;
top: 0px;
right: 0px;
border-left: 7px solid #ccc;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
content: "";
}
.bi-bubble-combo .bubble-combo-triangle-left:after {
position: absolute;
top: 1px;
left: 1px;
right: 0px;
border-bottom: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
width: 6px;
height: 6px;
margin-left: 2px;
margin-top: -5px;
content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
}
.bi-bubble-combo .bubble-combo-triangle-right {
z-index: 1;
position: absolute;
width: 7px;
width: 6px;
height: 16px;
}
.bi-bubble-combo .bubble-combo-triangle-right:before {
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
border-right: 7px solid #ccc;
border-top: 7px solid transparent;
border-bottom: 8px solid transparent;
content: "";
}
.bi-bubble-combo .bubble-combo-triangle-right:after {
position: absolute;
right: 0px;
top: 0px;
bottom: 0px;
border-right: 7px solid #ffffff;
border-top: 7px solid transparent;
border-bottom: 8px solid transparent;
width: 6px;
height: 6px;
margin-left: 2px;
margin-top: 5px;
content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
}
.bi-bubble-combo .bubble-combo-triangle-top {
z-index: 1;
position: absolute;
width: 16px;
height: 10px;
border-top: 1px solid #ffffff;
}
.bi-bubble-combo .bubble-combo-triangle-top:after {
position: absolute;
right: 1px;
top: 0px;
border-top: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: "";
height: 6px;
}
.bi-bubble-combo .bubble-combo-triangle-top:before {
position: absolute;
border-top: 7px solid #cccccc;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
width: 6px;
height: 6px;
margin-left: 3px;
margin-top: -3px;
content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
}
.bi-bubble-combo .bubble-combo-triangle-bottom {
z-index: 1;
position: absolute;
width: 16px;
height: 5px;
border-bottom: 1px solid #ffffff;
height: 6px;
}
.bi-bubble-combo .bubble-combo-triangle-bottom:before {
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
border-bottom: 7px solid #ccc;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
content: "";
}
.bi-bubble-combo .bubble-combo-triangle-bottom:after {
position: absolute;
right: 1px;
top: 1px;
bottom: 0px;
border-bottom: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
width: 6px;
height: 6px;
margin-left: 3px;
margin-top: 3px;
content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
}
.bi-combo.bi-combo-popup {

30
dist/base.js vendored

@ -342,7 +342,9 @@ BI.Single = BI.inherit(BI.Widget, {
warningTitle: null,
tipType: null, // success或warning
value: null,
belowMouse: false // title是否跟随鼠标,
belowMouse: false, // title是否跟随鼠标,
// 之所以默认为body,是因为transform的效果影响
container: "body"
});
},
@ -376,7 +378,8 @@ BI.Single = BI.inherit(BI.Widget, {
if (BI.isKey(o.title) || BI.isKey(o.warningTitle)
|| BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) {
this.enableHover({
belowMouse: o.belowMouse
belowMouse: o.belowMouse,
container: o.container
});
}
},
@ -484,6 +487,11 @@ BI.Single = BI.inherit(BI.Widget, {
getValue: function () {
return this.options.value;
},
_unMount: function () {
BI.Single.superclass._unMount.apply(this, arguments);
BI.Tooltips.remove(this.getName());
}
});/**
* guy 表示一行数据通过position来定位位置的数据
@ -3020,7 +3028,7 @@ BI.Combo = BI.inherit(BI.Widget, {
trigger: "click",
toggle: true,
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
container: null, // popupview放置的容器,默认为this.element
container: "body", // popupview放置的容器,默认为body
isDefaultInit: false,
destroyWhenHide: false,
isNeedAdjustHeight: true, // 是否需要高度调整
@ -3478,6 +3486,12 @@ BI.Combo = BI.inherit(BI.Widget, {
.unbind("mouseleave." + this.getName());
BI.Resizers.remove(this.getName());
BI.Combo.superclass.destroy.apply(this, arguments);
},
destroyed: function () {
this.popupView && this.popupView.destroy();
this.popupView = null;
this._rendered = false;
}
});
BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE";
@ -3792,7 +3806,7 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
el: {type: "bi.text_button", text: "", value: ""},
children: [],
container: null,
popup: {
el: {
type: "bi.button_tree",
@ -3836,6 +3850,7 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
this.combo = BI.createWidget({
type: "bi.combo",
element: this,
container: o.container,
height: o.height,
trigger: o.trigger,
direction: o.direction,
@ -18514,7 +18529,8 @@ BI.Editor = BI.inherit(BI.Single, {
}
if (!this.disabledError && BI.isKey(errorText)) {
BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, {
adjustYOffset: 2
adjustYOffset: 2,
container: "body"
});
this._checkToolTip();
return BI.Bubbles.get(this.getName());
@ -18587,6 +18603,10 @@ BI.Editor = BI.inherit(BI.Single, {
isValid: function () {
return this.editor.isValid();
},
destroyed: function () {
BI.Bubbles.remove(this.getName());
}
});
BI.Editor.EVENT_CHANGE = "EVENT_CHANGE";

107
dist/bundle.css vendored

@ -2184,105 +2184,78 @@ textarea {
.bi-bubble-combo .bubble-combo-triangle-left {
z-index: 1;
position: absolute;
width: 5px;
width: 6px;
height: 16px;
border-left: 1px solid #f5f5f5;
}
.bi-bubble-combo .bubble-combo-triangle-left:before {
position: absolute;
left: 0px;
top: 0px;
right: 0px;
border-left: 7px solid #ccc;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
content: "";
}
.bi-bubble-combo .bubble-combo-triangle-left:after {
position: absolute;
top: 1px;
left: 1px;
right: 0px;
border-bottom: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
width: 6px;
height: 6px;
margin-left: 2px;
margin-top: -5px;
content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
}
.bi-bubble-combo .bubble-combo-triangle-right {
z-index: 1;
position: absolute;
width: 7px;
width: 6px;
height: 16px;
}
.bi-bubble-combo .bubble-combo-triangle-right:before {
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
border-right: 7px solid #ccc;
border-top: 7px solid transparent;
border-bottom: 8px solid transparent;
content: "";
}
.bi-bubble-combo .bubble-combo-triangle-right:after {
position: absolute;
right: 0px;
top: 0px;
bottom: 0px;
border-right: 7px solid #ffffff;
border-top: 7px solid transparent;
border-bottom: 8px solid transparent;
width: 6px;
height: 6px;
margin-left: 2px;
margin-top: 5px;
content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
}
.bi-bubble-combo .bubble-combo-triangle-top {
z-index: 1;
position: absolute;
width: 16px;
height: 10px;
border-top: 1px solid #ffffff;
}
.bi-bubble-combo .bubble-combo-triangle-top:after {
position: absolute;
right: 1px;
top: 0px;
border-top: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: "";
height: 6px;
}
.bi-bubble-combo .bubble-combo-triangle-top:before {
position: absolute;
border-top: 7px solid #cccccc;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
width: 6px;
height: 6px;
margin-left: 3px;
margin-top: -3px;
content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
}
.bi-bubble-combo .bubble-combo-triangle-bottom {
z-index: 1;
position: absolute;
width: 16px;
height: 5px;
border-bottom: 1px solid #ffffff;
height: 6px;
}
.bi-bubble-combo .bubble-combo-triangle-bottom:before {
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
border-bottom: 7px solid #ccc;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
content: "";
}
.bi-bubble-combo .bubble-combo-triangle-bottom:after {
position: absolute;
right: 1px;
top: 1px;
bottom: 0px;
border-bottom: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
width: 6px;
height: 6px;
margin-left: 3px;
margin-top: 3px;
content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
}
.bi-combo.bi-combo-popup {

107
dist/bundle.js vendored

@ -36257,7 +36257,9 @@ BI.Single = BI.inherit(BI.Widget, {
warningTitle: null,
tipType: null, // success或warning
value: null,
belowMouse: false // title是否跟随鼠标,
belowMouse: false, // title是否跟随鼠标,
// 之所以默认为body,是因为transform的效果影响
container: "body"
});
},
@ -36291,7 +36293,8 @@ BI.Single = BI.inherit(BI.Widget, {
if (BI.isKey(o.title) || BI.isKey(o.warningTitle)
|| BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) {
this.enableHover({
belowMouse: o.belowMouse
belowMouse: o.belowMouse,
container: o.container
});
}
},
@ -36399,6 +36402,11 @@ BI.Single = BI.inherit(BI.Widget, {
getValue: function () {
return this.options.value;
},
_unMount: function () {
BI.Single.superclass._unMount.apply(this, arguments);
BI.Tooltips.remove(this.getName());
}
});/**
* guy 表示一行数据通过position来定位位置的数据
@ -38935,7 +38943,7 @@ BI.Combo = BI.inherit(BI.Widget, {
trigger: "click",
toggle: true,
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
container: null, // popupview放置的容器,默认为this.element
container: "body", // popupview放置的容器,默认为body
isDefaultInit: false,
destroyWhenHide: false,
isNeedAdjustHeight: true, // 是否需要高度调整
@ -39393,6 +39401,12 @@ BI.Combo = BI.inherit(BI.Widget, {
.unbind("mouseleave." + this.getName());
BI.Resizers.remove(this.getName());
BI.Combo.superclass.destroy.apply(this, arguments);
},
destroyed: function () {
this.popupView && this.popupView.destroy();
this.popupView = null;
this._rendered = false;
}
});
BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE";
@ -39707,7 +39721,7 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
el: {type: "bi.text_button", text: "", value: ""},
children: [],
container: null,
popup: {
el: {
type: "bi.button_tree",
@ -39751,6 +39765,7 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
this.combo = BI.createWidget({
type: "bi.combo",
element: this,
container: o.container,
height: o.height,
trigger: o.trigger,
direction: o.direction,
@ -54429,7 +54444,8 @@ BI.Editor = BI.inherit(BI.Single, {
}
if (!this.disabledError && BI.isKey(errorText)) {
BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, {
adjustYOffset: 2
adjustYOffset: 2,
container: "body"
});
this._checkToolTip();
return BI.Bubbles.get(this.getName());
@ -54502,6 +54518,10 @@ BI.Editor = BI.inherit(BI.Single, {
isValid: function () {
return this.editor.isValid();
},
destroyed: function () {
BI.Bubbles.remove(this.getName());
}
});
BI.Editor.EVENT_CHANGE = "EVENT_CHANGE";
@ -76477,6 +76497,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.more = BI.createWidget({
type: "bi.combo",
container: null,
direction: "right,top",
isNeedAdjustHeight: false,
el: {
@ -79341,6 +79362,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
height: 24,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
text: "",
container: null,
value: ""
});
},
@ -79371,6 +79393,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
});
this.textIconCombo = BI.createWidget({
type: "bi.combo",
container: o.container,
element: this,
adjustLength: 2,
el: this.trigger,
@ -83405,6 +83428,12 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
* @extends BI.Widget
*/
!(function () {
function isIE11Below () {
if (!BI.isIE()) {
return false;
}
return BI.getIEVersion() < 11;
}
BI.NicEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.NicEditor.superclass._defaultConfig.apply(this, arguments), {
@ -83458,6 +83487,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
selectCheck: function (e) {
var t = e.target;
var self = this;
var found = false;
do {
if (t.nodeName !== "svg" && t.className && t.className.indexOf(prefix) != -1) {
@ -83466,6 +83496,10 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
}
if (this.instance.checkToolbar(t)) {
this.instance.saveRng();
// 如果是点击在toolbar内恢复选取(IE中出现的问题)
BI.defer(function () {
self.instance.restoreRng();
});
return;
}
} while (t = t.parentNode);
@ -83484,8 +83518,8 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
},
setValue: function (v) {
v = v || "";
v = v.startWith("<div>") ? v : "<div>" + v + "</div>";
v = v || ( isIE11Below() ? "" : "<br>");
v = ($(v)[0] && $(v)[0].nodeName === "P") ? v : "<p>" + v + "</p>";
this.instance.setContent(v);
},
@ -83520,7 +83554,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
nicEditorInstance.superclass._init.apply(this, arguments);
var o = this.options;
var initValue = o.value || "<br>";
initValue = initValue.startWith("<div>") ? initValue : "<div>" + initValue + "</div>";
initValue = initValue.startWith("<p>") ? initValue : "<p>" + initValue + "</p>";
this.ne = this.options.ne;
this.elm = BI.createWidget({
type: "bi.layout",
@ -83680,7 +83714,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
keyDown: function (e, t) {
if (e.keyCode === 8) {
var html = this.elm.element.html().toLowerCase().trim();
if (html === "<div><br></div>" || html === "<div></div>") {
if (html === "<p><br></p>" || html === "<p></p>") {
e.preventDefault()
return;
}
@ -83714,7 +83748,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
var newLine;
var html = this.elm.element.html().toLowerCase().trim();
if (!html || html === '<br>') {
newLine = $("<div></div>");
newLine = $(this._getNewLine());
this.elm.element.html('');
this.elm.element.append(newLine);
this.setFocus(newLine[0]);
@ -83817,7 +83851,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
// 新增一个空行
var html = last.html().toLowerCase();
var nodeName = last.nodeName;
if ((html !== "<br>" && html !== "<br\/>") || nodeName !== "DIV") {
if ((html !== "<br>" && html !== "<br\/>") || nodeName !== "P") {
// 最后一个元素不是空行,添加一个空行,重新设置选区
el.append(newLineHtml);
this.initSelection();
@ -83829,7 +83863,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
},
_getNewLine: function () {
return "<div><br></div>";
return isIE11Below() ? "<p></p>" : "<p><br></p>";
},
_isChildOf: function(child, parent) {
@ -83846,12 +83880,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
return false;
},
_isIE11Below: function() {
if (!BI.isIE()) {
return false;
}
return BI.getIEVersion() < 11;
}
});
}());
/**
@ -88432,7 +88461,8 @@ BI.MonthDateCombo = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
return BI.extend( BI.MonthDateCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-month-combo",
height: 24
height: 24,
container: null
});
},
_init: function () {
@ -88456,6 +88486,7 @@ BI.MonthDateCombo = BI.inherit(BI.Trigger, {
this.combo = BI.createWidget({
type: "bi.combo",
offsetStyle: "center",
container: null,
element: this,
isNeedAdjustHeight: false,
isNeedAdjustWidth: false,
@ -88500,7 +88531,8 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期
behaviors: {},
height: 24
height: 24,
container: null
});
},
_init: function () {
@ -88529,6 +88561,7 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
type: "bi.combo",
offsetStyle: "center",
element: this,
container: o.container,
isNeedAdjustHeight: false,
isNeedAdjustWidth: false,
el: this.trigger,
@ -102632,19 +102665,22 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
break;
case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
break;
case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
break;
default :
@ -102681,7 +102717,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
self._checkValidation();
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
});
@ -102695,14 +102732,16 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
@ -102720,19 +102759,22 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
break;
case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
break;
case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
break;
default :
@ -102863,6 +102905,13 @@ BI.NumberInterval = BI.inherit(BI.Single, {
value.closeMax = true;
}
return value;
},
destroyed: function () {
var c = this.constants;
BI.Bubbles.remove(c.typeError);
BI.Bubbles.remove(c.numberError);
BI.Bubbles.remove(c.signalError);
}
});
BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE";

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

84
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

35
dist/case.js vendored

@ -3814,6 +3814,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.more = BI.createWidget({
type: "bi.combo",
container: null,
direction: "right,top",
isNeedAdjustHeight: false,
el: {
@ -6678,6 +6679,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
height: 24,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
text: "",
container: null,
value: ""
});
},
@ -6708,6 +6710,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
});
this.textIconCombo = BI.createWidget({
type: "bi.combo",
container: o.container,
element: this,
adjustLength: 2,
el: this.trigger,
@ -10742,6 +10745,12 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
* @extends BI.Widget
*/
!(function () {
function isIE11Below () {
if (!BI.isIE()) {
return false;
}
return BI.getIEVersion() < 11;
}
BI.NicEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.NicEditor.superclass._defaultConfig.apply(this, arguments), {
@ -10795,6 +10804,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
selectCheck: function (e) {
var t = e.target;
var self = this;
var found = false;
do {
if (t.nodeName !== "svg" && t.className && t.className.indexOf(prefix) != -1) {
@ -10803,6 +10813,10 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
}
if (this.instance.checkToolbar(t)) {
this.instance.saveRng();
// 如果是点击在toolbar内恢复选取(IE中出现的问题)
BI.defer(function () {
self.instance.restoreRng();
});
return;
}
} while (t = t.parentNode);
@ -10821,8 +10835,8 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
},
setValue: function (v) {
v = v || "";
v = v.startWith("<div>") ? v : "<div>" + v + "</div>";
v = v || ( isIE11Below() ? "" : "<br>");
v = ($(v)[0] && $(v)[0].nodeName === "P") ? v : "<p>" + v + "</p>";
this.instance.setContent(v);
},
@ -10857,7 +10871,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
nicEditorInstance.superclass._init.apply(this, arguments);
var o = this.options;
var initValue = o.value || "<br>";
initValue = initValue.startWith("<div>") ? initValue : "<div>" + initValue + "</div>";
initValue = initValue.startWith("<p>") ? initValue : "<p>" + initValue + "</p>";
this.ne = this.options.ne;
this.elm = BI.createWidget({
type: "bi.layout",
@ -11017,7 +11031,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
keyDown: function (e, t) {
if (e.keyCode === 8) {
var html = this.elm.element.html().toLowerCase().trim();
if (html === "<div><br></div>" || html === "<div></div>") {
if (html === "<p><br></p>" || html === "<p></p>") {
e.preventDefault()
return;
}
@ -11051,7 +11065,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
var newLine;
var html = this.elm.element.html().toLowerCase().trim();
if (!html || html === '<br>') {
newLine = $("<div></div>");
newLine = $(this._getNewLine());
this.elm.element.html('');
this.elm.element.append(newLine);
this.setFocus(newLine[0]);
@ -11154,7 +11168,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
// 新增一个空行
var html = last.html().toLowerCase();
var nodeName = last.nodeName;
if ((html !== "<br>" && html !== "<br\/>") || nodeName !== "DIV") {
if ((html !== "<br>" && html !== "<br\/>") || nodeName !== "P") {
// 最后一个元素不是空行,添加一个空行,重新设置选区
el.append(newLineHtml);
this.initSelection();
@ -11166,7 +11180,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
},
_getNewLine: function () {
return "<div><br></div>";
return isIE11Below() ? "<p></p>" : "<p><br></p>";
},
_isChildOf: function(child, parent) {
@ -11183,12 +11197,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
return false;
},
_isIE11Below: function() {
if (!BI.isIE()) {
return false;
}
return BI.getIEVersion() < 11;
}
});
}());
/**

107
dist/fineui.css vendored

@ -2184,105 +2184,78 @@ textarea {
.bi-bubble-combo .bubble-combo-triangle-left {
z-index: 1;
position: absolute;
width: 5px;
width: 6px;
height: 16px;
border-left: 1px solid #f5f5f5;
}
.bi-bubble-combo .bubble-combo-triangle-left:before {
position: absolute;
left: 0px;
top: 0px;
right: 0px;
border-left: 7px solid #ccc;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
content: "";
}
.bi-bubble-combo .bubble-combo-triangle-left:after {
position: absolute;
top: 1px;
left: 1px;
right: 0px;
border-bottom: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
width: 6px;
height: 6px;
margin-left: 2px;
margin-top: -5px;
content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
}
.bi-bubble-combo .bubble-combo-triangle-right {
z-index: 1;
position: absolute;
width: 7px;
width: 6px;
height: 16px;
}
.bi-bubble-combo .bubble-combo-triangle-right:before {
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
border-right: 7px solid #ccc;
border-top: 7px solid transparent;
border-bottom: 8px solid transparent;
content: "";
}
.bi-bubble-combo .bubble-combo-triangle-right:after {
position: absolute;
right: 0px;
top: 0px;
bottom: 0px;
border-right: 7px solid #ffffff;
border-top: 7px solid transparent;
border-bottom: 8px solid transparent;
width: 6px;
height: 6px;
margin-left: 2px;
margin-top: 5px;
content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
}
.bi-bubble-combo .bubble-combo-triangle-top {
z-index: 1;
position: absolute;
width: 16px;
height: 10px;
border-top: 1px solid #ffffff;
}
.bi-bubble-combo .bubble-combo-triangle-top:after {
position: absolute;
right: 1px;
top: 0px;
border-top: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: "";
height: 6px;
}
.bi-bubble-combo .bubble-combo-triangle-top:before {
position: absolute;
border-top: 7px solid #cccccc;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
width: 6px;
height: 6px;
margin-left: 3px;
margin-top: -3px;
content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
}
.bi-bubble-combo .bubble-combo-triangle-bottom {
z-index: 1;
position: absolute;
width: 16px;
height: 5px;
border-bottom: 1px solid #ffffff;
height: 6px;
}
.bi-bubble-combo .bubble-combo-triangle-bottom:before {
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
border-bottom: 7px solid #ccc;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
content: "";
}
.bi-bubble-combo .bubble-combo-triangle-bottom:after {
position: absolute;
right: 1px;
top: 1px;
bottom: 0px;
border-bottom: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
width: 6px;
height: 6px;
margin-left: 3px;
margin-top: 3px;
content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
}
.bi-combo.bi-combo-popup {

107
dist/fineui.js vendored

@ -36506,7 +36506,9 @@ BI.Single = BI.inherit(BI.Widget, {
warningTitle: null,
tipType: null, // success或warning
value: null,
belowMouse: false // title是否跟随鼠标,
belowMouse: false, // title是否跟随鼠标,
// 之所以默认为body,是因为transform的效果影响
container: "body"
});
},
@ -36540,7 +36542,8 @@ BI.Single = BI.inherit(BI.Widget, {
if (BI.isKey(o.title) || BI.isKey(o.warningTitle)
|| BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) {
this.enableHover({
belowMouse: o.belowMouse
belowMouse: o.belowMouse,
container: o.container
});
}
},
@ -36648,6 +36651,11 @@ BI.Single = BI.inherit(BI.Widget, {
getValue: function () {
return this.options.value;
},
_unMount: function () {
BI.Single.superclass._unMount.apply(this, arguments);
BI.Tooltips.remove(this.getName());
}
});/**
* guy 表示一行数据通过position来定位位置的数据
@ -39184,7 +39192,7 @@ BI.Combo = BI.inherit(BI.Widget, {
trigger: "click",
toggle: true,
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
container: null, // popupview放置的容器,默认为this.element
container: "body", // popupview放置的容器,默认为body
isDefaultInit: false,
destroyWhenHide: false,
isNeedAdjustHeight: true, // 是否需要高度调整
@ -39642,6 +39650,12 @@ BI.Combo = BI.inherit(BI.Widget, {
.unbind("mouseleave." + this.getName());
BI.Resizers.remove(this.getName());
BI.Combo.superclass.destroy.apply(this, arguments);
},
destroyed: function () {
this.popupView && this.popupView.destroy();
this.popupView = null;
this._rendered = false;
}
});
BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE";
@ -39956,7 +39970,7 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
el: {type: "bi.text_button", text: "", value: ""},
children: [],
container: null,
popup: {
el: {
type: "bi.button_tree",
@ -40000,6 +40014,7 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
this.combo = BI.createWidget({
type: "bi.combo",
element: this,
container: o.container,
height: o.height,
trigger: o.trigger,
direction: o.direction,
@ -54678,7 +54693,8 @@ BI.Editor = BI.inherit(BI.Single, {
}
if (!this.disabledError && BI.isKey(errorText)) {
BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, {
adjustYOffset: 2
adjustYOffset: 2,
container: "body"
});
this._checkToolTip();
return BI.Bubbles.get(this.getName());
@ -54751,6 +54767,10 @@ BI.Editor = BI.inherit(BI.Single, {
isValid: function () {
return this.editor.isValid();
},
destroyed: function () {
BI.Bubbles.remove(this.getName());
}
});
BI.Editor.EVENT_CHANGE = "EVENT_CHANGE";
@ -76726,6 +76746,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.more = BI.createWidget({
type: "bi.combo",
container: null,
direction: "right,top",
isNeedAdjustHeight: false,
el: {
@ -79590,6 +79611,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
height: 24,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
text: "",
container: null,
value: ""
});
},
@ -79620,6 +79642,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
});
this.textIconCombo = BI.createWidget({
type: "bi.combo",
container: o.container,
element: this,
adjustLength: 2,
el: this.trigger,
@ -83654,6 +83677,12 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
* @extends BI.Widget
*/
!(function () {
function isIE11Below () {
if (!BI.isIE()) {
return false;
}
return BI.getIEVersion() < 11;
}
BI.NicEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.NicEditor.superclass._defaultConfig.apply(this, arguments), {
@ -83707,6 +83736,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
selectCheck: function (e) {
var t = e.target;
var self = this;
var found = false;
do {
if (t.nodeName !== "svg" && t.className && t.className.indexOf(prefix) != -1) {
@ -83715,6 +83745,10 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
}
if (this.instance.checkToolbar(t)) {
this.instance.saveRng();
// 如果是点击在toolbar内恢复选取(IE中出现的问题)
BI.defer(function () {
self.instance.restoreRng();
});
return;
}
} while (t = t.parentNode);
@ -83733,8 +83767,8 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
},
setValue: function (v) {
v = v || "";
v = v.startWith("<div>") ? v : "<div>" + v + "</div>";
v = v || ( isIE11Below() ? "" : "<br>");
v = ($(v)[0] && $(v)[0].nodeName === "P") ? v : "<p>" + v + "</p>";
this.instance.setContent(v);
},
@ -83769,7 +83803,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
nicEditorInstance.superclass._init.apply(this, arguments);
var o = this.options;
var initValue = o.value || "<br>";
initValue = initValue.startWith("<div>") ? initValue : "<div>" + initValue + "</div>";
initValue = initValue.startWith("<p>") ? initValue : "<p>" + initValue + "</p>";
this.ne = this.options.ne;
this.elm = BI.createWidget({
type: "bi.layout",
@ -83929,7 +83963,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
keyDown: function (e, t) {
if (e.keyCode === 8) {
var html = this.elm.element.html().toLowerCase().trim();
if (html === "<div><br></div>" || html === "<div></div>") {
if (html === "<p><br></p>" || html === "<p></p>") {
e.preventDefault()
return;
}
@ -83963,7 +83997,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
var newLine;
var html = this.elm.element.html().toLowerCase().trim();
if (!html || html === '<br>') {
newLine = $("<div></div>");
newLine = $(this._getNewLine());
this.elm.element.html('');
this.elm.element.append(newLine);
this.setFocus(newLine[0]);
@ -84066,7 +84100,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
// 新增一个空行
var html = last.html().toLowerCase();
var nodeName = last.nodeName;
if ((html !== "<br>" && html !== "<br\/>") || nodeName !== "DIV") {
if ((html !== "<br>" && html !== "<br\/>") || nodeName !== "P") {
// 最后一个元素不是空行,添加一个空行,重新设置选区
el.append(newLineHtml);
this.initSelection();
@ -84078,7 +84112,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
},
_getNewLine: function () {
return "<div><br></div>";
return isIE11Below() ? "<p></p>" : "<p><br></p>";
},
_isChildOf: function(child, parent) {
@ -84095,12 +84129,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
return false;
},
_isIE11Below: function() {
if (!BI.isIE()) {
return false;
}
return BI.getIEVersion() < 11;
}
});
}());
/**
@ -88681,7 +88710,8 @@ BI.MonthDateCombo = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
return BI.extend( BI.MonthDateCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-month-combo",
height: 24
height: 24,
container: null
});
},
_init: function () {
@ -88705,6 +88735,7 @@ BI.MonthDateCombo = BI.inherit(BI.Trigger, {
this.combo = BI.createWidget({
type: "bi.combo",
offsetStyle: "center",
container: null,
element: this,
isNeedAdjustHeight: false,
isNeedAdjustWidth: false,
@ -88749,7 +88780,8 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期
behaviors: {},
height: 24
height: 24,
container: null
});
},
_init: function () {
@ -88778,6 +88810,7 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
type: "bi.combo",
offsetStyle: "center",
element: this,
container: o.container,
isNeedAdjustHeight: false,
isNeedAdjustWidth: false,
el: this.trigger,
@ -102881,19 +102914,22 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
break;
case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
break;
case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
break;
default :
@ -102930,7 +102966,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
self._checkValidation();
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
});
@ -102944,14 +102981,16 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
@ -102969,19 +103008,22 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
break;
case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
break;
case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
break;
default :
@ -103112,6 +103154,13 @@ BI.NumberInterval = BI.inherit(BI.Single, {
value.closeMax = true;
}
return value;
},
destroyed: function () {
var c = this.constants;
BI.Bubbles.remove(c.typeError);
BI.Bubbles.remove(c.numberError);
BI.Bubbles.remove(c.signalError);
}
});
BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE";

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

82
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

42
dist/widget.js vendored

@ -429,7 +429,8 @@ BI.MonthDateCombo = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
return BI.extend( BI.MonthDateCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-month-combo",
height: 24
height: 24,
container: null
});
},
_init: function () {
@ -453,6 +454,7 @@ BI.MonthDateCombo = BI.inherit(BI.Trigger, {
this.combo = BI.createWidget({
type: "bi.combo",
offsetStyle: "center",
container: null,
element: this,
isNeedAdjustHeight: false,
isNeedAdjustWidth: false,
@ -497,7 +499,8 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期
behaviors: {},
height: 24
height: 24,
container: null
});
},
_init: function () {
@ -526,6 +529,7 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
type: "bi.combo",
offsetStyle: "center",
element: this,
container: o.container,
isNeedAdjustHeight: false,
isNeedAdjustWidth: false,
el: this.trigger,
@ -14629,19 +14633,22 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
break;
case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
break;
case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
break;
default :
@ -14678,7 +14685,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
self._checkValidation();
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
});
@ -14692,14 +14700,16 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
@ -14717,19 +14727,22 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
break;
case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
break;
case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
break;
default :
@ -14860,6 +14873,13 @@ BI.NumberInterval = BI.inherit(BI.Single, {
value.closeMax = true;
}
return value;
},
destroyed: function () {
var c = this.constants;
BI.Bubbles.remove(c.typeError);
BI.Bubbles.remove(c.numberError);
BI.Bubbles.remove(c.signalError);
}
});
BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE";

1
lodash.md

@ -0,0 +1 @@
lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep

8
src/base/combination/combo.js

@ -10,7 +10,7 @@ BI.Combo = BI.inherit(BI.Widget, {
trigger: "click",
toggle: true,
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
container: null, // popupview放置的容器,默认为this.element
container: "body", // popupview放置的容器,默认为body
isDefaultInit: false,
destroyWhenHide: false,
isNeedAdjustHeight: true, // 是否需要高度调整
@ -468,6 +468,12 @@ BI.Combo = BI.inherit(BI.Widget, {
.unbind("mouseleave." + this.getName());
BI.Resizers.remove(this.getName());
BI.Combo.superclass.destroy.apply(this, arguments);
},
destroyed: function () {
this.popupView && this.popupView.destroy();
this.popupView = null;
this._rendered = false;
}
});
BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE";

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

@ -17,7 +17,7 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
el: {type: "bi.text_button", text: "", value: ""},
children: [],
container: null,
popup: {
el: {
type: "bi.button_tree",
@ -61,6 +61,7 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
this.combo = BI.createWidget({
type: "bi.combo",
element: this,
container: o.container,
height: o.height,
trigger: o.trigger,
direction: o.direction,

7
src/base/single/editor/editor.js

@ -227,7 +227,8 @@ BI.Editor = BI.inherit(BI.Single, {
}
if (!this.disabledError && BI.isKey(errorText)) {
BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, {
adjustYOffset: 2
adjustYOffset: 2,
container: "body"
});
this._checkToolTip();
return BI.Bubbles.get(this.getName());
@ -300,6 +301,10 @@ BI.Editor = BI.inherit(BI.Single, {
isValid: function () {
return this.editor.isValid();
},
destroyed: function () {
BI.Bubbles.remove(this.getName());
}
});
BI.Editor.EVENT_CHANGE = "EVENT_CHANGE";

12
src/base/single/single.js

@ -19,7 +19,9 @@ BI.Single = BI.inherit(BI.Widget, {
warningTitle: null,
tipType: null, // success或warning
value: null,
belowMouse: false // title是否跟随鼠标,
belowMouse: false, // title是否跟随鼠标,
// 之所以默认为body,是因为transform的效果影响
container: "body"
});
},
@ -53,7 +55,8 @@ BI.Single = BI.inherit(BI.Widget, {
if (BI.isKey(o.title) || BI.isKey(o.warningTitle)
|| BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) {
this.enableHover({
belowMouse: o.belowMouse
belowMouse: o.belowMouse,
container: o.container
});
}
},
@ -161,5 +164,10 @@ BI.Single = BI.inherit(BI.Widget, {
getValue: function () {
return this.options.value;
},
_unMount: function () {
BI.Single.superclass._unMount.apply(this, arguments);
BI.Tooltips.remove(this.getName());
}
});

1
src/case/colorchooser/colorchooser.popup.js

@ -94,6 +94,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.more = BI.createWidget({
type: "bi.combo",
container: null,
direction: "right,top",
isNeedAdjustHeight: false,
el: {

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

@ -11,6 +11,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
height: 24,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
text: "",
container: null,
value: ""
});
},
@ -41,6 +42,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
});
this.textIconCombo = BI.createWidget({
type: "bi.combo",
container: o.container,
element: this,
adjustLength: 2,
el: this.trigger,

107
src/css/base/combo/combo.css

@ -5,105 +5,78 @@
.bi-bubble-combo .bubble-combo-triangle-left {
z-index: 1;
position: absolute;
width: 5px;
width: 6px;
height: 16px;
border-left: 1px solid #f5f5f5;
}
.bi-bubble-combo .bubble-combo-triangle-left:before {
position: absolute;
left: 0px;
top: 0px;
right: 0px;
border-left: 7px solid #ccc;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
content: "";
}
.bi-bubble-combo .bubble-combo-triangle-left:after {
position: absolute;
top: 1px;
left: 1px;
right: 0px;
border-bottom: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
width: 6px;
height: 6px;
margin-left: 2px;
margin-top: -5px;
content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
}
.bi-bubble-combo .bubble-combo-triangle-right {
z-index: 1;
position: absolute;
width: 7px;
width: 6px;
height: 16px;
}
.bi-bubble-combo .bubble-combo-triangle-right:before {
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
border-right: 7px solid #ccc;
border-top: 7px solid transparent;
border-bottom: 8px solid transparent;
content: "";
}
.bi-bubble-combo .bubble-combo-triangle-right:after {
position: absolute;
right: 0px;
top: 0px;
bottom: 0px;
border-right: 7px solid #ffffff;
border-top: 7px solid transparent;
border-bottom: 8px solid transparent;
width: 6px;
height: 6px;
margin-left: 2px;
margin-top: 5px;
content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
}
.bi-bubble-combo .bubble-combo-triangle-top {
z-index: 1;
position: absolute;
width: 16px;
height: 10px;
border-top: 1px solid #ffffff;
}
.bi-bubble-combo .bubble-combo-triangle-top:after {
position: absolute;
right: 1px;
top: 0px;
border-top: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: "";
height: 6px;
}
.bi-bubble-combo .bubble-combo-triangle-top:before {
position: absolute;
border-top: 7px solid #cccccc;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
width: 6px;
height: 6px;
margin-left: 3px;
margin-top: -3px;
content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
}
.bi-bubble-combo .bubble-combo-triangle-bottom {
z-index: 1;
position: absolute;
width: 16px;
height: 5px;
border-bottom: 1px solid #ffffff;
height: 6px;
}
.bi-bubble-combo .bubble-combo-triangle-bottom:before {
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
border-bottom: 7px solid #ccc;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
content: "";
}
.bi-bubble-combo .bubble-combo-triangle-bottom:after {
position: absolute;
right: 1px;
top: 1px;
bottom: 0px;
border-bottom: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
width: 6px;
height: 6px;
margin-left: 3px;
margin-top: 3px;
content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
}
.bi-combo.bi-combo-popup {

99
src/less/visual.less

@ -188,107 +188,72 @@
.triangle-top() {
position: absolute;
width: 16px;
height: 5px;
border-bottom: 1px solid #ffffff;
height: 6px;
&:before {
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
border-bottom: 7px solid #ccc;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
content: "";
}
&:after {
position: absolute;
right: 1px;
top: 1px;
bottom: 0px;
border-bottom: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
width: 6px;
height: 6px;
margin-left: 3px;
margin-top: 3px;
content: "";
background-color: #ffffff;
transform: rotate(45deg);
.box-shadow(0 1px 5px 0, fade(#232E40, 20));
}
}
.triangle-bottom() {
position: absolute;
width: 16px;
height: 10px;
border-top: 1px solid #ffffff;
height: 6px;
&:after {
position: absolute;
right: 1px;
top: 0px;
border-top: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: "";
}
&:before {
position: absolute;
border-top: 7px solid #cccccc;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
width: 6px;
height: 6px;
margin-left: 3px;
margin-top: -3px;
content: "";
background-color: #ffffff;
transform: rotate(45deg);
.box-shadow(0 1px 5px 0, fade(#232E40, 20));
}
}
.triangle-left() {
position: absolute;
width: 7px;
width: 6px;
height: 16px;
&:before {
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
border-right: 7px solid #ccc;
border-top: 7px solid transparent;
border-bottom: 8px solid transparent;
content: "";
}
&:after {
position: absolute;
right: 0px;
top: 0px;
bottom: 0px;
border-right: 7px solid #ffffff;
border-top: 7px solid transparent;
border-bottom: 8px solid transparent;
width: 6px;
height: 6px;
margin-left: 2px;
margin-top: 5px;
content: "";
background-color: #ffffff;
transform: rotate(45deg);
.box-shadow(0 1px 5px 0, fade(#232E40, 20));
}
}
.triangle-right() {
position: absolute;
width: 5px;
width: 6px;
height: 16px;
border-left: 1px solid #f5f5f5;
&:before {
position: absolute;
left: 0px;
top: 0px;
right: 0px;
border-left: 7px solid #ccc;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
content: "";
}
&:after {
position: absolute;
top: 1px;
left: 1px;
right: 0px;
border-bottom: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
width: 6px;
height: 6px;
margin-left: 2px;
margin-top: -5px;
content: "";
background-color: #ffffff;
transform: rotate(45deg);
.box-shadow(0 1px 5px 0, fade(#232E40, 20));
}
}

4
src/widget/date/calendar/combo.month.date.js

@ -9,7 +9,8 @@ BI.MonthDateCombo = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
return BI.extend( BI.MonthDateCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-month-combo",
height: 24
height: 24,
container: null
});
},
_init: function () {
@ -33,6 +34,7 @@ BI.MonthDateCombo = BI.inherit(BI.Trigger, {
this.combo = BI.createWidget({
type: "bi.combo",
offsetStyle: "center",
container: null,
element: this,
isNeedAdjustHeight: false,
isNeedAdjustWidth: false,

4
src/widget/date/calendar/combo.year.date.js

@ -12,7 +12,8 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期
behaviors: {},
height: 24
height: 24,
container: null
});
},
_init: function () {
@ -41,6 +42,7 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
type: "bi.combo",
offsetStyle: "center",
element: this,
container: o.container,
isNeedAdjustHeight: false,
isNeedAdjustWidth: false,
el: this.trigger,

34
src/widget/numberinterval/numberinterval.js

@ -305,19 +305,22 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
break;
case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
break;
case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
break;
default :
@ -354,7 +357,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
self._checkValidation();
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
});
@ -368,14 +372,16 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break;
@ -393,19 +399,22 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
break;
case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
break;
case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left",
adjustYOffset: c.adjustYOffset
adjustYOffset: c.adjustYOffset,
container: "body"
});
break;
default :
@ -536,6 +545,13 @@ BI.NumberInterval = BI.inherit(BI.Single, {
value.closeMax = true;
}
return value;
},
destroyed: function () {
var c = this.constants;
BI.Bubbles.remove(c.typeError);
BI.Bubbles.remove(c.numberError);
BI.Bubbles.remove(c.signalError);
}
});
BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE";

Loading…
Cancel
Save