PluginProbe
Premmerce / 1.2
Premmerce v1.2
trunk 1.0 1.1 1.2 1.2.1 1.3 1.3.10 1.3.11 1.3.12 1.3.13 1.3.14 1.3.15 1.3.16 1.3.17 1.3.18 1.3.19 1.3.2 1.3.20 1.3.21 1.3.22 1.3.23 1.3.3 1.3.4 1.3.5 1.3.6 All 28 releases
premmerce / assets / admin / js / plugins.js

plugins.js in Premmerce 1.2, at assets/admin/js/plugins.js

27 lines 844 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 jQuery(function ($) {
2
3 $(document).on('click', '[data-action]', function (e) {
4
5 var $this = $(this);
6 var data = $this.data('action');
7
8 var successState = $this.attr('data-success-state');
9 var row = $this.closest('[data-plugin-row]');
10 var spinner = $this.find(".premmerce-wp-spinner");
11
12 spinner.show();
13
14 premmerce.actions.run(data, {
15 success: function () {
16 spinner.hide();
17 row.attr('data-plugin-row', successState);
18 window.location.reload();
19 },
20 error: function (response) {
21 spinner.hide();
22 $('[data-error-container]').append('<div class="notice notice-error notice-alt is-dismissible"><p>' + response.errorMessage + '</p></div>');
23 }
24 });
25 });
26 });
27