diff options
| author | oweissbarth | 2014-04-20 20:43:06 +0200 |
|---|---|---|
| committer | oweissbarth | 2014-04-20 20:43:06 +0200 |
| commit | 2a1a332c4e7625a40008d5c4565fca1bbf062d91 (patch) | |
| tree | ddbbc566bba7a2b0029350b03996990670ba797e /www/browse.php | |
| parent | 7b3427b4278817df9443ae0de057e50b544d919f (diff) | |
| download | files.iamfabulous.de-2a1a332c4e7625a40008d5c4565fca1bbf062d91.tar.gz | |
Added close button to upload and new folder tool
Added up-button to the file browser
Removed nasty gaps in the file list
Added tooltips to the tools
Diffstat (limited to 'www/browse.php')
| -rw-r--r-- | www/browse.php | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/www/browse.php b/www/browse.php index a4b9e84..b72bac5 100644 --- a/www/browse.php +++ b/www/browse.php @@ -25,13 +25,16 @@ function browse($content){ } - - $file_list = ""; + if($content != EMPTY_FOLDER){ + $file_list = "<tr><td colspan='2'><a class='file' id='up' href='/".$_GET["name"]."/".$_GET["folder"]."../'> ..</a></td></tr>"; foreach($content as $file){ $file_list .= get_item($file); - } + } + }else{ + $file_list = "<tr><td><a class='file' id='up' href='/".$_GET["name"]."/".$_GET["folder"]."../'> ..</a></td></tr>"; } + echo '<link rel="stylesheet" type="text/css" href="/static/browser.css"> <script> @@ -57,6 +60,7 @@ function browse($content){ <div id="new-folder-bg"> <div id="new-folder-area"> <h1 class="new-folder"> New Folder </h1> + <a onclick="hideNewFolder()" class="new-folder" id="close">x</a> <form id="new-folder-form" method="post" action="/'.$_GET["name"]."/".$_GET["folder"].'"> <input class="new-folder-input" id="new-folder-name" type="text" placeholder="name" name="foldername" required> <input type="hidden" value="'.$_GET["folder"].'" name="path"> @@ -70,6 +74,7 @@ function browse($content){ <div id="upload-bg"> <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"> @@ -79,7 +84,7 @@ function browse($content){ </form> </div> </div> - <table>'.$file_list.'</table>'; + <table cellspacing="0">'.$file_list.'</table>'; include("static/footer.html"); } @@ -95,7 +100,7 @@ function get_icon($file){ function get_link($file){ $slash = (($_GET["folder"]!="" && substr($_GET["folder"], -1) != "/"))? "/" : ""; - return '<a href="/'.$_GET["name"]."/".$_GET["folder"].$slash.$file[3].'/">'; + return '<a class="file" href="/'.$_GET["name"]."/".$_GET["folder"].$slash.$file[3].'/">'; } function get_item($file){ @@ -104,7 +109,7 @@ function get_item($file){ function print_menu(){ echo '<div id="menu"> - <div class="menu-item" id="new-item" onclick="showNewFolder()" ><img src="/static/img/icon_new.svg" width="45px" onclick="showNewFolder()"></div> - <div class="menu-item" id="upload-item" onclick="showUpload()" ><img src="/static/img/icon_upload.svg" width="45px" onclick="showUpload()" ></div> + <div class="menu-item" title="Create Folder" id="new-item" onclick="showNewFolder()" ><img src="/static/img/icon_new.svg" width="45px" onclick="showNewFolder()"></div> + <div class="menu-item" title="Upload" id="upload-item" onclick="showUpload()" ><img src="/static/img/icon_upload.svg" width="45px" onclick="showUpload()" ></div> </div><!-- div menu-->'; } |
