Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Side by Side Diff: chrome/browser/resources/offline_load.html

Issue 5283002: Addressing the comment in codereview.chromium.org/5151006. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: timer fix Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/offline/offline_load_page.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html id="template_root" i18n-values="dir:textdirection"> 2 <html id="template_root" i18n-values="dir:textdirection">
3 <head> 3 <head>
4 <title i18n-content="title"> 4 <title i18n-content="title">
5 </title> 5 </title>
6 <style> 6 <style>
7 html { 7 html {
8 height: 100%; 8 height: 100%;
9 } 9 }
10 body { 10 body {
11 color: #000; 11 color: #000;
12 font-family: Helvetica, Arial, sans-serif; 12 font-family: Helvetica, Arial, sans-serif;
13 background-image: -webkit-gradient( 13 background-image: -webkit-gradient(
14 linear, 14 linear,
15 left bottom, 15 left bottom,
16 left top, 16 left top,
17 color-stop(0, rgb(236,244,255)), 17 color-stop(0, rgb(236,244,255)),
18 color-stop(0.50, rgb(255,255,255)) 18 color-stop(0.50, rgb(255,255,255))
19 ); 19 );
20 height: 100%; 20 height: 100%;
21 padding: 0px; 21 padding: 0;
22 margin: 0px; 22 margin: 0;
23 display: -webkit-box; 23 display: -webkit-box;
24 -webkit-box-orient: horizontal; 24 -webkit-box-orient: horizontal;
25 } 25 -webkit-box-pack: center;
26 26 visibility: hidden;
27 #spacer {
28 -webkit-box-flex: 0.5;
29 } 27 }
30 28
31 #error { 29 #error {
32 margin-top: 150px; 30 margin-top: 150px;
33 font-size: 24px; 31 font-size: 16px;
34 -webkit-box-flex: 1;
35 display: -webkit-box; 32 display: -webkit-box;
33 width : 800px;
34 max-width: 80%;
36 -webkit-box-orient: horizontal; 35 -webkit-box-orient: horizontal;
37 max-width : 800px;
38 width: 80%;
39 } 36 }
40 37
41 #error img { 38 #error img {
42 margin-right: 10px;
43 vertical-align: middle; 39 vertical-align: middle;
40 width: 96px;
41 height: 96px;
42 -webkit-margin-end: 10px;
44 -webkit-box-flex: 0; 43 -webkit-box-flex: 0;
45 } 44 }
46 45
47 #error #msg_box { 46 #error #msg_box {
48 vertical-align: middle; 47 vertical-align: middle;
49 -webkit-box-flex: 1; 48 -webkit-box-flex: 1;
50 } 49 }
51 50
52 #heading { 51 </style>
53 font-weight: bold; 52 <script src="shared/js/local_strings.js"></script>
54 } 53 <script>
54 var localStrings = new LocalStrings();
55 55
56 #msg {
57 font-size: 16px;
58 }
59
60 #msg_box a {
61 font-size: 16px;
62 }
63
64 </style>
65 <script>
66 function sendCommand(cmd) { 56 function sendCommand(cmd) {
67 window.domAutomationController.setAutomationId(1); 57 window.domAutomationController.setAutomationId(1);
68 window.domAutomationController.send(cmd); 58 window.domAutomationController.send(cmd);
69 } 59 }
70 // Show the offline page. 60 // Show the offline page.
71 function showPage() { 61 function showPage() {
72 document.body.style.visibility = 'visible'; 62 document.body.style.visibility = 'visible';
73 } 63 }
74 // Start the timer to show the page. 64 document.addEventListener('DOMContentLoaded', function() {
75 function startTimer(time) { 65 var timeToWait = localStrings.getString('timeToWait');
76 // wait 2.5 seconds before showing 'load now', 'go back' button. 66 window.setTimeout(showPage, timeToWait);
77 setTimeout('showPage()', time); 67 });
78 }
79 </script> 68 </script>
80 </head> 69 </head>
81 70
82 <body oncontextmenu="return false;" jsvalues="onload:on_load"> 71 <body oncontextmenu="return false;">
83 <div id="spacer"> </div> 72 <div id="error" i18n-values=".title:url">
84 <div id="error" jsvalues=".title:url"> 73 <img i18n-values=".src:icon;.style.display:display_icon">
85 <img i18n-values=".src:icon;.style.display:display_icon"
86 width="96" height="96">
87 <div id="msg_box"> 74 <div id="msg_box">
88 <div id="headling" i18n-values=".innerText:heading"></div> 75 <h3 i18n-content="heading"></h3>
89 <div id="msg" i18n-values=".innerHTML:msg"></div> 76 <div id="msg" i18n-values=".innerHTML:msg"></div>
90 77
91 <button id="continue_button" i18n-content="load_button" 78 <button id="continue_button" i18n-content="load_button"
92 onclick="sendCommand('proceed')"> 79 onclick="sendCommand('proceed')">
93 </button> 80 </button>
94 <button id="cancel_button" i18n-content="cancel_button" 81 <button id="cancel_button" i18n-content="cancel_button"
95 i18n-values=".style.display:display_cancel" 82 i18n-values=".style.display:display_cancel"
96 onclick="sendCommand('dontproceed')"> 83 onclick="sendCommand('dontproceed')">
97 </button> 84 </button>
98 <a href="chrome://settings/internet" 85 <a href="chrome://settings/internet"
99 onclick="sendCommand('open_network_settings')" 86 onclick="sendCommand('open_network_settings')"
100 i18n-content="network_settings"> 87 i18n-content="network_settings">
101 </a> 88 </a>
102 </div> 89 </div>
103 </div> 90 </div>
104 <div id="spacer"> </div>
105 </body> 91 </body>
106 </html> 92 </html>
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/offline/offline_load_page.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698