Vergleich jscripts/thread.js - 1.8.0 - 1.8.10

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 20Zeile 20

$.each(post_ids, function(key, value) {
var mquote_a = $("#multiquote_"+value).closest('a');


$.each(post_ids, function(key, value) {
var mquote_a = $("#multiquote_"+value).closest('a');

				if(mquote_a)

				if(mquote_a.length)

				{
mquote_a.removeClass('postbit_multiquote').addClass('postbit_multiquote_on');
}
});

var mquote_quick = $('#quickreply_multiquote');

				{
mquote_a.removeClass('postbit_multiquote').addClass('postbit_multiquote_on');
}
});

var mquote_quick = $('#quickreply_multiquote');

			if(mquote_quick)

			if(mquote_quick.length)

			{
mquote_quick.show();
}

			{
mquote_quick.show();
}

Zeile 68Zeile 68
		}

var mquote_quick = $('#quickreply_multiquote');

		}

var mquote_quick = $('#quickreply_multiquote');

		if(mquote_quick)

		if(mquote_quick.length)

		{

		{

			if(new_post_ids.length > 0)

			if(new_post_ids.length)

			{
mquote_quick.show();
}

			{
mquote_quick.show();
}

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

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

					$.jGrowl(lang.post_fetch_error + ' ' + message);

					$.jGrowl(lang.post_fetch_error + ' ' + message, {theme:'jgrowl_error'});

				});
return false;
}

				});
return false;
}

Zeile 157Zeile 157

$.each(post_ids, function(key, post_id) {
var mquote_a = $("#multiquote_"+post_id).closest('a');


$.each(post_ids, function(key, post_id) {
var mquote_a = $("#multiquote_"+post_id).closest('a');

				if(mquote_a)

				if(mquote_a.length)

				{
mquote_a.removeClass('postbit_multiquote_on').addClass('postbit_multiquote');
}

				{
mquote_a.removeClass('postbit_multiquote_on').addClass('postbit_multiquote');
}

Zeile 168Zeile 168

quickEdit: function(el)
{


quickEdit: function(el)
{

		if(!el) el = '.post_body';

		if(typeof el === 'undefined' || !el.length) el = '.post_body';


$(el).each(function()
{


$(el).each(function()
{

Zeile 209Zeile 209

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


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

								$.jGrowl(lang.quick_edit_update_error + ' ' + message);

								$.jGrowl(lang.quick_edit_update_error + ' ' + message, {theme:'jgrowl_error'});

							});
$(this).html($('#pid_' + pid + '_temp').html());
}

							});
$(this).html($('#pid_' + pid + '_temp').html());
}

Zeile 227Zeile 227
							}
else
{

							}
else
{

								$.jGrowl(json.moderation_post);

								$.jGrowl(json.moderation_post, {theme:'jgrowl_success'});

								$('#post_' + pid).slideToggle();
}
}

								$('#post_' + pid).slideToggle();
}
}

Zeile 262Zeile 262

$('.quick_edit_button').each(function()
{


$('.quick_edit_button').each(function()
{

			$(this).bind("click", function(e)

			$(this).on("click", function(e)

			{
e.preventDefault();


			{
e.preventDefault();


Zeile 273Zeile 273
				// Create a copy of the post
if($('#pid_' + pid + '_temp').length == 0)
{

				// Create a copy of the post
if($('#pid_' + pid + '_temp').length == 0)
{

					$('#pid_' + pid).clone().attr('id','pid_' + pid + '_temp').css('display','none').appendTo("body");

					$('#pid_' + pid).clone().attr('id','pid_' + pid + '_temp').appendTo("body").hide();

				}

// Trigger the edit event

				}

// Trigger the edit event

Zeile 293Zeile 293

initQuickReply: function()
{


initQuickReply: function()
{

		if($('#quick_reply_form') && use_xmlhttprequest == 1)

		if($('#quick_reply_form').length && use_xmlhttprequest == 1)

		{
// Bind closing event to our popup menu
$('#quick_reply_submit').bind('click', function(e) {

		{
// Bind closing event to our popup menu
$('#quick_reply_submit').bind('click', function(e) {

Zeile 349Zeile 349

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


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

					$.jGrowl(lang.quick_reply_post_error + ' ' + message);

					$.jGrowl(lang.quick_reply_post_error + ' ' + message, {theme:'jgrowl_error'});

				});

				});

 
				$('#quickreply_spinner').hide();

			}
}


			}
}


		if($('#captcha_trow'))

		if($('#captcha_trow').length)

		{
cap = json.data.match(/^<captcha>([0-9a-zA-Z]+)(\|([0-9a-zA-Z]+)|)<\/captcha>/);
if(cap)

		{
cap = json.data.match(/^<captcha>([0-9a-zA-Z]+)(\|([0-9a-zA-Z]+)|)<\/captcha>/);
if(cap)

Zeile 365Zeile 366
				{
Recaptcha.reload();
}

				{
Recaptcha.reload();
}

				else if($("#captcha_img"))

				else if($("#captcha_img").length)

				{
if(cap[1])
{

				{
if(cap[1])
{

Zeile 375Zeile 376
						{
$('#imagestring').attr('type', 'hidden').val(cap[3]);
// hide the captcha

						{
$('#imagestring').attr('type', 'hidden').val(cap[3]);
// hide the captcha

							$('#captcha_trow').css('display', 'none');

							$('#captcha_trow').hide();

						}
else
{
$('#captcha_img').attr('src', "captcha.php?action=regimage&imagehash="+imghash);
$('#imagestring').attr('type', 'text').val('');

						}
else
{
$('#captcha_img').attr('src', "captcha.php?action=regimage&imagehash="+imghash);
$('#imagestring').attr('type', 'text').val('');

							$('#captcha_trow').css('display', '');

							$('#captcha_trow').show();

						}
}
}

						}
}
}

Zeile 403Zeile 404
				
Thread.quickEdit("#pid_" + pid);


				
Thread.quickEdit("#pid_" + pid);


			/*if(MyBB.browser == "ie" || MyBB.browser == "opera" || MyBB.browser == "safari" || MyBB.browser == "chrome")
{*/
// Eval javascript
$(json.data).filter("script").each(function(e) {
eval($(this).text());
});
//}

			// Eval javascript
$(json.data).filter("script").each(function(e) {
eval($(this).text());
});





$('#quick_reply_form')[0].reset();

var lastpid = $('#lastpid');


$('#quick_reply_form')[0].reset();

var lastpid = $('#lastpid');

			if(lastpid)

			if(lastpid.length)

			{
lastpid.val(pid);
}

			{
lastpid.val(pid);
}

		}

		}

		else
{
// Eval javascript

		else
{
// Eval javascript

Zeile 432Zeile 430

showIgnoredPost: function(pid)
{


showIgnoredPost: function(pid)
{

		$('#ignored_post_'+pid).slideToggle("slow");







		$('#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 457Zeile 461
							{
$.each(json.errors, function(i, message)
{

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

									$.jGrowl(lang.quick_delete_error + ' ' + message);

									$.jGrowl(lang.quick_delete_error + ' ' + message, {theme:'jgrowl_error'});

								});
}
else if(json.hasOwnProperty("data"))

								});
}
else if(json.hasOwnProperty("data"))

Zeile 466Zeile 470
								if(json.data == 1)
{
// Change CSS class of div 'post_[pid]'

								if(json.data == 1)
{
// Change CSS class of div 'post_[pid]'

									$("#post_"+pid).addClass("unapproved_post").addClass("deleted_post");

									$("#post_"+pid).addClass("unapproved_post deleted_post");


$("#quick_delete_" + pid).hide();
$("#quick_restore_" + pid).show();



$("#quick_delete_" + pid).hide();
$("#quick_restore_" + pid).show();


									$.jGrowl(lang.quick_delete_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");


									$.jGrowl(lang.quick_delete_success);

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

								} else if(json.data == 3) 
{
// deleted thread --> redirect

if(!json.hasOwnProperty("url"))
{

								} else if(json.data == 3) 
{
// deleted thread --> redirect

if(!json.hasOwnProperty("url"))
{

										$.jGrowl(lang.unknown_error);

										$.jGrowl(lang.unknown_error, {theme:'jgrowl_error'});

									}

// set timeout for redirect

									}

// set timeout for redirect

Zeile 495Zeile 499
									}, 3000);

// print success message

									}, 3000);

// print success message

									$.jGrowl(lang.quick_delete_thread_success);

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

								}
}
else
{

								}
}
else
{

								$.jGrowl(lang.unknown_error);

								$.jGrowl(lang.unknown_error, {theme:'jgrowl_error'});

							}
}
});

							}
}
});

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

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

									$.jGrowl(lang.quick_restore_error + ' ' + message);

									$.jGrowl(lang.quick_restore_error + ' ' + message, {theme:'jgrowl_error'});

								});
}
else if(json.hasOwnProperty("data"))
{
// Change CSS class of div 'post_[pid]'

								});
}
else if(json.hasOwnProperty("data"))
{
// Change CSS class of div 'post_[pid]'

								$("#post_"+pid).removeClass("unapproved_post").removeClass("deleted_post");

								$("#post_"+pid).removeClass("unapproved_post deleted_post");


$("#quick_delete_" + pid).show();
$("#quick_restore_" + pid).hide();



$("#quick_delete_" + pid).show();
$("#quick_restore_" + pid).hide();


								$.jGrowl(lang.quick_restore_success);

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

							}
else
{

							}
else
{

								$.jGrowl(lang.unknown_error);

								$.jGrowl(lang.unknown_error, {theme:'jgrowl_error'});

							}
}
});

							}
}
});

Zeile 561Zeile 565

viewNotes: function(tid)
{


viewNotes: function(tid)
{

		MyBB.popupWindow("/moderation.php?action=viewthreadnotes&tid="+tid);

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

	}
};


	}
};