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

Side by Side Diff: chrome/renderer/resources/neterror.js

Issue 916093003: Intersitial page updates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Optimise icons, update secondary button colour Created 5 years, 10 months 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
« no previous file with comments | « chrome/renderer/resources/neterror.css ('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 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 function toggleHelpBox() { 5 function toggleHelpBox() {
6 var helpBoxOuter = document.getElementById('details'); 6 var helpBoxOuter = document.getElementById('details');
7 helpBoxOuter.classList.toggle('hidden'); 7 helpBoxOuter.classList.toggle('hidden');
8 var detailsButton = document.getElementById('details-button'); 8 var detailsButton = document.getElementById('details-button');
9 if (helpBoxOuter.classList.contains('hidden')) 9 if (helpBoxOuter.classList.contains('hidden'))
10 detailsButton.innerText = detailsButton.detailsText; 10 detailsButton.innerText = detailsButton.detailsText;
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 document.getElementById('details').style.display = 'block'; 145 document.getElementById('details').style.display = 'block';
146 } 146 }
147 </if> 147 </if>
148 148
149 // Show control buttons. 149 // Show control buttons.
150 if (loadTimeData.valueExists('reloadButton') && 150 if (loadTimeData.valueExists('reloadButton') &&
151 loadTimeData.getValue('reloadButton').msg || 151 loadTimeData.getValue('reloadButton').msg ||
152 loadTimeData.valueExists('staleLoadButton') && 152 loadTimeData.valueExists('staleLoadButton') &&
153 loadTimeData.getValue('staleLoadButton').msg) { 153 loadTimeData.getValue('staleLoadButton').msg) {
154 controlButtonDiv.hidden = false; 154 controlButtonDiv.hidden = false;
155
156 // Set the secondary button state in the cases of two call to actions.
157 // Reload is secondary to stale load.
158 if (loadTimeData.valueExists('staleLoadButton') &&
159 loadTimeData.getValue('staleLoadButton').msg) {
160 reloadButton.classList.add('secondary-button');
161 }
155 } 162 }
156 163
157 // Add a main message paragraph. 164 // Add a main message paragraph.
158 if (loadTimeData.valueExists('primaryParagraph')) { 165 if (loadTimeData.valueExists('primaryParagraph')) {
159 var p = document.querySelector('#main-message p'); 166 var p = document.querySelector('#main-message p');
160 p.innerHTML = loadTimeData.getString('primaryParagraph'); 167 p.innerHTML = loadTimeData.getString('primaryParagraph');
161 p.hidden = false; 168 p.hidden = false;
162 } 169 }
163 } 170 }
164 171
165 document.addEventListener('DOMContentLoaded', onDocumentLoad); 172 document.addEventListener('DOMContentLoaded', onDocumentLoad);
OLDNEW
« no previous file with comments | « chrome/renderer/resources/neterror.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698