mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
feat: add admin settings for nextcloudAddressbook related changes
This commit is contained in:
parent
bda1c28eb7
commit
19ddcfbf37
3 changed files with 116 additions and 17 deletions
45
plugins/nextcloud/js/hideInhouseAddressbook.js
Normal file
45
plugins/nextcloud/js/hideInhouseAddressbook.js
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
(rl => {
|
||||
if (rl) {
|
||||
addEventListener('rl-view-model', e => {
|
||||
if ('MailFolderList' === e.detail.viewModelTemplateID) {
|
||||
const container = e.detail.viewModelDom.querySelector('.buttonContacts');
|
||||
if (container) {
|
||||
container.remove();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
addEventListener('rl-view-model', e => {
|
||||
if ('SystemDropDown' === e.detail.viewModelTemplateID) {
|
||||
const container = e.detail.viewModelDom.querySelector('.dropdown-menu');
|
||||
if (container) {
|
||||
for (i = 0; i < container.children.length; i++) {
|
||||
const element = container.children[i];
|
||||
const attr = element.getAttribute("data-bind");
|
||||
if (attr && attr.includes("visible: allowContacts")) {
|
||||
element.remove();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
addEventListener('rl-view-model', e => {
|
||||
if ('PopupsCompose' === e.detail.viewModelTemplateID) {
|
||||
const container = e.detail.viewModelDom.querySelector('.pull-right');
|
||||
if (container) {
|
||||
for (i = 0; i < container.children.length; i++) {
|
||||
const element = container.children[i];
|
||||
const attr = element.getAttribute("data-bind");
|
||||
if (attr && attr.includes("visible: allowContacts")) {
|
||||
element.remove();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})(window.rl);
|
||||
Loading…
Add table
Add a link
Reference in a new issue