From 73815c41e45c4e43dbb7213e3c4d8422498bb051 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 24 Aug 2018 10:06:02 +0800 Subject: [PATCH] =?UTF-8?q?jquery=E5=8F=98=E6=88=90=E4=B8=80=E7=A7=8D?= =?UTF-8?q?=E6=B8=B2=E6=9F=93=E5=BC=95=E6=93=8E=E5=8F=AF=E4=BB=A5=E8=A2=AB?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=E8=BF=9Bfineui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/base.js | 34 ++++---- dist/bundle.js | 87 +++++++++++-------- dist/core.js | 53 +++++++---- dist/fineui.js | 87 +++++++++++-------- dist/fineui_without_jquery_polyfill.js | 85 ++++++++++-------- src/base/foundation/message.js | 6 +- src/base/layer/layer.popover.js | 2 +- src/base/single/button/button.basic.js | 12 +-- src/base/single/editor/editor.textarea.js | 6 +- src/base/single/iframe/iframe.js | 2 +- src/base/single/img/img.js | 2 +- src/base/single/input/file.js | 2 +- src/base/single/single.js | 2 +- src/core/controller/controller.layer.js | 2 +- src/core/controller/controller.popover.js | 2 +- src/core/controller/controller.resizer.js | 2 +- src/core/controller/controller.tooltips.js | 4 +- src/core/widget.js | 19 +++- src/core/wrapper/layout/adapt/adapt.center.js | 4 +- .../wrapper/layout/adapt/adapt.horizontal.js | 4 +- .../wrapper/layout/adapt/adapt.vertical.js | 4 +- .../flex/wrapper/flex.wrapper.center.js | 2 +- .../flex/wrapper/flex.wrapper.horizontal.js | 2 +- .../wrapper/flex.wrapper.vertical.center.js | 2 +- src/core/wrapper/layout/layout.horizontal.js | 4 +- src/core/wrapper/layout/layout.td.js | 2 +- 26 files changed, 254 insertions(+), 179 deletions(-) diff --git a/dist/base.js b/dist/base.js index 681d77f9a..ca59c8442 100644 --- a/dist/base.js +++ b/dist/base.js @@ -420,7 +420,7 @@ BI.Single = BI.inherit(BI.Widget, { clearTimeout(this.timeout); } this._hideTooltip(); - $(this.element).unbind("mouseenter.title" + this.getName()) + this.element.unbind("mouseenter.title" + this.getName()) .unbind("mousemove.title" + this.getName()) .unbind("mouseleave.title" + this.getName()); this._hoverBinded = false; @@ -736,14 +736,14 @@ BI.BasicButton = BI.inherit(BI.Single, { var selected = false; hand.mousedown(function (e) { // if (e.button === 0) { - $(document).bind("mouseup." + self.getName(), function (e) { + BI.Widget._renderEngine.createElement(document).bind("mouseup." + self.getName(), function (e) { // if (e.button === 0) { if (BI.DOM.isExist(self) && !hand.__isMouseInBounds__(e) && mouseDown === true && !selected) { // self.setSelected(!self.isSelected()); self._trigger(); } mouseDown = false; - $(document).unbind("mouseup." + self.getName()); + BI.Widget._renderEngine.createElement(document).unbind("mouseup." + self.getName()); // } }); if (mouseDown === true) { @@ -765,7 +765,7 @@ BI.BasicButton = BI.inherit(BI.Single, { } mouseDown = false; selected = false; - $(document).unbind("mouseup." + self.getName()); + BI.Widget._renderEngine.createElement(document).unbind("mouseup." + self.getName()); // } }); break; @@ -776,11 +776,11 @@ BI.BasicButton = BI.inherit(BI.Single, { var mouseDown = false; var interval; hand.mousedown(function (e) { - $(document).bind("mouseup." + self.getName(), function (e) { + BI.Widget._renderEngine.createElement(document).bind("mouseup." + self.getName(), function (e) { interval && clearInterval(interval); interval = null; mouseDown = false; - $(document).unbind("mouseup." + self.getName()); + BI.Widget._renderEngine.createElement(document).unbind("mouseup." + self.getName()); }); if (mouseDown === true) { return; @@ -1010,7 +1010,7 @@ BI.BasicButton = BI.inherit(BI.Single, { }, empty: function () { - $(document).unbind("mouseup." + this.getName()); + BI.Widget._renderEngine.createElement(document).unbind("mouseup." + this.getName()); BI.BasicButton.superclass.empty.apply(this, arguments); }, @@ -5093,7 +5093,7 @@ BI.Msg = function () { }, toast: function (message, options, context) { options = options || {}; - context = context || $("body"); + context = context || BI.Widget._renderEngine.createElement("body"); var level = options.level || "normal"; var autoClose = BI.isNull(options.autoClose) ? true : options.autoClose; var toast = BI.createWidget({ @@ -5123,7 +5123,7 @@ BI.Msg = function () { }, 5000); }, _show: function (hasCancel, title, message, callback) { - $mask = $("
").css({ + $mask = BI.Widget._renderEngine.createElement("
").css({ position: "absolute", zIndex: BI.zIndex_tip - 2, top: 0, @@ -5132,7 +5132,7 @@ BI.Msg = function () { bottom: 0, opacity: 0.5 }).appendTo("body"); - $pop = $("
").css({ + $pop = BI.Widget._renderEngine.createElement("
").css({ position: "absolute", zIndex: BI.zIndex_tip - 1, top: 0, @@ -5659,7 +5659,7 @@ BI.Popover = BI.inherit(BI.Widget, { this.startY = 0; this.tracker = new BI.MouseMoveTracker(function (deltaX, deltaY) { var size = self._calculateSize(); - var W = $("body").width(), H = $("body").height(); + var W = BI.Widget._renderEngine.createElement("body").width(), H = BI.Widget._renderEngine.createElement("body").height(); self.startX += deltaX; self.startY += deltaY; self.element.css({ @@ -8804,9 +8804,9 @@ BI.TextAreaEditor = BI.inherit(BI.Single, { self._focus(); self.fireEvent(BI.TextAreaEditor.EVENT_FOCUS); } - $(document).bind("mousedown." + self.getName(), function (e) { + BI.Widget._renderEngine.createElement(document).bind("mousedown." + self.getName(), function (e) { if (BI.DOM.isExist(self) && !self.element.__isMouseInBounds__(e)) { - $(document).unbind("mousedown." + self.getName()); + BI.Widget._renderEngine.createElement(document).unbind("mousedown." + self.getName()); self.content.element.blur(); } }); @@ -8816,7 +8816,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, { self._blur(); self.fireEvent(BI.TextAreaEditor.EVENT_BLUR); } - $(document).unbind("mousedown." + self.getName()); + BI.Widget._renderEngine.createElement(document).unbind("mousedown." + self.getName()); }); if (BI.isKey(o.value)) { self.setValue(o.value); @@ -8956,7 +8956,7 @@ BI.Iframe = BI.inherit(BI.Single, { _init: function () { var o = this.options; - this.options.element = $("