Merge pull request #4077 from brendandahl/form-fallback
Show a different warning for PDF’s with forms.
This commit is contained in:
commit
556820f22f
@ -377,11 +377,16 @@ ChromeActions.prototype = {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fallback: function(url, sendResponse) {
|
fallback: function(featureId, url, sendResponse) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var domWindow = this.domWindow;
|
var domWindow = this.domWindow;
|
||||||
var strings = getLocalizedStrings('chrome.properties');
|
var strings = getLocalizedStrings('chrome.properties');
|
||||||
var message = getLocalizedString(strings, 'unsupported_feature');
|
var message;
|
||||||
|
if (featureId === 'forms') {
|
||||||
|
message = getLocalizedString(strings, 'unsupported_feature_forms');
|
||||||
|
} else {
|
||||||
|
message = getLocalizedString(strings, 'unsupported_feature');
|
||||||
|
}
|
||||||
|
|
||||||
PdfJsTelemetry.onFallback();
|
PdfJsTelemetry.onFallback();
|
||||||
|
|
||||||
|
@ -14,5 +14,6 @@
|
|||||||
|
|
||||||
# Chrome notification bar messages and buttons
|
# Chrome notification bar messages and buttons
|
||||||
unsupported_feature=This PDF document might not be displayed correctly.
|
unsupported_feature=This PDF document might not be displayed correctly.
|
||||||
|
unsupported_feature_forms=This PDF document contains forms. The filling of form fields is not supported.
|
||||||
open_with_different_viewer=Open With Different Viewer
|
open_with_different_viewer=Open With Different Viewer
|
||||||
open_with_different_viewer.accessKey=o
|
open_with_different_viewer.accessKey=o
|
||||||
|
@ -609,7 +609,7 @@ var PDFView = {
|
|||||||
// return;
|
// return;
|
||||||
// this.fellback = true;
|
// this.fellback = true;
|
||||||
// var url = this.url.split('#')[0];
|
// var url = this.url.split('#')[0];
|
||||||
// FirefoxCom.request('fallback', url, function response(download) {
|
// FirefoxCom.request('fallback', featureId, url, function response(download) {
|
||||||
// if (!download)
|
// if (!download)
|
||||||
// return;
|
// return;
|
||||||
// PDFView.download();
|
// PDFView.download();
|
||||||
|
Loading…
Reference in New Issue
Block a user