Browse Source

Pull request #46: 无JIRA任务 IEswitcher弹窗问题

Merge in PG2/plugin-bi-screen-adaptive from ~FAY/plugin-bi-screen-adaptive:persist/10.0 to persist/10.0

* commit 'b7262aa3a42e46565a084d71862fe1156f538c81':
  update
  无JIRA任务 IE弹出框
  无JIRA任务 IEswitcher弹窗问题
persist/10.0
fay 5 years ago
parent
commit
8f9d649cc6
  1. 22
      src/main/resources/com/finebi/plugin/web/plugin.screen_adaptive.js
  2. 22
      src/main/resources/com/finebi/plugin/web/scripts/entry.js

22
src/main/resources/com/finebi/plugin/web/plugin.screen_adaptive.js

@ -28,7 +28,8 @@
var originalRender = BI.Widget._renderEngine;
var injectSearchSearchStop = BI.Searcher.prototype._stopSearch;
var injectTooltipsShow = BI.TooltipsController.prototype.show;
var injectSwitcherPopup = BI.Switcher.prototype.adjustView;
var injectSwitcherPopup = BI.Switcher.prototype.populate;
var injectSwitcherAdjustView = BI.Switcher.prototype.adjustView;
var injectCreate = BI.createWidget;
var callback = function () {};
@ -356,7 +357,7 @@
}
BI.Searcher.prototype._stopSearch = function () {
injectSearchSearchStop.call(this, arguments);
injectSearchSearchStop.apply(this, arguments);
if (this.popupView && this.popupView.element[0].parentElement) {
this.popupView.element[0].parentElement.style.transform = "";
this.popupView.element[0].parentElement.style.transformOrigin = "";
@ -364,8 +365,20 @@
}
// switcher
BI.Switcher.prototype.populate = function (items) {
injectSwitcherPopup.apply(this, arguments);
var self = this;
BI.defer(function () {
if (self.popupView) {
self.popupView.element[0].parentElement.style.left = parseInt(self.popupView.element[0].parentElement.style.left) * scale + "px";
self.popupView.element[0].parentElement.style.top = parseInt(self.popupView.element[0].parentElement.style.top) * scale + "px";
self.popupView.element[0].parentElement.style.transform = "scale(" + scale + ")";
self.popupView.element[0].parentElement.style.transformOrigin = "left top";
}
})
}
BI.Switcher.prototype.adjustView = function () {
injectSwitcherPopup.call(this, arguments);
injectSwitcherAdjustView.apply(this, arguments);
if (this.popupView) {
this.popupView.element[0].parentElement.style.left = parseInt(this.popupView.element[0].parentElement.style.left) * scale + "px";
this.popupView.element[0].parentElement.style.top = parseInt(this.popupView.element[0].parentElement.style.top) * scale + "px";
@ -480,7 +493,8 @@
BI.Widget.registerRenderEngine(originalRender);
callback = function () {}
BI.Switcher.prototype.adjustView = injectSwitcherPopup;
BI.Switcher.prototype.populate = injectSwitcherPopup;
BI.Switcher.prototype.adjustView = injectSwitcherAdjustView;
BI.TooltipsController.prototype.show = injectTooltipsShow;
document.body.onmousedown = null;

22
src/main/resources/com/finebi/plugin/web/scripts/entry.js

@ -28,7 +28,8 @@
var originalRender = BI.Widget._renderEngine;
var injectSearchSearchStop = BI.Searcher.prototype._stopSearch;
var injectTooltipsShow = BI.TooltipsController.prototype.show;
var injectSwitcherPopup = BI.Switcher.prototype.adjustView;
var injectSwitcherPopup = BI.Switcher.prototype.populate;
var injectSwitcherAdjustView = BI.Switcher.prototype.adjustView;
var injectCreate = BI.createWidget;
var callback = function () {};
@ -356,7 +357,7 @@
}
BI.Searcher.prototype._stopSearch = function () {
injectSearchSearchStop.call(this, arguments);
injectSearchSearchStop.apply(this, arguments);
if (this.popupView && this.popupView.element[0].parentElement) {
this.popupView.element[0].parentElement.style.transform = "";
this.popupView.element[0].parentElement.style.transformOrigin = "";
@ -364,8 +365,20 @@
}
// switcher
BI.Switcher.prototype.populate = function (items) {
injectSwitcherPopup.apply(this, arguments);
var self = this;
BI.defer(function () {
if (self.popupView) {
self.popupView.element[0].parentElement.style.left = parseInt(self.popupView.element[0].parentElement.style.left) * scale + "px";
self.popupView.element[0].parentElement.style.top = parseInt(self.popupView.element[0].parentElement.style.top) * scale + "px";
self.popupView.element[0].parentElement.style.transform = "scale(" + scale + ")";
self.popupView.element[0].parentElement.style.transformOrigin = "left top";
}
})
}
BI.Switcher.prototype.adjustView = function () {
injectSwitcherPopup.call(this, arguments);
injectSwitcherAdjustView.apply(this, arguments);
if (this.popupView) {
this.popupView.element[0].parentElement.style.left = parseInt(this.popupView.element[0].parentElement.style.left) * scale + "px";
this.popupView.element[0].parentElement.style.top = parseInt(this.popupView.element[0].parentElement.style.top) * scale + "px";
@ -480,7 +493,8 @@
BI.Widget.registerRenderEngine(originalRender);
callback = function () {}
BI.Switcher.prototype.adjustView = injectSwitcherPopup;
BI.Switcher.prototype.populate = injectSwitcherPopup;
BI.Switcher.prototype.adjustView = injectSwitcherAdjustView;
BI.TooltipsController.prototype.show = injectTooltipsShow;
document.body.onmousedown = null;

Loading…
Cancel
Save