diff options
Diffstat (limited to 'www/browse.php')
| -rw-r--r-- | www/browse.php | 29 |
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>'; } |
