Changeset 47246
- Timestamp:
- 02/10/2020 08:17:58 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/admin/privacy-tools.js
r47122 r47246 60 60 $action = $this.parents( '.export-personal-data' ), 61 61 $requestRow = $this.parents( 'tr' ), 62 $progress = $requestRow.find( '.export-progress' ); 62 63 requestID = $action.data( 'request-id' ), 63 64 nonce = $action.data( 'nonce' ), … … 70 71 $action.blur(); 71 72 clearResultsAfterRow( $requestRow ); 73 setExportProgress( 0 ); 72 74 73 75 function onExportDoneSuccess( zipUrl ) { … … 78 80 appendResultsAfterRow( $requestRow, 'notice-success', summaryMessage, [] ); 79 81 $this.hide(); 80 82 81 83 if ( 'undefined' !== typeof zipUrl ) { 82 84 window.location = zipUrl; … … 91 93 appendResultsAfterRow( $requestRow, 'notice-error', strings.exportError, [ errorMessage ] ); 92 94 } 95 } 96 97 function setExportProgress( exporterIndex ) { 98 var progress = ( exportersCount > 0 ? exporterIndex / exportersCount : 0 ); 99 var progressString = Math.round( progress * 100 ).toString() + '%'; 100 $progress.html( progressString ); 93 101 } 94 102 … … 121 129 } else { 122 130 if ( exporterIndex < exportersCount ) { 131 setExportProgress( exporterIndex ); 123 132 setTimeout( doNextExport( exporterIndex + 1, 1 ) ); 124 133 } else { … … 142 151 $action = $this.parents( '.remove-personal-data' ), 143 152 $requestRow = $this.parents( 'tr' ), 153 $progress = $requestRow.find( '.erasure-progress' ); 144 154 requestID = $action.data( 'request-id' ), 145 155 nonce = $action.data( 'nonce' ), … … 153 163 $action.blur(); 154 164 clearResultsAfterRow( $requestRow ); 165 setErasureProgress( 0 ); 155 166 156 167 function onErasureDoneSuccess() { … … 182 193 setActionState( $action, 'remove-personal-data-failed' ); 183 194 appendResultsAfterRow( $requestRow, 'notice-error', strings.removalError, [] ); 195 } 196 197 function setErasureProgress( eraserIndex ) { 198 var progress = ( erasersCount > 0 ? eraserIndex / erasersCount : 0 ); 199 var progressString = Math.round( progress * 100 ).toString() + '%'; 200 $progress.html( progressString ); 184 201 } 185 202 … … 215 232 } else { 216 233 if ( eraserIndex < erasersCount ) { 234 setErasureProgress( eraserIndex ); 217 235 setTimeout( doNextErasure( eraserIndex + 1, 1 ) ); 218 236 } else { -
trunk/src/wp-admin/includes/class-wp-privacy-data-export-requests-list-table.php
r47198 r47246 58 58 59 59 $download_data_markup .= '<span class="export-personal-data-idle"><button type="button" class="button-link export-personal-data-handle">' . __( 'Download Personal Data' ) . '</button></span>' . 60 '<span class="export-personal-data-processing hidden">' . __( 'Downloading Data...' ) . ' </span>' .60 '<span class="export-personal-data-processing hidden">' . __( 'Downloading Data...' ) . ' <span class="export-progress"></span></span>' . 61 61 '<span class="export-personal-data-success hidden"><button type="button" class="button-link export-personal-data-handle">' . __( 'Download Personal Data Again' ) . '</button></span>' . 62 62 '<span class="export-personal-data-failed hidden">' . __( 'Download failed.' ) . ' <button type="button" class="button-link">' . __( 'Retry' ) . '</button></span>'; … … 101 101 ?> 102 102 <span class="export-personal-data-idle"><button type="button" class="button export-personal-data-handle"><?php _e( 'Send Export Link' ); ?></button></span> 103 <span class="export-personal-data-processing button updating-message hidden"><?php _e( 'Sending Email...' ); ?> </span>103 <span class="export-personal-data-processing button updating-message hidden"><?php _e( 'Sending Email...' ); ?> <span class="export-progress"></span></span> 104 104 <span class="export-personal-data-success success-message hidden"><?php _e( 'Email sent.' ); ?></span> 105 105 <span class="export-personal-data-failed hidden"><?php _e( 'Email could not be sent.' ); ?> <button type="button" class="button export-personal-data-handle"><?php _e( 'Retry' ); ?></button></span> -
trunk/src/wp-admin/includes/class-wp-privacy-data-removal-requests-list-table.php
r47198 r47246 63 63 64 64 $remove_data_markup .= '<span class="remove-personal-data-idle"><button type="button" class="button-link remove-personal-data-handle">' . __( 'Force Erase Personal Data' ) . '</button></span>' . 65 '<span class="remove-personal-data-processing hidden">' . __( 'Erasing Data...' ) . ' </span>' .65 '<span class="remove-personal-data-processing hidden">' . __( 'Erasing Data...' ) . ' <span class="erasure-progress"></span></span>' . 66 66 '<span class="remove-personal-data-success hidden">' . __( 'Erasure completed.' ) . '</span>' . 67 67 '<span class="remove-personal-data-failed hidden">' . __( 'Force Erasure has failed.' ) . ' <button type="button" class="button-link remove-personal-data-handle">' . __( 'Retry' ) . '</button></span>'; … … 107 107 ?> 108 108 <span class="remove-personal-data-idle"><button type="button" class="button remove-personal-data-handle"><?php _e( 'Erase Personal Data' ); ?></button></span> 109 <span class="remove-personal-data-processing button updating-message hidden"><?php _e( 'Erasing Data...' ); ?> </span>109 <span class="remove-personal-data-processing button updating-message hidden"><?php _e( 'Erasing Data...' ); ?> <span class="erasure-progress"></span></span> 110 110 <span class="remove-personal-data-success success-message hidden" ><?php _e( 'Erasure completed.' ); ?></span> 111 111 <span class="remove-personal-data-failed hidden"><?php _e( 'Data Erasure has failed.' ); ?> <button type="button" class="button remove-personal-data-handle"><?php _e( 'Retry' ); ?></button></span> -
trunk/tests/phpunit/tests/privacy/wpPrivacySendRequestConfirmationNotification.php
r47245 r47246 157 157 * @since 4.9.8 158 158 * 159 * @param string $admin_email 160 * @param WP_User_Request $request The request that is initiating the notification.159 * @param string $admin_email The email address of the notification recipient. 160 * @param WP_User_Request $request The request that is initiating the notification. 161 161 * @return string Admin email address. 162 162 */
Note: See TracChangeset
for help on using the changeset viewer.