|
|
|
@ -19920,19 +19920,23 @@ BI.Layout = BI.inherit(BI.Widget, {
|
|
|
|
|
oldEndVnode = oldCh[--oldEndIdx]; |
|
|
|
|
} else if (sameVnode(oldStartVnode, newStartVnode, oldStartIdx, newStartIdx)) { |
|
|
|
|
updated = this.patchItem(oldStartVnode, newStartVnode, oldStartIdx) || updated; |
|
|
|
|
children[this._getChildName(oldStartIdx)] = this._children[this._getChildName(oldStartIdx)]; |
|
|
|
|
oldStartVnode = oldCh[++oldStartIdx]; |
|
|
|
|
newStartVnode = newCh[++newStartIdx]; |
|
|
|
|
} else if (sameVnode(oldEndVnode, newEndVnode, oldEndIdx, newEndIdx)) { |
|
|
|
|
updated = this.patchItem(oldEndVnode, newEndVnode, oldEndIdx) || updated; |
|
|
|
|
children[this._getChildName(oldEndIdx)] = this._children[this._getChildName(oldEndIdx)]; |
|
|
|
|
oldEndVnode = oldCh[--oldEndIdx]; |
|
|
|
|
newEndVnode = newCh[--newEndIdx]; |
|
|
|
|
} else if (sameVnode(oldStartVnode, newEndVnode)) { |
|
|
|
|
updated = this.patchItem(oldStartVnode, newEndVnode, oldStartIdx) || updated; |
|
|
|
|
children[this._getChildName(oldStartIdx)] = this._children[this._getChildName(oldStartIdx)]; |
|
|
|
|
insertBefore(oldStartVnode, oldEndVnode, true); |
|
|
|
|
oldStartVnode = oldCh[++oldStartIdx]; |
|
|
|
|
newEndVnode = newCh[--newEndIdx]; |
|
|
|
|
} else if (sameVnode(oldEndVnode, newStartVnode)) { |
|
|
|
|
updated = this.patchItem(oldEndVnode, newStartVnode, oldEndIdx) || updated; |
|
|
|
|
children[this._getChildName(oldEndIdx)] = this._children[this._getChildName(oldEndIdx)]; |
|
|
|
|
insertBefore(oldEndVnode, oldStartVnode); |
|
|
|
|
oldEndVnode = oldCh[--oldEndIdx]; |
|
|
|
|
newStartVnode = newCh[++newStartIdx]; |
|
|
|
@ -48077,6 +48081,14 @@ BI.CodeEditor = BI.inherit(BI.Single, {
|
|
|
|
|
self.fireEvent(BI.CodeEditor.EVENT_BLUR); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
this.editor.on("mousedown", function (cm, e) { |
|
|
|
|
//IE下mousedown之后会触发blur,所以nextTick后再做focus
|
|
|
|
|
BI.nextTick(function () { |
|
|
|
|
self.fireEvent(BI.CodeEditor.EVENT_FOCUS); |
|
|
|
|
}); |
|
|
|
|
e.stopPropagation(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// this.editor.on("blur", function () {
|
|
|
|
|
// self.editor.execCommand("goLineEnd");
|
|
|
|
|
// });
|
|
|
|
@ -48174,7 +48186,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_analyzeContent: function (v) { |
|
|
|
|
var regx = /\$[\{][^\}]*[\}]|(\s+)|\w*\w|\$\{[^\$\(\)\+\-\*\/)\$,]*\w\}|\$\{[^\$\(\)\+\-\*\/]*\w\}|\$\{[^\$\(\)\+\-\*\/]*[\u4e00-\u9fa5]\}|\w|(.)|\n/g; |
|
|
|
|
var regx = /\$[\{][^\}]*[\}]|[^\$\{]*[^\$\{]/g; |
|
|
|
|
return v.match(regx); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -70386,12 +70398,12 @@ jQuery._farbtastic = function (container, callback) {
|
|
|
|
|
/** |
|
|
|
|
* Mousedown handler |
|
|
|
|
*/ |
|
|
|
|
fb.mousedown = function (event) { |
|
|
|
|
fb.click = function (event) { |
|
|
|
|
// Capture mouse
|
|
|
|
|
if (!document.dragging) { |
|
|
|
|
$(document).bind('mousemove', fb.mousemove).bind('mouseup', fb.mouseup); |
|
|
|
|
document.dragging = true; |
|
|
|
|
} |
|
|
|
|
// if (!document.dragging) {
|
|
|
|
|
// $(document).bind('mousemove', fb.mousemove).bind('mouseup', fb.mouseup);
|
|
|
|
|
// document.dragging = true;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// Check which area is being dragged
|
|
|
|
|
var pos = fb.widgetCoords(event); |
|
|
|
@ -70426,12 +70438,12 @@ jQuery._farbtastic = function (container, callback) {
|
|
|
|
|
/** |
|
|
|
|
* Mouseup handler |
|
|
|
|
*/ |
|
|
|
|
fb.mouseup = function () { |
|
|
|
|
// Uncapture mouse
|
|
|
|
|
$(document).unbind('mousemove', fb.mousemove); |
|
|
|
|
$(document).unbind('mouseup', fb.mouseup); |
|
|
|
|
document.dragging = false; |
|
|
|
|
} |
|
|
|
|
// fb.mouseup = function () {
|
|
|
|
|
// // Uncapture mouse
|
|
|
|
|
// $(document).unbind('mousemove', fb.mousemove);
|
|
|
|
|
// $(document).unbind('mouseup', fb.mouseup);
|
|
|
|
|
// document.dragging = false;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Update the markers and styles |
|
|
|
@ -70549,7 +70561,7 @@ jQuery._farbtastic = function (container, callback) {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Install mousedown handler (the others are set on the document on-demand)
|
|
|
|
|
$('*', e).mousedown(fb.mousedown); |
|
|
|
|
$('*', e).click(fb.click); |
|
|
|
|
|
|
|
|
|
// Init color
|
|
|
|
|
fb.setColor('#000000'); |
|
|
|
@ -79307,6 +79319,7 @@ BI.Arrangement = BI.inherit(BI.Widget, {
|
|
|
|
|
}); |
|
|
|
|
this.container = BI.createWidget({ |
|
|
|
|
type: "bi.absolute", |
|
|
|
|
cls: "arrangement-container", |
|
|
|
|
items: o.items.concat([this.block, this.arrangement]) |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
@ -81557,6 +81570,7 @@ BI.DateTimeSelect = BI.inherit(BI.Widget, {
|
|
|
|
|
this.editor = BI.createWidget({ |
|
|
|
|
type: "bi.sign_editor", |
|
|
|
|
value: this._alertInEditorValue(o.min), |
|
|
|
|
allowBlank: false, |
|
|
|
|
errorText: BI.i18nText("BI-Please_Input_Natural_Number"), |
|
|
|
|
validationChecker: function(v){ |
|
|
|
|
return BI.isNaturalNumber(v); |
|
|
|
@ -87116,19 +87130,23 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
|
|
|
|
|
self._setStartValue(""); |
|
|
|
|
}); |
|
|
|
|
this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE, function () { |
|
|
|
|
if (this.getSearcher().hasMatched()) { |
|
|
|
|
var keyword = this.getSearcher().getKeyword(); |
|
|
|
|
self._join({ |
|
|
|
|
type: BI.Selection.Multi, |
|
|
|
|
value: [keyword] |
|
|
|
|
}, function () { |
|
|
|
|
self.combo.setValue(self.storeValue); |
|
|
|
|
self._setStartValue(keyword); |
|
|
|
|
assertShowValue(); |
|
|
|
|
self.populate(); |
|
|
|
|
self._setStartValue(""); |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
// if (this.getSearcher().hasMatched()) {
|
|
|
|
|
var keyword = this.getSearcher().getKeyword(); |
|
|
|
|
self._join({ |
|
|
|
|
type: BI.Selection.Multi, |
|
|
|
|
value: [keyword] |
|
|
|
|
}, function () { |
|
|
|
|
//如果在不选的状态下直接把该值添加进来
|
|
|
|
|
if (self.storeValue.type === BI.Selection.Multi) { |
|
|
|
|
self.storeValue.value.pushDistinct(keyword); |
|
|
|
|
} |
|
|
|
|
self.combo.setValue(self.storeValue); |
|
|
|
|
self._setStartValue(keyword); |
|
|
|
|
assertShowValue(); |
|
|
|
|
self.populate(); |
|
|
|
|
self._setStartValue(""); |
|
|
|
|
}) |
|
|
|
|
// }
|
|
|
|
|
}); |
|
|
|
|
this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function (keywords) { |
|
|
|
|
var last = BI.last(keywords); |
|
|
|
@ -87343,30 +87361,32 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
|
|
|
|
|
|
|
|
|
|
_adjust: function (callback) { |
|
|
|
|
var self = this, o = this.options; |
|
|
|
|
if (!this._count) { |
|
|
|
|
o.itemsCreator({ |
|
|
|
|
type: BI.MultiSelectCombo.REQ_GET_DATA_LENGTH |
|
|
|
|
}, function (res) { |
|
|
|
|
self._count = res.count; |
|
|
|
|
adjust(); |
|
|
|
|
callback(); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
adjust(); |
|
|
|
|
callback(); |
|
|
|
|
} |
|
|
|
|
// if (!this._count) {
|
|
|
|
|
// o.itemsCreator({
|
|
|
|
|
// type: BI.MultiSelectCombo.REQ_GET_DATA_LENGTH
|
|
|
|
|
// }, function (res) {
|
|
|
|
|
// self._count = res.count;
|
|
|
|
|
// adjust();
|
|
|
|
|
// callback();
|
|
|
|
|
// });
|
|
|
|
|
// } else {
|
|
|
|
|
adjust(); |
|
|
|
|
callback(); |
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
function adjust() { |
|
|
|
|
if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) { |
|
|
|
|
self.storeValue = { |
|
|
|
|
type: BI.Selection.Multi, |
|
|
|
|
value: [] |
|
|
|
|
} |
|
|
|
|
} else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) { |
|
|
|
|
self.storeValue = { |
|
|
|
|
type: BI.Selection.All, |
|
|
|
|
value: [] |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) {
|
|
|
|
|
// self.storeValue = {
|
|
|
|
|
// type: BI.Selection.Multi,
|
|
|
|
|
// value: []
|
|
|
|
|
// }
|
|
|
|
|
// } else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) {
|
|
|
|
|
// self.storeValue = {
|
|
|
|
|
// type: BI.Selection.All,
|
|
|
|
|
// value: []
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
if (self.wants2Quit === true) { |
|
|
|
|
self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM); |
|
|
|
|
self.wants2Quit = false; |
|
|
|
@ -88524,8 +88544,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
|
|
|
|
|
dynamic: false |
|
|
|
|
}, |
|
|
|
|
// onLoaded: o.onLoaded,
|
|
|
|
|
el: { |
|
|
|
|
} |
|
|
|
|
el: {} |
|
|
|
|
}); |
|
|
|
|
this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE, function () { |
|
|
|
|
self.storeValue = this.getValue(); |
|
|
|
@ -88580,21 +88599,33 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
|
|
|
|
|
}, { |
|
|
|
|
eventName: BI.Searcher.EVENT_PAUSE, |
|
|
|
|
action: function () { |
|
|
|
|
var keyword = this.getKeyword(); |
|
|
|
|
if (this.hasMatched()) { |
|
|
|
|
var keyword = this.getKeyword(); |
|
|
|
|
self._join({ |
|
|
|
|
type: BI.Selection.Multi, |
|
|
|
|
value: [keyword] |
|
|
|
|
}, function () { |
|
|
|
|
if (self.storeValue.type === BI.Selection.Multi) { |
|
|
|
|
self.storeValue.value.pushDistinct(keyword) |
|
|
|
|
} |
|
|
|
|
self._showAdapter(); |
|
|
|
|
self.adapter.setValue(self.storeValue); |
|
|
|
|
self._setStartValue(keyword); |
|
|
|
|
assertShowValue(); |
|
|
|
|
self.adapter.populate(); |
|
|
|
|
self._setStartValue(""); |
|
|
|
|
self.fireEvent(BI.MultiSelectList.EVENT_CHANGE); |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
if (self.storeValue.type === BI.Selection.Multi) { |
|
|
|
|
self.storeValue.value.pushDistinct(keyword) |
|
|
|
|
} |
|
|
|
|
self._showAdapter(); |
|
|
|
|
self.adapter.setValue(self.storeValue); |
|
|
|
|
self.adapter.populate(); |
|
|
|
|
if (self.storeValue.type === BI.Selection.Multi) { |
|
|
|
|
self.fireEvent(BI.MultiSelectList.EVENT_CHANGE); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, { |
|
|
|
@ -88626,7 +88657,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
|
|
|
|
|
self.fireEvent(BI.MultiSelectList.EVENT_CHANGE); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
self._join(this.getValue(), function () {//安徽省 北京
|
|
|
|
|
self._join(this.getValue(), function () { |
|
|
|
|
assertShowValue(); |
|
|
|
|
self.fireEvent(BI.MultiSelectList.EVENT_CHANGE); |
|
|
|
|
}); |
|
|
|
@ -88747,30 +88778,32 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
|
|
|
|
|
|
|
|
|
|
_adjust: function (callback) { |
|
|
|
|
var self = this, o = this.options; |
|
|
|
|
if (!this._count) { |
|
|
|
|
o.itemsCreator({ |
|
|
|
|
type: BI.MultiSelectList.REQ_GET_DATA_LENGTH |
|
|
|
|
}, function (res) { |
|
|
|
|
self._count = res.count; |
|
|
|
|
adjust(); |
|
|
|
|
callback(); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
adjust(); |
|
|
|
|
callback(); |
|
|
|
|
} |
|
|
|
|
// if (!this._count) {
|
|
|
|
|
// o.itemsCreator({
|
|
|
|
|
// type: BI.MultiSelectList.REQ_GET_DATA_LENGTH
|
|
|
|
|
// }, function (res) {
|
|
|
|
|
// self._count = res.count;
|
|
|
|
|
// adjust();
|
|
|
|
|
// callback();
|
|
|
|
|
// });
|
|
|
|
|
// } else {
|
|
|
|
|
adjust(); |
|
|
|
|
callback(); |
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
function adjust() { |
|
|
|
|
if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) { |
|
|
|
|
self.storeValue = { |
|
|
|
|
type: BI.Selection.Multi, |
|
|
|
|
value: [] |
|
|
|
|
} |
|
|
|
|
} else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) { |
|
|
|
|
self.storeValue = { |
|
|
|
|
type: BI.Selection.All, |
|
|
|
|
value: [] |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) {
|
|
|
|
|
// self.storeValue = {
|
|
|
|
|
// type: BI.Selection.Multi,
|
|
|
|
|
// value: []
|
|
|
|
|
// }
|
|
|
|
|
// } else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) {
|
|
|
|
|
// self.storeValue = {
|
|
|
|
|
// type: BI.Selection.All,
|
|
|
|
|
// value: []
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -91918,7 +91951,8 @@ BI.RelationViewItem = BI.inherit(BI.BasicButton, {
|
|
|
|
|
value: o.value, |
|
|
|
|
height: o.height, |
|
|
|
|
textAlign: "left", |
|
|
|
|
width: o.isPrimary ? 70 : 90 |
|
|
|
|
width: o.isPrimary ? 70 : 90, |
|
|
|
|
lgap: o.isPrimary ? 0 : 10 |
|
|
|
|
}); |
|
|
|
|
BI.createWidget({ |
|
|
|
|
type: "bi.vertical_adapt", |
|
|
|
|