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

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

Issue 8357009: Print Preview Cleanup: Creating enum with all custom events used. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renaming, nts 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
Index: chrome/browser/resources/print_preview/margin_textbox.js
diff --git a/chrome/browser/resources/print_preview/margin_textbox.js b/chrome/browser/resources/print_preview/margin_textbox.js
index 010e9c7fd294d4f96fc217b64770704f6e238e96..8e8948d9f82ef13ebda798c8abd8561ebeafcf8a 100644
--- a/chrome/browser/resources/print_preview/margin_textbox.js
+++ b/chrome/browser/resources/print_preview/margin_textbox.js
@@ -135,7 +135,7 @@ cr.define('print_preview', function() {
this.onkeypress = this.onKeyPressed_.bind(this);
this.onkeyup = this.onKeyUp_.bind(this);
this.onfocus = function() {
- cr.dispatchSimpleEvent(document, 'marginTextboxFocused');
+ cr.dispatchSimpleEvent(document, customEvents.MARGIN_TEXTBOX_FOCUSED);
};
},
@@ -152,9 +152,9 @@ cr.define('print_preview', function() {
}
this.updateColor();
- cr.dispatchSimpleEvent(document, 'updateSummary');
- cr.dispatchSimpleEvent(document, 'updatePrintButton');
- cr.dispatchSimpleEvent(this, 'MarginsMayHaveChanged');
+ cr.dispatchSimpleEvent(document, customEvents.UPDATE_SUMMARY);
+ cr.dispatchSimpleEvent(document, customEvents.UPDATE_PRINT_BUTTON);
+ cr.dispatchSimpleEvent(this, customEvents.MARGINS_MAY_HAVE_CHANGED);
},
/**
@@ -180,8 +180,8 @@ cr.define('print_preview', function() {
this.setValue_(this.lastValidValueInPoints);
this.validate();
this.updateColor();
- cr.dispatchSimpleEvent(document, 'updateSummary');
- cr.dispatchSimpleEvent(document, 'updatePrintButton');
+ cr.dispatchSimpleEvent(document, customEvents.UPDATE_SUMMARY);
+ cr.dispatchSimpleEvent(document, customEvents.UPDATE_PRINT_BUTTON);
}
},
@@ -203,12 +203,12 @@ cr.define('print_preview', function() {
onTextValueMayHaveChanged: function() {
this.validate();
this.updateColor();
- cr.dispatchSimpleEvent(document, 'updateSummary');
- cr.dispatchSimpleEvent(document, 'updatePrintButton');
+ cr.dispatchSimpleEvent(document, customEvents.UPDATE_SUMMARY);
+ cr.dispatchSimpleEvent(document, customEvents.UPDATE_PRINT_BUTTON);
if (!this.isValid)
return;
- cr.dispatchSimpleEvent(this, 'MarginsMayHaveChanged');
+ cr.dispatchSimpleEvent(this, customEvents.MARGINS_MAY_HAVE_CHANGED);
}
};
« no previous file with comments | « chrome/browser/resources/print_preview/margin_settings.js ('k') | chrome/browser/resources/print_preview/margins_ui.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698