|
|
@ -243,7 +243,7 @@ BI.Pane = BI.inherit(BI.Widget, { |
|
|
|
loading: function () { |
|
|
|
loading: function () { |
|
|
|
var self = this, o = this.options; |
|
|
|
var self = this, o = this.options; |
|
|
|
if (o.overlap === true) { |
|
|
|
if (o.overlap === true) { |
|
|
|
if (!BI.Maskers.has(this.getName())) { |
|
|
|
if (!BI.Layers.has(this.getName())) { |
|
|
|
BI.createWidget({ |
|
|
|
BI.createWidget({ |
|
|
|
type: 'bi.vtape', |
|
|
|
type: 'bi.vtape', |
|
|
|
items: [{ |
|
|
|
items: [{ |
|
|
@ -253,10 +253,10 @@ BI.Pane = BI.inherit(BI.Widget, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
height: 30 |
|
|
|
height: 30 |
|
|
|
}], |
|
|
|
}], |
|
|
|
element: BI.Maskers.make(this.getName(), this) |
|
|
|
element: BI.Layers.make(this.getName(), this) |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
BI.Maskers.show(self.getName()); |
|
|
|
BI.Layers.show(self.getName()); |
|
|
|
} else if (BI.isNull(this._loading)) { |
|
|
|
} else if (BI.isNull(this._loading)) { |
|
|
|
this._loading = BI.createWidget({ |
|
|
|
this._loading = BI.createWidget({ |
|
|
|
type: "bi.layout", |
|
|
|
type: "bi.layout", |
|
|
@ -279,7 +279,7 @@ BI.Pane = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
loaded: function () { |
|
|
|
loaded: function () { |
|
|
|
var self = this, o = this.options; |
|
|
|
var self = this, o = this.options; |
|
|
|
BI.Maskers.remove(self.getName()); |
|
|
|
BI.Layers.remove(self.getName()); |
|
|
|
this._loading && this._loading.destroy(); |
|
|
|
this._loading && this._loading.destroy(); |
|
|
|
this._loading && (this._loading = null); |
|
|
|
this._loading && (this._loading = null); |
|
|
|
o.onLoaded(); |
|
|
|
o.onLoaded(); |
|
|
@ -685,72 +685,99 @@ BI.BasicButton = BI.inherit(BI.Single, { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
hand = hand.element; |
|
|
|
hand = hand.element; |
|
|
|
switch (o.trigger) { |
|
|
|
var triggerArr = (o.trigger || "").split(","); |
|
|
|
case "mouseup": |
|
|
|
BI.each(triggerArr, function (idx, trigger) { |
|
|
|
var mouseDown = false; |
|
|
|
switch (trigger) { |
|
|
|
hand.mousedown(function () { |
|
|
|
case "mouseup": |
|
|
|
mouseDown = true; |
|
|
|
var mouseDown = false; |
|
|
|
ev(e); |
|
|
|
hand.mousedown(function () { |
|
|
|
}); |
|
|
|
mouseDown = true; |
|
|
|
hand.mouseup(function (e) { |
|
|
|
ev(e); |
|
|
|
if (mouseDown === true) { |
|
|
|
}); |
|
|
|
clk(e); |
|
|
|
hand.mouseup(function (e) { |
|
|
|
} |
|
|
|
if (mouseDown === true) { |
|
|
|
mouseDown = false; |
|
|
|
clk(e); |
|
|
|
ev(e); |
|
|
|
} |
|
|
|
}); |
|
|
|
mouseDown = false; |
|
|
|
break; |
|
|
|
ev(e); |
|
|
|
case "mousedown": |
|
|
|
}); |
|
|
|
var mouseDown = false; |
|
|
|
break; |
|
|
|
var selected = false; |
|
|
|
case "mousedown": |
|
|
|
hand.mousedown(function (e) { |
|
|
|
var mouseDown = false; |
|
|
|
// if (e.button === 0) {
|
|
|
|
var selected = false; |
|
|
|
$(document).bind("mouseup." + self.getName(), function (e) { |
|
|
|
hand.mousedown(function (e) { |
|
|
|
// if (e.button === 0) {
|
|
|
|
// if (e.button === 0) {
|
|
|
|
if (BI.DOM.isExist(self) && !hand.__isMouseInBounds__(e) && mouseDown === true && !selected) { |
|
|
|
$(document).bind("mouseup." + self.getName(), function (e) { |
|
|
|
self.setSelected(!self.isSelected()); |
|
|
|
// if (e.button === 0) {
|
|
|
|
self._trigger(); |
|
|
|
if (BI.DOM.isExist(self) && !hand.__isMouseInBounds__(e) && mouseDown === true && !selected) { |
|
|
|
|
|
|
|
self.setSelected(!self.isSelected()); |
|
|
|
|
|
|
|
self._trigger(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
mouseDown = false; |
|
|
|
|
|
|
|
$(document).unbind("mouseup." + self.getName()); |
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
if (mouseDown === true) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (self.isSelected()) { |
|
|
|
|
|
|
|
selected = true; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
clk(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
mouseDown = true; |
|
|
|
|
|
|
|
ev(e); |
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
hand.mouseup(function (e) { |
|
|
|
|
|
|
|
// if (e.button === 0) {
|
|
|
|
|
|
|
|
if (BI.DOM.isExist(self) && mouseDown === true && selected === true) { |
|
|
|
|
|
|
|
clk(e); |
|
|
|
} |
|
|
|
} |
|
|
|
mouseDown = false; |
|
|
|
mouseDown = false; |
|
|
|
|
|
|
|
selected = false; |
|
|
|
$(document).unbind("mouseup." + self.getName()); |
|
|
|
$(document).unbind("mouseup." + self.getName()); |
|
|
|
// }
|
|
|
|
// }
|
|
|
|
}); |
|
|
|
}); |
|
|
|
if (mouseDown === true) { |
|
|
|
break; |
|
|
|
return; |
|
|
|
case "dblclick": |
|
|
|
} |
|
|
|
hand.dblclick(clk); |
|
|
|
if (self.isSelected()) { |
|
|
|
break; |
|
|
|
selected = true; |
|
|
|
case "lclick": |
|
|
|
} else { |
|
|
|
var mouseDown = false; |
|
|
|
clk(e); |
|
|
|
var interval; |
|
|
|
} |
|
|
|
hand.mousedown(function (e) { |
|
|
|
mouseDown = true; |
|
|
|
$(document).bind("mouseup." + self.getName(), function (e) { |
|
|
|
ev(e); |
|
|
|
interval && clearInterval(interval); |
|
|
|
// }
|
|
|
|
interval = null; |
|
|
|
}); |
|
|
|
mouseDown = false; |
|
|
|
hand.mouseup(function (e) { |
|
|
|
$(document).unbind("mouseup." + self.getName()); |
|
|
|
// if (e.button === 0) {
|
|
|
|
}); |
|
|
|
if (BI.DOM.isExist(self) && mouseDown === true && selected === true) { |
|
|
|
if (mouseDown === true) { |
|
|
|
clk(e); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
mouseDown = false; |
|
|
|
if (!self.isEnabled() || (self.isOnce() && self.isSelected())) { |
|
|
|
selected = false; |
|
|
|
return; |
|
|
|
$(document).unbind("mouseup." + self.getName()); |
|
|
|
} |
|
|
|
// }
|
|
|
|
interval = setInterval(function () { |
|
|
|
}); |
|
|
|
self.doClick(); |
|
|
|
break; |
|
|
|
}, 100); |
|
|
|
case "dblclick": |
|
|
|
mouseDown = true; |
|
|
|
hand.dblclick(clk); |
|
|
|
ev(e); |
|
|
|
break; |
|
|
|
}); |
|
|
|
default: |
|
|
|
break; |
|
|
|
hand.mousedown(function (e) { |
|
|
|
default: |
|
|
|
ev(e); |
|
|
|
hand.mousedown(function (e) { |
|
|
|
}); |
|
|
|
ev(e); |
|
|
|
hand.mouseup(function (e) { |
|
|
|
}); |
|
|
|
ev(e); |
|
|
|
hand.mouseup(function (e) { |
|
|
|
}); |
|
|
|
ev(e); |
|
|
|
hand.click(clk); |
|
|
|
}); |
|
|
|
break; |
|
|
|
hand.click(clk); |
|
|
|
} |
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
//之后的300ms点击无效
|
|
|
|
//之后的300ms点击无效
|
|
|
|
var onClick = BI.debounce(this.doClick, BI.EVENT_RESPONSE_TIME, true); |
|
|
|
var onClick = BI.debounce(this.doClick, BI.EVENT_RESPONSE_TIME, true); |
|
|
|
|
|
|
|
|
|
|
@ -3453,7 +3480,7 @@ BI.shortcut("bi.expander", BI.Expander);/** |
|
|
|
BI.ComboGroup = BI.inherit(BI.Widget, { |
|
|
|
BI.ComboGroup = BI.inherit(BI.Widget, { |
|
|
|
_defaultConfig: function () { |
|
|
|
_defaultConfig: function () { |
|
|
|
return BI.extend(BI.ComboGroup.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
return BI.extend(BI.ComboGroup.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
baseCls: "bi-combo-group", |
|
|
|
baseCls: "bi-combo-group bi-list-item", |
|
|
|
|
|
|
|
|
|
|
|
//以下这些属性对每一个combo都是公用的
|
|
|
|
//以下这些属性对每一个combo都是公用的
|
|
|
|
trigger: "click,hover", |
|
|
|
trigger: "click,hover", |
|
|
|