Browse Source

Merge pull request #149 in FUI/fineui from ~GUY/fineui:master to master

* commit 'b69a75e8db7a13f7dc5054a0880a98fe0b8e254a':
  update
  codemirror与IE11
  layout updateChildren
  codeeditor正则修改
  关联视图中关联表的关联字段未对齐
  update
  时分秒输入不可为空
  update
  change css by less
  BI-10431 BI中文字颜色层级大于标红层级
  update
es6
guy 7 years ago
parent
commit
cd754719a3
  1. 10
      bi/base.js
  2. 24
      bi/case.js
  3. 4
      bi/core.js
  4. 2
      bi/widget.css
  5. 120
      bi/widget.js
  6. 10
      dist/base.js
  7. 2
      dist/bundle.css
  8. 158
      dist/bundle.js
  9. 2
      dist/bundle.min.css
  10. 62
      dist/bundle.min.js
  11. 24
      dist/case.js
  12. 4
      dist/core.js
  13. 2
      dist/widget.css
  14. 120
      dist/widget.js
  15. 10
      src/base/single/editor/editor.code.js
  16. 24
      src/case/colorchooser/farbtastic/jquery.farbtastic.js
  17. 4
      src/core/wrapper/layout.js
  18. 2
      src/css/widget/numberinterval/numberinterval.css
  19. 2
      src/less/widget/numberinterval/numberinterval.less
  20. 1
      src/widget/arrangement/arrangement.js
  21. 1
      src/widget/datetime/datetime.select.js
  22. 52
      src/widget/multiselect/multiselect.combo.js
  23. 63
      src/widget/multiselectlist/multiselectlist.js
  24. 3
      src/widget/relationview/relationview.item.js

10
bi/base.js

@ -19054,6 +19054,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");
// });
@ -19151,7 +19159,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);
},

24
bi/case.js

@ -4619,12 +4619,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);
@ -4659,12 +4659,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
@ -4782,7 +4782,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');

4
bi/core.js

@ -11564,19 +11564,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];

2
bi/widget.css

@ -181,7 +181,7 @@
font-size: 14px;
}
.bi-number-interval.number-error .bi-input {
color: #e85050;
color: #e85050 !important;
}
.bi-page-table-cell {
-webkit-user-select: text;

120
bi/widget.js

@ -828,6 +828,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])
});
@ -3078,6 +3079,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);
@ -8637,19 +8639,23 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
self._setStartValue("");
});
this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE, function () {
if (this.getSearcher().hasMatched()) {
// 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);
@ -8864,30 +8870,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 {
// 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;
@ -10045,8 +10053,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();
@ -10101,21 +10108,33 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
}, {
eventName: BI.Searcher.EVENT_PAUSE,
action: function () {
if (this.hasMatched()) {
var keyword = this.getKeyword();
if (this.hasMatched()) {
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);
}
}
}
}, {
@ -10147,7 +10166,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);
});
@ -10268,30 +10287,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 {
// 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: []
// }
// }
}
},
@ -13439,7 +13460,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",

10
dist/base.js vendored

@ -19054,6 +19054,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");
// });
@ -19151,7 +19159,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);
},

2
dist/bundle.css vendored

@ -3268,7 +3268,7 @@ ul.ztree.zTreeDragUL {
font-size: 14px;
}
.bi-number-interval.number-error .bi-input {
color: #e85050;
color: #e85050 !important;
}
.bi-page-table-cell {
-webkit-user-select: text;

158
dist/bundle.js vendored

@ -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()) {
// 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 {
// 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 () {
if (this.hasMatched()) {
var keyword = this.getKeyword();
if (this.hasMatched()) {
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 {
// 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",

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

62
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

24
dist/case.js vendored

@ -4619,12 +4619,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);
@ -4659,12 +4659,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
@ -4782,7 +4782,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');

4
dist/core.js vendored

@ -19869,19 +19869,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];

2
dist/widget.css vendored

@ -181,7 +181,7 @@
font-size: 14px;
}
.bi-number-interval.number-error .bi-input {
color: #e85050;
color: #e85050 !important;
}
.bi-page-table-cell {
-webkit-user-select: text;

120
dist/widget.js vendored

@ -828,6 +828,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])
});
@ -3078,6 +3079,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);
@ -8637,19 +8639,23 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
self._setStartValue("");
});
this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE, function () {
if (this.getSearcher().hasMatched()) {
// 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);
@ -8864,30 +8870,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 {
// 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;
@ -10045,8 +10053,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();
@ -10101,21 +10108,33 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
}, {
eventName: BI.Searcher.EVENT_PAUSE,
action: function () {
if (this.hasMatched()) {
var keyword = this.getKeyword();
if (this.hasMatched()) {
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);
}
}
}
}, {
@ -10147,7 +10166,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);
});
@ -10268,30 +10287,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 {
// 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: []
// }
// }
}
},
@ -13439,7 +13460,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",

10
src/base/single/editor/editor.code.js

@ -44,6 +44,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");
// });
@ -141,7 +149,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);
},

24
src/case/colorchooser/farbtastic/jquery.farbtastic.js

@ -170,12 +170,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);
@ -210,12 +210,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
@ -333,7 +333,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');

4
src/core/wrapper/layout.js

@ -380,19 +380,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];

2
src/css/widget/numberinterval/numberinterval.css

@ -37,5 +37,5 @@
font-size: 14px;
}
.bi-number-interval.number-error .bi-input {
color: #e85050;
color: #e85050 !important;
}

2
src/less/widget/numberinterval/numberinterval.less

@ -26,6 +26,6 @@
}
&.number-error .bi-input {
color: @color-bi-text-warning
color: @color-bi-text-warning !important;
}
}

1
src/widget/arrangement/arrangement.js

@ -29,6 +29,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])
});

1
src/widget/datetime/datetime.select.js

@ -16,6 +16,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);

52
src/widget/multiselect/multiselect.combo.js

@ -59,19 +59,23 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
self._setStartValue("");
});
this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE, function () {
if (this.getSearcher().hasMatched()) {
// 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);
@ -286,30 +290,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 {
// 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;

63
src/widget/multiselectlist/multiselectlist.js

@ -29,8 +29,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();
@ -85,21 +84,33 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
}, {
eventName: BI.Searcher.EVENT_PAUSE,
action: function () {
if (this.hasMatched()) {
var keyword = this.getKeyword();
if (this.hasMatched()) {
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);
}
}
}
}, {
@ -131,7 +142,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);
});
@ -252,30 +263,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;
// if (!this._count) {
// o.itemsCreator({
// type: BI.MultiSelectList.REQ_GET_DATA_LENGTH
// }, function (res) {
// self._count = res.count;
// adjust();
// callback();
// });
// } else {
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: []
// }
// }
}
},

3
src/widget/relationview/relationview.item.js

@ -35,7 +35,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",

Loading…
Cancel
Save