Project Landing: Fix links in latest updates

Part of T56813
This commit is contained in:
2018-09-15 22:19:47 +02:00
parent fca2b0f44f
commit 40f6ebd99c

View File

@@ -105,7 +105,7 @@ link(href="{{ url_for('static_cloud', filename='assets/css/project-main.css') }}
| {% if n.node_type not in ['comment', 'post'] and n.picture %} | {% if n.node_type not in ['comment', 'post'] and n.picture %}
.thumbnail.expand-image-links .thumbnail.expand-image-links
.img-container .img-container
a(href="{{ n.picture.thumbnail('l', api=api) }}", data-node_id="{{ n._id }}") a.js-open-overlay(href="{{ n.picture.thumbnail('l', api=api) }}", data-node_id="{{ n._id }}")
img(src="{{ n.picture.thumbnail('l', api=api) }}", alt="{{ n.name }}") img(src="{{ n.picture.thumbnail('l', api=api) }}", alt="{{ n.name }}")
.img-caption.table .img-caption.table
| {# Not using for the moment | {# Not using for the moment
@@ -165,11 +165,10 @@ script.
} }
}); });
$("a[data-node_id]").on( "click", function(e) { $("a.js-open-overlay").on( "click", function(e) {
// var nodeId = $(this).data('node_id');
// displayNode(nodeId);
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
$('#page-overlay').addClass('active'); $('#page-overlay').addClass('active');
var url = $(this).attr('href'); var url = $(this).attr('href');
$('#page-overlay').html('<img src="' + url + '"/>') $('#page-overlay').html('<img src="' + url + '"/>')