Skip to content

Commit 3a59ea8

Browse files
Merge pull request #21543 from nextcloud/backport/21417/stable18
[stable18] Fix modal support for vue apps and dark theme
2 parents 60ed9a1 + 85f9f55 commit 3a59ea8

File tree

9 files changed

+19
-10
lines changed

9 files changed

+19
-10
lines changed

core/js/dist/login.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/js/dist/login.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/js/dist/main.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/js/dist/main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/js/dist/maintenance.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/js/dist/maintenance.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/src/OC/dialogs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ const Dialogs = {
108108
'none',
109109
buttons,
110110
callback,
111-
modal
111+
modal === undefined ? true : modal
112112
)
113113
},
114114
/**

core/src/jquery/css/jquery.ocdialog.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@
7272
height: 100%;
7373
}
7474

75+
body.dark .oc-dialog-dim {
76+
opacity: .8;
77+
}
78+
7579
.oc-dialog-content {
7680
width: 100%;
7781
max-width: 550px;

core/src/jquery/ocdialog.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,14 @@ $.widget('oc.ocdialog', {
210210
}
211211

212212
const self = this
213+
let contentDiv = $('#content')
214+
if (contentDiv.length === 0) {
215+
// nextcloud-vue compatibility
216+
contentDiv = $('.content')
217+
}
213218
this.overlay = $('<div>')
214219
.addClass('oc-dialog-dim')
215-
.appendTo($('#content'))
220+
.appendTo(contentDiv)
216221
this.overlay.on('click keydown keyup', function(event) {
217222
if (event.target !== self.$dialog.get(0) && self.$dialog.find($(event.target)).length === 0) {
218223
event.preventDefault()

0 commit comments

Comments
 (0)