Browse Source

Merge pull request #471 in VISUAL/fineui from ~FAY/fineui:master to master

* commit 'c1e2ef1176062111e740aa09746e94e0cdf19e12':
  兼容IE8
es6
windy 6 years ago
parent
commit
3ff42b3a01
  1. 18
      dist/_fineui.min.js
  2. 13
      dist/bundle.js
  3. 6
      dist/bundle.min.js
  4. 2
      dist/case.js
  5. 11
      dist/core.js
  6. 19
      dist/fineui.js
  7. 18
      dist/fineui.min.js
  8. 6
      dist/polyfill.js
  9. 2
      src/case/richeditor/bar/texttoolbar.js
  10. 11
      src/core/func/function.js
  11. 6
      src/polyfill/lodash.js

18
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

13
dist/bundle.js vendored

@ -28716,23 +28716,24 @@ BI.extend(BI.DOM, {
getImage: function (param, fillStyle, backgroundColor) { getImage: function (param, fillStyle, backgroundColor) {
var canvas = document.createElement("canvas"); var canvas = document.createElement("canvas");
var ratio = 2;
$("body").append(canvas); $("body").append(canvas);
var w = BI.DOM.getTextSizeWidth(param, 14) + 6; var w = BI.DOM.getTextSizeWidth(param, 14) + 6;
canvas.width = w; canvas.width = w * ratio;
canvas.height = 24; canvas.height = 24 * ratio;
var ctx = canvas.getContext("2d"); var ctx = canvas.getContext("2d");
// ctx.fillStyle = "#EAF2FD"; // ctx.fillStyle = "#EAF2FD";
ctx.font = "12px Georgia"; ctx.font = 12 * ratio + "px Georgia";
ctx.fillStyle = fillStyle || "#3D4D66"; ctx.fillStyle = fillStyle || "#3D4D66";
ctx.textBaseline = "middle"; ctx.textBaseline = "middle";
ctx.fillText(param, 6, 12); ctx.fillText(param, 6 * ratio, 12 * ratio);
$(canvas).destroy(); $(canvas).destroy();
var backColor = backgroundColor || "#EAF2FD"; var backColor = backgroundColor || "#EAF2FD";
return { return {
width: w, width: w,
height: 24, height: 24,
src: canvas.toDataURL("image/png"), src: canvas.toDataURL("image/png"),
style: "background-color: " + backColor + ";vertical-align: middle; margin: 0 3px;", style: "background-color: " + backColor + ";vertical-align: middle; margin: 0 3px; width:" + w + "px;height: 24px",
param: param param: param
}; };
} }
@ -83145,7 +83146,7 @@ BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
BI.RichEditorTextToolbar = BI.inherit(BI.Widget, { BI.RichEditorTextToolbar = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.RichEditorTextToolbar.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.RichEditorTextToolbar.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-rich-editor-text-toolbar bi-background", baseCls: "bi-rich-editor-text-toolbar",
buttons: [ buttons: [
{type: "bi.rich_editor_font_chooser"}, {type: "bi.rich_editor_font_chooser"},
{type: "bi.rich_editor_size_chooser"}, {type: "bi.rich_editor_size_chooser"},

6
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/case.js vendored

@ -10646,7 +10646,7 @@ BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
BI.RichEditorTextToolbar = BI.inherit(BI.Widget, { BI.RichEditorTextToolbar = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.RichEditorTextToolbar.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.RichEditorTextToolbar.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-rich-editor-text-toolbar bi-background", baseCls: "bi-rich-editor-text-toolbar",
buttons: [ buttons: [
{type: "bi.rich_editor_font_chooser"}, {type: "bi.rich_editor_font_chooser"},
{type: "bi.rich_editor_size_chooser"}, {type: "bi.rich_editor_size_chooser"},

11
dist/core.js vendored

@ -28716,23 +28716,24 @@ BI.extend(BI.DOM, {
getImage: function (param, fillStyle, backgroundColor) { getImage: function (param, fillStyle, backgroundColor) {
var canvas = document.createElement("canvas"); var canvas = document.createElement("canvas");
var ratio = 2;
$("body").append(canvas); $("body").append(canvas);
var w = BI.DOM.getTextSizeWidth(param, 14) + 6; var w = BI.DOM.getTextSizeWidth(param, 14) + 6;
canvas.width = w; canvas.width = w * ratio;
canvas.height = 24; canvas.height = 24 * ratio;
var ctx = canvas.getContext("2d"); var ctx = canvas.getContext("2d");
// ctx.fillStyle = "#EAF2FD"; // ctx.fillStyle = "#EAF2FD";
ctx.font = "12px Georgia"; ctx.font = 12 * ratio + "px Georgia";
ctx.fillStyle = fillStyle || "#3D4D66"; ctx.fillStyle = fillStyle || "#3D4D66";
ctx.textBaseline = "middle"; ctx.textBaseline = "middle";
ctx.fillText(param, 6, 12); ctx.fillText(param, 6 * ratio, 12 * ratio);
$(canvas).destroy(); $(canvas).destroy();
var backColor = backgroundColor || "#EAF2FD"; var backColor = backgroundColor || "#EAF2FD";
return { return {
width: w, width: w,
height: 24, height: 24,
src: canvas.toDataURL("image/png"), src: canvas.toDataURL("image/png"),
style: "background-color: " + backColor + ";vertical-align: middle; margin: 0 3px;", style: "background-color: " + backColor + ";vertical-align: middle; margin: 0 3px; width:" + w + "px;height: 24px",
param: param param: param
}; };
} }

19
dist/fineui.js vendored

@ -196,6 +196,12 @@ if (typeof Object.getPrototypeOf !== "function") {
// May break if the constructor has been tampered with // May break if the constructor has been tampered with
return object.constructor.prototype; return object.constructor.prototype;
}; };
}
if(!Date.now) {
Date.now = function () {
return new Date().valueOf();
};
}if (typeof Set !== "undefined" && Set.toString().match(/native code/)) { }if (typeof Set !== "undefined" && Set.toString().match(/native code/)) {
} else { } else {
@ -28959,23 +28965,24 @@ BI.extend(BI.DOM, {
getImage: function (param, fillStyle, backgroundColor) { getImage: function (param, fillStyle, backgroundColor) {
var canvas = document.createElement("canvas"); var canvas = document.createElement("canvas");
var ratio = 2;
$("body").append(canvas); $("body").append(canvas);
var w = BI.DOM.getTextSizeWidth(param, 14) + 6; var w = BI.DOM.getTextSizeWidth(param, 14) + 6;
canvas.width = w; canvas.width = w * ratio;
canvas.height = 24; canvas.height = 24 * ratio;
var ctx = canvas.getContext("2d"); var ctx = canvas.getContext("2d");
// ctx.fillStyle = "#EAF2FD"; // ctx.fillStyle = "#EAF2FD";
ctx.font = "12px Georgia"; ctx.font = 12 * ratio + "px Georgia";
ctx.fillStyle = fillStyle || "#3D4D66"; ctx.fillStyle = fillStyle || "#3D4D66";
ctx.textBaseline = "middle"; ctx.textBaseline = "middle";
ctx.fillText(param, 6, 12); ctx.fillText(param, 6 * ratio, 12 * ratio);
$(canvas).destroy(); $(canvas).destroy();
var backColor = backgroundColor || "#EAF2FD"; var backColor = backgroundColor || "#EAF2FD";
return { return {
width: w, width: w,
height: 24, height: 24,
src: canvas.toDataURL("image/png"), src: canvas.toDataURL("image/png"),
style: "background-color: " + backColor + ";vertical-align: middle; margin: 0 3px;", style: "background-color: " + backColor + ";vertical-align: middle; margin: 0 3px; width:" + w + "px;height: 24px",
param: param param: param
}; };
} }
@ -83388,7 +83395,7 @@ BI.RichEditorParamAction = BI.inherit(BI.RichEditorAction, {
BI.RichEditorTextToolbar = BI.inherit(BI.Widget, { BI.RichEditorTextToolbar = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.RichEditorTextToolbar.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.RichEditorTextToolbar.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-rich-editor-text-toolbar bi-background", baseCls: "bi-rich-editor-text-toolbar",
buttons: [ buttons: [
{type: "bi.rich_editor_font_chooser"}, {type: "bi.rich_editor_font_chooser"},
{type: "bi.rich_editor_size_chooser"}, {type: "bi.rich_editor_size_chooser"},

18
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

6
dist/polyfill.js vendored

@ -196,6 +196,12 @@ if (typeof Object.getPrototypeOf !== "function") {
// May break if the constructor has been tampered with // May break if the constructor has been tampered with
return object.constructor.prototype; return object.constructor.prototype;
}; };
}
if(!Date.now) {
Date.now = function () {
return new Date().valueOf();
};
}if (typeof Set !== "undefined" && Set.toString().match(/native code/)) { }if (typeof Set !== "undefined" && Set.toString().match(/native code/)) {
} else { } else {

2
src/case/richeditor/bar/texttoolbar.js

@ -8,7 +8,7 @@
BI.RichEditorTextToolbar = BI.inherit(BI.Widget, { BI.RichEditorTextToolbar = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.RichEditorTextToolbar.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.RichEditorTextToolbar.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-rich-editor-text-toolbar bi-background", baseCls: "bi-rich-editor-text-toolbar",
buttons: [ buttons: [
{type: "bi.rich_editor_font_chooser"}, {type: "bi.rich_editor_font_chooser"},
{type: "bi.rich_editor_size_chooser"}, {type: "bi.rich_editor_size_chooser"},

11
src/core/func/function.js

@ -302,23 +302,24 @@ BI.extend(BI.DOM, {
getImage: function (param, fillStyle, backgroundColor) { getImage: function (param, fillStyle, backgroundColor) {
var canvas = document.createElement("canvas"); var canvas = document.createElement("canvas");
var ratio = 2;
$("body").append(canvas); $("body").append(canvas);
var w = BI.DOM.getTextSizeWidth(param, 14) + 6; var w = BI.DOM.getTextSizeWidth(param, 14) + 6;
canvas.width = w; canvas.width = w * ratio;
canvas.height = 24; canvas.height = 24 * ratio;
var ctx = canvas.getContext("2d"); var ctx = canvas.getContext("2d");
// ctx.fillStyle = "#EAF2FD"; // ctx.fillStyle = "#EAF2FD";
ctx.font = "12px Georgia"; ctx.font = 12 * ratio + "px Georgia";
ctx.fillStyle = fillStyle || "#3D4D66"; ctx.fillStyle = fillStyle || "#3D4D66";
ctx.textBaseline = "middle"; ctx.textBaseline = "middle";
ctx.fillText(param, 6, 12); ctx.fillText(param, 6 * ratio, 12 * ratio);
$(canvas).destroy(); $(canvas).destroy();
var backColor = backgroundColor || "#EAF2FD"; var backColor = backgroundColor || "#EAF2FD";
return { return {
width: w, width: w,
height: 24, height: 24,
src: canvas.toDataURL("image/png"), src: canvas.toDataURL("image/png"),
style: "background-color: " + backColor + ";vertical-align: middle; margin: 0 3px;", style: "background-color: " + backColor + ";vertical-align: middle; margin: 0 3px; width:" + w + "px;height: 24px",
param: param param: param
}; };
} }

6
src/polyfill/lodash.js

@ -40,4 +40,10 @@ if (typeof Object.getPrototypeOf !== "function") {
// May break if the constructor has been tampered with // May break if the constructor has been tampered with
return object.constructor.prototype; return object.constructor.prototype;
}; };
}
if(!Date.now) {
Date.now = function () {
return new Date().valueOf();
};
} }
Loading…
Cancel
Save