PluginProbe ʕ •ᴥ•ʔ
Flex Import / 3.0
Flex Import v3.0
3.0 2.9 trunk 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8
flex-import / assets / js / license_script.js
flex-import / assets / js Last commit date
admin-script.js 1 week ago dashboard-posts.js 1 week ago free-template-admin.js 1 week ago front-script.js 1 week ago jquery.notify.min.js 1 week ago license_script.js 1 week ago plugin-admin.js 1 week ago template-admin.js 1 week ago
license_script.js
92 lines
1 jQuery(document).ready(function ($) {
2
3 $('.fleximp-notice-coupon-btn').on('click', function(){
4
5 var $btn = $(this);
6 var coupon = $btn.data('coupon');
7
8 navigator.clipboard.writeText(coupon).then(function() {
9
10 var originalText = $btn.html();
11
12 $btn.html('Copied!');
13
14 setTimeout(function(){
15 $btn.html(originalText);
16 }, 2000);
17
18 });
19
20 });
21
22 jQuery('form#fleximp-license-key-form').on('submit', function (e) {
23 e.preventDefault();
24 var license_key = jQuery('form#fleximp-license-key-form').serializeArray()[0].value;
25
26 if (license_key == "") {
27 alert('Please Enter the license key first!');
28 return;
29 } else {
30 jQuery.post(
31 localize_script_arr.ajaxurl, {
32 action: 'license_activate_fleximp',
33 wpnonce: localize_script_arr.wpnonce,
34 fleximp_is_premium: license_key,
35 text_domain: 'flex-import'
36 },
37 function (data, status) {
38 if (status == 'success') {
39 if (data.status) {
40 // location.reload(true);
41 window.location.href = localize_script_arr.redirect_url;
42 jQuery.notify(data.msg, {
43 position: "right bottom",
44 className: "success"
45 });
46 } else {
47 jQuery.notify(data.msg, {
48 position: "right bottom"
49 });
50 }
51 }
52 }
53 );
54 }
55 });
56
57 jQuery('form#fleximp-license-key-form .next-step-activation').on('click', function (e) {
58 e.preventDefault();
59 jQuery('.demo-import-wrap').show();
60 jQuery('.license-key-wrap').hide();
61 });
62
63 jQuery('form#fleximp-license-key-form .deactivate-domain').on('click', function (e) {
64
65 var license_key = jQuery('form#fleximp-license-key-form').serializeArray()[0].value;
66
67 if (confirm('Are you sure you want to deactivate the key!')) {
68 jQuery.post(
69 localize_script_arr.ajaxurl, {
70 action: 'license_deactivate_fleximp',
71 wpnonce: localize_script_arr.wpnonce,
72 fleximp_license_key: license_key
73 },
74 function (data) {
75
76 if (data.status == true) {
77 location.reload(true);
78
79 jQuery.notify(data.msg, {
80 position: "right bottom",
81 className: "success"
82 });
83 } else {
84 jQuery.notify(data.msg, {
85 position: "right bottom"
86 });
87 }
88 }
89 );
90 }
91 });
92 });