#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:
@@ -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;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
2
public/js/blue-twilight.min.js
vendored
2
public/js/blue-twilight.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user