Index: chrome/browser/resources/print_preview/header_footer_settings.js |
diff --git a/chrome/browser/resources/print_preview/header_footer_settings.js b/chrome/browser/resources/print_preview/header_footer_settings.js |
index 02776c58b86b8e351e8924dd57ebe07423b36e74..86ffcbb27eea340ea59d813c989c845fb8381841 100644 |
--- a/chrome/browser/resources/print_preview/header_footer_settings.js |
+++ b/chrome/browser/resources/print_preview/header_footer_settings.js |
@@ -33,7 +33,7 @@ cr.define('print_preview', function() { |
* @return {boolean} true if Headers and Footers are checked. |
*/ |
hasHeaderFooter: function() { |
- return this.headerFooterApplies_ && this.headerFooterCheckbox_.checked; |
+ return previewModifiable && this.headerFooterCheckbox_.checked; |
}, |
/** |
@@ -54,13 +54,15 @@ cr.define('print_preview', function() { |
this.onHeaderFooterChanged_.bind(this); |
document.addEventListener(customEvents.PDF_LOADED, |
this.onPDFLoaded_.bind(this)); |
- document.addEventListener(customEvents.MARGINS_SELECTION_CHANGED, |
kmadhusu
2012/03/14 22:10:14
This event is no longer required. So removed the c
|
- this.onMarginsSelectionChanged_.bind(this)); |
}, |
- onMarginsSelectionChanged_: function(event) { |
- this.headerFooterApplies_ = event.selectedMargins != |
dpapad
2012/03/14 21:15:17
Can you explain what happens now when NO_MARGINS i
kmadhusu
2012/03/14 22:10:14
Yes. It is handled on C++ side. When NO_MARGINS is
|
- print_preview.MarginSettings.MARGINS_VALUE_NO_MARGINS; |
+ /** |
+ * Sets the visibility of header footer option. |
+ * @param {boolean} headerFooterApplies True if the headers footers |
+ * checkbox shoud be hidden, else false. |
+ */ |
+ setVisibility: function(headerFooterApplies) { |
+ this.headerFooterApplies_ = headerFooterApplies; |
dpapad
2012/03/14 21:15:17
This member variable seems to only be used here. C
kmadhusu
2012/03/14 22:10:14
oops... Fixed. Removed the member variable.
|
this.setVisible_(this.headerFooterApplies_); |
}, |