Skip to content

Commit ee59029

Browse files
Merge pull request #21417 from nextcloud/bugfix/noid/modal-support-for-vue-apps
Fix modal support for vue apps
2 parents 39f3fcd + eca3c9f commit ee59029

File tree

7 files changed

+18
-9
lines changed

7 files changed

+18
-9
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/src/OC/dialogs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ const Dialogs = {
107107
'none',
108108
buttons,
109109
callback,
110-
modal
110+
modal === undefined ? true : modal
111111
)
112112
},
113113
/**
@@ -1245,7 +1245,7 @@ const Dialogs = {
12451245
dir: '',
12461246
name: '' // Ugly but works ;)
12471247
}, { escapeFunction: null }).prependTo(this.$dirTree)
1248-
1248+
12491249
},
12501250
/**
12511251
* handle selection made in the tree list

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)