Skip to content

Commit 109489f

Browse files
committed
Limit the responsive dialog to the a small number, so it is easier to test
1 parent 7088b4d commit 109489f

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

plugins/CoreHome/javascripts/popover.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
* @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
66
*/
77

8-
$.extend($.ui.dialog.prototype.options, { appendTo: '#Piwik_Popover_Wrapper' });
9-
$(document.createElement('div')).attr('id', 'Piwik_Popover_Wrapper').appendTo('body');
8+
$(function() {
9+
if (!$('#Piwik_Popover_Wrapper').length) {
10+
$(document.createElement('div')).attr('id', 'Piwik_Popover_Wrapper').appendTo('body');
11+
}
12+
});
1013

1114
var Piwik_Popover = (function () {
1215
var container = false;
@@ -31,6 +34,10 @@ var Piwik_Popover = (function () {
3134
width: 1050,
3235
resizable: false,
3336
autoOpen: true,
37+
classes: {
38+
"ui-dialog": 'ui-dialog--responsive',
39+
},
40+
appendTo: '#Piwik_Popover_Wrapper',
3441
open: function (event, ui) {
3542
if (dialogClass) {
3643
$(this).parent().addClass(dialogClass).attr('style', '');

plugins/CoreUpdater/Controller.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ public function getUpdaterJs()
103103
'node_modules/@materializecss/materialize/dist/js/materialize.min.js',
104104
'plugins/CoreHome/javascripts/materialize-bc.js',
105105
'plugins/Morpheus/javascripts/piwikHelper.js',
106-
'plugins/CoreHome/javascripts/popover.js',
107106
'plugins/CoreHome/javascripts/broadcast.js',
108107
'plugins/CoreUpdater/javascripts/updateLayout.js',
109108
'plugins/Installation/javascripts/installation.js',

plugins/Dashboard/stylesheets/dashboard.less

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,16 @@ body#standalone {
124124
}
125125

126126
.ui-dialog {
127+
z-index: 1001;
128+
}
129+
130+
.ui-dialog--responsive {
127131
display: flex;
128132
flex-direction: column;
129133

130134
position: relative;
131135
top: 0 !important;
132136
left: 0 !important;
133-
z-index: 1001;
134137
margin: auto;
135138
width: min-content;
136139
max-width: 100%;

plugins/Installation/Controller.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,6 @@ public function getInstallationJs()
558558
"plugins/CoreHome/javascripts/materialize-bc.js",
559559
'plugins/Installation/javascripts/installation.js',
560560
'plugins/Morpheus/javascripts/piwikHelper.js',
561-
'plugins/CoreHome/javascripts/popover.js',
562561
"plugins/CoreHome/javascripts/broadcast.js",
563562
);
564563

0 commit comments

Comments
 (0)