Browse Source

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

master
windy 7 years ago
parent
commit
25a6573f49
  1. 13
      dist/base.js
  2. 13
      dist/bundle.js
  3. 14
      dist/bundle.min.js
  4. 13
      dist/fineui.js
  5. 13
      dist/fineui.min.js
  6. 13
      src/base/formula/formulaeditor.js

13
dist/base.js vendored

@ -14643,20 +14643,21 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
/**
* 添加字段
* @param field
* @param fieldName
* @param fieldId
*/
insertField: function (field) {
var value = this.options.fieldTextValueMap[field];
var fieldId = this.options.paramFormatter(field);
insertField: function (fieldName, fieldId) {
var value = this.options.fieldTextValueMap[fieldName] || fieldId;
var fieldFormattedName = this.options.paramFormatter(fieldName);
var from = this.editor.getCursor();
// 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下
var showName = fieldId.replaceAll(/^<!.*!>$/, function (str) {
var showName = BI.isNull(fieldFormattedName) ? "undefined" : fieldFormattedName.replaceAll(/^<!.*!>$/, function (str) {
return str.substring(2, str.length - 2);
});
this.editor.replaceSelection("\u200b" + showName + "\u200b");
var to = this.editor.getCursor();
var className = "fieldName";
if (BI.isNotNull(fieldId.match(/^<!.*!>$/))) {
if (BI.isNotNull(fieldFormattedName.match(/^<!.*!>$/))) {
className = "error-field";
}
this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value});

13
dist/bundle.js vendored

@ -50414,20 +50414,21 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
/**
* 添加字段
* @param field
* @param fieldName
* @param fieldId
*/
insertField: function (field) {
var value = this.options.fieldTextValueMap[field];
var fieldId = this.options.paramFormatter(field);
insertField: function (fieldName, fieldId) {
var value = this.options.fieldTextValueMap[fieldName] || fieldId;
var fieldFormattedName = this.options.paramFormatter(fieldName);
var from = this.editor.getCursor();
// 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下
var showName = fieldId.replaceAll(/^<!.*!>$/, function (str) {
var showName = BI.isNull(fieldFormattedName) ? "undefined" : fieldFormattedName.replaceAll(/^<!.*!>$/, function (str) {
return str.substring(2, str.length - 2);
});
this.editor.replaceSelection("\u200b" + showName + "\u200b");
var to = this.editor.getCursor();
var className = "fieldName";
if (BI.isNotNull(fieldId.match(/^<!.*!>$/))) {
if (BI.isNotNull(fieldFormattedName.match(/^<!.*!>$/))) {
className = "error-field";
}
this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value});

14
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

13
dist/fineui.js vendored

@ -50663,20 +50663,21 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
/**
* 添加字段
* @param field
* @param fieldName
* @param fieldId
*/
insertField: function (field) {
var value = this.options.fieldTextValueMap[field];
var fieldId = this.options.paramFormatter(field);
insertField: function (fieldName, fieldId) {
var value = this.options.fieldTextValueMap[fieldName] || fieldId;
var fieldFormattedName = this.options.paramFormatter(fieldName);
var from = this.editor.getCursor();
// 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下
var showName = fieldId.replaceAll(/^<!.*!>$/, function (str) {
var showName = BI.isNull(fieldFormattedName) ? "undefined" : fieldFormattedName.replaceAll(/^<!.*!>$/, function (str) {
return str.substring(2, str.length - 2);
});
this.editor.replaceSelection("\u200b" + showName + "\u200b");
var to = this.editor.getCursor();
var className = "fieldName";
if (BI.isNotNull(fieldId.match(/^<!.*!>$/))) {
if (BI.isNotNull(fieldFormattedName.match(/^<!.*!>$/))) {
className = "error-field";
}
this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value});

13
dist/fineui.min.js vendored

@ -174,20 +174,21 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
/**
* 添加字段
* @param field
* @param fieldName
* @param fieldId
*/
insertField: function (field) {
var value = this.options.fieldTextValueMap[field];
var fieldId = this.options.paramFormatter(field);
insertField: function (fieldName, fieldId) {
var value = this.options.fieldTextValueMap[fieldName] || fieldId;
var fieldFormattedName = this.options.paramFormatter(fieldName);
var from = this.editor.getCursor();
// 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下
var showName = fieldId.replaceAll(/^<!.*!>$/, function (str) {
var showName = BI.isNull(fieldFormattedName) ? "undefined" : fieldFormattedName.replaceAll(/^<!.*!>$/, function (str) {
return str.substring(2, str.length - 2);
});
this.editor.replaceSelection("\u200b" + showName + "\u200b");
var to = this.editor.getCursor();
var className = "fieldName";
if (BI.isNotNull(fieldId.match(/^<!.*!>$/))) {
if (BI.isNotNull(fieldFormattedName.match(/^<!.*!>$/))) {
className = "error-field";
}
this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value});

13
src/base/formula/formulaeditor.js

@ -120,20 +120,21 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
/**
* 添加字段
* @param field
* @param fieldName
* @param fieldId
*/
insertField: function (field) {
var value = this.options.fieldTextValueMap[field];
var fieldId = this.options.paramFormatter(field);
insertField: function (fieldName, fieldId) {
var value = this.options.fieldTextValueMap[fieldName] || fieldId;
var fieldFormattedName = this.options.paramFormatter(fieldName);
var from = this.editor.getCursor();
// 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下
var showName = fieldId.replaceAll(/^<!.*!>$/, function (str) {
var showName = BI.isNull(fieldFormattedName) ? "undefined" : fieldFormattedName.replaceAll(/^<!.*!>$/, function (str) {
return str.substring(2, str.length - 2);
});
this.editor.replaceSelection("\u200b" + showName + "\u200b");
var to = this.editor.getCursor();
var className = "fieldName";
if (BI.isNotNull(fieldId.match(/^<!.*!>$/))) {
if (BI.isNotNull(fieldFormattedName.match(/^<!.*!>$/))) {
className = "error-field";
}
this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value});

Loading…
Cancel
Save