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 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)
|
{
| {
|
new_post_ids[new_post_ids.length] = pid; mquote_a.removeClass('postbit_multiquote').addClass('postbit_multiquote_on');
|
new_post_ids[new_post_ids.length] = pid; mquote_a.removeClass('postbit_multiquote').addClass('postbit_multiquote_on');
|
}
| }
|
else { mquote_a.removeClass('postbit_multiquote_on').addClass('postbit_multiquote'); }
|
else { mquote_a.removeClass('postbit_multiquote_on').addClass('postbit_multiquote'); }
|
|
|
var mquote_quick = $('#quickreply_multiquote'); if(mquote_quick.length) {
| var mquote_quick = $('#quickreply_multiquote'); if(mquote_quick.length) {
|
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 108 | Zeile 108 |
---|
else { return true;
|
else { return true;
|
}
| }
|
},
multiQuotedLoaded: function(request)
| },
multiQuotedLoaded: function(request)
|
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') { $('textarea').sceditor('instance').insert(json.message);
| if(typeof $('textarea').sceditor != 'undefined') { $('textarea').sceditor('instance').insert(json.message);
|
Zeile 141 | Zeile 141 |
---|
}
Thread.clearMultiQuoted();
|
}
Thread.clearMultiQuoted();
|
$('#quickreply_multiquote').hide();
| $('#quickreply_multiquote').hide();
|
$('#quoted_ids').val('all');
$('#message').focus();
| $('#quoted_ids').val('all');
$('#message').focus();
|
Zeile 191 | Zeile 191 |
---|
{ id = $(this).attr('id'); pid = id.replace( /[^\d.]/g, '');
|
{ id = $(this).attr('id'); 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') {
| var json = $.parseJSON(values); if(typeof json == 'object') {
|
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 $(this).html(json.message); $('#edited_by_' + pid).html(json.editedmsg); }
|
else { // Change html content $(this).html(json.message); $('#edited_by_' + pid).html(json.editedmsg); }
|
}
| }
|
else { // Change html content
| else { // Change html content
|
Zeile 278 | Zeile 279 |
---|
// Trigger the edit event $('#pid_' + pid).trigger("edit" + pid);
|
// Trigger the edit event $('#pid_' + pid).trigger("edit" + pid);
|
|
|
// Edit Reason $('#pid_' + pid + ' textarea').attr('id', 'quickedit_' + pid); if(allowEditReason == 1 && $('#quickedit_' + pid + '_editreason').length == 0) {
|
// Edit Reason $('#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();
|
} }); });
|
} }); });
|
return false;
| return false;
|
},
initQuickReply: function()
| },
initQuickReply: function()
|
Zeile 305 | Zeile 308 |
---|
quickReply: function(e) { e.stopPropagation();
|
quickReply: function(e) { e.stopPropagation();
|
|
|
if(this.quick_replying) { return false; }
|
if(this.quick_replying) { return false; }
|
|
|
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();
|
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(); } });
|
|
|
return false; },
| return false; },
|
Zeile 348 | Zeile 351 |
---|
$(".jGrowl").jGrowl("close");
$.each(json.errors, function(i, message)
|
$(".jGrowl").jGrowl("close");
$.each(json.errors, function(i, message)
|
{
| {
|
$.jGrowl(lang.quick_reply_post_error + ' ' + message, {theme:'jgrowl_error'}); }); $('#quickreply_spinner').hide();
| $.jGrowl(lang.quick_reply_post_error + ' ' + message, {theme:'jgrowl_error'}); }); $('#quickreply_spinner').hide();
|
Zeile 361 | Zeile 364 |
---|
if(cap) { json.data = json.data.replace(/^<captcha>(.*)<\/captcha>/, '');
|
if(cap) { json.data = json.data.replace(/^<captcha>(.*)<\/captcha>/, '');
|
|
|
if(cap[1] == "reload") { Recaptcha.reload();
| if(cap[1] == "reload") { Recaptcha.reload();
|
Zeile 373 | Zeile 376 |
---|
imghash = cap[1]; $('#imagehash').val(imghash); if(cap[3])
|
imghash = cap[1]; $('#imagehash').val(imghash); if(cap[3])
|
{
| {
|
$('#imagestring').attr('type', 'hidden').val(cap[3]); // hide the captcha $('#captcha_trow').hide();
| $('#imagestring').attr('type', 'hidden').val(cap[3]); // hide the captcha $('#captcha_trow').hide();
|
Zeile 388 | Zeile 391 |
---|
} } }
|
} } }
|
|
|
if(json.hasOwnProperty("errors")) return false;
| if(json.hasOwnProperty("errors")) return false;
|
Zeile 398 | Zeile 401 |
---|
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 481 | Zeile 484 |
---|
{ // 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 534 | Zeile 537 |
---|
{ 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 559 | Zeile 562 |
---|
} } });
|
} } });
|
|
|
return false; },
| return false; },
|