fix: selector for admin css
This commit is contained in:
parent
aa46aeed78
commit
8784ae7641
@ -48,7 +48,7 @@ document.addEventListener('DOMContentLoaded', function (event) {
|
|||||||
document.querySelector('sib-auth').getUser().then(user => {
|
document.querySelector('sib-auth').getUser().then(user => {
|
||||||
if(user !== null) {
|
if(user !== null) {
|
||||||
// Hide login button if already logged
|
// 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
|
// Set current user id on set-user-id of sib-display
|
||||||
for(sibDisplay of document.querySelectorAll('sib-display[set-user-id]')) {
|
for(sibDisplay of document.querySelectorAll('sib-display[set-user-id]')) {
|
||||||
sibDisplay.setAttribute(sibDisplay.getAttribute('set-user-id'), user['@id']);
|
sibDisplay.setAttribute(sibDisplay.getAttribute('set-user-id'), user['@id']);
|
||||||
@ -58,7 +58,7 @@ document.addEventListener('DOMContentLoaded', function (event) {
|
|||||||
sibForm.addEventListener('populate', () => {
|
sibForm.addEventListener('populate', () => {
|
||||||
// BUG: Populate event trigger before the view is fully loaded! - https://git.happy-dev.fr/startinblox/framework/sib-core/issues/521
|
// 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)=>{
|
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(select of sibForm.querySelectorAll('select[name="'+sibForm.getAttribute('set-user-id-select')+'"]')) {
|
||||||
for(option of select.options) {
|
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])')) {
|
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));
|
}).catch(error => console.log(error));
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.circle-admin-join-button select[name='user'] {
|
.circle-admin-join-button select[name='user'] {
|
||||||
display: none;
|
display: none!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#admin-circle-list{
|
#admin-circle-list{
|
||||||
|
@ -36,10 +36,18 @@
|
|||||||
display: contents;
|
display: contents;
|
||||||
}
|
}
|
||||||
|
|
||||||
hd-user-avatar, hd-user-avatar > * {
|
hd-user-avatar, hd-user-avatar > *, hd-user-groups {
|
||||||
display: flex!important;
|
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'],
|
sib-set-default[name='buttons'],
|
||||||
.cell,
|
.cell,
|
||||||
.table-header {
|
.table-header {
|
||||||
|
Loading…
Reference in New Issue
Block a user