From 1ff260641b29888f28d24acb58195ea231207494 Mon Sep 17 00:00:00 2001
From: Marcin Koziej
Date: Sat, 7 Dec 2013 18:17:38 +0100
Subject: [PATCH] some fixes from ui checks
---
apps/catalogue/templates/catalogue/book_info.html | 2 +-
apps/catalogue/templates/catalogue/tag_list_split.html | 4 ++--
apps/picture/templates/picture/picture_list_thumb.html | 6 +++++-
apps/picture/templates/picture/picture_viewer.html | 2 +-
apps/picture/views.py | 2 ++
apps/wolnelektury_core/static/css/master.picture.css | 4 ++--
apps/wolnelektury_core/static/js/picture.js | 9 +++++----
lib/librarian | 2 +-
8 files changed, 19 insertions(+), 12 deletions(-)
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 @@
{% if book.extra_info.source_name %}
- {% trans "Text prepared based on:" %} {{ book.extra_info.source_name }}
+ {% trans "Resource prepared based on:" %} {{ book.extra_info.source_name }}
{% 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 %}
-{% trans "Literatura" %}
+
{% trans "Literature" %}
{{books|safe}}
{% endif %}
{% if pictures %}
-
{% trans "Obrazy" %}
+
{% 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 @@
{% block book_list_header %}{% trans "Listing of all pictures" %}{% endblock %}
- {% block book_list_info %}{% endblock %}
+ {% block book_list_info %}
+
+
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.
+{% endblock %}
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 @@
{% trans "Picture's page" %}
-
+ {% trans "Download" %}
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
--
2.20.1