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 var localStrings = new LocalStrings(); | 5 var localStrings = new LocalStrings(); |
6 | 6 |
7 // The total page count of the previewed document regardless of which pages the | 7 // The total page count of the previewed document regardless of which pages the |
8 // user has selected. | 8 // user has selected. |
9 var totalPageCount = -1; | 9 var totalPageCount = -1; |
10 | 10 |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 function updatePrintSummary() { | 609 function updatePrintSummary() { |
610 var copies = getCopies(); | 610 var copies = getCopies(); |
611 var printSummary = $('print-summary'); | 611 var printSummary = $('print-summary'); |
612 | 612 |
613 if (!isNumberOfCopiesValid()) { | 613 if (!isNumberOfCopiesValid()) { |
614 printSummary.innerHTML = localStrings.getString('invalidNumberOfCopies'); | 614 printSummary.innerHTML = localStrings.getString('invalidNumberOfCopies'); |
615 return; | 615 return; |
616 } | 616 } |
617 | 617 |
618 if (getSelectedPagesValidityLevel() != 1) { | 618 if (getSelectedPagesValidityLevel() != 1) { |
619 printSummary.innerHTML = localStrings.getString('invalidPageRange'); | 619 printSummary.innerHTML = ''; |
620 return; | 620 return; |
621 } | 621 } |
622 | 622 |
623 var pageList = getSelectedPagesSet(); | 623 var pageList = getSelectedPagesSet(); |
624 var numOfSheets = pageList.length; | 624 var numOfSheets = pageList.length; |
625 var sheetsLabel = localStrings.getString('printPreviewSheetsLabelSingular'); | 625 var sheetsLabel = localStrings.getString('printPreviewSheetsLabelSingular'); |
626 var numOfPagesText = ''; | 626 var numOfPagesText = ''; |
627 var pagesLabel = ''; | 627 var pagesLabel = ''; |
628 | 628 |
629 if (isTwoSided()) | 629 if (isTwoSided()) |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
901 copiesField.value = 1; | 901 copiesField.value = 1; |
902 else { | 902 else { |
903 var newValue = getCopies() + sign * 1; | 903 var newValue = getCopies() + sign * 1; |
904 if (newValue < copiesField.min || newValue > copiesField.max) | 904 if (newValue < copiesField.min || newValue > copiesField.max) |
905 return; | 905 return; |
906 copiesField.value = newValue; | 906 copiesField.value = newValue; |
907 } | 907 } |
908 copiesFieldChanged(); | 908 copiesFieldChanged(); |
909 } | 909 } |
910 | 910 |
OLD | NEW |