diff --git a/src/case/list/list.select.js b/src/case/list/list.select.js index 27a0227b0a..7b2684f41b 100644 --- a/src/case/list/list.select.js +++ b/src/case/list/list.select.js @@ -52,7 +52,7 @@ BI.SelectList = BI.inherit(BI.Widget, { callback.apply(self, arguments); if (op.times === 1) { self.toolbar.setVisible(items && items.length > 0); - self.toolbar.setEnable(items && items.length > 0); + self.toolbar.setEnable(!o.disabled && items && items.length > 0); } self._checkAllSelected(); }); @@ -160,7 +160,7 @@ BI.SelectList = BI.inherit(BI.Widget, { populate: function (items) { this.toolbar.setVisible(!BI.isEmptyArray(items)); - this.toolbar.setEnable(!BI.isEmptyArray(items)); + this.toolbar.setEnable(!this.options.disabled && !BI.isEmptyArray(items)); this.list.populate.apply(this.list, arguments); this._checkAllSelected(); }, diff --git a/src/core/widget.js b/src/core/widget.js index f6add3ff06..24c1e157ea 100644 --- a/src/core/widget.js +++ b/src/core/widget.js @@ -185,16 +185,17 @@ * @private */ _mount: function (force, deep, lifeHook, predicate) { - var self = this; if (!force && (this._isMounted || !this.isVisible() || this.__asking === true || !(this._isRoot === true || (this._parent && this._parent._isMounted === true)))) { return false; } lifeHook !== false && this.beforeMount && this.beforeMount(); this._isMounted = true; this._mountChildren && this._mountChildren(); + if(BI.isNotNull(this._parent)) { + !this._parent.isEnabled() && this._setEnable(false); + !this._parent.isValid() && this._setValid(false); + } BI.each(this._children, function (i, widget) { - !self.isEnabled() && widget._setEnable(false); - !self.isValid() && widget._setValid(false); widget._mount && widget._mount(deep ? force : false, deep, lifeHook, predicate); }); lifeHook !== false && this.mounted && this.mounted();