mirror of https://github.com/zlatinb/muwire
switch to a dropdown menu on file tree
parent
2a4db868aa
commit
f8bbeb8ac0
|
@ -487,4 +487,33 @@ li.fileTree {
|
||||||
max-height: 0;
|
max-height: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
transition: max-height: 0.2s ease-out;
|
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")
|
if (this.certified == "true")
|
||||||
certified = _t("Certified")
|
certified = _t("Certified")
|
||||||
var publish
|
var publish
|
||||||
|
var published
|
||||||
if (this.published == "true") {
|
if (this.published == "true") {
|
||||||
publish = new Link(_t("Unpublish"), "unpublish", [this.nodeId])
|
publish = new Link(_t("Unpublish"), "unpublish", [this.nodeId])
|
||||||
|
published = _t("Published")
|
||||||
} else {
|
} else {
|
||||||
publish = new Link(_t("Publish"), "publish", [this.nodeId])
|
publish = new Link(_t("Publish"), "publish", [this.nodeId])
|
||||||
|
published = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
var nameLink = "<a href='/MuWire/DownloadedContent/" + this.infoHash + "'>" + this.path + "</a>"
|
var nameLink = "<a href='/MuWire/DownloadedContent/" + this.infoHash + "'>" + this.path + "</a>"
|
||||||
var html = "<li class='fileTree'>" + nameLink
|
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 += "<div class='centercomment' id='comment-" + this.nodeId + "'></div>"
|
||||||
html += "</li>"
|
html += "</li>"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue