| 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 * Represents a single option in the Other Options settings section. | 9 * Represents a single option in the Other Options settings section. |
| 10 * @param {!print_preview.ticket_items.TicketItem} ticketItem The ticket item | 10 * @param {!print_preview.ticket_items.TicketItem} ticketItem The ticket item |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 return this.ticketItem_; | 62 return this.ticketItem_; |
| 63 }, | 63 }, |
| 64 | 64 |
| 65 /** @return {HTMLElement} The checkbox HTML element. */ | 65 /** @return {HTMLElement} The checkbox HTML element. */ |
| 66 get checkbox() { | 66 get checkbox() { |
| 67 return this.checkbox_; | 67 return this.checkbox_; |
| 68 }, | 68 }, |
| 69 | 69 |
| 70 /** Initializes container and checkbox */ | 70 /** Initializes container and checkbox */ |
| 71 decorate: function() { | 71 decorate: function() { |
| 72 this.container_ = /** @type {HTMLElement} */( | 72 this.container_ = $(this.cssId_); |
| 73 document.getElementById(this.cssId_)); | |
| 74 this.checkbox_ = /** @type {HTMLElement} */( | 73 this.checkbox_ = /** @type {HTMLElement} */( |
| 75 this.container_.querySelector('.checkbox')); | 74 this.container_.querySelector('.checkbox')); |
| 76 }, | 75 }, |
| 77 | 76 |
| 78 /** Resets container and checkbox. */ | 77 /** Resets container and checkbox. */ |
| 79 exitDocument: function() { | 78 exitDocument: function() { |
| 80 this.container_ = null; | 79 this.container_ = null; |
| 81 this.checkbox_ = null; | 80 this.checkbox_ = null; |
| 82 }, | 81 }, |
| 83 | 82 |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 }, this); | 239 }, this); |
| 241 }, | 240 }, |
| 242 | 241 |
| 243 }; | 242 }; |
| 244 | 243 |
| 245 // Export | 244 // Export |
| 246 return { | 245 return { |
| 247 OtherOptionsSettings: OtherOptionsSettings | 246 OtherOptionsSettings: OtherOptionsSettings |
| 248 }; | 247 }; |
| 249 }); | 248 }); |
| OLD | NEW |