Move old versions code to own class

[MAILPOET-1316]
This commit is contained in:
Pavel Dohnal
2018-05-01 12:18:22 +01:00
parent ea47524cc4
commit df58322f0e
6 changed files with 133 additions and 20 deletions

View File

@@ -0,0 +1,15 @@
import jQuery from 'jquery';
jQuery(($) => {
$(document).on('click', '.notice-php-warning .notice-dismiss', function xyz() {
const type = $(this).closest('.notice-php-warning').data('notice');
$.ajax(window.ajaxurl,
{
type: 'POST',
data: {
action: 'dismissed_notice_handler',
type,
},
});
});
});