mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
Import patch from lfuelling about overlay, dunno wat this do
This commit is contained in:
parent
40e78b6b0a
commit
5478ea7bcf
2 changed files with 17 additions and 4 deletions
|
@ -173,7 +173,3 @@ Array of regular expressions to be matched against URLS **and** URIs and their r
|
|||
#### default_language
|
||||
|
||||
Language code used by default in views (**default**: `en`)
|
||||
|
||||
#### theme
|
||||
|
||||
Can be either `default` or `vapor`.
|
|
@ -68,4 +68,21 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||
addMaildrop.parentNode.insertBefore(inputDropClone, addMaildrop);
|
||||
});
|
||||
|
||||
// FIXME - I don't understand what this do ...
|
||||
// This looks kinda hackish :|
|
||||
if(window.location != window.parent.location) {
|
||||
// Set class to body to show we're in overlay
|
||||
document.body.classList.add('overlay');
|
||||
let userContainer = document.querySelector('a.user-container');
|
||||
userContainer.classList.replace('user-container-info', 'user-container-edit');
|
||||
userContainer.setAttribute('href', userContainer
|
||||
.getAttribute('href')
|
||||
.replace('edit.html', ''));
|
||||
userContainer.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
window.parent.location.href = userContainer.getAttribute('href');
|
||||
})
|
||||
}
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue