From 9469e30334580ada1a8c5761301fc2b1481e4355 Mon Sep 17 00:00:00 2001 From: oweissbarth Date: Thu, 27 Mar 2014 01:48:34 +0100 Subject: Added upload ui --- www/browse.php | 47 ++++++++++++++++++++++++++++++---------- www/static/browser.css | 59 +++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 92 insertions(+), 14 deletions(-) diff --git a/www/browse.php b/www/browse.php index d01df6e..a4b9e84 100644 --- a/www/browse.php +++ b/www/browse.php @@ -7,8 +7,11 @@ function print_browser($content){ if($_SERVER['REQUEST_METHOD'] == 'POST'){ //echo "created_folder : ". $_POST["foldername"] . " in ". $_GET["folder"]; - - create_folder($_POST["path"], $_POST["foldername"], /*$_POST["public"]?*/"PUBLIC"/*:"PRIVATE"*/); + if($_POST["task"]=="new-folder"){ + create_folder($_POST["path"], $_POST["foldername"], /*$_POST["public"]?*/"PUBLIC"/*:"PRIVATE"*/); + }elseif($_POST["task"]=="upload"){ + upload($_POST["path"]); + } browse(collect_content($GLOBALS["db"], $_SESSION["username"] , $_POST["path"])); }else{ browse(collect_content($GLOBALS["db"], $_GET["name"] , $_GET["folder"])); @@ -24,7 +27,7 @@ function browse($content){ $file_list = ""; - if($content){ + if($content != EMPTY_FOLDER){ foreach($content as $file){ $file_list .= get_item($file); } @@ -34,23 +37,45 @@ function browse($content){
-

New Folder

+

New Folder

- - + + + +
+
+
+ +
+
+

Upload

+
+ + + + +
@@ -79,7 +104,7 @@ function get_item($file){ function print_menu(){ echo ''; } diff --git a/www/static/browser.css b/www/static/browser.css index a6031dc..c040695 100644 --- a/www/static/browser.css +++ b/www/static/browser.css @@ -86,7 +86,7 @@ td{ } -input.new-folder-input[type=text], input.new-folder-input[type=checkbox]{ +input.new-folder-input[type=text]{ border: none; box-shadow: inset 0px 0px 1px 1px #1F3D4C; border-radius: 0; @@ -94,21 +94,74 @@ input.new-folder-input[type=text], input.new-folder-input[type=checkbox]{ font-size: 25px; margin-top: 15px; width: 395px; - display:block; padding-left: 5px; } +/*input.new-folder-input[type=checkbox]*/ + +input[type=checkbox]{ + display:inline; + margin-left: 5px; + width: 10px; +} + + input.new-folder-input:focus{ background: #D6E0E5 } + +#upload-bg{ + width: 100%; + height: 100%; + background: white; + position: fixed; + z-index: 99; + top: 0px; + opacity: 0.75; + visibility: hidden; +} + +#upload-form{ + +} + +#upload-area{ + height: 190px; + width: 400px; + position: fixed; + top: 50%; + margin-top: -100px; + + padding: 10px; + + left: 50%; + margin-left: -200px; + + border: 1px solid black; +} + + + +input.upload-input[type=file]{ + border: none; + margin-top: 15px; + margin-bottom: 15px; + display:block; + padding-left: 5px; +} + #button-input{ height: 40px; width: 120px; - display:inline; border: none; box-shadow: inset 0px 0px 1px 1px #1F3D4C; border-radius: 0; font-size: 25px; margin-top: 15px; + display:block; +} +label{ + display: inline; } +dis \ No newline at end of file -- cgit v1.2.3