Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: chrome/browser/resources/print_preview.js

Issue 7065007: Print Preview: Changing tab title and invalid page range error message (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebasing Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/webui/print_preview_ui_html_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698