summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorkmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-23 20:50:03 +0000
committerkmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-23 20:50:03 +0000
commitcfbb875f047c61690b3a50dbe271a5a96be254f3 (patch)
tree8a6a62868313621658b63391bc1e7d3d6869d681 /chrome
parent0b8a66d9839a5c93bc65012241ec308e2ea503ea (diff)
downloadchromium_src-cfbb875f047c61690b3a50dbe271a5a96be254f3.zip
chromium_src-cfbb875f047c61690b3a50dbe271a5a96be254f3.tar.gz
chromium_src-cfbb875f047c61690b3a50dbe271a5a96be254f3.tar.bz2
PrintPreview: Disable the print button until the preview is fully loaded.
BUG=none TEST=Enable print preview on mac. Print a webpage. In the preview tab, the print button is disabled until the preview is fully loaded. Review URL: http://codereview.chromium.org/6551013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75781 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/resources/print_preview.html2
-rw-r--r--chrome/browser/resources/print_preview.js3
2 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/resources/print_preview.html b/chrome/browser/resources/print_preview.html
index 94da8513c..20e7cc3 100644
--- a/chrome/browser/resources/print_preview.html
+++ b/chrome/browser/resources/print_preview.html
@@ -17,7 +17,7 @@
<h1>Destination</h1>
<select id="printer-list"></select>
<div id="buttons">
- <button id="print-button" i18n-content="printButton"></button>
+ <button id="print-button" i18n-content="printButton" disabled></button>
<button id="cancel-button" i18n-content="cancelButton"></button>
</div>
</div>
diff --git a/chrome/browser/resources/print_preview.js b/chrome/browser/resources/print_preview.js
index 7dfc1ab..b1ceed8 100644
--- a/chrome/browser/resources/print_preview.js
+++ b/chrome/browser/resources/print_preview.js
@@ -57,6 +57,9 @@ function createPDFPlugin(url, pagesCount) {
$('pages').value = '1-' + expectedPageCount;
}
+ // Enable the print button.
+ $('print-button').disabled = false;
+
if ($('pdf-viewer')) {
$('pdf-viewer').reload();
return;