test
1
web/xava/js/babel-polyfill.js
Normal file
127
web/xava/js/calendar.js
Normal file
@@ -0,0 +1,127 @@
|
||||
var oldLink = null;
|
||||
// code to change the active stylesheet
|
||||
function setActiveStyleSheet(link, title) {
|
||||
var i, a, main;
|
||||
for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
|
||||
if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
|
||||
a.disabled = true;
|
||||
if(a.getAttribute("title") == title) a.disabled = false;
|
||||
}
|
||||
}
|
||||
if (oldLink) oldLink.style.fontWeight = 'normal';
|
||||
oldLink = link;
|
||||
link.style.fontWeight = 'bold';
|
||||
return false;
|
||||
}
|
||||
|
||||
// This function gets called when the end-user clicks on some date.
|
||||
function selected(cal, date) {
|
||||
cal.sel.value = date; // just update the date in the input field.
|
||||
if (cal.dateClicked && (cal.sel.id == "sel1" || cal.sel.id == "sel3"))
|
||||
// if we add this call we close the calendar on single-click.
|
||||
// just to exemplify both cases, we are using this only for the 1st
|
||||
// and the 3rd field, while 2nd and 4th will still require double-click.
|
||||
cal.callCloseHandler();
|
||||
}
|
||||
|
||||
// And this gets called when the end-user clicks on the _selected_ date,
|
||||
// or clicks on the "Close" button. It just hides the calendar without
|
||||
// destroying it.
|
||||
function closeHandler(cal) {
|
||||
cal.hide(); // hide the calendar
|
||||
if (_dynarch_popupCalendar.dateClicked) {
|
||||
if ( _dynarch_popupCalendar.sel.fireEvent ) { // IE
|
||||
_dynarch_popupCalendar.sel.fireEvent("onChange");
|
||||
}
|
||||
else { // Others: Firefox, Safari
|
||||
var ev = document.createEvent("HTMLEvents");
|
||||
ev.initEvent("change", true, true);
|
||||
_dynarch_popupCalendar.sel.dispatchEvent(ev);
|
||||
}
|
||||
}
|
||||
// cal.destroy();
|
||||
_dynarch_popupCalendar.sel.focus();
|
||||
_dynarch_popupCalendar = null;
|
||||
|
||||
}
|
||||
|
||||
// This function shows the calendar under the element having the given id.
|
||||
// It takes care of catching "mousedown" signals on document and hiding the
|
||||
// calendar if the click was outside.
|
||||
function showCalendar(id, format, showsTime, showsOtherMonths) {
|
||||
var el = document.getElementById(id);
|
||||
if (_dynarch_popupCalendar != null) {
|
||||
// we already have some calendar created
|
||||
_dynarch_popupCalendar.hide(); // so we hide it first.
|
||||
} else {
|
||||
// first-time call, create the calendar.
|
||||
var cal = new Calendar(1, null, selected, closeHandler);
|
||||
// uncomment the following line to hide the week numbers
|
||||
// cal.weekNumbers = false;
|
||||
if (typeof showsTime == "string") {
|
||||
cal.showsTime = true;
|
||||
cal.time24 = (showsTime == "24");
|
||||
}
|
||||
if (showsOtherMonths) {
|
||||
cal.showsOtherMonths = true;
|
||||
}
|
||||
_dynarch_popupCalendar = cal; // remember it in the global var
|
||||
cal.setRange(1900, 2070); // min/max year allowed.
|
||||
cal.create();
|
||||
}
|
||||
_dynarch_popupCalendar.setDateFormat(format); // set the specified date format
|
||||
_dynarch_popupCalendar.parseDate(el.value); // try to parse the text in field
|
||||
_dynarch_popupCalendar.sel = el; // inform it what input field we use
|
||||
|
||||
// the reference element that we pass to showAtElement is the button that
|
||||
// triggers the calendar. In this example we align the calendar bottom-right
|
||||
// to the button.
|
||||
_dynarch_popupCalendar.showAtElement(el.nextSibling, openxava.calendarAlign); // show the calendar
|
||||
}
|
||||
|
||||
var MINUTE = 60 * 1000;
|
||||
var HOUR = 60 * MINUTE;
|
||||
var DAY = 24 * HOUR;
|
||||
var WEEK = 7 * DAY;
|
||||
|
||||
// If this handler returns true then the "date" given as
|
||||
// parameter will be disabled. In this example we enable
|
||||
// only days within a range of 10 days from the current
|
||||
// date.
|
||||
// You can use the functions date.getFullYear() -- returns the year
|
||||
// as 4 digit number, date.getMonth() -- returns the month as 0..11,
|
||||
// and date.getDate() -- returns the date of the month as 1..31, to
|
||||
// make heavy calculations here. However, beware that this function
|
||||
// should be very fast, as it is called for each day in a month when
|
||||
// the calendar is (re)constructed.
|
||||
function isDisabled(date) {
|
||||
var today = new Date();
|
||||
return (Math.abs(date.getTime() - today.getTime()) / DAY) > 10;
|
||||
}
|
||||
|
||||
function flatSelected(cal, date) {
|
||||
var el = document.getElementById("preview");
|
||||
el.innerHTML = date;
|
||||
}
|
||||
|
||||
function showFlatCalendar() {
|
||||
var parent = document.getElementById("display");
|
||||
|
||||
// construct a calendar giving only the "selected" handler.
|
||||
var cal = new Calendar(0, null, flatSelected);
|
||||
|
||||
// hide week numbers
|
||||
cal.weekNumbers = false;
|
||||
|
||||
// We want some dates to be disabled; see function isDisabled above
|
||||
cal.setDisabledHandler(isDisabled);
|
||||
cal.setDateFormat("%A, %B %e");
|
||||
|
||||
// this call must be the last as it might use data initialized above; if
|
||||
// we specify a parent, as opposite to the "showCalendar" function above,
|
||||
// then we create a flat calendar -- not popup. Hidden, though, but...
|
||||
cal.create(parent);
|
||||
|
||||
// ... we can show it here.
|
||||
cal.show();
|
||||
}
|
||||
9
web/xava/js/css-vars-ponyfill.js
Normal file
1329
web/xava/js/dwr-engine.js
Normal file
9
web/xava/js/filepond-polyfill.js
Normal file
@@ -0,0 +1,9 @@
|
||||
/*!
|
||||
* FilePondPluginImageValidateSize 1.0.4
|
||||
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
||||
* Please visit https://pqina.nl/filepond/ for details.
|
||||
*/
|
||||
|
||||
/* eslint-disable */
|
||||
|
||||
!function(r){"function"==typeof define&&define.amd?define(r):r()}(function(){"use strict";var r,e,t,n;Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(r){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),t=e.length>>>0;if("function"!=typeof r)throw new TypeError("predicate must be a function");for(var n=arguments[1],o=0;o<t;){var i=e[o];if(r.call(n,i,o,e))return i;o++}}}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(r){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),t=e.length>>>0;if("function"!=typeof r)throw new TypeError("predicate must be a function");for(var n=arguments[1],o=0;o<t;){var i=e[o];if(r.call(n,i,o,e))return o;o++}return-1}}),Array.from||(Array.from=(r=Object.prototype.toString,e=function(e){return"function"==typeof e||"[object Function]"===r.call(e)},t=Math.pow(2,53)-1,n=function(r){var e=function(r){var e=Number(r);return isNaN(e)?0:0!==e&&isFinite(e)?(e>0?1:-1)*Math.floor(Math.abs(e)):e}(r);return Math.min(Math.max(e,0),t)},function(r){var t=Object(r);if(null==r)throw new TypeError("Array.from requires an array-like object - not null or undefined");var o,i=arguments.length>1?arguments[1]:void 0;if(void 0!==i){if(!e(i))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(o=arguments[2])}for(var f,a=n(t.length),u=e(this)?Object(new this(a)):new Array(a),l=0;l<a;)f=t[l],u[l]=i?void 0===o?i(f,l):i.call(o,f,l):f,l+=1;return u.length=a,u})),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(r,e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),n=t.length>>>0;if(0===n)return!1;var o,i,f=0|e,a=Math.max(f>=0?f:n-Math.abs(f),0);for(;a<n;){if((o=t[a])===(i=r)||"number"==typeof o&&"number"==typeof i&&isNaN(o)&&isNaN(i))return!0;a++}return!1}}),Array.prototype.some||(Array.prototype.some=function(r){if(null==this)throw new TypeError("Array.prototype.some called on null or undefined");if("function"!=typeof r)throw new TypeError;for(var e=Object(this),t=e.length>>>0,n=arguments.length>=2?arguments[1]:void 0,o=0;o<t;o++)if(o in e&&r.call(n,e[o],o,e))return!0;return!1}),Array.prototype.every||(Array.prototype.every=function(r,e){var t,n;if(null==this)throw new TypeError("this is null or not defined");var o=Object(this),i=o.length>>>0;if("function"!=typeof r)throw new TypeError;for(arguments.length>1&&(t=e),n=0;n<i;){var f;if(n in o)if(f=o[n],!r.call(t,f,n,o))return!1;n++}return!0}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(r,e){if(null==r)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(r),n=1;n<arguments.length;n++){var o=arguments[n];if(null!=o)for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(t[i]=o[i])}return t},writable:!0,configurable:!0}),function(){if("undefined"==typeof window||"function"==typeof window.CustomEvent)return!1;function r(r,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var t=document.createEvent("CustomEvent");return t.initCustomEvent(r,e.bubbles,e.cancelable,e.detail),t}r.prototype=window.Event.prototype,window.CustomEvent=r}()});
|
||||
13
web/xava/js/jquery-ui.js
vendored
Normal file
4
web/xava/js/jquery.js
vendored
Normal file
234
web/xava/js/jquery.sorttable.js
Normal file
@@ -0,0 +1,234 @@
|
||||
/*!
|
||||
* sorttable
|
||||
*
|
||||
* @Version 1.0.3
|
||||
*
|
||||
* Copyright (c) 2013, David Brink dbrink@gmail.com
|
||||
* Copyright (c) 2010, Andres Koetter
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
||||
* and GPL (GPL-LICENSE.txt) licenses.
|
||||
*
|
||||
* Inspired by the the dragtable from Dan Vanderkam (danvk.org/dragtable/)
|
||||
* Thanks to the jquery and jqueryui comitters
|
||||
*
|
||||
* Any comment, bug report, feature-request is welcome
|
||||
* Feel free to contact me.
|
||||
*/
|
||||
(function ($) {
|
||||
$.widget("extend.sorttable", $.ui.sortable, {
|
||||
widgetEventPrefix: "sorttable",
|
||||
options: {
|
||||
helper: "table",
|
||||
helperCells: 1
|
||||
},
|
||||
_table: null,
|
||||
_startIndex: 0,
|
||||
_endIndex: 0,
|
||||
_currentItemWidth: 0,
|
||||
_sortCells: null,
|
||||
_createHelper: function (event) {
|
||||
var o = this.options;
|
||||
|
||||
if (o.helper == 'table') {
|
||||
// if using 'table' helper
|
||||
if (!this.setWidths) {
|
||||
this.setWidths = true;
|
||||
var items = this.items;
|
||||
var widths = [];
|
||||
for (i = 0; i < items.length; i++) {
|
||||
var item = $(items[i].item[0]);
|
||||
widths[i] = item.innerWidth() - parseInt(item.css('paddingLeft') || 0, 10) - parseInt(item.css('paddingRight') || 0, 10);
|
||||
}
|
||||
for (i = 0; i < items.length; i++) {
|
||||
var item = $(items[i].item[0]);
|
||||
item.width(widths[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return this._createHelperTable(event, this.currentItem);
|
||||
}
|
||||
else {
|
||||
// use default helper method
|
||||
return $.ui.sortable.prototype._createHelper.apply(this, [event]);
|
||||
}
|
||||
},
|
||||
_createHelperTable: function (e, ui) {
|
||||
var o = this.options, helperCells = o.helperCells;
|
||||
var hc = ui.is('th') || ui.is('td') ? ui : ui.parents('th:first,td:first');
|
||||
var index = hc.prevAll().length + 1
|
||||
var hcWidth = hc.innerWidth() - parseInt(hc.css('paddingLeft') || 0, 10) - parseInt(hc.css('paddingRight') || 0, 10);
|
||||
// save sizes because <ie9 reports wrong values when display:none
|
||||
this._currentItemWidth = hcWidth;
|
||||
var table = this._table;
|
||||
|
||||
var helperCellCount;
|
||||
if (typeof helperCells == 'number') {
|
||||
helperCellCount = helperCells;
|
||||
}
|
||||
|
||||
var cells = $([]);
|
||||
if (helperCellCount != 1) {
|
||||
cells = table.children().find('>tr:not(.ui-sortable)>td:nth-child(' + index + ')');
|
||||
if (helperCellCount < 0) {
|
||||
cells = cells.slice(0, cells.length + helperCellCount);
|
||||
}
|
||||
else if (helperCellCount > 1) {
|
||||
cells = cells.slice(0, helperCellCount - 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (!helperCellCount && helperCells) {
|
||||
cells = cells.filter(helperCells);
|
||||
}
|
||||
|
||||
cells.splice(0, 0, hc); // insert first cell
|
||||
|
||||
this._sortCells = cells;
|
||||
|
||||
var tableClone = table.clone().empty();
|
||||
tableClone.css('position', 'absolute');
|
||||
tableClone.css('width', 'auto');
|
||||
tableClone.css('min-width', 'inherit');
|
||||
tableClone.css('height', 'auto');
|
||||
tableClone.css('min-height', 'inherit');
|
||||
tableClone.attr('id', '');
|
||||
for (i = 0; i < cells.length; i++) {
|
||||
var cell = cells[i];
|
||||
if (!(cell instanceof jQuery)) {
|
||||
cell = $(cell);
|
||||
}
|
||||
var tr = cell.parents('tr:first');
|
||||
var cellClone = cell.clone();
|
||||
cellClone.width(hcWidth);
|
||||
var trClone = tr.clone().empty();
|
||||
var trHeight = tr.innerHeight() - parseInt(tr.css('paddingTop') || 0, 10) - parseInt(tr.css('paddingBottom') || 0, 10);
|
||||
trClone.height(trHeight);
|
||||
cellClone.appendTo(trClone.appendTo(tableClone));
|
||||
}
|
||||
|
||||
tableClone.find().each(function () {
|
||||
this.attr('id', ''); // clear ids on cloned table
|
||||
});
|
||||
table.before(tableClone);
|
||||
|
||||
return tableClone;
|
||||
},
|
||||
_createPlaceholder: function (that) {
|
||||
var self = that || this, o = self.options;
|
||||
|
||||
// call base method
|
||||
$.ui.sortable.prototype._createPlaceholder.apply(this, arguments);
|
||||
|
||||
if (o.helper == 'table') {
|
||||
var p = self.placeholder;
|
||||
// force width as border will prevent width from setting even though cell has no explicit width
|
||||
self.placeholder.width(self._currentItemWidth);
|
||||
|
||||
var sortCells = self._sortCells;
|
||||
if (sortCells) {
|
||||
sortCells.hide();
|
||||
if (sortCells.length > 1) {
|
||||
p.attr('rowSpan', sortCells.length);
|
||||
}
|
||||
}
|
||||
|
||||
var rowSpan = self._placeholderRowSpan;
|
||||
if (rowSpan > 1) {
|
||||
p.attr('rowSpan', rowSpan);
|
||||
}
|
||||
}
|
||||
},
|
||||
_swapNodes: function (a, b) {
|
||||
if (a && b) {
|
||||
var aparent = a.parentNode;
|
||||
var asibling = a.nextSibling === b ? a : a.nextSibling;
|
||||
b.parentNode.insertBefore(a, b);
|
||||
aparent.insertBefore(b, asibling);
|
||||
}
|
||||
},
|
||||
// bubble the moved col left or right
|
||||
_bubbleCols: function () {
|
||||
var from = this._startIndex;
|
||||
var to = this._endIndex;
|
||||
/* Find children thead and tbody.
|
||||
* Only to process the immediate tr-children. Bugfix for inner tables
|
||||
*/
|
||||
var trs = this._table.children().find('> tr:not(.ui-sortable)');
|
||||
if (from < to) {
|
||||
for (var i = from; i < to; i++) {
|
||||
var row1 = trs.find('>td:nth-child(' + i + '),>th:nth-child(' + i + ')');
|
||||
var row2 = trs.find('>td:nth-child(' + (i + 1) + '),>th:nth-child(' + (i + 1) + ')')
|
||||
for (var j = 0; j < row1.length; j++) {
|
||||
this._swapNodes(row1[j], row2[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (var i = from; i > to; i--) {
|
||||
var row1 = trs.find('>td:nth-child(' + i + '),>th:nth-child(' + i + ')');
|
||||
var row2 = trs.find('>td:nth-child(' + (i - 1) + '),>th:nth-child(' + (i - 1) + ')')
|
||||
for (var j = 0; j < row1.length; j++) {
|
||||
this._swapNodes(row1[j], row2[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
_rearrangeTableBackroundProcessing: function () {
|
||||
var _this = this;
|
||||
return function () {
|
||||
_this._bubbleCols();
|
||||
};
|
||||
},
|
||||
_sortStart: function () {
|
||||
var _this = this;
|
||||
return function (e, ui) {
|
||||
_this._startIndex = ui.item.prevAll().length + 1;
|
||||
}
|
||||
},
|
||||
_sortUpdate: function () {
|
||||
var _this = this;
|
||||
return function (e, ui) {
|
||||
_this._endIndex = ui.item.prevAll().length + 1;
|
||||
if (_this._startIndex != _this._endIndex) {
|
||||
// do reorganisation asynchronous
|
||||
// for chrome a little bit more than 1 ms because we want to force a rerender
|
||||
setTimeout(_this._rearrangeTableBackroundProcessing(), 50);
|
||||
}
|
||||
}
|
||||
},
|
||||
_sortStop: function () {
|
||||
var _this = this;
|
||||
return function (e, ui) {
|
||||
if (_this._sortCells) {
|
||||
_this._sortCells.show();
|
||||
}
|
||||
}
|
||||
},
|
||||
_create: function () {
|
||||
var el = this.element;
|
||||
if (el.is('table')) {
|
||||
this._table = el;
|
||||
// reset element to first tr
|
||||
el = this.element = el.find('tr:first');
|
||||
}
|
||||
else {
|
||||
// find parent table
|
||||
this._table = el.parents('table:first');
|
||||
}
|
||||
|
||||
this._startIndex = 0;
|
||||
this._endIndex = 0;
|
||||
|
||||
// bind to start and update
|
||||
el.bind('sorttablestart', this._sortStart());
|
||||
el.bind('sorttableupdate', this._sortUpdate());
|
||||
el.bind('sorttablestop', this._sortStop());
|
||||
|
||||
$.ui.sortable.prototype._create.apply(this);
|
||||
},
|
||||
destroy: function () {
|
||||
$.Widget.prototype.destroy.apply(this, arguments); // default destroy
|
||||
// now do other stuff particular to this widget
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
238
web/xava/js/jquery.ui.touch-punch.js
vendored
Normal file
@@ -0,0 +1,238 @@
|
||||
/*!
|
||||
* jQuery UI Touch Punch 1.0.7 as modified by RWAP Software
|
||||
* based on original touchpunch v0.2.3 which has not been updated since 2014
|
||||
*
|
||||
* Updates by RWAP Software to take account of various suggested changes on the original code issues
|
||||
*
|
||||
* Original: https://github.com/furf/jquery-ui-touch-punch
|
||||
* Copyright 2011–2014, Dave Furfero
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
*
|
||||
* Fork: https://github.com/RWAP/jquery-ui-touch-punch
|
||||
*
|
||||
* Depends:
|
||||
* jquery.ui.widget.js
|
||||
* jquery.ui.mouse.js
|
||||
*/
|
||||
|
||||
(function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define([ "jquery", "jquery.ui" ], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}(function ($) {
|
||||
|
||||
// Detect touch support
|
||||
$.support.touch = ( 'ontouchstart' in document
|
||||
|| 'ontouchstart' in window
|
||||
|| window.TouchEvent
|
||||
|| (window.DocumentTouch && document instanceof DocumentTouch)
|
||||
|| navigator.maxTouchPoints > 0
|
||||
|| navigator.msMaxTouchPoints > 0
|
||||
);
|
||||
|
||||
// Ignore browsers without touch or mouse support
|
||||
if (!$.support.touch || !$.ui.mouse) {
|
||||
return;
|
||||
}
|
||||
|
||||
var mouseProto = $.ui.mouse.prototype,
|
||||
_mouseInit = mouseProto._mouseInit,
|
||||
_mouseDestroy = mouseProto._mouseDestroy,
|
||||
touchHandled;
|
||||
|
||||
/**
|
||||
* Get the x,y position of a touch event
|
||||
* @param {Object} event A touch event
|
||||
*/
|
||||
function getTouchCoords (event) {
|
||||
return {
|
||||
x: event.originalEvent.changedTouches[0].pageX,
|
||||
y: event.originalEvent.changedTouches[0].pageY
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Simulate a mouse event based on a corresponding touch event
|
||||
* @param {Object} event A touch event
|
||||
* @param {String} simulatedType The corresponding mouse event
|
||||
*/
|
||||
function simulateMouseEvent (event, simulatedType) {
|
||||
|
||||
// Ignore multi-touch events
|
||||
if (event.originalEvent.touches.length > 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent "Ignored attempt to cancel a touchmove event with cancelable=false" errors
|
||||
if (event.cancelable) {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
var touch = event.originalEvent.changedTouches[0],
|
||||
simulatedEvent = document.createEvent('MouseEvents');
|
||||
|
||||
// Initialize the simulated mouse event using the touch event's coordinates
|
||||
simulatedEvent.initMouseEvent(
|
||||
simulatedType, // type
|
||||
true, // bubbles
|
||||
true, // cancelable
|
||||
window, // view
|
||||
1, // detail
|
||||
touch.screenX, // screenX
|
||||
touch.screenY, // screenY
|
||||
touch.clientX, // clientX
|
||||
touch.clientY, // clientY
|
||||
false, // ctrlKey
|
||||
false, // altKey
|
||||
false, // shiftKey
|
||||
false, // metaKey
|
||||
0, // button
|
||||
null // relatedTarget
|
||||
);
|
||||
|
||||
// Dispatch the simulated event to the target element
|
||||
event.target.dispatchEvent(simulatedEvent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the jQuery UI widget's touchstart events
|
||||
* @param {Object} event The widget element's touchstart event
|
||||
*/
|
||||
mouseProto._touchStart = function (event) {
|
||||
|
||||
var self = this;
|
||||
|
||||
// Interaction time
|
||||
this._startedMove = event.timeStamp;
|
||||
|
||||
// Track movement to determine if interaction was a click
|
||||
self._startPos = getTouchCoords(event);
|
||||
|
||||
// Ignore the event if another widget is already being handled
|
||||
if (touchHandled || !self._mouseCapture(event.originalEvent.changedTouches[0])) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Set the flag to prevent other widgets from inheriting the touch event
|
||||
touchHandled = true;
|
||||
|
||||
// Track movement to determine if interaction was a click
|
||||
self._touchMoved = false;
|
||||
|
||||
// Simulate the mouseover event
|
||||
simulateMouseEvent(event, 'mouseover');
|
||||
|
||||
// Simulate the mousemove event
|
||||
simulateMouseEvent(event, 'mousemove');
|
||||
|
||||
// Simulate the mousedown event
|
||||
simulateMouseEvent(event, 'mousedown');
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle the jQuery UI widget's touchmove events
|
||||
* @param {Object} event The document's touchmove event
|
||||
*/
|
||||
mouseProto._touchMove = function (event) {
|
||||
|
||||
// Ignore event if not handled
|
||||
if (!touchHandled) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Interaction was moved
|
||||
this._touchMoved = true;
|
||||
|
||||
// Simulate the mousemove event
|
||||
simulateMouseEvent(event, 'mousemove');
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle the jQuery UI widget's touchend events
|
||||
* @param {Object} event The document's touchend event
|
||||
*/
|
||||
mouseProto._touchEnd = function (event) {
|
||||
|
||||
// Ignore event if not handled
|
||||
if (!touchHandled) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Simulate the mouseup event
|
||||
simulateMouseEvent(event, 'mouseup');
|
||||
|
||||
// Simulate the mouseout event
|
||||
simulateMouseEvent(event, 'mouseout');
|
||||
|
||||
// If the touch interaction did not move, it should trigger a click
|
||||
// Check for this in two ways - length of time of simulation and distance moved
|
||||
// Allow for Apple Stylus to be used also
|
||||
var timeMoving = event.timeStamp - this._startedMove;
|
||||
if (!this._touchMoved || timeMoving < 500) {
|
||||
// Simulate the click event
|
||||
simulateMouseEvent(event, 'click');
|
||||
} else {
|
||||
var endPos = getTouchCoords(event);
|
||||
if ((Math.abs(endPos.x - this._startPos.x) < 10) && (Math.abs(endPos.y - this._startPos.y) < 10)) {
|
||||
|
||||
// If the touch interaction did not move, it should trigger a click
|
||||
if (!this._touchMoved || event.originalEvent.changedTouches[0].touchType === 'stylus') {
|
||||
// Simulate the click event
|
||||
simulateMouseEvent(event, 'click');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Unset the flag to determine the touch movement stopped
|
||||
this._touchMoved = false;
|
||||
|
||||
// Unset the flag to allow other widgets to inherit the touch event
|
||||
touchHandled = false;
|
||||
};
|
||||
|
||||
/**
|
||||
* A duck punch of the $.ui.mouse _mouseInit method to support touch events.
|
||||
* This method extends the widget with bound touch event handlers that
|
||||
* translate touch events to mouse events and pass them to the widget's
|
||||
* original mouse event handling methods.
|
||||
*/
|
||||
mouseProto._mouseInit = function () {
|
||||
|
||||
var self = this;
|
||||
|
||||
// Delegate the touch handlers to the widget's element
|
||||
self.element.on({
|
||||
touchstart: $.proxy(self, '_touchStart'),
|
||||
touchmove: $.proxy(self, '_touchMove'),
|
||||
touchend: $.proxy(self, '_touchEnd')
|
||||
});
|
||||
|
||||
// Call the original $.ui.mouse init method
|
||||
_mouseInit.call(self);
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove the touch event handlers
|
||||
*/
|
||||
mouseProto._mouseDestroy = function () {
|
||||
|
||||
var self = this;
|
||||
|
||||
// Delegate the touch handlers to the widget's element
|
||||
self.element.off({
|
||||
touchstart: $.proxy(self, '_touchStart'),
|
||||
touchmove: $.proxy(self, '_touchMove'),
|
||||
touchend: $.proxy(self, '_touchEnd')
|
||||
});
|
||||
|
||||
// Call the original $.ui.mouse destroy method
|
||||
_mouseDestroy.call(self);
|
||||
};
|
||||
|
||||
}));
|
||||
1184
web/xava/js/openxava.js
Normal file
10429
web/xava/js/pdfjs/build/pdf.js
Normal file
42312
web/xava/js/pdfjs/build/pdf.worker.js
vendored
Normal file
618
web/xava/js/pdfjs/web/debugger.js
Normal file
@@ -0,0 +1,618 @@
|
||||
/* Copyright 2012 Mozilla Foundation
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals PDFJS */
|
||||
|
||||
'use strict';
|
||||
|
||||
var FontInspector = (function FontInspectorClosure() {
|
||||
var fonts;
|
||||
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];
|
||||
div.className = '';
|
||||
}
|
||||
}
|
||||
function resetSelection() {
|
||||
var divs = document.querySelectorAll('div[' + fontAttribute + ']');
|
||||
for (var i = 0, ii = divs.length; i < ii; ++i) {
|
||||
var div = divs[i];
|
||||
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];
|
||||
div.className = show ? 'debuggerShowText' : 'debuggerHideText';
|
||||
}
|
||||
}
|
||||
function textLayerClick(e) {
|
||||
if (!e.target.dataset.fontName ||
|
||||
e.target.tagName.toUpperCase() !== 'DIV') {
|
||||
return;
|
||||
}
|
||||
var fontName = e.target.dataset.fontName;
|
||||
var selects = document.getElementsByTagName('input');
|
||||
for (var i = 0; i < selects.length; ++i) {
|
||||
var select = selects[i];
|
||||
if (select.dataset.fontName !== fontName) {
|
||||
continue;
|
||||
}
|
||||
select.checked = !select.checked;
|
||||
selectFont(fontName, select.checked);
|
||||
select.scrollIntoView();
|
||||
}
|
||||
}
|
||||
return {
|
||||
// Properties/functions needed by PDFBug.
|
||||
id: 'FontInspector',
|
||||
name: 'Font Inspector',
|
||||
panel: null,
|
||||
manager: null,
|
||||
init: function init() {
|
||||
var panel = this.panel;
|
||||
panel.setAttribute('style', 'padding: 5px;');
|
||||
var tmp = document.createElement('button');
|
||||
tmp.addEventListener('click', resetSelection);
|
||||
tmp.textContent = 'Refresh';
|
||||
panel.appendChild(tmp);
|
||||
|
||||
fonts = document.createElement('div');
|
||||
panel.appendChild(fonts);
|
||||
},
|
||||
cleanup: function cleanup() {
|
||||
fonts.textContent = '';
|
||||
},
|
||||
enabled: false,
|
||||
get active() {
|
||||
return active;
|
||||
},
|
||||
set active(value) {
|
||||
active = value;
|
||||
if (active) {
|
||||
document.body.addEventListener('click', textLayerClick, true);
|
||||
resetSelection();
|
||||
} else {
|
||||
document.body.removeEventListener('click', textLayerClick, true);
|
||||
removeSelection();
|
||||
}
|
||||
},
|
||||
// FontInspector specific functions.
|
||||
fontAdded: function fontAdded(fontObj, url) {
|
||||
function properties(obj, list) {
|
||||
var moreInfo = document.createElement('table');
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
var tr = document.createElement('tr');
|
||||
var td1 = document.createElement('td');
|
||||
td1.textContent = list[i];
|
||||
tr.appendChild(td1);
|
||||
var td2 = document.createElement('td');
|
||||
td2.textContent = obj[list[i]].toString();
|
||||
tr.appendChild(td2);
|
||||
moreInfo.appendChild(tr);
|
||||
}
|
||||
return moreInfo;
|
||||
}
|
||||
var moreInfo = properties(fontObj, ['name', 'type']);
|
||||
var fontName = fontObj.loadedName;
|
||||
var font = document.createElement('div');
|
||||
var name = document.createElement('span');
|
||||
name.textContent = fontName;
|
||||
var download = document.createElement('a');
|
||||
if (url) {
|
||||
url = /url\(['"]?([^\)"']+)/.exec(url);
|
||||
download.href = url[1];
|
||||
} else if (fontObj.data) {
|
||||
url = URL.createObjectURL(new Blob([fontObj.data], {
|
||||
type: fontObj.mimeType
|
||||
}));
|
||||
download.href = url;
|
||||
}
|
||||
download.textContent = 'Download';
|
||||
var logIt = document.createElement('a');
|
||||
logIt.href = '';
|
||||
logIt.textContent = 'Log';
|
||||
logIt.addEventListener('click', function(event) {
|
||||
event.preventDefault();
|
||||
console.log(fontObj);
|
||||
});
|
||||
var select = document.createElement('input');
|
||||
select.setAttribute('type', 'checkbox');
|
||||
select.dataset.fontName = fontName;
|
||||
select.addEventListener('click', (function(select, fontName) {
|
||||
return (function() {
|
||||
selectFont(fontName, select.checked);
|
||||
});
|
||||
})(select, fontName));
|
||||
font.appendChild(select);
|
||||
font.appendChild(name);
|
||||
font.appendChild(document.createTextNode(' '));
|
||||
font.appendChild(download);
|
||||
font.appendChild(document.createTextNode(' '));
|
||||
font.appendChild(logIt);
|
||||
font.appendChild(moreInfo);
|
||||
fonts.appendChild(font);
|
||||
// Somewhat of a hack, should probably add a hook for when the text layer
|
||||
// is done rendering.
|
||||
setTimeout(function() {
|
||||
if (this.active) {
|
||||
resetSelection();
|
||||
}
|
||||
}.bind(this), 2000);
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
// Manages all the page steppers.
|
||||
var StepperManager = (function StepperManagerClosure() {
|
||||
var steppers = [];
|
||||
var stepperDiv = null;
|
||||
var stepperControls = null;
|
||||
var stepperChooser = null;
|
||||
var breakPoints = Object.create(null);
|
||||
return {
|
||||
// Properties/functions needed by PDFBug.
|
||||
id: 'Stepper',
|
||||
name: 'Stepper',
|
||||
panel: null,
|
||||
manager: null,
|
||||
init: function init() {
|
||||
var self = this;
|
||||
this.panel.setAttribute('style', 'padding: 5px;');
|
||||
stepperControls = document.createElement('div');
|
||||
stepperChooser = document.createElement('select');
|
||||
stepperChooser.addEventListener('change', function(event) {
|
||||
self.selectStepper(this.value);
|
||||
});
|
||||
stepperControls.appendChild(stepperChooser);
|
||||
stepperDiv = document.createElement('div');
|
||||
this.panel.appendChild(stepperControls);
|
||||
this.panel.appendChild(stepperDiv);
|
||||
if (sessionStorage.getItem('pdfjsBreakPoints')) {
|
||||
breakPoints = JSON.parse(sessionStorage.getItem('pdfjsBreakPoints'));
|
||||
}
|
||||
},
|
||||
cleanup: function cleanup() {
|
||||
stepperChooser.textContent = '';
|
||||
stepperDiv.textContent = '';
|
||||
steppers = [];
|
||||
},
|
||||
enabled: false,
|
||||
active: false,
|
||||
// Stepper specific functions.
|
||||
create: function create(pageIndex) {
|
||||
var debug = document.createElement('div');
|
||||
debug.id = 'stepper' + pageIndex;
|
||||
debug.setAttribute('hidden', true);
|
||||
debug.className = 'stepper';
|
||||
stepperDiv.appendChild(debug);
|
||||
var b = document.createElement('option');
|
||||
b.textContent = 'Page ' + (pageIndex + 1);
|
||||
b.value = pageIndex;
|
||||
stepperChooser.appendChild(b);
|
||||
var initBreakPoints = breakPoints[pageIndex] || [];
|
||||
var stepper = new Stepper(debug, pageIndex, initBreakPoints);
|
||||
steppers.push(stepper);
|
||||
if (steppers.length === 1) {
|
||||
this.selectStepper(pageIndex, false);
|
||||
}
|
||||
return stepper;
|
||||
},
|
||||
selectStepper: function selectStepper(pageIndex, selectPanel) {
|
||||
var i;
|
||||
pageIndex = pageIndex | 0;
|
||||
if (selectPanel) {
|
||||
this.manager.selectPanel(this);
|
||||
}
|
||||
for (i = 0; i < steppers.length; ++i) {
|
||||
var stepper = steppers[i];
|
||||
if (stepper.pageIndex === pageIndex) {
|
||||
stepper.panel.removeAttribute('hidden');
|
||||
} else {
|
||||
stepper.panel.setAttribute('hidden', true);
|
||||
}
|
||||
}
|
||||
var options = stepperChooser.options;
|
||||
for (i = 0; i < options.length; ++i) {
|
||||
var option = options[i];
|
||||
option.selected = (option.value | 0) === pageIndex;
|
||||
}
|
||||
},
|
||||
saveBreakPoints: function saveBreakPoints(pageIndex, bps) {
|
||||
breakPoints[pageIndex] = bps;
|
||||
sessionStorage.setItem('pdfjsBreakPoints', JSON.stringify(breakPoints));
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
// The stepper for each page's IRQueue.
|
||||
var Stepper = (function StepperClosure() {
|
||||
// Shorter way to create element and optionally set textContent.
|
||||
function c(tag, textContent) {
|
||||
var d = document.createElement(tag);
|
||||
if (textContent) {
|
||||
d.textContent = textContent;
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
var opMap = null;
|
||||
|
||||
function simplifyArgs(args) {
|
||||
if (typeof args === 'string') {
|
||||
var MAX_STRING_LENGTH = 75;
|
||||
return args.length <= MAX_STRING_LENGTH ? args :
|
||||
args.substr(0, MAX_STRING_LENGTH) + '...';
|
||||
}
|
||||
if (typeof args !== 'object' || args === null) {
|
||||
return args;
|
||||
}
|
||||
if ('length' in args) { // array
|
||||
var simpleArgs = [], i, ii;
|
||||
var MAX_ITEMS = 10;
|
||||
for (i = 0, ii = Math.min(MAX_ITEMS, args.length); i < ii; i++) {
|
||||
simpleArgs.push(simplifyArgs(args[i]));
|
||||
}
|
||||
if (i < args.length) {
|
||||
simpleArgs.push('...');
|
||||
}
|
||||
return simpleArgs;
|
||||
}
|
||||
var simpleObj = {};
|
||||
for (var key in args) {
|
||||
simpleObj[key] = simplifyArgs(args[key]);
|
||||
}
|
||||
return simpleObj;
|
||||
}
|
||||
|
||||
function Stepper(panel, pageIndex, initialBreakPoints) {
|
||||
this.panel = panel;
|
||||
this.breakPoint = 0;
|
||||
this.nextBreakPoint = null;
|
||||
this.pageIndex = pageIndex;
|
||||
this.breakPoints = initialBreakPoints;
|
||||
this.currentIdx = -1;
|
||||
this.operatorListIdx = 0;
|
||||
}
|
||||
Stepper.prototype = {
|
||||
init: function init() {
|
||||
var panel = this.panel;
|
||||
var content = c('div', 'c=continue, s=step');
|
||||
var table = c('table');
|
||||
content.appendChild(table);
|
||||
table.cellSpacing = 0;
|
||||
var headerRow = c('tr');
|
||||
table.appendChild(headerRow);
|
||||
headerRow.appendChild(c('th', 'Break'));
|
||||
headerRow.appendChild(c('th', 'Idx'));
|
||||
headerRow.appendChild(c('th', 'fn'));
|
||||
headerRow.appendChild(c('th', 'args'));
|
||||
panel.appendChild(content);
|
||||
this.table = table;
|
||||
if (!opMap) {
|
||||
opMap = Object.create(null);
|
||||
for (var key in PDFJS.OPS) {
|
||||
opMap[PDFJS.OPS[key]] = key;
|
||||
}
|
||||
}
|
||||
},
|
||||
updateOperatorList: function updateOperatorList(operatorList) {
|
||||
var self = this;
|
||||
|
||||
function cboxOnClick() {
|
||||
var x = +this.dataset.idx;
|
||||
if (this.checked) {
|
||||
self.breakPoints.push(x);
|
||||
} else {
|
||||
self.breakPoints.splice(self.breakPoints.indexOf(x), 1);
|
||||
}
|
||||
StepperManager.saveBreakPoints(self.pageIndex, self.breakPoints);
|
||||
}
|
||||
|
||||
var MAX_OPERATORS_COUNT = 15000;
|
||||
if (this.operatorListIdx > MAX_OPERATORS_COUNT) {
|
||||
return;
|
||||
}
|
||||
|
||||
var chunk = document.createDocumentFragment();
|
||||
var operatorsToDisplay = Math.min(MAX_OPERATORS_COUNT,
|
||||
operatorList.fnArray.length);
|
||||
for (var i = this.operatorListIdx; i < operatorsToDisplay; i++) {
|
||||
var line = c('tr');
|
||||
line.className = 'line';
|
||||
line.dataset.idx = i;
|
||||
chunk.appendChild(line);
|
||||
var checked = this.breakPoints.indexOf(i) !== -1;
|
||||
var args = operatorList.argsArray[i] || [];
|
||||
|
||||
var breakCell = c('td');
|
||||
var cbox = c('input');
|
||||
cbox.type = 'checkbox';
|
||||
cbox.className = 'points';
|
||||
cbox.checked = checked;
|
||||
cbox.dataset.idx = i;
|
||||
cbox.onclick = cboxOnClick;
|
||||
|
||||
breakCell.appendChild(cbox);
|
||||
line.appendChild(breakCell);
|
||||
line.appendChild(c('td', i.toString()));
|
||||
var fn = opMap[operatorList.fnArray[i]];
|
||||
var decArgs = args;
|
||||
if (fn === 'showText') {
|
||||
var glyphs = args[0];
|
||||
var newArgs = [];
|
||||
var str = [];
|
||||
for (var j = 0; j < glyphs.length; j++) {
|
||||
var glyph = glyphs[j];
|
||||
if (typeof glyph === 'object' && glyph !== null) {
|
||||
str.push(glyph.fontChar);
|
||||
} else {
|
||||
if (str.length > 0) {
|
||||
newArgs.push(str.join(''));
|
||||
str = [];
|
||||
}
|
||||
newArgs.push(glyph); // null or number
|
||||
}
|
||||
}
|
||||
if (str.length > 0) {
|
||||
newArgs.push(str.join(''));
|
||||
}
|
||||
decArgs = [newArgs];
|
||||
}
|
||||
line.appendChild(c('td', fn));
|
||||
line.appendChild(c('td', JSON.stringify(simplifyArgs(decArgs))));
|
||||
}
|
||||
if (operatorsToDisplay < operatorList.fnArray.length) {
|
||||
line = c('tr');
|
||||
var lastCell = c('td', '...');
|
||||
lastCell.colspan = 4;
|
||||
chunk.appendChild(lastCell);
|
||||
}
|
||||
this.operatorListIdx = operatorList.fnArray.length;
|
||||
this.table.appendChild(chunk);
|
||||
},
|
||||
getNextBreakPoint: function getNextBreakPoint() {
|
||||
this.breakPoints.sort(function(a, b) { return a - b; });
|
||||
for (var i = 0; i < this.breakPoints.length; i++) {
|
||||
if (this.breakPoints[i] > this.currentIdx) {
|
||||
return this.breakPoints[i];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
},
|
||||
breakIt: function breakIt(idx, callback) {
|
||||
StepperManager.selectStepper(this.pageIndex, true);
|
||||
var self = this;
|
||||
var dom = document;
|
||||
self.currentIdx = idx;
|
||||
var listener = function(e) {
|
||||
switch (e.keyCode) {
|
||||
case 83: // step
|
||||
dom.removeEventListener('keydown', listener, false);
|
||||
self.nextBreakPoint = self.currentIdx + 1;
|
||||
self.goTo(-1);
|
||||
callback();
|
||||
break;
|
||||
case 67: // continue
|
||||
dom.removeEventListener('keydown', listener, false);
|
||||
var breakPoint = self.getNextBreakPoint();
|
||||
self.nextBreakPoint = breakPoint;
|
||||
self.goTo(-1);
|
||||
callback();
|
||||
break;
|
||||
}
|
||||
};
|
||||
dom.addEventListener('keydown', listener, false);
|
||||
self.goTo(idx);
|
||||
},
|
||||
goTo: function goTo(idx) {
|
||||
var allRows = this.panel.getElementsByClassName('line');
|
||||
for (var x = 0, xx = allRows.length; x < xx; ++x) {
|
||||
var row = allRows[x];
|
||||
if ((row.dataset.idx | 0) === idx) {
|
||||
row.style.backgroundColor = 'rgb(251,250,207)';
|
||||
row.scrollIntoView();
|
||||
} else {
|
||||
row.style.backgroundColor = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
return Stepper;
|
||||
})();
|
||||
|
||||
var Stats = (function Stats() {
|
||||
var stats = [];
|
||||
function clear(node) {
|
||||
while (node.hasChildNodes()) {
|
||||
node.removeChild(node.lastChild);
|
||||
}
|
||||
}
|
||||
function getStatIndex(pageNumber) {
|
||||
for (var i = 0, ii = stats.length; i < ii; ++i) {
|
||||
if (stats[i].pageNumber === pageNumber) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return {
|
||||
// Properties/functions needed by PDFBug.
|
||||
id: 'Stats',
|
||||
name: 'Stats',
|
||||
panel: null,
|
||||
manager: null,
|
||||
init: function init() {
|
||||
this.panel.setAttribute('style', 'padding: 5px;');
|
||||
PDFJS.enableStats = true;
|
||||
},
|
||||
enabled: false,
|
||||
active: false,
|
||||
// Stats specific functions.
|
||||
add: function(pageNumber, stat) {
|
||||
if (!stat) {
|
||||
return;
|
||||
}
|
||||
var statsIndex = getStatIndex(pageNumber);
|
||||
if (statsIndex !== false) {
|
||||
var b = stats[statsIndex];
|
||||
this.panel.removeChild(b.div);
|
||||
stats.splice(statsIndex, 1);
|
||||
}
|
||||
var wrapper = document.createElement('div');
|
||||
wrapper.className = 'stats';
|
||||
var title = document.createElement('div');
|
||||
title.className = 'title';
|
||||
title.textContent = 'Page: ' + pageNumber;
|
||||
var statsDiv = document.createElement('div');
|
||||
statsDiv.textContent = stat.toString();
|
||||
wrapper.appendChild(title);
|
||||
wrapper.appendChild(statsDiv);
|
||||
stats.push({ pageNumber: pageNumber, div: wrapper });
|
||||
stats.sort(function(a, b) { return a.pageNumber - b.pageNumber; });
|
||||
clear(this.panel);
|
||||
for (var i = 0, ii = stats.length; i < ii; ++i) {
|
||||
this.panel.appendChild(stats[i].div);
|
||||
}
|
||||
},
|
||||
cleanup: function () {
|
||||
stats = [];
|
||||
clear(this.panel);
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
// Manages all the debugging tools.
|
||||
var PDFBug = (function PDFBugClosure() {
|
||||
var panelWidth = 300;
|
||||
var buttons = [];
|
||||
var activePanel = null;
|
||||
|
||||
return {
|
||||
tools: [
|
||||
FontInspector,
|
||||
StepperManager,
|
||||
Stats
|
||||
],
|
||||
enable: function(ids) {
|
||||
var all = false, tools = this.tools;
|
||||
if (ids.length === 1 && ids[0] === 'all') {
|
||||
all = true;
|
||||
}
|
||||
for (var i = 0; i < tools.length; ++i) {
|
||||
var tool = tools[i];
|
||||
if (all || ids.indexOf(tool.id) !== -1) {
|
||||
tool.enabled = true;
|
||||
}
|
||||
}
|
||||
if (!all) {
|
||||
// Sort the tools by the order they are enabled.
|
||||
tools.sort(function(a, b) {
|
||||
var indexA = ids.indexOf(a.id);
|
||||
indexA = indexA < 0 ? tools.length : indexA;
|
||||
var indexB = ids.indexOf(b.id);
|
||||
indexB = indexB < 0 ? tools.length : indexB;
|
||||
return indexA - indexB;
|
||||
});
|
||||
}
|
||||
},
|
||||
init: function init() {
|
||||
/*
|
||||
* Basic Layout:
|
||||
* PDFBug
|
||||
* Controls
|
||||
* Panels
|
||||
* Panel
|
||||
* Panel
|
||||
* ...
|
||||
*/
|
||||
var ui = document.createElement('div');
|
||||
ui.id = 'PDFBug';
|
||||
|
||||
var controls = document.createElement('div');
|
||||
controls.setAttribute('class', 'controls');
|
||||
ui.appendChild(controls);
|
||||
|
||||
var panels = document.createElement('div');
|
||||
panels.setAttribute('class', 'panels');
|
||||
ui.appendChild(panels);
|
||||
|
||||
var container = document.getElementById('viewerContainer');
|
||||
container.appendChild(ui);
|
||||
container.style.right = panelWidth + 'px';
|
||||
|
||||
// Initialize all the debugging tools.
|
||||
var tools = this.tools;
|
||||
var self = this;
|
||||
for (var i = 0; i < tools.length; ++i) {
|
||||
var tool = tools[i];
|
||||
var panel = document.createElement('div');
|
||||
var panelButton = document.createElement('button');
|
||||
panelButton.textContent = tool.name;
|
||||
panelButton.addEventListener('click', (function(selected) {
|
||||
return function(event) {
|
||||
event.preventDefault();
|
||||
self.selectPanel(selected);
|
||||
};
|
||||
})(i));
|
||||
controls.appendChild(panelButton);
|
||||
panels.appendChild(panel);
|
||||
tool.panel = panel;
|
||||
tool.manager = this;
|
||||
if (tool.enabled) {
|
||||
tool.init();
|
||||
} else {
|
||||
panel.textContent = tool.name + ' is disabled. To enable add ' +
|
||||
' "' + tool.id + '" to the pdfBug parameter ' +
|
||||
'and refresh (seperate multiple by commas).';
|
||||
}
|
||||
buttons.push(panelButton);
|
||||
}
|
||||
this.selectPanel(0);
|
||||
},
|
||||
cleanup: function cleanup() {
|
||||
for (var i = 0, ii = this.tools.length; i < ii; i++) {
|
||||
if (this.tools[i].enabled) {
|
||||
this.tools[i].cleanup();
|
||||
}
|
||||
}
|
||||
},
|
||||
selectPanel: function selectPanel(index) {
|
||||
if (typeof index !== 'number') {
|
||||
index = this.tools.indexOf(index);
|
||||
}
|
||||
if (index === activePanel) {
|
||||
return;
|
||||
}
|
||||
activePanel = index;
|
||||
var tools = this.tools;
|
||||
for (var j = 0; j < tools.length; ++j) {
|
||||
if (j === index) {
|
||||
buttons[j].setAttribute('class', 'active');
|
||||
tools[j].active = true;
|
||||
tools[j].panel.removeAttribute('hidden');
|
||||
} else {
|
||||
buttons[j].setAttribute('class', '');
|
||||
tools[j].active = false;
|
||||
tools[j].panel.setAttribute('hidden', 'true');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
})();
|
||||
11
web/xava/js/pdfjs/web/images/annotation-check.svg
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="40"
|
||||
height="40"
|
||||
viewBox="0 0 40 40">
|
||||
<path
|
||||
d="M 1.5006714,23.536225 6.8925879,18.994244 14.585721,26.037937 34.019683,4.5410479 38.499329,9.2235032 14.585721,35.458952 z"
|
||||
id="path4"
|
||||
style="fill:#ffff00;fill-opacity:1;stroke:#000000;stroke-width:1.25402856;stroke-opacity:1" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 415 B |
16
web/xava/js/pdfjs/web/images/annotation-comment.svg
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height="40"
|
||||
width="40"
|
||||
viewBox="0 0 40 40">
|
||||
<rect
|
||||
style="fill:#ffff00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
width="33.76017"
|
||||
height="33.76017"
|
||||
x="3.119915"
|
||||
y="3.119915" />
|
||||
<path
|
||||
d="m 20.677967,8.54499 c -7.342801,0 -13.295293,4.954293 -13.295293,11.065751 0,2.088793 0.3647173,3.484376 1.575539,5.150563 L 6.0267418,31.45501 13.560595,29.011117 c 2.221262,1.387962 4.125932,1.665377 7.117372,1.665377 7.3428,0 13.295291,-4.954295 13.295291,-11.065753 0,-6.111458 -5.952491,-11.065751 -13.295291,-11.065751 z"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.93031836;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 883 B |
26
web/xava/js/pdfjs/web/images/annotation-help.svg
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="40"
|
||||
height="40"
|
||||
viewBox="0 0 40 40">
|
||||
<g
|
||||
transform="translate(0,-60)"
|
||||
id="layer1">
|
||||
<rect
|
||||
width="36.460953"
|
||||
height="34.805603"
|
||||
x="1.7695236"
|
||||
y="62.597198"
|
||||
style="fill:#ffff00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.30826771;stroke-opacity:1" />
|
||||
<g
|
||||
transform="matrix(0.88763677,0,0,0.88763677,2.2472646,8.9890584)">
|
||||
<path
|
||||
d="M 20,64.526342 C 11.454135,64.526342 4.5263421,71.454135 4.5263421,80 4.5263421,88.545865 11.454135,95.473658 20,95.473658 28.545865,95.473658 35.473658,88.545865 35.473658,80 35.473658,71.454135 28.545865,64.526342 20,64.526342 z m -0.408738,9.488564 c 3.527079,0 6.393832,2.84061 6.393832,6.335441 0,3.494831 -2.866753,6.335441 -6.393832,6.335441 -3.527079,0 -6.393832,-2.84061 -6.393832,-6.335441 0,-3.494831 2.866753,-6.335441 6.393832,-6.335441 z"
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.02768445;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||
<path
|
||||
d="m 7.2335209,71.819938 4.9702591,4.161823 c -1.679956,2.581606 -1.443939,6.069592 0.159325,8.677725 l -5.1263071,3.424463 c 0.67516,1.231452 3.0166401,3.547686 4.2331971,4.194757 l 3.907728,-4.567277 c 2.541952,1.45975 5.730694,1.392161 8.438683,-0.12614 l 3.469517,6.108336 c 1.129779,-0.44367 4.742234,-3.449633 5.416358,-5.003859 l -5.46204,-4.415541 c 1.44319,-2.424098 1.651175,-5.267515 0.557303,-7.748623 l 5.903195,-3.833951 C 33.14257,71.704996 30.616217,69.018606 29.02952,67.99296 l -4.118813,4.981678 C 22.411934,71.205099 18.900853,70.937534 16.041319,72.32916 l -3.595408,-5.322091 c -1.345962,0.579488 -4.1293881,2.921233 -5.2123901,4.812869 z m 8.1010311,3.426672 c 2.75284,-2.446266 6.769149,-2.144694 9.048998,0.420874 2.279848,2.56557 2.113919,6.596919 -0.638924,9.043185 -2.752841,2.446267 -6.775754,2.13726 -9.055604,-0.428308 -2.279851,-2.565568 -2.107313,-6.589485 0.64553,-9.035751 z"
|
||||
style="fill:#000000;fill-opacity:1;stroke:none" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
10
web/xava/js/pdfjs/web/images/annotation-insert.svg
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="64"
|
||||
height="64"
|
||||
viewBox="0 0 64 64">
|
||||
<path
|
||||
d="M 32.003143,1.4044602 57.432701,62.632577 6.5672991,62.627924 z"
|
||||
style="fill:#ffff00;fill-opacity:0.94117647;fill-rule:nonzero;stroke:#000000;stroke-width:1.00493038;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 408 B |
11
web/xava/js/pdfjs/web/images/annotation-key.svg
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="64"
|
||||
height="64"
|
||||
viewBox="0 0 64 64">
|
||||
<path
|
||||
d="M 25.470843,9.4933766 C 25.30219,12.141818 30.139101,14.445969 34.704831,13.529144 40.62635,12.541995 41.398833,7.3856498 35.97505,5.777863 31.400921,4.1549155 25.157674,6.5445892 25.470843,9.4933766 z M 4.5246282,17.652051 C 4.068249,11.832873 9.2742983,5.9270407 18.437379,3.0977088 29.751911,-0.87185184 45.495663,1.4008022 53.603953,7.1104009 c 9.275765,6.1889221 7.158128,16.2079421 -3.171076,21.5939521 -1.784316,1.635815 -6.380222,1.21421 -7.068351,3.186186 -1.04003,0.972427 -1.288046,2.050158 -1.232864,3.168203 1.015111,2.000108 -3.831548,1.633216 -3.270553,3.759574 0.589477,5.264544 -0.179276,10.53738 -0.362842,15.806257 -0.492006,2.184998 1.163456,4.574232 -0.734888,6.610642 -2.482919,2.325184 -7.30604,2.189143 -9.193497,-0.274767 -2.733688,-1.740626 -8.254447,-3.615254 -6.104247,-6.339626 3.468112,-1.708686 -2.116197,-3.449897 0.431242,-5.080274 5.058402,-1.39256 -2.393215,-2.304318 -0.146889,-4.334645 3.069198,-0.977415 2.056986,-2.518352 -0.219121,-3.540397 1.876567,-1.807151 1.484149,-4.868919 -2.565455,-5.942205 0.150866,-1.805474 2.905737,-4.136876 -1.679967,-5.20493 C 10.260902,27.882167 4.6872697,22.95045 4.5245945,17.652051 z"
|
||||
id="path604"
|
||||
style="fill:#ffff00;fill-opacity:1;stroke:#000000;stroke-width:1.72665179;stroke-opacity:1" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
11
web/xava/js/pdfjs/web/images/annotation-newparagraph.svg
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="64"
|
||||
height="64"
|
||||
viewBox="0 0 64 64">
|
||||
<path
|
||||
d="M 32.003143,10.913072 57.432701,53.086929 6.567299,53.083723 z"
|
||||
id="path2985"
|
||||
style="fill:#ffff00;fill-opacity:0.94117647;fill-rule:nonzero;stroke:#000000;stroke-width:0.83403099;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 426 B |
7
web/xava/js/pdfjs/web/images/annotation-noicon.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="40"
|
||||
height="40"
|
||||
viewBox="0 0 40 40">
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 158 B |
42
web/xava/js/pdfjs/web/images/annotation-note.svg
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="40"
|
||||
height="40"
|
||||
viewBox="0 0 40 40">
|
||||
<rect
|
||||
width="36.075428"
|
||||
height="31.096582"
|
||||
x="1.962286"
|
||||
y="4.4517088"
|
||||
id="rect4"
|
||||
style="fill:#ffff00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.23004246;stroke-opacity:1" />
|
||||
<rect
|
||||
width="27.96859"
|
||||
height="1.5012145"
|
||||
x="6.0157046"
|
||||
y="10.285"
|
||||
id="rect6"
|
||||
style="fill:#000000;fill-opacity:1;stroke:none" />
|
||||
<rect
|
||||
width="27.96859"
|
||||
height="0.85783684"
|
||||
x="6.0157056"
|
||||
y="23.21689"
|
||||
id="rect8"
|
||||
style="fill:#000000;fill-opacity:1;stroke:none" />
|
||||
<rect
|
||||
width="27.96859"
|
||||
height="0.85783684"
|
||||
x="5.8130345"
|
||||
y="28.964394"
|
||||
id="rect10"
|
||||
style="fill:#000000;fill-opacity:1;stroke:none" />
|
||||
<rect
|
||||
width="27.96859"
|
||||
height="0.85783684"
|
||||
x="6.0157046"
|
||||
y="17.426493"
|
||||
id="rect12"
|
||||
style="fill:#000000;fill-opacity:1;stroke:none" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
16
web/xava/js/pdfjs/web/images/annotation-paragraph.svg
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="40"
|
||||
height="40"
|
||||
viewBox="0 0 40 40">
|
||||
<rect
|
||||
width="33.76017"
|
||||
height="33.76017"
|
||||
x="3.119915"
|
||||
y="3.119915"
|
||||
style="fill:#ffff00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||
<path
|
||||
d="m 17.692678,34.50206 0,-16.182224 c -1.930515,-0.103225 -3.455824,-0.730383 -4.57593,-1.881473 -1.12011,-1.151067 -1.680164,-2.619596 -1.680164,-4.405591 0,-1.992435 0.621995,-3.5796849 1.865988,-4.7617553 1.243989,-1.1820288 3.06352,-1.7730536 5.458598,-1.7730764 l 9.802246,0 0,2.6789711 -2.229895,0 0,26.3251486 -2.632515,0 0,-26.3251486 -3.45324,0 0,26.3251486 z"
|
||||
style="font-size:29.42051125px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.07795751;stroke-opacity:1;font-family:Arial;-inkscape-font-specification:Arial" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
BIN
web/xava/js/pdfjs/web/images/findbarButton-next-rtl.png
Normal file
|
After Width: | Height: | Size: 199 B |
BIN
web/xava/js/pdfjs/web/images/findbarButton-next-rtl@2x.png
Normal file
|
After Width: | Height: | Size: 304 B |
BIN
web/xava/js/pdfjs/web/images/findbarButton-next.png
Normal file
|
After Width: | Height: | Size: 193 B |
BIN
web/xava/js/pdfjs/web/images/findbarButton-next@2x.png
Normal file
|
After Width: | Height: | Size: 296 B |
BIN
web/xava/js/pdfjs/web/images/findbarButton-previous-rtl.png
Normal file
|
After Width: | Height: | Size: 193 B |
BIN
web/xava/js/pdfjs/web/images/findbarButton-previous-rtl@2x.png
Normal file
|
After Width: | Height: | Size: 296 B |
BIN
web/xava/js/pdfjs/web/images/findbarButton-previous.png
Normal file
|
After Width: | Height: | Size: 199 B |
BIN
web/xava/js/pdfjs/web/images/findbarButton-previous@2x.png
Normal file
|
After Width: | Height: | Size: 304 B |
BIN
web/xava/js/pdfjs/web/images/grab.cur
Normal file
|
After Width: | Height: | Size: 326 B |
BIN
web/xava/js/pdfjs/web/images/grabbing.cur
Normal file
|
After Width: | Height: | Size: 326 B |
BIN
web/xava/js/pdfjs/web/images/loading-icon.gif
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
web/xava/js/pdfjs/web/images/loading-small.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
web/xava/js/pdfjs/web/images/loading-small@2x.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 403 B |
|
After Width: | Height: | Size: 933 B |
|
After Width: | Height: | Size: 179 B |
|
After Width: | Height: | Size: 266 B |
BIN
web/xava/js/pdfjs/web/images/secondaryToolbarButton-handTool.png
Normal file
|
After Width: | Height: | Size: 301 B |
|
After Width: | Height: | Size: 583 B |
BIN
web/xava/js/pdfjs/web/images/secondaryToolbarButton-lastPage.png
Normal file
|
After Width: | Height: | Size: 175 B |
|
After Width: | Height: | Size: 276 B |
|
After Width: | Height: | Size: 360 B |
|
After Width: | Height: | Size: 731 B |
BIN
web/xava/js/pdfjs/web/images/secondaryToolbarButton-rotateCw.png
Normal file
|
After Width: | Height: | Size: 359 B |
|
After Width: | Height: | Size: 714 B |
BIN
web/xava/js/pdfjs/web/images/shadow.png
Normal file
|
After Width: | Height: | Size: 290 B |
BIN
web/xava/js/pdfjs/web/images/texture.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-bookmark.png
Normal file
|
After Width: | Height: | Size: 174 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-bookmark@2x.png
Normal file
|
After Width: | Height: | Size: 260 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-download.png
Normal file
|
After Width: | Height: | Size: 259 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-download@2x.png
Normal file
|
After Width: | Height: | Size: 425 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-menuArrows.png
Normal file
|
After Width: | Height: | Size: 108 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-menuArrows@2x.png
Normal file
|
After Width: | Height: | Size: 152 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-openFile.png
Normal file
|
After Width: | Height: | Size: 295 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-openFile@2x.png
Normal file
|
After Width: | Height: | Size: 550 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-pageDown-rtl.png
Normal file
|
After Width: | Height: | Size: 242 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-pageDown-rtl@2x.png
Normal file
|
After Width: | Height: | Size: 398 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-pageDown.png
Normal file
|
After Width: | Height: | Size: 238 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-pageDown@2x.png
Normal file
|
After Width: | Height: | Size: 396 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-pageUp-rtl.png
Normal file
|
After Width: | Height: | Size: 245 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-pageUp-rtl@2x.png
Normal file
|
After Width: | Height: | Size: 405 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-pageUp.png
Normal file
|
After Width: | Height: | Size: 246 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-pageUp@2x.png
Normal file
|
After Width: | Height: | Size: 403 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-presentationMode.png
Normal file
|
After Width: | Height: | Size: 321 B |
|
After Width: | Height: | Size: 586 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-print.png
Normal file
|
After Width: | Height: | Size: 257 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-print@2x.png
Normal file
|
After Width: | Height: | Size: 464 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-search.png
Normal file
|
After Width: | Height: | Size: 309 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-search@2x.png
Normal file
|
After Width: | Height: | Size: 653 B |
|
After Width: | Height: | Size: 246 B |
|
After Width: | Height: | Size: 456 B |
|
After Width: | Height: | Size: 243 B |
|
After Width: | Height: | Size: 458 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-sidebarToggle-rtl.png
Normal file
|
After Width: | Height: | Size: 225 B |
|
After Width: | Height: | Size: 344 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-sidebarToggle.png
Normal file
|
After Width: | Height: | Size: 225 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-sidebarToggle@2x.png
Normal file
|
After Width: | Height: | Size: 331 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-viewAttachments.png
Normal file
|
After Width: | Height: | Size: 384 B |
|
After Width: | Height: | Size: 871 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-viewOutline-rtl.png
Normal file
|
After Width: | Height: | Size: 177 B |
|
After Width: | Height: | Size: 394 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-viewOutline.png
Normal file
|
After Width: | Height: | Size: 178 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-viewOutline@2x.png
Normal file
|
After Width: | Height: | Size: 331 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-viewThumbnail.png
Normal file
|
After Width: | Height: | Size: 185 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-viewThumbnail@2x.png
Normal file
|
After Width: | Height: | Size: 220 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-zoomIn.png
Normal file
|
After Width: | Height: | Size: 136 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-zoomIn@2x.png
Normal file
|
After Width: | Height: | Size: 160 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-zoomOut.png
Normal file
|
After Width: | Height: | Size: 88 B |
BIN
web/xava/js/pdfjs/web/images/toolbarButton-zoomOut@2x.png
Normal file
|
After Width: | Height: | Size: 109 B |
BIN
web/xava/js/pdfjs/web/images/treeitem-collapsed-rtl.png
Normal file
|
After Width: | Height: | Size: 183 B |
BIN
web/xava/js/pdfjs/web/images/treeitem-collapsed-rtl@2x.png
Normal file
|
After Width: | Height: | Size: 205 B |
BIN
web/xava/js/pdfjs/web/images/treeitem-collapsed.png
Normal file
|
After Width: | Height: | Size: 128 B |
BIN
web/xava/js/pdfjs/web/images/treeitem-collapsed@2x.png
Normal file
|
After Width: | Height: | Size: 149 B |
BIN
web/xava/js/pdfjs/web/images/treeitem-expanded.png
Normal file
|
After Width: | Height: | Size: 125 B |
BIN
web/xava/js/pdfjs/web/images/treeitem-expanded@2x.png
Normal file
|
After Width: | Height: | Size: 172 B |
1033
web/xava/js/pdfjs/web/l10n.js
Normal file
2122
web/xava/js/pdfjs/web/viewer.css
Normal file
424
web/xava/js/pdfjs/web/viewer.html
Normal file
@@ -0,0 +1,424 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Copyright 2012 Mozilla Foundation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Adobe CMap resources are covered by their own copyright but the same license:
|
||||
|
||||
Copyright 1990-2015 Adobe Systems Incorporated.
|
||||
|
||||
See https://github.com/adobe-type-tools/cmap-resources
|
||||
-->
|
||||
<html dir="ltr" mozdisallowselectionprint moznomarginboxes>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="google" content="notranslate">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>PDF.js viewer</title>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="viewer.css"/>
|
||||
|
||||
<script src="compatibility.js"></script>
|
||||
|
||||
|
||||
|
||||
<!-- This snippet is used in production (included from viewer.html) -->
|
||||
<link rel="resource" type="application/l10n" href="locale/locale.properties"/>
|
||||
<script src="l10n.js"></script>
|
||||
<script src="../build/pdf.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="debugger.js"></script>
|
||||
<script src="viewer.js"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body tabindex="1" class="loadingInProgress">
|
||||
<div id="outerContainer">
|
||||
|
||||
<div id="sidebarContainer">
|
||||
<div id="toolbarSidebar">
|
||||
<div class="splitToolbarButton toggled">
|
||||
<button id="viewThumbnail" class="toolbarButton group toggled" title="Show Thumbnails" tabindex="2" data-l10n-id="thumbs">
|
||||
<span data-l10n-id="thumbs_label">Thumbnails</span>
|
||||
</button>
|
||||
<button id="viewOutline" class="toolbarButton group" title="Show Document Outline" tabindex="3" data-l10n-id="outline">
|
||||
<span data-l10n-id="outline_label">Document Outline</span>
|
||||
</button>
|
||||
<button id="viewAttachments" class="toolbarButton group" title="Show Attachments" tabindex="4" data-l10n-id="attachments">
|
||||
<span data-l10n-id="attachments_label">Attachments</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="sidebarContent">
|
||||
<div id="thumbnailView">
|
||||
</div>
|
||||
<div id="outlineView" class="hidden">
|
||||
</div>
|
||||
<div id="attachmentsView" class="hidden">
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- sidebarContainer -->
|
||||
|
||||
<div id="mainContainer">
|
||||
<div class="findbar hidden doorHanger hiddenSmallView" id="findbar">
|
||||
<label for="findInput" class="toolbarLabel" data-l10n-id="find_label">Find:</label>
|
||||
<input id="findInput" class="toolbarField" tabindex="91">
|
||||
<div class="splitToolbarButton">
|
||||
<button class="toolbarButton findPrevious" title="" id="findPrevious" tabindex="92" data-l10n-id="find_previous">
|
||||
<span data-l10n-id="find_previous_label">Previous</span>
|
||||
</button>
|
||||
<div class="splitToolbarButtonSeparator"></div>
|
||||
<button class="toolbarButton findNext" title="" id="findNext" tabindex="93" data-l10n-id="find_next">
|
||||
<span data-l10n-id="find_next_label">Next</span>
|
||||
</button>
|
||||
</div>
|
||||
<input type="checkbox" id="findHighlightAll" class="toolbarField" tabindex="94">
|
||||
<label for="findHighlightAll" class="toolbarLabel" data-l10n-id="find_highlight">Highlight all</label>
|
||||
<input type="checkbox" id="findMatchCase" class="toolbarField" tabindex="95">
|
||||
<label for="findMatchCase" class="toolbarLabel" data-l10n-id="find_match_case_label">Match case</label>
|
||||
<span id="findResultsCount" class="toolbarLabel hidden"></span>
|
||||
<span id="findMsg" class="toolbarLabel"></span>
|
||||
</div> <!-- findbar -->
|
||||
|
||||
<div id="secondaryToolbar" class="secondaryToolbar hidden doorHangerRight">
|
||||
<div id="secondaryToolbarButtonContainer">
|
||||
<button id="secondaryPresentationMode" class="secondaryToolbarButton presentationMode visibleLargeView" title="Switch to Presentation Mode" tabindex="51" data-l10n-id="presentation_mode">
|
||||
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
|
||||
</button>
|
||||
|
||||
<button id="secondaryOpenFile" class="secondaryToolbarButton openFile visibleLargeView" title="Open File" tabindex="52" data-l10n-id="open_file">
|
||||
<span data-l10n-id="open_file_label">Open</span>
|
||||
</button>
|
||||
|
||||
<button id="secondaryPrint" class="secondaryToolbarButton print visibleMediumView" title="Print" tabindex="53" data-l10n-id="print">
|
||||
<span data-l10n-id="print_label">Print</span>
|
||||
</button>
|
||||
|
||||
<button id="secondaryDownload" class="secondaryToolbarButton download visibleMediumView" title="Download" tabindex="54" data-l10n-id="download">
|
||||
<span data-l10n-id="download_label">Download</span>
|
||||
</button>
|
||||
|
||||
<a href="#" id="secondaryViewBookmark" class="secondaryToolbarButton bookmark visibleSmallView" title="Current view (copy or open in new window)" tabindex="55" data-l10n-id="bookmark">
|
||||
<span data-l10n-id="bookmark_label">Current View</span>
|
||||
</a>
|
||||
|
||||
<div class="horizontalToolbarSeparator visibleLargeView"></div>
|
||||
|
||||
<button id="firstPage" class="secondaryToolbarButton firstPage" title="Go to First Page" tabindex="56" data-l10n-id="first_page">
|
||||
<span data-l10n-id="first_page_label">Go to First Page</span>
|
||||
</button>
|
||||
<button id="lastPage" class="secondaryToolbarButton lastPage" title="Go to Last Page" tabindex="57" data-l10n-id="last_page">
|
||||
<span data-l10n-id="last_page_label">Go to Last Page</span>
|
||||
</button>
|
||||
|
||||
<div class="horizontalToolbarSeparator"></div>
|
||||
|
||||
<button id="pageRotateCw" class="secondaryToolbarButton rotateCw" title="Rotate Clockwise" tabindex="58" data-l10n-id="page_rotate_cw">
|
||||
<span data-l10n-id="page_rotate_cw_label">Rotate Clockwise</span>
|
||||
</button>
|
||||
<button id="pageRotateCcw" class="secondaryToolbarButton rotateCcw" title="Rotate Counterclockwise" tabindex="59" data-l10n-id="page_rotate_ccw">
|
||||
<span data-l10n-id="page_rotate_ccw_label">Rotate Counterclockwise</span>
|
||||
</button>
|
||||
|
||||
<div class="horizontalToolbarSeparator"></div>
|
||||
|
||||
<button id="toggleHandTool" class="secondaryToolbarButton handTool" title="Enable hand tool" tabindex="60" data-l10n-id="hand_tool_enable">
|
||||
<span data-l10n-id="hand_tool_enable_label">Enable hand tool</span>
|
||||
</button>
|
||||
|
||||
<div class="horizontalToolbarSeparator"></div>
|
||||
|
||||
<button id="documentProperties" class="secondaryToolbarButton documentProperties" title="Document Properties…" tabindex="61" data-l10n-id="document_properties">
|
||||
<span data-l10n-id="document_properties_label">Document Properties…</span>
|
||||
</button>
|
||||
</div>
|
||||
</div> <!-- secondaryToolbar -->
|
||||
|
||||
<div class="toolbar">
|
||||
<div id="toolbarContainer">
|
||||
<div id="toolbarViewer">
|
||||
<div id="toolbarViewerLeft">
|
||||
<button id="sidebarToggle" class="toolbarButton" title="Toggle Sidebar" tabindex="11" data-l10n-id="toggle_sidebar">
|
||||
<span data-l10n-id="toggle_sidebar_label">Toggle Sidebar</span>
|
||||
</button>
|
||||
<div class="toolbarButtonSpacer"></div>
|
||||
<button id="viewFind" class="toolbarButton group hiddenSmallView" title="Find in Document" tabindex="12" data-l10n-id="findbar">
|
||||
<span data-l10n-id="findbar_label">Find</span>
|
||||
</button>
|
||||
<div class="splitToolbarButton">
|
||||
<button class="toolbarButton pageUp" title="Previous Page" id="previous" tabindex="13" data-l10n-id="previous">
|
||||
<span data-l10n-id="previous_label">Previous</span>
|
||||
</button>
|
||||
<div class="splitToolbarButtonSeparator"></div>
|
||||
<button class="toolbarButton pageDown" title="Next Page" id="next" tabindex="14" data-l10n-id="next">
|
||||
<span data-l10n-id="next_label">Next</span>
|
||||
</button>
|
||||
</div>
|
||||
<label id="pageNumberLabel" class="toolbarLabel" for="pageNumber" data-l10n-id="page_label">Page: </label>
|
||||
<input type="number" id="pageNumber" class="toolbarField pageNumber" value="1" size="4" min="1" tabindex="15">
|
||||
<span id="numPages" class="toolbarLabel"></span>
|
||||
</div>
|
||||
<div id="toolbarViewerRight">
|
||||
<button id="presentationMode" class="toolbarButton presentationMode hiddenLargeView" title="Switch to Presentation Mode" tabindex="31" data-l10n-id="presentation_mode">
|
||||
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
|
||||
</button>
|
||||
|
||||
<button id="openFile" class="toolbarButton openFile hiddenLargeView" title="Open File" tabindex="32" data-l10n-id="open_file">
|
||||
<span data-l10n-id="open_file_label">Open</span>
|
||||
</button>
|
||||
|
||||
<button id="print" class="toolbarButton print hiddenMediumView" title="Print" tabindex="33" data-l10n-id="print">
|
||||
<span data-l10n-id="print_label">Print</span>
|
||||
</button>
|
||||
|
||||
<button id="download" class="toolbarButton download hiddenMediumView" title="Download" tabindex="34" data-l10n-id="download">
|
||||
<span data-l10n-id="download_label">Download</span>
|
||||
</button>
|
||||
<a href="#" id="viewBookmark" class="toolbarButton bookmark hiddenSmallView" title="Current view (copy or open in new window)" tabindex="35" data-l10n-id="bookmark">
|
||||
<span data-l10n-id="bookmark_label">Current View</span>
|
||||
</a>
|
||||
|
||||
<div class="verticalToolbarSeparator hiddenSmallView"></div>
|
||||
|
||||
<button id="secondaryToolbarToggle" class="toolbarButton" title="Tools" tabindex="36" data-l10n-id="tools">
|
||||
<span data-l10n-id="tools_label">Tools</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="outerCenter">
|
||||
<div class="innerCenter" id="toolbarViewerMiddle">
|
||||
<div class="splitToolbarButton">
|
||||
<button id="zoomOut" class="toolbarButton zoomOut" title="Zoom Out" tabindex="21" data-l10n-id="zoom_out">
|
||||
<span data-l10n-id="zoom_out_label">Zoom Out</span>
|
||||
</button>
|
||||
<div class="splitToolbarButtonSeparator"></div>
|
||||
<button id="zoomIn" class="toolbarButton zoomIn" title="Zoom In" tabindex="22" data-l10n-id="zoom_in">
|
||||
<span data-l10n-id="zoom_in_label">Zoom In</span>
|
||||
</button>
|
||||
</div>
|
||||
<span id="scaleSelectContainer" class="dropdownToolbarButton">
|
||||
<select id="scaleSelect" title="Zoom" tabindex="23" data-l10n-id="zoom">
|
||||
<option id="pageAutoOption" title="" value="auto" selected="selected" data-l10n-id="page_scale_auto">Automatic Zoom</option>
|
||||
<option id="pageActualOption" title="" value="page-actual" data-l10n-id="page_scale_actual">Actual Size</option>
|
||||
<option id="pageFitOption" title="" value="page-fit" data-l10n-id="page_scale_fit">Fit Page</option>
|
||||
<option id="pageWidthOption" title="" value="page-width" data-l10n-id="page_scale_width">Full Width</option>
|
||||
<option id="customScaleOption" title="" value="custom"></option>
|
||||
<option title="" value="0.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 50 }'>50%</option>
|
||||
<option title="" value="0.75" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 75 }'>75%</option>
|
||||
<option title="" value="1" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 100 }'>100%</option>
|
||||
<option title="" value="1.25" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 125 }'>125%</option>
|
||||
<option title="" value="1.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 150 }'>150%</option>
|
||||
<option title="" value="2" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 200 }'>200%</option>
|
||||
<option title="" value="3" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 300 }'>300%</option>
|
||||
<option title="" value="4" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 400 }'>400%</option>
|
||||
</select>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="loadingBar">
|
||||
<div class="progress">
|
||||
<div class="glimmer">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<menu type="context" id="viewerContextMenu">
|
||||
<menuitem id="contextFirstPage" label="First Page"
|
||||
data-l10n-id="first_page"></menuitem>
|
||||
<menuitem id="contextLastPage" label="Last Page"
|
||||
data-l10n-id="last_page"></menuitem>
|
||||
<menuitem id="contextPageRotateCw" label="Rotate Clockwise"
|
||||
data-l10n-id="page_rotate_cw"></menuitem>
|
||||
<menuitem id="contextPageRotateCcw" label="Rotate Counter-Clockwise"
|
||||
data-l10n-id="page_rotate_ccw"></menuitem>
|
||||
</menu>
|
||||
|
||||
<div id="viewerContainer" tabindex="0">
|
||||
<div id="viewer" class="pdfViewer"></div>
|
||||
</div>
|
||||
|
||||
<div id="errorWrapper" hidden='true'>
|
||||
<div id="errorMessageLeft">
|
||||
<span id="errorMessage"></span>
|
||||
<button id="errorShowMore" data-l10n-id="error_more_info">
|
||||
More Information
|
||||
</button>
|
||||
<button id="errorShowLess" data-l10n-id="error_less_info" hidden='true'>
|
||||
Less Information
|
||||
</button>
|
||||
</div>
|
||||
<div id="errorMessageRight">
|
||||
<button id="errorClose" data-l10n-id="error_close">
|
||||
Close
|
||||
</button>
|
||||
</div>
|
||||
<div class="clearBoth"></div>
|
||||
<textarea id="errorMoreInfo" hidden='true' readonly="readonly"></textarea>
|
||||
</div>
|
||||
</div> <!-- mainContainer -->
|
||||
|
||||
<div id="overlayContainer" class="hidden">
|
||||
<div id="passwordOverlay" class="container hidden">
|
||||
<div class="dialog">
|
||||
<div class="row">
|
||||
<p id="passwordText" data-l10n-id="password_label">Enter the password to open this PDF file:</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<!-- The type="password" attribute is set via script, to prevent warnings in Firefox for all http:// documents. -->
|
||||
<input id="password" class="toolbarField" />
|
||||
</div>
|
||||
<div class="buttonRow">
|
||||
<button id="passwordCancel" class="overlayButton"><span data-l10n-id="password_cancel">Cancel</span></button>
|
||||
<button id="passwordSubmit" class="overlayButton"><span data-l10n-id="password_ok">OK</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="documentPropertiesOverlay" class="container hidden">
|
||||
<div class="dialog">
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_file_name">File name:</span> <p id="fileNameField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_file_size">File size:</span> <p id="fileSizeField">-</p>
|
||||
</div>
|
||||
<div class="separator"></div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_title">Title:</span> <p id="titleField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_author">Author:</span> <p id="authorField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_subject">Subject:</span> <p id="subjectField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_keywords">Keywords:</span> <p id="keywordsField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_creation_date">Creation Date:</span> <p id="creationDateField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_modification_date">Modification Date:</span> <p id="modificationDateField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_creator">Creator:</span> <p id="creatorField">-</p>
|
||||
</div>
|
||||
<div class="separator"></div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_producer">PDF Producer:</span> <p id="producerField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_version">PDF Version:</span> <p id="versionField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_page_count">Page Count:</span> <p id="pageCountField">-</p>
|
||||
</div>
|
||||
<div class="buttonRow">
|
||||
<button id="documentPropertiesClose" class="overlayButton"><span data-l10n-id="document_properties_close">Close</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- overlayContainer -->
|
||||
|
||||
</div> <!-- outerContainer -->
|
||||
<div id="printContainer"></div>
|
||||
<div id="mozPrintCallback-shim" hidden>
|
||||
<style>
|
||||
@media print {
|
||||
#printContainer div {
|
||||
page-break-after: always;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
#mozPrintCallback-shim {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
z-index: 9999999;
|
||||
|
||||
display: block;
|
||||
text-align: center;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
#mozPrintCallback-shim[hidden] {
|
||||
display: none;
|
||||
}
|
||||
@media print {
|
||||
#mozPrintCallback-shim {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
#mozPrintCallback-shim .mozPrintCallback-dialog-box {
|
||||
display: inline-block;
|
||||
margin: -50px auto 0;
|
||||
position: relative;
|
||||
top: 45%;
|
||||
left: 0;
|
||||
min-width: 220px;
|
||||
max-width: 400px;
|
||||
|
||||
padding: 9px;
|
||||
|
||||
border: 1px solid hsla(0, 0%, 0%, .5);
|
||||
border-radius: 2px;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
|
||||
|
||||
background-color: #474747;
|
||||
|
||||
color: hsl(0, 0%, 85%);
|
||||
font-size: 16px;
|
||||
line-height: 20px;
|
||||
}
|
||||
#mozPrintCallback-shim .progress-row {
|
||||
clear: both;
|
||||
padding: 1em 0;
|
||||
}
|
||||
#mozPrintCallback-shim progress {
|
||||
width: 100%;
|
||||
}
|
||||
#mozPrintCallback-shim .relative-progress {
|
||||
clear: both;
|
||||
float: right;
|
||||
}
|
||||
#mozPrintCallback-shim .progress-actions {
|
||||
clear: both;
|
||||
}
|
||||
</style>
|
||||
<div class="mozPrintCallback-dialog-box">
|
||||
<!-- TODO: Localise the following strings -->
|
||||
Preparing document for printing...
|
||||
<div class="progress-row">
|
||||
<progress value="0" max="100"></progress>
|
||||
<span class="relative-progress">0%</span>
|
||||
</div>
|
||||
<div class="progress-actions">
|
||||
<input type="button" value="Cancel" class="mozPrintCallback-cancel">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||