diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-05-03 11:08:05 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-05-03 11:08:05 +0100 |
commit | 1a84ff9e9c0675f9487da08e7f5d11088a5d79f8 (patch) | |
tree | 93940979281a13e2e05c41a7a27ae55791bfec49 | |
parent | 85cdf1d51ad06836f824a1053924185b7bc8f236 (diff) | |
parent | 536fdcd39d0d6bd76954d6baa672a3b7f266d155 (diff) |
Merge branch 'drop-ie7'
26 files changed, 58 insertions, 295 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 31129d394..9432566db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,7 @@ - Add some Cypress browser-based testing. - Upgrade Vagrantfile to use Ubuntu Xenial. #2093 - Add validation to cobrand-specific custom reporting fields. + - Drop support for IE7, improve IE8 support. #2114 * v2.3.1 (12th February 2018) - Front end improvements: diff --git a/templates/web/angus/header.html b/templates/web/angus/header.html index 1814045cb..4b3d043a4 100644 --- a/templates/web/angus/header.html +++ b/templates/web/angus/header.html @@ -4,8 +4,7 @@ # SET html_att = html_att _ ' dir="rtl"'; -%] <!doctype html> -<!--[if IE 7]> <html class="no-js ie7 iel8"[% html_att %]><![endif]--> -<!--[if IE 8]> <html class="no-js ie8 iel8"[% html_att %]><![endif]--> +<!--[if IE 8]> <html class="no-js ie8"[% html_att %]><![endif]--> <!--[if IE 9]> <html class="no-js ie9"[% html_att %]><![endif]--> <!--[if gt IE 9]><!--><html class="no-js"[% html_att %]><!--<![endif]--> <head> diff --git a/templates/web/base/common_header_tags.html b/templates/web/base/common_header_tags.html index 153272cf7..69b155a9e 100644 --- a/templates/web/base/common_header_tags.html +++ b/templates/web/base/common_header_tags.html @@ -14,7 +14,7 @@ <script nonce="[% csp_nonce %]"> window.Modernizr=function(e,t,n){function r(e){p.cssText=e}function o(e,t){return typeof e===t}var a,i,c,l="2.8.3",s={},u=t.documentElement,d="modernizr",f=t.createElement(d),p=f.style,m=({}.toString,{}),h=[],y=h.slice,v=function(e,n,r,o){var a,i,c,l,s=t.createElement("div"),f=t.body,p=f||t.createElement("body");if(parseInt(r,10))for(;r--;)c=t.createElement("div"),c.id=o?o[r]:d+(r+1),s.appendChild(c);return a=["­",'<style id="s',d,'">',e,"</style>"].join(""),s.id=d,(f?s:p).innerHTML+=a,p.appendChild(s),f||(p.style.background="",p.style.overflow="hidden",l=u.style.overflow,u.style.overflow="hidden",u.appendChild(p)),i=n(s,e),f?s.parentNode.removeChild(s):(p.parentNode.removeChild(p),u.style.overflow=l),!!i},g=function(t){var n=e.matchMedia||e.msMatchMedia;if(n)return n(t)&&n(t).matches||!1;var r;return v("@media "+t+" { #"+d+" { position: absolute; } }",function(t){r="absolute"==(e.getComputedStyle?getComputedStyle(t,null):t.currentStyle).position}),r},b={}.hasOwnProperty;c=o(b,"undefined")||o(b.call,"undefined")?function(e,t){return t in e&&o(e.constructor.prototype[t],"undefined")}:function(e,t){return b.call(e,t)};for(var E in m)c(m,E)&&(i=E.toLowerCase(),s[i]=m[E](),h.push((s[i]?"":"no-")+i));return r(""),f=a=null,s._version=l,s.mq=g,s.testStyles=v,s}(this,this.document); var fixmystreet=fixmystreet||{}; - (function(b){var a=b.documentElement;a.className=a.className.replace(/\bno-js\b/,"js");var c=-1<a.className.indexOf("iel8");c=Modernizr.mq("(min-width: 48em)")||c?"desktop":"mobile";b=b.getElementById("js-meta-data");"IntersectionObserver"in window&&(a.className+=" lazyload");fixmystreet.page=b.getAttribute("data-page");fixmystreet.cobrand=b.getAttribute("data-cobrand");"mobile"==c&&(a.className+=" mobile","around"==fixmystreet.page&&(a.className+=" map-fullscreen only-map map-reporting"))})(document); + (function(b){var a=b.documentElement;a.className=a.className.replace(/\bno-js\b/,"js");var c=-1<a.className.indexOf("ie8");c=Modernizr.mq("(min-width: 48em)")||c?"desktop":"mobile";b=b.getElementById("js-meta-data");"IntersectionObserver"in window&&(a.className+=" lazyload");fixmystreet.page=b.getAttribute("data-page");fixmystreet.cobrand=b.getAttribute("data-cobrand");"mobile"==c&&(a.className+=" mobile","around"==fixmystreet.page&&(a.className+=" map-fullscreen only-map map-reporting"))})(document); </script> diff --git a/templates/web/base/header.html b/templates/web/base/header.html index 3cc166a32..7f423ff9e 100644 --- a/templates/web/base/header.html +++ b/templates/web/base/header.html @@ -4,8 +4,7 @@ # SET html_att = html_att _ ' dir="rtl"'; -%] <!doctype html> -<!--[if IE 7]> <html class="no-js ie7 iel8"[% html_att %]><![endif]--> -<!--[if IE 8]> <html class="no-js ie8 iel8"[% html_att %]><![endif]--> +<!--[if IE 8]> <html class="no-js ie8"[% html_att %]><![endif]--> <!--[if IE 9]> <html class="no-js ie9"[% html_att %]><![endif]--> <!--[if gt IE 9]><!--><html class="no-js"[% html_att %] [% IF appcache ~%] diff --git a/templates/web/fiksgatami/header.html b/templates/web/fiksgatami/header.html index 7c73f6060..2d0f163e7 100644 --- a/templates/web/fiksgatami/header.html +++ b/templates/web/fiksgatami/header.html @@ -1,6 +1,5 @@ <!doctype html> -<!--[if IE 7]> <html class="no-js ie7 iel8" lang="[% lang_code %]"><![endif]--> -<!--[if IE 8]> <html class="no-js ie8 iel8" lang="[% lang_code %]"><![endif]--> +<!--[if IE 8]> <html class="no-js ie8" lang="[% lang_code %]"><![endif]--> <!--[if IE 9]> <html class="no-js ie9" lang="[% lang_code %]"><![endif]--> <!--[if gt IE 9]><!--><html class="no-js" lang="[% lang_code %]"><!--<![endif]--> <head> diff --git a/templates/web/fixmystreet.com/header/css.html b/templates/web/fixmystreet.com/header/css.html index f0fe37200..00ec6befa 100644 --- a/templates/web/fixmystreet.com/header/css.html +++ b/templates/web/fixmystreet.com/header/css.html @@ -5,6 +5,11 @@ [% TRY %][% critical = INSERT "header/critical.auto.min.css" %][% CATCH file %][% END %] [% IF inline_css AND critical %] +<!--[if lt IE 9]> +<link rel="stylesheet" href="[% ol_css %]"> +<link rel="stylesheet" href="[% base_css %]"> +<![endif]--> +<!--[if gte IE 9]><!--> <style id="critical"> [% critical %] </style> @@ -14,13 +19,12 @@ <link id="preload_base_css" rel="preload" href="[% base_css %]" as="style"> <script nonce="[% csp_nonce %]"> /* If browser *does* support preload, use stylesheets when loaded */ -document.getElementById('preload_base_css').onload = function(){this.rel='stylesheet'}; -/*! loadCSS & rel=preload polyfill. [c]2017 Filament Group, Inc. MIT License */ -(function(a){var b=function(b,h,e){function c(a){if(f.body)return a();setTimeout(function(){c(a)})}function k(){d.addEventListener&&d.removeEventListener("load",k);d.media=e||"all"}var f=a.document,d=f.createElement("link");var p=f.styleSheets;d.rel="stylesheet";d.href=b;d.media="only x";c(function(){h.parentNode.insertBefore(d,h)});var l=function(a){for(var b=d.href,c=p.length;c--;)if(p[c].href=== -b)return a();setTimeout(function(){l(a)})};d.addEventListener&&d.addEventListener("load",k);l(k)};a.loadCSS=b})(this); -(function(a){var b={};b.support=function(){try{return a.document.createElement("link").relList.supports("preload")}catch(b){return!1}};b.poly=function(){for(var b=a.document.getElementsByTagName("link"),e=0;e<b.length;e++){var c=b[e];"preload"===c.rel&&"style"===c.getAttribute("as")&&(a.loadCSS(c.href,c,c.getAttribute("media")),c.rel=null)}};if(!b.support()){b.poly()}})(this); +document.getElementById('preload_base_css').onload = function(){this.onload=null;this.rel='stylesheet'}; +/*! loadCSS. [c]2017 Filament Group, Inc. MIT License */ +(function(){var e=function(a){function b(){a.removeEventListener("load",b);a.setAttribute("onload",null);a.media=c}var c=a.media||"all";a.addEventListener("load",b);setTimeout(function(){a.rel="stylesheet";a.media="only x"});setTimeout(b,3E3)};try{var d=document.createElement("link").relList.supports("preload")}catch(a){d=!1}d||function(){for(var a=document.getElementsByTagName("link"),b=0;b<a.length;b++){var c=a[b];"preload"===c.rel&&"style"===c.getAttribute("as")&&e(c)}}()})(); </script> <link rel="stylesheet" href="[% base_css %]" media="(min-width:48em)"> +<!--<![endif]--> [% ELSE %] <link rel="stylesheet" href="[% ol_css %]"> <link rel="stylesheet" href="[% base_css %]"> diff --git a/templates/web/hart/header.html b/templates/web/hart/header.html index 0aae5568b..a375fdb7d 100644 --- a/templates/web/hart/header.html +++ b/templates/web/hart/header.html @@ -1,6 +1,5 @@ <!doctype html> -<!--[if IE 7]> <html class="no-js ie7 iel8" lang="[% lang_code %]"><![endif]--> -<!--[if IE 8]> <html class="no-js ie8 iel8" lang="[% lang_code %]"><![endif]--> +<!--[if IE 8]> <html class="no-js ie8" lang="[% lang_code %]"><![endif]--> <!--[if IE 9]> <html class="no-js ie9" lang="[% lang_code %]"><![endif]--> <!--[if gt IE 9]><!--><html class="no-js" lang="[% lang_code %]"><!--<![endif]--> <head> diff --git a/templates/web/oxfordshire/header.html b/templates/web/oxfordshire/header.html index 0d3476195..c4824094a 100644 --- a/templates/web/oxfordshire/header.html +++ b/templates/web/oxfordshire/header.html @@ -1,6 +1,5 @@ <!doctype html> -<!--[if IE 7]> <html class="no-js ie7 iel8" lang="[% lang_code %]"><![endif]--> -<!--[if IE 8]> <html class="no-js ie8 iel8" lang="[% lang_code %]"><![endif]--> +<!--[if IE 8]> <html class="no-js ie8" lang="[% lang_code %]"><![endif]--> <!--[if IE 9]> <html class="no-js ie9" lang="[% lang_code %]"><![endif]--> <!--[if gt IE 9]><!--><html class="no-js" lang="[% lang_code %]" [% IF appcache ~%] diff --git a/templates/web/stevenage/header.html b/templates/web/stevenage/header.html index 219486a9e..0fe6dfed1 100644 --- a/templates/web/stevenage/header.html +++ b/templates/web/stevenage/header.html @@ -1,6 +1,5 @@ <!doctype html> -<!--[if IE 7]> <html class="no-js ie7 iel8" lang="[% lang_code %]"><![endif]--> -<!--[if IE 8]> <html class="no-js ie8 iel8" lang="[% lang_code %]"><![endif]--> +<!--[if IE 8]> <html class="no-js ie8" lang="[% lang_code %]"><![endif]--> <!--[if IE 9]> <html class="no-js ie9" lang="[% lang_code %]"><![endif]--> <!--[if gt IE 9]><!--><html class="no-js" lang="[% lang_code %]"><!--<![endif]--> <head> diff --git a/templates/web/warwickshire/header.html b/templates/web/warwickshire/header.html index 6ad06f69a..5470d401a 100644 --- a/templates/web/warwickshire/header.html +++ b/templates/web/warwickshire/header.html @@ -1,6 +1,5 @@ <!DOCTYPE html><!-- 3P header begins --> -<!--[if IE 7]> <html class="no-js iel8 lt-ie9 lt-ie8" ie7 lang="[% lang_code %]"> <![endif]--> -<!--[if IE 8]> <html class="no-js iel8 lt-ie9 ie8" lang="[% lang_code %]"> <![endif]--> +<!--[if IE 8]> <html class="no-js lt-ie9 ie8" lang="[% lang_code %]"> <![endif]--> <!--[if IE 9]> <html class="no-js ie9" lang="[% lang_code %]"><![endif]--> <!--[if gt IE 9]><!--> <html class="no-js" lang="[% lang_code %]"> <!--<![endif]--> diff --git a/templates/web/zurich/header.html b/templates/web/zurich/header.html index 117e44449..b453465f7 100644 --- a/templates/web/zurich/header.html +++ b/templates/web/zurich/header.html @@ -1,6 +1,5 @@ <!doctype html> -<!--[if IE 7]> <html class="no-js ie7 iel8" lang="[% lang_code %]"><![endif]--> -<!--[if IE 8]> <html class="no-js ie8 iel8" lang="[% lang_code %]"><![endif]--> +<!--[if IE 8]> <html class="no-js ie8" lang="[% lang_code %]"><![endif]--> <!--[if IE 9]> <html class="no-js ie9" lang="[% lang_code %]"><![endif]--> <!--[if gt IE 9]><!--><html class="no-js" lang="[% lang_code %]"><!--<![endif]--> <head> diff --git a/web/cobrands/angus/layout.scss b/web/cobrands/angus/layout.scss index 9429913b4..988f72df9 100644 --- a/web/cobrands/angus/layout.scss +++ b/web/cobrands/angus/layout.scss @@ -210,16 +210,6 @@ footer p.social a:active,footer p.social a:focus,footer p.social a:hover text-decoration:none; } -// No :before support in IE7, reset things back -.ie7 { - footer p.social a { - font-size:1.2em!important; - height:1.5em; - text-indent:0; - width:auto; - } -} - .angus_nav { display: block; border-bottom: 1px solid $angus_grey_link; diff --git a/web/cobrands/bromley/base.scss b/web/cobrands/bromley/base.scss index 768a3ec67..720dc1099 100644 --- a/web/cobrands/bromley/base.scss +++ b/web/cobrands/bromley/base.scss @@ -323,14 +323,6 @@ input.field, input.text, border-bottom: none!important; } -// Fix the A-Z menu in IE7 -.ie7 { - .main-a-z ul li { - display:block; - float:left; - } -} - // Bromley's breadcrumb .breadcrumb { width: 100%; diff --git a/web/cobrands/bromley/layout.scss b/web/cobrands/bromley/layout.scss index d308daa4b..b54af6df2 100644 --- a/web/cobrands/bromley/layout.scss +++ b/web/cobrands/bromley/layout.scss @@ -19,17 +19,6 @@ body.mappage { } } -// We have to specify this again for IE, since FMS overrides it -.iel8 { - body.fullwidthpage, - body.twothirdswidthpage { - #site-logo { - width: 159px; - height: 114px; - } - } -} - #main-nav { display: block; // remove flex so nav touches top of parent min-height: 0; // no vertical align, so no need for a height @@ -146,21 +135,16 @@ body.fullwidthpage .container .content footer .tablewrapper { .additional-links { float: left; width: 24%; - margin-left: 2%; - margin-right: 2%; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; - &:first-child, - &:last-child { - margin-left: 0%; - margin-right: 0%; - } li { padding: 0 1em; } } .footer-list2 { + margin-left: 2%; + margin-right: 2%; width: 48%; ul { overflow: auto; @@ -177,32 +161,3 @@ body.fullwidthpage .container .content footer .tablewrapper { } } } - -// Fix the footer in Old IE because it doesn't like last-child selectors -.iel8 { - .site-footer { - .column { - // Old IE won't float the social media links unless we force the width to be - // smaller and take a more traditional display/float tack. - .social ul li { - display: block; - width: 36px; - float: left; - } - .additional-links { - margin-left: 0%; - margin-right: 0%; - } - .footer-list2 { - margin-left: 2%; - margin-right: 2%; - } - .footer-list2 ul li, - .footer-list1 ul li { - // Old IE needs to know to float these for some reason - float: left; - } - } - } -} - diff --git a/web/cobrands/buckinghamshire/base.scss b/web/cobrands/buckinghamshire/base.scss index 2baf738bc..50cc1a03c 100644 --- a/web/cobrands/buckinghamshire/base.scss +++ b/web/cobrands/buckinghamshire/base.scss @@ -36,7 +36,7 @@ } .nav-menu { - a:hover, span.hover { + a:hover, span.report-a-problem-btn:hover { color: $bucks_green; } } diff --git a/web/cobrands/fixamingata/layout.scss b/web/cobrands/fixamingata/layout.scss index bae9cd89b..e02093b24 100644 --- a/web/cobrands/fixamingata/layout.scss +++ b/web/cobrands/fixamingata/layout.scss @@ -104,13 +104,6 @@ body.mappage { width: auto; } } -.ie7 { - .tablewrapper { - div { - width: auto; - } - } -} #footer-help { ul { @@ -123,15 +116,6 @@ body.mappage { } } } -.ie7 { - #footer-help { - ul { - li { - width: 33%; - } - } - } -} #postcodeForm { margin-left: -1em !important; margin-right: -1em !important; } diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js index b40e5ca01..60f15e0b8 100644 --- a/web/cobrands/fixmystreet/fixmystreet.js +++ b/web/cobrands/fixmystreet/fixmystreet.js @@ -190,15 +190,6 @@ fixmystreet.resize_to = { $(this).toggleClass('btn--forward btn--cancel'); }); } - - // On the front page, make it so that the "report a problem" menu item - // scrolls to the top of the page, and has a hover effect, rather than - // just being an innert span. - $('span.report-a-problem-btn').on('click.reportBtn', function() { - $('html, body').animate({scrollTop:0}, 500); - }).css({ cursor:'pointer' }).on('hover.reportBtn', function() { - $(this).toggleClass('hover'); - }); }, desktop_page: function() { @@ -209,10 +200,6 @@ fixmystreet.resize_to = { // been put into place by previous mobile UI. $('#report-a-problem-sidebar').show(); $('.rap-notes-trigger').remove(); - - // On a desktop, so reset the "Report a problem" nav item to act - // like an innert span again. - $('span.report-a-problem-btn').css({ cursor:'' }).off('.reportBtn'); } }; @@ -523,7 +510,7 @@ $.extend(fixmystreet.set_up, { on_resize: function() { var last_type; $(window).on('resize', function() { - var type = Modernizr.mq('(min-width: 48em)') || $('html.iel8').length ? 'desktop' : 'mobile'; + var type = Modernizr.mq('(min-width: 48em)') || $('html.ie8').length ? 'desktop' : 'mobile'; if (last_type == type) { return; } if (type == 'mobile') { fixmystreet.resize_to.mobile_page(); @@ -1232,6 +1219,7 @@ $(function() { $(window).on('load', function () { setTimeout(function () { + if (!window.addEventListener) { return; } window.addEventListener('popstate', function(e) { // The user has pressed the Back button, and there is a // stored History state for them to return to. diff --git a/web/cobrands/fixmystreet/header.js b/web/cobrands/fixmystreet/header.js index 103922b08..170073ce3 100644 --- a/web/cobrands/fixmystreet/header.js +++ b/web/cobrands/fixmystreet/header.js @@ -5,8 +5,8 @@ var fixmystreet = fixmystreet || {}; (function(D){ var E = D.documentElement; E.className = E.className.replace(/\bno-js\b/, 'js'); - var iel8 = E.className.indexOf('iel8') > -1; - var type = Modernizr.mq('(min-width: 48em)') || iel8 ? 'desktop' : 'mobile'; + var ie8 = E.className.indexOf('ie8') > -1; + var type = Modernizr.mq('(min-width: 48em)') || ie8 ? 'desktop' : 'mobile'; var meta = D.getElementById('js-meta-data'); if ('IntersectionObserver' in window) { E.className += ' lazyload'; diff --git a/web/cobrands/hart/hart.scss b/web/cobrands/hart/hart.scss index af2b79a50..d8f8599de 100644 --- a/web/cobrands/hart/hart.scss +++ b/web/cobrands/hart/hart.scss @@ -211,12 +211,6 @@ body.frontpage .table-cell .content { } } -// IE specific CSS -.ie7 { - div { zoom: 1; } - input.button { overflow: visible; } -} - // mySociety additions .hart-header { font-size: 12px; diff --git a/web/cobrands/sass/_base.scss b/web/cobrands/sass/_base.scss index bd5020cfc..4acd7c895 100644 --- a/web/cobrands/sass/_base.scss +++ b/web/cobrands/sass/_base.scss @@ -118,7 +118,7 @@ ol.big-numbers { font: { family: $meta-font; weight:bold; - size:2.5em; + size:2.5rem; } } } @@ -243,10 +243,6 @@ textarea { padding: 0.5em; font-size: 1em; line-height: 1em; - - .ie7 & { - max-width: 95%; - } } textarea { @@ -384,14 +380,6 @@ select.form-control { margin-top: 1.25em; } -// Prevent grey displaying oddly by giving it a width, and stop odd left margin issue -.ie7 .form-box { - width: 100%; - > input[type=text], input[type=email] { - margin-#{$left}: 2em; - } -} - .change_location { color: #666; padding-#{$left}: 20px; @@ -563,7 +551,7 @@ ul.error { a:visited { color: #333; } - a:hover, span.hover { + a:hover { background-color: #333; color: #fff; text-decoration: none; @@ -571,6 +559,14 @@ ul.error { span { background-color: #ccc; } + span.report-a-problem-btn { + cursor: pointer; + } + span.report-a-problem-btn:hover { + background-color: #333; + color: #fff; + text-decoration: none; + } } .shadow-wrap { @@ -653,22 +649,6 @@ ul.error { } } -//because display:table doesn't work we float -.ie7 { - #key-tools { - background: #f5f5f5; - - li { - float: $left; - } - - a { - padding-#{$left}: 1.5em; - padding-#{$right}: 3em; - } - } -} - #report-updates-data img { float: $right; } @@ -1382,16 +1362,8 @@ input.final-submit { #map { width: 100%; height: 100%; - - // IE7 doesn't understand 100% height when the parent height is "auto", - // so we have to explicitly tell it to pin the element to the top and - // bottom of the parent. No need for an ie7-specific condition, because - // this makes no difference in other browsers. - // We keep the "height: 100%" in there to give IE7 context for the 100% - // height on #map's child, div.olMapViewport. + // Needs to be position:absolute for the mobile banners to show on top position: absolute; - top: 0; - bottom: 0; } } diff --git a/web/cobrands/sass/_layout.scss b/web/cobrands/sass/_layout.scss index b70e646e3..e996dd123 100644 --- a/web/cobrands/sass/_layout.scss +++ b/web/cobrands/sass/_layout.scss @@ -132,6 +132,14 @@ h1 { span { color:$primary; } + /* Stop mobile-only things */ + span.report-a-problem-btn { + cursor: auto; + } + span.report-a-problem-btn:hover { + background-color: transparent; + color: $primary; + } } // .content Is the white box @@ -322,7 +330,7 @@ body.mappage.admin { // They will no longer stretch the full height of the sidebar, and the // width of #side-report will no longer match the width of .shadow-wrap // when a scrollbar is present. - .iel8 &, + .ie8 &, .ie9 & { @include clearfix(); @@ -420,7 +428,7 @@ body.fullwidthpage { } } -.iel8 { +.ie8 { body.twothirdswidthpage, body.fullwidthpage { .container .content footer a.platform-logo { @@ -509,20 +517,6 @@ body.authpage { } } -//fix table to be a block for ie, float the children -.ie7 { - .tablewrapper { - *zoom: 1; - display:block; - >div { - width:48%; - display:block; - float: $left; - border:none !important; - } - } -} - // adds border to the top and goes full width .bordered { margin:0 -1em; @@ -549,12 +543,6 @@ body.authpage { border-bottom:none; } } -.ie7 { - #footer-mobileapps { - margin:0 0.5em; - margin-#{$right}: 2%; - } -} #footer-help { border-#{$left}: 1em solid transparent; @@ -569,18 +557,6 @@ body.authpage { } } } -.ie7 { - #footer-help { - margin-#{$left}: 2%; - ul { - width:100%; - li { - float: $left; - width: 45%; - } - } - } -} // Openlayers map controls (overrides) #fms_pan_zoom_panup, @@ -787,7 +763,7 @@ body.authpage { padding-top: 0.5em; } } -.iel8 { +.ie8 { .big-green-banner { background-image: url(/cobrands/fixmystreet/images/chevron-white-#{$right}-on-green.gif); } @@ -962,16 +938,6 @@ textarea.form-error { border-right: none; } } -.ie7 #front-main { - #postcodeForm { - div { - input#pc { - height:1.5em; - width:16em; - } - } - } -} #front-howto { border-#{$right}: 1em solid transparent; @@ -994,14 +960,6 @@ textarea.form-error { } } } -.ie7 { - #front_stats { - div { - width:8em; - float: $left; - } - } -} #front-recently { border-#{$left}: 1em solid transparent; @@ -1012,17 +970,6 @@ textarea.form-error { margin-top:0; } -.ie7 { - .tablewrapper { - #front-howto { - margin-#{$right}: 2%; - } - #front-recently { - margin-#{$left}: 2%; - } - } -} - .alerts__columns { @include clearfix; @include flex-container(); diff --git a/web/cobrands/stevenage/_council_header_responsive.scss b/web/cobrands/stevenage/_council_header_responsive.scss index e65f097d9..b0d1a774d 100644 --- a/web/cobrands/stevenage/_council_header_responsive.scss +++ b/web/cobrands/stevenage/_council_header_responsive.scss @@ -53,13 +53,6 @@ float: none; height: auto; - // IE7 doesn't support table-cell - .ie7 & { - display: inline; - float: left; - width: 16.65%; - } - a { width: auto; padding: 6px 12px; diff --git a/web/cobrands/stevenage/layout.scss b/web/cobrands/stevenage/layout.scss index 93ab23268..4d045f00a 100644 --- a/web/cobrands/stevenage/layout.scss +++ b/web/cobrands/stevenage/layout.scss @@ -22,38 +22,14 @@ padding-bottom: 0.25em; background-color: #6b6969; @include linear-gradient(#6b6969, #555454); - - .iel8 & { - background-color: #6b6969; - } } #main-nav { - min-height: 0; + min-height: 1.9em; // Should be 0, but IE8 shrinks background as if floated, then margin-top: 0; float: none; } -// We use absolute positioning for the header on IE7, -// because IE7 doesn't support the table-caption styles. -// This means, we need to make sure page content doesn't -// disappear behind the header. -.ie7 { - .content { - margin-top: 10em; - } - - .frontpage { - #front-main { - margin-top: 15em; - } - - .content { - margin-top: 0; - } - } -} - .nav-menu { float: none; } @@ -156,22 +132,4 @@ body.mappage { a.report-a-problem-btn { color: #fff; } - - // _layout.scss adds 4em of padding to leave space for - // an absolutely positioned menu, but I can't tell what - // that means. Stevenage, at least, doesn't need it. - .wrapper { - .ie7 & { - padding-top: 0; - } - } - - // Not sure why IE7 has the old style of "inset" or "floating" - // sidebar on the map page, but this makes it stop! - .container { - .ie7 & { - margin-left: 0; - } - } - } diff --git a/web/js/front.js b/web/js/front.js index 8471972d4..67486888b 100644 --- a/web/js/front.js +++ b/web/js/front.js @@ -15,4 +15,11 @@ document.getElementById('pc').focus(); var link = around_links[i]; link.href = link.href + (link.href.indexOf('?') > -1 ? '&js=1' : '?js=1'); } + + var lk = document.querySelector('span.report-a-problem-btn'); + if (lk.addEventListener) { + lk.addEventListener('click', function(){ + scrollTo(0,0); + }); + } })(); diff --git a/web/js/geolocation.js b/web/js/geolocation.js index 3c2cf04df..fbef4d7ea 100644 --- a/web/js/geolocation.js +++ b/web/js/geolocation.js @@ -30,7 +30,7 @@ fixmystreet.geolocate = function(element, success_callback) { var link = document.getElementById('geolocate_link'); if (!link) { return; } var https = window.location.protocol.toLowerCase() === 'https:'; - if ('geolocation' in navigator && https) { + if ('geolocation' in navigator && https && window.addEventListener) { fixmystreet.geolocate(link, function(pos) { var latitude = pos.coords.latitude.toFixed(6); var longitude = pos.coords.longitude.toFixed(6); diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js index 7d0f9076e..a96e65953 100644 --- a/web/js/map-OpenLayers.js +++ b/web/js/map-OpenLayers.js @@ -8,7 +8,7 @@ $.extend(fixmystreet.utils, { if (!location.search) { return qs; } - location.search.substring(1).split(/[;&]/).forEach(function(i) { + $.each(location.search.substring(1).split(/[;&]/), function(n, i) { var s = i.split('='), k = s[0], v = s[1] && decodeURIComponent(s[1].replace(/\+/g, ' ')); @@ -330,20 +330,6 @@ $.extend(fixmystreet.utils, { fixmystreet.markers.refresh({force: true}); } - function parse_query_string() { - var qs = {}; - if (!location.search) { - return qs; - } - location.search.substring(1).split(/[&;]/).forEach(function(i) { - var s = i.split('='), - k = s[0], - v = s[1] && decodeURIComponent(s[1].replace(/\+/g, ' ')); - qs[k] = v; - }); - return qs; - } - function replace_query_parameter(qs, id, key) { var value = $('#' + id).val(); if (value) { |