guy 8 years ago
parent
commit
d391ed5550
  1. 7
      bi/base.js
  2. 12
      bi/case.js
  3. 4
      bi/widget.js
  4. 7
      docs/base.js
  5. 12
      docs/case.js
  6. 4
      docs/widget.js
  7. 7
      src/base/single/button/button.basic.js
  8. 12
      src/case/toolbar/toolbar.multiselect.js
  9. 4
      src/widget/sequencetable/treenumber.sequencetable.js

7
bi/base.js

@ -817,12 +817,19 @@ BI.BasicButton = BI.inherit(BI.Single, {
},
_doClick: function () {
if (this.isValid()) {
this.beforeClick();
}
this._trigger();
if (this.isValid()) {
this.doClick();
}
},
beforeClick: function () {
},
doClick: function () {
},

12
bi/case.js

@ -10269,6 +10269,8 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
height: 25,
text: BI.i18nText('BI-Select_All'),
isAllCheckedBySelectedValue: BI.emptyFn,
//手动控制选中
disableSelected: true,
isHalfCheckedBySelectedValue: function (selectedValues) {
return selectedValues.length > 0;
}
@ -10331,6 +10333,16 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
this.half.invisible();
},
//自己手动控制选中
beforeClick: function () {
var isHalf = this.isHalfSelected(), isSelected = this.isSelected();
if (isHalf === true) {
this.setSelected(true);
} else {
this.setSelected(!isSelected);
}
},
setSelected: function (v) {
this.checkbox.setSelected(v);
this.setHalfSelected(false);

4
bi/widget.js

@ -79,7 +79,9 @@ BI.SequenceTableTreeNumber = BI.inherit(BI.Widget, {
var cnt = this.start;
function track(node) {
self.cache[node.text || node.value] = cnt++;
//如果已经有缓存了就不改计数了,复杂表会出现这种情况
self.cache[node.text || node.value] || (self.cache[node.text || node.value] = cnt);
cnt++;
}
BI.each(nodes, function (i, node) {

7
docs/base.js

@ -817,12 +817,19 @@ BI.BasicButton = BI.inherit(BI.Single, {
},
_doClick: function () {
if (this.isValid()) {
this.beforeClick();
}
this._trigger();
if (this.isValid()) {
this.doClick();
}
},
beforeClick: function () {
},
doClick: function () {
},

12
docs/case.js

@ -10269,6 +10269,8 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
height: 25,
text: BI.i18nText('BI-Select_All'),
isAllCheckedBySelectedValue: BI.emptyFn,
//手动控制选中
disableSelected: true,
isHalfCheckedBySelectedValue: function (selectedValues) {
return selectedValues.length > 0;
}
@ -10331,6 +10333,16 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
this.half.invisible();
},
//自己手动控制选中
beforeClick: function () {
var isHalf = this.isHalfSelected(), isSelected = this.isSelected();
if (isHalf === true) {
this.setSelected(true);
} else {
this.setSelected(!isSelected);
}
},
setSelected: function (v) {
this.checkbox.setSelected(v);
this.setHalfSelected(false);

4
docs/widget.js

@ -79,7 +79,9 @@ BI.SequenceTableTreeNumber = BI.inherit(BI.Widget, {
var cnt = this.start;
function track(node) {
self.cache[node.text || node.value] = cnt++;
//如果已经有缓存了就不改计数了,复杂表会出现这种情况
self.cache[node.text || node.value] || (self.cache[node.text || node.value] = cnt);
cnt++;
}
BI.each(nodes, function (i, node) {

7
src/base/single/button/button.basic.js

@ -234,12 +234,19 @@ BI.BasicButton = BI.inherit(BI.Single, {
},
_doClick: function () {
if (this.isValid()) {
this.beforeClick();
}
this._trigger();
if (this.isValid()) {
this.doClick();
}
},
beforeClick: function () {
},
doClick: function () {
},

12
src/case/toolbar/toolbar.multiselect.js

@ -12,6 +12,8 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
height: 25,
text: BI.i18nText('BI-Select_All'),
isAllCheckedBySelectedValue: BI.emptyFn,
//手动控制选中
disableSelected: true,
isHalfCheckedBySelectedValue: function (selectedValues) {
return selectedValues.length > 0;
}
@ -74,6 +76,16 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
this.half.invisible();
},
//自己手动控制选中
beforeClick: function () {
var isHalf = this.isHalfSelected(), isSelected = this.isSelected();
if (isHalf === true) {
this.setSelected(true);
} else {
this.setSelected(!isSelected);
}
},
setSelected: function (v) {
this.checkbox.setSelected(v);
this.setHalfSelected(false);

4
src/widget/sequencetable/treenumber.sequencetable.js

@ -79,7 +79,9 @@ BI.SequenceTableTreeNumber = BI.inherit(BI.Widget, {
var cnt = this.start;
function track(node) {
self.cache[node.text || node.value] = cnt++;
//如果已经有缓存了就不改计数了,复杂表会出现这种情况
self.cache[node.text || node.value] || (self.cache[node.text || node.value] = cnt);
cnt++;
}
BI.each(nodes, function (i, node) {

Loading…
Cancel
Save