Making order statuses easier to recognise

In PrestaShop 1.6, the current status of an order is displayed with a small coloured box in the Status column. This can make it difficult to recognise the order status at a glance.

PrestaShop 1.6 Orders tab
PrestaShop 1.6 Orders tab

It is possible to make order statuses easier to recognise by making the colour cover the entire row like this:

Modified PrestaShop 1.6 Orders tab
Modified PrestaShop 1.6 Orders tab

To do this, edit admin/themes/default/template/helpers/list/list_content.tpl and add the following to the bottom of the file:

<script type="text/javascript">
    $('.color_field').each(function() {
       $(this).parent().parent().children('td').css('background-color', $(this).css('background-color'));
       $(this).parent().parent().children('td').css('color', getBrightness($(this).css('background-color')) < 128 ? 'white' : '#383838');
    });
    
    function getBrightness(color)
    {
        var rgb = color.substring(4, color.length-1).replace(/ /g, '').split(',');        
        return ((rgb[0] * 299) + (rgb[1] * 587) + (rgb[2] * 114)) / 1000;
    }
</script>