doBulkActionButton only affect its own GridField

This commit is contained in:
colymba 2013-04-29 18:37:48 +03:00
parent e4f954583e
commit a8e2b2034e

View File

@ -107,7 +107,7 @@
action = $('select#bulkActionName').val(); action = $('select#bulkActionName').val();
if ( action == 'edit' ) if ( action == 'edit' )
{ {
$('.col-bulkSelect input:checked').each(function(){ $(this).parents('.ss-gridfield-table').find('td.col-bulkSelect input:checked').each(function(){
ids.push( parseInt( $(this).attr('name').split('_')[1] ) ); ids.push( parseInt( $(this).attr('name').split('_')[1] ) );
}); });
if(ids.length > 0) $(this).attr('href', $(this).data('url')+'/'+action+'?records[]='+ids.join('&records[]=') ); if(ids.length > 0) $(this).attr('href', $(this).data('url')+'/'+action+'?records[]='+ids.join('&records[]=') );
@ -122,7 +122,7 @@
url = $(this).data('url'); url = $(this).data('url');
cacheBuster = new Date().getTime(); cacheBuster = new Date().getTime();
$('.col-bulkSelect input:checked').each(function(){ $(this).parents('.ss-gridfield-table').find('td.col-bulkSelect input:checked').each(function(){
ids.push( parseInt( $(this).attr('name').split('_')[1] ) ); ids.push( parseInt( $(this).attr('name').split('_')[1] ) );
}); });
data.records = ids; data.records = ids;