switch to a dropdown menu on file tree
This commit is contained in:
@ -487,4 +487,33 @@ li.fileTree {
|
||||
max-height: 0;
|
||||
overflow: hidden;
|
||||
transition: max-height: 0.2s ease-out;
|
||||
}
|
||||
}
|
||||
|
||||
.droplink {
|
||||
cursor : pointer;
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.dropdown-content {
|
||||
display: none;
|
||||
position: absolute;
|
||||
z-index:1;
|
||||
background: white;
|
||||
padding-left: 20px;
|
||||
|
||||
}
|
||||
|
||||
.dropdown-content a {
|
||||
color: black;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Change color of dropdown links on hover */
|
||||
.dropdown-content a:hover {background-color: #ddd;}
|
||||
|
||||
/* Show the dropdown menu on hover */
|
||||
.dropdown:hover .dropdown-content {display: block;}
|
@ -34,15 +34,20 @@ class Node {
|
||||
if (this.certified == "true")
|
||||
certified = _t("Certified")
|
||||
var publish
|
||||
var published
|
||||
if (this.published == "true") {
|
||||
publish = new Link(_t("Unpublish"), "unpublish", [this.nodeId])
|
||||
published = _t("Published")
|
||||
} else {
|
||||
publish = new Link(_t("Publish"), "publish", [this.nodeId])
|
||||
published = ""
|
||||
}
|
||||
|
||||
var nameLink = "<a href='/MuWire/DownloadedContent/" + this.infoHash + "'>" + this.path + "</a>"
|
||||
var html = "<li class='fileTree'>" + nameLink
|
||||
html += "<div class='right'>" + unshareLink + " " + commentLink + " " + certifyLink + " " + certified + " " + publish.render() +"</div>"
|
||||
html += "<div class='right'>" + certified + " " + published + " <div class='dropdown'><a class='droplink' href='#'>" + _t("Actions")+ "</a><div class='dropdown-content'>"
|
||||
html += unshareLink + commentLink + certifyLink + publish.render()
|
||||
html += "</div></div></div>"
|
||||
html += "<div class='centercomment' id='comment-" + this.nodeId + "'></div>"
|
||||
html += "</li>"
|
||||
|
||||
|
Reference in New Issue
Block a user