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

Unified Diff: chrome/browser/resources/print_preview/layout_settings.js

Issue 7550022: Print Preview: Fixing behavior of event listeners. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing comments Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/print_preview/layout_settings.js
diff --git a/chrome/browser/resources/print_preview/layout_settings.js b/chrome/browser/resources/print_preview/layout_settings.js
index 0932e21c566de0c0363a9a1bb2e74a02ef767b6c..f28b20b007c0890853186b84054692947aafa6b2 100644
--- a/chrome/browser/resources/print_preview/layout_settings.js
+++ b/chrome/browser/resources/print_preview/layout_settings.js
@@ -48,14 +48,8 @@ cr.define('print_preview', function() {
* of altering their behavior depending on |hasPendingPreviewRequest|.
*/
addEventListeners: function() {
- this.landscapeRadioButton_.onclick = function() {
- if (!hasPendingPreviewRequest)
- this.onLayoutButtonClick_();
- }.bind(this);
- this.portraitRadioButton_.onclick = function() {
- if (!hasPendingPreviewRequest)
- this.onLayoutButtonClick_();
- }.bind(this);
+ this.landscapeRadioButton_.onclick = this.onLayoutButtonClick_.bind(this);
+ this.portraitRadioButton_.onclick = this.onLayoutButtonClick_.bind(this);
document.addEventListener('PDFLoaded', this.onPDFLoaded_.bind(this));
document.addEventListener('printerCapabilitiesUpdated',
this.onPrinterCapabilitiesUpdated_.bind(this));
@@ -87,8 +81,7 @@ cr.define('print_preview', function() {
* @private
*/
onPDFLoaded_: function() {
- if (!previewModifiable)
- fadeOutElement(this.layoutOption_);
+ this.fadeInOut_(!previewModifiable);
},
/**

Powered by Google App Engine
This is Rietveld 408576698