From: Marcin Koziej <marcin@lolownia.org> Date: Sat, 7 Dec 2013 17:17:38 +0000 (+0100) Subject: some fixes from ui checks X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/1ff260641b29888f28d24acb58195ea231207494?ds=inline some fixes from ui checks --- diff --git a/apps/catalogue/templates/catalogue/book_info.html b/apps/catalogue/templates/catalogue/book_info.html index a90ccdc87..251213ad2 100755 --- a/apps/catalogue/templates/catalogue/book_info.html +++ b/apps/catalogue/templates/catalogue/book_info.html @@ -17,7 +17,7 @@ </p> {% if book.extra_info.source_name %} - <p>{% trans "Text prepared based on:" %} {{ book.extra_info.source_name }}</p> + <p>{% trans "Resource prepared based on:" %} {{ book.extra_info.source_name }}</p> {% endif %} {% if book.extra_info.description %} diff --git a/apps/catalogue/templates/catalogue/tag_list_split.html b/apps/catalogue/templates/catalogue/tag_list_split.html index b800d70d4..bc952c1f1 100644 --- a/apps/catalogue/templates/catalogue/tag_list_split.html +++ b/apps/catalogue/templates/catalogue/tag_list_split.html @@ -1,10 +1,10 @@ {% load i18n %} {% if books %} -<p class="mono">{% trans "Literatura" %} +<p class="mono">{% trans "Literature" %} {{books|safe}} {% endif %} {% if pictures %} -<p class="mono">{% trans "Obrazy" %} +<p class="mono">{% trans "Gallery" %} {{pictures|safe}} {% endif %} diff --git a/apps/picture/templates/picture/picture_list_thumb.html b/apps/picture/templates/picture/picture_list_thumb.html index 647afb7d5..1610f4fac 100644 --- a/apps/picture/templates/picture/picture_list_thumb.html +++ b/apps/picture/templates/picture/picture_list_thumb.html @@ -3,6 +3,7 @@ {% load chunks %} {% load picture_tags %} {% load thumbnail %} +{% load static %} {% block bodyid %}picture-list{% endblock %} @@ -13,7 +14,10 @@ <h1>{% block book_list_header %}{% trans "Listing of all pictures" %}{% endblock %}</h1> <div class="left-column"><div class="normal-text"> - {% block book_list_info %}{% endblock %} + {% block book_list_info %} +<a href="http://www.nck.pl"><img style="float:right; width:100px;" src="{% static "img/logo_nck_200trans.png" %}" alt="Narodowe Centrum Kultury" ></img></a> +<p>Galeria zawiera obrazy, rysunki, rzeźby, fotografie pochodzÄ ce z kolekcji Muzeum Narodowego w Warszawie. Każde z dzieÅ oznaczyliÅmy motywami wystÄpujÄ cymi w sztuce i w literaturze. GaleriÄ można wiÄc przeglÄ daÄ w poszukiwaniu ilustracji do tekstów literackich, a także pod kÄ tem okreÅlonych przedmiotów i postaci wystÄpujÄ cych w sztukach wizualnych. </p> +{% endblock %} </div></div> <div class='clearboth'></div> diff --git a/apps/picture/templates/picture/picture_viewer.html b/apps/picture/templates/picture/picture_viewer.html index d190af8a2..8caaae63d 100644 --- a/apps/picture/templates/picture/picture_viewer.html +++ b/apps/picture/templates/picture/picture_viewer.html @@ -27,7 +27,7 @@ <li><a class="menu" href="#info">{% trans "Infobox" %}</a></li> <li><a href="{{ picture.get_absolute_url }}">{% trans "Picture's page" %}</a></li> <!-- XXX --> - <li><a class="menu" href="#download">{% trans "Download" %}</a></li> + <li><a href="{{ picture.image_file.url }}">{% trans "Download" %}</a></li> </ul> </div> <div id="info" class="moveright"> diff --git a/apps/picture/views.py b/apps/picture/views.py index c39969aca..94f4e2034 100644 --- a/apps/picture/views.py +++ b/apps/picture/views.py @@ -28,6 +28,8 @@ def picture_list_thumb(request, filter=None, get_filter=None, template_name='pic book_list = book_list.filter(filter) if get_filter: book_list = book_list.filter(get_filter()) + book_list = list(book_list) + book_list.sort(lambda a,b: cmp(a.extra_info['authors'][0], b.extra_info['authors'][0])) return render_to_response(template_name, locals(), context_instance=RequestContext(request)) diff --git a/apps/wolnelektury_core/static/css/master.picture.css b/apps/wolnelektury_core/static/css/master.picture.css index 7bbb292b4..e8aa3e633 100644 --- a/apps/wolnelektury_core/static/css/master.picture.css +++ b/apps/wolnelektury_core/static/css/master.picture.css @@ -122,10 +122,10 @@ li.button.square { width: 9rem; } #sponsors div { - z-index: -10; + z-index: 10; } #sponsors img { width: 100%; - z-index: -10; + z-index: 10; } \ No newline at end of file diff --git a/apps/wolnelektury_core/static/js/picture.js b/apps/wolnelektury_core/static/js/picture.js index 0840aa5fa..052392a32 100644 --- a/apps/wolnelektury_core/static/js/picture.js +++ b/apps/wolnelektury_core/static/js/picture.js @@ -39,6 +39,7 @@ self.spinner = $("#spinner").progressSpin(); $(original).load(function() { + console.log("loaded original"); self._original_loaded = true; self.spinner.stop(); var cb = self.original_loaded; @@ -80,8 +81,8 @@ return self; }, - natural_size: function() { - var img = this.element.find('img').get(0); + natural_size: function() { + var img = this.element.find('img.original').get(0); return [ img.naturalWidth, img.naturalHeight ] }, @@ -124,7 +125,7 @@ var new_width = ratio * this.initial_size[0]; var new_height = ratio * this.initial_size[1]; var target = { -// 'width': new_width, + 'width': new_width, 'left': Math.max(0, this.initial_position.left - (new_width - this.initial_size[0])/2), @@ -136,7 +137,7 @@ this._zoom = level; this.element.css(target); - this.element.find(".original").width(new_width); + // this.element.animate(target, 1200); // default duration=400 }, diff --git a/lib/librarian b/lib/librarian index 5b1dcc7d2..32177c13e 160000 --- a/lib/librarian +++ b/lib/librarian @@ -1 +1 @@ -Subproject commit 5b1dcc7d247996752fa566c7150a45037b068565 +Subproject commit 32177c13e6f1f07741f559601064538a65ce00fd