Document properties

This commit is contained in:
Tim van der Meij 2014-01-22 00:07:07 +01:00
parent c6d201b13b
commit 5f7ded4ff6
10 changed files with 385 additions and 18 deletions

View file

@ -19,7 +19,7 @@
getFileName, scrollIntoView, getPDFFileNameFromURL, PDFHistory,
Preferences, ViewHistory, PageView, ThumbnailView,
noContextMenuHandler, SecondaryToolbar, PasswordPrompt,
PresentationMode, HandTool, Promise */
PresentationMode, HandTool, Promise, DocumentProperties */
'use strict';
@ -90,6 +90,7 @@ var currentPageNumber = 1;
//#include password_prompt.js
//#include presentation_mode.js
//#include hand_tool.js
//#include document_properties.js
var PDFView = {
pages: [],
@ -162,7 +163,9 @@ var PDFView = {
firstPage: document.getElementById('firstPage'),
lastPage: document.getElementById('lastPage'),
pageRotateCw: document.getElementById('pageRotateCw'),
pageRotateCcw: document.getElementById('pageRotateCcw')
pageRotateCcw: document.getElementById('pageRotateCcw'),
documentProperties: DocumentProperties,
documentPropertiesButton: document.getElementById('documentProperties')
});
PasswordPrompt.initialize({
@ -182,6 +185,23 @@ var PDFView = {
pageRotateCcw: document.getElementById('contextPageRotateCcw')
});
DocumentProperties.initialize({
overlayContainer: document.getElementById('overlayContainer'),
closeButton: document.getElementById('documentPropertiesClose'),
fileNameField: document.getElementById('fileNameField'),
fileSizeField: document.getElementById('fileSizeField'),
titleField: document.getElementById('titleField'),
authorField: document.getElementById('authorField'),
subjectField: document.getElementById('subjectField'),
keywordsField: document.getElementById('keywordsField'),
creationDateField: document.getElementById('creationDateField'),
modificationDateField: document.getElementById('modificationDateField'),
creatorField: document.getElementById('creatorField'),
producerField: document.getElementById('producerField'),
versionField: document.getElementById('versionField'),
pageCountField: document.getElementById('pageCountField')
});
this.initialized = true;
container.addEventListener('scroll', function() {
self.lastScroll = Date.now();