Vergleich jscripts/thread.js - 1.6.4 - 1.6.17

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 121Zeile 121
			this.spinner.destroy();
this.spinner = '';
}

			this.spinner.destroy();
this.spinner = '';
}

		$('message').focus();	

		$('message').focus();

	},

clearMultiQuoted: function()

	},

clearMultiQuoted: function()

Zeile 140Zeile 140
			});
}
Cookie.unset('multiquote');

			});
}
Cookie.unset('multiquote');

	},	

	},


deletePost: function(pid)
{


deletePost: function(pid)
{

Zeile 197Zeile 197
	},

quickEditLoaded: function(request, pid)

	},

quickEditLoaded: function(request, pid)

	{
if(request.responseText.match(/<error>(.*)<\/error>/))

	{
if(request.responseText.match(/<error>(.*)<\/error>/))

		{
message = request.responseText.match(/<error>(.*)<\/error>/);
if(!message[1])

		{
message = request.responseText.match(/<error>(.*)<\/error>/);
if(!message[1])

			{

			{

				message[1] = "An unknown error occurred.";
}
if(this.spinner)

				message[1] = "An unknown error occurred.";
}
if(this.spinner)

			{

			{

				this.spinner.destroy();
this.spinner = '';

				this.spinner.destroy();
this.spinner = '';

			}

			}

			alert('There was an error performing the update.\n\n'+message[1]);
Thread.qeCache[pid] = "";
}

			alert('There was an error performing the update.\n\n'+message[1]);
Thread.qeCache[pid] = "";
}

Zeile 227Zeile 227
			while(element);

scrollTo(0, offsetTop);

			while(element);

scrollTo(0, offsetTop);

		}
if(this.spinner)
{
this.spinner.destroy();
this.spinner = '';
}
},

		}
if(this.spinner)
{
this.spinner.destroy();
this.spinner = '';
}
},


quickEditSave: function(pid)


quickEditSave: function(pid)

	{

	{

		message = $("quickedit_"+pid).value;
if(message == "")

		message = $("quickedit_"+pid).value;
if(message == "")

		{

		{

			return false;
}
this.spinner = new ActivityIndicator("body", {image: imagepath + "/spinner_big.gif"});

			return false;
}
this.spinner = new ActivityIndicator("body", {image: imagepath + "/spinner_big.gif"});

		



		postData = "value="+encodeURIComponent(message).replace(/\+/g, "%2B");
new Ajax.Request('xmlhttp.php?action=edit_post&do=update_post&pid='+pid+"&my_post_key="+my_post_key, {method: 'post', postBody: postData, onComplete: function(request) { Thread.quickEditSaved(request, pid); }});
},

		postData = "value="+encodeURIComponent(message).replace(/\+/g, "%2B");
new Ajax.Request('xmlhttp.php?action=edit_post&do=update_post&pid='+pid+"&my_post_key="+my_post_key, {method: 'post', postBody: postData, onComplete: function(request) { Thread.quickEditSaved(request, pid); }});
},

Zeile 252Zeile 252
	{
$("pid_"+pid).innerHTML = Thread.qeCache[pid];
Thread.qeCache[pid] = "";

	{
$("pid_"+pid).innerHTML = Thread.qeCache[pid];
Thread.qeCache[pid] = "";

		if(this.spinner)
{
this.spinner.destroy();
this.spinner = '';
}

		if(this.spinner)
{
this.spinner.destroy();
this.spinner = '';
}

	},

quickEditSaved: function(request, pid)

	},

quickEditSaved: function(request, pid)

Zeile 267Zeile 267
			if(!message[1])
{
message[1] = "An unknown error occurred.";

			if(!message[1])
{
message[1] = "An unknown error occurred.";

			}

			}

			if(this.spinner)
{
this.spinner.destroy();

			if(this.spinner)
{
this.spinner.destroy();

Zeile 285Zeile 285
				if($('edited_by_'+pid))
{
$('edited_by_'+pid).innerHTML = edited_message;

				if($('edited_by_'+pid))
{
$('edited_by_'+pid).innerHTML = edited_message;

				}

				}

				message = message.replace(edited_regex, '')
}
$("pid_"+pid).innerHTML = message;
Thread.qeCache[pid] = "";
}

				message = message.replace(edited_regex, '')
}
$("pid_"+pid).innerHTML = message;
Thread.qeCache[pid] = "";
}

		



		if(this.spinner)
{
this.spinner.destroy();
this.spinner = '';

		if(this.spinner)
{
this.spinner.destroy();
this.spinner = '';

		}
},

		}
},


initQuickReply: function()
{


initQuickReply: function()
{

Zeile 314Zeile 314
		if(this.quick_replying)
{
return false;

		if(this.quick_replying)
{
return false;

		}


		}


		this.quick_replying = 1;
var post_body = Form.serialize('quick_reply_form');
this.spinner = new ActivityIndicator("body", {image: imagepath + "/spinner_big.gif"});
new Ajax.Request('newreply.php?ajax=1', {method: 'post', postBody: post_body, onComplete: function(request) { Thread.quickReplyDone(request); }});
return false;
},

		this.quick_replying = 1;
var post_body = Form.serialize('quick_reply_form');
this.spinner = new ActivityIndicator("body", {image: imagepath + "/spinner_big.gif"});
new Ajax.Request('newreply.php?ajax=1', {method: 'post', postBody: post_body, onComplete: function(request) { Thread.quickReplyDone(request); }});
return false;
},





	quickReplyDone: function(request)
{

	quickReplyDone: function(request)
{

		if($('captcha_img'))

		if($('captcha_trow'))

		{
captcha = request.responseText.match(/^<captcha>([0-9a-zA-Z]+)(\|([0-9a-zA-Z]+)|)<\/captcha>/);
if(captcha)
{
request.responseText = request.responseText.replace(/^<captcha>(.*)<\/captcha>/, '');

		{
captcha = request.responseText.match(/^<captcha>([0-9a-zA-Z]+)(\|([0-9a-zA-Z]+)|)<\/captcha>/);
if(captcha)
{
request.responseText = request.responseText.replace(/^<captcha>(.*)<\/captcha>/, '');

				if(captcha[1])







if(captcha[1] == "reload")
{
Recaptcha.reload();
}
else if($("captcha_img"))

				{

				{

					imghash = captcha[1];
$('imagehash').value = imghash;
if(captcha[3])
{
$('imagestring').type = "hidden";
$('imagestring').value = captcha[3];
// hide the captcha
$('captcha_trow').style.display = "none";
}
else

					if(captcha[1])










					{

					{

						$('captcha_img').src = "captcha.php?action=regimage&imagehash="+imghash;
$('imagestring').type = "text";
$('imagestring').value = "";
$('captcha_trow').style.display = "";













						imghash = captcha[1];
$('imagehash').value = imghash;
if(captcha[3])
{
$('imagestring').type = "hidden";
$('imagestring').value = captcha[3];
// hide the captcha
$('captcha_trow').style.display = "none";
}
else
{
$('captcha_img').src = "captcha.php?action=regimage&imagehash="+imghash;
$('imagestring').type = "text";
$('imagestring').value = "";
$('captcha_trow').style.display = "";
}

					}
}
}

					}
}
}

Zeile 374Zeile 382
			var post = document.createElement("div");
post.innerHTML = request.responseText;
$('posts').appendChild(post);

			var post = document.createElement("div");
post.innerHTML = request.responseText;
$('posts').appendChild(post);

			if(MyBB.browser == "ie" || MyBB.browser == "opera" || MyBB.browser == "safari" || MyBB.browser == "chrome")
{
var scripts = request.responseText.extractScripts();
scripts.each(function(script)
{
eval(script);
});
}

			request.responseText.evalScripts();








			Form.reset('quick_reply_form');
if($('lastpid'))
{

			Form.reset('quick_reply_form');
if($('lastpid'))
{

Zeile 390Zeile 391
		}
else
{

		}
else
{

			request.responseText.evalScripts(); 

			request.responseText.evalScripts();

		}

		}

		



		if(this.spinner)
{
this.spinner.destroy();

		if(this.spinner)
{
this.spinner.destroy();