forked from Studio-42/elFinder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
elfinder.playground.html
308 lines (282 loc) · 9.9 KB
/
elfinder.playground.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<title>elFinder 2.1.x source version with PHP connector</title>
<!-- Section CSS -->
<!-- jQuery UI (REQUIRED) -->
<link rel="stylesheet" type="text/css" href="//code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css">
<!-- elfinder css -->
<link rel="stylesheet" href="css/commands.css" type="text/css">
<link rel="stylesheet" href="css/common.css" type="text/css">
<link rel="stylesheet" href="css/contextmenu.css" type="text/css">
<link rel="stylesheet" href="css/cwd.css" type="text/css">
<link rel="stylesheet" href="css/dialog.css" type="text/css">
<link rel="stylesheet" href="css/fonts.css" type="text/css">
<link rel="stylesheet" href="css/navbar.css" type="text/css">
<link rel="stylesheet" href="css/places.css" type="text/css">
<link rel="stylesheet" href="css/quicklook.css" type="text/css">
<link rel="stylesheet" href="css/statusbar.css" type="text/css">
<link rel="stylesheet" href="css/theme.css" type="text/css">
<link rel="stylesheet" href="css/toast.css" type="text/css">
<link rel="stylesheet" href="css/toolbar.css" type="text/css">
<!--
<script type="text/javascript" src="https://getfirebug.com/firebug-lite.js"></script>
-->
<!-- Section JavaScript -->
<!-- jQuery and jQuery UI (REQUIRED) -->
<!--[if lt IE 9]>
<script src="//code.jquery.com/jquery-1.12.4.min.js"></script>
<![endif]-->
<!--[if gte IE 9]><!-->
<script src="//code.jquery.com/jquery-3.4.1.min.js"></script>
<!--<![endif]-->
<script src="//code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<!-- elfinder core -->
<script src="js/elFinder.js"></script>
<script src="js/elFinder.version.js"></script>
<script src="js/jquery.elfinder.js"></script>
<script src="js/elFinder.mimetypes.js"></script>
<script src="js/elFinder.options.js"></script>
<script src="js/elFinder.options.netmount.js"></script>
<script src="js/elFinder.history.js"></script>
<script src="js/elFinder.command.js"></script>
<script src="js/elFinder.resources.js"></script>
<!-- elfinder dialog -->
<script src="js/jquery.dialogelfinder.js"></script>
<!-- elfinder default lang -->
<script src="js/i18n/elfinder.en.js"></script>
<!-- elfinder ui -->
<script src="js/ui/button.js"></script>
<script src="js/ui/contextmenu.js"></script>
<script src="js/ui/cwd.js"></script>
<script src="js/ui/dialog.js"></script>
<script src="js/ui/fullscreenbutton.js"></script>
<script src="js/ui/navbar.js"></script>
<script src="js/ui/navdock.js"></script>
<script src="js/ui/overlay.js"></script>
<script src="js/ui/panel.js"></script>
<script src="js/ui/path.js"></script>
<script src="js/ui/places.js"></script>
<script src="js/ui/searchbutton.js"></script>
<script src="js/ui/sortbutton.js"></script>
<script src="js/ui/stat.js"></script>
<script src="js/ui/toast.js"></script>
<script src="js/ui/toolbar.js"></script>
<script src="js/ui/tree.js"></script>
<script src="js/ui/uploadButton.js"></script>
<script src="js/ui/viewbutton.js"></script>
<script src="js/ui/workzone.js"></script>
<!-- elfinder commands -->
<script src="js/commands/archive.js"></script>
<script src="js/commands/back.js"></script>
<script src="js/commands/chmod.js"></script>
<script src="js/commands/colwidth.js"></script>
<script src="js/commands/copy.js"></script>
<script src="js/commands/cut.js"></script>
<script src="js/commands/download.js"></script>
<script src="js/commands/duplicate.js"></script>
<script src="js/commands/edit.js"></script>
<script src="js/commands/empty.js"></script>
<script src="js/commands/extract.js"></script>
<script src="js/commands/forward.js"></script>
<script src="js/commands/fullscreen.js"></script>
<script src="js/commands/getfile.js"></script>
<script src="js/commands/help.js"></script>
<script src="js/commands/hidden.js"></script>
<script src="js/commands/hide.js"></script>
<script src="js/commands/home.js"></script>
<script src="js/commands/info.js"></script>
<script src="js/commands/mkdir.js"></script>
<script src="js/commands/mkfile.js"></script>
<script src="js/commands/netmount.js"></script>
<script src="js/commands/open.js"></script>
<script src="js/commands/opendir.js"></script>
<script src="js/commands/opennew.js"></script>
<script src="js/commands/paste.js"></script>
<script src="js/commands/places.js"></script>
<script src="js/commands/preference.js"></script>
<script src="js/commands/quicklook.js"></script>
<script src="js/commands/quicklook.plugins.js"></script>
<script src="js/commands/reload.js"></script>
<script src="js/commands/rename.js"></script>
<script src="js/commands/resize.js"></script>
<script src="js/commands/restore.js"></script>
<script src="js/commands/rm.js"></script>
<script src="js/commands/search.js"></script>
<script src="js/commands/selectall.js"></script>
<script src="js/commands/selectinvert.js"></script>
<script src="js/commands/selectnone.js"></script>
<script src="js/commands/sort.js"></script>
<script src="js/commands/undo.js"></script>
<script src="js/commands/up.js"></script>
<script src="js/commands/upload.js"></script>
<script src="js/commands/view.js"></script>
<!-- elfinder 1.x connector API support (OPTIONAL) -->
<script src="js/proxy/elFinderSupportVer1.js"></script>
<!-- Extra contents editors (OPTIONAL) -->
<script src="js/extras/editors.default.js"></script>
<!-- GoogleDocs Quicklook plugin for GoogleDrive Volume (OPTIONAL) -->
<script src="js/extras/quicklook.googledocs.js"></script>
<style type="text/css">
body { font-family:arial, verdana, sans-serif;}
.button {
width: 100px;
position:relative;
display: -moz-inline-stack;
display: inline-block;
vertical-align: top;
zoom: 1;
*display: inline;
margin:0 3px 3px 0;
padding:1px 0;
text-align:center;
border:1px solid #ccc;
background-color:#eee;
margin:1em .5em;
padding:.3em .7em;
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
cursor:pointer;
}
/*
#dialog {
position:absolute;
left:50%;
top:1000px;
}
*/
</style>
<script>
$(document).ready(function() {
$('#finder').elfinder({
// requestType : 'post',
// url : 'php/connector.php',
url : 'php/connector.php',
// transport : new elFinderSupportVer1(),
// getFileCallback : function(files, fm) {
// console.log(files);
// },
handlers : {
select : function(event, elfinderInstance) {
var selected = event.data.selected;
if (selected.length) {
// console.log(elfinderInstance.file(selected[0]))
}
}
},
// handlers : {
// select : function(e) {
// console.log(e.data)
// }
// },
// onlyMimes : ['image', 'text/plain']
// sync : 20000,
lang : 'ru',
customData : {answer : 42},
// requestType : 'POST',
// rememberLastDir : false,
// ui : ['tree', 'toolbar'],
// ui : ['toolbar', 'path', 'stat'],
// commands : [],
// commandsOptions : {
// edit : {
// mimes : ['text/plain', 'text/html', 'text/javascript'],
// editors : [
// {
// mimes : ['text/html'],
// load : function(textarea) {
// tinyMCE.execCommand("mceAddControl", true, textarea.id);
// },
// close : function(textarea, instance) {
// tinyMCE.execCommand('mceRemoveControl', false, textarea.id);
// },
// save : function(textarea, editor) {
// textarea.value = tinyMCE.get(textarea.id).selection.getContent({format : 'html'});
// tinyMCE.execCommand('mceRemoveControl', false, textarea.id);
// }
//
// }
// ]
// }
// }
// uiOptions : {
// toolbar : [['help']],
// cwd : {
// listView : {
// // columns to be displayed
// // default settings are:
// // columns : ['perm', 'date', 'size', 'kind'],
// // extra columns can be displayed if your connector supports it:
// columns : ['perm', 'date', 'size', 'kind', 'owner'],
// // custom columns labels:
// columnsCustomName : {
// owner : 'Owner'
// }
// }
// }
})
// $('#finder2').elfinder({
// url : 'connectors/php/connector.php',
// width:650,
// lang : 'ru'
// })
// console.log(f1)
//
// setTimeout(function() {
// console.log($('#finder').elfinder('instance'))
// }, 2000)
// new elFinder($('<div/>'))
// var f2 = $('#asd').elfinder({
// url : 'connectors/php/connector.php',
// lang : 'ru'
// }).elfinder('instance')
$('#back').click(function(e) {
f1.exec('back')
})
$('#fwd').click(function(e) {
f1.exec('forward')
})
$('#dialog').click(function() {
var fm = $('<div/>').dialogelfinder({
url : 'php/connector.php',
lang : 'en',
width : 840,
destroyOnClose : true,
getFileCallback : function(files, fm) {
console.log(files);
},
commandsOptions : {
getfile : {
oncomplete : 'close',
folders : true
}
}
}).dialogelfinder('instance');
});
});
</script>
</head>
<body>
<div id="back" class="button">back</div>
<div id="fwd" class="button">forward</div>
<div id="dialog" class="button">dialog</div>
<!-- <div id="close" class="button">close</div>
<div id="dock" class="button">dock</div>
<div id="undock" class="button">undock</div>-->
<!-- <div style="width:670px; float:left"> -->
<div id="finder">finder <span>here</span></div>
<!-- </div> -->
<!-- <div style="width:670px; float:left">
<div id="finder2">finder</div>
</div> -->
<br clear="all"/>
<input type="text" value="123" />
<input type="text" value="456" />
<!-- <div><input type="text" id="i1"></div> -->
<!-- <div><input type="text" id="i2"></div> -->
</body>
</html>