Commit 3aa6c65e authored by Rebecca Blundell's avatar Rebecca Blundell Committed by Robert Lyon
Browse files

Bug 1840107: upgrade pdfjs

updated to version 2.2.228
made changes as in README.mahara

behatnotneeded

Change-Id: I2c9b90a9b5e50a00d9b251b385ed6233c489deae
parent a5c20d6b
......@@ -2,7 +2,7 @@ PDF.js in Mahara
==================
Website: http://mozilla.github.io/pdf.js/getting_started/#download
Version: 2.0.943
Version: 2.2.228
License: Apache License 2.0
PDF.js is used in the Mahara to provide a javascript library for
......@@ -24,7 +24,7 @@ Build Instructions:
based on htdocs/artefact/file/blocktype/pdf/js/pdfjs/web/viewer.html
and htdocs/artefact/file/blocktype/pdf/js/pdfjs/web/viewer.js
Minify instructions:
Minify instructions (or use an online minifier):
1. Install uglifyjs if you don't have: npm install uglify-js
2. cd htdocs/artefact/file/blocktype/pdf/js/pdfjs/build/
3. Run uglifyjs pdf.js -o pdf.min.js
......@@ -39,9 +39,15 @@ Changes:
* Minify js files for faster loading
* Use absolute paths in viewer.js
(39154e686ea9de5c3bfcc194c417456b1aa184cf)
* Open fileurl if defined
(b4d5245867e7fede16fe848d48a0eee3b11f7c86)
* viewer.css additions to support viewing by non-JS users
(517f71a183f0ccfd89f379b1647407449785dda3)
* viewer.css tweak to get the bottom of the display to show
(d09a09ab51e80c2383b8a47b746f068271396863)
* viewer.css tweak to avoid horizontal scrollbar on default 3-column page layout
(6ef27c8c79279504bee31cce5762f0536f8d3c13)
* Hide the "open file" button in the toolbar
* viewer.js tweak to show pdf menu on language selected in Mahara
(- required reinstating some code from a previous version ~ line 4381)
......@@ -21,30 +21,26 @@ var FontInspector = (function FontInspectorClosure() {
var active = false;
var fontAttribute = 'data-font-name';
function removeSelection() {
var divs = document.querySelectorAll('div[' + fontAttribute + ']');
for (var i = 0, ii = divs.length; i < ii; ++i) {
var div = divs[i];
let divs = document.querySelectorAll(`span[${fontAttribute}]`);
for (let div of divs) {
div.className = '';
}
}
function resetSelection() {
var divs = document.querySelectorAll('div[' + fontAttribute + ']');
for (var i = 0, ii = divs.length; i < ii; ++i) {
var div = divs[i];
let divs = document.querySelectorAll(`span[${fontAttribute}]`);
for (let div of divs) {
div.className = 'debuggerHideText';
}
}
function selectFont(fontName, show) {
var divs = document.querySelectorAll('div[' + fontAttribute + '=' +
fontName + ']');
for (var i = 0, ii = divs.length; i < ii; ++i) {
var div = divs[i];
let divs = document.querySelectorAll(`span[${fontAttribute}=${fontName}]`);
for (let div of divs) {
div.className = show ? 'debuggerShowText' : 'debuggerHideText';
}
}
function textLayerClick(e) {
if (!e.target.dataset.fontName ||
e.target.tagName.toUpperCase() !== 'DIV') {
e.target.tagName.toUpperCase() !== 'SPAN') {
return;
}
var fontName = e.target.dataset.fontName;
......
......@@ -226,6 +226,10 @@ invalid_file_error=ملف PDF تالف أو غير صحيح.
missing_file_error=ملف PDF غير موجود.
unexpected_response_error=استجابة خادوم غير متوقعة.
# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
# replaced by the modification date, and time, of the annotation.
annotation_date_string={{date}}، {{time}}
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
......
......@@ -226,6 +226,10 @@ invalid_file_error=Няспраўны або пашкоджаны файл PDF.
missing_file_error=Адсутны файл PDF.
unexpected_response_error=Нечаканы адказ сервера.
# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
# replaced by the modification date, and time, of the annotation.
annotation_date_string={{date}}, {{time}}
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
......
......@@ -226,6 +226,10 @@ invalid_file_error=Restr PDF didalvoudek pe kontronet.
missing_file_error=Restr PDF o vankout.
unexpected_response_error=Respont dic'hortoz a-berzh an dafariad
# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
# replaced by the modification date, and time, of the annotation.
annotation_date_string={{date}}, {{time}}
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
......
......@@ -167,9 +167,22 @@ find_reached_bottom=S'ha arribat al final del document, es continua pel principi
# "{{current}}" and "{{total}}" will be replaced by a number representing the
# index of the currently active find result, respectively a number representing
# the total number of matches in the document.
find_match_count={[ plural(total) ]}
find_match_count[one]={{current}} de {{total}} coincidència
find_match_count[two]={{current}} de {{total}} coincidències
find_match_count[few]={{current}} de {{total}} coincidències
find_match_count[many]={{current}} de {{total}} coincidències
find_match_count[other]={{current}} de {{total}} coincidències
# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
# [zero|one|two|few|many|other], with [other] as the default value.
# "{{limit}}" will be replaced by a numerical value.
find_match_count_limit={[ plural(limit) ]}
find_match_count_limit[zero]=Més de {{limit}} coincidències
find_match_count_limit[one]=Més d'{{limit}} coincidència
find_match_count_limit[two]=Més de {{limit}} coincidències
find_match_count_limit[few]=Més de {{limit}} coincidències
find_match_count_limit[many]=Més de {{limit}} coincidències
find_match_count_limit[other]=Més de {{limit}} coincidències
find_not_found=No s'ha trobat l'expressió
# Error panel labels
......
......@@ -226,6 +226,10 @@ invalid_file_error=Man oke ta o yujtajinäq ri PDF yakb'äl.
missing_file_error=Man xilitäj ta ri PDF yakb'äl.
unexpected_response_error=Man oyob'en ta tz'olin rutzij ruk'u'x samaj.
# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
# replaced by the modification date, and time, of the annotation.
annotation_date_string={{date}}, {{time}}
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
......
......@@ -226,6 +226,10 @@ invalid_file_error=Neplatný nebo chybný soubor PDF.
missing_file_error=Chybí soubor PDF.
unexpected_response_error=Neočekávaná odpověď serveru.
# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
# replaced by the modification date, and time, of the annotation.
annotation_date_string={{date}}, {{time}}
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
......
......@@ -226,6 +226,10 @@ invalid_file_error=Ffeil PDF annilys neu llwgr.
missing_file_error=Ffeil PDF coll.
unexpected_response_error=Ymateb annisgwyl gan y gweinydd.
# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
# replaced by the modification date, and time, of the annotation.
annotation_date_string={{date}}, {{time}}
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
......
......@@ -226,6 +226,10 @@ invalid_file_error=PDF-filen er ugyldig eller ødelagt.
missing_file_error=Manglende PDF-fil.
unexpected_response_error=Uventet svar fra serveren.
# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
# replaced by the modification date, and time, of the annotation.
annotation_date_string={{date}}, {{time}}
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
......
......@@ -226,6 +226,10 @@ invalid_file_error=Ungültige oder beschädigte PDF-Datei
missing_file_error=Fehlende PDF-Datei
unexpected_response_error=Unerwartete Antwort des Servers
# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
# replaced by the modification date, and time, of the annotation.
annotation_date_string={{date}}, {{time}}
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
......
......@@ -226,6 +226,10 @@ invalid_file_error=Μη έγκυρο ή κατεστραμμένο αρχείο
missing_file_error=Λείπει αρχείο PDF.
unexpected_response_error=Μη αναμενόμενη απόκριση από το διακομιστή.
# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
# replaced by the modification date, and time, of the annotation.
annotation_date_string={{date}}, {{time}}
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
......
......@@ -226,6 +226,10 @@ invalid_file_error=Invalid or corrupted PDF file.
missing_file_error=Missing PDF file.
unexpected_response_error=Unexpected server response.
# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
# replaced by the modification date, and time, of the annotation.
annotation_date_string={{date}}, {{time}}
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
......
......@@ -226,6 +226,10 @@ invalid_file_error=Invalid or corrupted PDF file.
missing_file_error=Missing PDF file.
unexpected_response_error=Unexpected server response.
# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
# replaced by the modification date, and time, of the annotation.
annotation_date_string={{date}}, {{time}}
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
......
......@@ -226,6 +226,10 @@ invalid_file_error=Invalid or corrupted PDF file.
missing_file_error=Missing PDF file.
unexpected_response_error=Unexpected server response.
# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
# replaced by the modification date, and time, of the annotation.
annotation_date_string={{date}}, {{time}}
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
......
......@@ -226,6 +226,10 @@ invalid_file_error=Nevalida aŭ difektita PDF dosiero.
missing_file_error=Mankas dosiero PDF.
unexpected_response_error=Neatendita respondo de servilo.
# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
# replaced by the modification date, and time, of the annotation.
annotation_date_string={{date}}, {{time}}
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment