diff options
author | kmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-23 20:50:03 +0000 |
---|---|---|
committer | kmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-23 20:50:03 +0000 |
commit | cfbb875f047c61690b3a50dbe271a5a96be254f3 (patch) | |
tree | 8a6a62868313621658b63391bc1e7d3d6869d681 /chrome | |
parent | 0b8a66d9839a5c93bc65012241ec308e2ea503ea (diff) | |
download | chromium_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.html | 2 | ||||
-rw-r--r-- | chrome/browser/resources/print_preview.js | 3 |
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; |