| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 /** @override */ | 94 /** @override */ |
| 95 set isEnabled(isEnabled) { | 95 set isEnabled(isEnabled) { |
| 96 this.customInput_.disabled = !isEnabled; | 96 this.customInput_.disabled = !isEnabled; |
| 97 this.allRadio_.disabled = !isEnabled; | 97 this.allRadio_.disabled = !isEnabled; |
| 98 this.customRadio_.disabled = !isEnabled; | 98 this.customRadio_.disabled = !isEnabled; |
| 99 }, | 99 }, |
| 100 | 100 |
| 101 /** @override */ | 101 /** @override */ |
| 102 enterDocument: function() { | 102 enterDocument: function() { |
| 103 print_preview.SettingsSection.prototype.enterDocument.call(this); | 103 print_preview.SettingsSection.prototype.enterDocument.call(this); |
| 104 this.tracker.add( | 104 this.tracker.add(assert(this.allRadio_), 'click', |
| 105 this.allRadio_, 'click', this.onAllRadioClick_.bind(this)); | 105 this.onAllRadioClick_.bind(this)); |
| 106 this.tracker.add( | 106 this.tracker.add(assert(this.customRadio_), 'click', |
| 107 this.customRadio_, 'click', this.onCustomRadioClick_.bind(this)); | 107 this.onCustomRadioClick_.bind(this)); |
| 108 this.tracker.add( | 108 this.tracker.add(assert(this.customInput_), 'blur', |
| 109 this.customInput_, 'blur', this.onCustomInputBlur_.bind(this)); | 109 this.onCustomInputBlur_.bind(this)); |
| 110 this.tracker.add( | 110 this.tracker.add(assert(this.customInput_), 'focus', |
| 111 this.customInput_, 'focus', this.onCustomInputFocus_.bind(this)); | 111 this.onCustomInputFocus_.bind(this)); |
| 112 this.tracker.add( | 112 this.tracker.add(assert(this.customInput_), 'keydown', |
| 113 this.customInput_, 'keydown', this.onCustomInputKeyDown_.bind(this)); | 113 this.onCustomInputKeyDown_.bind(this)); |
| 114 this.tracker.add( | 114 this.tracker.add(assert(this.customInput_), 'keyup', |
| 115 this.customInput_, 'keyup', this.onCustomInputKeyUp_.bind(this)); | 115 this.onCustomInputKeyUp_.bind(this)); |
| 116 this.tracker.add( | 116 this.tracker.add(assert(this.pageRangeTicketItem_), |
| 117 this.pageRangeTicketItem_, | |
| 118 print_preview.ticket_items.TicketItem.EventType.CHANGE, | 117 print_preview.ticket_items.TicketItem.EventType.CHANGE, |
| 119 this.onPageRangeTicketItemChange_.bind(this)); | 118 this.onPageRangeTicketItemChange_.bind(this)); |
| 120 }, | 119 }, |
| 121 | 120 |
| 122 /** @override */ | 121 /** @override */ |
| 123 exitDocument: function() { | 122 exitDocument: function() { |
| 124 print_preview.SettingsSection.prototype.exitDocument.call(this); | 123 print_preview.SettingsSection.prototype.exitDocument.call(this); |
| 125 this.customInput_ = null; | 124 this.customInput_ = null; |
| 126 this.customRadio_ = null; | 125 this.customRadio_ = null; |
| 127 this.allRadio_ = null; | 126 this.allRadio_ = null; |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 } | 258 } |
| 260 this.updateUiStateInternal(); | 259 this.updateUiStateInternal(); |
| 261 } | 260 } |
| 262 }; | 261 }; |
| 263 | 262 |
| 264 // Export | 263 // Export |
| 265 return { | 264 return { |
| 266 PageSettings: PageSettings | 265 PageSettings: PageSettings |
| 267 }; | 266 }; |
| 268 }); | 267 }); |
| OLD | NEW |