Browse Source

Merge remote-tracking branch 'origin/master'

es6
guy 7 years ago
parent
commit
cbb65508d4
  1. 47
      bi/base.js
  2. 2
      bi/case.js
  3. 10
      bi/widget.js
  4. 2
      demo/js/case/combo/demo.icon_combo.js
  5. 47
      dist/base.js
  6. 59
      dist/bundle.js
  7. 2
      dist/case.js
  8. 2
      dist/demo.js
  9. 10
      dist/widget.js
  10. 47
      src/base/combination/combo.js
  11. 2
      src/case/combo/iconcombo/combo.icon.js
  12. 2
      src/widget/intervalslider/intervalslider.js
  13. 2
      src/widget/intervalslider/intervalslider.label.js
  14. 2
      src/widget/singleslider/singleslider.js
  15. 2
      src/widget/singleslider/singleslider.label.js
  16. 2
      src/widget/singleslider/singleslider.normal.js

47
bi/base.js

@ -3008,6 +3008,19 @@ BI.Combo = BI.inherit(BI.Widget, {
e.stopPropagation();
}
};
var enterPopup = false;
function hide() {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) {
self._hideView();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo);
self.fireEvent(BI.Combo.EVENT_COLLAPSE);
}
self.popupView && self.popupView.element.off("mouseenter." + self.getName()).off("mouseleave." + self.getName());
enterPopup = false;
}
BI.each(evs, function (i, ev) {
switch (ev) {
case "hover":
@ -3019,11 +3032,18 @@ BI.Combo = BI.inherit(BI.Widget, {
}
});
self.element.on("mouseleave." + self.getName(), function (e) {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) {
self._hideView();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo);
self.fireEvent(BI.Combo.EVENT_COLLAPSE);
}
self.popupView.element.on("mouseenter." + self.getName(), function (e) {
enterPopup = true;
self.popupView.element.on("mouseleave." + self.getName(), function (e) {
hide();
});
self.popupView.element.off("mouseenter." + self.getName());
});
BI.defer(function () {
if (!enterPopup) {
hide();
}
}, 50);
});
break;
case "click":
@ -3069,11 +3089,18 @@ BI.Combo = BI.inherit(BI.Widget, {
st(e);
});
self.element.on("mouseleave." + self.getName(), function (e) {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) {
self._hideView();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo);
self.fireEvent(BI.Combo.EVENT_COLLAPSE);
}
self.popupView.element.on("mouseenter." + self.getName(), function (e) {
enterPopup = true;
self.popupView.element.on("mouseleave." + self.getName(), function (e) {
hide();
});
self.popupView.element.off("mouseenter." + self.getName());
});
BI.defer(function () {
if (!enterPopup) {
hide();
}
}, 50);
});
break;
}

2
bi/case.js

@ -5260,6 +5260,8 @@ BI.IconCombo = BI.inherit(BI.Widget, {
type: "bi.combo",
element: this,
direction: o.direction,
trigger: o.trigger,
container: o.container,
adjustLength: o.adjustLength,
adjustXOffset: o.adjustXOffset,
adjustYOffset: o.adjustYOffset,

10
bi/widget.js

@ -5800,7 +5800,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
});
function optimizeSize(s) {
return BI.clamp(s, 0, o.width);
return BI.clamp(s, 0, self._getGrayTrackLength());
}
},
@ -6261,7 +6261,7 @@ BI.IntervalSliderLabel = BI.inherit(BI.Widget, {
});
function optimizeSize(s) {
return BI.clamp(s, 0, o.width);
return BI.clamp(s, 0, self._getGrayTrackLength());
}
},
@ -17458,7 +17458,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
});
function optimizeSize(s) {
return BI.clamp(s, 0, o.width);
return BI.clamp(s, 0, self._getGrayTrackLength());
}
},
@ -17759,7 +17759,7 @@ BI.SingleSliderLabel = BI.inherit(BI.Widget, {
});
function optimizeSize(s) {
return BI.clamp(s, 0, o.width);
return BI.clamp(s, 0, self._getGrayTrackLength());
}
},
@ -18024,7 +18024,7 @@ BI.SingleSliderNormal = BI.inherit(BI.Widget, {
});
function optimizeSize(s) {
return BI.clamp(s, 0, o.width);
return BI.clamp(s, 0, self._getGrayTrackLength());
}
},

2
demo/js/case/combo/demo.icon_combo.js

@ -15,6 +15,8 @@ Demo.IconCombo = BI.inherit(BI.Widget, {
type: "bi.horizontal_auto",
items: [{
type: "bi.icon_combo",
trigger: "click-hover",
container: "body",
ref:function(_ref){
self.refs=_ref;
},

47
dist/base.js vendored

@ -3008,6 +3008,19 @@ BI.Combo = BI.inherit(BI.Widget, {
e.stopPropagation();
}
};
var enterPopup = false;
function hide() {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) {
self._hideView();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo);
self.fireEvent(BI.Combo.EVENT_COLLAPSE);
}
self.popupView && self.popupView.element.off("mouseenter." + self.getName()).off("mouseleave." + self.getName());
enterPopup = false;
}
BI.each(evs, function (i, ev) {
switch (ev) {
case "hover":
@ -3019,11 +3032,18 @@ BI.Combo = BI.inherit(BI.Widget, {
}
});
self.element.on("mouseleave." + self.getName(), function (e) {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) {
self._hideView();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo);
self.fireEvent(BI.Combo.EVENT_COLLAPSE);
}
self.popupView.element.on("mouseenter." + self.getName(), function (e) {
enterPopup = true;
self.popupView.element.on("mouseleave." + self.getName(), function (e) {
hide();
});
self.popupView.element.off("mouseenter." + self.getName());
});
BI.defer(function () {
if (!enterPopup) {
hide();
}
}, 50);
});
break;
case "click":
@ -3069,11 +3089,18 @@ BI.Combo = BI.inherit(BI.Widget, {
st(e);
});
self.element.on("mouseleave." + self.getName(), function (e) {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) {
self._hideView();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo);
self.fireEvent(BI.Combo.EVENT_COLLAPSE);
}
self.popupView.element.on("mouseenter." + self.getName(), function (e) {
enterPopup = true;
self.popupView.element.on("mouseleave." + self.getName(), function (e) {
hide();
});
self.popupView.element.off("mouseenter." + self.getName());
});
BI.defer(function () {
if (!enterPopup) {
hide();
}
}, 50);
});
break;
}

59
dist/bundle.js vendored

@ -28751,6 +28751,19 @@ BI.Combo = BI.inherit(BI.Widget, {
e.stopPropagation();
}
};
var enterPopup = false;
function hide() {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) {
self._hideView();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo);
self.fireEvent(BI.Combo.EVENT_COLLAPSE);
}
self.popupView && self.popupView.element.off("mouseenter." + self.getName()).off("mouseleave." + self.getName());
enterPopup = false;
}
BI.each(evs, function (i, ev) {
switch (ev) {
case "hover":
@ -28762,11 +28775,18 @@ BI.Combo = BI.inherit(BI.Widget, {
}
});
self.element.on("mouseleave." + self.getName(), function (e) {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) {
self._hideView();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo);
self.fireEvent(BI.Combo.EVENT_COLLAPSE);
}
self.popupView.element.on("mouseenter." + self.getName(), function (e) {
enterPopup = true;
self.popupView.element.on("mouseleave." + self.getName(), function (e) {
hide();
});
self.popupView.element.off("mouseenter." + self.getName());
});
BI.defer(function () {
if (!enterPopup) {
hide();
}
}, 50);
});
break;
case "click":
@ -28812,11 +28832,18 @@ BI.Combo = BI.inherit(BI.Widget, {
st(e);
});
self.element.on("mouseleave." + self.getName(), function (e) {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) {
self._hideView();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo);
self.fireEvent(BI.Combo.EVENT_COLLAPSE);
}
self.popupView.element.on("mouseenter." + self.getName(), function (e) {
enterPopup = true;
self.popupView.element.on("mouseleave." + self.getName(), function (e) {
hide();
});
self.popupView.element.off("mouseenter." + self.getName());
});
BI.defer(function () {
if (!enterPopup) {
hide();
}
}, 50);
});
break;
}
@ -67628,6 +67655,8 @@ BI.IconCombo = BI.inherit(BI.Widget, {
type: "bi.combo",
element: this,
direction: o.direction,
trigger: o.trigger,
container: o.container,
adjustLength: o.adjustLength,
adjustXOffset: o.adjustXOffset,
adjustYOffset: o.adjustYOffset,
@ -80817,7 +80846,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
});
function optimizeSize(s) {
return BI.clamp(s, 0, o.width);
return BI.clamp(s, 0, self._getGrayTrackLength());
}
},
@ -81278,7 +81307,7 @@ BI.IntervalSliderLabel = BI.inherit(BI.Widget, {
});
function optimizeSize(s) {
return BI.clamp(s, 0, o.width);
return BI.clamp(s, 0, self._getGrayTrackLength());
}
},
@ -92475,7 +92504,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
});
function optimizeSize(s) {
return BI.clamp(s, 0, o.width);
return BI.clamp(s, 0, self._getGrayTrackLength());
}
},
@ -92776,7 +92805,7 @@ BI.SingleSliderLabel = BI.inherit(BI.Widget, {
});
function optimizeSize(s) {
return BI.clamp(s, 0, o.width);
return BI.clamp(s, 0, self._getGrayTrackLength());
}
},
@ -93041,7 +93070,7 @@ BI.SingleSliderNormal = BI.inherit(BI.Widget, {
});
function optimizeSize(s) {
return BI.clamp(s, 0, o.width);
return BI.clamp(s, 0, self._getGrayTrackLength());
}
},

2
dist/case.js vendored

@ -5260,6 +5260,8 @@ BI.IconCombo = BI.inherit(BI.Widget, {
type: "bi.combo",
element: this,
direction: o.direction,
trigger: o.trigger,
container: o.container,
adjustLength: o.adjustLength,
adjustXOffset: o.adjustXOffset,
adjustYOffset: o.adjustYOffset,

2
dist/demo.js vendored

@ -1734,6 +1734,8 @@ Demo.IconCombo = BI.inherit(BI.Widget, {
type: "bi.horizontal_auto",
items: [{
type: "bi.icon_combo",
trigger: "click-hover",
container: "body",
ref:function(_ref){
self.refs=_ref;
},

10
dist/widget.js vendored

@ -5800,7 +5800,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
});
function optimizeSize(s) {
return BI.clamp(s, 0, o.width);
return BI.clamp(s, 0, self._getGrayTrackLength());
}
},
@ -6261,7 +6261,7 @@ BI.IntervalSliderLabel = BI.inherit(BI.Widget, {
});
function optimizeSize(s) {
return BI.clamp(s, 0, o.width);
return BI.clamp(s, 0, self._getGrayTrackLength());
}
},
@ -17458,7 +17458,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
});
function optimizeSize(s) {
return BI.clamp(s, 0, o.width);
return BI.clamp(s, 0, self._getGrayTrackLength());
}
},
@ -17759,7 +17759,7 @@ BI.SingleSliderLabel = BI.inherit(BI.Widget, {
});
function optimizeSize(s) {
return BI.clamp(s, 0, o.width);
return BI.clamp(s, 0, self._getGrayTrackLength());
}
},
@ -18024,7 +18024,7 @@ BI.SingleSliderNormal = BI.inherit(BI.Widget, {
});
function optimizeSize(s) {
return BI.clamp(s, 0, o.width);
return BI.clamp(s, 0, self._getGrayTrackLength());
}
},

47
src/base/combination/combo.js

@ -105,6 +105,19 @@ BI.Combo = BI.inherit(BI.Widget, {
e.stopPropagation();
}
};
var enterPopup = false;
function hide() {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) {
self._hideView();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo);
self.fireEvent(BI.Combo.EVENT_COLLAPSE);
}
self.popupView && self.popupView.element.off("mouseenter." + self.getName()).off("mouseleave." + self.getName());
enterPopup = false;
}
BI.each(evs, function (i, ev) {
switch (ev) {
case "hover":
@ -116,11 +129,18 @@ BI.Combo = BI.inherit(BI.Widget, {
}
});
self.element.on("mouseleave." + self.getName(), function (e) {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) {
self._hideView();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo);
self.fireEvent(BI.Combo.EVENT_COLLAPSE);
}
self.popupView.element.on("mouseenter." + self.getName(), function (e) {
enterPopup = true;
self.popupView.element.on("mouseleave." + self.getName(), function (e) {
hide();
});
self.popupView.element.off("mouseenter." + self.getName());
});
BI.defer(function () {
if (!enterPopup) {
hide();
}
}, 50);
});
break;
case "click":
@ -166,11 +186,18 @@ BI.Combo = BI.inherit(BI.Widget, {
st(e);
});
self.element.on("mouseleave." + self.getName(), function (e) {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) {
self._hideView();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo);
self.fireEvent(BI.Combo.EVENT_COLLAPSE);
}
self.popupView.element.on("mouseenter." + self.getName(), function (e) {
enterPopup = true;
self.popupView.element.on("mouseleave." + self.getName(), function (e) {
hide();
});
self.popupView.element.off("mouseenter." + self.getName());
});
BI.defer(function () {
if (!enterPopup) {
hide();
}
}, 50);
});
break;
}

2
src/case/combo/iconcombo/combo.icon.js

@ -55,6 +55,8 @@ BI.IconCombo = BI.inherit(BI.Widget, {
type: "bi.combo",
element: this,
direction: o.direction,
trigger: o.trigger,
container: o.container,
adjustLength: o.adjustLength,
adjustXOffset: o.adjustXOffset,
adjustYOffset: o.adjustYOffset,

2
src/widget/intervalslider/intervalslider.js

@ -194,7 +194,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
});
function optimizeSize(s) {
return BI.clamp(s, 0, o.width);
return BI.clamp(s, 0, self._getGrayTrackLength());
}
},

2
src/widget/intervalslider/intervalslider.label.js

@ -157,7 +157,7 @@ BI.IntervalSliderLabel = BI.inherit(BI.Widget, {
});
function optimizeSize(s) {
return BI.clamp(s, 0, o.width);
return BI.clamp(s, 0, self._getGrayTrackLength());
}
},

2
src/widget/singleslider/singleslider.js

@ -188,7 +188,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
});
function optimizeSize(s) {
return BI.clamp(s, 0, o.width);
return BI.clamp(s, 0, self._getGrayTrackLength());
}
},

2
src/widget/singleslider/singleslider.label.js

@ -169,7 +169,7 @@ BI.SingleSliderLabel = BI.inherit(BI.Widget, {
});
function optimizeSize(s) {
return BI.clamp(s, 0, o.width);
return BI.clamp(s, 0, self._getGrayTrackLength());
}
},

2
src/widget/singleslider/singleslider.normal.js

@ -134,7 +134,7 @@ BI.SingleSliderNormal = BI.inherit(BI.Widget, {
});
function optimizeSize(s) {
return BI.clamp(s, 0, o.width);
return BI.clamp(s, 0, self._getGrayTrackLength());
}
},

Loading…
Cancel
Save