Changed notes to be rendered only in image posts
This commit is contained in:
parent
22d7ab8732
commit
83ca1fcfb4
1 changed files with 10 additions and 5 deletions
|
@ -20,11 +20,6 @@ App.Presenters.PostContentPresenter = function(
|
|||
templates.postContent = postContentTemplate;
|
||||
render();
|
||||
loaded();
|
||||
|
||||
presenterManager.initPresenters([
|
||||
[postNotesPresenter, {post: post, notes: post.notes, $target: $target.find('.post-notes-target')}]],
|
||||
function() {});
|
||||
|
||||
}).fail(function() {
|
||||
console.log(arguments);
|
||||
loaded();
|
||||
|
@ -33,6 +28,16 @@ App.Presenters.PostContentPresenter = function(
|
|||
|
||||
function render() {
|
||||
$target.html(templates.postContent({post: post}));
|
||||
|
||||
if (post.contentType === 'image') {
|
||||
loadPostNotes();
|
||||
}
|
||||
}
|
||||
|
||||
function loadPostNotes() {
|
||||
presenterManager.initPresenters([
|
||||
[postNotesPresenter, {post: post, notes: post.notes, $target: $target.find('.post-notes-target')}]],
|
||||
function() {});
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
Loading…
Reference in a new issue