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; | |
120 } | 115 } |
121 | 116 |
122 if (!cr.isMac) | 117 var container = $('update-status-container'); |
123 $('update-percentage').hidden = status != 'updating'; | 118 if (container) { |
| 119 container.hidden = status == 'disabled'; |
| 120 $('relaunch').hidden = status != 'nearly_updated'; |
124 | 121 |
125 $('relaunch').hidden = status != 'nearly_updated'; | 122 if (!cr.isMac) |
| 123 $('update-percentage').hidden = status != 'updating'; |
| 124 } |
126 }, | 125 }, |
127 | 126 |
128 /** | 127 /** |
129 * @private | 128 * @private |
130 */ | 129 */ |
131 setProgress_: function(progress) { | 130 setProgress_: function(progress) { |
132 $('update-percentage').innerHTML = progress + '%'; | 131 $('update-percentage').innerHTML = progress + '%'; |
133 }, | 132 }, |
134 | 133 |
135 /** | 134 /** |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 HelpPage: HelpPage | 268 HelpPage: HelpPage |
270 }; | 269 }; |
271 }); | 270 }); |
272 | 271 |
273 /** | 272 /** |
274 * onload listener to initialize the HelpPage. | 273 * onload listener to initialize the HelpPage. |
275 */ | 274 */ |
276 window.onload = function() { | 275 window.onload = function() { |
277 help.HelpPage.getInstance().initialize(); | 276 help.HelpPage.getInstance().initialize(); |
278 }; | 277 }; |
OLD | NEW |