diff options
| -rw-r--r-- | debian/changelog | 6 | ||||
| -rw-r--r-- | plugins/webbox/html/webbox.js | 10 | 
2 files changed, 15 insertions, 1 deletions
| diff --git a/debian/changelog b/debian/changelog index 77207a7..1647ff5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +webserver (1.6) UNRELEASED; urgency=medium + +  * Webbox: Improved UI + + -- Roland Reichwein <rr@antcom.de>  Fri, 15 May 2020 10:29:06 +0200 +  webserver (1.5) unstable; urgency=medium    * Improved webbox integration diff --git a/plugins/webbox/html/webbox.js b/plugins/webbox/html/webbox.js index b262f6f..839b93d 100644 --- a/plugins/webbox/html/webbox.js +++ b/plugins/webbox/html/webbox.js @@ -421,6 +421,14 @@ function addDirectoryLinks(path) {  	return result;  } +function getRootLink() { +	if (rootDir != "/") { +		return "<span class=\"link\" onclick=\"setCurrentDir('/')\">" + rootDir + "</span>"; +	} + +	return ""; +} +  function setCurrentDir(newDir) {          if (newDir.endsWith("/")) {                  newDir = newDir.substr(0, newDir.length - 1); @@ -434,7 +442,7 @@ function setCurrentDir(newDir) {  	var menu = document.getElementsByClassName("menu")[0];  	var firsttd = menu.getElementsByClassName("firsttd")[0]; -	firsttd.innerHTML = addDirectoryLinks(newDir); +	firsttd.innerHTML = getRootLink() + addDirectoryLinks(newDir);  }  function download(filename) { | 
