Zeile 6 | Zeile 6 |
---|
Thread.initQuickReply(); Thread.initMultiQuote();
|
Thread.initQuickReply(); Thread.initMultiQuote();
|
| if(thread_deleted == "1") { $("#quick_reply_form, .new_reply_button, .thread_tools, .inline_rating").hide(); $("#moderator_options_selector option.option_mirage").attr("disabled","disabled"); }
visible_replies = parseInt(visible_replies, 10); Thread.splitToolHandler(); if($("#moderator_options_selector").length !== 0) { $("#moderator_options_selector").on('change', function() { $("#moderator_options").trigger('submit'); });
$("#moderator_options").on('submit', function(){ if($("#moderator_options_selector").val() == "") { $.jGrowl(lang.select_tool, {theme:'jgrowl_error'}); return false; } }); }
|
// Set spinner image $('#quickreply_spinner img').attr('src', spinner_image); });
| // Set spinner image $('#quickreply_spinner img').attr('src', spinner_image); });
|
Zeile 133 | Zeile 155 |
---|
} }
|
} }
|
if(typeof $('textarea').sceditor != 'undefined')
| if(typeof MyBBEditor !== 'undefined' && MyBBEditor !== null)
|
{
|
{
|
$('textarea').sceditor('instance').insert(json.message);
| MyBBEditor.insert(json.message);
|
} else {
| } else {
|
Zeile 191 | Zeile 213 |
---|
rows: 12, submit: lang.save_changes, cancel: lang.cancel_edit,
|
rows: 12, submit: lang.save_changes, cancel: lang.cancel_edit,
|
| placeholder: "",
|
event: "edit" + pid, // Triggered by the event "edit_[pid]", onblur: "ignore", dataType: "json",
| event: "edit" + pid, // Triggered by the event "edit_[pid]", onblur: "ignore", dataType: "json",
|
Zeile 222 | Zeile 245 |
---|
$(this).html($('#pid_' + pid + '_temp').html()); } else if(json.hasOwnProperty("moderation_post"))
|
$(this).html($('#pid_' + pid + '_temp').html()); } else if(json.hasOwnProperty("moderation_post"))
|
{ $(".jGrowl").jGrowl("close");
| { $(".jGrowl").jGrowl("close");
|
$(this).html(json.message);
| $(this).html(json.message);
|
Zeile 410 | Zeile 433 |
---|
$('#posts').append(json.data);
|
$('#posts').append(json.data);
|
| ++visible_replies; Thread.splitToolHandler();
|
if (typeof inlineModeration != "undefined") // Guests don't have this object defined $("#inlinemod_" + pid).on('change', inlineModeration.checkItem);
| if (typeof inlineModeration != "undefined") // Guests don't have this object defined $("#inlinemod_" + pid).on('change', inlineModeration.checkItem);
|
Zeile 437 | Zeile 463 |
---|
}
$(".jGrowl").jGrowl("close");
|
}
$(".jGrowl").jGrowl("close");
|
},
| },
|
showIgnoredPost: function(pid) { $('#ignored_post_'+pid).slideToggle("slow");
| showIgnoredPost: function(pid) { $('#ignored_post_'+pid).slideToggle("slow");
|
Zeile 483 | Zeile 509 |
---|
// Change CSS class of div 'post_[pid]' $("#post_"+pid).addClass("unapproved_post deleted_post"); if(json.first == 1)
|
// Change CSS class of div 'post_[pid]' $("#post_"+pid).addClass("unapproved_post deleted_post"); if(json.first == 1)
|
{
| {
|
$("#quick_reply_form, .thread_tools, .new_reply_button, .inline_rating").hide(); $("#moderator_options_selector option.option_mirage").attr("disabled","disabled"); $("#moderator_options_selector option[value='softdeletethread']").val("restorethread").text(lang.restore_thread);
|
$("#quick_reply_form, .thread_tools, .new_reply_button, .inline_rating").hide(); $("#moderator_options_selector option.option_mirage").attr("disabled","disabled"); $("#moderator_options_selector option[value='softdeletethread']").val("restorethread").text(lang.restore_thread);
|
| thread_deleted = "1";
|
}
|
}
|
| |
$.jGrowl(lang.quick_delete_success, {theme:'jgrowl_success'}); } else if(json.data == 2)
|
$.jGrowl(lang.quick_delete_success, {theme:'jgrowl_success'}); } else if(json.data == 2)
|
{
| {
|
// Actually deleted $('#post_'+pid).slideToggle("slow");
|
// Actually deleted $('#post_'+pid).slideToggle("slow");
|
| --visible_replies; Thread.splitToolHandler();
|
$.jGrowl(lang.quick_delete_success, {theme:'jgrowl_success'});
|
$.jGrowl(lang.quick_delete_success, {theme:'jgrowl_success'});
|
} else if(json.data == 3)
| } else if(json.data == 3)
|
{ // deleted thread --> redirect
if(!json.hasOwnProperty("url"))
|
{ // deleted thread --> redirect
if(!json.hasOwnProperty("url"))
|
{
| {
|
$.jGrowl(lang.unknown_error, {theme:'jgrowl_error'}); }
| $.jGrowl(lang.unknown_error, {theme:'jgrowl_error'}); }
|
Zeile 511 | Zeile 540 |
---|
{ window.location = json.url; }, 3000);
|
{ window.location = json.url; }, 3000);
|
|
|
// print success message $.jGrowl(lang.quick_delete_thread_success, {theme:'jgrowl_success'});
|
// print success message $.jGrowl(lang.quick_delete_thread_success, {theme:'jgrowl_success'});
|
} } else { $.jGrowl(lang.unknown_error, {theme:'jgrowl_error'}); } } }); } } });
return false; },
| } } else { $.jGrowl(lang.unknown_error, {theme:'jgrowl_error'}); } } }); } } });
return false; },
|
restorePost: function(pid) { MyBB.prompt(quickrestore_confirm, {
| restorePost: function(pid) { MyBB.prompt(quickrestore_confirm, {
|
Zeile 563 | Zeile 592 |
---|
$("#quick_reply_form, .thread_tools, .new_reply_button, .inline_rating").show(); $("#moderator_options_selector option.option_mirage").prop("disabled", false); $("#moderator_options_selector option[value='restorethread']").val("softdeletethread").text(lang.softdelete_thread);
|
$("#quick_reply_form, .thread_tools, .new_reply_button, .inline_rating").show(); $("#moderator_options_selector option.option_mirage").prop("disabled", false); $("#moderator_options_selector option[value='restorethread']").val("softdeletethread").text(lang.softdelete_thread);
|
| thread_deleted = "";
|
}
$.jGrowl(lang.quick_restore_success, {theme:'jgrowl_success'});
| }
$.jGrowl(lang.quick_restore_success, {theme:'jgrowl_success'});
|
Zeile 574 | Zeile 604 |
---|
} }); }
|
} }); }
|
}
| }
|
});
|
});
|
|
|
return false; },
|
return false; },
|
viewNotes: function(tid)
| viewNotes: function(tid) { MyBB.popupWindow("/moderation.php?action=viewthreadnotes&tid="+tid+"&modal=1"); },
splitToolHandler: function()
|
{
|
{
|
MyBB.popupWindow("/moderation.php?action=viewthreadnotes&tid="+tid+"&modal=1");
| if($(thread_deleted !== "1" && "#moderator_options_selector").length !== 0){ var splitTool = $("#moderator_options_selector").find("option[value=split]"); if(visible_replies > 0) { splitTool.prop("disabled", false); } else { splitTool.attr("disabled","disabled"); } }
|
} };
| } };
|