Browse Source

update

master
windy 6 years ago
parent
commit
22c051b767
  1. 71
      dist/base.js
  2. 79
      dist/bundle.js
  3. 56
      dist/bundle.min.js
  4. 79
      dist/fineui.js
  5. 56
      dist/fineui.min.js
  6. 79
      dist/fineui_without_jquery_polyfill.js
  7. 2
      dist/utils.min.js
  8. 8
      dist/widget.js

71
dist/base.js vendored

@ -915,7 +915,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
}
},
_trigger: function () {
_trigger: function (e) {
var o = this.options;
if (!this.isEnabled()) {
return;
@ -926,9 +926,9 @@ BI.BasicButton = BI.inherit(BI.Single, {
this.setSelected(!this.isSelected()));
}
if (this.isValid()) {
o.handler.call(this, this.getValue(), this);
o.handler.call(this, this.getValue(), this, e);
var v = this.getValue();
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, v, this);
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, v, this, e);
this.fireEvent(BI.BasicButton.EVENT_CHANGE, v, this);
if (o.action) {
BI.Actions.runAction(o.action, "click", o);
@ -941,7 +941,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
if (this.isValid()) {
this.beforeClick(e);
}
this._trigger();
this._trigger(e);
if (this.isValid()) {
this.doClick(e);
}
@ -3204,13 +3204,13 @@ BI.Combo = BI.inherit(BI.Widget, {
this.fireEvent(BI.Combo.EVENT_AFTER_HIDEVIEW);
},
_popupView: function () {
_popupView: function (e) {
this._assertPopupViewRender();
this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW);
this.popupView.visible();
this.adjustWidth();
this.adjustHeight();
this.adjustWidth(e);
this.adjustHeight(e);
this.element.addClass(this.options.comboClass);
BI.Widget._renderEngine.createElement(document).unbind("mousedown." + this.getName()).unbind("mousewheel." + this.getName());
@ -3218,7 +3218,7 @@ BI.Combo = BI.inherit(BI.Widget, {
this.fireEvent(BI.Combo.EVENT_AFTER_POPUPVIEW);
},
adjustWidth: function () {
adjustWidth: function (e) {
var o = this.options;
if (!this.popupView) {
return;
@ -3236,59 +3236,84 @@ BI.Combo = BI.inherit(BI.Widget, {
}
},
adjustHeight: function () {
adjustHeight: function (e) {
var o = this.options, p = {};
if (!this.popupView) {
return;
}
var isVisible = this.popupView.isVisible();
this.popupView.visible();
var combo = BI.isNotNull(e) ? {
element: {
offset: function () {
return {
left: e.pageX,
top: e.pageY
};
},
bounds: function () {
// offset为其相对于父定位元素的偏移
return {
x: e.offsetX,
y: e.offsetY,
width: 0,
height: 24
};
},
outerWidth: function () {
return 0;
},
outerHeight: function () {
return 24;
}
}
} : this.combo;
switch (o.direction) {
case "bottom":
case "bottom,right":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "right", "left"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "right", "left"], o.offsetStyle);
break;
case "top":
case "top,right":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "right", "left"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "right", "left"], o.offsetStyle);
break;
case "left":
case "left,bottom":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "bottom", "top"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "bottom", "top"], o.offsetStyle);
break;
case "right":
case "right,bottom":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "bottom", "top"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "bottom", "top"], o.offsetStyle);
break;
case "top,left":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "left", "right"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "left", "right"], o.offsetStyle);
break;
case "bottom,left":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "left", "right"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "left", "right"], o.offsetStyle);
break;
case "left,top":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "top", "bottom"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "top", "bottom"], o.offsetStyle);
break;
case "right,top":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle);
break;
case "top,custom":
case "custom,top":
p = $.getTopAdaptPosition(this.combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
p = $.getTopAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
break;
case "custom,bottom":
case "bottom,custom":
p = $.getBottomAdaptPosition(this.combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
p = $.getBottomAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
break;
case "left,custom":
case "custom,left":
p = $.getLeftAdaptPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength);
p = $.getLeftAdaptPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength);
delete p.top;
delete p.adaptHeight;
break;
case "custom,right":
case "right,custom":
p = $.getRightAdaptPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength);
p = $.getRightAdaptPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength);
delete p.top;
delete p.adaptHeight;
break;
@ -3359,9 +3384,9 @@ BI.Combo = BI.inherit(BI.Widget, {
return this.isEnabled() && this.combo.isEnabled() && !!this.popupView && this.popupView.isVisible();
},
showView: function () {
showView: function (e) {
if (this.isEnabled() && this.combo.isEnabled()) {
this._popupView();
this._popupView(e);
}
},

79
dist/bundle.js vendored

@ -36286,7 +36286,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
}
},
_trigger: function () {
_trigger: function (e) {
var o = this.options;
if (!this.isEnabled()) {
return;
@ -36297,9 +36297,9 @@ BI.BasicButton = BI.inherit(BI.Single, {
this.setSelected(!this.isSelected()));
}
if (this.isValid()) {
o.handler.call(this, this.getValue(), this);
o.handler.call(this, this.getValue(), this, e);
var v = this.getValue();
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, v, this);
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, v, this, e);
this.fireEvent(BI.BasicButton.EVENT_CHANGE, v, this);
if (o.action) {
BI.Actions.runAction(o.action, "click", o);
@ -36312,7 +36312,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
if (this.isValid()) {
this.beforeClick(e);
}
this._trigger();
this._trigger(e);
if (this.isValid()) {
this.doClick(e);
}
@ -38575,13 +38575,13 @@ BI.Combo = BI.inherit(BI.Widget, {
this.fireEvent(BI.Combo.EVENT_AFTER_HIDEVIEW);
},
_popupView: function () {
_popupView: function (e) {
this._assertPopupViewRender();
this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW);
this.popupView.visible();
this.adjustWidth();
this.adjustHeight();
this.adjustWidth(e);
this.adjustHeight(e);
this.element.addClass(this.options.comboClass);
BI.Widget._renderEngine.createElement(document).unbind("mousedown." + this.getName()).unbind("mousewheel." + this.getName());
@ -38589,7 +38589,7 @@ BI.Combo = BI.inherit(BI.Widget, {
this.fireEvent(BI.Combo.EVENT_AFTER_POPUPVIEW);
},
adjustWidth: function () {
adjustWidth: function (e) {
var o = this.options;
if (!this.popupView) {
return;
@ -38607,59 +38607,84 @@ BI.Combo = BI.inherit(BI.Widget, {
}
},
adjustHeight: function () {
adjustHeight: function (e) {
var o = this.options, p = {};
if (!this.popupView) {
return;
}
var isVisible = this.popupView.isVisible();
this.popupView.visible();
var combo = BI.isNotNull(e) ? {
element: {
offset: function () {
return {
left: e.pageX,
top: e.pageY
};
},
bounds: function () {
// offset为其相对于父定位元素的偏移
return {
x: e.offsetX,
y: e.offsetY,
width: 0,
height: 24
};
},
outerWidth: function () {
return 0;
},
outerHeight: function () {
return 24;
}
}
} : this.combo;
switch (o.direction) {
case "bottom":
case "bottom,right":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "right", "left"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "right", "left"], o.offsetStyle);
break;
case "top":
case "top,right":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "right", "left"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "right", "left"], o.offsetStyle);
break;
case "left":
case "left,bottom":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "bottom", "top"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "bottom", "top"], o.offsetStyle);
break;
case "right":
case "right,bottom":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "bottom", "top"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "bottom", "top"], o.offsetStyle);
break;
case "top,left":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "left", "right"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "left", "right"], o.offsetStyle);
break;
case "bottom,left":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "left", "right"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "left", "right"], o.offsetStyle);
break;
case "left,top":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "top", "bottom"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "top", "bottom"], o.offsetStyle);
break;
case "right,top":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle);
break;
case "top,custom":
case "custom,top":
p = $.getTopAdaptPosition(this.combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
p = $.getTopAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
break;
case "custom,bottom":
case "bottom,custom":
p = $.getBottomAdaptPosition(this.combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
p = $.getBottomAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
break;
case "left,custom":
case "custom,left":
p = $.getLeftAdaptPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength);
p = $.getLeftAdaptPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength);
delete p.top;
delete p.adaptHeight;
break;
case "custom,right":
case "right,custom":
p = $.getRightAdaptPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength);
p = $.getRightAdaptPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength);
delete p.top;
delete p.adaptHeight;
break;
@ -38730,9 +38755,9 @@ BI.Combo = BI.inherit(BI.Widget, {
return this.isEnabled() && this.combo.isEnabled() && !!this.popupView && this.popupView.isVisible();
},
showView: function () {
showView: function (e) {
if (this.isEnabled() && this.combo.isEnabled()) {
this._popupView();
this._popupView(e);
}
},
@ -60431,8 +60456,8 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
this.downlistcombo.hideView();
},
showView: function () {
this.downlistcombo.showView();
showView: function (e) {
this.downlistcombo.showView(e);
},
populate: function (items) {
@ -64807,8 +64832,8 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
this.downlistcombo.hideView();
},
showView: function () {
this.downlistcombo.showView();
showView: function (e) {
this.downlistcombo.showView(e);
},
populate: function (items) {

56
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

79
dist/fineui.js vendored

@ -36528,7 +36528,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
}
},
_trigger: function () {
_trigger: function (e) {
var o = this.options;
if (!this.isEnabled()) {
return;
@ -36539,9 +36539,9 @@ BI.BasicButton = BI.inherit(BI.Single, {
this.setSelected(!this.isSelected()));
}
if (this.isValid()) {
o.handler.call(this, this.getValue(), this);
o.handler.call(this, this.getValue(), this, e);
var v = this.getValue();
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, v, this);
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, v, this, e);
this.fireEvent(BI.BasicButton.EVENT_CHANGE, v, this);
if (o.action) {
BI.Actions.runAction(o.action, "click", o);
@ -36554,7 +36554,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
if (this.isValid()) {
this.beforeClick(e);
}
this._trigger();
this._trigger(e);
if (this.isValid()) {
this.doClick(e);
}
@ -38817,13 +38817,13 @@ BI.Combo = BI.inherit(BI.Widget, {
this.fireEvent(BI.Combo.EVENT_AFTER_HIDEVIEW);
},
_popupView: function () {
_popupView: function (e) {
this._assertPopupViewRender();
this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW);
this.popupView.visible();
this.adjustWidth();
this.adjustHeight();
this.adjustWidth(e);
this.adjustHeight(e);
this.element.addClass(this.options.comboClass);
BI.Widget._renderEngine.createElement(document).unbind("mousedown." + this.getName()).unbind("mousewheel." + this.getName());
@ -38831,7 +38831,7 @@ BI.Combo = BI.inherit(BI.Widget, {
this.fireEvent(BI.Combo.EVENT_AFTER_POPUPVIEW);
},
adjustWidth: function () {
adjustWidth: function (e) {
var o = this.options;
if (!this.popupView) {
return;
@ -38849,59 +38849,84 @@ BI.Combo = BI.inherit(BI.Widget, {
}
},
adjustHeight: function () {
adjustHeight: function (e) {
var o = this.options, p = {};
if (!this.popupView) {
return;
}
var isVisible = this.popupView.isVisible();
this.popupView.visible();
var combo = BI.isNotNull(e) ? {
element: {
offset: function () {
return {
left: e.pageX,
top: e.pageY
};
},
bounds: function () {
// offset为其相对于父定位元素的偏移
return {
x: e.offsetX,
y: e.offsetY,
width: 0,
height: 24
};
},
outerWidth: function () {
return 0;
},
outerHeight: function () {
return 24;
}
}
} : this.combo;
switch (o.direction) {
case "bottom":
case "bottom,right":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "right", "left"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "right", "left"], o.offsetStyle);
break;
case "top":
case "top,right":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "right", "left"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "right", "left"], o.offsetStyle);
break;
case "left":
case "left,bottom":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "bottom", "top"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "bottom", "top"], o.offsetStyle);
break;
case "right":
case "right,bottom":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "bottom", "top"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "bottom", "top"], o.offsetStyle);
break;
case "top,left":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "left", "right"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "left", "right"], o.offsetStyle);
break;
case "bottom,left":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "left", "right"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "left", "right"], o.offsetStyle);
break;
case "left,top":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "top", "bottom"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "top", "bottom"], o.offsetStyle);
break;
case "right,top":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle);
break;
case "top,custom":
case "custom,top":
p = $.getTopAdaptPosition(this.combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
p = $.getTopAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
break;
case "custom,bottom":
case "bottom,custom":
p = $.getBottomAdaptPosition(this.combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
p = $.getBottomAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
break;
case "left,custom":
case "custom,left":
p = $.getLeftAdaptPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength);
p = $.getLeftAdaptPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength);
delete p.top;
delete p.adaptHeight;
break;
case "custom,right":
case "right,custom":
p = $.getRightAdaptPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength);
p = $.getRightAdaptPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength);
delete p.top;
delete p.adaptHeight;
break;
@ -38972,9 +38997,9 @@ BI.Combo = BI.inherit(BI.Widget, {
return this.isEnabled() && this.combo.isEnabled() && !!this.popupView && this.popupView.isVisible();
},
showView: function () {
showView: function (e) {
if (this.isEnabled() && this.combo.isEnabled()) {
this._popupView();
this._popupView(e);
}
},
@ -60673,8 +60698,8 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
this.downlistcombo.hideView();
},
showView: function () {
this.downlistcombo.showView();
showView: function (e) {
this.downlistcombo.showView(e);
},
populate: function (items) {
@ -65049,8 +65074,8 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
this.downlistcombo.hideView();
},
showView: function () {
this.downlistcombo.showView();
showView: function (e) {
this.downlistcombo.showView(e);
},
populate: function (items) {

56
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

79
dist/fineui_without_jquery_polyfill.js vendored

@ -25096,7 +25096,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
}
},
_trigger: function () {
_trigger: function (e) {
var o = this.options;
if (!this.isEnabled()) {
return;
@ -25107,9 +25107,9 @@ BI.BasicButton = BI.inherit(BI.Single, {
this.setSelected(!this.isSelected()));
}
if (this.isValid()) {
o.handler.call(this, this.getValue(), this);
o.handler.call(this, this.getValue(), this, e);
var v = this.getValue();
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, v, this);
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, v, this, e);
this.fireEvent(BI.BasicButton.EVENT_CHANGE, v, this);
if (o.action) {
BI.Actions.runAction(o.action, "click", o);
@ -25122,7 +25122,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
if (this.isValid()) {
this.beforeClick(e);
}
this._trigger();
this._trigger(e);
if (this.isValid()) {
this.doClick(e);
}
@ -26485,13 +26485,13 @@ BI.Combo = BI.inherit(BI.Widget, {
this.fireEvent(BI.Combo.EVENT_AFTER_HIDEVIEW);
},
_popupView: function () {
_popupView: function (e) {
this._assertPopupViewRender();
this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW);
this.popupView.visible();
this.adjustWidth();
this.adjustHeight();
this.adjustWidth(e);
this.adjustHeight(e);
this.element.addClass(this.options.comboClass);
BI.Widget._renderEngine.createElement(document).unbind("mousedown." + this.getName()).unbind("mousewheel." + this.getName());
@ -26499,7 +26499,7 @@ BI.Combo = BI.inherit(BI.Widget, {
this.fireEvent(BI.Combo.EVENT_AFTER_POPUPVIEW);
},
adjustWidth: function () {
adjustWidth: function (e) {
var o = this.options;
if (!this.popupView) {
return;
@ -26517,59 +26517,84 @@ BI.Combo = BI.inherit(BI.Widget, {
}
},
adjustHeight: function () {
adjustHeight: function (e) {
var o = this.options, p = {};
if (!this.popupView) {
return;
}
var isVisible = this.popupView.isVisible();
this.popupView.visible();
var combo = BI.isNotNull(e) ? {
element: {
offset: function () {
return {
left: e.pageX,
top: e.pageY
};
},
bounds: function () {
// offset为其相对于父定位元素的偏移
return {
x: e.offsetX,
y: e.offsetY,
width: 0,
height: 24
};
},
outerWidth: function () {
return 0;
},
outerHeight: function () {
return 24;
}
}
} : this.combo;
switch (o.direction) {
case "bottom":
case "bottom,right":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "right", "left"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "right", "left"], o.offsetStyle);
break;
case "top":
case "top,right":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "right", "left"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "right", "left"], o.offsetStyle);
break;
case "left":
case "left,bottom":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "bottom", "top"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "bottom", "top"], o.offsetStyle);
break;
case "right":
case "right,bottom":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "bottom", "top"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "bottom", "top"], o.offsetStyle);
break;
case "top,left":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "left", "right"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "left", "right"], o.offsetStyle);
break;
case "bottom,left":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "left", "right"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "left", "right"], o.offsetStyle);
break;
case "left,top":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "top", "bottom"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "top", "bottom"], o.offsetStyle);
break;
case "right,top":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle);
break;
case "top,custom":
case "custom,top":
p = $.getTopAdaptPosition(this.combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
p = $.getTopAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
break;
case "custom,bottom":
case "bottom,custom":
p = $.getBottomAdaptPosition(this.combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
p = $.getBottomAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
break;
case "left,custom":
case "custom,left":
p = $.getLeftAdaptPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength);
p = $.getLeftAdaptPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength);
delete p.top;
delete p.adaptHeight;
break;
case "custom,right":
case "right,custom":
p = $.getRightAdaptPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength);
p = $.getRightAdaptPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength);
delete p.top;
delete p.adaptHeight;
break;
@ -26640,9 +26665,9 @@ BI.Combo = BI.inherit(BI.Widget, {
return this.isEnabled() && this.combo.isEnabled() && !!this.popupView && this.popupView.isVisible();
},
showView: function () {
showView: function (e) {
if (this.isEnabled() && this.combo.isEnabled()) {
this._popupView();
this._popupView(e);
}
},
@ -43557,8 +43582,8 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
this.downlistcombo.hideView();
},
showView: function () {
this.downlistcombo.showView();
showView: function (e) {
this.downlistcombo.showView(e);
},
populate: function (items) {
@ -47933,8 +47958,8 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
this.downlistcombo.hideView();
},
showView: function () {
this.downlistcombo.showView();
showView: function (e) {
this.downlistcombo.showView(e);
},
populate: function (items) {

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

8
dist/widget.js vendored

@ -1882,8 +1882,8 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
this.downlistcombo.hideView();
},
showView: function () {
this.downlistcombo.showView();
showView: function (e) {
this.downlistcombo.showView(e);
},
populate: function (items) {
@ -6258,8 +6258,8 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
this.downlistcombo.hideView();
},
showView: function () {
this.downlistcombo.showView();
showView: function (e) {
this.downlistcombo.showView(e);
},
populate: function (items) {

Loading…
Cancel
Save