PluginProbe
MainWP Dashboard: Self-hosted WordPress Management for Agencies / 6.2.2
MainWP Dashboard: Self-hosted WordPress Management for Agencies v6.2.2
6.2.2 6.2.1 6.2 6.1.8 6.1.7 6.1.6 6.1.5 6.1.4 6.1.3 6.1.2 6.1.1 6.1 6.0.12 6.0.11 4.6.0.1 5.0 5.0.1 5.0.2 5.0.3 5.0.3.1 5.0.3.2 5.1 5.1.1 5.2 5.2.1 All 155 releases
← All changes | modules/api-backups/assets/js/module-api-backups-manager.js +22 -25 5.2 → 6.2.2 View file →
@@ -148,9 +148,9 @@
148 148 });
149 149
150 150 // Trigger action_delete_backup.
151 151 jQuery('#mainwp_3rd_party_api_linode_action_cancel_backups').on('click', function () {
152 - let confirmMsg = __('Are you sure you want to Disable and Delete all existing backups from this Linode?');
152 + let confirmMsg = MainWP.I18n.t('Are you sure you want to Disable and Delete all existing backups from this Linode?');
153 153 mainwp_confirm(confirmMsg, function () {
154 154 linode_action_cancel_backups(this);
155 155 });
156 156 });
@@ -199,9 +199,9 @@
199 199 });
200 200
201 201 // Trigger action_restore_backup.
202 202 jQuery(document).on('click', '.mainwp_3rd_party_api_cpanel_action_restore_backup', function () {
203 - let confirmMsg = __('Are you sure you want to Restore this backup?');
203 + let confirmMsg = MainWP.I18n.t('Are you sure you want to Restore this backup?');
204 204 mainwp_confirm(confirmMsg, function () {
205 205 cPanel_action_restore_backup(this);
206 206 });
207 207 });
@@ -207,18 +207,17 @@
207 207 });
208 208
209 209 // Trigger action_restore_database_backup.
210 210 jQuery(document).on('click', '.mainwp_3rd_party_api_cpanel_action_restore_database_backup', function () {
211 - let confirmMsg = __('Are you sure you want to Restore this backup?');
212 - let btObj = this;
213 - mainwp_confirm(confirmMsg, function () {
214 - cpanel_action_restore_database_backup(btObj);
211 + let confirmMsg = MainWP.I18n.t('Are you sure you want to Restore this backup?');
212 + mainwp_confirm(confirmMsg, () => {
213 + cpanel_action_restore_database_backup(this);
215 214 });
216 215 });
217 216
218 217 // Trigger action_restore_manual_backup.
219 218 jQuery(document).on('click', '.mainwp_3rd_party_api_cpanel_action_restore_manual_backup', function () {
220 - let confirmMsg = __('Are you sure you want to Restore this backup?');
219 + let confirmMsg = MainWP.I18n.t('Are you sure you want to Restore this backup?');
221 220 mainwp_confirm(confirmMsg, function () {
222 221 cpanel_action_restore_manual_backup();
223 222 });
224 223 });
@@ -249,9 +248,9 @@
249 248 });
250 249
251 250 // Trigger action_restore_wptk_backup.
252 251 jQuery('.mainwp_3rd_party_api_cpanel_action_restore_wptk_backup').on('click', function () {
253 - let confirmMsg = __('Are you sure you want to Restore this backup?');
252 + let confirmMsg = MainWP.I18n.t('Are you sure you want to Restore this backup?');
254 253 mainwp_confirm(confirmMsg, function () {
255 254 cpanel_action_restore_wptk_backup(this);
256 255 });
257 256 });
@@ -257,9 +256,9 @@
257 256 });
258 257
259 258 // Trigger action_delete_wptk_backup.
260 259 jQuery('.mainwp_3rd_party_api_cpanel_action_delete_wptk_backup').on('click', function () {
261 - let confirmMsg = __('Are you sure you want to Delete this backup?');
260 + let confirmMsg = MainWP.I18n.t('Are you sure you want to Delete this backup?');
262 261 mainwp_confirm(confirmMsg, function () {
263 262 cpanel_action_delete_wptk_backup(this);
264 263 });
265 264 });
@@ -289,9 +288,9 @@
289 288 });
290 289
291 290 // Trigger action_restore_backup.
292 291 jQuery(document).on('click', '.mainwp_3rd_party_api_plesk_action_restore_backup', function () {
293 - let confirmMsg = __('Are you sure you want to Restore this backup?');
292 + let confirmMsg = MainWP.I18n.t('Are you sure you want to Restore this backup?');
294 293 mainwp_confirm(confirmMsg, function () {
295 294 plesk_action_restore_backup();
296 295 });
297 296 });
@@ -297,9 +296,9 @@
297 296 });
298 297
299 298 // Trigger action_delete_backup.
300 299 jQuery(document).on('click', '.mainwp_3rd_party_api_plesk_action_delete_backup', function () {
301 - let confirmMsg = __('Are you sure you want to Delete this backup?');
300 + let confirmMsg = MainWP.I18n.t('Are you sure you want to Delete this backup?');
302 301 mainwp_confirm(confirmMsg, function () {
303 302 plesk_action_delete_backup();
304 303 });
305 304 });
@@ -323,9 +322,9 @@
323 322 });
324 323
325 324 // Trigger action_delete_backup.
326 325 jQuery('.mainwp_3rd_party_api_kinsta_action_delete_backup').on('click', function () {
327 - let confirmMsg = __('Are you sure you want to Delete this backup?');
326 + let confirmMsg = MainWP.I18n.t('Are you sure you want to Delete this backup?');
328 327 let backupId = jQuery(this).attr('backup_id');
329 328 mainwp_confirm(confirmMsg, function () {
330 329 kinsta_action_delete_backup(this, backupId);
331 330 });
@@ -332,9 +331,9 @@
332 331 });
333 332
334 333 // Trigger action_restore_backup.
335 334 jQuery('.mainwp_3rd_party_api_kinsta_action_restore_backup').on('click', function () {
336 - let confirmMsg = __('Are you sure you want to Restore this backup?');
335 + let confirmMsg = MainWP.I18n.t('Are you sure you want to Restore this backup?');
337 336 let backupId = jQuery(this).attr('backup_id');
338 337 mainwp_confirm(confirmMsg, function () {
339 338 kinsta_action_restore_backup(this, backupId);
340 339 });
@@ -453,9 +452,9 @@
453 452 .html( 'A backup has been requested. Please allow some time for the backup to complete, then Refresh Available Backups.')
454 453 ;
455 454
456 455 setTimeout(function () {
457 - location.reload();
456 + mainwp_forceReload();
458 457 }, 5000);
459 458
460 459 } else {
461 460
@@ -465,9 +464,9 @@
465 464 .html('There was an issue while requesting your backup. Please check that your ID and API Key are correct.')
466 465 ;
467 466
468 467 setTimeout(function () {
469 - location.reload();
468 + mainwp_forceReload();
470 469 }, 5000);
471 470
472 471 }
473 472 });
@@ -718,9 +717,9 @@
718 717 jQuery('#mainwp-api-backups-message-zone').addClass('green').show();
719 718 jQuery('#mainwp-api-backups-message-zone .content .message')
720 719 .html('A backup has been requested.');
721 720 setTimeout(function () {
722 - location.reload();
721 + mainwp_forceReload();
723 722 }, 5000);
724 723
725 724 } else {
726 725 let err_message = '' !== response ? response : 'There was an issue while requesting your backup. Please check that your ID and API Key are correct.';
@@ -729,9 +728,9 @@
729 728 jQuery('#mainwp-api-backups-message-zone').addClass('red').show();
730 729 jQuery('#mainwp-api-backups-message-zone .content .message')
731 730 .html( err_message );
732 731 setTimeout(function () {
733 - location.reload();
732 + mainwp_forceReload();
734 733 }, 5000);
735 734
736 735 }
737 736 });
@@ -931,9 +930,9 @@
931 930 .html('A backup has been requested.')
932 931 ;
933 932
934 933 setTimeout(function () {
935 - location.reload();
934 + mainwp_forceReload();
936 935 }, 5000);
937 936
938 937 } else {
939 938
@@ -943,9 +942,9 @@
943 942 .html('There was an issue while requesting your backup. Please check that your ID and API Key are correct.' )
944 943 ;
945 944
946 945 setTimeout(function () {
947 - location.reload();
946 + mainwp_forceReload();
948 947 }, 5000);
949 948
950 949 }
951 950 });
@@ -1148,9 +1147,9 @@
1148 1147 .html('A backup has been requested.')
1149 1148 ;
1150 1149
1151 1150 setTimeout(function () {
1152 - location.reload();
1151 + mainwp_forceReload();
1153 1152 }, 5000);
1154 1153
1155 1154 } else {
1156 1155
@@ -1160,9 +1159,9 @@
1160 1159 .html('There was an issue while requesting your backup. Please check that your backups are enabled & ID\'s are correct.')
1161 1160 ;
1162 1161
1163 1162 setTimeout(function () {
1164 - location.reload();
1163 + mainwp_forceReload();
1165 1164 }, 5000);
1166 1165 }
1167 1166 });
1168 1167 };
@@ -1359,9 +1358,9 @@
1359 1358 .html('A backup has been requested.')
1360 1359 ;
1361 1360
1362 1361 setTimeout(function () {
1363 - location.reload();
1362 + mainwp_forceReload();
1364 1363 }, 5000);
1365 1364 } else {
1366 1365
1367 1366 // Show message.
@@ -1370,9 +1369,9 @@
1370 1369 .html('There was an issue while requesting your backup. Please check that your ID and API Key are correct.')
1371 1370 ;
1372 1371
1373 1372 setTimeout(function () {
1374 - location.reload();
1373 + mainwp_forceReload();
1375 1374 }, 5000);
1376 1375 }
1377 1376 });
1378 1377 };
@@ -2269,9 +2268,8 @@
2269 2268
2270 2269 // Delete Manual Backup.
2271 2270 let kinsta_action_delete_backup = function (pObj, backupId) {
2272 2271 let websiteId = jQuery('.mainwp_3rd_party_api_kinsta_action_delete_backup ').attr('website_id');
2273 - console.log(websiteId);
2274 2272 let data = mainwp_secure_data({
2275 2273 action: 'kinsta_action_delete_backup',
2276 2274 backup_id: backupId,
2277 2275 website_id: websiteId,
@@ -2282,9 +2280,8 @@
2282 2280 jQuery(pObj).addClass('disabled loading');
2283 2281
2284 2282 jQuery.post(ajaxurl, data, function (response) {
2285 2283 response = jQuery.trim(response);
2286 - console.log(response);
2287 2284 if (response === 'true') {
2288 2285
2289 2286 // Show message.
2290 2287 jQuery('#mainwp-api-backups-message-zone').addClass('green').show();