Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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').hidden = true; | |
| 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(); | |
|
arv (Not doing code reviews)
2014/09/16 14:20:20
Wrong indentation. When you line break after funct
edwardjung
2014/09/17 12:12:34
Done.
| |
| 139 if (document.querySelector('.icon-offline')) { | |
| 140 document.body.classList.add('offline'); | |
| 141 new Runner('.interstitial-wrapper'); | |
| 142 } | |
| 143 }); | |
| OLD | NEW |