| OLD | NEW |
| 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 cr.define('print_preview', function() { | 5 cr.define('print_preview', function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Creates a PageSettings object. This object encapsulates all settings and | 9 * Creates a PageSettings object. This object encapsulates all settings and |
| 10 * logic related to page selection. | 10 * logic related to page selection. |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 this.customRadio_ = this.getElement().getElementsByClassName( | 137 this.customRadio_ = this.getElement().getElementsByClassName( |
| 138 PageSettings.Classes_.CUSTOM_RADIO)[0]; | 138 PageSettings.Classes_.CUSTOM_RADIO)[0]; |
| 139 this.customHintEl_ = this.getElement().getElementsByClassName( | 139 this.customHintEl_ = this.getElement().getElementsByClassName( |
| 140 PageSettings.Classes_.CUSTOM_HINT)[0]; | 140 PageSettings.Classes_.CUSTOM_HINT)[0]; |
| 141 this.customHintEl_.textContent = localStrings.getStringF( | 141 this.customHintEl_.textContent = localStrings.getStringF( |
| 142 'pageRangeInstruction', | 142 'pageRangeInstruction', |
| 143 localStrings.getString('examplePageRangeText')); | 143 localStrings.getString('examplePageRangeText')); |
| 144 }, | 144 }, |
| 145 | 145 |
| 146 /** | 146 /** |
| 147 * @param {boolean} Whether the custom hint is visible. | 147 * @param {boolean} isVisible Whether the custom hint is visible. |
| 148 * @private | 148 * @private |
| 149 */ | 149 */ |
| 150 setInvalidStateVisible_: function(isVisible) { | 150 setInvalidStateVisible_: function(isVisible) { |
| 151 if (isVisible) { | 151 if (isVisible) { |
| 152 this.customInput_.classList.add('invalid'); | 152 this.customInput_.classList.add('invalid'); |
| 153 fadeInElement(this.customHintEl_); | 153 fadeInElement(this.customHintEl_); |
| 154 } else { | 154 } else { |
| 155 this.customInput_.classList.remove('invalid'); | 155 this.customInput_.classList.remove('invalid'); |
| 156 fadeOutElement(this.customHintEl_); | 156 fadeOutElement(this.customHintEl_); |
| 157 } | 157 } |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 } | 259 } |
| 260 this.updateUiStateInternal(); | 260 this.updateUiStateInternal(); |
| 261 } | 261 } |
| 262 }; | 262 }; |
| 263 | 263 |
| 264 // Export | 264 // Export |
| 265 return { | 265 return { |
| 266 PageSettings: PageSettings | 266 PageSettings: PageSettings |
| 267 }; | 267 }; |
| 268 }); | 268 }); |
| OLD | NEW |