vzex Posted July 4, 2017 Posted July 4, 2017 After too many clicks to disable states around the world when I only wanted US states found this fix to add bulk actions: for states selection in file admin\themes\default\template\controllers\states\helpers\list\list_footer.tpl after on line 43 for countries selection in admin\themes\default\template\controllers\countries\helpers\list\list_footer.tpl after on line 41 <div class="col-lg-8"> {if $bulk_actions} <div class="btn-group bulk-actions"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> {l s='Bulk actions'} <span class="caret"></span> </button> <ul class="dropdown-menu"> <li> <a href="#" onclick="javascript:checkDelBoxes($(this).closest('form').get(0), '{$table}Box[]', true);return false;"> <i class="icon-check-sign"></i> {l s='Select all'} </a> </li> <li> <a href="#" onclick="javascript:checkDelBoxes($(this).closest('form').get(0), '{$table}Box[]', false);return false;"> <i class="icon-check-empty"></i> {l s='Unselect all'} </a> </li> <li class="divider"></li> {foreach $bulk_actions as $key => $params} <li{if $params.text == 'divider'} class="divider"{/if}> {if $params.text != 'divider'} <a href="#" onclick="{if isset($params.confirm)}if (confirm('{$params.confirm}')){/if}sendBulkAction($(this).closest('form').get(0), 'submitBulk{$key}{$table}');"> {if isset($params.icon)}<i class="{$params.icon}"></i>{/if} {$params.text} </a> {/if} </li> {/foreach} </ul> </div> {/if} </div>
0 vzex Posted July 5, 2017 Author Posted July 5, 2017 Nice! Wasn't really a bug so I guess it's in the wrong place, just a missing convenience :)
Question
vzex
After too many clicks to disable states around the world when I only wanted US states found this fix to add bulk actions:
for states selection in file admin\themes\default\template\controllers\states\helpers\list\list_footer.tpl after
for countries selection in admin\themes\default\template\controllers\countries\helpers\list\list_footer.tpl after
<div class="col-lg-8"> {if $bulk_actions} <div class="btn-group bulk-actions"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> {l s='Bulk actions'} <span class="caret"></span> </button> <ul class="dropdown-menu"> <li> <a href="#" onclick="javascript:checkDelBoxes($(this).closest('form').get(0), '{$table}Box[]', true);return false;"> <i class="icon-check-sign"></i> {l s='Select all'} </a> </li> <li> <a href="#" onclick="javascript:checkDelBoxes($(this).closest('form').get(0), '{$table}Box[]', false);return false;"> <i class="icon-check-empty"></i> {l s='Unselect all'} </a> </li> <li class="divider"></li> {foreach $bulk_actions as $key => $params} <li{if $params.text == 'divider'} class="divider"{/if}> {if $params.text != 'divider'} <a href="#" onclick="{if isset($params.confirm)}if (confirm('{$params.confirm}')){/if}sendBulkAction($(this).closest('form').get(0), 'submitBulk{$key}{$table}');"> {if isset($params.icon)}<i class="{$params.icon}"></i>{/if} {$params.text} </a> {/if} </li> {/foreach} </ul> </div> {/if} </div>