Browse Source

Merge pull request #894 in VISUAL/fineui from ~ZHENFEI.LI/fineui:master to master

* commit '41e73673fe859b0230d7f3738fefe90a97793989':
  BI-43249 fix: bi.sign_editor的keyword不高亮问题
es6
windy 6 years ago
parent
commit
ebc768c35f
  1. 30
      dist/2.0/fineui.ie.js
  2. 24
      dist/2.0/fineui.ie.min.js
  3. 30
      dist/2.0/fineui.js
  4. 24
      dist/2.0/fineui.min.js
  5. 30
      dist/bundle.ie.js
  6. 24
      dist/bundle.ie.min.js
  7. 30
      dist/bundle.js
  8. 24
      dist/bundle.min.js
  9. 2
      dist/case.js
  10. 131
      dist/demo.js
  11. 30
      dist/fineui.ie.js
  12. 24
      dist/fineui.ie.min.js
  13. 30
      dist/fineui.js
  14. 24
      dist/fineui.min.js
  15. 30
      dist/fineui_without_jquery_polyfill.js
  16. 2
      dist/utils.min.js
  17. 28
      dist/widget.js
  18. 2
      src/case/editor/editor.sign.js

30
dist/2.0/fineui.ie.js vendored

@ -55811,7 +55811,6 @@ BI.SignEditor = BI.inherit(BI.Widget, {
});
this._showHint();
self._checkText();
this.text.doRedMark(o.keyword);
},
_checkText: function () {
@ -55823,6 +55822,7 @@ BI.SignEditor = BI.inherit(BI.Widget, {
} else {
this.text.setValue(this.editor.getValue());
this.text.element.removeClass("bi-water-mark");
this.text.doRedMark(o.keyword);
}
}, this));
},
@ -68143,32 +68143,9 @@ 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();
}
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.wants2Quit === true) {
self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM);
self.wants2Quit = false;
@ -68221,7 +68198,6 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this.combo.populate.apply(this.combo, arguments);
}
});

24
dist/2.0/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

30
dist/2.0/fineui.js vendored

@ -56215,7 +56215,6 @@ BI.SignEditor = BI.inherit(BI.Widget, {
});
this._showHint();
self._checkText();
this.text.doRedMark(o.keyword);
},
_checkText: function () {
@ -56227,6 +56226,7 @@ BI.SignEditor = BI.inherit(BI.Widget, {
} else {
this.text.setValue(this.editor.getValue());
this.text.element.removeClass("bi-water-mark");
this.text.doRedMark(o.keyword);
}
}, this));
},
@ -68547,32 +68547,9 @@ 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();
}
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.wants2Quit === true) {
self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM);
self.wants2Quit = false;
@ -68625,7 +68602,6 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this.combo.populate.apply(this.combo, arguments);
}
});

24
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

30
dist/bundle.ie.js vendored

@ -55811,7 +55811,6 @@ BI.SignEditor = BI.inherit(BI.Widget, {
});
this._showHint();
self._checkText();
this.text.doRedMark(o.keyword);
},
_checkText: function () {
@ -55823,6 +55822,7 @@ BI.SignEditor = BI.inherit(BI.Widget, {
} else {
this.text.setValue(this.editor.getValue());
this.text.element.removeClass("bi-water-mark");
this.text.doRedMark(o.keyword);
}
}, this));
},
@ -68143,32 +68143,9 @@ 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();
}
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.wants2Quit === true) {
self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM);
self.wants2Quit = false;
@ -68221,7 +68198,6 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this.combo.populate.apply(this.combo, arguments);
}
});

24
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

30
dist/bundle.js vendored

@ -56215,7 +56215,6 @@ BI.SignEditor = BI.inherit(BI.Widget, {
});
this._showHint();
self._checkText();
this.text.doRedMark(o.keyword);
},
_checkText: function () {
@ -56227,6 +56226,7 @@ BI.SignEditor = BI.inherit(BI.Widget, {
} else {
this.text.setValue(this.editor.getValue());
this.text.element.removeClass("bi-water-mark");
this.text.doRedMark(o.keyword);
}
}, this));
},
@ -68547,32 +68547,9 @@ 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();
}
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.wants2Quit === true) {
self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM);
self.wants2Quit = false;
@ -68625,7 +68602,6 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this.combo.populate.apply(this.combo, arguments);
}
});

24
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/case.js vendored

@ -6100,7 +6100,6 @@ BI.SignEditor = BI.inherit(BI.Widget, {
});
this._showHint();
self._checkText();
this.text.doRedMark(o.keyword);
},
_checkText: function () {
@ -6112,6 +6111,7 @@ BI.SignEditor = BI.inherit(BI.Widget, {
} else {
this.text.setValue(this.editor.getValue());
this.text.element.removeClass("bi-water-mark");
this.text.doRedMark(o.keyword);
}
}, this));
},

131
dist/demo.js vendored

@ -3,23 +3,42 @@ Demo = {
};
$(function () {
var ref;
var AppRouter = BI.inherit(BI.Router, {
BI.each(Demo.CONFIG, function (index, item) {
!item.id && (item.id = item.value || item.text);
});
var tree = BI.Tree.transformToTreeFormat(Demo.CONFIG);
var obj = {
routes: {
"": "index"
},
index: function () {
BI.createWidget({
type: "demo.main",
ref: function (_ref) {
console.log(_ref);
ref = _ref;
},
element: "#wrapper"
});
Demo.showIndex = "demo.face";
}
};
BI.Tree.traversal(tree, function (index, node) {
if (!node.children || BI.isEmptyArray(node.children)) {
obj.routes[node.text] = node.text;
obj[node.text] = function () {
Demo.showIndex = node.value;
};
}
});
var AppRouter = BI.inherit(BI.Router, obj);
new AppRouter;
BI.history.start();
BI.createWidget({
type: "demo.main",
ref: function (_ref) {
console.log(_ref);
ref = _ref;
},
element: "#wrapper"
});
});Demo.Button = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-button"
@ -2661,7 +2680,7 @@ BI.shortcut("demo.text_trigger", Demo.Func);Demo.Center = BI.inherit(BI.Widget,
self.tab = this;
},
single: true,
showIndex: "demo.face",
showIndex: Demo.showIndex,
cardCreator: function (v) {
return BI.createWidget({
type: v
@ -8101,8 +8120,23 @@ BI.shortcut("demo.face", Demo.Face);(function () {
props: {
baseCls: "demo-main bi-background"
},
_store: function () {
return BI.Stores.getStore("demo.store.main");
},
watch: {
activeCard: function (v) {
this.center.setValue(v);
}
},
beforeInit: function (cb) {
this.store.init(cb);
},
render: function () {
var center;
var self = this;
return {
type: "bi.border",
items: {
@ -8113,7 +8147,7 @@ BI.shortcut("demo.face", Demo.Face);(function () {
listeners: [{
eventName: Demo.North.EVENT_VALUE_CHANGE,
action: function (v) {
center.setValue(v);
self.store.handleTreeSelectChange(v);
}
}]
}
@ -8125,7 +8159,7 @@ BI.shortcut("demo.face", Demo.Face);(function () {
listeners: [{
eventName: Demo.West.EVENT_VALUE_CHANGE,
action: function (v) {
center.setValue(v);
self.store.handleTreeSelectChange(v);
}
}]
}
@ -8134,7 +8168,7 @@ BI.shortcut("demo.face", Demo.Face);(function () {
el: {
type: "demo.center",
ref: function (_ref) {
center = _ref;
self.center = _ref;
}
}
}
@ -8142,7 +8176,71 @@ BI.shortcut("demo.face", Demo.Face);(function () {
};
}
});
BI.shortcut("demo.main", Demo.Main);Demo.North = BI.inherit(BI.Widget, {
BI.shortcut("demo.main", Demo.Main);!(function () {
var Store = BI.inherit(Fix.Model, {
_init: function () {
},
state: function () {
return {
activeCard: Demo.showIndex
};
},
computed: {},
watch: {},
actions: {
init: function (cb) {
var tree = BI.Tree.transformToTreeFormat(Demo.CONFIG);
var traversal = function (array, callback) {
var t = [];
BI.some(array, function (i, item) {
var match = callback(i, item);
if (match) {
t.push(item.id);
}
var b = traversal(item.children, callback);
if (BI.isNotEmptyArray(b)) {
t = BI.concat([item.id], b);
}
});
return t;
};
var paths = traversal(tree, function (index, node) {
if (!node.children || BI.isEmptyArray(node.children)) {
if (node.value === Demo.showIndex) {
return true;
}
}
});
BI.each(Demo.CONFIG, function (index, item) {
if (BI.contains(paths, item.id)) {
item.open = true;
}
});
cb();
},
handleTreeSelectChange: function (v) {
this.model.activeCard = v;
var matched = BI.some(Demo.CONFIG, function (index, item) {
if (item.value === v) {
BI.history.navigate(item.text, {trigger: true});
return true;
}
});
if (!matched) {
BI.history.navigate("", {trigger: true});
}
}
}
});
BI.store("demo.store.main", Store);
})();Demo.North = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-north"
},
@ -8271,9 +8369,11 @@ BI.shortcut("demo.preview", Demo.Preview);Demo.West = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-west bi-border-right bi-card"
},
mounted: function () {
this.searcher.setAdapter(this.tree);
},
render: function () {
var self = this;
return {
@ -8317,6 +8417,7 @@ BI.shortcut("demo.preview", Demo.Preview);Demo.West = BI.inherit(BI.Widget, {
self.fireEvent(Demo.West.EVENT_VALUE_CHANGE, v);
}
}],
value: Demo.showIndex,
items: Demo.CONFIG,
ref: function (ref) {
self.tree = ref;

30
dist/fineui.ie.js vendored

@ -56056,7 +56056,6 @@ BI.SignEditor = BI.inherit(BI.Widget, {
});
this._showHint();
self._checkText();
this.text.doRedMark(o.keyword);
},
_checkText: function () {
@ -56068,6 +56067,7 @@ BI.SignEditor = BI.inherit(BI.Widget, {
} else {
this.text.setValue(this.editor.getValue());
this.text.element.removeClass("bi-water-mark");
this.text.doRedMark(o.keyword);
}
}, this));
},
@ -68388,32 +68388,9 @@ 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();
}
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.wants2Quit === true) {
self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM);
self.wants2Quit = false;
@ -68466,7 +68443,6 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this.combo.populate.apply(this.combo, arguments);
}
});

24
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

30
dist/fineui.js vendored

@ -56460,7 +56460,6 @@ BI.SignEditor = BI.inherit(BI.Widget, {
});
this._showHint();
self._checkText();
this.text.doRedMark(o.keyword);
},
_checkText: function () {
@ -56472,6 +56471,7 @@ BI.SignEditor = BI.inherit(BI.Widget, {
} else {
this.text.setValue(this.editor.getValue());
this.text.element.removeClass("bi-water-mark");
this.text.doRedMark(o.keyword);
}
}, this));
},
@ -68792,32 +68792,9 @@ 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();
}
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.wants2Quit === true) {
self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM);
self.wants2Quit = false;
@ -68870,7 +68847,6 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this.combo.populate.apply(this.combo, arguments);
}
});

24
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

30
dist/fineui_without_jquery_polyfill.js vendored

@ -39482,7 +39482,6 @@ BI.SignEditor = BI.inherit(BI.Widget, {
});
this._showHint();
self._checkText();
this.text.doRedMark(o.keyword);
},
_checkText: function () {
@ -39494,6 +39493,7 @@ BI.SignEditor = BI.inherit(BI.Widget, {
} else {
this.text.setValue(this.editor.getValue());
this.text.element.removeClass("bi-water-mark");
this.text.doRedMark(o.keyword);
}
}, this));
},
@ -51615,32 +51615,9 @@ 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();
}
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.wants2Quit === true) {
self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM);
self.wants2Quit = false;
@ -51693,7 +51670,6 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this.combo.populate.apply(this.combo, arguments);
}
});

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

28
dist/widget.js vendored

@ -8631,32 +8631,9 @@ 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();
}
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.wants2Quit === true) {
self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM);
self.wants2Quit = false;
@ -8709,7 +8686,6 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this.combo.populate.apply(this.combo, arguments);
}
});

2
src/case/editor/editor.sign.js

@ -134,7 +134,6 @@ BI.SignEditor = BI.inherit(BI.Widget, {
});
this._showHint();
self._checkText();
this.text.doRedMark(o.keyword);
},
_checkText: function () {
@ -146,6 +145,7 @@ BI.SignEditor = BI.inherit(BI.Widget, {
} else {
this.text.setValue(this.editor.getValue());
this.text.element.removeClass("bi-water-mark");
this.text.doRedMark(o.keyword);
}
}, this));
},

Loading…
Cancel
Save