Zeile 5 | Zeile 5 |
---|
Thread.quickEdit(); Thread.initQuickReply(); Thread.initMultiQuote();
|
Thread.quickEdit(); Thread.initQuickReply(); Thread.initMultiQuote();
|
|
|
// Set spinner image $('#quickreply_spinner img').attr('src', spinner_image); });
| // Set spinner image $('#quickreply_spinner img').attr('src', spinner_image); });
|
Zeile 14 | Zeile 14 |
---|
initMultiQuote: function() { var quoted = Cookie.get('multiquote');
|
initMultiQuote: function() { var quoted = Cookie.get('multiquote');
|
if(quoted)
| if(quoted)
|
{ var post_ids = quoted.split("|");
| { var post_ids = quoted.split("|");
|
Zeile 55 | Zeile 55 |
---|
} }); }
|
} }); }
|
|
|
var mquote_a = $("#multiquote_"+pid).closest('a') if(is_new == true) {
| var mquote_a = $("#multiquote_"+pid).closest('a') if(is_new == true) {
|
Zeile 66 | Zeile 66 |
---|
{ mquote_a.removeClass('postbit_multiquote_on').addClass('postbit_multiquote'); }
|
{ mquote_a.removeClass('postbit_multiquote_on').addClass('postbit_multiquote'); }
|
|
|
var mquote_quick = $('#quickreply_multiquote'); if(mquote_quick.length) { if(new_post_ids.length) { mquote_quick.show();
|
var mquote_quick = $('#quickreply_multiquote'); if(mquote_quick.length) { if(new_post_ids.length) { mquote_quick.show();
|
}
| }
|
else { mquote_quick.hide();
| else { mquote_quick.hide();
|
Zeile 97 | Zeile 97 |
---|
complete: function (request, status) { Thread.multiQuotedLoaded(request, status);
|
complete: function (request, status) { Thread.multiQuotedLoaded(request, status);
|
|
|
// Get rid of spinner mquote_spinner.hide(); }
| // Get rid of spinner mquote_spinner.hide(); }
|
Zeile 115 | Zeile 115 |
---|
{ var json = $.parseJSON(request.responseText); if(typeof json == 'object')
|
{ var json = $.parseJSON(request.responseText); if(typeof json == 'object')
|
{
| {
|
if(json.hasOwnProperty("errors")) { $.each(json.errors, function(i, message)
| if(json.hasOwnProperty("errors")) { $.each(json.errors, function(i, message)
|
Zeile 123 | Zeile 123 |
---|
$.jGrowl(lang.post_fetch_error + ' ' + message, {theme:'jgrowl_error'}); }); return false;
|
$.jGrowl(lang.post_fetch_error + ' ' + message, {theme:'jgrowl_error'}); }); return false;
|
}
| }
|
}
if(typeof $('textarea').sceditor != 'undefined')
| }
if(typeof $('textarea').sceditor != 'undefined')
|
Zeile 138 | Zeile 138 |
---|
id.value += "\n"; } id.val(id.val() + json.message);
|
id.value += "\n"; } id.val(id.val() + json.message);
|
}
| }
|
Thread.clearMultiQuoted(); $('#quickreply_multiquote').hide(); $('#quoted_ids').val('all');
|
Thread.clearMultiQuoted(); $('#quickreply_multiquote').hide(); $('#quoted_ids').val('all');
|
|
|
$('#message').focus(); },
clearMultiQuoted: function()
|
$('#message').focus(); },
clearMultiQuoted: function()
|
{
| {
|
$('#quickreply_multiquote').hide(); var quoted = Cookie.get("multiquote"); if(quoted)
| $('#quickreply_multiquote').hide(); var quoted = Cookie.get("multiquote"); if(quoted)
|
Zeile 188 | Zeile 188 |
---|
onblur: "ignore", dataType: "json", submitdata: function (values, settings)
|
onblur: "ignore", dataType: "json", submitdata: function (values, settings)
|
{ id = $(this).attr('id');
| { id = $(this).attr('id');
|
pid = id.replace( /[^\d.]/g, '');
|
pid = id.replace( /[^\d.]/g, '');
|
| $("#quickedit_" + pid + "_editreason_original").val($("#quickedit_" + pid + "_editreason").val());
|
return { editreason: $("#quickedit_" + pid + "_editreason").val() }
| return { editreason: $("#quickedit_" + pid + "_editreason").val() }
|
Zeile 199 | Zeile 200 |
---|
{ id = $(this).attr('id'); pid = id.replace( /[^\d.]/g, '');
|
{ id = $(this).attr('id'); pid = id.replace( /[^\d.]/g, '');
|
|
|
var json = $.parseJSON(values); if(typeof json == 'object') { if(json.hasOwnProperty("errors"))
|
var json = $.parseJSON(values); if(typeof json == 'object') { if(json.hasOwnProperty("errors"))
|
{ $(".jGrowl").jGrowl("close");
| { $(".jGrowl").jGrowl("close");
|
$.each(json.errors, function(i, message) { $.jGrowl(lang.quick_edit_update_error + ' ' + message, {theme:'jgrowl_error'});
| $.each(json.errors, function(i, message) { $.jGrowl(lang.quick_edit_update_error + ' ' + message, {theme:'jgrowl_error'});
|
Zeile 214 | Zeile 215 |
---|
$(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 236 | Zeile 237 |
---|
$(".jGrowl").jGrowl("close");
$(this).html(json.message);
|
$(".jGrowl").jGrowl("close");
$(this).html(json.message);
|
|
|
alert(json.moderation_thread);
|
alert(json.moderation_thread);
|
|
|
// Redirect user to forum window.location = json.url;
|
// Redirect user to forum window.location = json.url;
|
}
| }
|
else { // Change html content
| else { // Change html content
|
Zeile 274 | Zeile 275 |
---|
if($('#pid_' + pid + '_temp').length == 0) { $('#pid_' + pid).clone().attr('id','pid_' + pid + '_temp').appendTo("body").hide();
|
if($('#pid_' + pid + '_temp').length == 0) { $('#pid_' + pid).clone().attr('id','pid_' + pid + '_temp').appendTo("body").hide();
|
}
| }
|
// Trigger the edit event $('#pid_' + pid).trigger("edit" + pid);
| // Trigger the edit event $('#pid_' + pid).trigger("edit" + pid);
|
Zeile 283 | Zeile 284 |
---|
$('#pid_' + pid + ' textarea').attr('id', 'quickedit_' + pid); if(allowEditReason == 1 && $('#quickedit_' + pid + '_editreason').length == 0) {
|
$('#pid_' + pid + ' textarea').attr('id', 'quickedit_' + pid); if(allowEditReason == 1 && $('#quickedit_' + pid + '_editreason').length == 0) {
|
$('#quickedit_' + pid).after('<label for="editreason">' + lang.editreason + ':</label> <input type="text" class="textbox" style="margin: 6px 0;" name="editreason" size="40" maxlength="150" id="quickedit_' + pid + '_editreason" /><br />');
| edit_el = $('#editreason_' + pid + '_original').clone().attr('id','editreason_' + pid); edit_el.children('#quickedit_' + pid + '_editreason_original').attr('id','quickedit_' + pid + '_editreason'); edit_el.insertAfter('#quickedit_' + pid).show();
|
} }); });
| } }); });
|
Zeile 292 | Zeile 295 |
---|
},
initQuickReply: function()
|
},
initQuickReply: function()
|
{
| {
|
if($('#quick_reply_form').length && use_xmlhttprequest == 1) { // Bind closing event to our popup menu $('#quick_reply_submit').bind('click', function(e) { return Thread.quickReply(e); });
|
if($('#quick_reply_form').length && use_xmlhttprequest == 1) { // Bind closing event to our popup menu $('#quick_reply_submit').bind('click', function(e) { return Thread.quickReply(e); });
|
} },
| } },
|
quickReply: function(e) {
| quickReply: function(e) {
|
Zeile 313 | Zeile 316 |
---|
this.quick_replying = 1; var post_body = $('#quick_reply_form').serialize();
|
this.quick_replying = 1; var post_body = $('#quick_reply_form').serialize();
|
|
|
// Spinner! var qreply_spinner = $('#quickreply_spinner'); qreply_spinner.show();
|
// Spinner! var qreply_spinner = $('#quickreply_spinner'); qreply_spinner.show();
|
|
|
$.ajax( { url: 'newreply.php?ajax=1',
| $.ajax( { url: 'newreply.php?ajax=1',
|
Zeile 327 | Zeile 330 |
---|
complete: function (request, status) { Thread.quickReplyDone(request, status);
|
complete: function (request, status) { Thread.quickReplyDone(request, status);
|
|
|
// Get rid of spinner qreply_spinner.hide(); }
| // Get rid of spinner qreply_spinner.hide(); }
|
Zeile 342 | Zeile 345 |
---|
var json = $.parseJSON(request.responseText); if(typeof json == 'object')
|
var json = $.parseJSON(request.responseText); if(typeof json == 'object')
|
{
| {
|
if(json.hasOwnProperty("errors")) { $(".jGrowl").jGrowl("close");
| if(json.hasOwnProperty("errors")) { $(".jGrowl").jGrowl("close");
|
Zeile 356 | Zeile 359 |
---|
}
if($('#captcha_trow').length)
|
}
if($('#captcha_trow').length)
|
{
| {
|
cap = json.data.match(/^<captcha>([0-9a-zA-Z]+)(\|([0-9a-zA-Z]+)|)<\/captcha>/); if(cap) { json.data = json.data.replace(/^<captcha>(.*)<\/captcha>/, '');
|
cap = json.data.match(/^<captcha>([0-9a-zA-Z]+)(\|([0-9a-zA-Z]+)|)<\/captcha>/); if(cap) { json.data = json.data.replace(/^<captcha>(.*)<\/captcha>/, '');
|
if(cap[1] == "reload") { Recaptcha.reload(); } else if($("#captcha_img").length)
| if($("#captcha_img").length)
|
{ if(cap[1]) {
| { if(cap[1]) {
|
Zeile 388 | Zeile 387 |
---|
} } }
|
} } }
|
|
|
if(json.hasOwnProperty("errors")) return false;
| if(json.hasOwnProperty("errors")) return false;
|
Zeile 398 | Zeile 397 |
---|
var post = document.createElement("div");
$('#posts').append(json.data);
|
var post = document.createElement("div");
$('#posts').append(json.data);
|
|
|
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);
|
|
|
Thread.quickEdit("#pid_" + pid);
// Eval javascript
| Thread.quickEdit("#pid_" + pid);
// Eval javascript
|
Zeile 431 | Zeile 430 |
---|
showIgnoredPost: function(pid) { $('#ignored_post_'+pid).slideToggle("slow");
|
showIgnoredPost: function(pid) { $('#ignored_post_'+pid).slideToggle("slow");
|
| $('#post_'+pid).slideToggle("slow"); },
showDeletedPost: function(pid) { $('#deleted_post_'+pid).slideToggle("slow");
|
$('#post_'+pid).slideToggle("slow"); },
| $('#post_'+pid).slideToggle("slow"); },
|
Zeile 472 | Zeile 477 |
---|
$.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");
|
|
|
$.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
|
{ // deleted thread --> redirect
|
if(!json.hasOwnProperty("url"))
| if(!json.hasOwnProperty("url"))
|
{ $.jGrowl(lang.unknown_error, {theme:'jgrowl_error'}); }
|
{ $.jGrowl(lang.unknown_error, {theme:'jgrowl_error'}); }
|
|
|
// set timeout for redirect
|
// set timeout for redirect
|
window.setTimeout(function()
| window.setTimeout(function()
|
{ 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'}); } } }); } }
| } else { $.jGrowl(lang.unknown_error, {theme:'jgrowl_error'}); } } }); } }
|
});
|
});
|
|
|
return false; },
| return false; },
|
Zeile 528 | Zeile 533 |
---|
{ var json = $.parseJSON(request.responseText); if(json.hasOwnProperty("errors"))
|
{ var json = $.parseJSON(request.responseText); if(json.hasOwnProperty("errors"))
|
{
| {
|
$.each(json.errors, function(i, message) { $.jGrowl(lang.quick_restore_error + ' ' + message, {theme:'jgrowl_error'});
| $.each(json.errors, function(i, message) { $.jGrowl(lang.quick_restore_error + ' ' + message, {theme:'jgrowl_error'});
|
Zeile 553 | Zeile 558 |
---|
} } });
|
} } });
|
|
|
return false; },
| return false; },
|