From d6606fcb70e35bd853867969aae6203e61d5f04d Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 23 Jan 2017 11:56:01 +0000 Subject: [PATCH] Fix dashboard totals in older IE versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The layout of the totals on the dashboard was getting horizontally squashed on older versions of IE. This was something to do with the `grid-row` CSS class no longer being applied when AJAX updated the page. Grid columns don’t work properly unless they’re contained in a grid row. This commit wraps the `div` with `grid-row` in another `div`. Not totally sure why this works, but it’s something to do with how the DiffDOM algorithm is working. Seems like the simpler the diff it has to compute, the better chance it has of not messing things up. --- app/templates/views/dashboard/_totals.html | 46 +++++++++++----------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/app/templates/views/dashboard/_totals.html b/app/templates/views/dashboard/_totals.html index b7508aec1..d1cb19821 100644 --- a/app/templates/views/dashboard/_totals.html +++ b/app/templates/views/dashboard/_totals.html @@ -1,27 +1,29 @@ {% from "components/big-number.html" import big_number_with_status %} {% from "components/message-count-label.html" import message_count_label %} -
-
- {{ big_number_with_status( - statistics['email']['requested'], - message_count_label(statistics['email']['requested'], 'email', suffix=''), - statistics['email']['failed'], - statistics['email']['failed_percentage'], - statistics['email']['show_warning'], - failure_link=url_for(".view_notifications", service_id=service_id, message_type='email', status='failed'), - link=url_for(".view_notifications", service_id=service_id, message_type='email', status='sending,delivered,failed') - ) }} -
-
- {{ big_number_with_status( - statistics['sms']['requested'], - message_count_label(statistics['sms']['requested'], 'sms', suffix=''), - statistics['sms']['failed'], - statistics['sms']['failed_percentage'], - statistics['sms']['show_warning'], - failure_link=url_for(".view_notifications", service_id=service_id, message_type='sms', status='failed'), - link=url_for(".view_notifications", service_id=service_id, message_type='sms', status='sending,delivered,failed') - ) }} +
+
+
+ {{ big_number_with_status( + statistics['email']['requested'], + message_count_label(statistics['email']['requested'], 'email', suffix=''), + statistics['email']['failed'], + statistics['email']['failed_percentage'], + statistics['email']['show_warning'], + failure_link=url_for(".view_notifications", service_id=service_id, message_type='email', status='failed'), + link=url_for(".view_notifications", service_id=service_id, message_type='email', status='sending,delivered,failed') + ) }} +
+
+ {{ big_number_with_status( + statistics['sms']['requested'], + message_count_label(statistics['sms']['requested'], 'sms', suffix=''), + statistics['sms']['failed'], + statistics['sms']['failed_percentage'], + statistics['sms']['show_warning'], + failure_link=url_for(".view_notifications", service_id=service_id, message_type='sms', status='failed'), + link=url_for(".view_notifications", service_id=service_id, message_type='sms', status='sending,delivered,failed') + ) }} +