diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php
index 90868dbbef..0ed4750c8a 100644
--- a/wp-admin/includes/template.php
+++ b/wp-admin/includes/template.php
@@ -1340,7 +1340,7 @@ function find_posts_div($found_action = '') {
-
+
true), 'objects' );
@@ -1356,7 +1356,7 @@ function find_posts_div($found_action = '') {
-
+
diff --git a/wp-admin/js/media.dev.js b/wp-admin/js/media.dev.js
index 92749daeac..3c221b35de 100644
--- a/wp-admin/js/media.dev.js
+++ b/wp-admin/js/media.dev.js
@@ -77,6 +77,14 @@ var findPosts;
if ( '' == $('#find-posts-response').html() )
e.preventDefault();
});
+ $( '#find-posts .find-box-search :input' ).keypress( function( event ) {
+ if ( 13 == event.which ) {
+ findPosts.send();
+ return false;
+ }
+ } );
+ $( '#find-posts-search' ).click( findPosts.send );
+ $( '#find-posts-close' ).click( findPosts.close );
$('#doaction, #doaction2').click(function(e){
$('select[name^="action"]').each(function(){
if ( $(this).val() == 'attach' ) {
diff --git a/wp-admin/js/media.js b/wp-admin/js/media.js
index 4d338a413a..d5bd85b995 100644
--- a/wp-admin/js/media.js
+++ b/wp-admin/js/media.js
@@ -1 +1 @@
-var findPosts;(function(a){findPosts={open:function(d,c){var b=document.documentElement.scrollTop||a(document).scrollTop();if(d&&c){a("#affected").attr("name",d).val(c)}a("#find-posts").show().draggable({handle:"#find-posts-head"}).css({top:b+50+"px",left:"50%",marginLeft:"-250px"});a("#find-posts-input").focus().keyup(function(f){if(f.which==27){findPosts.close()}});return false},close:function(){a("#find-posts-response").html("");a("#find-posts").draggable("destroy").hide()},send:function(){var b={ps:a("#find-posts-input").val(),action:"find_posts",_ajax_nonce:a("#_ajax_nonce").val()};var c;a("input[@name='itemSelect[]']:checked").each(function(){c=a(this).val()});b.post_type=c;a.ajax({type:"POST",url:ajaxurl,data:b,success:function(d){findPosts.show(d)},error:function(d){findPosts.error(d)}})},show:function(b){if(typeof(b)=="string"){this.error({responseText:b});return}var c=wpAjax.parseAjaxResponse(b);if(c.errors){this.error({responseText:wpAjax.broken})}c=c.responses[0];a("#find-posts-response").html(c.data)},error:function(b){var c=b.statusText;if(b.responseText){c=b.responseText.replace(/<.[^<>]*?>/g,"")}if(c){a("#find-posts-response").html(c)}}};a(document).ready(function(){a("#find-posts-submit").click(function(b){if(""==a("#find-posts-response").html()){b.preventDefault()}});a("#doaction, #doaction2").click(function(b){a('select[name^="action"]').each(function(){if(a(this).val()=="attach"){b.preventDefault();findPosts.open()}})})})})(jQuery);
\ No newline at end of file
+var findPosts;(function(a){findPosts={open:function(d,c){var b=document.documentElement.scrollTop||a(document).scrollTop();if(d&&c){a("#affected").attr("name",d).val(c)}a("#find-posts").show().draggable({handle:"#find-posts-head"}).css({top:b+50+"px",left:"50%",marginLeft:"-250px"});a("#find-posts-input").focus().keyup(function(f){if(f.which==27){findPosts.close()}});return false},close:function(){a("#find-posts-response").html("");a("#find-posts").draggable("destroy").hide()},send:function(){var b={ps:a("#find-posts-input").val(),action:"find_posts",_ajax_nonce:a("#_ajax_nonce").val()};var c;a("input[@name='itemSelect[]']:checked").each(function(){c=a(this).val()});b.post_type=c;a.ajax({type:"POST",url:ajaxurl,data:b,success:function(d){findPosts.show(d)},error:function(d){findPosts.error(d)}})},show:function(b){if(typeof(b)=="string"){this.error({responseText:b});return}var c=wpAjax.parseAjaxResponse(b);if(c.errors){this.error({responseText:wpAjax.broken})}c=c.responses[0];a("#find-posts-response").html(c.data)},error:function(b){var c=b.statusText;if(b.responseText){c=b.responseText.replace(/<.[^<>]*?>/g,"")}if(c){a("#find-posts-response").html(c)}}};a(document).ready(function(){a("#find-posts-submit").click(function(b){if(""==a("#find-posts-response").html()){b.preventDefault()}});a("#find-posts .find-box-search :input").keypress(function(b){if(13==b.which){findPosts.send();return false}});a("#find-posts-search").click(findPosts.send);a("#find-posts-close").click(findPosts.close);a("#doaction, #doaction2").click(function(b){a('select[name^="action"]').each(function(){if(a(this).val()=="attach"){b.preventDefault();findPosts.open()}})})})})(jQuery);
\ No newline at end of file
diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php
index bc11701ecf..10c0cd6c53 100644
--- a/wp-includes/script-loader.php
+++ b/wp-includes/script-loader.php
@@ -393,7 +393,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'list-revisions', "/wp-includes/js/wp-list-revisions$suffix.js", null, '20091223' );
- $scripts->add( 'media', "/wp-admin/js/media$suffix.js", array( 'jquery-ui-draggable' ), '20100524' );
+ $scripts->add( 'media', "/wp-admin/js/media$suffix.js", array( 'jquery-ui-draggable' ), '20101022' );
$scripts->add_data( 'media', 'group', 1 );
$scripts->add( 'image-edit', "/wp-admin/js/image-edit$suffix.js", array('jquery', 'json2', 'imgareaselect'), '20091111' );