# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
-from base64 import b64encode
import os.path
from urlparse import urljoin
-from urllib2 import unquote
from django.contrib.syndication.views import Feed
from django.core.urlresolvers import reverse
return u''
def item_enclosure_url(self, book):
- return full_url(book.root_ancestor.epub_file.url)
+ return full_url(book.epub_file.url)
def item_enclosure_length(self, book):
- return book.root_ancestor.epub_file.size
+ return book.epub_file.size
@piwik_track
class RootFeed(Feed):
.book-box-formats span {
display: block;
}
-
-.book-box-download:hover .book-box-formats span:first-child {
+.book-box-download .book-box-formats span:first-child {
margin-top: 1.454em;
}
-.book-box-download:hover .book-box-formats {
+.book-box-download:hover .book-box-formats,
+.book-box-download.hover .book-box-formats {
display: block;
}
margin: 0;
}
-#lang-menu:hover button {
+#lang-menu:hover button,
+#lang-menu.hover button {
display: block;
}
-#lang-menu:hover #lang-menu-items {
+#lang-menu:hover #lang-menu-items,
+#lang-menu.hover #lang-menu-items {
position: absolute;
width: 100%;
padding: 0;
return false;
});
+ $('.hoverclick').click(function() {$(this).closest('.hoverget').toggleClass('hover');});
+
$(function(){
$("#search").search();});
stylesheet.setAttribute('href', 'http://'+host+'/static/css/widget.css');
linkLogo.setAttribute('href', 'http://'+host);
logo.setAttribute('src', 'http://'+host+'/static/img/logo.png');
-form.setAttribute('action', 'http://'+host+'/katalog/szukaj/');
+form.setAttribute('action', 'http://'+host+'/fullsearch/');
form.setAttribute('method', 'get');
form.setAttribute('accept-charset', 'utf-8');
form.setAttribute('id', 'wl-form');
<a href="{% url book_text book.slug %}" class="mono downarrow">{% trans "Read online" %}</a>
{% endif %}
</li>
- <li class="book-box-download">
- <a class="mono downarrow">{% trans "Download" %}</a>
+ <li class="book-box-download hoverget">
+ <a class="mono downarrow hoverclick">{% trans "Download" %}</a>
<div class="book-box-formats mono">
{% if book.pdf_file %}
<span><a href="{{ book.pdf_file.url}}">PDF</a> {% trans "to print" %}</span>
</ul>
</div>
<div class="other-download">
+ {% if related.media.mp3 or related.media.ogg %}
<h2 class="mono">{% trans "Download" %}</h2>
<ul class="plain">
<li>
{% if related.media.ogg %}<a href="{% url download_zip_ogg book.slug %}">OGG</a>{% endif %}.
{% endif %}
</li>
+ {% comment %}
<li>
<a href="{% url custom_pdf_form %}?slug={{book.slug}}" id="custom-pdf" class="ajaxable">{% trans "Download a custom PDF" %}</a>
</li>
+ {% endcomment %}
</ul>
+ {% endif %}
</div>
</div>
{% endblock %}
{% endcache %}
<form action="{% url django.views.i18n.set_language %}" method="post">
- <div id="lang-menu">
- <span id='lang-button' class='mono'>
+ <div id="lang-menu" class="hoverget">
+ <span id='lang-button' class='mono hoverclick'>
<span class="lang-flag">⚐</span>
{% trans "Language versions" %}</span>
<div id="lang-menu-items">