diff options
Diffstat (limited to 'www/browse.php')
| -rw-r--r-- | www/browse.php | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/www/browse.php b/www/browse.php index 5741b45..bb7051d 100644 --- a/www/browse.php +++ b/www/browse.php @@ -34,19 +34,21 @@ function browse($content){ if($content != EMPTY_FOLDER){ - $file_list = "<tr><td colspan='2'><a class='file' id='up' href='/".$_GET["name"]."/".$_GET["folder"]."../'> ..</a></td></tr>"; + $file_list = "<tr class='file-browser file'><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>"; + $file_list = "<tr class='file-browser file'><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"> <link rel="stylesheet" type="text/css" href="/static/dropzone.css"> <script src="/static/js/browser.js"></script> - <script src=/static/js/dropzone.js></script>'; + <script src=/static/js/dropzone.js></script> + + <div id="dialog-bg"></div>'; echo get_upload(); @@ -79,7 +81,7 @@ function get_zero_clipboard(){ } function get_file_list($file_list){ - return '<table oncontextmenu="return false" onmousedown="hideMenu()" cellspacing="0" >'.$file_list.'</table>'; + return '<table oncontextmenu="return false" class="file-browser main-file-list" onmousedown="hideMenu()">'.$file_list.'</table>'; } function get_context_menu(){ @@ -105,12 +107,11 @@ function get_context_menu(){ } function get_upload(){ - return '<div id="upload-bg"></div> - <div id="upload-area"> + return '<div id="upload-area" class="upload"> <h1 class="upload"> Upload </h1> - <a onclick="hideUpload()" class="new-folder" id="close">x</a> - <script>var folder=\''.$_GET["folder"].'\'</script> + <a onclick="hideUpload()" class="browser-dialog upload close-icon">x</a> <input type="file" id="legacy-file" multiple onchange="legacyUpload()"> + <script>var folder=\''.$_GET["folder"].'\'</script> <div id="dropzone" onclick="legacyUploadTrigger()" ondragover="dragover(event)" ondragleave="dragout(event)" ondrop="drop(event)"><p>Drop files here or click to upload</p></div> <div id="filelist-wrapper"> @@ -118,42 +119,40 @@ function get_upload(){ </table> </div> <button onclick="upload()" id="button-input" class="upload-input">upload</button> - <p id="progress-text"></p> </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> - <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"> - <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>'; + return '<div id="new-folder-area"> + <h1 class="new-folder"> New Folder </h1> + <a onclick="hideNewFolder()" class="browser-dialog new-folder close-icon" >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"> + <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>'; } function get_icon($file){ if($file[4]=="DIRECTORY"){ - return '<td id="icon">'.get_link($file).'<img src="/static/img/icon_folder.svg" width="30px"></a></td>'; + return '<td class="file-browser file-icon" >'.get_link($file).'<img src="/static/img/icon_folder.svg" width="30px"></a></td>'; }else{ - return '<td id="icon">'.get_link($file).'<img src="/static/img/icon_file.svg" width="30px"></a></td>'; + return '<td class="file-browser file-icon">'.get_link($file).'<img src="/static/img/icon_file.svg" width="30px"></a></td>'; } } function get_link($file){ $slash = (($_GET["folder"]!="" && substr($_GET["folder"], -1) != "/"))? "/" : ""; - return '<a oncontextmenu="showMenu(event)" id="" class="file" href="/'.$_GET["name"]."/".$_GET["folder"].$slash.$file[3].'/">'; + return '<a oncontextmenu="showMenu(event)" class="file" href="/'.$_GET["name"]."/".$_GET["folder"].$slash.$file[3].'/">'; } function get_item($file){ - return '<tr>'.get_icon($file).'<td>'.get_link($file).$file[3].'</a></td></tr>'; + return '<tr class="file-browser file">'.get_icon($file).'<td>'.get_link($file).$file[3].'</a></td></tr>'; } function print_menu(){ |
