|
1
|
|
|
/** |
|
2
|
|
|
* Unknown File Plugin |
|
3
|
|
|
* @author grommunio GmbH <[email protected]> |
|
4
|
|
|
*/ |
|
5
|
|
|
function UnknownFilePlugin() { |
|
6
|
|
|
"use strict"; |
|
7
|
|
|
|
|
8
|
|
|
var divElement = undefined, |
|
|
|
|
|
|
9
|
|
|
self = this; |
|
10
|
|
|
|
|
11
|
|
|
function initCSS() { |
|
12
|
|
|
} |
|
13
|
|
|
|
|
14
|
|
|
function initButtons() { |
|
15
|
|
|
var leftToolbar = document.getElementById('toolbarLeft'); |
|
16
|
|
|
// hide unused elements |
|
17
|
|
|
document.getElementById("navButtons").style.display = 'none'; |
|
18
|
|
|
document.getElementById("pageNumberLabel").style.display = 'none'; |
|
19
|
|
|
document.getElementById("pageNumber").style.display = 'none'; |
|
20
|
|
|
document.getElementById("numPages").style.display = 'none'; |
|
21
|
|
|
document.getElementById("toolbar").style.display = 'none'; |
|
22
|
|
|
document.getElementById("titlebarRight").style.display = 'none'; |
|
23
|
|
|
leftToolbar.style.visibility = "visible"; |
|
24
|
|
|
|
|
25
|
|
|
} |
|
26
|
|
|
|
|
27
|
|
|
this.initialize = function ( viewerElement, documentUrl ) { |
|
28
|
|
|
divElement = document.createElement("div"); |
|
29
|
|
|
divElement.setAttribute('class', 'unknown-file'); |
|
30
|
|
|
divElement.innerHTML = 'This file cannot be previewed using your browser. <br><br><a class="download-button" href="' + documentUrl + '">Click here to download</a>'; |
|
31
|
|
|
|
|
32
|
|
|
viewerElement.appendChild(divElement); |
|
33
|
|
|
viewerElement.style.overflow = "auto"; |
|
34
|
|
|
|
|
35
|
|
|
self.onLoad(); |
|
36
|
|
|
|
|
37
|
|
|
initCSS(); |
|
38
|
|
|
initButtons(); |
|
39
|
|
|
}; |
|
40
|
|
|
|
|
41
|
|
|
this.isSlideshow = function () { |
|
42
|
|
|
return false; |
|
43
|
|
|
}; |
|
44
|
|
|
|
|
45
|
|
|
this.onLoad = function () { |
|
46
|
|
|
}; |
|
47
|
|
|
|
|
48
|
|
|
this.fitToWidth = function ( width ) { |
|
49
|
|
|
}; |
|
50
|
|
|
|
|
51
|
|
|
this.fitToHeight = function ( height ) { |
|
52
|
|
|
}; |
|
53
|
|
|
|
|
54
|
|
|
this.fitToPage = function ( width, height ) { |
|
55
|
|
|
}; |
|
56
|
|
|
|
|
57
|
|
|
this.fitSmart = function ( width ) { |
|
58
|
|
|
}; |
|
59
|
|
|
|
|
60
|
|
|
this.getZoomLevel = function () { |
|
61
|
|
|
}; |
|
62
|
|
|
|
|
63
|
|
|
this.setZoomLevel = function ( value ) { |
|
64
|
|
|
}; |
|
65
|
|
|
|
|
66
|
|
|
this.getPages = function () { |
|
67
|
|
|
return [1]; |
|
68
|
|
|
}; |
|
69
|
|
|
|
|
70
|
|
|
this.showPage = function ( n ) { |
|
71
|
|
|
}; |
|
72
|
|
|
|
|
73
|
|
|
this.getPluginName = function () { |
|
74
|
|
|
return "UnknownFilePlugin"; |
|
75
|
|
|
}; |
|
76
|
|
|
|
|
77
|
|
|
this.getPluginVersion = function () { |
|
78
|
|
|
return "From Source"; |
|
79
|
|
|
}; |
|
80
|
|
|
|
|
81
|
|
|
this.getPluginURL = function () { |
|
82
|
|
|
return "https://grommunio.com"; |
|
83
|
|
|
}; |
|
84
|
|
|
} |
|
85
|
|
|
|