-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
51 lines (47 loc) · 2.21 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
<?xml version="1.0" encoding="UTF-8"?>
<div xmlns:i18n="http://exist-db.org/xquery/i18n" data-template="templates:surround" data-template-with="templates/page.html" data-template-at="content">
<div data-template="templates:include" data-template-path="templates/menu.html"/>
<script type="text/javascript" src="resources/scripts/vendor/jquery.ui.widget.js"/>
<script type="text/javascript" src="resources/scripts/vendor/jquery.iframe-transport.js"/>
<script type="text/javascript" src="resources/scripts/vendor/jquery.fileupload.js"/>
<script type="text/javascript">
$(function () {
'use strict';
function reloadDocTable() {
$("#documents-panel").load("templates/doc-table.html");
}
$('#fileupload').fileupload({
url: "modules/lib/upload.xql",
dataType: 'json',
done: function (e, data) {
$.each(data.result.files, function (index, file) {
var tr = document.createElement("tr");
var td = document.createElement("td");
var link = document.createElement("a");
link.href = file.path;
link.target = "_blank";
var icon = document.createElement("span");
icon.className = "material-icons";
icon.appendChild(document.createTextNode("open_in_new"));
link.appendChild(icon);
td.appendChild(link);
tr.appendChild(td);
td = document.createElement("td");
td.appendChild(document.createTextNode(file.path));
tr.appendChild(td);
$("#files").append(tr);
});
reloadDocTable();
},
progressall: function (e, data) {
var progress = parseInt(data.loaded / data.total * 100, 10);
$('#progress .progress-bar').css(
'width',
progress + '%'
);
}
}).prop('disabled', !$.support.fileInput)
.parent().addClass($.support.fileInput ? undefined : 'disabled');
});
</script>
</div>