OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 /** | 5 /** |
6 * @fileoverview Oobe Terms of Service screen implementation. | 6 * @fileoverview Oobe Terms of Service screen implementation. |
7 */ | 7 */ |
8 | 8 |
9 login.createScreen('TermsOfServiceScreen', 'terms-of-service', | 9 login.createScreen('TermsOfServiceScreen', 'terms-of-service', |
10 function() { return { | 10 function() { return { |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 $('tos-accept-button').disabled = true; | 70 $('tos-accept-button').disabled = true; |
71 chrome.send('termsOfServiceBack'); | 71 chrome.send('termsOfServiceBack'); |
72 }); | 72 }); |
73 backButton.addEventListener('blur', function(event) { | 73 backButton.addEventListener('blur', function(event) { |
74 this.blurred = true; | 74 this.blurred = true; |
75 }); | 75 }); |
76 buttons.push(backButton); | 76 buttons.push(backButton); |
77 | 77 |
78 var acceptButton = this.ownerDocument.createElement('button'); | 78 var acceptButton = this.ownerDocument.createElement('button'); |
79 acceptButton.id = 'tos-accept-button'; | 79 acceptButton.id = 'tos-accept-button'; |
80 acceptButton.disabled = true; | 80 acceptButton.disabled = this.classList.contains('tos-loading'); |
81 acceptButton.classList.add('preserve-disabled-state'); | 81 acceptButton.classList.add('preserve-disabled-state'); |
82 acceptButton.textContent = | 82 acceptButton.textContent = |
83 loadTimeData.getString('termsOfServiceAcceptButton'); | 83 loadTimeData.getString('termsOfServiceAcceptButton'); |
84 acceptButton.addEventListener('click', function(event) { | 84 acceptButton.addEventListener('click', function(event) { |
85 $('tos-back-button').disabled = true; | 85 $('tos-back-button').disabled = true; |
86 $('tos-accept-button').disabled = true; | 86 $('tos-accept-button').disabled = true; |
87 chrome.send('termsOfServiceAccept'); | 87 chrome.send('termsOfServiceAccept'); |
88 }); | 88 }); |
89 buttons.push(acceptButton); | 89 buttons.push(acceptButton); |
90 | 90 |
(...skipping 11 matching lines...) Expand all Loading... |
102 /** | 102 /** |
103 * Event handler that is invoked just before the screen is shown. | 103 * Event handler that is invoked just before the screen is shown. |
104 * @param {object} data Screen init payload. | 104 * @param {object} data Screen init payload. |
105 */ | 105 */ |
106 onBeforeShow: function(data) { | 106 onBeforeShow: function(data) { |
107 Oobe.getInstance().headerHidden = true; | 107 Oobe.getInstance().headerHidden = true; |
108 } | 108 } |
109 }; | 109 }; |
110 }); | 110 }); |
111 | 111 |
OLD | NEW |