OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 cr.define('options', function() { | 5 cr.define('options', function() { |
6 var Page = cr.ui.pageManager.Page; | 6 var Page = cr.ui.pageManager.Page; |
7 | 7 |
8 var AutomaticSettingsResetBanner = options.AutomaticSettingsResetBanner; | 8 var AutomaticSettingsResetBanner = options.AutomaticSettingsResetBanner; |
9 | 9 |
10 /** | 10 /** |
(...skipping 10 matching lines...) Expand all Loading... |
21 cr.addSingletonGetter(ResetProfileSettingsOverlay); | 21 cr.addSingletonGetter(ResetProfileSettingsOverlay); |
22 | 22 |
23 ResetProfileSettingsOverlay.prototype = { | 23 ResetProfileSettingsOverlay.prototype = { |
24 // Inherit ResetProfileSettingsOverlay from Page. | 24 // Inherit ResetProfileSettingsOverlay from Page. |
25 __proto__: Page.prototype, | 25 __proto__: Page.prototype, |
26 | 26 |
27 /** @override */ | 27 /** @override */ |
28 initializePage: function() { | 28 initializePage: function() { |
29 Page.prototype.initializePage.call(this); | 29 Page.prototype.initializePage.call(this); |
30 | 30 |
31 $('reset-profile-settings-dismiss').onclick = function(e) { | 31 $('reset-profile-settings-dismiss').onclick = function(event) { |
32 ResetProfileSettingsOverlay.dismiss(); | 32 ResetProfileSettingsOverlay.dismiss(); |
33 }; | 33 }; |
34 $('reset-profile-settings-commit').onclick = function(e) { | 34 $('reset-profile-settings-commit').onclick = function(event) { |
35 ResetProfileSettingsOverlay.setResettingState(true); | 35 ResetProfileSettingsOverlay.setResettingState(true); |
36 chrome.send('performResetProfileSettings', | 36 chrome.send('performResetProfileSettings', |
37 [$('send-settings').checked]); | 37 [$('send-settings').checked]); |
38 }; | 38 }; |
39 $('expand-feedback').onclick = function(e) { | 39 $('expand-feedback').onclick = function(event) { |
40 var feedbackTemplate = $('feedback-template'); | 40 var feedbackTemplate = $('feedback-template'); |
41 feedbackTemplate.hidden = !feedbackTemplate.hidden; | 41 feedbackTemplate.hidden = !feedbackTemplate.hidden; |
42 e.preventDefault(); | |
43 }; | 42 }; |
44 }, | 43 }, |
45 | 44 |
46 /** @override */ | 45 /** @override */ |
47 didShowPage: function() { | 46 didShowPage: function() { |
48 chrome.send('onShowResetProfileDialog'); | 47 chrome.send('onShowResetProfileDialog'); |
49 }, | 48 }, |
50 | 49 |
51 /** @override */ | 50 /** @override */ |
52 didClosePage: function() { | 51 didClosePage: function() { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 var input = new JsEvalContext(feedbackListData); | 85 var input = new JsEvalContext(feedbackListData); |
87 var output = $('feedback-template'); | 86 var output = $('feedback-template'); |
88 jstProcess(input, output); | 87 jstProcess(input, output); |
89 }; | 88 }; |
90 | 89 |
91 // Export | 90 // Export |
92 return { | 91 return { |
93 ResetProfileSettingsOverlay: ResetProfileSettingsOverlay | 92 ResetProfileSettingsOverlay: ResetProfileSettingsOverlay |
94 }; | 93 }; |
95 }); | 94 }); |
OLD | NEW |