diff --git a/dist/core.js b/dist/core.js index 7ec970a23..5b2004f8b 100644 --- a/dist/core.js +++ b/dist/core.js @@ -14017,8 +14017,8 @@ $.extend(BI.OB.prototype, { if (this.options.listeners != null) { $.each(this.options.listeners, function (i, lis) { (lis.target ? lis.target : self)[lis.once ? 'once' : 'on'] - (lis.eventName, lis.action.createDelegate(self)) - }) + (lis.eventName, _.bind(lis.action, self)) + }); delete this.options.listeners; } }, @@ -14114,14 +14114,7 @@ $.extend(BI.OB.prototype, { } return true; } -}); -BI.OB.capture = function (o, fn, scope) { - o.fireEvent = o.fireEvent.createInterceptor(fn, scope); -} -// alex:释放事件的捕捉 -BI.OB.releaseCapture = function (o) { - o.fireEvent = BI.OB.prototype.fireEvent; -};/** +});/** * Widget超类 * @class BI.Widget * @extends BI.OB @@ -14198,14 +14191,16 @@ BI.Widget = BI.inherit(BI.OB, { }, _initVisualEffects: function () { - BI.nextTick(BI.bind(function () { - if (this.options.disabled) { - this.setEnable(false); - } - if (this.options.invalid) { - this.setValid(false); - } - }, this)); + if (this.options.diabled || this.options.invalid) { + BI.nextTick(BI.bind(function () { + if (this.options.disabled) { + this.setEnable(false); + } + if (this.options.invalid) { + this.setValid(false); + } + }, this)); + } if (this.options.invisible) { this.setVisible(false); @@ -14223,7 +14218,7 @@ BI.Widget = BI.inherit(BI.OB, { } } } else { - var args = Array.prototype.slice.call(arguments, 1) + var args = Array.prototype.slice.call(arguments, 1); for (var i = 0; i < fns.length; i++) { if (fns[i].apply(this, args) === false) { return false; @@ -14264,7 +14259,7 @@ BI.Widget = BI.inherit(BI.OB, { }, setVisible: function (visible) { - BI.assert(visible, [true, false]); + // BI.assert(visible, [true, false]); if (visible === true) { this.options.invisible = false; this.element.show(); @@ -14276,7 +14271,7 @@ BI.Widget = BI.inherit(BI.OB, { }, setValid: function (valid) { - BI.assert(valid, [true, false]); + // BI.assert(valid, [true, false]); this.options.invalid = !valid; if (valid === true) { this.element.removeClass("base-invalid invalid"); @@ -14383,11 +14378,11 @@ BI.Widget = BI.inherit(BI.OB, { return this.options[key]; }, - getText : function() { + getText: function () { }, - setText : function(text) { + setText: function (text) { }, @@ -15477,9 +15472,9 @@ BI.View = BI.inherit(BI.V, { var el; options || (options = {}); if (BI.isEmpty(item) && BI.isEmpty(options)) { - return BI.Plugin.getObject("bi.layout", BI.createWidget({ + return BI.createWidget({ type: "bi.layout" - })); + }); } if (BI.isWidget(item)) { return item; diff --git a/src/core/ob.js b/src/core/ob.js index 8bae54f58..4e768c9bc 100644 --- a/src/core/ob.js +++ b/src/core/ob.js @@ -17,8 +17,8 @@ $.extend(BI.OB.prototype, { if (this.options.listeners != null) { $.each(this.options.listeners, function (i, lis) { (lis.target ? lis.target : self)[lis.once ? 'once' : 'on'] - (lis.eventName, lis.action.createDelegate(self)) - }) + (lis.eventName, _.bind(lis.action, self)) + }); delete this.options.listeners; } }, @@ -114,11 +114,4 @@ $.extend(BI.OB.prototype, { } return true; } -}); -BI.OB.capture = function (o, fn, scope) { - o.fireEvent = o.fireEvent.createInterceptor(fn, scope); -} -// alex:释放事件的捕捉 -BI.OB.releaseCapture = function (o) { - o.fireEvent = BI.OB.prototype.fireEvent; -}; \ No newline at end of file +}); \ No newline at end of file diff --git a/src/core/shortcut.js b/src/core/shortcut.js index 662e6a0b4..f4c1aa0b3 100644 --- a/src/core/shortcut.js +++ b/src/core/shortcut.js @@ -35,9 +35,9 @@ var el; options || (options = {}); if (BI.isEmpty(item) && BI.isEmpty(options)) { - return BI.Plugin.getObject("bi.layout", BI.createWidget({ + return BI.createWidget({ type: "bi.layout" - })); + }); } if (BI.isWidget(item)) { return item; diff --git a/src/core/widget.js b/src/core/widget.js index 49aac00a4..f373bb2bf 100644 --- a/src/core/widget.js +++ b/src/core/widget.js @@ -75,14 +75,16 @@ BI.Widget = BI.inherit(BI.OB, { }, _initVisualEffects: function () { - BI.nextTick(BI.bind(function () { - if (this.options.disabled) { - this.setEnable(false); - } - if (this.options.invalid) { - this.setValid(false); - } - }, this)); + if (this.options.diabled || this.options.invalid) { + BI.nextTick(BI.bind(function () { + if (this.options.disabled) { + this.setEnable(false); + } + if (this.options.invalid) { + this.setValid(false); + } + }, this)); + } if (this.options.invisible) { this.setVisible(false); @@ -100,7 +102,7 @@ BI.Widget = BI.inherit(BI.OB, { } } } else { - var args = Array.prototype.slice.call(arguments, 1) + var args = Array.prototype.slice.call(arguments, 1); for (var i = 0; i < fns.length; i++) { if (fns[i].apply(this, args) === false) { return false; @@ -141,7 +143,7 @@ BI.Widget = BI.inherit(BI.OB, { }, setVisible: function (visible) { - BI.assert(visible, [true, false]); + // BI.assert(visible, [true, false]); if (visible === true) { this.options.invisible = false; this.element.show(); @@ -153,7 +155,7 @@ BI.Widget = BI.inherit(BI.OB, { }, setValid: function (valid) { - BI.assert(valid, [true, false]); + // BI.assert(valid, [true, false]); this.options.invalid = !valid; if (valid === true) { this.element.removeClass("base-invalid invalid"); @@ -260,11 +262,11 @@ BI.Widget = BI.inherit(BI.OB, { return this.options[key]; }, - getText : function() { + getText: function () { }, - setText : function(text) { + setText: function (text) { }, diff --git a/src/less/base/single/text.less b/src/less/base/single/text.less index 568122a9c..a6f1d83cd 100644 --- a/src/less/base/single/text.less +++ b/src/less/base/single/text.less @@ -2,5 +2,5 @@ .bi-text{ .overflow-dot(); - word-break: break-all; + word-break: break-word; } \ No newline at end of file diff --git a/src/less/base/table/table.grid.scrollbar.less b/src/less/base/table/table.grid.scrollbar.less index 408c42002..0322c095c 100644 --- a/src/less/base/table/table.grid.scrollbar.less +++ b/src/less/base/table/table.grid.scrollbar.less @@ -7,14 +7,15 @@ transition-timing-function: ease; user-select: none; background-color: rgba(0, 0, 0, 0.1); - border-radius:5px; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#19000000, endColorstr=#19000000); + border-radius: 5px; } .scrollbar-layout-main-vertical { bottom: 0; right: 0; top: 0; - transition-property: background-color ; + transition-property: background-color; width: 10px; } @@ -27,8 +28,9 @@ bottom: 0; height: 10px; left: 0; - transition-property: background-color ; + transition-property: background-color; background-color: rgba(0, 0, 0, 0.1); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#19000000, endColorstr=#19000000); } /* Touching the scroll-track directly makes the scroll-track bolder */