Use #comments-embed for embedding comments. Avoid duplicate ID
This commit is contained in:
parent
f4b5e49c26
commit
53cbe78ec1
@ -147,14 +147,17 @@ function loadComment(comment_id, projection)
|
||||
|
||||
function loadComments(commentsUrl)
|
||||
{
|
||||
var commentsContainer = $('#comments-embed');
|
||||
|
||||
return $.get(commentsUrl)
|
||||
.done(function(dataHtml) {
|
||||
// Update the DOM injecting the generate HTML into the page
|
||||
$('#comments-container').html(dataHtml);
|
||||
commentsContainer.html(dataHtml);
|
||||
})
|
||||
.fail(function(xhr) {
|
||||
statusBarSet('error', "Couldn't load comments. Error: " + xhr.responseText, 'pi-attention', 5000);
|
||||
$('#comments-container').html('<a id="comments-reload"><i class="pi-refresh"></i> Reload comments</a>');
|
||||
|
||||
commentsContainer.html('<a id="comments-reload"><i class="pi-refresh"></i> Reload comments</a>');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -2,10 +2,8 @@ $comments-width-max: 710px
|
||||
|
||||
#comments-container
|
||||
margin-top: 15px
|
||||
padding: 5px 20px 20px 20px
|
||||
position: relative
|
||||
border-top: 1px solid $color-background
|
||||
|
||||
min-height: 170px
|
||||
|
||||
&.texture
|
||||
|
@ -689,6 +689,8 @@ ul.project_nav-edit-list
|
||||
&.active
|
||||
opacity: 1
|
||||
|
||||
#comments-embed
|
||||
padding: 5px 20px 20px 20px
|
||||
|
||||
/* Project context on the right of the navigation */
|
||||
/* Contains #project_context */
|
||||
|
@ -97,7 +97,7 @@
|
||||
| {% endif %}
|
||||
|
||||
|
||||
#comments-container
|
||||
#comments-embed
|
||||
#comments-list-items-loading
|
||||
i.pi-spin
|
||||
|
||||
|
@ -102,7 +102,8 @@
|
||||
| {% if (node._created | pretty_date) != (node._updated | pretty_date) %}
|
||||
span(title="Updated {{ node._updated }}") (updated {{ node._updated | pretty_date }})
|
||||
| {% endif %}
|
||||
#comments-container
|
||||
|
||||
#comments-embed
|
||||
#comments-list-items-loading
|
||||
i.pi-spin
|
||||
|
||||
|
@ -114,7 +114,7 @@
|
||||
| {% endif %}
|
||||
|
||||
|
||||
#comments-container
|
||||
#comments-embed
|
||||
#comments-list-items-loading
|
||||
i.pi-spin
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
||||
a(href="{{ node.short_link }}") {{ node.short_link }}
|
||||
| {% endif %}
|
||||
|
||||
#comments-container
|
||||
#comments-embed
|
||||
#comments-list-items-loading
|
||||
i.pi-spin
|
||||
|
||||
|
@ -75,7 +75,7 @@ meta(name="twitter:description", content="{{ node.properties.content }}")
|
||||
| {{ node.properties.content }}
|
||||
|
||||
|
||||
#comments-container
|
||||
#comments-embed
|
||||
#comments-list-items-loading
|
||||
i.pi-spin
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user