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 var localStrings = new LocalStrings(); | 8 var localStrings = new LocalStrings(); |
9 | 9 |
10 /** | 10 /** |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
206 option.selected = true; | 206 option.selected = true; |
207 } | 207 } |
208 }, | 208 }, |
209 | 209 |
210 /** | 210 /** |
211 * @private | 211 * @private |
212 */ | 212 */ |
213 setReleaseChannel_: function(channel) { | 213 setReleaseChannel_: function(channel) { |
214 chrome.send('setReleaseTrack', [channel]); | 214 chrome.send('setReleaseTrack', [channel]); |
215 }, | 215 }, |
216 | |
217 /** | |
218 * Sets the value of the "Last Updated" field of the "More Info" section. | |
219 * @param {String} lastUpdated The date of the last update. | |
220 * @private | |
221 */ | |
222 setLastUpdated_: function(lastUpdated) { | |
223 $('last-updated-container').style.visibility = 'visible'; | |
Evan Stade
2012/04/24 18:21:52
nit: the typical separation of presentation and lo
Kyle Horimoto
2012/04/24 21:28:49
Done.
| |
224 $('last-updated').textContent = lastUpdated; | |
225 }, | |
216 }; | 226 }; |
217 | 227 |
218 HelpPage.setUpdateStatus = function(status, message) { | 228 HelpPage.setUpdateStatus = function(status, message) { |
219 HelpPage.getInstance().setUpdateStatus_(status, message); | 229 HelpPage.getInstance().setUpdateStatus_(status, message); |
220 }; | 230 }; |
221 | 231 |
222 HelpPage.setProgress = function(progress) { | 232 HelpPage.setProgress = function(progress) { |
223 HelpPage.getInstance().setProgress_(progress); | 233 HelpPage.getInstance().setProgress_(progress); |
224 }; | 234 }; |
225 | 235 |
(...skipping 18 matching lines...) Expand all Loading... | |
244 }; | 254 }; |
245 | 255 |
246 HelpPage.updateEnableReleaseChannel = function(enabled) { | 256 HelpPage.updateEnableReleaseChannel = function(enabled) { |
247 HelpPage.getInstance().updateEnableReleaseChannel_(enabled); | 257 HelpPage.getInstance().updateEnableReleaseChannel_(enabled); |
248 }; | 258 }; |
249 | 259 |
250 HelpPage.setReleaseChannel = function(channel) { | 260 HelpPage.setReleaseChannel = function(channel) { |
251 HelpPage.getInstance().setReleaseChannel_(channel); | 261 HelpPage.getInstance().setReleaseChannel_(channel); |
252 }; | 262 }; |
253 | 263 |
264 HelpPage.setLastUpdated = function(lastUpdated) { | |
265 HelpPage.getInstance().setLastUpdated_(lastUpdated); | |
266 } | |
267 | |
254 // Export | 268 // Export |
255 return { | 269 return { |
256 HelpPage: HelpPage | 270 HelpPage: HelpPage |
257 }; | 271 }; |
258 }); | 272 }); |
259 | 273 |
260 /** | 274 /** |
261 * onload listener to initialize the HelpPage. | 275 * onload listener to initialize the HelpPage. |
262 */ | 276 */ |
263 window.onload = function() { | 277 window.onload = function() { |
264 help.HelpPage.getInstance().initialize(); | 278 help.HelpPage.getInstance().initialize(); |
265 }; | 279 }; |
OLD | NEW |