guy 8 years ago
parent
commit
888299a2bf
  1. 2
      bi/base.js
  2. 7
      bi/case.js
  3. 14
      bi/core.js
  4. 2
      docs/base.js
  5. 7
      docs/case.js
  6. 14
      docs/core.js
  7. 2
      src/base/combination/group.button.js
  8. 7
      src/case/layer/pane.list.js
  9. 14
      src/core/proto/date.js

2
bi/base.js

@ -1135,7 +1135,7 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
},
removeItemAt: function (indexes) {
BI.remove(this.buttons, indexes);
BI.removeAt(this.buttons, indexes);
this.layouts.removeItemAt(indexes);
},

7
bi/case.js

@ -7181,6 +7181,13 @@ BI.ListPane = BI.inherit(BI.Pane, {
this.check();
},
removeItemAt: function (indexes) {
indexes = indexes || [];
BI.removeAt(this.options.items, indexes);
this.button_group.removeItemAt.apply(this.button_group, arguments);
this.check();
},
populate: function (items) {
var self = this, o = this.options;
if (arguments.length === 0 && (BI.isFunction(this.button_group.attr("itemsCreator")))) {//接管loader的populate方法

14
bi/core.js

@ -6374,6 +6374,20 @@ Date.prototype.getQuarterStartMonth = function () {
}
return quarterStartMonth;
};
//指定日期n个月之前或之后的日期
Date.prototype.getOffsetMonth = function (n) {
var dt = new Date(this.getTime());
var day = dt.getDate();
var monthDay = new Date(dt.getFullYear(), dt.getMonth() + parseInt(n), 1).getMonthDays();
if(day > monthDay){
day = monthDay;
}
dt.setDate(day);
dt.setMonth(dt.getMonth() + parseInt(n));
return dt;
};
//获得本季度的起始日期
Date.prototype.getQuarterStartDate = function () {
return new Date(this.getFullYear(), this.getQuarterStartMonth(), 1);

2
docs/base.js

@ -1135,7 +1135,7 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
},
removeItemAt: function (indexes) {
BI.remove(this.buttons, indexes);
BI.removeAt(this.buttons, indexes);
this.layouts.removeItemAt(indexes);
},

7
docs/case.js

@ -7181,6 +7181,13 @@ BI.ListPane = BI.inherit(BI.Pane, {
this.check();
},
removeItemAt: function (indexes) {
indexes = indexes || [];
BI.removeAt(this.options.items, indexes);
this.button_group.removeItemAt.apply(this.button_group, arguments);
this.check();
},
populate: function (items) {
var self = this, o = this.options;
if (arguments.length === 0 && (BI.isFunction(this.button_group.attr("itemsCreator")))) {//接管loader的populate方法

14
docs/core.js

@ -23854,6 +23854,20 @@ Date.prototype.getQuarterStartMonth = function () {
}
return quarterStartMonth;
};
//指定日期n个月之前或之后的日期
Date.prototype.getOffsetMonth = function (n) {
var dt = new Date(this.getTime());
var day = dt.getDate();
var monthDay = new Date(dt.getFullYear(), dt.getMonth() + parseInt(n), 1).getMonthDays();
if(day > monthDay){
day = monthDay;
}
dt.setDate(day);
dt.setMonth(dt.getMonth() + parseInt(n));
return dt;
};
//获得本季度的起始日期
Date.prototype.getQuarterStartDate = function () {
return new Date(this.getFullYear(), this.getQuarterStartMonth(), 1);

2
src/base/combination/group.button.js

@ -158,7 +158,7 @@ BI.ButtonGroup = BI.inherit(BI.Widget, {
},
removeItemAt: function (indexes) {
BI.remove(this.buttons, indexes);
BI.removeAt(this.buttons, indexes);
this.layouts.removeItemAt(indexes);
},

7
src/case/layer/pane.list.js

@ -101,6 +101,13 @@ BI.ListPane = BI.inherit(BI.Pane, {
this.check();
},
removeItemAt: function (indexes) {
indexes = indexes || [];
BI.removeAt(this.options.items, indexes);
this.button_group.removeItemAt.apply(this.button_group, arguments);
this.check();
},
populate: function (items) {
var self = this, o = this.options;
if (arguments.length === 0 && (BI.isFunction(this.button_group.attr("itemsCreator")))) {//接管loader的populate方法

14
src/core/proto/date.js

@ -182,6 +182,20 @@ Date.prototype.getQuarterStartMonth = function () {
}
return quarterStartMonth;
};
//指定日期n个月之前或之后的日期
Date.prototype.getOffsetMonth = function (n) {
var dt = new Date(this.getTime());
var day = dt.getDate();
var monthDay = new Date(dt.getFullYear(), dt.getMonth() + parseInt(n), 1).getMonthDays();
if(day > monthDay){
day = monthDay;
}
dt.setDate(day);
dt.setMonth(dt.getMonth() + parseInt(n));
return dt;
};
//获得本季度的起始日期
Date.prototype.getQuarterStartDate = function () {
return new Date(this.getFullYear(), this.getQuarterStartMonth(), 1);

Loading…
Cancel
Save