fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Map fix.
[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
dcbb3c8
..
7c98763
100644
(file)
--- a/
src/wolnelektury/static/js/book_text/references.js
+++ b/
src/wolnelektury/static/js/book_text/references.js
@@
-4,8
+4,8
@@
if (interestingReferences) {
interestingReferences = $.parseJSON(interestingReferences);
}
if (interestingReferences) {
interestingReferences = $.parseJSON(interestingReferences);
}
- if (
interestingReferences
) {
- $("
settings-references").show(
);
+ if (
Object.keys(interestingReferences).length
) {
+ $("
#settings-references").css('display', 'block'
);
}
}
@@
-18,7
+18,7
@@
if (map_enabled) return;
map = L.map('reference-map').setView([0, 0], 11);
if (map_enabled) return;
map = L.map('reference-map').setView([0, 0], 11);
- L.tileLayer('https://
maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png?lang=pl
', {
+ L.tileLayer('https://
{s}.tile.openstreetmap.org/{z}/{x}/{y}.png
', {
attribution: 'Map data © <a href="http://openstreetmap.org/copyright">OpenStreetMap contributors</a>'
}).addTo(map);
attribution: 'Map data © <a href="http://openstreetmap.org/copyright">OpenStreetMap contributors</a>'
}).addTo(map);
@@
-29,14
+29,14
@@
}
}
- $("#reference-close").on("click", function() {
+ $("#reference-close").on("click", function(event) {
+ event.preventDefault();
$("#reference-box").hide();
});
$('a.reference').each(function() {
$this = $(this);
uri = $this.attr('data-uri');
$("#reference-box").hide();
});
$('a.reference').each(function() {
$this = $(this);
uri = $this.attr('data-uri');
- console.log('check ' + uri);
if (interestingReferences.hasOwnProperty(uri)) {
$this.addClass('interesting');
ref = interestingReferences[uri];
if (interestingReferences.hasOwnProperty(uri)) {
$this.addClass('interesting');
ref = interestingReferences[uri];