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

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

Issue 8343017: Print Preview: Hiding margins UI if an error occurs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments 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/preview_area.js
diff --git a/chrome/browser/resources/print_preview/preview_area.js b/chrome/browser/resources/print_preview/preview_area.js
index 5154cc223cefcaa817aef9f29f0ea71e43279da2..720600fda5a52f8e3c94a900358941e803ba5276 100644
--- a/chrome/browser/resources/print_preview/preview_area.js
+++ b/chrome/browser/resources/print_preview/preview_area.js
@@ -198,8 +198,7 @@ cr.define('print_preview', function() {
* Display an error message in the center of the preview area.
* @param {string} errorMessage The error message to be displayed.
*/
- displayErrorMessage: function(errorMessage) {
- $('print-button').disabled = true;
+ displayErrorMessageAndNotify: function(errorMessage) {
this.overlayLayer.classList.remove('invisible');
this.customMessage_.textContent = errorMessage;
this.customMessage_.hidden = false;
@@ -209,6 +208,7 @@ cr.define('print_preview', function() {
$('mainview').removeChild(this.pdfPlugin_);
this.pdfPlugin_ = null;
}
+ cr.dispatchSimpleEvent(document, 'PDFGenerationError');
},
/**
@@ -219,7 +219,7 @@ cr.define('print_preview', function() {
* @param {string} buttonListener The listener to be executed when the
* button is clicked.
*/
- displayErrorMessageWithButton: function(
+ displayErrorMessageWithButtonAndNotify: function(
errorMessage, buttonText, buttonListener) {
this.errorButton.disabled = false;
this.errorButton.textContent = buttonText;
@@ -227,7 +227,7 @@ cr.define('print_preview', function() {
this.errorButton.hidden = false;
$('system-dialog-throbber').hidden = true;
$('native-print-dialog-throbber').hidden = true;
- this.displayErrorMessage(errorMessage);
+ this.displayErrorMessageAndNotify(errorMessage);
}
};
« no previous file with comments | « chrome/browser/resources/print_preview/margin_settings.js ('k') | chrome/browser/resources/print_preview/print_header.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698