-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
108 lines (84 loc) · 2.72 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>elFinder 2.1-bgp</title>
<!-- jQuery and jQuery UI (REQUIRED) -->
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/themes/smoothness/jquery-ui.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script>
<!-- elFinder CSS (REQUIRED) -->
<link rel="stylesheet" type="text/css" href="css/elfinder.min.css">
<link rel="stylesheet" type="text/css" href="css/theme.css">
<!-- elFinder JS (REQUIRED) -->
<script src="js/elfinder.min.js"></script>
<!-- CODEMIRROR -->
<script src="codemirror/lib/codemirror.js"></script>
<link rel="stylesheet" type="text/css" href="codemirror/lib/codemirror.css">
<link rel="stylesheet" type="text/css" href="codemirror/theme/monokai.css">
<script src="codemirror/mode/javascript/javascript.js"></script>
<style>
.CodeMirror {
border: 1px solid #eee;
height: auto;
}
.CodeMirror-scroll {
overflow-y: hidden;
overflow-x: auto;
}
.std42-dialog .ui-dialog-content {
font-size: 0.92em;
}
</style>
<!-- elFinder initialization (REQUIRED) -->
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('#elfinder').elfinder({
url : 'connector.php', // connector URL (REQUIRED)
allowShortcuts: false,
commandsOptions: {
edit : {
// list of allowed mimetypes to edit
// if empty - any text files can be edited
mimes : [],
// you can have a different editor for different mimes
editors : [{
mimes : [
'text/plain',
'text/html',
'text/x-lua',
'text/x-perl',
'text/x-php',
'text/x-properties',
'text/x-ini',
'text/x-python',
'text/x-sh',
'application/xml'
],
load : function(textarea) {
this.myCodeMirror = CodeMirror.fromTextArea(textarea, {
lineNumbers: true,
lineWrapping: true,
viewportMargin: Infinity,
theme: "monokai"
})
},
close : function(textarea, instance) {
this.myCodeMirror = null;
},
save : function(textarea, editor) {
textarea.value = this.myCodeMirror.getValue();
this.myCodeMirror = null;
}
} ] // END: editors
} // END: edit
} // END: commandsoptions
});
});
</script>
</head>
<body>
<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>
</body>
</html>