200520 New reply layout and Longhorn theme

This commit is contained in:
Daisuke
2020-05-20 14:53:33 -05:00
parent cb98b84c94
commit 2b1cee3f9d
27 changed files with 900 additions and 78 deletions

View File

@ -46,17 +46,23 @@ $query = http_build_query(array_filter(array(
$('body').on('click', '.replyform', function(e) {
e.preventDefault;
$("#replyform").remove();
$(".element").removeClass("element_pad");
$(this).closest(".element").addClass("element_pad");
var id = $(this).parents().eq(1).attr('id');
var type = $(this).parents().eq(3).attr('class').trim().replace(" ",".");
var type = $(this).parents().eq(3).attr('mode').trim().replace(" ",".");
console.log(type);
$('#replyform').remove();
var data = JSON.parse(document.getElementById('data-' + id).innerHTML);
$.get("action.php?a=true&themefile=templates/replyform.txt", function(result) {
result = result.replace(":content:", data.mentions)
result = result.replace(":id:", data.id)
$('.'+type).find('#' + id+'.replies_container').prepend(result);
if(type == 'post'){
$('.'+type).find('#' + id+'.replies_container').prepend(result);
} else {
$('#' + id+'.'+type).after(result);
}
$('#replyform #' + data.scope).prop('selected', true);
$('#' + id).fadeIn(400);
});