Browse Source

Merge pull request #1243 in VISUAL/fineui from ~WINDY/fineui:master to master

* commit 'f533921be3a4e34a1a8b82e3b4ed39f280dbfa9f':
  换种方式,在controller层修改默认控制title
es6
windy 5 years ago
parent
commit
2fdc924651
  1. 2
      src/core/controller/controller.tooltips.js
  2. 14
      src/widget/yearmonth/__test__/combo.yearmonth.test.js
  3. 14
      src/widget/yearquarter/__test__/combo.yearquarter.test.js

2
src/core/controller/controller.tooltips.js

@ -65,7 +65,7 @@ BI.TooltipsController = BI.inherit(BI.Controller, {
}); });
this.showingTips = {}; this.showingTips = {};
if (!this.has(name)) { if (!this.has(name)) {
this.create(name, text, level, opt.container || context); this.create(name, text, level, opt.container || "body");
} }
if (!opt.belowMouse) { if (!opt.belowMouse) {
var offset = context.element.offset(); var offset = context.element.offset();

14
src/widget/yearmonth/__test__/combo.yearmonth.test.js

@ -97,14 +97,12 @@ describe("YearMonthCombo", function () {
BI.nextTick(function () { BI.nextTick(function () {
dateCombo.element.find(".bi-year-month-trigger .bi-basic-button").click(); dateCombo.element.find(".bi-year-month-trigger .bi-basic-button").click();
BI.nextTick(function () { BI.nextTick(function () {
var input = dateCombo.element.find(".bi-year-month-trigger .bi-input"); $("body").mousedown();
BI.Test.triggerKeyDown(input, null, BI.KeyCode.ENTER, function () { BI.delay(function () {
BI.delay(function () { expect(dateCombo.element.find(".bi-year-month-trigger + .bi-popup-view").css("display")).to.equal("none");
expect(dateCombo.element.find(".bi-year-month-trigger + .bi-popup-view").css("display")).to.equal("none"); dateCombo.destroy();
dateCombo.destroy(); done();
done(); }, 300);
}, 300);
});
}) })
}); });
}); });

14
src/widget/yearquarter/__test__/combo.yearquarter.test.js

@ -97,14 +97,12 @@ describe("YearQuarterCombo", function () {
BI.nextTick(function () { BI.nextTick(function () {
dateCombo.element.find(".bi-year-quarter-trigger .bi-basic-button").click(); dateCombo.element.find(".bi-year-quarter-trigger .bi-basic-button").click();
BI.nextTick(function () { BI.nextTick(function () {
var input = dateCombo.element.find(".bi-year-quarter-trigger .bi-input"); $("body").mousedown();
BI.Test.triggerKeyDown(input, null, BI.KeyCode.ENTER, function () { BI.delay(function () {
BI.delay(function () { expect(dateCombo.element.find(".bi-year-quarter-trigger + .bi-popup-view").css("display")).to.equal("none");
expect(dateCombo.element.find(".bi-year-quarter-trigger + .bi-popup-view").css("display")).to.equal("none"); dateCombo.destroy();
dateCombo.destroy(); done();
done(); }, 300);
}, 300);
});
}) })
}); });
}); });

Loading…
Cancel
Save