Extend advanced_mailer module to log and test Push Notifications

This commit is contained in:
Kijin Sung 2020-06-24 20:13:46 +09:00
parent 04da475562
commit 4271bb9862
20 changed files with 540 additions and 16 deletions

View file

@ -46,6 +46,29 @@
);
});
$("#advanced_mailer_test_send_push").click(function(event) {
event.preventDefault();
$("#advanced_mailer_test_result").text("");
$(this).attr("disabled", "disabled");
var ajax_data = {
recipient_user_id: $("#advanced_mailer_recipient_user_id").val(),
subject: $("#advanced_mailer_subject").val(),
content: $("#advanced_mailer_content").val(),
url: $("#advanced_mailer_url").val()
};
$.exec_json(
"advanced_mailer.procAdvanced_mailerAdminTestSendPush", ajax_data,
function(response) {
$("#advanced_mailer_test_result").html(response.test_result);
$("#advanced_mailer_test_send").removeAttr("disabled");
},
function(response) {
$("#advanced_mailer_test_result").text("AJAX Error");
$("#advanced_mailer_test_send").removeAttr("disabled");
}
);
});
});
})(jQuery);