PluginProbe
WP-Stateless – Google Cloud Storage / 2.2.3
WP-Stateless – Google Cloud Storage v2.2.3
4.4.3 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.3.0 2.3.1 2.3.2 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.2.0 3.2.1 3.2.2 All 62 releases
wp-stateless / static / scripts / wp-stateless-uploads.js

wp-stateless-uploads.js in WP-Stateless – Google Cloud Storage 2.2.3, at static/scripts/wp-stateless-uploads.js

37 lines 888 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Uploads Page specific scripts.
3 *
4 * @author korotkov@UD
5 */
6
7 jQuery(document).ready(function(){
8
9 jQuery('.sm_inline_sync').one( 'click', function( e ) {
10
11 var that = jQuery(this);
12
13 that.html('Please wait...');
14
15 jQuery
16 .ajax({
17 method: 'POST',
18 url: ajaxurl,
19 data: {
20 action: that.data('type') == 'image' ? "stateless_process_image" : "stateless_process_file",
21 id: that.data('id')
22 }
23 })
24 .done(function( response ) {
25 if ( response.success ) {
26 that.replaceWith( '<span style="color:#00520a">'+response.data+'</span>' );
27 } else {
28 that.replaceWith( '<span style="color:#a00">'+response.data+'</span>' );
29 }
30 })
31 .fail(function( jqXHR, textStatus, message ) {
32 that.replaceWith( '<span style="color:#a00">'+message+'. Check your server configuration.</span>' );
33 });
34 });
35
36 });
37