mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
Avoid having to click two times on the tile to show the portal
This commit is contained in:
parent
d76133504a
commit
95ae0607d5
1 changed files with 1 additions and 2 deletions
|
@ -264,6 +264,7 @@ function init_portal_button_and_overlay()
|
|||
portalOverlay.setAttribute("id","ynh-overlay");
|
||||
portalOverlay.setAttribute("style","visibility: hidden;"); // make sure the overlay is invisible already when loading it
|
||||
document.body.insertBefore(portalOverlay, null);
|
||||
Element.addClass(portalOverlay, 'ynh-fadeOut');
|
||||
|
||||
// Inject portal button
|
||||
var portalButton = document.createElement('a');
|
||||
|
@ -279,8 +280,6 @@ function init_portal_button_and_overlay()
|
|||
// Prevent default click
|
||||
window.eventPreventDefault(e);
|
||||
// Toggle overlay on YNHPortal button click
|
||||
Element.toggleClass(portalOverlay, 'visible');
|
||||
Element.toggleClass(portalButton, 'visible');
|
||||
Element.toggleClass(document.querySelector('html'), 'ynh-panel-active');
|
||||
Element.toggleClass(portalOverlay, 'ynh-active');
|
||||
|
||||
|
|
Loading…
Reference in a new issue