diff options
Diffstat (limited to 'www/static/js')
| -rw-r--r-- | www/static/js/browser.js | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/www/static/js/browser.js b/www/static/js/browser.js new file mode 100644 index 0000000..a0e9824 --- /dev/null +++ b/www/static/js/browser.js @@ -0,0 +1,44 @@ + +function showNewFolder(){ + document.getElementById("new-folder-bg").style.visibility = "visible"; + + return; +} +function hideNewFolder(){ + document.getElementById("new-folder-bg").style.visibility = "hidden"; + 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; + var source = e.target || e.srcElement; + var url = source.href; + + //set context item commands + document.getElementById("copy-link").setAttribute("url", url); + + +} +function hideMenu() { + document.getElementById("context-menu").style.display = "none"; +} + +function copyToClipboard(text){ + window.clip.setText(text); + alert("done"); +} |
