fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fetch thumbnails from wikidata.
[wolnelektury.git]
/
src
/
wolnelektury
/
static
/
js
/
book_text
/
references.js
diff --git
a/src/wolnelektury/static/js/book_text/references.js
b/src/wolnelektury/static/js/book_text/references.js
index
5a6af49
..
b75a4da
100644
(file)
--- a/
src/wolnelektury/static/js/book_text/references.js
+++ b/
src/wolnelektury/static/js/book_text/references.js
@@
-8,10
+8,8
@@
$("#settings-references").css('display', 'block');
}
$("#settings-references").css('display', 'block');
}
-
-
var map_enabled = false;
var map_enabled = false;
- var marker = L.
m
arker([0,0]);
+ var marker = L.
circleM
arker([0,0]);
var map = null;
function enable_map() {
var map = null;
function enable_map() {
@@
-62,7
+60,6
@@
enable_map();
marker.setLatLng(ref.location);
enable_map();
marker.setLatLng(ref.location);
- //marker.setContent(ref.label);
marker.bindTooltip(ref.label).openTooltip();
map.addLayer(marker);
map.panTo(ref.location, {
marker.bindTooltip(ref.label).openTooltip();
map.addLayer(marker);
map.panTo(ref.location, {
@@
-81,7
+78,11
@@
$.each(ref.images, function(i, e) {
$i = $("<a target='_blank'><img></a>");
$i.attr('href', e.page);
$.each(ref.images, function(i, e) {
$i = $("<a target='_blank'><img></a>");
$i.attr('href', e.page);
- $('img', $i).attr('src', e.url);
+ $('img', $i).attr('src', e.thumburl || e.url);
+ if (e.thumbresolution) {
+ $('img', $i).attr('width', e.thumbresolution[0]).attr('height', e.thumbresolution[1]);
+ }
+
$("#reference-images").append($i);
})
}
$("#reference-images").append($i);
})
}