OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // require: cr/ui/print_preview_cloud.js | 5 // require: cr/ui/print_preview_cloud.js |
6 | 6 |
7 var localStrings = new LocalStrings(); | 7 var localStrings = new LocalStrings(); |
8 | 8 |
9 // If useCloudPrint is true we attempt to connect to cloud print | 9 // If useCloudPrint is true we attempt to connect to cloud print |
10 // and populate the list of printers with cloud print printers. | 10 // and populate the list of printers with cloud print printers. |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 var els = $('sidebar').querySelectorAll('input, button, select'); | 128 var els = $('sidebar').querySelectorAll('input, button, select'); |
129 for (var i = 0; i < els.length; i++) | 129 for (var i = 0; i < els.length; i++) |
130 els[i].disabled = true; | 130 els[i].disabled = true; |
131 } | 131 } |
132 | 132 |
133 /** | 133 /** |
134 * Disables the controls in the sidebar, shows the throbber and instructs the | 134 * Disables the controls in the sidebar, shows the throbber and instructs the |
135 * backend to open the native print dialog. | 135 * backend to open the native print dialog. |
136 */ | 136 */ |
137 function onSystemDialogLinkClicked() { | 137 function onSystemDialogLinkClicked() { |
| 138 if (showingSystemDialog) |
| 139 return; |
138 showingSystemDialog = true; | 140 showingSystemDialog = true; |
139 disableInputElementsInSidebar(); | 141 disableInputElementsInSidebar(); |
140 $('system-dialog-throbber').classList.remove('hidden'); | 142 $('system-dialog-throbber').classList.remove('hidden'); |
141 chrome.send('showSystemDialog'); | 143 chrome.send('showSystemDialog'); |
142 } | 144 } |
143 | 145 |
144 /** | 146 /** |
145 * Similar to onSystemDialogLinkClicked(), but specific to the | 147 * Similar to onSystemDialogLinkClicked(), but specific to the |
146 * 'Launch native print dialog' UI. | 148 * 'Launch native print dialog' UI. |
147 */ | 149 */ |
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
965 /// Pull in all other scripts in a single shot. | 967 /// Pull in all other scripts in a single shot. |
966 <include src="print_preview_animations.js"/> | 968 <include src="print_preview_animations.js"/> |
967 <include src="print_preview_cloud.js"/> | 969 <include src="print_preview_cloud.js"/> |
968 <include src="print_preview_utils.js"/> | 970 <include src="print_preview_utils.js"/> |
969 <include src="print_header.js"/> | 971 <include src="print_header.js"/> |
970 <include src="page_settings.js"/> | 972 <include src="page_settings.js"/> |
971 <include src="copies_settings.js"/> | 973 <include src="copies_settings.js"/> |
972 <include src="header_footer_settings.js"/> | 974 <include src="header_footer_settings.js"/> |
973 <include src="layout_settings.js"/> | 975 <include src="layout_settings.js"/> |
974 <include src="color_settings.js"/> | 976 <include src="color_settings.js"/> |
OLD | NEW |