| 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 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 877 | 877 |
| 878 /** | 878 /** |
| 879 * Called when a print destination is selected. Shows/hides the "Print with | 879 * Called when a print destination is selected. Shows/hides the "Print with |
| 880 * Cloud Print" link in the navbar. | 880 * Cloud Print" link in the navbar. |
| 881 * @private | 881 * @private |
| 882 */ | 882 */ |
| 883 onDestinationSelect_: function() { | 883 onDestinationSelect_: function() { |
| 884 var selectedDest = this.destinationStore_.selectedDestination; | 884 var selectedDest = this.destinationStore_.selectedDestination; |
| 885 setIsVisible($('cloud-print-dialog-link'), | 885 setIsVisible($('cloud-print-dialog-link'), |
| 886 !cr.isChromeOS && !selectedDest.isLocal); | 886 !cr.isChromeOS && !selectedDest.isLocal); |
| 887 if (this.isInKioskAutoPrintMode_) { |
| 888 this.onPrintButtonClick_(); |
| 889 } |
| 887 }, | 890 }, |
| 888 | 891 |
| 889 /** | 892 /** |
| 890 * Called when the destination store loads a group of destinations. Shows | 893 * Called when the destination store loads a group of destinations. Shows |
| 891 * a promo on Chrome OS if the user has no print destinations promoting | 894 * a promo on Chrome OS if the user has no print destinations promoting |
| 892 * Google Cloud Print. | 895 * Google Cloud Print. |
| 893 * @private | 896 * @private |
| 894 */ | 897 */ |
| 895 onDestinationSearchDone_: function() { | 898 onDestinationSearchDone_: function() { |
| 896 var isPromoVisible = cr.isChromeOS && | 899 var isPromoVisible = cr.isChromeOS && |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 998 <include src="search/recent_destination_list.js"/> | 1001 <include src="search/recent_destination_list.js"/> |
| 999 <include src="search/destination_list_item.js"/> | 1002 <include src="search/destination_list_item.js"/> |
| 1000 <include src="search/destination_search.js"/> | 1003 <include src="search/destination_search.js"/> |
| 1001 <include src="search/search_box.js"/> | 1004 <include src="search/search_box.js"/> |
| 1002 <include src="search/fedex_tos.js"/> | 1005 <include src="search/fedex_tos.js"/> |
| 1003 | 1006 |
| 1004 window.addEventListener('DOMContentLoaded', function() { | 1007 window.addEventListener('DOMContentLoaded', function() { |
| 1005 printPreview = new print_preview.PrintPreview(); | 1008 printPreview = new print_preview.PrintPreview(); |
| 1006 printPreview.initialize(); | 1009 printPreview.initialize(); |
| 1007 }); | 1010 }); |
| OLD | NEW |