Browse Source

Merge branch 'master' of ssh://cloud.finedevelop.com:7999/~windy/fineui

# Conflicts:
#	dist/bundle.min.js
es6
windy 6 years ago
parent
commit
023f2d6104
  1. 16
      dist/_fineui.min.js
  2. 23
      dist/base.js
  3. 23
      dist/bundle.js
  4. 23
      dist/fineui.js
  5. 32
      dist/fineui.min.js
  6. 16
      src/base/formula/formulaeditor.js
  7. 2
      src/base/single/editor/editor.code.js
  8. 2
      src/base/sql/editor.sql.js

16
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

23
dist/base.js vendored

@ -14659,7 +14659,7 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
if (BI.isNotNull(fieldFormattedName.match("^<!.*!>$")) && !force) {
className = "error-field";
}
this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value});
this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value, replacedWith: $("<span class='" + className + " start end' />").text(showName)[0]});
this.editor.focus();
},
@ -14724,7 +14724,12 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
return this.editor.getValue(true, function (line) {
var rawText = line.text, value = line.text, num = 0;
value.text = rawText;
_.forEach(line.markedSpans, function (i, ms) {
var markedSpans = _.clone(line.markedSpans) || [];
markedSpans.sort(function (a, b) {
return a.from > b.from;
});
_.forEach(markedSpans, function (i, ms) {
switch (i.marker.className) {
case "fieldName":
@ -14745,7 +14750,12 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
var v = this.editor.getValue("\n", function (line) {
var rawText = line.text, value = line.text, num = 0;
value.text = rawText;
_.forEach(line.markedSpans, function (i, ms) {
var markedSpans = _.clone(line.markedSpans) || [];
markedSpans.sort(function (a, b) {
return a.from > b.from;
});
_.forEach(markedSpans, function (i, ms) {
switch (i.marker.className) {
case "fieldName":
case "error-field":
@ -18233,7 +18243,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
// 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下
this.editor.replaceSelection("\u200b" + param + "\u200b");
var to = this.editor.getCursor();
var options = {className: "param", atomic: true};
var options = {className: "param", atomic: true, replacedWith: $("<span class='param start end' />").text(param)[0]};
if (BI.isNotNull(param.match(/^<!.*!>$/))) {
options.className = "error-param";
}
@ -21505,7 +21515,7 @@ BI.SQLEditor = BI.inherit(BI.Widget, {
var from = this.editor.getCursor();
this.editor.replaceSelection(param);
var to = this.editor.getCursor();
var options = {className: "param", atomic: true};
var options = {className: "param", atomic: true, replacedWith: $("<span class='param start end' />").text(param)[0]};
options.value = value;
this.editor.markText(from, to, options);
this.editor.replaceSelection(" ");
@ -21572,7 +21582,8 @@ BI.SQLEditor = BI.inherit(BI.Widget, {
});
}
});
BI.shortcut("bi.sql_editor", BI.SQLEditor);// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
BI.shortcut("bi.sql_editor", BI.SQLEditor);
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

23
dist/bundle.js vendored

@ -50464,7 +50464,7 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
if (BI.isNotNull(fieldFormattedName.match("^<!.*!>$")) && !force) {
className = "error-field";
}
this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value});
this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value, replacedWith: $("<span class='" + className + " start end' />").text(showName)[0]});
this.editor.focus();
},
@ -50529,7 +50529,12 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
return this.editor.getValue(true, function (line) {
var rawText = line.text, value = line.text, num = 0;
value.text = rawText;
_.forEach(line.markedSpans, function (i, ms) {
var markedSpans = _.clone(line.markedSpans) || [];
markedSpans.sort(function (a, b) {
return a.from > b.from;
});
_.forEach(markedSpans, function (i, ms) {
switch (i.marker.className) {
case "fieldName":
@ -50550,7 +50555,12 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
var v = this.editor.getValue("\n", function (line) {
var rawText = line.text, value = line.text, num = 0;
value.text = rawText;
_.forEach(line.markedSpans, function (i, ms) {
var markedSpans = _.clone(line.markedSpans) || [];
markedSpans.sort(function (a, b) {
return a.from > b.from;
});
_.forEach(markedSpans, function (i, ms) {
switch (i.marker.className) {
case "fieldName":
case "error-field":
@ -54038,7 +54048,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
// 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下
this.editor.replaceSelection("\u200b" + param + "\u200b");
var to = this.editor.getCursor();
var options = {className: "param", atomic: true};
var options = {className: "param", atomic: true, replacedWith: $("<span class='param start end' />").text(param)[0]};
if (BI.isNotNull(param.match(/^<!.*!>$/))) {
options.className = "error-param";
}
@ -57310,7 +57320,7 @@ BI.SQLEditor = BI.inherit(BI.Widget, {
var from = this.editor.getCursor();
this.editor.replaceSelection(param);
var to = this.editor.getCursor();
var options = {className: "param", atomic: true};
var options = {className: "param", atomic: true, replacedWith: $("<span class='param start end' />").text(param)[0]};
options.value = value;
this.editor.markText(from, to, options);
this.editor.replaceSelection(" ");
@ -57377,7 +57387,8 @@ BI.SQLEditor = BI.inherit(BI.Widget, {
});
}
});
BI.shortcut("bi.sql_editor", BI.SQLEditor);// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
BI.shortcut("bi.sql_editor", BI.SQLEditor);
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

23
dist/fineui.js vendored

@ -50713,7 +50713,7 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
if (BI.isNotNull(fieldFormattedName.match("^<!.*!>$")) && !force) {
className = "error-field";
}
this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value});
this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value, replacedWith: $("<span class='" + className + " start end' />").text(showName)[0]});
this.editor.focus();
},
@ -50778,7 +50778,12 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
return this.editor.getValue(true, function (line) {
var rawText = line.text, value = line.text, num = 0;
value.text = rawText;
_.forEach(line.markedSpans, function (i, ms) {
var markedSpans = _.clone(line.markedSpans) || [];
markedSpans.sort(function (a, b) {
return a.from > b.from;
});
_.forEach(markedSpans, function (i, ms) {
switch (i.marker.className) {
case "fieldName":
@ -50799,7 +50804,12 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
var v = this.editor.getValue("\n", function (line) {
var rawText = line.text, value = line.text, num = 0;
value.text = rawText;
_.forEach(line.markedSpans, function (i, ms) {
var markedSpans = _.clone(line.markedSpans) || [];
markedSpans.sort(function (a, b) {
return a.from > b.from;
});
_.forEach(markedSpans, function (i, ms) {
switch (i.marker.className) {
case "fieldName":
case "error-field":
@ -54287,7 +54297,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
// 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下
this.editor.replaceSelection("\u200b" + param + "\u200b");
var to = this.editor.getCursor();
var options = {className: "param", atomic: true};
var options = {className: "param", atomic: true, replacedWith: $("<span class='param start end' />").text(param)[0]};
if (BI.isNotNull(param.match(/^<!.*!>$/))) {
options.className = "error-param";
}
@ -57559,7 +57569,7 @@ BI.SQLEditor = BI.inherit(BI.Widget, {
var from = this.editor.getCursor();
this.editor.replaceSelection(param);
var to = this.editor.getCursor();
var options = {className: "param", atomic: true};
var options = {className: "param", atomic: true, replacedWith: $("<span class='param start end' />").text(param)[0]};
options.value = value;
this.editor.markText(from, to, options);
this.editor.replaceSelection(" ");
@ -57626,7 +57636,8 @@ BI.SQLEditor = BI.inherit(BI.Widget, {
});
}
});
BI.shortcut("bi.sql_editor", BI.SQLEditor);// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
BI.shortcut("bi.sql_editor", BI.SQLEditor);
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

32
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

16
src/base/formula/formulaeditor.js

@ -137,7 +137,7 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
if (BI.isNotNull(fieldFormattedName.match("^<!.*!>$")) && !force) {
className = "error-field";
}
this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value});
this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value, replacedWith: $("<span class='" + className + " start end' />").text(showName)[0]});
this.editor.focus();
},
@ -202,7 +202,12 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
return this.editor.getValue(true, function (line) {
var rawText = line.text, value = line.text, num = 0;
value.text = rawText;
_.forEach(line.markedSpans, function (i, ms) {
var markedSpans = _.clone(line.markedSpans) || [];
markedSpans.sort(function (a, b) {
return a.from > b.from;
});
_.forEach(markedSpans, function (i, ms) {
switch (i.marker.className) {
case "fieldName":
@ -223,7 +228,12 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
var v = this.editor.getValue("\n", function (line) {
var rawText = line.text, value = line.text, num = 0;
value.text = rawText;
_.forEach(line.markedSpans, function (i, ms) {
var markedSpans = _.clone(line.markedSpans) || [];
markedSpans.sort(function (a, b) {
return a.from > b.from;
});
_.forEach(markedSpans, function (i, ms) {
switch (i.marker.className) {
case "fieldName":
case "error-field":

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

@ -124,7 +124,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
// 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下
this.editor.replaceSelection("\u200b" + param + "\u200b");
var to = this.editor.getCursor();
var options = {className: "param", atomic: true};
var options = {className: "param", atomic: true, replacedWith: $("<span class='param start end' />").text(param)[0]};
if (BI.isNotNull(param.match(/^<!.*!>$/))) {
options.className = "error-param";
}

2
src/base/sql/editor.sql.js

@ -90,7 +90,7 @@ BI.SQLEditor = BI.inherit(BI.Widget, {
var from = this.editor.getCursor();
this.editor.replaceSelection(param);
var to = this.editor.getCursor();
var options = {className: "param", atomic: true};
var options = {className: "param", atomic: true, replacedWith: $("<span class='param start end' />").text(param)[0]};
options.value = value;
this.editor.markText(from, to, options);
this.editor.replaceSelection(" ");

Loading…
Cancel
Save