mirror of https://github.com/perkeep/perkeep.git
Make the permanode file upload onchange do something.
Change-Id: I7e3ce0257906e733e8f81dd5a94b2eb34361bcc3
This commit is contained in:
parent
f7562e033a
commit
d1c8a85308
|
@ -81,7 +81,7 @@
|
|||
<input type="file" id="fileInput" multiple="true" onchange="">
|
||||
<input type="submit" id="fileUploadBtn" value="Upload">
|
||||
</form>
|
||||
<p>
|
||||
<p id='filelist'>
|
||||
<em>or drag & drop files here</em>
|
||||
</p>
|
||||
<pre id="info"></pre>
|
||||
|
|
|
@ -247,11 +247,20 @@ function startFileUpload(file) {
|
|||
function onFileFormSubmit(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
alert("TODO: upload");
|
||||
handleFiles(document.getElementById("fileInput").files);
|
||||
}
|
||||
|
||||
function $(id) { return document.getElementById(id) }
|
||||
|
||||
function onFileInputChange(e) {
|
||||
handleFiles(document.getElementById("fileInput").files);
|
||||
var s = "";
|
||||
var files = $("fileInput").files;
|
||||
for (var i = 0; i < files.length; i++) {
|
||||
var file = files[i];
|
||||
s += "<p>" + file.name + "</p>";
|
||||
}
|
||||
var fl = $("filelist");
|
||||
fl.innerHTML = s;
|
||||
}
|
||||
|
||||
function setupFilesHandlers() {
|
||||
|
|
Loading…
Reference in New Issue