OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <include src="../uber/uber_utils.js"> | 5 <include src="../uber/uber_utils.js"> |
6 | 6 |
7 cr.define('help', function() { | 7 cr.define('help', function() { |
8 /** | 8 /** |
9 * Encapsulated handling of the help page. | 9 * Encapsulated handling of the help page. |
10 */ | 10 */ |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 } else if (status == 'nearly_updated') { | 105 } else if (status == 'nearly_updated') { |
106 this.setUpdateImage_('up-to-date'); | 106 this.setUpdateImage_('up-to-date'); |
107 $('update-status').innerHTML = | 107 $('update-status').innerHTML = |
108 loadTimeData.getString('updateAlmostDone'); | 108 loadTimeData.getString('updateAlmostDone'); |
109 } else if (status == 'updated') { | 109 } else if (status == 'updated') { |
110 this.setUpdateImage_('up-to-date'); | 110 this.setUpdateImage_('up-to-date'); |
111 $('update-status').innerHTML = loadTimeData.getString('upToDate'); | 111 $('update-status').innerHTML = loadTimeData.getString('upToDate'); |
112 } else if (status == 'failed') { | 112 } else if (status == 'failed') { |
113 this.setUpdateImage_('failed'); | 113 this.setUpdateImage_('failed'); |
114 $('update-status').innerHTML = message; | 114 $('update-status').innerHTML = message; |
| 115 } else if (status == 'disabled') { |
| 116 var container = $('update-status-container'); |
| 117 if (container) |
| 118 container.hidden = true; |
| 119 return; |
115 } | 120 } |
116 | 121 |
117 var container = $('update-status-container'); | 122 if (!cr.isMac) |
118 if (container) { | 123 $('update-percentage').hidden = status != 'updating'; |
119 container.hidden = status == 'disabled'; | |
120 $('relaunch').hidden = status != 'nearly_updated'; | |
121 | 124 |
122 if (!cr.isMac) | 125 $('relaunch').hidden = status != 'nearly_updated'; |
123 $('update-percentage').hidden = status != 'updating'; | |
124 } | |
125 }, | 126 }, |
126 | 127 |
127 /** | 128 /** |
128 * @private | 129 * @private |
129 */ | 130 */ |
130 setProgress_: function(progress) { | 131 setProgress_: function(progress) { |
131 $('update-percentage').innerHTML = progress + '%'; | 132 $('update-percentage').innerHTML = progress + '%'; |
132 }, | 133 }, |
133 | 134 |
134 /** | 135 /** |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 HelpPage: HelpPage | 269 HelpPage: HelpPage |
269 }; | 270 }; |
270 }); | 271 }); |
271 | 272 |
272 /** | 273 /** |
273 * onload listener to initialize the HelpPage. | 274 * onload listener to initialize the HelpPage. |
274 */ | 275 */ |
275 window.onload = function() { | 276 window.onload = function() { |
276 help.HelpPage.getInstance().initialize(); | 277 help.HelpPage.getInstance().initialize(); |
277 }; | 278 }; |
OLD | NEW |