style: only display "edit text" on hover (#3398)

This commit is contained in:
Frédéric Péters 2013-07-30 20:14:02 +02:00
parent fd6acd165f
commit a84c620399
2 changed files with 24 additions and 5 deletions

View File

@ -59,8 +59,10 @@ class TextsDirectory(Directory):
if is_user_admin():
root_url = get_publisher().get_root_url()
return htmltext('<a class="edit-custom-text" href="%sadmin/settings/texts/%s">%s</a>' % (
root_url, key, _('Edit Text')) + text)
return htmltext('<div class="block-edit-custom-text">'\
'<a class="edit-custom-text" href="%sadmin/settings/texts/%s">%s</a>'\
'%s'\
'</div>' % (root_url, key, _('Edit This Text'), text))
return htmltext(text)
get_html_text = classmethod(get_html_text)

View File

@ -296,13 +296,30 @@ a#display-exception {
display: none;
}
a.edit-custom-text {
float: right;
margin: 0 0 1ex 1ex;
div.block-edit-custom-text {
position: relative;
}
div.block-edit-custom-text:hover {
background: #eee;
}
div.block-edit-custom-text a.edit-custom-text {
display: none;
}
div.block-edit-custom-text:hover a.edit-custom-text {
display: block;
position: absolute;
right: 0;
bottom: -20px;
margin: 0;
background: #ccc;
color: #333;
padding: 3px 5px;
font-size: 50%;
height: 20px;
line-height: 20px;
}
ul.select2-results {