guy 8 years ago
parent
commit
34c9c12870
  1. 2
      bi/base.js
  2. 18
      bi/core.js
  3. 2
      docs/base.js
  4. 18
      docs/core.js
  5. 2
      src/base/grid/grid.js
  6. 14
      src/core/widget.js

2
bi/base.js

@ -14807,7 +14807,7 @@ BI.GridView = BI.inherit(BI.Widget, {
minY = Math.min(minY, rowDatum.offset + verticalOffsetAdjustment);
maxY = Math.max(maxY, rowDatum.offset + verticalOffsetAdjustment + rowDatum.size);
renderedKeys.push(key);
renderedWidgets[i] = child;
renderedWidgets[rowIndex] = child;
}
}
//已存在的, 需要添加的和需要删除的

18
bi/core.js

@ -4485,6 +4485,7 @@ BI.Widget = BI.inherit(BI.OB, {
this._mountChildren && this._mountChildren();
BI.each(this._children, function (i, widget) {
!self.isEnabled() && widget._setEnable(false);
!self.isValid() && widget._setValid(false);
widget._mount && widget._mount();
});
this.mounted && this.mounted();
@ -4518,6 +4519,18 @@ BI.Widget = BI.inherit(BI.OB, {
});
},
_setValid: function (valid) {
if (valid === true) {
this.options.invalid = false;
} else if (valid === false) {
this.options.invalid = true;
}
//递归将所有子组件使有效
BI.each(this._children, function (i, child) {
child._setValid && child._setValid(valid);
});
},
setEnable: function (enable) {
this._setEnable(enable);
if (enable === true) {
@ -4542,6 +4555,7 @@ BI.Widget = BI.inherit(BI.OB, {
setValid: function (valid) {
this.options.invalid = !valid;
this._setValid(valid);
if (valid === true) {
this.element.removeClass("base-invalid invalid");
} else if (valid === false) {
@ -16608,9 +16622,7 @@ BI.extend(jQuery, {
* 基本的函数
* Created by GUY on 2015/6/24.
*/
$(function () {
BI.Func = {};
var formulas = {};
BI.extend(BI.Func, {
/**
@ -16630,7 +16642,6 @@ $(function () {
};
}
var t, text, py;
keyword = keyword + "";
keyword = BI.toUpperCase(keyword);
var matched = isArray ? [] : {}, finded = isArray ? [] : {};
BI.each(items, function (i, item) {
@ -16885,7 +16896,6 @@ $(function () {
}
return this._scrollWidth;
}
});
});/**
* guy
* 检测某个Widget的EventChange事件然后去show某个card

2
docs/base.js

@ -14807,7 +14807,7 @@ BI.GridView = BI.inherit(BI.Widget, {
minY = Math.min(minY, rowDatum.offset + verticalOffsetAdjustment);
maxY = Math.max(maxY, rowDatum.offset + verticalOffsetAdjustment + rowDatum.size);
renderedKeys.push(key);
renderedWidgets[i] = child;
renderedWidgets[rowIndex] = child;
}
}
//已存在的, 需要添加的和需要删除的

18
docs/core.js

@ -14487,6 +14487,7 @@ BI.Widget = BI.inherit(BI.OB, {
this._mountChildren && this._mountChildren();
BI.each(this._children, function (i, widget) {
!self.isEnabled() && widget._setEnable(false);
!self.isValid() && widget._setValid(false);
widget._mount && widget._mount();
});
this.mounted && this.mounted();
@ -14520,6 +14521,18 @@ BI.Widget = BI.inherit(BI.OB, {
});
},
_setValid: function (valid) {
if (valid === true) {
this.options.invalid = false;
} else if (valid === false) {
this.options.invalid = true;
}
//递归将所有子组件使有效
BI.each(this._children, function (i, child) {
child._setValid && child._setValid(valid);
});
},
setEnable: function (enable) {
this._setEnable(enable);
if (enable === true) {
@ -14544,6 +14557,7 @@ BI.Widget = BI.inherit(BI.OB, {
setValid: function (valid) {
this.options.invalid = !valid;
this._setValid(valid);
if (valid === true) {
this.element.removeClass("base-invalid invalid");
} else if (valid === false) {
@ -22631,9 +22645,7 @@ BI.extend(jQuery, {
* 基本的函数
* Created by GUY on 2015/6/24.
*/
$(function () {
BI.Func = {};
var formulas = {};
BI.extend(BI.Func, {
/**
@ -22653,7 +22665,6 @@ $(function () {
};
}
var t, text, py;
keyword = keyword + "";
keyword = BI.toUpperCase(keyword);
var matched = isArray ? [] : {}, finded = isArray ? [] : {};
BI.each(items, function (i, item) {
@ -22908,7 +22919,6 @@ $(function () {
}
return this._scrollWidth;
}
});
});/**
* guy
* 检测某个Widget的EventChange事件然后去show某个card

2
src/base/grid/grid.js

@ -172,7 +172,7 @@ BI.GridView = BI.inherit(BI.Widget, {
minY = Math.min(minY, rowDatum.offset + verticalOffsetAdjustment);
maxY = Math.max(maxY, rowDatum.offset + verticalOffsetAdjustment + rowDatum.size);
renderedKeys.push(key);
renderedWidgets[i] = child;
renderedWidgets[rowIndex] = child;
}
}
//已存在的, 需要添加的和需要删除的

14
src/core/widget.js

@ -165,6 +165,7 @@ BI.Widget = BI.inherit(BI.OB, {
this._mountChildren && this._mountChildren();
BI.each(this._children, function (i, widget) {
!self.isEnabled() && widget._setEnable(false);
!self.isValid() && widget._setValid(false);
widget._mount && widget._mount();
});
this.mounted && this.mounted();
@ -198,6 +199,18 @@ BI.Widget = BI.inherit(BI.OB, {
});
},
_setValid: function (valid) {
if (valid === true) {
this.options.invalid = false;
} else if (valid === false) {
this.options.invalid = true;
}
//递归将所有子组件使有效
BI.each(this._children, function (i, child) {
child._setValid && child._setValid(valid);
});
},
setEnable: function (enable) {
this._setEnable(enable);
if (enable === true) {
@ -222,6 +235,7 @@ BI.Widget = BI.inherit(BI.OB, {
setValid: function (valid) {
this.options.invalid = !valid;
this._setValid(valid);
if (valid === true) {
this.element.removeClass("base-invalid invalid");
} else if (valid === false) {

Loading…
Cancel
Save