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

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

Issue 8227034: Change print setting conventions for margins to support more options. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 9 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/resources/print_preview/print_preview.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/print_preview/margin_settings.js
diff --git a/chrome/browser/resources/print_preview/margin_settings.js b/chrome/browser/resources/print_preview/margin_settings.js
index f9d81a3053927d16cfb72ae8662cbff1d0e08e9f..fe1d7e03ef3b63cd4d3e2586078cb94b2fd19818 100644
--- a/chrome/browser/resources/print_preview/margin_settings.js
+++ b/chrome/browser/resources/print_preview/margin_settings.js
@@ -61,12 +61,17 @@ cr.define('print_preview', function() {
},
/**
- * Checks whether user has selected the Default Margins option or not.
+ * Gets the string representation of the margin type selected.
*
- * @return {boolean} true if default margins are selected.
+ * @return {string}
*/
- isDefaultMarginsSelected: function() {
- return this.selectedMarginsValue_ == this.defaultMarginsValue_;
dpapad 2011/10/12 15:59:05 After landing http://codereview.chromium.org/78910
vandebo (ex-Chrome) 2011/10/12 17:32:49 Agreed. Done.
+ get marginTypeString() {
+ if (this.selectedMarginsValue_ == this.noMarginsValue_)
+ return "noMargins";
+ else if (this.selectedMarginsValue_ == this.customMarginsValue_)
+ return "customMargins";
+ else
+ return "defaultMargins";
},
/**
« no previous file with comments | « no previous file | chrome/browser/resources/print_preview/print_preview.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698