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 PrintHeader object. This object encapsulates all the elements | 9 * Creates a PrintHeader object. This object encapsulates all the elements |
10 * and logic related to the top part of the left pane in print_preview.html. | 10 * and logic related to the top part of the left pane in print_preview.html. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 }, | 75 }, |
76 | 76 |
77 /** @param {string} message Error message to display in the print header. */ | 77 /** @param {string} message Error message to display in the print header. */ |
78 setErrorMessage: function(message) { | 78 setErrorMessage: function(message) { |
79 var summaryEl = this.getChildElement('.summary'); | 79 var summaryEl = this.getChildElement('.summary'); |
80 summaryEl.innerHTML = ''; | 80 summaryEl.innerHTML = ''; |
81 summaryEl.textContent = message; | 81 summaryEl.textContent = message; |
82 }, | 82 }, |
83 | 83 |
84 /** @override */ | 84 /** @override */ |
| 85 decorateInternal: function() { |
| 86 cr.ui.reverseButtonStrips(this.getElement()); |
| 87 }, |
| 88 |
| 89 /** @override */ |
85 enterDocument: function() { | 90 enterDocument: function() { |
86 print_preview.Component.prototype.enterDocument.call(this); | 91 print_preview.Component.prototype.enterDocument.call(this); |
87 | 92 |
88 // User events | 93 // User events |
89 this.tracker.add( | 94 this.tracker.add( |
90 this.getChildElement('button.cancel'), | 95 this.getChildElement('button.cancel'), |
91 'click', | 96 'click', |
92 this.onCancelButtonClick_.bind(this)); | 97 this.onCancelButtonClick_.bind(this)); |
93 this.tracker.add( | 98 this.tracker.add( |
94 this.getChildElement('button.print'), | 99 this.getChildElement('button.print'), |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 this.getChildElement('button.print').focus(); | 253 this.getChildElement('button.print').focus(); |
249 } | 254 } |
250 } | 255 } |
251 }; | 256 }; |
252 | 257 |
253 // Export | 258 // Export |
254 return { | 259 return { |
255 PrintHeader: PrintHeader | 260 PrintHeader: PrintHeader |
256 }; | 261 }; |
257 }); | 262 }); |
OLD | NEW |