guy 7 years ago
parent
commit
a0b40a2328
  1. 9
      bi/case.js
  2. 9
      dist/bundle.js
  3. 28
      dist/bundle.min.js
  4. 9
      dist/case.js
  5. 9
      src/case/list/list.select.js

9
bi/case.js

@ -7958,10 +7958,11 @@ BI.SelectList = BI.inherit(BI.Widget, {
//全选 //全选
this.toolbar = BI.createWidget(o.toolbar); this.toolbar = BI.createWidget(o.toolbar);
this.allSelected = false;
this.toolbar.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { this.toolbar.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
var isAllSelected = this.isSelected(); self.allSelected = this.isSelected();
if (type === BI.Events.CLICK) { if (type === BI.Events.CLICK) {
self.setAllSelected(isAllSelected); self.setAllSelected(self.allSelected);
self.fireEvent(BI.SelectList.EVENT_CHANGE, value, obj); self.fireEvent(BI.SelectList.EVENT_CHANGE, value, obj);
} }
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
@ -8022,6 +8023,7 @@ BI.SelectList = BI.inherit(BI.Widget, {
BI.each(this.getAllButtons(), function (i, btn) { BI.each(this.getAllButtons(), function (i, btn) {
(btn.setSelected || btn.setAllSelected).apply(btn, [v]); (btn.setSelected || btn.setAllSelected).apply(btn, [v]);
}); });
this.allSelected = !!v;
this.toolbar.setSelected(v); this.toolbar.setSelected(v);
this.toolbar.setHalfSelected(false); this.toolbar.setHalfSelected(false);
}, },
@ -8031,7 +8033,8 @@ BI.SelectList = BI.inherit(BI.Widget, {
}, },
isAllSelected: function () { isAllSelected: function () {
return this.toolbar.isSelected(); return this.allSelected;
// return this.toolbar.isSelected();
}, },
hasPrev: function () { hasPrev: function () {

9
dist/bundle.js vendored

@ -70323,10 +70323,11 @@ BI.SelectList = BI.inherit(BI.Widget, {
//全选 //全选
this.toolbar = BI.createWidget(o.toolbar); this.toolbar = BI.createWidget(o.toolbar);
this.allSelected = false;
this.toolbar.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { this.toolbar.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
var isAllSelected = this.isSelected(); self.allSelected = this.isSelected();
if (type === BI.Events.CLICK) { if (type === BI.Events.CLICK) {
self.setAllSelected(isAllSelected); self.setAllSelected(self.allSelected);
self.fireEvent(BI.SelectList.EVENT_CHANGE, value, obj); self.fireEvent(BI.SelectList.EVENT_CHANGE, value, obj);
} }
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
@ -70387,6 +70388,7 @@ BI.SelectList = BI.inherit(BI.Widget, {
BI.each(this.getAllButtons(), function (i, btn) { BI.each(this.getAllButtons(), function (i, btn) {
(btn.setSelected || btn.setAllSelected).apply(btn, [v]); (btn.setSelected || btn.setAllSelected).apply(btn, [v]);
}); });
this.allSelected = !!v;
this.toolbar.setSelected(v); this.toolbar.setSelected(v);
this.toolbar.setHalfSelected(false); this.toolbar.setHalfSelected(false);
}, },
@ -70396,7 +70398,8 @@ BI.SelectList = BI.inherit(BI.Widget, {
}, },
isAllSelected: function () { isAllSelected: function () {
return this.toolbar.isSelected(); return this.allSelected;
// return this.toolbar.isSelected();
}, },
hasPrev: function () { hasPrev: function () {

28
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

9
dist/case.js vendored

@ -7958,10 +7958,11 @@ BI.SelectList = BI.inherit(BI.Widget, {
//全选 //全选
this.toolbar = BI.createWidget(o.toolbar); this.toolbar = BI.createWidget(o.toolbar);
this.allSelected = false;
this.toolbar.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { this.toolbar.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
var isAllSelected = this.isSelected(); self.allSelected = this.isSelected();
if (type === BI.Events.CLICK) { if (type === BI.Events.CLICK) {
self.setAllSelected(isAllSelected); self.setAllSelected(self.allSelected);
self.fireEvent(BI.SelectList.EVENT_CHANGE, value, obj); self.fireEvent(BI.SelectList.EVENT_CHANGE, value, obj);
} }
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
@ -8022,6 +8023,7 @@ BI.SelectList = BI.inherit(BI.Widget, {
BI.each(this.getAllButtons(), function (i, btn) { BI.each(this.getAllButtons(), function (i, btn) {
(btn.setSelected || btn.setAllSelected).apply(btn, [v]); (btn.setSelected || btn.setAllSelected).apply(btn, [v]);
}); });
this.allSelected = !!v;
this.toolbar.setSelected(v); this.toolbar.setSelected(v);
this.toolbar.setHalfSelected(false); this.toolbar.setHalfSelected(false);
}, },
@ -8031,7 +8033,8 @@ BI.SelectList = BI.inherit(BI.Widget, {
}, },
isAllSelected: function () { isAllSelected: function () {
return this.toolbar.isSelected(); return this.allSelected;
// return this.toolbar.isSelected();
}, },
hasPrev: function () { hasPrev: function () {

9
src/case/list/list.select.js

@ -32,10 +32,11 @@ BI.SelectList = BI.inherit(BI.Widget, {
//全选 //全选
this.toolbar = BI.createWidget(o.toolbar); this.toolbar = BI.createWidget(o.toolbar);
this.allSelected = false;
this.toolbar.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { this.toolbar.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
var isAllSelected = this.isSelected(); self.allSelected = this.isSelected();
if (type === BI.Events.CLICK) { if (type === BI.Events.CLICK) {
self.setAllSelected(isAllSelected); self.setAllSelected(self.allSelected);
self.fireEvent(BI.SelectList.EVENT_CHANGE, value, obj); self.fireEvent(BI.SelectList.EVENT_CHANGE, value, obj);
} }
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
@ -96,6 +97,7 @@ BI.SelectList = BI.inherit(BI.Widget, {
BI.each(this.getAllButtons(), function (i, btn) { BI.each(this.getAllButtons(), function (i, btn) {
(btn.setSelected || btn.setAllSelected).apply(btn, [v]); (btn.setSelected || btn.setAllSelected).apply(btn, [v]);
}); });
this.allSelected = !!v;
this.toolbar.setSelected(v); this.toolbar.setSelected(v);
this.toolbar.setHalfSelected(false); this.toolbar.setHalfSelected(false);
}, },
@ -105,7 +107,8 @@ BI.SelectList = BI.inherit(BI.Widget, {
}, },
isAllSelected: function () { isAllSelected: function () {
return this.toolbar.isSelected(); return this.allSelected;
// return this.toolbar.isSelected();
}, },
hasPrev: function () { hasPrev: function () {

Loading…
Cancel
Save