guy 8 years ago
parent
commit
078a6b6a08
  1. 95
      bi/core.js
  2. 4
      demo/version.js
  3. 95
      docs/core.js
  4. 4
      docs/demo.js
  5. 95
      src/core/proto/jquery.js

95
bi/core.js

@ -6547,59 +6547,64 @@ Function.prototype.after = function (func) {
* All rights reserved.
*/
if (jQuery) {
(function($){
(function ($) {
// richer:容器在其各个边缘留出的空间
$.fn.insets = function () {
var p = this.padding(),
b = this.border();
return {
'top': p.top,
'bottom': p.bottom + b.bottom + b.top,
'left': p.left,
'right': p.right + b.right + b.left
if (!$.fn.insets) {
$.fn.insets = function () {
var p = this.padding(),
b = this.border();
return {
'top': p.top,
'bottom': p.bottom + b.bottom + b.top,
'left': p.left,
'right': p.right + b.right + b.left
};
};
};
}
// richer:获取 && 设置jQuery元素的边界
$.fn.bounds = function (value) {
var tmp = {hasIgnoredBounds : true};
if (!$.fn.bounds) {
$.fn.bounds = function (value) {
var tmp = {hasIgnoredBounds: true};
if (value) {
if (!isNaN(value.x)) {
tmp.left = value.x;
}
if (!isNaN(value.y)) {
tmp.top = value.y;
}
if (value.width != null) {
tmp.width = (value.width - (this.outerWidth(true) - this.width()));
tmp.width = (tmp.width >= 0) ? tmp.width : value.width;
// fix chrome
//tmp.width = (tmp.width >= 0) ? tmp.width : 0;
if (value) {
if (!isNaN(value.x)) {
tmp.left = value.x;
}
if (!isNaN(value.y)) {
tmp.top = value.y;
}
if (value.width != null) {
tmp.width = (value.width - (this.outerWidth(true) - this.width()));
tmp.width = (tmp.width >= 0) ? tmp.width : value.width;
// fix chrome
//tmp.width = (tmp.width >= 0) ? tmp.width : 0;
}
if (value.height != null) {
tmp.height = value.height - (this.outerHeight(true) - this.height());
tmp.height = (tmp.height >= 0) ? tmp.height : value.height;
// fix chrome
//tmp.height = (tmp.height >= 0) ? tmp.height : value.0;
}
this.css(tmp);
return this;
}
if (value.height != null) {
tmp.height = value.height - (this.outerHeight(true) - this.height());
tmp.height = (tmp.height >= 0) ? tmp.height : value.height;
// fix chrome
//tmp.height = (tmp.height >= 0) ? tmp.height : value.0;
else {
// richer:注意此方法只对可见元素有效
tmp = this.position();
return {
'x': tmp.left,
'y': tmp.top,
// richer:这里计算外部宽度和高度的时候,都不包括边框
'width': this.outerWidth(),
'height': this.outerHeight()
};
}
this.css(tmp);
return this;
}
else {
// richer:注意此方法只对可见元素有效
tmp = this.position();
return {
'x': tmp.left,
'y': tmp.top,
// richer:这里计算外部宽度和高度的时候,都不包括边框
'width': this.outerWidth(),
'height': this.outerHeight()
};
}
};
};
}
})(jQuery);
};if (!Number.prototype.toFixed || (0.00008).toFixed(3) !== '0.000' ||
}
;if (!Number.prototype.toFixed || (0.00008).toFixed(3) !== '0.000' ||
(0.9).toFixed(0) === '0' || (1.255).toFixed(2) !== '1.25' ||
(1000000000000000128).toFixed(0) !== "1000000000000000128") {
(function () {

4
demo/version.js

@ -6,6 +6,6 @@ BI.i18n = {
"BI-Basic_OK": "确定"
};
BI.servletURL = "docs/";
BI.resourceURL = "docs/resource/";
BI.servletURL = "";
BI.resourceURL = "resource/";
BI.i18n = {};

95
docs/core.js

@ -24081,59 +24081,64 @@ Function.prototype.after = function (func) {
* All rights reserved.
*/
if (jQuery) {
(function($){
(function ($) {
// richer:容器在其各个边缘留出的空间
$.fn.insets = function () {
var p = this.padding(),
b = this.border();
return {
'top': p.top,
'bottom': p.bottom + b.bottom + b.top,
'left': p.left,
'right': p.right + b.right + b.left
if (!$.fn.insets) {
$.fn.insets = function () {
var p = this.padding(),
b = this.border();
return {
'top': p.top,
'bottom': p.bottom + b.bottom + b.top,
'left': p.left,
'right': p.right + b.right + b.left
};
};
};
}
// richer:获取 && 设置jQuery元素的边界
$.fn.bounds = function (value) {
var tmp = {hasIgnoredBounds : true};
if (!$.fn.bounds) {
$.fn.bounds = function (value) {
var tmp = {hasIgnoredBounds: true};
if (value) {
if (!isNaN(value.x)) {
tmp.left = value.x;
}
if (!isNaN(value.y)) {
tmp.top = value.y;
}
if (value.width != null) {
tmp.width = (value.width - (this.outerWidth(true) - this.width()));
tmp.width = (tmp.width >= 0) ? tmp.width : value.width;
// fix chrome
//tmp.width = (tmp.width >= 0) ? tmp.width : 0;
if (value) {
if (!isNaN(value.x)) {
tmp.left = value.x;
}
if (!isNaN(value.y)) {
tmp.top = value.y;
}
if (value.width != null) {
tmp.width = (value.width - (this.outerWidth(true) - this.width()));
tmp.width = (tmp.width >= 0) ? tmp.width : value.width;
// fix chrome
//tmp.width = (tmp.width >= 0) ? tmp.width : 0;
}
if (value.height != null) {
tmp.height = value.height - (this.outerHeight(true) - this.height());
tmp.height = (tmp.height >= 0) ? tmp.height : value.height;
// fix chrome
//tmp.height = (tmp.height >= 0) ? tmp.height : value.0;
}
this.css(tmp);
return this;
}
if (value.height != null) {
tmp.height = value.height - (this.outerHeight(true) - this.height());
tmp.height = (tmp.height >= 0) ? tmp.height : value.height;
// fix chrome
//tmp.height = (tmp.height >= 0) ? tmp.height : value.0;
else {
// richer:注意此方法只对可见元素有效
tmp = this.position();
return {
'x': tmp.left,
'y': tmp.top,
// richer:这里计算外部宽度和高度的时候,都不包括边框
'width': this.outerWidth(),
'height': this.outerHeight()
};
}
this.css(tmp);
return this;
}
else {
// richer:注意此方法只对可见元素有效
tmp = this.position();
return {
'x': tmp.left,
'y': tmp.top,
// richer:这里计算外部宽度和高度的时候,都不包括边框
'width': this.outerWidth(),
'height': this.outerHeight()
};
}
};
};
}
})(jQuery);
};if (!Number.prototype.toFixed || (0.00008).toFixed(3) !== '0.000' ||
}
;if (!Number.prototype.toFixed || (0.00008).toFixed(3) !== '0.000' ||
(0.9).toFixed(0) === '0' || (1.255).toFixed(2) !== '1.25' ||
(1000000000000000128).toFixed(0) !== "1000000000000000128") {
(function () {

4
docs/demo.js

@ -6,8 +6,8 @@ BI.i18n = {
"BI-Basic_OK": "确定"
};
BI.servletURL = "docs/";
BI.resourceURL = "docs/resource/";
BI.servletURL = "";
BI.resourceURL = "resource/";
BI.i18n = {};$(function () {
var ref;
BI.createWidget({

95
src/core/proto/jquery.js vendored

@ -6,56 +6,61 @@
* All rights reserved.
*/
if (jQuery) {
(function($){
(function ($) {
// richer:容器在其各个边缘留出的空间
$.fn.insets = function () {
var p = this.padding(),
b = this.border();
return {
'top': p.top,
'bottom': p.bottom + b.bottom + b.top,
'left': p.left,
'right': p.right + b.right + b.left
if (!$.fn.insets) {
$.fn.insets = function () {
var p = this.padding(),
b = this.border();
return {
'top': p.top,
'bottom': p.bottom + b.bottom + b.top,
'left': p.left,
'right': p.right + b.right + b.left
};
};
};
}
// richer:获取 && 设置jQuery元素的边界
$.fn.bounds = function (value) {
var tmp = {hasIgnoredBounds : true};
if (!$.fn.bounds) {
$.fn.bounds = function (value) {
var tmp = {hasIgnoredBounds: true};
if (value) {
if (!isNaN(value.x)) {
tmp.left = value.x;
}
if (!isNaN(value.y)) {
tmp.top = value.y;
}
if (value.width != null) {
tmp.width = (value.width - (this.outerWidth(true) - this.width()));
tmp.width = (tmp.width >= 0) ? tmp.width : value.width;
// fix chrome
//tmp.width = (tmp.width >= 0) ? tmp.width : 0;
if (value) {
if (!isNaN(value.x)) {
tmp.left = value.x;
}
if (!isNaN(value.y)) {
tmp.top = value.y;
}
if (value.width != null) {
tmp.width = (value.width - (this.outerWidth(true) - this.width()));
tmp.width = (tmp.width >= 0) ? tmp.width : value.width;
// fix chrome
//tmp.width = (tmp.width >= 0) ? tmp.width : 0;
}
if (value.height != null) {
tmp.height = value.height - (this.outerHeight(true) - this.height());
tmp.height = (tmp.height >= 0) ? tmp.height : value.height;
// fix chrome
//tmp.height = (tmp.height >= 0) ? tmp.height : value.0;
}
this.css(tmp);
return this;
}
if (value.height != null) {
tmp.height = value.height - (this.outerHeight(true) - this.height());
tmp.height = (tmp.height >= 0) ? tmp.height : value.height;
// fix chrome
//tmp.height = (tmp.height >= 0) ? tmp.height : value.0;
else {
// richer:注意此方法只对可见元素有效
tmp = this.position();
return {
'x': tmp.left,
'y': tmp.top,
// richer:这里计算外部宽度和高度的时候,都不包括边框
'width': this.outerWidth(),
'height': this.outerHeight()
};
}
this.css(tmp);
return this;
}
else {
// richer:注意此方法只对可见元素有效
tmp = this.position();
return {
'x': tmp.left,
'y': tmp.top,
// richer:这里计算外部宽度和高度的时候,都不包括边框
'width': this.outerWidth(),
'height': this.outerHeight()
};
}
};
};
}
})(jQuery);
};
}
;
Loading…
Cancel
Save