windy 6 years ago
parent
commit
8cef04694c
  1. 2
      dist/base.js
  2. 41
      dist/bundle.js
  3. 19
      dist/core.js
  4. 41
      dist/fineui.js
  5. 20
      dist/widget.js
  6. 2
      src/base/single/editor/editor.js
  7. 19
      src/core/controller/controller.bubbles.js
  8. 20
      src/widget/numberinterval/numberinterval.js

2
dist/base.js vendored

@ -18568,7 +18568,7 @@ BI.Editor = BI.inherit(BI.Single, {
} }
if (!this.disabledError && BI.isKey(errorText)) { if (!this.disabledError && BI.isKey(errorText)) {
BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, { BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, {
adjustLength: 2 adjustTop: 2
}); });
this._checkToolTip(); this._checkToolTip();
return BI.Bubbles.get(this.getName()); return BI.Bubbles.get(this.getName());

41
dist/bundle.js vendored

@ -26766,7 +26766,10 @@ BI.BubblesController = BI.inherit(BI.Controller, {
var container = opt.container || context; var container = opt.container || context;
var offsetStyle = opt.offsetStyle || {}; var offsetStyle = opt.offsetStyle || {};
var level = opt.level || "error"; var level = opt.level || "error";
var adjustLength = opt.adjustLength || 0; var adjustTop = opt.adjustTop || 0;
var adjustRight = opt.adjustRight || 0;
var adjustLeft = opt.adjustLeft || 0;
var adjustBottom = opt.adjustBottom || 0;
if (!this.storeBubbles[name]) { if (!this.storeBubbles[name]) {
this.storeBubbles[name] = {}; this.storeBubbles[name] = {};
} }
@ -26782,9 +26785,9 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}); });
this.set(name, this.storeBubbles[name]["top"]); this.set(name, this.storeBubbles[name]["top"]);
var position = this._getTopPosition(name, context, offsetStyle); var position = this._getTopPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left, top: position.top - adjustLength}); this.get(name).element.css({left: position.left + adjustLeft, top: position.top - adjustTop});
this.get(name).invisible(); this.get(name).invisible();
if (!$.isTopSpaceEnough(context, this.get(name), adjustLength)) { if (!$.isTopSpaceEnough(context, this.get(name), adjustTop)) {
if (!this.storeBubbles[name]["left"]) { if (!this.storeBubbles[name]["left"]) {
this.storeBubbles[name]["left"] = this._createBubble("left", text, level, 30); this.storeBubbles[name]["left"] = this._createBubble("left", text, level, 30);
} }
@ -26797,9 +26800,9 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}); });
this.set(name, this.storeBubbles[name]["left"]); this.set(name, this.storeBubbles[name]["left"]);
var position = this._getLeftPosition(name, context, offsetStyle); var position = this._getLeftPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left - adjustLength, top: position.top}); this.get(name).element.css({left: position.left - adjustLeft, top: position.top - adjustTop});
this.get(name).invisible(); this.get(name).invisible();
if (!$.isLeftSpaceEnough(context, this.get(name), adjustLength)) { if (!$.isLeftSpaceEnough(context, this.get(name), adjustLeft)) {
if (!this.storeBubbles[name]["right"]) { if (!this.storeBubbles[name]["right"]) {
this.storeBubbles[name]["right"] = this._createBubble("right", text, level, 30); this.storeBubbles[name]["right"] = this._createBubble("right", text, level, 30);
} }
@ -26812,9 +26815,9 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}); });
this.set(name, this.storeBubbles[name]["right"]); this.set(name, this.storeBubbles[name]["right"]);
var position = this._getRightPosition(name, context, offsetStyle); var position = this._getRightPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left + adjustLength, top: position.top}); this.get(name).element.css({left: position.left + adjustRight, top: position.top - adjustTop});
this.get(name).invisible(); this.get(name).invisible();
if (!$.isRightSpaceEnough(context, this.get(name), adjustLength)) { if (!$.isRightSpaceEnough(context, this.get(name), adjustLeft)) {
if (!this.storeBubbles[name]["bottom"]) { if (!this.storeBubbles[name]["bottom"]) {
this.storeBubbles[name]["bottom"] = this._createBubble("bottom", text, level); this.storeBubbles[name]["bottom"] = this._createBubble("bottom", text, level);
} }
@ -26827,7 +26830,7 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}); });
this.set(name, this.storeBubbles[name]["bottom"]); this.set(name, this.storeBubbles[name]["bottom"]);
var position = this._getBottomPosition(name, context, offsetStyle); var position = this._getBottomPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left, top: position.top + adjustLength}); this.get(name).element.css({left: position.left + adjustLeft, top: position.top + adjustBottom});
this.get(name).invisible(); this.get(name).invisible();
} }
} }
@ -54374,7 +54377,7 @@ BI.Editor = BI.inherit(BI.Single, {
} }
if (!this.disabledError && BI.isKey(errorText)) { if (!this.disabledError && BI.isKey(errorText)) {
BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, { BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, {
adjustLength: 2 adjustTop: 2
}); });
this._checkToolTip(); this._checkToolTip();
return BI.Bubbles.get(this.getName()); return BI.Bubbles.get(this.getName());
@ -102145,7 +102148,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
less: 0, less: 0,
less_equal: 1, less_equal: 1,
numTip: "", numTip: "",
adjustLength: 2 adjustTop: 2
}, },
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments); var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments);
@ -102432,19 +102435,19 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.typeError: case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
break; break;
case c.numberError: case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
break; break;
default : default :
@ -102481,7 +102484,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
self._checkValidation(); self._checkValidation();
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
self.fireEvent(BI.NumberInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
}); });
@ -102495,14 +102498,14 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.numberError: case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
self.fireEvent(BI.NumberInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
self.fireEvent(BI.NumberInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
@ -102520,19 +102523,19 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.typeError: case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
break; break;
case c.numberError: case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
break; break;
default : default :

19
dist/core.js vendored

@ -26766,7 +26766,10 @@ BI.BubblesController = BI.inherit(BI.Controller, {
var container = opt.container || context; var container = opt.container || context;
var offsetStyle = opt.offsetStyle || {}; var offsetStyle = opt.offsetStyle || {};
var level = opt.level || "error"; var level = opt.level || "error";
var adjustLength = opt.adjustLength || 0; var adjustTop = opt.adjustTop || 0;
var adjustRight = opt.adjustRight || 0;
var adjustLeft = opt.adjustLeft || 0;
var adjustBottom = opt.adjustBottom || 0;
if (!this.storeBubbles[name]) { if (!this.storeBubbles[name]) {
this.storeBubbles[name] = {}; this.storeBubbles[name] = {};
} }
@ -26782,9 +26785,9 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}); });
this.set(name, this.storeBubbles[name]["top"]); this.set(name, this.storeBubbles[name]["top"]);
var position = this._getTopPosition(name, context, offsetStyle); var position = this._getTopPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left, top: position.top - adjustLength}); this.get(name).element.css({left: position.left + adjustLeft, top: position.top - adjustTop});
this.get(name).invisible(); this.get(name).invisible();
if (!$.isTopSpaceEnough(context, this.get(name), adjustLength)) { if (!$.isTopSpaceEnough(context, this.get(name), adjustTop)) {
if (!this.storeBubbles[name]["left"]) { if (!this.storeBubbles[name]["left"]) {
this.storeBubbles[name]["left"] = this._createBubble("left", text, level, 30); this.storeBubbles[name]["left"] = this._createBubble("left", text, level, 30);
} }
@ -26797,9 +26800,9 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}); });
this.set(name, this.storeBubbles[name]["left"]); this.set(name, this.storeBubbles[name]["left"]);
var position = this._getLeftPosition(name, context, offsetStyle); var position = this._getLeftPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left - adjustLength, top: position.top}); this.get(name).element.css({left: position.left - adjustLeft, top: position.top - adjustTop});
this.get(name).invisible(); this.get(name).invisible();
if (!$.isLeftSpaceEnough(context, this.get(name), adjustLength)) { if (!$.isLeftSpaceEnough(context, this.get(name), adjustLeft)) {
if (!this.storeBubbles[name]["right"]) { if (!this.storeBubbles[name]["right"]) {
this.storeBubbles[name]["right"] = this._createBubble("right", text, level, 30); this.storeBubbles[name]["right"] = this._createBubble("right", text, level, 30);
} }
@ -26812,9 +26815,9 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}); });
this.set(name, this.storeBubbles[name]["right"]); this.set(name, this.storeBubbles[name]["right"]);
var position = this._getRightPosition(name, context, offsetStyle); var position = this._getRightPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left + adjustLength, top: position.top}); this.get(name).element.css({left: position.left + adjustRight, top: position.top - adjustTop});
this.get(name).invisible(); this.get(name).invisible();
if (!$.isRightSpaceEnough(context, this.get(name), adjustLength)) { if (!$.isRightSpaceEnough(context, this.get(name), adjustLeft)) {
if (!this.storeBubbles[name]["bottom"]) { if (!this.storeBubbles[name]["bottom"]) {
this.storeBubbles[name]["bottom"] = this._createBubble("bottom", text, level); this.storeBubbles[name]["bottom"] = this._createBubble("bottom", text, level);
} }
@ -26827,7 +26830,7 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}); });
this.set(name, this.storeBubbles[name]["bottom"]); this.set(name, this.storeBubbles[name]["bottom"]);
var position = this._getBottomPosition(name, context, offsetStyle); var position = this._getBottomPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left, top: position.top + adjustLength}); this.get(name).element.css({left: position.left + adjustLeft, top: position.top + adjustBottom});
this.get(name).invisible(); this.get(name).invisible();
} }
} }

41
dist/fineui.js vendored

@ -27015,7 +27015,10 @@ BI.BubblesController = BI.inherit(BI.Controller, {
var container = opt.container || context; var container = opt.container || context;
var offsetStyle = opt.offsetStyle || {}; var offsetStyle = opt.offsetStyle || {};
var level = opt.level || "error"; var level = opt.level || "error";
var adjustLength = opt.adjustLength || 0; var adjustTop = opt.adjustTop || 0;
var adjustRight = opt.adjustRight || 0;
var adjustLeft = opt.adjustLeft || 0;
var adjustBottom = opt.adjustBottom || 0;
if (!this.storeBubbles[name]) { if (!this.storeBubbles[name]) {
this.storeBubbles[name] = {}; this.storeBubbles[name] = {};
} }
@ -27031,9 +27034,9 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}); });
this.set(name, this.storeBubbles[name]["top"]); this.set(name, this.storeBubbles[name]["top"]);
var position = this._getTopPosition(name, context, offsetStyle); var position = this._getTopPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left, top: position.top - adjustLength}); this.get(name).element.css({left: position.left + adjustLeft, top: position.top - adjustTop});
this.get(name).invisible(); this.get(name).invisible();
if (!$.isTopSpaceEnough(context, this.get(name), adjustLength)) { if (!$.isTopSpaceEnough(context, this.get(name), adjustTop)) {
if (!this.storeBubbles[name]["left"]) { if (!this.storeBubbles[name]["left"]) {
this.storeBubbles[name]["left"] = this._createBubble("left", text, level, 30); this.storeBubbles[name]["left"] = this._createBubble("left", text, level, 30);
} }
@ -27046,9 +27049,9 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}); });
this.set(name, this.storeBubbles[name]["left"]); this.set(name, this.storeBubbles[name]["left"]);
var position = this._getLeftPosition(name, context, offsetStyle); var position = this._getLeftPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left - adjustLength, top: position.top}); this.get(name).element.css({left: position.left - adjustLeft, top: position.top - adjustTop});
this.get(name).invisible(); this.get(name).invisible();
if (!$.isLeftSpaceEnough(context, this.get(name), adjustLength)) { if (!$.isLeftSpaceEnough(context, this.get(name), adjustLeft)) {
if (!this.storeBubbles[name]["right"]) { if (!this.storeBubbles[name]["right"]) {
this.storeBubbles[name]["right"] = this._createBubble("right", text, level, 30); this.storeBubbles[name]["right"] = this._createBubble("right", text, level, 30);
} }
@ -27061,9 +27064,9 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}); });
this.set(name, this.storeBubbles[name]["right"]); this.set(name, this.storeBubbles[name]["right"]);
var position = this._getRightPosition(name, context, offsetStyle); var position = this._getRightPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left + adjustLength, top: position.top}); this.get(name).element.css({left: position.left + adjustRight, top: position.top - adjustTop});
this.get(name).invisible(); this.get(name).invisible();
if (!$.isRightSpaceEnough(context, this.get(name), adjustLength)) { if (!$.isRightSpaceEnough(context, this.get(name), adjustLeft)) {
if (!this.storeBubbles[name]["bottom"]) { if (!this.storeBubbles[name]["bottom"]) {
this.storeBubbles[name]["bottom"] = this._createBubble("bottom", text, level); this.storeBubbles[name]["bottom"] = this._createBubble("bottom", text, level);
} }
@ -27076,7 +27079,7 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}); });
this.set(name, this.storeBubbles[name]["bottom"]); this.set(name, this.storeBubbles[name]["bottom"]);
var position = this._getBottomPosition(name, context, offsetStyle); var position = this._getBottomPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left, top: position.top + adjustLength}); this.get(name).element.css({left: position.left + adjustLeft, top: position.top + adjustBottom});
this.get(name).invisible(); this.get(name).invisible();
} }
} }
@ -54623,7 +54626,7 @@ BI.Editor = BI.inherit(BI.Single, {
} }
if (!this.disabledError && BI.isKey(errorText)) { if (!this.disabledError && BI.isKey(errorText)) {
BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, { BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, {
adjustLength: 2 adjustTop: 2
}); });
this._checkToolTip(); this._checkToolTip();
return BI.Bubbles.get(this.getName()); return BI.Bubbles.get(this.getName());
@ -102394,7 +102397,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
less: 0, less: 0,
less_equal: 1, less_equal: 1,
numTip: "", numTip: "",
adjustLength: 2 adjustTop: 2
}, },
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments); var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments);
@ -102681,19 +102684,19 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.typeError: case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
break; break;
case c.numberError: case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
break; break;
default : default :
@ -102730,7 +102733,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
self._checkValidation(); self._checkValidation();
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
self.fireEvent(BI.NumberInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
}); });
@ -102744,14 +102747,14 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.numberError: case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
self.fireEvent(BI.NumberInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
self.fireEvent(BI.NumberInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
@ -102769,19 +102772,19 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.typeError: case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
break; break;
case c.numberError: case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
break; break;
default : default :

20
dist/widget.js vendored

@ -14335,7 +14335,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
less: 0, less: 0,
less_equal: 1, less_equal: 1,
numTip: "", numTip: "",
adjustLength: 2 adjustTop: 2
}, },
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments); var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments);
@ -14622,19 +14622,19 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.typeError: case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
break; break;
case c.numberError: case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
break; break;
default : default :
@ -14671,7 +14671,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
self._checkValidation(); self._checkValidation();
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
self.fireEvent(BI.NumberInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
}); });
@ -14685,14 +14685,14 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.numberError: case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
self.fireEvent(BI.NumberInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
self.fireEvent(BI.NumberInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
@ -14710,19 +14710,19 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.typeError: case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
break; break;
case c.numberError: case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
break; break;
default : default :

2
src/base/single/editor/editor.js

@ -227,7 +227,7 @@ BI.Editor = BI.inherit(BI.Single, {
} }
if (!this.disabledError && BI.isKey(errorText)) { if (!this.disabledError && BI.isKey(errorText)) {
BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, { BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, {
adjustLength: 2 adjustTop: 2
}); });
this._checkToolTip(); this._checkToolTip();
return BI.Bubbles.get(this.getName()); return BI.Bubbles.get(this.getName());

19
src/core/controller/controller.bubbles.js

@ -112,7 +112,10 @@ BI.BubblesController = BI.inherit(BI.Controller, {
var container = opt.container || context; var container = opt.container || context;
var offsetStyle = opt.offsetStyle || {}; var offsetStyle = opt.offsetStyle || {};
var level = opt.level || "error"; var level = opt.level || "error";
var adjustLength = opt.adjustLength || 0; var adjustTop = opt.adjustTop || 0;
var adjustRight = opt.adjustRight || 0;
var adjustLeft = opt.adjustLeft || 0;
var adjustBottom = opt.adjustBottom || 0;
if (!this.storeBubbles[name]) { if (!this.storeBubbles[name]) {
this.storeBubbles[name] = {}; this.storeBubbles[name] = {};
} }
@ -128,9 +131,9 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}); });
this.set(name, this.storeBubbles[name]["top"]); this.set(name, this.storeBubbles[name]["top"]);
var position = this._getTopPosition(name, context, offsetStyle); var position = this._getTopPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left, top: position.top - adjustLength}); this.get(name).element.css({left: position.left + adjustLeft, top: position.top - adjustTop});
this.get(name).invisible(); this.get(name).invisible();
if (!$.isTopSpaceEnough(context, this.get(name), adjustLength)) { if (!$.isTopSpaceEnough(context, this.get(name), adjustTop)) {
if (!this.storeBubbles[name]["left"]) { if (!this.storeBubbles[name]["left"]) {
this.storeBubbles[name]["left"] = this._createBubble("left", text, level, 30); this.storeBubbles[name]["left"] = this._createBubble("left", text, level, 30);
} }
@ -143,9 +146,9 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}); });
this.set(name, this.storeBubbles[name]["left"]); this.set(name, this.storeBubbles[name]["left"]);
var position = this._getLeftPosition(name, context, offsetStyle); var position = this._getLeftPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left - adjustLength, top: position.top}); this.get(name).element.css({left: position.left - adjustLeft, top: position.top - adjustTop});
this.get(name).invisible(); this.get(name).invisible();
if (!$.isLeftSpaceEnough(context, this.get(name), adjustLength)) { if (!$.isLeftSpaceEnough(context, this.get(name), adjustLeft)) {
if (!this.storeBubbles[name]["right"]) { if (!this.storeBubbles[name]["right"]) {
this.storeBubbles[name]["right"] = this._createBubble("right", text, level, 30); this.storeBubbles[name]["right"] = this._createBubble("right", text, level, 30);
} }
@ -158,9 +161,9 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}); });
this.set(name, this.storeBubbles[name]["right"]); this.set(name, this.storeBubbles[name]["right"]);
var position = this._getRightPosition(name, context, offsetStyle); var position = this._getRightPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left + adjustLength, top: position.top}); this.get(name).element.css({left: position.left + adjustRight, top: position.top - adjustTop});
this.get(name).invisible(); this.get(name).invisible();
if (!$.isRightSpaceEnough(context, this.get(name), adjustLength)) { if (!$.isRightSpaceEnough(context, this.get(name), adjustLeft)) {
if (!this.storeBubbles[name]["bottom"]) { if (!this.storeBubbles[name]["bottom"]) {
this.storeBubbles[name]["bottom"] = this._createBubble("bottom", text, level); this.storeBubbles[name]["bottom"] = this._createBubble("bottom", text, level);
} }
@ -173,7 +176,7 @@ BI.BubblesController = BI.inherit(BI.Controller, {
}); });
this.set(name, this.storeBubbles[name]["bottom"]); this.set(name, this.storeBubbles[name]["bottom"]);
var position = this._getBottomPosition(name, context, offsetStyle); var position = this._getBottomPosition(name, context, offsetStyle);
this.get(name).element.css({left: position.left, top: position.top + adjustLength}); this.get(name).element.css({left: position.left + adjustLeft, top: position.top + adjustBottom});
this.get(name).invisible(); this.get(name).invisible();
} }
} }

20
src/widget/numberinterval/numberinterval.js

@ -18,7 +18,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
less: 0, less: 0,
less_equal: 1, less_equal: 1,
numTip: "", numTip: "",
adjustLength: 2 adjustTop: 2
}, },
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments); var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments);
@ -305,19 +305,19 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.typeError: case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
break; break;
case c.numberError: case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
break; break;
default : default :
@ -354,7 +354,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
self._checkValidation(); self._checkValidation();
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
self.fireEvent(BI.NumberInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
}); });
@ -368,14 +368,14 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.numberError: case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
self.fireEvent(BI.NumberInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
self.fireEvent(BI.NumberInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
@ -393,19 +393,19 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.typeError: case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
break; break;
case c.numberError: case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustLength: c.adjustLength adjustTop: c.adjustTop
}); });
break; break;
default : default :

Loading…
Cancel
Save