Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Side by Side Diff: chrome/browser/resources/help/help.js

Issue 10928061: About page UI: add confirmation message for release channel switch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix help.js indentation as suggested by jhawkins. Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/help/help.html ('k') | chrome/browser/ui/webui/help/help_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 this.maybeSetOnClick_($('promote'), function() { 48 this.maybeSetOnClick_($('promote'), function() {
49 chrome.send('promoteUpdater'); 49 chrome.send('promoteUpdater');
50 }); 50 });
51 this.maybeSetOnClick_($('relaunch'), function() { 51 this.maybeSetOnClick_($('relaunch'), function() {
52 chrome.send('relaunchNow'); 52 chrome.send('relaunchNow');
53 }); 53 });
54 54
55 var channelChanger = $('channel-changer'); 55 var channelChanger = $('channel-changer');
56 if (channelChanger) { 56 if (channelChanger) {
57 this.channelName_ = {
58 'stable-channel': loadTimeData.getString('stable'),
59 'beta-channel': loadTimeData.getString('beta'),
60 'dev-channel': loadTimeData.getString('dev')
61 };
57 var self = this; 62 var self = this;
58 channelChanger.onchange = function(event) { 63 channelChanger.onchange = function(event) {
59 self.setReleaseChannel_(event.target.value); 64 self.setReleaseChannel_(event.target.value);
60 } 65 }
61 } 66 }
62 67
63 // Attempt to update. 68 // Attempt to update.
64 chrome.send('onPageLoaded'); 69 chrome.send('onPageLoaded');
65 }, 70 },
66 71
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 if (option.value == value) 213 if (option.value == value)
209 option.selected = true; 214 option.selected = true;
210 } 215 }
211 }, 216 },
212 217
213 /** 218 /**
214 * @private 219 * @private
215 */ 220 */
216 setReleaseChannel_: function(channel) { 221 setReleaseChannel_: function(channel) {
217 chrome.send('setReleaseTrack', [channel]); 222 chrome.send('setReleaseTrack', [channel]);
223 $('channel-change-confirmation').hidden = false;
224 $('channel-change-confirmation').textContent = loadTimeData.getStringF(
225 'channel-changed', this.channelName_[channel]);
218 }, 226 },
219 227
220 /** 228 /**
221 * Sets the value of the "Build Date" field of the "More Info" section. 229 * Sets the value of the "Build Date" field of the "More Info" section.
222 * @param {String} buildDate The date of the build. 230 * @param {String} buildDate The date of the build.
223 * @private 231 * @private
224 */ 232 */
225 setBuildDate_: function(buildDate) { 233 setBuildDate_: function(buildDate) {
226 $('build-date-container').classList.remove('empty'); 234 $('build-date-container').classList.remove('empty');
227 $('build-date').textContent = buildDate; 235 $('build-date').textContent = buildDate;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 HelpPage: HelpPage 285 HelpPage: HelpPage
278 }; 286 };
279 }); 287 });
280 288
281 /** 289 /**
282 * onload listener to initialize the HelpPage. 290 * onload listener to initialize the HelpPage.
283 */ 291 */
284 window.onload = function() { 292 window.onload = function() {
285 help.HelpPage.getInstance().initialize(); 293 help.HelpPage.getInstance().initialize();
286 }; 294 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/help/help.html ('k') | chrome/browser/ui/webui/help/help_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698