Browse Source

Pull request #2210: 无JIRA任务 修复bi-border-hover在destroyWhenDestroy计算失误的问题 + 去掉combo上的bi-focus-shadow class

Merge in VISUAL/fineui from ~TELLER/fineui:master to master

* commit 'e1e95ed2332181c40c4d3b0662300e5436527173':
  refactor: 放到if中
  fix: 去掉所有combo上的bi-focus-shadow
  BI-94929 fix: 修复bi-border-hover计算失误的问题
es6
Teller 3 years ago
parent
commit
7664d65c0e
  1. 13
      src/base/combination/combo.js
  2. 2
      src/widget/dynamicdate/dynamicdate.combo.js
  3. 2
      src/widget/dynamicdatetime/dynamicdatetime.combo.js
  4. 2
      src/widget/multilayerselecttree/multilayerselecttree.combo.js
  5. 2
      src/widget/multilayersingletree/multilayersingletree.combo.js
  6. 2
      src/widget/multiselect/multiselect.combo.js
  7. 2
      src/widget/multiselect/multiselect.combo.nobar.js
  8. 2
      src/widget/multiselect/multiselect.insert.combo.js
  9. 2
      src/widget/multiselect/multiselect.insert.combo.nobar.js
  10. 2
      src/widget/multitree/multi.tree.combo.js
  11. 2
      src/widget/multitree/multi.tree.insert.combo.js
  12. 2
      src/widget/multitree/multi.tree.list.combo.js
  13. 2
      src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js
  14. 2
      src/widget/time/time.combo.js
  15. 7
      src/widget/year/combo.year.js
  16. 2
      src/widget/yearmonth/combo.yearmonth.js
  17. 2
      src/widget/yearquarter/combo.yearquarter.js

13
src/base/combination/combo.js

@ -286,19 +286,24 @@
if (isHide === false) { if (isHide === false) {
return; return;
} }
this._hideView(); this._hideView(e);
return true; return true;
}, },
_hideView: function () { _hideView: function (e) {
this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW); this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW);
if (this.options.destroyWhenHide === true) { if (this.options.destroyWhenHide === true) {
this.popupView && this.popupView.destroy(); this.popupView && this.popupView.destroy();
this.popupView = null; this.popupView = null;
this._rendered = false; this._rendered = false;
if (!e || !this.combo.element.__isMouseInBounds__(e)) {
this.element.removeClass(this.options.hoverClass);
}
} else { } else {
this.popupView && this.popupView.invisible(); this.popupView && this.popupView.invisible();
} }
this.element.removeClass(this.options.comboClass); this.element.removeClass(this.options.comboClass);
delete needHideWhenAnotherComboOpen[this.getName()]; delete needHideWhenAnotherComboOpen[this.getName()];
@ -525,8 +530,8 @@
} }
}, },
hideView: function () { hideView: function (e) {
this._hideView(); this._hideView(e);
}, },
getView: function () { getView: function () {

2
src/widget/dynamicdate/dynamicdate.combo.js

@ -48,7 +48,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
items: [{ items: [{
el: { el: {
type: "bi.combo", type: "bi.combo",
cls: "bi-border bi-border-radius bi-focus-shadow", cls: "bi-border bi-border-radius",
container: opts.container, container: opts.container,
ref: function () { ref: function () {
self.combo = this; self.combo = this;

2
src/widget/dynamicdatetime/dynamicdatetime.combo.js

@ -48,7 +48,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
items: [{ items: [{
el: { el: {
type: "bi.combo", type: "bi.combo",
cls: "bi-border bi-border-radius bi-focus-shadow", cls: "bi-border bi-border-radius",
destroyWhenHide: true, destroyWhenHide: true,
container: opts.container, container: opts.container,
ref: function () { ref: function () {

2
src/widget/multilayerselecttree/multilayerselecttree.combo.js

@ -75,7 +75,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
var self = this, o = this.options; var self = this, o = this.options;
return { return {
type: "bi.combo", type: "bi.combo",
cls: "bi-border bi-focus-shadow bi-border-radius", cls: "bi-border bi-border-radius",
container: o.container, container: o.container,
destroyWhenHide: o.destroyWhenHide, destroyWhenHide: o.destroyWhenHide,
adjustLength: 2, adjustLength: 2,

2
src/widget/multilayersingletree/multilayersingletree.combo.js

@ -79,7 +79,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
var self = this, o = this.options; var self = this, o = this.options;
return { return {
type: "bi.combo", type: "bi.combo",
cls: "bi-border bi-focus-shadow bi-border-radius", cls: "bi-border bi-border-radius",
container: o.container, container: o.container,
destroyWhenHide: o.destroyWhenHide, destroyWhenHide: o.destroyWhenHide,
adjustLength: 2, adjustLength: 2,

2
src/widget/multiselect/multiselect.combo.js

@ -123,7 +123,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
cls: "bi-border bi-focus-shadow bi-border-radius", cls: "bi-border bi-border-radius",
toggle: !o.allowEdit, toggle: !o.allowEdit,
container: o.container, container: o.container,
el: this.trigger, el: this.trigger,

2
src/widget/multiselect/multiselect.combo.nobar.js

@ -122,7 +122,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
cls: "bi-border bi-focus-shadow bi-border-radius", cls: "bi-border bi-border-radius",
toggle: false, toggle: false,
container: o.container, container: o.container,
el: this.trigger, el: this.trigger,

2
src/widget/multiselect/multiselect.insert.combo.js

@ -124,7 +124,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
cls: "bi-border bi-focus-shadow bi-border-radius", cls: "bi-border bi-border-radius",
toggle: !o.allowEdit, toggle: !o.allowEdit,
el: this.trigger, el: this.trigger,
adjustLength: 1, adjustLength: 1,

2
src/widget/multiselect/multiselect.insert.combo.nobar.js

@ -116,7 +116,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
cls: "bi-border bi-focus-shadow bi-border-radius", cls: "bi-border bi-border-radius",
toggle: false, toggle: false,
container: o.container, container: o.container,
el: this.trigger, el: this.trigger,

2
src/widget/multitree/multi.tree.combo.js

@ -54,7 +54,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
cls: "bi-border bi-focus-shadow bi-border-radius", cls: "bi-border bi-border-radius",
toggle: !o.allowEdit, toggle: !o.allowEdit,
container: o.container, container: o.container,
el: this.trigger, el: this.trigger,

2
src/widget/multitree/multi.tree.insert.combo.js

@ -69,7 +69,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
cls: "bi-border bi-focus-shadow bi-border-radius", cls: "bi-border bi-border-radius",
toggle: !o.allowEdit, toggle: !o.allowEdit,
container: o.container, container: o.container,
el: this.trigger, el: this.trigger,

2
src/widget/multitree/multi.tree.list.combo.js

@ -85,7 +85,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
cls: "bi-border bi-focus-shadow bi-border-radius", cls: "bi-border bi-border-radius",
toggle: !o.allowEdit, toggle: !o.allowEdit,
container: o.container, container: o.container,
el: this.trigger, el: this.trigger,

2
src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js

@ -111,7 +111,7 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
cls: "bi-border bi-focus-shadow bi-border-radius", cls: "bi-border bi-border-radius",
toggle: false, toggle: false,
container: o.container, container: o.container,
el: this.trigger, el: this.trigger,

2
src/widget/time/time.combo.js

@ -65,7 +65,7 @@
items: [{ items: [{
el: { el: {
type: "bi.combo", type: "bi.combo",
cls: "bi-border bi-border-radius bi-focus-shadow", cls: "bi-border bi-border-radius",
container: opts.container, container: opts.container,
toggle: false, toggle: false,
isNeedAdjustHeight: opts.isNeedAdjustHeight, isNeedAdjustHeight: opts.isNeedAdjustHeight,

7
src/widget/year/combo.year.js

@ -1,7 +1,7 @@
BI.DynamicYearCombo = BI.inherit(BI.Widget, { BI.DynamicYearCombo = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-year-combo bi-border bi-border-radius bi-focus-shadow", baseCls: "bi-year-combo",
behaviors: {}, behaviors: {},
minDate: "1900-01-01", // 最小日期 minDate: "1900-01-01", // 最小日期
maxDate: "2099-12-31", // 最大日期 maxDate: "2099-12-31", // 最大日期
@ -11,15 +11,13 @@ BI.DynamicYearCombo = BI.inherit(BI.Widget, {
_init: function () { _init: function () {
var self = this, o = this.options; var self = this, o = this.options;
o.height -= 2;
BI.isNumeric(o.width) && (o.width -= 2);
BI.DynamicYearCombo.superclass._init.apply(this, arguments); BI.DynamicYearCombo.superclass._init.apply(this, arguments);
this.storeValue = o.value; this.storeValue = o.value;
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.dynamic_year_trigger", type: "bi.dynamic_year_trigger",
min: o.minDate, min: o.minDate,
max: o.maxDate, max: o.maxDate,
height: o.height, height: o.height - 2,
value: o.value || "" value: o.value || ""
}); });
this.trigger.on(BI.DynamicYearTrigger.EVENT_KEY_DOWN, function () { this.trigger.on(BI.DynamicYearTrigger.EVENT_KEY_DOWN, function () {
@ -61,6 +59,7 @@ BI.DynamicYearCombo = BI.inherit(BI.Widget, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
cls: "bi-border bi-border-radius",
container: o.container, container: o.container,
isNeedAdjustHeight: false, isNeedAdjustHeight: false,
isNeedAdjustWidth: false, isNeedAdjustWidth: false,

2
src/widget/yearmonth/combo.yearmonth.js

@ -59,7 +59,7 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
cls: "bi-border bi-border-radius bi-focus-shadow", cls: "bi-border bi-border-radius",
container: o.container, container: o.container,
isNeedAdjustHeight: o.isNeedAdjustHeight, isNeedAdjustHeight: o.isNeedAdjustHeight,
isNeedAdjustWidth: o.isNeedAdjustWidth, isNeedAdjustWidth: o.isNeedAdjustWidth,

2
src/widget/yearquarter/combo.yearquarter.js

@ -59,7 +59,7 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
cls: "bi-border bi-border-radius bi-focus-shadow", cls: "bi-border bi-border-radius",
container: o.container, container: o.container,
isNeedAdjustHeight: o.isNeedAdjustHeight, isNeedAdjustHeight: o.isNeedAdjustHeight,
isNeedAdjustWidth: o.isNeedAdjustWidth, isNeedAdjustWidth: o.isNeedAdjustWidth,

Loading…
Cancel
Save