| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 cr.define('help', function() { | 5 cr.define('help', function() { |
| 6 var Page = cr.ui.pageManager.Page; | 6 var Page = cr.ui.pageManager.Page; |
| 7 var PageManager = cr.ui.pageManager.PageManager; | 7 var PageManager = cr.ui.pageManager.PageManager; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Encapsulated handling of the About page. Called 'help' internally to avoid | 10 * Encapsulated handling of the About page. Called 'help' internally to avoid |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 158 |
| 159 // Unhide the regulatory label if/when the image loads. | 159 // Unhide the regulatory label if/when the image loads. |
| 160 $('regulatory-label').onload = function() { | 160 $('regulatory-label').onload = function() { |
| 161 $('regulatory-label-container').hidden = false; | 161 $('regulatory-label-container').hidden = false; |
| 162 }; | 162 }; |
| 163 } | 163 } |
| 164 | 164 |
| 165 var logo = $('product-logo'); | 165 var logo = $('product-logo'); |
| 166 logo.onclick = function(e) { | 166 logo.onclick = function(e) { |
| 167 logo.classList.remove('spin'); | 167 logo.classList.remove('spin'); |
| 168 setTimeout(function() { logo.classList.add('spin'); }, 0); | 168 // Force a style recalc that cancels the animation specified by "spin". |
| 169 getComputedStyle(logo).getPropertyValue('animation-name'); |
| 170 logo.classList.add('spin'); |
| 169 }; | 171 }; |
| 170 | 172 |
| 171 // Attempt to update. | 173 // Attempt to update. |
| 172 chrome.send('onPageLoaded'); | 174 chrome.send('onPageLoaded'); |
| 173 }, | 175 }, |
| 174 | 176 |
| 175 /** @override */ | 177 /** @override */ |
| 176 didClosePage: function() { | 178 didClosePage: function() { |
| 177 this.setMoreInfoVisible_(false); | 179 this.setMoreInfoVisible_(false); |
| 178 }, | 180 }, |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 HelpPage.setRegulatoryLabelText = function(text) { | 673 HelpPage.setRegulatoryLabelText = function(text) { |
| 672 assert(cr.isChromeOS); | 674 assert(cr.isChromeOS); |
| 673 HelpPage.getInstance().setRegulatoryLabelText_(text); | 675 HelpPage.getInstance().setRegulatoryLabelText_(text); |
| 674 }; | 676 }; |
| 675 | 677 |
| 676 // Export | 678 // Export |
| 677 return { | 679 return { |
| 678 HelpPage: HelpPage | 680 HelpPage: HelpPage |
| 679 }; | 681 }; |
| 680 }); | 682 }); |
| OLD | NEW |