date-picker.js
1 year ago
duplicate-field.js
1 year ago
email-reports.js
2 months ago
module-markup.js
3 months ago
notices.js
1 year ago
overview.js
9 months ago
scroll-to-top.js
2 years ago
sticky-sidebar.js
2 years ago
support.js
3 months ago
user-roles.js
1 year ago
notices.js
25 lines
| 1 | const $ = jQuery; |
| 2 | |
| 3 | const Notices = { |
| 4 | setup() { |
| 5 | $('.dismiss-notice').on('click', function() { |
| 6 | const id = $(this).data('notice-id'); |
| 7 | const data = { |
| 8 | ...iawpActions.dismiss_notice, |
| 9 | id |
| 10 | }; |
| 11 | if (id === 'iawp_show_gsg') { |
| 12 | $('.iawp-getting-started-notice').hide(); |
| 13 | } else { |
| 14 | $(this).parents('.iawp-notice').hide(); |
| 15 | } |
| 16 | jQuery.post(ajaxurl, data, (response) => { |
| 17 | |
| 18 | }).fail(() => { |
| 19 | |
| 20 | }); |
| 21 | }); |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | export { Notices }; |