Skip to content

Commit df166bf

Browse files
committed
move no-js and ie6 warnings out of app.html.erb
did this because it was a waste to send it to every single page view. plus I hated seeing it in the firebug and web inspector fixes: #3874 Change-Id: I3e25cb78cddf9f8f897c81014bb07ca77ccfc361 Reviewed-on: https://gerrit.instructure.com/2363 Tested-by: Hudson <[email protected]> Reviewed-by: Ryan Shaw <[email protected]>
1 parent bf99eea commit df166bf

File tree

6 files changed

+41
-86
lines changed

6 files changed

+41
-86
lines changed

app/stylesheets/g_instructure.sass

-12
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
@import environment.sass
22

3-
#noscript
4-
background-color: white
5-
height: 100%
6-
left: 0
7-
padding: 30px
8-
position: absolute
9-
top: 0
10-
width: 100%
11-
z-index: 999999
12-
a
13-
text-decoration: underline
14-
153
#instructure_ajax_error_box
164
:display none
175
:position fixed

app/views/layouts/application.html.erb

+6-29
Original file line numberDiff line numberDiff line change
@@ -20,49 +20,26 @@
2020
<!DOCTYPE html>
2121
<html lang="en">
2222
<head>
23-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
24-
<meta http-equiv="X-UA-Compatible" content="chrome=1">
23+
<meta charset="utf-8">
24+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
2525
<title><%= yield :page_title || "Add a page title here." %></title>
26+
<noscript> <meta http-equiv=refresh content="0; URL=/javascript-is-required.html" /> </noscript>
27+
<!--[if lte IE 6]> <meta http-equiv=refresh content="0; URL=/ie-6-is-not-supported.html" /> <![endif]-->
2628

2729
<%= yield :auto_discovery %>
2830
<%= include_stylesheets :common, :media => "all" %>
2931
<% if @eportfolio_view === true %>
3032
<%= stylesheet_link_tag "compiled/instructure_eportfolio.css" %>
3133
<% end %>
3234
<%= include_stylesheets(*jammit_css_bundles) unless jammit_css_bundles.empty? %>
33-
<!--[if lte IE 8]>
34-
<%= javascript_include_tag "html5.js" %>
35-
<![endif]-->
36-
<!--[if lte IE 7]>
37-
<%= include_javascripts :ie7 %>
38-
<![endif]-->
35+
<!--[if lte IE 8]> <%= javascript_include_tag "html5.js" %> <![endif]-->
36+
<!--[if lte IE 7]> <%= include_javascripts :ie7 %> <![endif]-->
3937
<%= yield :stylesheets %>
4038
<% if @domain_root_account && @domain_root_account.settings[:global_stylesheet] %>
4139
<link href="<%= @domain_root_account.settings[:global_stylesheet] %>" media="all" rel="stylesheet" type="text/css" />
4240
<% end %>
4341
</head>
4442
<body class="<%= (@body_classes << @active_tab).uniq.join(" ") %>">
45-
<!--[if lte IE 6]>
46-
<style type="text/css" media="screen">
47-
* { display:none; }
48-
body, html, #block-ie6, #block-ie6 * { display: block !important;}
49-
</style>
50-
<div id="block-ie6">
51-
<h1>Internet Explorer version 6 is so outdated it is not supported on this website.</h1>
52-
<p>
53-
May we suggest some better, more modern browsers? <a href="http://getfirefox.com">download firefox here</a> or <a href="http://www.google.com/chrome">get Google Chrome here</a>.
54-
</p>
55-
</div>
56-
<![endif]-->
57-
<noscript>
58-
<div id="noscript">
59-
<h1>You need to have javascript enabled in order to access this site.</h1>
60-
<p>
61-
Perhaps you could try a different browser. You can get the latest version of firefox <a href="http://getfirefox.com">here.</a><br />
62-
Or, here are the <a href="http://www.enable-javascript.com" target="_blank"> instructions how to enable JavaScript in your web browser</a>.
63-
</p>
64-
</div>
65-
</noscript>
6643
<% unless @body_class_no_headers %>
6744
<div id="header" class="no-print <%= 'no-user' unless @current_user %>">
6845
<a href="#content" id="skip_navigation_link">Skip To Content</a>

public/404.html

+2-22
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,11 @@
33
<head>
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
55
<title>Page Not Found</title>
6+
<noscript> <meta http-equiv=refresh content="0; URL=/javascript-is-required.html" /> </noscript>
7+
<!--[if lte IE 6]> <meta http-equiv=refresh content="0; URL=/ie-6-is-not-supported.html" /> <![endif]-->
68
<link href="/assets/common.css?1274476615" media="all" rel="stylesheet" type="text/css" />
79
</head>
810
<body class="">
9-
<!--[if lte IE 6]>
10-
<style type="text/css" media="screen">
11-
* { display:none; }
12-
body, html, #block-ie6, #block-ie6 * { display: block !important;}
13-
</style>
14-
<div id="block-ie6">
15-
<h1>Internet Explorer version 6 is so outdated it is not supported on this website.</h1>
16-
<p>
17-
May we suggest some better, more modern browsers? <a href="http://getfirefox.com">download firefox here</a> or <a href="http://www.google.com/chrome">get Google Chrome here</a>.
18-
</p>
19-
</div>
20-
<![endif]-->
21-
<noscript>
22-
<div id="noscript">
23-
<h1>You need to have javascript enabled in order to access this site.</h1>
24-
<p>
25-
Perhaps you could try a different browser. You can get the latest version of firefox <a href="http://getfirefox.com">here.</a><br />
26-
Or, <a href="http://support.instructure.com">go to our support website</a> to get more help.
27-
</p>
28-
</div>
29-
</noscript>
30-
3111
<div id="header" class="no-print no-user">
3212
<b id="header-logo"></b>
3313
<a href="#content" id="skip_navigation_link">Skip To Content</a>

public/500.html

+3-23
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,12 @@
22
<html lang="en">
33
<head>
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
5-
<title>Page Error</title>
5+
<title>Page Error</title>
6+
<noscript> <meta http-equiv=refresh content="0; URL=/javascript-is-required.html" /> </noscript>
7+
<!--[if lte IE 6]> <meta http-equiv=refresh content="0; URL=/ie-6-is-not-supported.html" /> <![endif]-->
68
<link href="/assets/common.css?1274476615" media="all" rel="stylesheet" type="text/css" />
79
</head>
810
<body class="">
9-
<!--[if lte IE 6]>
10-
<style type="text/css" media="screen">
11-
* { display:none; }
12-
body, html, #block-ie6, #block-ie6 * { display: block !important;}
13-
</style>
14-
<div id="block-ie6">
15-
<h1>Internet Explorer version 6 is so outdated it is not supported on this website.</h1>
16-
<p>
17-
May we suggest some better, more modern browsers? <a href="http://getfirefox.com">download firefox here</a> or <a href="http://www.google.com/chrome">get Google Chrome here</a>.
18-
</p>
19-
</div>
20-
<![endif]-->
21-
<noscript>
22-
<div id="noscript">
23-
<h1>You need to have javascript enabled in order to access this site.</h1>
24-
<p>
25-
Perhaps you could try a different browser. You can get the latest version of firefox <a href="http://getfirefox.com">here.</a><br />
26-
Or, <a href="http://support.instructure.com">go to our support website</a> to get more help.
27-
</p>
28-
</div>
29-
</noscript>
30-
3111
<div id="header" class="no-print no-user">
3212
<b id="header-logo"></b>
3313
<a href="#content" id="skip_navigation_link">Skip To Content</a>

public/ie-6-is-not-supported.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Internet Explorer 6 is not supported on this website</title>
5+
</head>
6+
<body>
7+
<h1>Internet Explorer version 6 is so outdated it is not supported on this website.</h1>
8+
<p>
9+
May we suggest some better, more modern browsers? <a href="http://getfirefox.com">download firefox here</a> or <a href="http://www.google.com/chrome">get Google Chrome here</a>.
10+
</p>
11+
</div>
12+
</body>
13+
</html>

public/javascript-is-required.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>You need to have javascript enabled in order to access this site</title>
5+
</head>
6+
<body>
7+
8+
<div>
9+
<h1>You need to have javascript enabled in order to access this site.</h1>
10+
<p>
11+
Perhaps you could try a different browser. You can get the latest version of firefox <a href="http://getfirefox.com">here.</a><br />
12+
Or, here are the <a href="http://www.enable-javascript.com" target="_blank"> instructions how to enable JavaScript in your web browser</a>.
13+
</p>
14+
</div>
15+
16+
</body>
17+
</html>

0 commit comments

Comments
 (0)