added loading on wp users sync
This commit is contained in:
@ -131,10 +131,12 @@ const item_actions = [
|
|||||||
label: 'Update',
|
label: 'Update',
|
||||||
className: 'update',
|
className: 'update',
|
||||||
onClick: function(item, refresh) {
|
onClick: function(item, refresh) {
|
||||||
return MailPoet.Ajax.post({
|
MailPoet.Modal.loading(true);
|
||||||
|
MailPoet.Ajax.post({
|
||||||
endpoint: 'segments',
|
endpoint: 'segments',
|
||||||
action: 'synchronize'
|
action: 'synchronize'
|
||||||
}).done(function(response) {
|
}).done(function(response) {
|
||||||
|
MailPoet.Modal.loading(false);
|
||||||
if(response === true) {
|
if(response === true) {
|
||||||
MailPoet.Notice.success(
|
MailPoet.Notice.success(
|
||||||
('List "%$1s" has been synchronized.').replace('%$1s', item.name)
|
('List "%$1s" has been synchronized.').replace('%$1s', item.name)
|
||||||
|
Reference in New Issue
Block a user