Vergleich jscripts/thread.js - 1.8.20 - 1.8.38

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 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 23Zeile 45
				if(mquote_a.length)
{
mquote_a.removeClass('postbit_multiquote').addClass('postbit_multiquote_on');

				if(mquote_a.length)
{
mquote_a.removeClass('postbit_multiquote').addClass('postbit_multiquote_on');

				}

				}

			});

var mquote_quick = $('#quickreply_multiquote');

			});

var mquote_quick = $('#quickreply_multiquote');

Zeile 50Zeile 72
		if(quoted && !deleted)
{
var post_ids = quoted.split("|");

		if(quoted && !deleted)
{
var post_ids = quoted.split("|");





			$.each(post_ids, function(key, post_id) {
if(post_id != pid && post_id != '')
{

			$.each(post_ids, function(key, post_id) {
if(post_id != pid && post_id != '')
{

Zeile 68Zeile 90
		{
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');

Zeile 76Zeile 98

var mquote_quick = $('#quickreply_multiquote');
if(mquote_quick.length)


var mquote_quick = $('#quickreply_multiquote');
if(mquote_quick.length)

		{

		{

			if(new_post_ids.length)

			if(new_post_ids.length)

			{

			{

				mquote_quick.show();

				mquote_quick.show();

			}

			}

			else
{
mquote_quick.hide();

			else
{
mquote_quick.hide();

			}
}

			}
}

		Cookie.set("multiquote", new_post_ids.join("|"));
},


		Cookie.set("multiquote", new_post_ids.join("|"));
},


Zeile 111Zeile 133
			});

return false;

			});

return false;

		}
else

		}
else

		{
return true;
}

		{
return true;
}

Zeile 120Zeile 142

multiQuotedLoaded: function(request)
{


multiQuotedLoaded: function(request)
{

		var json = $.parseJSON(request.responseText);

		var json = JSON.parse(request.responseText);

		if(typeof json == 'object')

		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 130Zeile 152
					$.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 MyBBEditor !== 'undefined' && MyBBEditor !== null)

		{

		{

			$('textarea').sceditor('instance').insert(json.message);

			MyBBEditor.insert(json.message);

		}
else
{

		}
else
{

Zeile 150Zeile 172
		Thread.clearMultiQuoted();
$('#quickreply_multiquote').hide();
$('#quoted_ids').val('all');

		Thread.clearMultiQuoted();
$('#quickreply_multiquote').hide();
$('#quoted_ids').val('all');


$('#message').focus();


$('#message').trigger('focus');

	},

clearMultiQuoted: function()

	},

clearMultiQuoted: function()

Zeile 159Zeile 181
		$('#quickreply_multiquote').hide();
var quoted = Cookie.get("multiquote");
if(quoted)

		$('#quickreply_multiquote').hide();
var quoted = Cookie.get("multiquote");
if(quoted)

		{

		{

			var post_ids = quoted.split("|");

$.each(post_ids, function(key, post_id) {

			var post_ids = quoted.split("|");

$.each(post_ids, function(key, post_id) {

Zeile 191Zeile 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 208Zeile 231
					id = $(this).attr('id');
pid = id.replace( /[^\d.]/g, '');


					id = $(this).attr('id');
pid = id.replace( /[^\d.]/g, '');


					var json = $.parseJSON(values);

					var json = JSON.parse(values);

					if(typeof json == 'object')
{
if(json.hasOwnProperty("errors"))

					if(typeof json == 'object')
{
if(json.hasOwnProperty("errors"))

						{
$(".jGrowl").jGrowl("close");

						{
$(".jGrowl").jGrowl("close");


$.each(json.errors, function(i, message)
{


$.each(json.errors, function(i, message)
{

Zeile 222Zeile 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 311Zeile 334
		if($('#quick_reply_form').length && use_xmlhttprequest == 1)
{
// Bind closing event to our popup menu

		if($('#quick_reply_form').length && use_xmlhttprequest == 1)
{
// Bind closing event to our popup menu

			$('#quick_reply_submit').bind('click', function(e) {

			$('#quick_reply_submit').on('click', function(e) {

				return Thread.quickReply(e);
});
}

				return Thread.quickReply(e);
});
}

Zeile 355Zeile 378
	{
this.quick_replying = 0;


	{
this.quick_replying = 0;


		var json = $.parseJSON(request.responseText);

		var json = JSON.parse(request.responseText);

		if(typeof json == 'object')
{
if(json.hasOwnProperty("errors"))

		if(typeof json == 'object')
{
if(json.hasOwnProperty("errors"))

Zeile 410Zeile 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 437Zeile 463
		}

$(".jGrowl").jGrowl("close");

		}

$(".jGrowl").jGrowl("close");

	},

	},


showIgnoredPost: function(pid)
{


showIgnoredPost: function(pid)
{

Zeile 467Zeile 493
						type: 'post',
complete: function (request, status)
{

						type: 'post',
complete: function (request, status)
{

							var json = $.parseJSON(request.responseText);

							var json = JSON.parse(request.responseText);

							if(json.hasOwnProperty("errors"))
{
$.each(json.errors, function(i, message)

							if(json.hasOwnProperty("errors"))
{
$.each(json.errors, function(i, message)

Zeile 487Zeile 513
										$("#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'});
}

									$.jGrowl(lang.quick_delete_success, {theme:'jgrowl_success'});
}


								else if(json.data == 2)
{
// Actually deleted
$('#post_'+pid).slideToggle("slow");


								else if(json.data == 2)
{
// 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


								{
// deleted thread --> redirect


Zeile 546Zeile 575
						type: 'post',
complete: function (request, status)
{

						type: 'post',
complete: function (request, status)
{

							var json = $.parseJSON(request.responseText);

							var json = JSON.parse(request.responseText);

							if(json.hasOwnProperty("errors"))
{
$.each(json.errors, function(i, message)

							if(json.hasOwnProperty("errors"))
{
$.each(json.errors, function(i, message)

Zeile 561Zeile 590
								if(json.first == 1)
{
$("#quick_reply_form, .thread_tools, .new_reply_button, .inline_rating").show();

								if(json.first == 1)
{
$("#quick_reply_form, .thread_tools, .new_reply_button, .inline_rating").show();

									$("#moderator_options_selector option.option_mirage").removeAttr("disabled");

									$("#moderator_options_selector option.option_mirage").prop("disabled", false);

									$("#moderator_options_selector option[value='restorethread']").val("softdeletethread").text(lang.softdelete_thread);

									$("#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 583Zeile 613
	viewNotes: function(tid)
{
MyBB.popupWindow("/moderation.php?action=viewthreadnotes&tid="+tid+"&modal=1");

	viewNotes: function(tid)
{
MyBB.popupWindow("/moderation.php?action=viewthreadnotes&tid="+tid+"&modal=1");

 
	},

splitToolHandler: function()
{
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");
}
}

	}
};


	}
};