Skip to content

Commit

Permalink
Merge pull request #233 from 10up/fix/upload-message-when-done
Browse files Browse the repository at this point in the history
fix window title after image uploaded
  • Loading branch information
jeffpaul authored Jul 9, 2024
2 parents 3ec9959 + 1e11156 commit af2dc83
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
2 changes: 2 additions & 0 deletions js/src/windows-azure-storage-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@
window.setTimeout( function () {
get_upload_progress( item_id, item );
}, 1000 );
} else {
$( 'div.media-modal.wp-core-ui' ).find( 'div.media-frame-title > h1' ).text( azureStorageConfig.l10n.uploadReady );
}
} ).fail( function () {
window.setTimeout( function () {
Expand Down
2 changes: 2 additions & 0 deletions js/windows-azure-storage-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@
window.setTimeout( function () {
get_upload_progress( item_id, item );
}, 1000 );
} else {
$( 'div.media-modal.wp-core-ui' ).find( 'div.media-frame-title > h1' ).text( azureStorageConfig.l10n.uploadReady );
}
} ).fail( function () {
window.setTimeout( function () {
Expand Down
2 changes: 1 addition & 1 deletion js/windows-azure-storage-admin.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 11 additions & 6 deletions windows-azure-storage-dialog.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,18 @@
function windows_azure_storage_dialog_scripts( $hook_suffix ) {
$js_ext = ( ! defined( 'SCRIPT_DEBUG' ) || false === SCRIPT_DEBUG ) ? '.min.js' : '.js';
$css_ext = ( ! defined( 'SCRIPT_DEBUG' ) || false === SCRIPT_DEBUG ) ? '.min.css' : '.css';
wp_enqueue_script( 'windows-azure-storage-admin', MSFT_AZURE_PLUGIN_URL . 'js/windows-azure-storage-admin' . $js_ext, array(), MSFT_AZURE_PLUGIN_VERSION );
wp_enqueue_script( 'windows-azure-storage-admin', MSFT_AZURE_PLUGIN_URL . 'js/windows-azure-storage-admin' . $js_ext, array(), MSFT_AZURE_PLUGIN_VERSION, true );
wp_enqueue_style( 'windows-azure-storage-style', MSFT_AZURE_PLUGIN_URL . 'css/windows-azure-storage' . $css_ext, array(), MSFT_AZURE_PLUGIN_VERSION );
wp_localize_script( 'windows-azure-storage-admin', 'azureStorageConfig', array(
'l10n' => array(
'uploadingToAzure' => __( 'Uploading to Azure', 'windows-azure-storage' ),
),
) );
wp_localize_script(
'windows-azure-storage-admin',
'azureStorageConfig',
array(
'l10n' => array(
'uploadingToAzure' => __( 'Uploading to Azure', 'windows-azure-storage' ),
'uploadReady' => __( 'Attachment details', 'windows-azure-storage' ),
),
)
);
}

add_action( 'admin_enqueue_scripts', 'windows_azure_storage_dialog_scripts' );
Expand Down

0 comments on commit af2dc83

Please sign in to comment.