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 // TODO(rltoscano): Move data/* into print_preview.data namespace | 5 // TODO(rltoscano): Move data/* into print_preview.data namespace |
6 | 6 |
7 var localStrings = new LocalStrings(templateData); | 7 var localStrings = new LocalStrings(templateData); |
8 | 8 |
9 <include src="component.js"/> | 9 <include src="component.js"/> |
10 | 10 |
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
810 * Cloud Print web dialog. | 810 * Cloud Print web dialog. |
811 * @private | 811 * @private |
812 */ | 812 */ |
813 onCloudPrintDialogLinkClick_: function() { | 813 onCloudPrintDialogLinkClick_: function() { |
814 assert(this.uiState_ == PrintPreview.UiState_.READY, | 814 assert(this.uiState_ == PrintPreview.UiState_.READY, |
815 'Opening Google Cloud Print dialog when not in ready state: ' + | 815 'Opening Google Cloud Print dialog when not in ready state: ' + |
816 this.uiState_); | 816 this.uiState_); |
817 setIsVisible($('cloud-print-dialog-throbber'), true); | 817 setIsVisible($('cloud-print-dialog-throbber'), true); |
818 this.setIsEnabled_(false); | 818 this.setIsEnabled_(false); |
819 this.uiState_ = PrintPreview.UiState_.OPENING_NATIVE_PRINT_DIALOG; | 819 this.uiState_ = PrintPreview.UiState_.OPENING_NATIVE_PRINT_DIALOG; |
820 this.nativeLayer_.startShowCloudPrintDialog(); | 820 this.nativeLayer_.startShowCloudPrintDialog( |
821 this.printTicketStore_.pageRange.getPageNumberSet().size); | |
Toscano
2013/05/27 13:34:38
I think you want .length not .size.
| |
821 }, | 822 }, |
822 | 823 |
823 /** | 824 /** |
824 * Called when a print destination is selected. Shows/hides the "Print with | 825 * Called when a print destination is selected. Shows/hides the "Print with |
825 * Cloud Print" link in the navbar. | 826 * Cloud Print" link in the navbar. |
826 * @private | 827 * @private |
827 */ | 828 */ |
828 onDestinationSelect_: function() { | 829 onDestinationSelect_: function() { |
829 var selectedDest = this.destinationStore_.selectedDestination; | 830 var selectedDest = this.destinationStore_.selectedDestination; |
830 setIsVisible($('cloud-print-dialog-link'), | 831 setIsVisible($('cloud-print-dialog-link'), |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
943 <include src="search/recent_destination_list.js"/> | 944 <include src="search/recent_destination_list.js"/> |
944 <include src="search/destination_list_item.js"/> | 945 <include src="search/destination_list_item.js"/> |
945 <include src="search/destination_search.js"/> | 946 <include src="search/destination_search.js"/> |
946 <include src="search/search_box.js"/> | 947 <include src="search/search_box.js"/> |
947 <include src="search/fedex_tos.js"/> | 948 <include src="search/fedex_tos.js"/> |
948 | 949 |
949 window.addEventListener('DOMContentLoaded', function() { | 950 window.addEventListener('DOMContentLoaded', function() { |
950 printPreview = new print_preview.PrintPreview(); | 951 printPreview = new print_preview.PrintPreview(); |
951 printPreview.initialize(); | 952 printPreview.initialize(); |
952 }); | 953 }); |
OLD | NEW |