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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
155 moreInfo.addEventListener('webkitTransitionEnd', function(event) { | 155 moreInfo.addEventListener('webkitTransitionEnd', function(event) { |
156 $('more-info-expander').textContent = visible ? | 156 $('more-info-expander').textContent = visible ? |
157 loadTimeData.getString('showMoreInfo') : | 157 loadTimeData.getString('showMoreInfo') : |
158 loadTimeData.getString('hideMoreInfo'); | 158 loadTimeData.getString('hideMoreInfo'); |
159 }); | 159 }); |
160 }, | 160 }, |
161 | 161 |
162 /** | 162 /** |
163 * Assigns |method| to the onclick property of |el| if |el| exists. | 163 * Assigns |method| to the onclick property of |el| if |el| exists. |
164 * @param {HTMLElement} el The element on which to set the click handler. | 164 * @param {HTMLElement} el The element on which to set the click handler. |
165 * @param {function} method The click handler. | 165 * @param {function()} method The click handler. |
Dan Beam
2014/08/13 22:20:07
nit: Function instead
Vitaly Pavlenko
2014/08/14 00:01:02
Done.
| |
166 * @private | 166 * @private |
167 */ | 167 */ |
168 maybeSetOnClick_: function(el, method) { | 168 maybeSetOnClick_: function(el, method) { |
169 if (el) | 169 if (el) |
170 el.onclick = method; | 170 el.onclick = method; |
171 }, | 171 }, |
172 | 172 |
173 /** | 173 /** |
174 * @param {string} state The state of the update. | 174 * @param {string} state The state of the update. |
175 * private | 175 * private |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
509 | 509 |
510 HelpPage.updateChannelChangePageContainerVisibility = function() { | 510 HelpPage.updateChannelChangePageContainerVisibility = function() { |
511 HelpPage.getInstance().updateChannelChangePageContainerVisibility_(); | 511 HelpPage.getInstance().updateChannelChangePageContainerVisibility_(); |
512 }; | 512 }; |
513 | 513 |
514 // Export | 514 // Export |
515 return { | 515 return { |
516 HelpPage: HelpPage | 516 HelpPage: HelpPage |
517 }; | 517 }; |
518 }); | 518 }); |
OLD | NEW |