[#24088823] ebook downloads now drop down if more than 1

pull/1/head
eric 2012-04-28 21:05:41 -04:00
parent 61a4878b54
commit 4f524a792f
3 changed files with 39 additions and 8 deletions

View File

@ -27,10 +27,16 @@ $j(document).ready(function(){
$j(this).next().toggle();
});
});
</script>
<script>
var $j = jQuery.noConflict();
$j(document).ready(function(){
$j('.show_more_ebooks').click(function(){
if ($j(this).html() == '<br>hide downloads') {
$j(this).html('<br>more downloads...')
} else {
$j(this).html('<br>hide downloads')
}
$j(this).next().toggle();
});
});
$j(document).ready(function(){
var img = $j('#book-detail-img');
var googimg = $j('#find-google img');
@ -115,7 +121,21 @@ $j(document).ready(function(){
<label>Get it:</label>
<span class="find-link">
{% for ebook in work.ebooks %}
{% if forloop.first %}
<span class="first_ebook">
{% endif %}
{% if forloop.counter == 2 %}
</span>
<span class="show_more_ebooks"><br />More downloads...</span>
<span class="more_ebooks">
{% endif %}
{% if not forloop.first %}
<br />
{% endif %}
<a href="{{ ebook.url }}"><img src="/static/images/{{ ebook.format }}32.png" height="32" alt=" {{ ebook.format }} at {{ebook.provider}}" title=" {{ ebook.format }} at {{ebook.provider}}" /><img src="{{ebook.rights_badge}}" height="31" width="88" alt="{{ebook.rights}}" title="{{ebook.rights}}" /></a>
{% if forloop.last %}
</span>
{% endif %}
{% endfor %}
</span>
</div>

View File

@ -262,7 +262,8 @@
#tabs-1,
#tabs-2,
#tabs-3,
#tabs-4 {
#tabs-4,
.more_ebooks {
display: none;
}
#tabs-1.active,
@ -542,7 +543,7 @@ a {
.editions a:hover {
text-decoration: underline;
}
.show_more_edition {
.show_more_edition,.show_more_ebooks{
cursor: pointer;
}
.thank-you {
@ -571,7 +572,8 @@ a {
padding-bottom: 10px;
padding-left: 60px;
}
.show_more_edition:hover {
.show_more_edition:hover,
.show_more_ebooks:hover {
text-decoration: underline;
}
.show_more_edition {

View File

@ -471,7 +471,8 @@ a{ color:#3d4e53; font-size:12px;}
}
}
.show_more_edition {
.show_more_edition,
.show_more_ebooks {
cursor: pointer;
}
@ -510,6 +511,14 @@ a{ color:#3d4e53; font-size:12px;}
text-align: right;
}
.more_ebooks {
display:none;
}
.show_more_ebooks:hover {
text-decoration: underline;
}
.alert > .errorlist {
list-style-type: none;
font-size: 14px;