Add select option

This commit is contained in:
colymba 2012-09-05 21:36:05 +03:00
parent 2ba88c2108
commit ad919af544
2 changed files with 16 additions and 0 deletions

View File

@ -183,11 +183,16 @@ class GridFieldBulkManager implements GridField_HTMLProvider, GridField_ColumnPr
<a id="doBulkActionButton" href="'.$gridField->Link('bulkediting').'/edit'.'" data-url="'.$gridField->Link('bulkediting').'" class="action ss-ui-button cms-panel-link" data-icon="pencil">
GO
</a>';
$toggleSelectAllHTML = '
<span>Select all <input id="toggleSelectAll" type="checkbox" title="select all" name="toggleSelectAll" /></span>
';
$html = '<div id="bulkManagerOptions">'.
$dropDownActionList->FieldHolder().
//$actionButton->Field().
$actionButtonHTML.
$toggleSelectAllHTML.
'</div>';
return array(

View File

@ -48,6 +48,17 @@
}*/
});
$('#toggleSelectAll').entwine({
onmatch: function(){
},
onunmatch: function(){
},
onclick: function(){
var state = $(this).prop('checked');
$('td.col-bulkSelect input').each(function(){ $(this).prop('checked', state); });
}
});
$('select#bulkActionName').entwine({
onmatch: function(){
},