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

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

Issue 545973003: Update network error template to new design (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove debug code from JS file. Created 6 years, 3 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
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('help-box-outer'); 6 var helpBoxOuter = document.getElementById('help-box-outer');
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 controlButtonDiv.insertBefore(primaryButton, secondaryButton); 119 controlButtonDiv.insertBefore(primaryButton, secondaryButton);
120 } else { 120 } else {
121 buttons.classList.add('suggested-right'); 121 buttons.classList.add('suggested-right');
122 controlButtonDiv.insertBefore(secondaryButton, primaryButton); 122 controlButtonDiv.insertBefore(secondaryButton, primaryButton);
123 } 123 }
124 124
125 if (reloadButton.style.display == 'none' && 125 if (reloadButton.style.display == 'none' &&
126 staleLoadButton.style.display == 'none') { 126 staleLoadButton.style.display == 'none') {
127 detailsButton.classList.add('singular'); 127 detailsButton.classList.add('singular');
128 } 128 }
129
130 // Hide the details button if there are no details to show.
131 if (templateData && templateData.summary && !templateData.summary.msg) {
132 document.getElementById('details-button').classList.add('hidden');
arv (Not doing code reviews) 2014/09/15 17:35:43 How about just using .hidden instead of class hidd
edwardjung 2014/09/16 13:14:30 Done. Thanks for the tip.
133 document.getElementById('help-box-outer').style.display = 'block';
134 }
129 } 135 }
130 document.addEventListener('DOMContentLoaded', setButtonLayout); 136
137 document.addEventListener('DOMContentLoaded', function() {
138 setButtonLayout();
139 if (document.querySelector('.icon-offline')) {
140 document.body.classList.add('offline');
141 new Runner('.interstitial-wrapper');
142 }
143 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698