diff --git a/src/scripts/index.js b/src/scripts/index.js index b48dd5389226d03a92e825ccd8498d2621dc8475..6b7e65b92c91331775fa41bb1bb7271aebd4e084 100644 --- a/src/scripts/index.js +++ b/src/scripts/index.js @@ -48,7 +48,7 @@ document.addEventListener('DOMContentLoaded', function (event) { document.querySelector('sib-auth').getUser().then(user => { if(user !== null) { // Hide login button if already logged - document.querySelector('button[role="log in"]').style.display = 'none'; + document.querySelector('button[role="log in"]').setAttribute('style', 'display:none !important'); // Set current user id on set-user-id of sib-display for(sibDisplay of document.querySelectorAll('sib-display[set-user-id]')) { sibDisplay.setAttribute(sibDisplay.getAttribute('set-user-id'), user['@id']); @@ -58,7 +58,7 @@ document.addEventListener('DOMContentLoaded', function (event) { sibForm.addEventListener('populate', () => { // BUG: Populate event trigger before the view is fully loaded! - https://git.happy-dev.fr/startinblox/framework/sib-core/issues/521 document.querySelectorAll('sib-ac-checker:not([hidden]) > sib-delete[data-label^="Leave"]').forEach((el)=>{ - querySelectorParentChild(el, 'sib-form[submit-button^="Join"]').style.display = "none"; + querySelectorParentChild(el, 'sib-form[submit-button^="Join"]').setAttribute('style', 'display:none !important'); }); for(select of sibForm.querySelectorAll('select[name="'+sibForm.getAttribute('set-user-id-select')+'"]')) { for(option of select.options) { @@ -68,7 +68,7 @@ document.addEventListener('DOMContentLoaded', function (event) { }); } for(leaveBtn of document.querySelectorAll('admin-circle-leave > sib-ac-checker:not([hidden])')) { - leaveBtn.parentNode.parentNode.parentNode.nextElementSibling.style.display = "none"; // Hide Join button + leaveBtn.parentNode.parentNode.parentNode.nextElementSibling.setAttribute('style', 'display:none !important'); // Hide Join button } } }).catch(error => console.log(error)); diff --git a/src/styles/layout/circle/circle-admin.scss b/src/styles/layout/circle/circle-admin.scss index c95934947fdeb18281263d6daaed1a4da514a52f..ba4b600dfca4e5f1a967ad15a96f971122db89cb 100644 --- a/src/styles/layout/circle/circle-admin.scss +++ b/src/styles/layout/circle/circle-admin.scss @@ -9,7 +9,7 @@ } .circle-admin-join-button select[name='user'] { - display: none; + display: none!important; } #admin-circle-list{ diff --git a/src/styles/layout/circle/circle.scss b/src/styles/layout/circle/circle.scss index b54a0ade037e08e127b183a2483bc44d41c3d514..caf0bbfcee1614f961c9ed7539696c93f5d32e71 100644 --- a/src/styles/layout/circle/circle.scss +++ b/src/styles/layout/circle/circle.scss @@ -36,10 +36,18 @@ display: contents; } - hd-user-avatar, hd-user-avatar > * { + hd-user-avatar, hd-user-avatar > *, hd-user-groups { display: flex!important; } + sib-set-default[name="buttons"] * { + display: inline-block!important; + } + + sib-set-default[name="buttons"] select[name='user'] { + display: none!important; + } + sib-set-default[name='buttons'], .cell, .table-header {