Browse Source

Revert "update"

This reverts commit e802c345ef.
es6
fay 7 years ago
parent
commit
dc826fb6af
  1. 18
      dist/base.js
  2. 24
      dist/bundle.js
  3. 24
      dist/fineui.js
  4. 6
      dist/widget.js
  5. 4
      src/base/combination/combo.js
  6. 2
      src/base/combination/expander.js
  7. 2
      src/base/combination/switcher.js
  8. 6
      src/base/single/button/button.basic.js
  9. 2
      src/base/single/editor/editor.textarea.js
  10. 2
      src/base/single/single.js
  11. 8
      src/core/func/dom.js
  12. 2
      src/widget/multiselect/multiselect.insert.trigger.js
  13. 2
      src/widget/multiselect/multiselect.trigger.js
  14. 2
      src/widget/searchmultitextvaluecombo/multitextvalue.combo.trigger.search.js

18
dist/base.js vendored

@ -400,7 +400,7 @@ BI.Single = BI.inherit(BI.Widget, {
});
this.element.on("mousemove.title" + this.getName(), function (e) {
self._e = e;
if (!(self.element.find(e.target).length > 0)) {
if (!self.element.__isMouseInBounds__(e)) {
if (BI.isNotNull(self.timeout)) {
clearTimeout(self.timeout);
}
@ -689,7 +689,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
}
});
this.element.on("mouseenter." + this.getName(), function (e) {
if (self.element.find(e.target).length > 0) {
if (self.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && !self._hover && (o.isShadowShowingOnSelected || !self.isSelected())) {
assertMask();
self.$mask.visible();
@ -697,7 +697,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
}
});
this.element.on("mousemove." + this.getName(), function (e) {
if (!(self.element.find(e.target).length > 0)) {
if (!self.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && !self._hover) {
assertMask();
self.$mask.invisible();
@ -742,7 +742,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
// if (e.button === 0) {
$(document).bind("mouseup." + self.getName(), function (e) {
// if (e.button === 0) {
if (BI.DOM.isExist(self) && !hand.find(e.target).length > 0 && mouseDown === true && !selected) {
if (BI.DOM.isExist(self) && !hand.__isMouseInBounds__(e) && mouseDown === true && !selected) {
// self.setSelected(!self.isSelected());
self._trigger();
}
@ -3163,7 +3163,7 @@ BI.Combo = BI.inherit(BI.Widget, {
break;
case "click":
var debounce = BI.debounce(function (e) {
if (self.element.find(e.target).length > 0) {
if (self.combo.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {
// if (!o.toggle && self.isViewVisible()) {
// return;
@ -3189,7 +3189,7 @@ BI.Combo = BI.inherit(BI.Widget, {
break;
case "click-hover":
var debounce = BI.debounce(function (e) {
if (self.element.find(e.target).length > 0) {
if (self.combo.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {
// if (self.isViewVisible()) {
// return;
@ -3606,7 +3606,7 @@ BI.Expander = BI.inherit(BI.Widget, {
case "click":
if (e) {
self.element.off(e + "." + self.getName()).on(e + "." + self.getName(), BI.debounce(function (e) {
if (self.element.find(e.target).length > 0) {
if (self.expander.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) {
o.toggle ? self._toggle() : self._popupView();
if (self.isExpanded()) {
@ -4814,7 +4814,7 @@ BI.Switcher = BI.inherit(BI.Widget, {
default :
if (e) {
self.element.off(e + "." + self.getName()).on(e + "." + self.getName(), BI.debounce(function (e) {
if (self.switcher.find(e.target).length > 0) {
if (self.switcher.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && self.switcher.isEnabled()) {
o.toggle ? self._toggle() : self._popupView();
if (self.isExpanded()) {
@ -18760,7 +18760,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
self.fireEvent(BI.TextAreaEditor.EVENT_FOCUS);
}
$(document).bind("mousedown." + self.getName(), function (e) {
if (BI.DOM.isExist(self) && !(self.element.find(e.target).length > 0)) {
if (BI.DOM.isExist(self) && !self.element.__isMouseInBounds__(e)) {
$(document).unbind("mousedown." + self.getName());
self.content.element.blur();
}

24
dist/bundle.js vendored

@ -36318,7 +36318,7 @@ BI.Single = BI.inherit(BI.Widget, {
});
this.element.on("mousemove.title" + this.getName(), function (e) {
self._e = e;
if (!(self.element.find(e.target).length > 0)) {
if (!self.element.__isMouseInBounds__(e)) {
if (BI.isNotNull(self.timeout)) {
clearTimeout(self.timeout);
}
@ -36607,7 +36607,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
}
});
this.element.on("mouseenter." + this.getName(), function (e) {
if (self.element.find(e.target).length > 0) {
if (self.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && !self._hover && (o.isShadowShowingOnSelected || !self.isSelected())) {
assertMask();
self.$mask.visible();
@ -36615,7 +36615,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
}
});
this.element.on("mousemove." + this.getName(), function (e) {
if (!(self.element.find(e.target).length > 0)) {
if (!self.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && !self._hover) {
assertMask();
self.$mask.invisible();
@ -36660,7 +36660,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
// if (e.button === 0) {
$(document).bind("mouseup." + self.getName(), function (e) {
// if (e.button === 0) {
if (BI.DOM.isExist(self) && !hand.find(e.target).length > 0 && mouseDown === true && !selected) {
if (BI.DOM.isExist(self) && !hand.__isMouseInBounds__(e) && mouseDown === true && !selected) {
// self.setSelected(!self.isSelected());
self._trigger();
}
@ -39081,7 +39081,7 @@ BI.Combo = BI.inherit(BI.Widget, {
break;
case "click":
var debounce = BI.debounce(function (e) {
if (self.element.find(e.target).length > 0) {
if (self.combo.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {
// if (!o.toggle && self.isViewVisible()) {
// return;
@ -39107,7 +39107,7 @@ BI.Combo = BI.inherit(BI.Widget, {
break;
case "click-hover":
var debounce = BI.debounce(function (e) {
if (self.element.find(e.target).length > 0) {
if (self.combo.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {
// if (self.isViewVisible()) {
// return;
@ -39524,7 +39524,7 @@ BI.Expander = BI.inherit(BI.Widget, {
case "click":
if (e) {
self.element.off(e + "." + self.getName()).on(e + "." + self.getName(), BI.debounce(function (e) {
if (self.element.find(e.target).length > 0) {
if (self.expander.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) {
o.toggle ? self._toggle() : self._popupView();
if (self.isExpanded()) {
@ -40732,7 +40732,7 @@ BI.Switcher = BI.inherit(BI.Widget, {
default :
if (e) {
self.element.off(e + "." + self.getName()).on(e + "." + self.getName(), BI.debounce(function (e) {
if (self.switcher.find(e.target).length > 0) {
if (self.switcher.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && self.switcher.isEnabled()) {
o.toggle ? self._toggle() : self._popupView();
if (self.isExpanded()) {
@ -54678,7 +54678,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
self.fireEvent(BI.TextAreaEditor.EVENT_FOCUS);
}
$(document).bind("mousedown." + self.getName(), function (e) {
if (BI.DOM.isExist(self) && !(self.element.find(e.target).length > 0)) {
if (BI.DOM.isExist(self) && !self.element.__isMouseInBounds__(e)) {
$(document).unbind("mousedown." + self.getName());
self.content.element.blur();
}
@ -98654,7 +98654,7 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {
});
this.element.click(function (e) {
if (self.element.find(e.target).length > 0 && !self.numberCounter.element.find(e.target).length > 0) {
if (self.element.__isMouseInBounds__(e) && !self.numberCounter.element.__isMouseInBounds__(e)) {
self.numberCounter.hideView();
}
});
@ -99343,7 +99343,7 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
});
this.element.click(function (e) {
if (self.element.find(e.target).length > 0 && !self.numberCounter.element.find(e.target).length > 0) {
if (self.element.__isMouseInBounds__(e) && !self.numberCounter.element.__isMouseInBounds__(e)) {
self.numberCounter.hideView();
}
});
@ -104886,7 +104886,7 @@ BI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, {
});
this.element.click(function (e) {
if (self.element.find(e.target).length > 0 && !self.numberCounter.element.find(e.target).length > 0) {
if (self.element.__isMouseInBounds__(e) && !self.numberCounter.element.__isMouseInBounds__(e)) {
self.numberCounter.hideView();
}
});

24
dist/fineui.js vendored

@ -36539,7 +36539,7 @@ BI.Single = BI.inherit(BI.Widget, {
});
this.element.on("mousemove.title" + this.getName(), function (e) {
self._e = e;
if (!(self.element.find(e.target).length > 0)) {
if (!self.element.__isMouseInBounds__(e)) {
if (BI.isNotNull(self.timeout)) {
clearTimeout(self.timeout);
}
@ -36828,7 +36828,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
}
});
this.element.on("mouseenter." + this.getName(), function (e) {
if (self.element.find(e.target).length > 0) {
if (self.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && !self._hover && (o.isShadowShowingOnSelected || !self.isSelected())) {
assertMask();
self.$mask.visible();
@ -36836,7 +36836,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
}
});
this.element.on("mousemove." + this.getName(), function (e) {
if (!(self.element.find(e.target).length > 0)) {
if (!self.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && !self._hover) {
assertMask();
self.$mask.invisible();
@ -36881,7 +36881,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
// if (e.button === 0) {
$(document).bind("mouseup." + self.getName(), function (e) {
// if (e.button === 0) {
if (BI.DOM.isExist(self) && !hand.find(e.target).length > 0 && mouseDown === true && !selected) {
if (BI.DOM.isExist(self) && !hand.__isMouseInBounds__(e) && mouseDown === true && !selected) {
// self.setSelected(!self.isSelected());
self._trigger();
}
@ -39302,7 +39302,7 @@ BI.Combo = BI.inherit(BI.Widget, {
break;
case "click":
var debounce = BI.debounce(function (e) {
if (self.element.find(e.target).length > 0) {
if (self.combo.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {
// if (!o.toggle && self.isViewVisible()) {
// return;
@ -39328,7 +39328,7 @@ BI.Combo = BI.inherit(BI.Widget, {
break;
case "click-hover":
var debounce = BI.debounce(function (e) {
if (self.element.find(e.target).length > 0) {
if (self.combo.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {
// if (self.isViewVisible()) {
// return;
@ -39745,7 +39745,7 @@ BI.Expander = BI.inherit(BI.Widget, {
case "click":
if (e) {
self.element.off(e + "." + self.getName()).on(e + "." + self.getName(), BI.debounce(function (e) {
if (self.element.find(e.target).length > 0) {
if (self.expander.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) {
o.toggle ? self._toggle() : self._popupView();
if (self.isExpanded()) {
@ -40953,7 +40953,7 @@ BI.Switcher = BI.inherit(BI.Widget, {
default :
if (e) {
self.element.off(e + "." + self.getName()).on(e + "." + self.getName(), BI.debounce(function (e) {
if (self.switcher.find(e.target).length > 0) {
if (self.switcher.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && self.switcher.isEnabled()) {
o.toggle ? self._toggle() : self._popupView();
if (self.isExpanded()) {
@ -54899,7 +54899,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
self.fireEvent(BI.TextAreaEditor.EVENT_FOCUS);
}
$(document).bind("mousedown." + self.getName(), function (e) {
if (BI.DOM.isExist(self) && !(self.element.find(e.target).length > 0)) {
if (BI.DOM.isExist(self) && !self.element.__isMouseInBounds__(e)) {
$(document).unbind("mousedown." + self.getName());
self.content.element.blur();
}
@ -98875,7 +98875,7 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {
});
this.element.click(function (e) {
if (self.element.find(e.target).length > 0 && !self.numberCounter.element.find(e.target).length > 0) {
if (self.element.__isMouseInBounds__(e) && !self.numberCounter.element.__isMouseInBounds__(e)) {
self.numberCounter.hideView();
}
});
@ -99564,7 +99564,7 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
});
this.element.click(function (e) {
if (self.element.find(e.target).length > 0 && !self.numberCounter.element.find(e.target).length > 0) {
if (self.element.__isMouseInBounds__(e) && !self.numberCounter.element.__isMouseInBounds__(e)) {
self.numberCounter.hideView();
}
});
@ -105107,7 +105107,7 @@ BI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, {
});
this.element.click(function (e) {
if (self.element.find(e.target).length > 0 && !self.numberCounter.element.find(e.target).length > 0) {
if (self.element.__isMouseInBounds__(e) && !self.numberCounter.element.__isMouseInBounds__(e)) {
self.numberCounter.hideView();
}
});

6
dist/widget.js vendored

@ -10472,7 +10472,7 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {
});
this.element.click(function (e) {
if (self.element.find(e.target).length > 0 && !self.numberCounter.element.find(e.target).length > 0) {
if (self.element.__isMouseInBounds__(e) && !self.numberCounter.element.__isMouseInBounds__(e)) {
self.numberCounter.hideView();
}
});
@ -11161,7 +11161,7 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
});
this.element.click(function (e) {
if (self.element.find(e.target).length > 0 && !self.numberCounter.element.find(e.target).length > 0) {
if (self.element.__isMouseInBounds__(e) && !self.numberCounter.element.__isMouseInBounds__(e)) {
self.numberCounter.hideView();
}
});
@ -16704,7 +16704,7 @@ BI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, {
});
this.element.click(function (e) {
if (self.element.find(e.target).length > 0 && !self.numberCounter.element.find(e.target).length > 0) {
if (self.element.__isMouseInBounds__(e) && !self.numberCounter.element.__isMouseInBounds__(e)) {
self.numberCounter.hideView();
}
});

4
src/base/combination/combo.js

@ -147,7 +147,7 @@ BI.Combo = BI.inherit(BI.Widget, {
break;
case "click":
var debounce = BI.debounce(function (e) {
if (self.element.find(e.target).length > 0) {
if (self.combo.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {
// if (!o.toggle && self.isViewVisible()) {
// return;
@ -173,7 +173,7 @@ BI.Combo = BI.inherit(BI.Widget, {
break;
case "click-hover":
var debounce = BI.debounce(function (e) {
if (self.element.find(e.target).length > 0) {
if (self.combo.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {
// if (self.isViewVisible()) {
// return;

2
src/base/combination/expander.js

@ -106,7 +106,7 @@ BI.Expander = BI.inherit(BI.Widget, {
case "click":
if (e) {
self.element.off(e + "." + self.getName()).on(e + "." + self.getName(), BI.debounce(function (e) {
if (self.element.find(e.target).length > 0) {
if (self.expander.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) {
o.toggle ? self._toggle() : self._popupView();
if (self.isExpanded()) {

2
src/base/combination/switcher.js

@ -103,7 +103,7 @@ BI.Switcher = BI.inherit(BI.Widget, {
default :
if (e) {
self.element.off(e + "." + self.getName()).on(e + "." + self.getName(), BI.debounce(function (e) {
if (self.switcher.find(e.target).length > 0) {
if (self.switcher.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && self.switcher.isEnabled()) {
o.toggle ? self._toggle() : self._popupView();
if (self.isExpanded()) {

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

@ -76,7 +76,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
}
});
this.element.on("mouseenter." + this.getName(), function (e) {
if (self.element.find(e.target).length > 0) {
if (self.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && !self._hover && (o.isShadowShowingOnSelected || !self.isSelected())) {
assertMask();
self.$mask.visible();
@ -84,7 +84,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
}
});
this.element.on("mousemove." + this.getName(), function (e) {
if (!(self.element.find(e.target).length > 0)) {
if (!self.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && !self._hover) {
assertMask();
self.$mask.invisible();
@ -129,7 +129,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
// if (e.button === 0) {
$(document).bind("mouseup." + self.getName(), function (e) {
// if (e.button === 0) {
if (BI.DOM.isExist(self) && !hand.find(e.target).length > 0 && mouseDown === true && !selected) {
if (BI.DOM.isExist(self) && !hand.__isMouseInBounds__(e) && mouseDown === true && !selected) {
// self.setSelected(!self.isSelected());
self._trigger();
}

2
src/base/single/editor/editor.textarea.js

@ -48,7 +48,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
self.fireEvent(BI.TextAreaEditor.EVENT_FOCUS);
}
$(document).bind("mousedown." + self.getName(), function (e) {
if (BI.DOM.isExist(self) && !(self.element.find(e.target).length > 0)) {
if (BI.DOM.isExist(self) && !self.element.__isMouseInBounds__(e)) {
$(document).unbind("mousedown." + self.getName());
self.content.element.blur();
}

2
src/base/single/single.js

@ -77,7 +77,7 @@ BI.Single = BI.inherit(BI.Widget, {
});
this.element.on("mousemove.title" + this.getName(), function (e) {
self._e = e;
if (!(self.element.find(e.target).length > 0)) {
if (!self.element.__isMouseInBounds__(e)) {
if (BI.isNotNull(self.timeout)) {
clearTimeout(self.timeout);
}

8
src/core/func/dom.js

@ -119,9 +119,11 @@ BI.extend(jQuery.fn, {
},
__isMouseInBounds__: function (e) {
var offset2Body = this.offset();
return !(e.pageX < offset2Body.left || e.pageX > offset2Body.left + this.outerWidth()
|| e.pageY < offset2Body.top || e.pageY > offset2Body.top + this.outerHeight());
var offset2Body = this.get(0).getBoundingClientRect ? this.get(0).getBoundingClientRect() : this.offset();
var width = offset2Body.width || this.outerWidth();
var height = offset2Body.height || this.outerHeight();
return !(e.pageX < offset2Body.left || e.pageX > offset2Body.left + width
|| e.pageY < offset2Body.top || e.pageY > offset2Body.top + height);
},
__hasZIndexMask__: function (zindex) {

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

@ -110,7 +110,7 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {
});
this.element.click(function (e) {
if (self.element.find(e.target).length > 0 && !self.numberCounter.element.find(e.target).length > 0) {
if (self.element.__isMouseInBounds__(e) && !self.numberCounter.element.__isMouseInBounds__(e)) {
self.numberCounter.hideView();
}
});

2
src/widget/multiselect/multiselect.trigger.js

@ -107,7 +107,7 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
});
this.element.click(function (e) {
if (self.element.find(e.target).length > 0 && !self.numberCounter.element.find(e.target).length > 0) {
if (self.element.__isMouseInBounds__(e) && !self.numberCounter.element.__isMouseInBounds__(e)) {
self.numberCounter.hideView();
}
});

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

@ -101,7 +101,7 @@ BI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, {
});
this.element.click(function (e) {
if (self.element.find(e.target).length > 0 && !self.numberCounter.element.find(e.target).length > 0) {
if (self.element.__isMouseInBounds__(e) && !self.numberCounter.element.__isMouseInBounds__(e)) {
self.numberCounter.hideView();
}
});

Loading…
Cancel
Save