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(event) { | 31 $('reset-profile-settings-dismiss').onclick = function(e) { |
32 ResetProfileSettingsOverlay.dismiss(); | 32 ResetProfileSettingsOverlay.dismiss(); |
33 }; | 33 }; |
34 $('reset-profile-settings-commit').onclick = function(event) { | 34 $('reset-profile-settings-commit').onclick = function(e) { |
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(event) { | 39 $('expand-feedback').onclick = function(e) { |
40 var feedbackTemplate = $('feedback-template'); | 40 var feedbackTemplate = $('feedback-template'); |
41 feedbackTemplate.hidden = !feedbackTemplate.hidden; | 41 feedbackTemplate.hidden = !feedbackTemplate.hidden; |
| 42 e.preventDefault(); |
42 }; | 43 }; |
43 }, | 44 }, |
44 | 45 |
45 /** @override */ | 46 /** @override */ |
46 didShowPage: function() { | 47 didShowPage: function() { |
47 chrome.send('onShowResetProfileDialog'); | 48 chrome.send('onShowResetProfileDialog'); |
48 }, | 49 }, |
49 | 50 |
50 /** @override */ | 51 /** @override */ |
51 didClosePage: function() { | 52 didClosePage: function() { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 var input = new JsEvalContext(feedbackListData); | 86 var input = new JsEvalContext(feedbackListData); |
86 var output = $('feedback-template'); | 87 var output = $('feedback-template'); |
87 jstProcess(input, output); | 88 jstProcess(input, output); |
88 }; | 89 }; |
89 | 90 |
90 // Export | 91 // Export |
91 return { | 92 return { |
92 ResetProfileSettingsOverlay: ResetProfileSettingsOverlay | 93 ResetProfileSettingsOverlay: ResetProfileSettingsOverlay |
93 }; | 94 }; |
94 }); | 95 }); |
OLD | NEW |