PluginProbe
Survey Maker by AYS / trunk
Survey Maker by AYS vtrunk
5.2.3.8 5.2.3.7 5.2.3.6 5.2.3.5 5.2.3.4 5.2.3.3 5.2.3.2 5.2.3.1 5.2.3.0 5.2.2.9 5.2.2.8 5.2.2.7 5.2.2.6 5.2.2.5 5.2.2.4 5.2.2.3 5.2.2.2 5.2.2.1 5.2.2.0 5.2.1.9 5.2.1.8 5.2.0.8 5.2.0.9 5.2.1.0 5.2.1.1 All 151 releases
survey-maker / admin / js / admin.js

admin.js in Survey Maker by AYS trunk, at admin/js/admin.js

36 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (function ($) {
2 'use strict';
3
4 $(document).on('click', '[data-slug="survey-maker"] .deactivate a', function () {
5 swal({
6 html:"<h2>Do you want to upgrade to Pro version or permanently delete the plugin?</h2><ul><li>Upgrade: Your data will be saved for upgrade.</li><li>Uninstall: Your data will be deleted completely.</li></ul>",
7 type: 'question',
8 showCancelButton: true,
9 allowOutsideClick: false,
10 allowEscapeKey: false,
11 allowEnterKey: false,
12 confirmButtonColor: '#3085d6',
13 cancelButtonColor: '#d33',
14 confirmButtonText: 'Upgrade',
15 cancelButtonText: 'Deactivate'
16 }).then(function(result) {
17 var upgrade_plugin = false;
18 if (result.value) upgrade_plugin = true;
19 var data = {
20 action: 'deactivate_plugin_option_sm',
21 upgrade_plugin: upgrade_plugin
22 };
23
24 $.ajax({
25 url: SurveyMakerAdmin.ajaxUrl,
26 method: 'post',
27 dataType: 'json',
28 data: data,
29 success:function () {
30 window.location = $(document).find('[data-slug="survey-maker"]').find('.deactivate').find('a').attr('href');
31 }
32 });
33 });
34 return false;
35 });
36 })(jQuery);