windy 6 years ago
parent
commit
fe5b85becc
  1. 84
      dist/_fineui.min.js
  2. 17
      dist/base.js
  3. 21
      dist/bundle.js
  4. 30
      dist/bundle.min.js
  5. 21
      dist/fineui.js
  6. 84
      dist/fineui.min.js
  7. 5
      src/base/pane.js

84
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

17
dist/base.js vendored

@ -246,9 +246,10 @@ BI.Pane = BI.inherit(BI.Widget, {
height: 25 height: 25
}); });
BI.createWidget({ BI.createWidget({
type: "bi.absolute_center_adapt", type: "bi.vertical",
element: this, element: this,
items: [this._tipText] items: [this._tipText],
bgap: 25
}); });
} }
}, },
@ -18122,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;
@ -18134,7 +18136,7 @@ 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]/
@ -18275,9 +18277,10 @@ 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("");
if(o.paramMatch) {
result = this._analyzeContent(v || ""); result = this._analyzeContent(v || "");
BI.each(result, function (i, item) { BI.each(result, function (i, item) {
var fieldRegx = /\$[\{][^\}]*[\}]/; var fieldRegx = /\$[\{][^\}]*[\}]/;
@ -18288,6 +18291,9 @@ BI.CodeEditor = BI.inherit(BI.Single, {
self.insertString(item); self.insertString(item);
} }
}); });
}else {
self.editor.setValue(v);
}
this._checkWaterMark(); this._checkWaterMark();
}, },
@ -18318,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

21
dist/bundle.js vendored

@ -36017,9 +36017,10 @@ BI.Pane = BI.inherit(BI.Widget, {
height: 25 height: 25
}); });
BI.createWidget({ BI.createWidget({
type: "bi.absolute_center_adapt", type: "bi.vertical",
element: this, element: this,
items: [this._tipText] items: [this._tipText],
bgap: 25
}); });
} }
}, },
@ -53893,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;
@ -53905,7 +53907,7 @@ 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]/
@ -54046,9 +54048,10 @@ 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("");
if(o.paramMatch) {
result = this._analyzeContent(v || ""); result = this._analyzeContent(v || "");
BI.each(result, function (i, item) { BI.each(result, function (i, item) {
var fieldRegx = /\$[\{][^\}]*[\}]/; var fieldRegx = /\$[\{][^\}]*[\}]/;
@ -54059,6 +54062,9 @@ BI.CodeEditor = BI.inherit(BI.Single, {
self.insertString(item); self.insertString(item);
} }
}); });
}else {
self.editor.setValue(v);
}
this._checkWaterMark(); this._checkWaterMark();
}, },
@ -54089,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
@ -83019,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;

30
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

21
dist/fineui.js vendored

@ -36266,9 +36266,10 @@ BI.Pane = BI.inherit(BI.Widget, {
height: 25 height: 25
}); });
BI.createWidget({ BI.createWidget({
type: "bi.absolute_center_adapt", type: "bi.vertical",
element: this, element: this,
items: [this._tipText] items: [this._tipText],
bgap: 25
}); });
} }
}, },
@ -54142,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;
@ -54154,7 +54156,7 @@ 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]/
@ -54295,9 +54297,10 @@ 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("");
if(o.paramMatch) {
result = this._analyzeContent(v || ""); result = this._analyzeContent(v || "");
BI.each(result, function (i, item) { BI.each(result, function (i, item) {
var fieldRegx = /\$[\{][^\}]*[\}]/; var fieldRegx = /\$[\{][^\}]*[\}]/;
@ -54308,6 +54311,9 @@ BI.CodeEditor = BI.inherit(BI.Single, {
self.insertString(item); self.insertString(item);
} }
}); });
}else {
self.editor.setValue(v);
}
this._checkWaterMark(); this._checkWaterMark();
}, },
@ -54338,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
@ -83268,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;

84
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

5
src/base/pane.js

@ -41,9 +41,10 @@ BI.Pane = BI.inherit(BI.Widget, {
height: 25 height: 25
}); });
BI.createWidget({ BI.createWidget({
type: "bi.absolute_center_adapt", type: "bi.vertical",
element: this, element: this,
items: [this._tipText] items: [this._tipText],
bgap: 25
}); });
} }
}, },

Loading…
Cancel
Save