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

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: Use the i18n string for the channel switch string. 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
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 this.maybeSetOnClick_($('more-info-expander'), 45 this.maybeSetOnClick_($('more-info-expander'),
46 this.toggleMoreInfo_.bind(this)); 46 this.toggleMoreInfo_.bind(this));
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 this.channelName_ = {
56 'stable-channel': loadTimeData.getString('stable'),
57 'beta-channel': loadTimeData.getString('beta'),
58 'dev-channel': loadTimeData.getString('dev')
59 };
60
55 var channelChanger = $('channel-changer'); 61 var channelChanger = $('channel-changer');
56 if (channelChanger) { 62 if (channelChanger) {
57 var self = this; 63 var self = this;
58 channelChanger.onchange = function(event) { 64 channelChanger.onchange = function(event) {
59 self.setReleaseChannel_(event.target.value); 65 self.setReleaseChannel_(event.target.value);
60 } 66 }
61 } 67 }
62 68
63 // Attempt to update. 69 // Attempt to update.
64 chrome.send('onPageLoaded'); 70 chrome.send('onPageLoaded');
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 if (option.value == value) 214 if (option.value == value)
209 option.selected = true; 215 option.selected = true;
210 } 216 }
211 }, 217 },
212 218
213 /** 219 /**
214 * @private 220 * @private
215 */ 221 */
216 setReleaseChannel_: function(channel) { 222 setReleaseChannel_: function(channel) {
217 chrome.send('setReleaseTrack', [channel]); 223 chrome.send('setReleaseTrack', [channel]);
224 $('channel-change-confirmation').hidden = false;
225 $('channel-change-confirmation').textContent =
226 loadTimeData.getStringF('channel-changed', this.channelName_[channel]);
218 }, 227 },
219 228
220 /** 229 /**
221 * Sets the value of the "Build Date" field of the "More Info" section. 230 * Sets the value of the "Build Date" field of the "More Info" section.
222 * @param {String} buildDate The date of the build. 231 * @param {String} buildDate The date of the build.
223 * @private 232 * @private
224 */ 233 */
225 setBuildDate_: function(buildDate) { 234 setBuildDate_: function(buildDate) {
226 $('build-date-container').classList.remove('empty'); 235 $('build-date-container').classList.remove('empty');
227 $('build-date').textContent = buildDate; 236 $('build-date').textContent = buildDate;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 HelpPage: HelpPage 286 HelpPage: HelpPage
278 }; 287 };
279 }); 288 });
280 289
281 /** 290 /**
282 * onload listener to initialize the HelpPage. 291 * onload listener to initialize the HelpPage.
283 */ 292 */
284 window.onload = function() { 293 window.onload = function() {
285 help.HelpPage.getInstance().initialize(); 294 help.HelpPage.getInstance().initialize();
286 }; 295 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698