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)
|
function loadComments(commentsUrl)
|
||||||
{
|
{
|
||||||
|
var commentsContainer = $('#comments-embed');
|
||||||
|
|
||||||
return $.get(commentsUrl)
|
return $.get(commentsUrl)
|
||||||
.done(function(dataHtml) {
|
.done(function(dataHtml) {
|
||||||
// Update the DOM injecting the generate HTML into the page
|
// Update the DOM injecting the generate HTML into the page
|
||||||
$('#comments-container').html(dataHtml);
|
commentsContainer.html(dataHtml);
|
||||||
})
|
})
|
||||||
.fail(function(xhr) {
|
.fail(function(xhr) {
|
||||||
statusBarSet('error', "Couldn't load comments. Error: " + xhr.responseText, 'pi-attention', 5000);
|
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
|
#comments-container
|
||||||
margin-top: 15px
|
margin-top: 15px
|
||||||
padding: 5px 20px 20px 20px
|
|
||||||
position: relative
|
position: relative
|
||||||
border-top: 1px solid $color-background
|
border-top: 1px solid $color-background
|
||||||
|
|
||||||
min-height: 170px
|
min-height: 170px
|
||||||
|
|
||||||
&.texture
|
&.texture
|
||||||
|
@ -689,6 +689,8 @@ ul.project_nav-edit-list
|
|||||||
&.active
|
&.active
|
||||||
opacity: 1
|
opacity: 1
|
||||||
|
|
||||||
|
#comments-embed
|
||||||
|
padding: 5px 20px 20px 20px
|
||||||
|
|
||||||
/* Project context on the right of the navigation */
|
/* Project context on the right of the navigation */
|
||||||
/* Contains #project_context */
|
/* Contains #project_context */
|
||||||
|
@ -97,7 +97,7 @@
|
|||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
|
|
||||||
#comments-container
|
#comments-embed
|
||||||
#comments-list-items-loading
|
#comments-list-items-loading
|
||||||
i.pi-spin
|
i.pi-spin
|
||||||
|
|
||||||
|
@ -102,7 +102,8 @@
|
|||||||
| {% if (node._created | pretty_date) != (node._updated | pretty_date) %}
|
| {% if (node._created | pretty_date) != (node._updated | pretty_date) %}
|
||||||
span(title="Updated {{ node._updated }}") (updated {{ node._updated | pretty_date }})
|
span(title="Updated {{ node._updated }}") (updated {{ node._updated | pretty_date }})
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
#comments-container
|
|
||||||
|
#comments-embed
|
||||||
#comments-list-items-loading
|
#comments-list-items-loading
|
||||||
i.pi-spin
|
i.pi-spin
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@
|
|||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
|
|
||||||
#comments-container
|
#comments-embed
|
||||||
#comments-list-items-loading
|
#comments-list-items-loading
|
||||||
i.pi-spin
|
i.pi-spin
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
a(href="{{ node.short_link }}") {{ node.short_link }}
|
a(href="{{ node.short_link }}") {{ node.short_link }}
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
#comments-container
|
#comments-embed
|
||||||
#comments-list-items-loading
|
#comments-list-items-loading
|
||||||
i.pi-spin
|
i.pi-spin
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ meta(name="twitter:description", content="{{ node.properties.content }}")
|
|||||||
| {{ node.properties.content }}
|
| {{ node.properties.content }}
|
||||||
|
|
||||||
|
|
||||||
#comments-container
|
#comments-embed
|
||||||
#comments-list-items-loading
|
#comments-list-items-loading
|
||||||
i.pi-spin
|
i.pi-spin
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user