From a0dbcc1c9c510ce13168e16cea08b1bcfea6f2bd Mon Sep 17 00:00:00 2001 From: oweissbarth Date: Fri, 6 Jun 2014 08:47:30 +0200 Subject: Added basic contextmenu. No functionality! --- www/browse.php | 34 ++++++++++++++++++++++++++++++++-- www/static/header.html | 2 +- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/www/browse.php b/www/browse.php index ceb1be7..4e12694 100644 --- a/www/browse.php +++ b/www/browse.php @@ -61,6 +61,19 @@ function browse($content){ 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"; + }
@@ -89,7 +102,24 @@ function browse($content){
- '.$file_list.'
'; + + + '.$file_list.'
+ + + '; include("static/footer.html"); } @@ -105,7 +135,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/header.html b/www/static/header.html index c1b0c46..d426333 100755 --- a/www/static/header.html +++ b/www/static/header.html @@ -6,7 +6,7 @@ - +
-- cgit v1.2.3