From 2f0f906782cd36c7474c93ab9728846a7d2549bd Mon Sep 17 00:00:00 2001 From: oweissbarth Date: Wed, 18 Jun 2014 20:05:19 +0200 Subject: Made Context Menu non transparent Added copy to clipboard Made contextmenu items visible for logged in users only --- www/browse.php | 142 ++++++++++++++++++++++++++----------------------- www/static/browser.css | 13 +++++ 2 files changed, 88 insertions(+), 67 deletions(-) diff --git a/www/browse.php b/www/browse.php index 4e12694..ee36122 100644 --- a/www/browse.php +++ b/www/browse.php @@ -42,54 +42,66 @@ function browse($content){ echo ' - '; + + echo get_upload(); + + echo get_new_folder(); + + echo get_context_menu(); + + echo get_file_list($file_list); + + echo get_zero_clipboard(); + + include("static/footer.html"); +} + +function get_zero_clipboard(){ + return ' - function showUpload(){ - document.getElementById("upload-bg").style.visibility = "visible"; - return; - } - function hideUpload(){ - document.getElementById("upload-bg").style.visibility = "hidden"; - return; - } - - - function showMenu(e) { - var posx = e.clientX +window.pageXOffset +"px"; - var posy = e.clientY + window.pageYOffset + "px"; - document.getElementById("context-menu").style.position = "absolute"; - document.getElementById("context-menu").style.display = "inline"; - document.getElementById("context-menu").style.left = posx; - document.getElementById("context-menu").style.top = posy; - } - function hideMenu() { - document.getElementById("context-menu").style.display = "none"; - } - -
-
-

New Folder

- x -
- - - - - -
-
-
-
+ '; +} + +function get_file_list($file_list){ + return ''.$file_list.'
'; +} + +function get_context_menu(){ + $menu = ''; + return $menu; +} + +function get_upload(){ + return '

Upload

x @@ -101,27 +113,23 @@ function browse($content){
-
- - - '.$file_list.'
- - - '; - - include("static/footer.html"); +} + +function get_new_folder(){ + return '
+
+

New Folder

+ x +
+ + + + + +
+
+
'; } @@ -135,7 +143,7 @@ function get_icon($file){ function get_link($file){ $slash = (($_GET["folder"]!="" && substr($_GET["folder"], -1) != "/"))? "/" : ""; - return ''; + return ''; } function get_item($file){ diff --git a/www/static/browser.css b/www/static/browser.css index d2c45fe..817da0b 100644 --- a/www/static/browser.css +++ b/www/static/browser.css @@ -65,6 +65,7 @@ Menu margin: 10px; display:inline-block; text-align: center; + cursor: pointer; } .logout-item-link{ @@ -206,3 +207,15 @@ label{ margin-right: 10px; cursor: pointer; } + +/*Context Menu*/ +#context-menu{ + box-shadow: 1px 1px 1px 1px #1F3D4C; + background-color: white; +} + +.context-menu-item{ + cursor: pointer; +} + +#copy-link.zeroclipboard-is-hover { background: #CCCCCC; } -- cgit v1.2.3