#4: Added a basic template for the comment design. Comments now display nested. Renamed the columns in the database table so the default validation error messages look better. Corrected a few issues with the TinyMCE implementation.

This commit is contained in:
2018-09-19 09:44:20 +01:00
parent 60e747bd75
commit 1802aa84d8
9 changed files with 98 additions and 35 deletions

View File

@@ -41569,12 +41569,21 @@ function PhotoViewModel(urls) {
self.is_reply_form_loading = false;
});
});
$('#comment-reply-modal').on('hide.bs.modal', function (event) {
tinymce.remove('#comment-text-reply');
});
},
postCommentReply: function() {
var form = $('form', '#comment-reply-form-content');
var formUrl = $(form).attr('action');
// Seems like the TinyMCE editor in the BS modal does not persist back to the textarea correctly - so do
// this manually (bit of a hack!)
$('#comment-text-reply', form).html(tinymce.get('comment-text-reply').getContent());
var formData = form.serialize();
$.post(formUrl, formData, function(result)
{
if (result.redirect_url)
@@ -41583,7 +41592,9 @@ function PhotoViewModel(urls) {
}
else
{
tinymce.remove('#comment-text-reply');
$('#comment-reply-form-content').html(result);
initTinyMce('#comment-text-reply');
}
});
},
@@ -41593,6 +41604,9 @@ function PhotoViewModel(urls) {
this.is_reply_form_loading = true;
$('#comment-reply-modal').modal('show');
e.preventDefault();
return false;
}
};
}

File diff suppressed because one or more lines are too long