WordPress.org

Make WordPress Core

Changeset 12353


Ignore:
Timestamp:
12/10/09 07:34:32 (4 years ago)
Author:
markjaquith
Message:

Show "Done" feedback after setting post thumbnail image. see #11140 (partial fix)

Location:
trunk/wp-admin/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/js/set-post-thumbnail.dev.js

    r12111 r12353  
    1212        } else { 
    1313            jQuery('a.wp-post-thumbnail').show(); 
    14             $link.hide(); 
     14            $link.text( setPostThumbnailL10n.done ); 
     15            $link.fadeOut( 2000 ); 
    1516            win.WPSetThumbnailID(id); 
    1617            win.WPSetThumbnailHTML(str); 
  • trunk/wp-admin/js/set-post-thumbnail.js

    r12111 r12353  
    1 function WPSetAsThumbnail(id){var $link=jQuery("#media-item-"+id+" a.wp-post-thumbnail");$link.text(setPostThumbnailL10n.saving);jQuery.post(ajaxurl,{action:"set-post-thumbnail",post_id:post_id,thumbnail_id:id,cookie:encodeURIComponent(document.cookie)},function(str){var win=window.dialogArguments||opener||parent||top;$link.text(setPostThumbnailL10n.setThumbnail);if(str=="0"){alert(setPostThumbnailL10n.error)}else{jQuery("a.wp-post-thumbnail").show();$link.hide();win.WPSetThumbnailID(id);win.WPSetThumbnailHTML(str)}})}; 
     1function WPSetAsThumbnail(id){var $link=jQuery("#media-item-"+id+" a.wp-post-thumbnail");$link.text(setPostThumbnailL10n.saving);jQuery.post(ajaxurl,{action:"set-post-thumbnail",post_id:post_id,thumbnail_id:id,cookie:encodeURIComponent(document.cookie)},function(str){var win=window.dialogArguments||opener||parent||top;$link.text(setPostThumbnailL10n.setThumbnail);if(str=="0"){alert(setPostThumbnailL10n.error)}else{jQuery("a.wp-post-thumbnail").show();$link.text(setPostThumbnailL10n.done);$link.fadeOut(2000);win.WPSetThumbnailID(id);win.WPSetThumbnailHTML(str)}})}; 
Note: See TracChangeset for help on using the changeset viewer.