sync from server
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { Grid, createElement, createPopup } from "../../ui";
|
||||
import { Grid, createElement, Popup } from "../../ui";
|
||||
import { nullOrEmpty, r, contains } from "../../utility";
|
||||
|
||||
class Follower {
|
||||
@ -13,9 +13,10 @@ class Follower {
|
||||
const tabIndex = Math.max.apply(null, [...document.querySelectorAll('[tabindex]')].map(e => e.tabIndex ?? 0)) + 3;
|
||||
|
||||
const gridContainer = createElement('div', 'follower-grid');
|
||||
const popup = createPopup(
|
||||
const popup = new Popup({
|
||||
onMasking: this.#option.onMasking,
|
||||
title,
|
||||
createElement('div', 'follower-wrapper',
|
||||
content: createElement('div', 'follower-wrapper',
|
||||
createElement('div', div => div.innerText = r('whoWantReceiveCustomerNotification', 'Who do you want to receive customer notifications?')),
|
||||
createElement('input', search => {
|
||||
search.type = 'text';
|
||||
@ -33,17 +34,19 @@ class Follower {
|
||||
}),
|
||||
gridContainer
|
||||
),
|
||||
{
|
||||
text: r('ok', 'OK'),
|
||||
key: 'ok',
|
||||
trigger: () => {
|
||||
if (typeof this.#option.onOk === 'function') {
|
||||
return this.#option.onOk.call(this, this.#grid.source.filter(f => f.Email || f.Text));
|
||||
buttons: [
|
||||
{
|
||||
text: r('ok', 'OK'),
|
||||
key: 'ok',
|
||||
trigger: () => {
|
||||
if (typeof this.#option.onOk === 'function') {
|
||||
return this.#option.onOk.call(this, this.#grid.source.filter(f => f.Email || f.Text));
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{ text: r('cancel', 'Cancel'), key: 'cancel' }
|
||||
);
|
||||
},
|
||||
{ text: r('cancel', 'Cancel'), key: 'cancel' }
|
||||
]
|
||||
});
|
||||
const result = await popup.show(parent);
|
||||
result.querySelector('.follower-search').focus();
|
||||
// grid
|
||||
|
Reference in New Issue
Block a user