200520 New reply layout and Longhorn theme
This commit is contained in:
@ -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);
|
||||
});
|
||||
|
Reference in New Issue
Block a user