|
|
@ -12,7 +12,7 @@ |
|
|
|
attributes: { |
|
|
|
attributes: { |
|
|
|
tabIndex: -1 |
|
|
|
tabIndex: -1 |
|
|
|
}, |
|
|
|
}, |
|
|
|
trigger: "click", |
|
|
|
trigger: "click", // click || hover || click-hover || ""
|
|
|
|
toggle: true, |
|
|
|
toggle: true, |
|
|
|
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right||right,innerRight||right,innerLeft||innerRight||innerLeft
|
|
|
|
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right||right,innerRight||right,innerLeft||innerRight||innerLeft
|
|
|
|
logic: { |
|
|
|
logic: { |
|
|
@ -182,9 +182,6 @@ |
|
|
|
}); |
|
|
|
}); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "click-hover": |
|
|
|
case "click-hover": |
|
|
|
case "click-blur": |
|
|
|
|
|
|
|
// IE走click-hover逻辑
|
|
|
|
|
|
|
|
if (BI.isIE() || ev === "click-hover") { |
|
|
|
|
|
|
|
var debounce = BI.debounce(function (e) { |
|
|
|
var debounce = BI.debounce(function (e) { |
|
|
|
if (self.combo.element.__isMouseInBounds__(e)) { |
|
|
|
if (self.combo.element.__isMouseInBounds__(e)) { |
|
|
|
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { |
|
|
|
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { |
|
|
@ -215,7 +212,7 @@ |
|
|
|
}); |
|
|
|
}); |
|
|
|
self.popupView.element.off("mouseenter." + self.getName()); |
|
|
|
self.popupView.element.off("mouseenter." + self.getName()); |
|
|
|
}); |
|
|
|
}); |
|
|
|
BI.defer(function () { |
|
|
|
BI.delay(function () { |
|
|
|
if (!enterPopup) { |
|
|
|
if (!enterPopup) { |
|
|
|
hide(e); |
|
|
|
hide(e); |
|
|
|
} |
|
|
|
} |
|
|
@ -224,44 +221,6 @@ |
|
|
|
}); |
|
|
|
}); |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var debounce = BI.debounce(function (e) { |
|
|
|
|
|
|
|
if (self.combo.element.__isMouseInBounds__(e)) { |
|
|
|
|
|
|
|
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) { |
|
|
|
|
|
|
|
// if (!o.toggle && self.isViewVisible()) {
|
|
|
|
|
|
|
|
// return;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
o.toggle ? self._toggle(e) : self._popupView(e); |
|
|
|
|
|
|
|
if (self.isViewVisible()) { |
|
|
|
|
|
|
|
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.combo); |
|
|
|
|
|
|
|
self.fireEvent(BI.Combo.EVENT_EXPAND); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo); |
|
|
|
|
|
|
|
self.fireEvent(BI.Combo.EVENT_COLLAPSE); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, BI.EVENT_RESPONSE_TIME, { |
|
|
|
|
|
|
|
"leading": true, |
|
|
|
|
|
|
|
"trailing": false |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
self.element.off("click." + self.getName()).on("click." + self.getName(), function (e) { |
|
|
|
|
|
|
|
debounce(e); |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
self.element[0].focus(); |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
st(e); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
self.element.off("blur." + self.getName()).on("blur." + self.getName(), function (e) { |
|
|
|
|
|
|
|
if (self.isViewVisible()) { |
|
|
|
|
|
|
|
self._hideView(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
st(e); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|