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"; + }