remove dependency of jQuery plugins.
Grid.expandAll add total field of exported data.
This commit is contained in:
@@ -69,6 +69,18 @@ export default class CustomerCommunication {
|
||||
element.dispatchEvent(new Event('change'));
|
||||
}
|
||||
|
||||
get messageHidden() { return this._var.option.showMessageHidden }
|
||||
set messageHidden(flag) {
|
||||
const el = this._var.container.querySelector('.msgadminsetting');
|
||||
if (el == null) {
|
||||
return;
|
||||
}
|
||||
this._var.option.showMessageHidden = flag;
|
||||
// TODO: 是否与参数 flag 无关
|
||||
el.classList.remove('iconview');
|
||||
el.classList.add('iconnotview');
|
||||
}
|
||||
|
||||
get _statusLink() { return this._var.container.querySelector('.check-status-link>input') }
|
||||
get statusLinkEnabled() { return this._statusLink?.disabled !== true }
|
||||
set statusLinkEnabled(flag) {
|
||||
@@ -413,12 +425,33 @@ export default class CustomerCommunication {
|
||||
if (option.statusLinkVisible === false) {
|
||||
checkLink.style.display = 'none';
|
||||
}
|
||||
const spanv = createElement('span');
|
||||
if (option.userIsAdmin) {
|
||||
spanv.className = 'msgadminsetting sbutton iconnotview';
|
||||
spanv.style.padding = '0px 0px 0px 5px';
|
||||
spanv.addEventListener('click', function () {
|
||||
if (!option.showMessageHidden) {
|
||||
this.classList.remove('iconnotview');
|
||||
this.classList.add('iconview');
|
||||
option.showMessageHidden = true;
|
||||
container.querySelectorAll('.msgsetting').forEach(x => x.style.display = '');
|
||||
} else {
|
||||
this.classList.remove('iconview');
|
||||
this.classList.add('iconnotview');
|
||||
option.showMessageHidden = false;
|
||||
container.querySelectorAll('.msgsetting').forEach(x => x.style.display = 'none');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const container = createBox(
|
||||
createElement('div', null,
|
||||
createElement('div', div => {
|
||||
div.className = 'title-module';
|
||||
div.innerText = option.title ?? r('P_WO_CUSTOMERCOMMUNICATION', 'Customer Communication');
|
||||
}),
|
||||
},
|
||||
spanv
|
||||
),
|
||||
createElement('div', div => {
|
||||
div.className = 'title-company';
|
||||
if (nullOrEmpty(option.companyName)) {
|
||||
@@ -1146,7 +1179,7 @@ export default class CustomerCommunication {
|
||||
return followers;
|
||||
}
|
||||
|
||||
load(data, contacts, followers) {
|
||||
load(data, contacts, followers, func) {
|
||||
const children = [];
|
||||
if (data?.length > 0) {
|
||||
contacts ??= this._var.data.contacts;
|
||||
@@ -1216,8 +1249,28 @@ export default class CustomerCommunication {
|
||||
content,
|
||||
createElement('div', div => {
|
||||
div.className = 'item-time';
|
||||
div.innerText = comm.TimeStr;
|
||||
})
|
||||
},
|
||||
createElement('span', span => {
|
||||
span.className = 'msgsetting sbutton ' + (comm.Hidden ? 'iconnotview' : 'iconview');
|
||||
span.style.padding = '0px 0px 0px 5px';
|
||||
span.style.fontSize = '12px';
|
||||
span.style.display = this._var.option.showMessageHidden ? '' : 'none';
|
||||
span.addEventListener('click', function () {
|
||||
if (this.classList.contains('iconview')) {
|
||||
func(comm.Id, true);
|
||||
this.classList.remove('iconview');
|
||||
this.classList.add('iconnotview');
|
||||
} else {
|
||||
func(comm.Id, false);
|
||||
this.classList.remove('iconnotview');
|
||||
this.classList.add('iconview');
|
||||
}
|
||||
});
|
||||
}),
|
||||
createElement('span', span => {
|
||||
span.innerText = comm.TimeStr;
|
||||
})
|
||||
)
|
||||
);
|
||||
children.push(div);
|
||||
}
|
||||
|
Reference in New Issue
Block a user