mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #21417 from nextcloud/bugfix/noid/modal-support-for-vue-apps
Fix modal support for vue apps
This commit is contained in:
commit
ee59029e62
7 changed files with 18 additions and 9 deletions
2
core/js/dist/login.js
vendored
2
core/js/dist/login.js
vendored
File diff suppressed because one or more lines are too long
2
core/js/dist/login.js.map
vendored
2
core/js/dist/login.js.map
vendored
File diff suppressed because one or more lines are too long
6
core/js/dist/main.js
vendored
6
core/js/dist/main.js
vendored
File diff suppressed because one or more lines are too long
2
core/js/dist/main.js.map
vendored
2
core/js/dist/main.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -107,7 +107,7 @@ const Dialogs = {
|
|||
'none',
|
||||
buttons,
|
||||
callback,
|
||||
modal
|
||||
modal === undefined ? true : modal
|
||||
)
|
||||
},
|
||||
/**
|
||||
|
|
@ -1245,7 +1245,7 @@ const Dialogs = {
|
|||
dir: '',
|
||||
name: '' // Ugly but works ;)
|
||||
}, { escapeFunction: null }).prependTo(this.$dirTree)
|
||||
|
||||
|
||||
},
|
||||
/**
|
||||
* handle selection made in the tree list
|
||||
|
|
|
|||
|
|
@ -72,6 +72,10 @@
|
|||
height: 100%;
|
||||
}
|
||||
|
||||
body.dark .oc-dialog-dim {
|
||||
opacity: .8;
|
||||
}
|
||||
|
||||
.oc-dialog-content {
|
||||
width: 100%;
|
||||
max-width: 550px;
|
||||
|
|
|
|||
7
core/src/jquery/ocdialog.js
vendored
7
core/src/jquery/ocdialog.js
vendored
|
|
@ -210,9 +210,14 @@ $.widget('oc.ocdialog', {
|
|||
}
|
||||
|
||||
const self = this
|
||||
let contentDiv = $('#content')
|
||||
if (contentDiv.length === 0) {
|
||||
// nextcloud-vue compatibility
|
||||
contentDiv = $('.content')
|
||||
}
|
||||
this.overlay = $('<div>')
|
||||
.addClass('oc-dialog-dim')
|
||||
.appendTo($('#content'))
|
||||
.appendTo(contentDiv)
|
||||
this.overlay.on('click keydown keyup', function(event) {
|
||||
if (event.target !== self.$dialog.get(0) && self.$dialog.find($(event.target)).length === 0) {
|
||||
event.preventDefault()
|
||||
|
|
|
|||
Loading…
Reference in a new issue