summaryrefslogtreecommitdiff
path: root/www/browse.php
diff options
context:
space:
mode:
authoroweissbarth2014-07-19 16:17:49 +0200
committeroweissbarth2014-07-19 16:17:49 +0200
commit0097ccaf345cbc423df415322357e1f574e19140 (patch)
treee0d171cf1d01f457741b48bc291f05f76a07961b /www/browse.php
parent7f757321be39166ff259225c03a6793101cd921e (diff)
downloadfiles.iamfabulous.de-0097ccaf345cbc423df415322357e1f574e19140.tar.gz
added d&d multifile upload
Diffstat (limited to 'www/browse.php')
-rw-r--r--www/browse.php29
1 files changed, 17 insertions, 12 deletions
diff --git a/www/browse.php b/www/browse.php
index ee36122..2d7cf05 100644
--- a/www/browse.php
+++ b/www/browse.php
@@ -42,7 +42,9 @@ function browse($content){
echo '<link rel="stylesheet" type="text/css" href="/static/browser.css">
- <script src="/static/js/browser.js"></script>';
+ <link rel="stylesheet" type="text/css" href="/static/dropzone.css">
+ <script src="/static/js/browser.js"></script>
+ <script src=/static/js/dropzone.js></script>';
echo get_upload();
@@ -102,22 +104,25 @@ function get_context_menu(){
function get_upload(){
return '<div id="upload-bg">
+ </div>
<div id="upload-area">
<h1 class="upload"> Upload </h1>
<a onclick="hideUpload()" class="new-folder" id="close">x</a>
- <form id="upload-form" method="post" action="/'.$_GET["name"]."/".$_GET["folder"].'" enctype="multipart/form-data">
- <input class="upload-input" id="upload-file" type="file" placeholder="file" name="userfile" size=" 500000000" maxlength="100000000000000" required>
- <input type="hidden" value="'.$_GET["folder"].'" name="path">
- <input type="hidden" value="upload" name="task">
- <label>Public</label><input class="upload-input" type="checkbox" name="share">
- <input onclick="hide-upload()" type="submit" id="button-input" class="upload-input" value="upload">
- </form>
- </div>
- </div>';
+ <script>var folder=\''.$_GET["folder"].'\'</script>
+ <input type="hidden" value="upload" name="task">
+ <div id="dropzone" ondragover="dragover(event)" ondragleave="dragout(event)" ondrop="drop(event)"><p>Drop files here to upload</p></div>
+
+ <div id="filelist-wrapper">
+ <table id="filelist">
+ </table>
+ </div>
+ <button onclick="upload()" id="button-input" class="upload-input">upload</button>
+ </div>';
}
function get_new_folder(){
return '<div id="new-folder-bg">
+ </div>
<div id="new-folder-area">
<h1 class="new-folder"> New Folder </h1>
<a onclick="hideNewFolder()" class="new-folder" id="close">x</a>
@@ -126,10 +131,10 @@ function get_new_folder(){
<input type="hidden" value="'.$_GET["folder"].'" name="path">
<input type="hidden" value="new-folder" name="task">
<label>Public</label><input style="display:inline; margin-left: 5px;" class="new-folder-input" type="checkbox" name="share">
+ <p id="upload-message"></p>
<input onclick="hide-new-folder()" type="submit" id="button-input" class="new-folder-input" value="create">
</form>
- </div>
- </div>';
+ </div>';
}