Browse Source

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

master
DESKTOP-49I29QK\zsmj 6 years ago
parent
commit
9eec36826c
  1. 64
      dist/_fineui.min.js
  2. 34
      dist/base.js
  3. 38
      dist/bundle.js
  4. 46
      dist/bundle.min.js
  5. 4
      dist/case.js
  6. 38
      dist/fineui.js
  7. 64
      dist/fineui.min.js
  8. 31
      src/base/single/editor/editor.code.js
  9. 4
      src/case/richeditor/bar/action.richeditor.param.js

64
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

34
dist/base.js vendored

@ -18123,6 +18123,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
lineHeight: 2, lineHeight: 2,
readOnly: false, readOnly: false,
lineNumbers: false, lineNumbers: false,
paramMatch: true, // 用来判断是否需要在代码中匹配参数,默认为true, R语言是不需要匹配参数
// 参数显示值构造函数 // 参数显示值构造函数
paramFormatter: function (v) { paramFormatter: function (v) {
return v; return v;
@ -18135,9 +18136,9 @@ BI.CodeEditor = BI.inherit(BI.Single, {
var conf = { var conf = {
textWrapping: true, textWrapping: true,
lineWrapping: true, lineWrapping: true,
lineNumbers: false, lineNumbers: o.lineNumbers,
readOnly: o.readOnly, readOnly: o.readOnly,
//解决插入字段由括号或其他特殊字符包围时分裂的bug // 解决插入字段由括号或其他特殊字符包围时分裂的bug
specialChars: /[\u0000-\u001f\u007f\u00ad\u200c-\u200f\u2028\u2029\ufeff]/ specialChars: /[\u0000-\u001f\u007f\u00ad\u200c-\u200f\u2028\u2029\ufeff]/
}; };
o.readOnly && (conf.cursorBlinkRate = -1); o.readOnly && (conf.cursorBlinkRate = -1);
@ -18276,19 +18277,23 @@ BI.CodeEditor = BI.inherit(BI.Single, {
}, },
setValue: function (v) { setValue: function (v) {
var self = this, result; var self = this, o = this.options, result;
this.refresh(); this.refresh();
self.editor.setValue(""); self.editor.setValue("");
result = this._analyzeContent(v || ""); if(o.paramMatch) {
BI.each(result, function (i, item) { result = this._analyzeContent(v || "");
var fieldRegx = /\$[\{][^\}]*[\}]/; BI.each(result, function (i, item) {
var str = item.match(fieldRegx); var fieldRegx = /\$[\{][^\}]*[\}]/;
if (BI.isNotEmptyArray(str)) { var str = item.match(fieldRegx);
self.insertParam(str[0].substring(2, item.length - 1)); if (BI.isNotEmptyArray(str)) {
} else { self.insertParam(str[0].substring(2, item.length - 1));
self.insertString(item); } else {
} self.insertString(item);
}); }
});
}else {
self.editor.setValue(v);
}
this._checkWaterMark(); this._checkWaterMark();
}, },
@ -18319,7 +18324,8 @@ BI.CodeEditor = BI.inherit(BI.Single, {
BI.CodeEditor.EVENT_CHANGE = "EVENT_CHANGE"; BI.CodeEditor.EVENT_CHANGE = "EVENT_CHANGE";
BI.CodeEditor.EVENT_BLUR = "EVENT_BLUR"; BI.CodeEditor.EVENT_BLUR = "EVENT_BLUR";
BI.CodeEditor.EVENT_FOCUS = "EVENT_FOCUS"; BI.CodeEditor.EVENT_FOCUS = "EVENT_FOCUS";
BI.shortcut("bi.code_editor", BI.CodeEditor);/** BI.shortcut("bi.code_editor", BI.CodeEditor);
/**
* Created by GUY on 2015/4/15. * Created by GUY on 2015/4/15.
* @class BI.Editor * @class BI.Editor
* @extends BI.Single * @extends BI.Single

38
dist/bundle.js vendored

@ -53894,6 +53894,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
lineHeight: 2, lineHeight: 2,
readOnly: false, readOnly: false,
lineNumbers: false, lineNumbers: false,
paramMatch: true, // 用来判断是否需要在代码中匹配参数,默认为true, R语言是不需要匹配参数
// 参数显示值构造函数 // 参数显示值构造函数
paramFormatter: function (v) { paramFormatter: function (v) {
return v; return v;
@ -53906,9 +53907,9 @@ BI.CodeEditor = BI.inherit(BI.Single, {
var conf = { var conf = {
textWrapping: true, textWrapping: true,
lineWrapping: true, lineWrapping: true,
lineNumbers: false, lineNumbers: o.lineNumbers,
readOnly: o.readOnly, readOnly: o.readOnly,
//解决插入字段由括号或其他特殊字符包围时分裂的bug // 解决插入字段由括号或其他特殊字符包围时分裂的bug
specialChars: /[\u0000-\u001f\u007f\u00ad\u200c-\u200f\u2028\u2029\ufeff]/ specialChars: /[\u0000-\u001f\u007f\u00ad\u200c-\u200f\u2028\u2029\ufeff]/
}; };
o.readOnly && (conf.cursorBlinkRate = -1); o.readOnly && (conf.cursorBlinkRate = -1);
@ -54047,19 +54048,23 @@ BI.CodeEditor = BI.inherit(BI.Single, {
}, },
setValue: function (v) { setValue: function (v) {
var self = this, result; var self = this, o = this.options, result;
this.refresh(); this.refresh();
self.editor.setValue(""); self.editor.setValue("");
result = this._analyzeContent(v || ""); if(o.paramMatch) {
BI.each(result, function (i, item) { result = this._analyzeContent(v || "");
var fieldRegx = /\$[\{][^\}]*[\}]/; BI.each(result, function (i, item) {
var str = item.match(fieldRegx); var fieldRegx = /\$[\{][^\}]*[\}]/;
if (BI.isNotEmptyArray(str)) { var str = item.match(fieldRegx);
self.insertParam(str[0].substring(2, item.length - 1)); if (BI.isNotEmptyArray(str)) {
} else { self.insertParam(str[0].substring(2, item.length - 1));
self.insertString(item); } else {
} self.insertString(item);
}); }
});
}else {
self.editor.setValue(v);
}
this._checkWaterMark(); this._checkWaterMark();
}, },
@ -54090,7 +54095,8 @@ BI.CodeEditor = BI.inherit(BI.Single, {
BI.CodeEditor.EVENT_CHANGE = "EVENT_CHANGE"; BI.CodeEditor.EVENT_CHANGE = "EVENT_CHANGE";
BI.CodeEditor.EVENT_BLUR = "EVENT_BLUR"; BI.CodeEditor.EVENT_BLUR = "EVENT_BLUR";
BI.CodeEditor.EVENT_FOCUS = "EVENT_FOCUS"; BI.CodeEditor.EVENT_FOCUS = "EVENT_FOCUS";
BI.shortcut("bi.code_editor", BI.CodeEditor);/** BI.shortcut("bi.code_editor", BI.CodeEditor);
/**
* Created by GUY on 2015/4/15. * Created by GUY on 2015/4/15.
* @class BI.Editor * @class BI.Editor
* @extends BI.Single * @extends BI.Single
@ -83020,11 +83026,13 @@ BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
var o = this.options; var o = this.options;
var instance = o.editor.instance; var instance = o.editor.instance;
var image = new Image(); var image = new Image();
var attrs = BI.DOM.getImage(o.paramFormatter(param)); var name = o.paramFormatter(param);
var attrs = BI.DOM.getImage(name);
image.src = attrs.src; image.src = attrs.src;
image.alt = param; image.alt = param;
$(image).addClass("rich-editor-param"); $(image).addClass("rich-editor-param");
$(image).attr("style", attrs.style); $(image).attr("style", attrs.style);
$(image).attr("name", name);
this.options.editor.insertHTML($("<div>").append(image).html()); this.options.editor.insertHTML($("<div>").append(image).html());
// var sel = this._get$Sel(); // var sel = this._get$Sel();
// var wrapper = o.editor.instance.getElm().element; // var wrapper = o.editor.instance.getElm().element;

46
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

4
dist/case.js vendored

@ -10517,11 +10517,13 @@ BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
var o = this.options; var o = this.options;
var instance = o.editor.instance; var instance = o.editor.instance;
var image = new Image(); var image = new Image();
var attrs = BI.DOM.getImage(o.paramFormatter(param)); var name = o.paramFormatter(param);
var attrs = BI.DOM.getImage(name);
image.src = attrs.src; image.src = attrs.src;
image.alt = param; image.alt = param;
$(image).addClass("rich-editor-param"); $(image).addClass("rich-editor-param");
$(image).attr("style", attrs.style); $(image).attr("style", attrs.style);
$(image).attr("name", name);
this.options.editor.insertHTML($("<div>").append(image).html()); this.options.editor.insertHTML($("<div>").append(image).html());
// var sel = this._get$Sel(); // var sel = this._get$Sel();
// var wrapper = o.editor.instance.getElm().element; // var wrapper = o.editor.instance.getElm().element;

38
dist/fineui.js vendored

@ -54143,6 +54143,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
lineHeight: 2, lineHeight: 2,
readOnly: false, readOnly: false,
lineNumbers: false, lineNumbers: false,
paramMatch: true, // 用来判断是否需要在代码中匹配参数,默认为true, R语言是不需要匹配参数
// 参数显示值构造函数 // 参数显示值构造函数
paramFormatter: function (v) { paramFormatter: function (v) {
return v; return v;
@ -54155,9 +54156,9 @@ BI.CodeEditor = BI.inherit(BI.Single, {
var conf = { var conf = {
textWrapping: true, textWrapping: true,
lineWrapping: true, lineWrapping: true,
lineNumbers: false, lineNumbers: o.lineNumbers,
readOnly: o.readOnly, readOnly: o.readOnly,
//解决插入字段由括号或其他特殊字符包围时分裂的bug // 解决插入字段由括号或其他特殊字符包围时分裂的bug
specialChars: /[\u0000-\u001f\u007f\u00ad\u200c-\u200f\u2028\u2029\ufeff]/ specialChars: /[\u0000-\u001f\u007f\u00ad\u200c-\u200f\u2028\u2029\ufeff]/
}; };
o.readOnly && (conf.cursorBlinkRate = -1); o.readOnly && (conf.cursorBlinkRate = -1);
@ -54296,19 +54297,23 @@ BI.CodeEditor = BI.inherit(BI.Single, {
}, },
setValue: function (v) { setValue: function (v) {
var self = this, result; var self = this, o = this.options, result;
this.refresh(); this.refresh();
self.editor.setValue(""); self.editor.setValue("");
result = this._analyzeContent(v || ""); if(o.paramMatch) {
BI.each(result, function (i, item) { result = this._analyzeContent(v || "");
var fieldRegx = /\$[\{][^\}]*[\}]/; BI.each(result, function (i, item) {
var str = item.match(fieldRegx); var fieldRegx = /\$[\{][^\}]*[\}]/;
if (BI.isNotEmptyArray(str)) { var str = item.match(fieldRegx);
self.insertParam(str[0].substring(2, item.length - 1)); if (BI.isNotEmptyArray(str)) {
} else { self.insertParam(str[0].substring(2, item.length - 1));
self.insertString(item); } else {
} self.insertString(item);
}); }
});
}else {
self.editor.setValue(v);
}
this._checkWaterMark(); this._checkWaterMark();
}, },
@ -54339,7 +54344,8 @@ BI.CodeEditor = BI.inherit(BI.Single, {
BI.CodeEditor.EVENT_CHANGE = "EVENT_CHANGE"; BI.CodeEditor.EVENT_CHANGE = "EVENT_CHANGE";
BI.CodeEditor.EVENT_BLUR = "EVENT_BLUR"; BI.CodeEditor.EVENT_BLUR = "EVENT_BLUR";
BI.CodeEditor.EVENT_FOCUS = "EVENT_FOCUS"; BI.CodeEditor.EVENT_FOCUS = "EVENT_FOCUS";
BI.shortcut("bi.code_editor", BI.CodeEditor);/** BI.shortcut("bi.code_editor", BI.CodeEditor);
/**
* Created by GUY on 2015/4/15. * Created by GUY on 2015/4/15.
* @class BI.Editor * @class BI.Editor
* @extends BI.Single * @extends BI.Single
@ -83269,11 +83275,13 @@ BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
var o = this.options; var o = this.options;
var instance = o.editor.instance; var instance = o.editor.instance;
var image = new Image(); var image = new Image();
var attrs = BI.DOM.getImage(o.paramFormatter(param)); var name = o.paramFormatter(param);
var attrs = BI.DOM.getImage(name);
image.src = attrs.src; image.src = attrs.src;
image.alt = param; image.alt = param;
$(image).addClass("rich-editor-param"); $(image).addClass("rich-editor-param");
$(image).attr("style", attrs.style); $(image).attr("style", attrs.style);
$(image).attr("name", name);
this.options.editor.insertHTML($("<div>").append(image).html()); this.options.editor.insertHTML($("<div>").append(image).html());
// var sel = this._get$Sel(); // var sel = this._get$Sel();
// var wrapper = o.editor.instance.getElm().element; // var wrapper = o.editor.instance.getElm().element;

64
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

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

@ -13,6 +13,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
lineHeight: 2, lineHeight: 2,
readOnly: false, readOnly: false,
lineNumbers: false, lineNumbers: false,
paramMatch: true, // 用来判断是否需要在代码中匹配参数,默认为true, R语言是不需要匹配参数
// 参数显示值构造函数 // 参数显示值构造函数
paramFormatter: function (v) { paramFormatter: function (v) {
return v; return v;
@ -25,9 +26,9 @@ BI.CodeEditor = BI.inherit(BI.Single, {
var conf = { var conf = {
textWrapping: true, textWrapping: true,
lineWrapping: true, lineWrapping: true,
lineNumbers: false, lineNumbers: o.lineNumbers,
readOnly: o.readOnly, readOnly: o.readOnly,
//解决插入字段由括号或其他特殊字符包围时分裂的bug // 解决插入字段由括号或其他特殊字符包围时分裂的bug
specialChars: /[\u0000-\u001f\u007f\u00ad\u200c-\u200f\u2028\u2029\ufeff]/ specialChars: /[\u0000-\u001f\u007f\u00ad\u200c-\u200f\u2028\u2029\ufeff]/
}; };
o.readOnly && (conf.cursorBlinkRate = -1); o.readOnly && (conf.cursorBlinkRate = -1);
@ -166,19 +167,23 @@ BI.CodeEditor = BI.inherit(BI.Single, {
}, },
setValue: function (v) { setValue: function (v) {
var self = this, result; var self = this, o = this.options, result;
this.refresh(); this.refresh();
self.editor.setValue(""); self.editor.setValue("");
result = this._analyzeContent(v || ""); if(o.paramMatch) {
BI.each(result, function (i, item) { result = this._analyzeContent(v || "");
var fieldRegx = /\$[\{][^\}]*[\}]/; BI.each(result, function (i, item) {
var str = item.match(fieldRegx); var fieldRegx = /\$[\{][^\}]*[\}]/;
if (BI.isNotEmptyArray(str)) { var str = item.match(fieldRegx);
self.insertParam(str[0].substring(2, item.length - 1)); if (BI.isNotEmptyArray(str)) {
} else { self.insertParam(str[0].substring(2, item.length - 1));
self.insertString(item); } else {
} self.insertString(item);
}); }
});
}else {
self.editor.setValue(v);
}
this._checkWaterMark(); this._checkWaterMark();
}, },

4
src/case/richeditor/bar/action.richeditor.param.js

@ -45,11 +45,13 @@ BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
var o = this.options; var o = this.options;
var instance = o.editor.instance; var instance = o.editor.instance;
var image = new Image(); var image = new Image();
var attrs = BI.DOM.getImage(o.paramFormatter(param)); var name = o.paramFormatter(param);
var attrs = BI.DOM.getImage(name);
image.src = attrs.src; image.src = attrs.src;
image.alt = param; image.alt = param;
$(image).addClass("rich-editor-param"); $(image).addClass("rich-editor-param");
$(image).attr("style", attrs.style); $(image).attr("style", attrs.style);
$(image).attr("name", name);
this.options.editor.insertHTML($("<div>").append(image).html()); this.options.editor.insertHTML($("<div>").append(image).html());
// var sel = this._get$Sel(); // var sel = this._get$Sel();
// var wrapper = o.editor.instance.getElm().element; // var wrapper = o.editor.instance.getElm().element;

Loading…
Cancel
Save