-
Notifications
You must be signed in to change notification settings - Fork 7
/
elfinder.html
101 lines (93 loc) · 3.46 KB
/
elfinder.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>File Manager</title>
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=2"
/>
<!-- Section CSS -->
<!-- jQuery UI (REQUIRED) -->
<link
rel="stylesheet"
type="text/css"
href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"
/>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<!-- elFinder CSS (REQUIRED) -->
<link
rel="stylesheet"
type="text/css"
href="//cdnjs.cloudflare.com/ajax/libs/elfinder/2.1.28/css/elfinder.min.css"
/>
<link
rel="stylesheet"
type="text/css"
href="//cdnjs.cloudflare.com/ajax/libs/elfinder/2.1.28/css/theme.css"
/>
<!-- elFinder JS (REQUIRED) -->
<script src="//cdnjs.cloudflare.com/ajax/libs/elfinder/2.1.28/js/elfinder.min.js"></script>
<!-- Extra contents editors (OPTIONAL) -->
<script src="//cdnjs.cloudflare.com/ajax/libs/elfinder/2.1.28/js/extras/editors.default.js"></script>
<!-- GoogleDocs Quicklook plugin for GoogleDrive Volume (OPTIONAL) -->
<script src="//cdnjs.cloudflare.com/ajax/libs/elfinder/2.1.28/js/extras/quicklook.googledocs.js"></script>
<!-- elFinder initialization (REQUIRED) -->
<script type="text/javascript" charset="utf-8">
// Documentation for client options:
// https://github.com/Studio-42/elFinder/wiki/Client-configuration-options
$(document).ready(function () {
$('#elfinder').elfinder(
// 1st Arg - options
{
height: '100%',
cssAutoLoad: false, // Disable CSS auto loading
baseUrl: 'https://cdnjs.cloudflare.com/ajax/libs/elfinder/2.1.28/', // Base URL to css/*, js/*
url: '/connector', // connector URL (REQUIRED)
},
// 2nd Arg - before boot up function
function (fm, extraObj) {
// `init` event callback function
fm.bind('init', function () {
// Optional for Japanese decoder "extras/encoding-japanese.min"
delete fm.options.rawStringDecoder;
if (fm.lang === 'jp') {
fm.loadScript(
[fm.baseUrl + 'js/extras/encoding-japanese.min.js'],
function () {
if (window.Encoding && Encoding.convert) {
fm.options.rawStringDecoder = function (s) {
return Encoding.convert(s, {
to: 'UNICODE',
type: 'string',
});
};
}
},
{ loadType: 'tag' }
);
}
});
// Optional for set document.title dynamically.
var title = document.title;
fm.bind('open', function () {
var path = '',
cwd = fm.cwd();
if (cwd) {
path = fm.path(cwd.hash) || null;
}
document.title = path ? path + ':' + title : title;
}).bind('destroy', function () {
document.title = title;
});
}
);
});
</script>
</head>
<body>
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>