﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
9676,Bulk action request not properly caught,gmpfree,,"'''description''':

the bulk action button ''at the bottom'' of Media Library is not working as intended. 

'''symptom''':

no warning alert before mass-delete & unable to mass-attach images to a post.

'''steps to reproduce''':

1. navigate to /wp-admin/upload.php (add ?detached=1 to test mass-attach function).

2. use the bulk action button ''at the bottom'' of this page.

3. ""delete"" will produce no alert; ""attach"" will only refresh the page.

'''Cause''':

{{{
<div class=""alignleft actions"">
<select name=""action2"" class=""select-action"">
<option value=""-1"" selected=""selected"">Bulk Actions</option>
<option value=""delete"">Delete</option>
<option value=""attach"">Attach to a post</option>
</select>
<input type=""submit"" value=""Apply"" name=""doaction2"" id=""doaction2"" class=""button-secondary action"" />
</div>

}}}


select form at the bottom has name ""action2"", which is not caught by the following code on the same page.

{{{
(function($){
	$(document).ready(function(){
		$('#doaction, #doaction2').click(function(e){
			if ( $('select[name^=""action""]').val() == 'delete' ) {
				var m = 'You are about to delete the selected attachments.\n  \'Cancel\' to stop, \'OK\' to delete.';
				return showNotice.warn(m);
			} else if ( $('select[name^=""action""]').val() == 'attach' ) {
				e.preventDefault();
				findPosts.open();
			}
		});
	});
})(jQuery);
}}}

I haven't had the time to digg out where the code lies though.
",defect (bug),closed,normal,2.8,Media,2.7.1,normal,fixed,,
