From 18f5138a85d42a519043f84bc5474db9c634f991 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Wed, 8 Aug 2018 11:20:39 +0800 Subject: [PATCH] =?UTF-8?q?BI-29639=20&&=20BI-24431=20FineUI=E4=B8=AD?= =?UTF-8?q?=E9=9C=80=E8=A6=81encodeURIComponent=E9=9C=80=E8=A6=81=E5=AF=B9?= =?UTF-8?q?=E7=89=B9=E6=AE=8A=E5=AD=97=E7=AC=A6=E7=BC=96=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/base.css | 2 + dist/base.js | 59 ++++++++---------- dist/bundle.css | 4 +- dist/bundle.js | 78 ++++++++++++++---------- dist/core.css | 2 +- dist/core.js | 19 ++++++ dist/core_without_normalize.css | 2 +- dist/fineui.css | 4 +- dist/fineui.js | 78 ++++++++++++++---------- dist/utils.js | 19 ++++++ src/base/layer/layer.popover.js | 59 ++++++++---------- src/core/alias.js | 19 ++++++ src/css/base/foundation/bi.css | 2 + src/css/core/utils/common.css | 2 +- src/less/base/foundation/bi.message.less | 2 + src/less/core/utils/common.less | 2 +- 16 files changed, 219 insertions(+), 134 deletions(-) diff --git a/dist/base.css b/dist/base.css index 495f20c6c..9e9c67135 100644 --- a/dist/base.css +++ b/dist/base.css @@ -1034,6 +1034,8 @@ li.CodeMirror-hint-active { .bi-message-title { font-size: 14px; cursor: pointer; + background-color: #F2F4F7; + color: #3d4d66; } .bi-message-text { font-size: 16px; diff --git a/dist/base.js b/dist/base.js index 98f27236a..f8dfc9e5e 100644 --- a/dist/base.js +++ b/dist/base.js @@ -15409,44 +15409,39 @@ BI.Popover = BI.inherit(BI.Widget, { var items = { north: { el: { - type: "bi.border", + type: "bi.htape", cls: "bi-message-title bi-background", ref: function (_ref) { self.dragger = _ref; }, - items: { - center: { - el: { - type: "bi.absolute", - items: [{ - el: BI.isPlainObject(o.header) ? BI.createWidget(o.header, { - extraCls: "bi-font-bold" - }) : { - type: "bi.label", - cls: "bi-font-bold", - height: this._constant.HEADER_HEIGHT, - text: o.header, - textAlign: "left" - }, - left: 20, - top: 0, - right: 0, - bottom: 0 - }] - } - }, - east: { - el: { - type: "bi.icon_button", - cls: "bi-message-close close-font", + items: [{ + type: "bi.absolute", + items: [{ + el: BI.isPlainObject(o.header) ? BI.createWidget(o.header, { + extraCls: "bi-font-bold" + }) : { + type: "bi.label", + cls: "bi-font-bold", height: this._constant.HEADER_HEIGHT, - handler: function () { - self.close(); - } + text: o.header, + textAlign: "left" }, - width: 60 - } - } + left: 20, + top: 0, + right: 0, + bottom: 0 + }] + }, { + el: { + type: "bi.icon_button", + cls: "bi-message-close close-font", + height: this._constant.HEADER_HEIGHT, + handler: function () { + self.close(); + } + }, + width: 56 + }] }, height: this._constant.HEADER_HEIGHT }, diff --git a/dist/bundle.css b/dist/bundle.css index 3bc303d9f..0085c8887 100644 --- a/dist/bundle.css +++ b/dist/bundle.css @@ -408,7 +408,7 @@ textarea { border-radius: 2px; } .bi-font-bold { - font-weight: 600; + font-weight: 700; } .bi-theme-dark .bi-border { border: 1px solid #3a3c53; @@ -2887,6 +2887,8 @@ li.CodeMirror-hint-active { .bi-message-title { font-size: 14px; cursor: pointer; + background-color: #F2F4F7; + color: #3d4d66; } .bi-message-text { font-size: 16px; diff --git a/dist/bundle.js b/dist/bundle.js index bb9372981..895403061 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -26331,6 +26331,25 @@ BI.ShowAction = BI.inherit(BI.Action, { })(jo); }; + BI.encodeURIComponent = function (url) { + BI.specialCharsMap = BI.specialCharsMap || {}; + url = url.replaceAll(BI.keys(BI.specialCharsMap || []).join("|"), function (str) { + return BI.specialCharsMap[str] || str; + }); + return window.encodeURIComponent(url); + }; + + BI.decodeURIComponent = function (url) { + var reserveSpecialCharsMap = {}; + BI.each(BI.specialCharsMap, function (initialChar, encodeChar) { + reserveSpecialCharsMap[encodeChar] = initialChar; + }); + url = url.replaceAll(BI.keys(reserveSpecialCharsMap || []).join("|"), function (str) { + return reserveSpecialCharsMap[str] || str; + }); + return window.decodeURIComponent(url); + }; + BI.contentFormat = function (cv, fmt) { if (isEmpty(cv)) { // 原值为空,返回空字符 @@ -51420,44 +51439,39 @@ BI.Popover = BI.inherit(BI.Widget, { var items = { north: { el: { - type: "bi.border", + type: "bi.htape", cls: "bi-message-title bi-background", ref: function (_ref) { self.dragger = _ref; }, - items: { - center: { - el: { - type: "bi.absolute", - items: [{ - el: BI.isPlainObject(o.header) ? BI.createWidget(o.header, { - extraCls: "bi-font-bold" - }) : { - type: "bi.label", - cls: "bi-font-bold", - height: this._constant.HEADER_HEIGHT, - text: o.header, - textAlign: "left" - }, - left: 20, - top: 0, - right: 0, - bottom: 0 - }] - } - }, - east: { - el: { - type: "bi.icon_button", - cls: "bi-message-close close-font", + items: [{ + type: "bi.absolute", + items: [{ + el: BI.isPlainObject(o.header) ? BI.createWidget(o.header, { + extraCls: "bi-font-bold" + }) : { + type: "bi.label", + cls: "bi-font-bold", height: this._constant.HEADER_HEIGHT, - handler: function () { - self.close(); - } + text: o.header, + textAlign: "left" }, - width: 60 - } - } + left: 20, + top: 0, + right: 0, + bottom: 0 + }] + }, { + el: { + type: "bi.icon_button", + cls: "bi-message-close close-font", + height: this._constant.HEADER_HEIGHT, + handler: function () { + self.close(); + } + }, + width: 56 + }] }, height: this._constant.HEADER_HEIGHT }, diff --git a/dist/core.css b/dist/core.css index f2f6da376..84ce558d3 100644 --- a/dist/core.css +++ b/dist/core.css @@ -408,7 +408,7 @@ textarea { border-radius: 2px; } .bi-font-bold { - font-weight: 600; + font-weight: 700; } .bi-theme-dark .bi-border { border: 1px solid #3a3c53; diff --git a/dist/core.js b/dist/core.js index 2f9c79fb2..1d717982c 100644 --- a/dist/core.js +++ b/dist/core.js @@ -26331,6 +26331,25 @@ BI.ShowAction = BI.inherit(BI.Action, { })(jo); }; + BI.encodeURIComponent = function (url) { + BI.specialCharsMap = BI.specialCharsMap || {}; + url = url.replaceAll(BI.keys(BI.specialCharsMap || []).join("|"), function (str) { + return BI.specialCharsMap[str] || str; + }); + return window.encodeURIComponent(url); + }; + + BI.decodeURIComponent = function (url) { + var reserveSpecialCharsMap = {}; + BI.each(BI.specialCharsMap, function (initialChar, encodeChar) { + reserveSpecialCharsMap[encodeChar] = initialChar; + }); + url = url.replaceAll(BI.keys(reserveSpecialCharsMap || []).join("|"), function (str) { + return reserveSpecialCharsMap[str] || str; + }); + return window.decodeURIComponent(url); + }; + BI.contentFormat = function (cv, fmt) { if (isEmpty(cv)) { // 原值为空,返回空字符 diff --git a/dist/core_without_normalize.css b/dist/core_without_normalize.css index c0b09ff36..a2c461eac 100644 --- a/dist/core_without_normalize.css +++ b/dist/core_without_normalize.css @@ -127,7 +127,7 @@ textarea { border-radius: 2px; } .bi-font-bold { - font-weight: 600; + font-weight: 700; } .bi-theme-dark .bi-border { border: 1px solid #3a3c53; diff --git a/dist/fineui.css b/dist/fineui.css index e5f138a70..4a9710677 100644 --- a/dist/fineui.css +++ b/dist/fineui.css @@ -408,7 +408,7 @@ textarea { border-radius: 2px; } .bi-font-bold { - font-weight: 600; + font-weight: 700; } .bi-theme-dark .bi-border { border: 1px solid #3a3c53; @@ -2887,6 +2887,8 @@ li.CodeMirror-hint-active { .bi-message-title { font-size: 14px; cursor: pointer; + background-color: #F2F4F7; + color: #3d4d66; } .bi-message-text { font-size: 16px; diff --git a/dist/fineui.js b/dist/fineui.js index 168b817dd..2ba5f4a74 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -26552,6 +26552,25 @@ BI.ShowAction = BI.inherit(BI.Action, { })(jo); }; + BI.encodeURIComponent = function (url) { + BI.specialCharsMap = BI.specialCharsMap || {}; + url = url.replaceAll(BI.keys(BI.specialCharsMap || []).join("|"), function (str) { + return BI.specialCharsMap[str] || str; + }); + return window.encodeURIComponent(url); + }; + + BI.decodeURIComponent = function (url) { + var reserveSpecialCharsMap = {}; + BI.each(BI.specialCharsMap, function (initialChar, encodeChar) { + reserveSpecialCharsMap[encodeChar] = initialChar; + }); + url = url.replaceAll(BI.keys(reserveSpecialCharsMap || []).join("|"), function (str) { + return reserveSpecialCharsMap[str] || str; + }); + return window.decodeURIComponent(url); + }; + BI.contentFormat = function (cv, fmt) { if (isEmpty(cv)) { // 原值为空,返回空字符 @@ -51641,44 +51660,39 @@ BI.Popover = BI.inherit(BI.Widget, { var items = { north: { el: { - type: "bi.border", + type: "bi.htape", cls: "bi-message-title bi-background", ref: function (_ref) { self.dragger = _ref; }, - items: { - center: { - el: { - type: "bi.absolute", - items: [{ - el: BI.isPlainObject(o.header) ? BI.createWidget(o.header, { - extraCls: "bi-font-bold" - }) : { - type: "bi.label", - cls: "bi-font-bold", - height: this._constant.HEADER_HEIGHT, - text: o.header, - textAlign: "left" - }, - left: 20, - top: 0, - right: 0, - bottom: 0 - }] - } - }, - east: { - el: { - type: "bi.icon_button", - cls: "bi-message-close close-font", + items: [{ + type: "bi.absolute", + items: [{ + el: BI.isPlainObject(o.header) ? BI.createWidget(o.header, { + extraCls: "bi-font-bold" + }) : { + type: "bi.label", + cls: "bi-font-bold", height: this._constant.HEADER_HEIGHT, - handler: function () { - self.close(); - } + text: o.header, + textAlign: "left" }, - width: 60 - } - } + left: 20, + top: 0, + right: 0, + bottom: 0 + }] + }, { + el: { + type: "bi.icon_button", + cls: "bi-message-close close-font", + height: this._constant.HEADER_HEIGHT, + handler: function () { + self.close(); + } + }, + width: 56 + }] }, height: this._constant.HEADER_HEIGHT }, diff --git a/dist/utils.js b/dist/utils.js index e02e064dd..ffa80849d 100644 --- a/dist/utils.js +++ b/dist/utils.js @@ -13136,6 +13136,25 @@ _.extend(BI.OB.prototype, { })(jo); }; + BI.encodeURIComponent = function (url) { + BI.specialCharsMap = BI.specialCharsMap || {}; + url = url.replaceAll(BI.keys(BI.specialCharsMap || []).join("|"), function (str) { + return BI.specialCharsMap[str] || str; + }); + return window.encodeURIComponent(url); + }; + + BI.decodeURIComponent = function (url) { + var reserveSpecialCharsMap = {}; + BI.each(BI.specialCharsMap, function (initialChar, encodeChar) { + reserveSpecialCharsMap[encodeChar] = initialChar; + }); + url = url.replaceAll(BI.keys(reserveSpecialCharsMap || []).join("|"), function (str) { + return reserveSpecialCharsMap[str] || str; + }); + return window.decodeURIComponent(url); + }; + BI.contentFormat = function (cv, fmt) { if (isEmpty(cv)) { // 原值为空,返回空字符 diff --git a/src/base/layer/layer.popover.js b/src/base/layer/layer.popover.js index bf0a12adb..13e932315 100644 --- a/src/base/layer/layer.popover.js +++ b/src/base/layer/layer.popover.js @@ -45,44 +45,39 @@ BI.Popover = BI.inherit(BI.Widget, { var items = { north: { el: { - type: "bi.border", + type: "bi.htape", cls: "bi-message-title bi-background", ref: function (_ref) { self.dragger = _ref; }, - items: { - center: { - el: { - type: "bi.absolute", - items: [{ - el: BI.isPlainObject(o.header) ? BI.createWidget(o.header, { - extraCls: "bi-font-bold" - }) : { - type: "bi.label", - cls: "bi-font-bold", - height: this._constant.HEADER_HEIGHT, - text: o.header, - textAlign: "left" - }, - left: 20, - top: 0, - right: 0, - bottom: 0 - }] - } - }, - east: { - el: { - type: "bi.icon_button", - cls: "bi-message-close close-font", + items: [{ + type: "bi.absolute", + items: [{ + el: BI.isPlainObject(o.header) ? BI.createWidget(o.header, { + extraCls: "bi-font-bold" + }) : { + type: "bi.label", + cls: "bi-font-bold", height: this._constant.HEADER_HEIGHT, - handler: function () { - self.close(); - } + text: o.header, + textAlign: "left" }, - width: 60 - } - } + left: 20, + top: 0, + right: 0, + bottom: 0 + }] + }, { + el: { + type: "bi.icon_button", + cls: "bi-message-close close-font", + height: this._constant.HEADER_HEIGHT, + handler: function () { + self.close(); + } + }, + width: 56 + }] }, height: this._constant.HEADER_HEIGHT }, diff --git a/src/core/alias.js b/src/core/alias.js index e92ef56e1..22bb95dca 100644 --- a/src/core/alias.js +++ b/src/core/alias.js @@ -575,6 +575,25 @@ })(jo); }; + BI.encodeURIComponent = function (url) { + BI.specialCharsMap = BI.specialCharsMap || {}; + url = url.replaceAll(BI.keys(BI.specialCharsMap || []).join("|"), function (str) { + return BI.specialCharsMap[str] || str; + }); + return window.encodeURIComponent(url); + }; + + BI.decodeURIComponent = function (url) { + var reserveSpecialCharsMap = {}; + BI.each(BI.specialCharsMap, function (initialChar, encodeChar) { + reserveSpecialCharsMap[encodeChar] = initialChar; + }); + url = url.replaceAll(BI.keys(reserveSpecialCharsMap || []).join("|"), function (str) { + return reserveSpecialCharsMap[str] || str; + }); + return window.decodeURIComponent(url); + }; + BI.contentFormat = function (cv, fmt) { if (isEmpty(cv)) { // 原值为空,返回空字符 diff --git a/src/css/base/foundation/bi.css b/src/css/base/foundation/bi.css index fb0c4433f..40625ae6f 100644 --- a/src/css/base/foundation/bi.css +++ b/src/css/base/foundation/bi.css @@ -1,6 +1,8 @@ .bi-message-title { font-size: 14px; cursor: pointer; + background-color: #F2F4F7; + color: #3d4d66; } .bi-message-text { font-size: 16px; diff --git a/src/css/core/utils/common.css b/src/css/core/utils/common.css index b58abae2c..d94a91e79 100644 --- a/src/css/core/utils/common.css +++ b/src/css/core/utils/common.css @@ -127,7 +127,7 @@ textarea { border-radius: 2px; } .bi-font-bold { - font-weight: 600; + font-weight: 700; } .bi-theme-dark .bi-border { border: 1px solid #3a3c53; diff --git a/src/less/base/foundation/bi.message.less b/src/less/base/foundation/bi.message.less index 5da4a752c..46ec73890 100644 --- a/src/less/base/foundation/bi.message.less +++ b/src/less/base/foundation/bi.message.less @@ -3,6 +3,8 @@ .bi-message-title { font-size: 14px; cursor: pointer; + background-color: @color-bi-background-light-gray; + color: @color-bi-text-normal; } .bi-message-text { diff --git a/src/less/core/utils/common.less b/src/less/core/utils/common.less index a18e6c925..affad94f5 100644 --- a/src/less/core/utils/common.less +++ b/src/less/core/utils/common.less @@ -148,7 +148,7 @@ textarea { } .bi-font-bold { - font-weight: 600; + font-weight: 700; } .bi-theme-dark {