PluginProbe
MainWP Dashboard: Self-hosted WordPress Management for Agencies / 6.2.1
MainWP Dashboard: Self-hosted WordPress Management for Agencies v6.2.1
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.js +21 -3 5.1.1 → 6.2.1 View file →
@@ -101,9 +101,8 @@
101 101 let rsp = '';
102 102
103 103 if (response && !response.success) {
104 104 rsp = response.data;
105 - console.log(rsp);
106 105 // Check for gridPane error..
107 106 if (rsp && rsp['0'].code === 429) {
108 107 err_msg = 'API rate limit has been met. Please wait 30 seconds and try again.';
109 108 } else {
@@ -110,11 +109,11 @@
110 109 // Everything else. (API provided error message)
111 110 err_msg = rsp['0'].message;
112 111 }
113 112 } else if (response?.success) {
114 - succ_msg = __('Successfull');
113 + succ_msg = MainWP.I18n.t('Successful');
115 114 } else if (response?.error) { // Check for cPanel error..
116 - err_msg = __(response.error);
115 + err_msg = MainWP.I18n.t(response.error);
117 116 } else {
118 117 err_msg = _('Undefined error.');
119 118 }
120 119
@@ -140,5 +139,24 @@
140 139
141 140 }, 'json');
142 141 return false;
143 142 }
143 +
144 +let mainwp_api_backups_update_button_state = function () {
145 + let checkedCount = jQuery('#mainwp-3rd-party-backups-table tbody td.check-column INPUT[type=checkbox]:checked').length;
146 + if (checkedCount > 0) {
147 + jQuery('#action_backup_selected_sites').removeClass('disabled');
148 + } else {
149 + jQuery('#action_backup_selected_sites').addClass('disabled');
150 + }
151 +}
152 +
153 +jQuery(document).ready(function () {
154 + jQuery('#mainwp-3rd-party-backups-table').on('change', 'tbody td.check-column INPUT[type=checkbox]', function () {
155 + mainwp_api_backups_update_button_state();
156 + });
157 +
158 + jQuery('#cb-select-all-top').on('change', function () {
159 + mainwp_api_backups_update_button_state();
160 + });
161 +});
144 162