Vergleich jscripts/thread.js - 1.6.2 - 1.6.12

  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)

	{

	{

		confirmReturn = confirm(quickdelete_confirm);
if(confirmReturn == true)
{

		confirmReturn = confirm(quickdelete_confirm);
if(confirmReturn == true)
{

			form = document.createElement("form");
form.setAttribute("method", "post");
form.setAttribute("action", "editpost.php?action=deletepost&delete=1");
form.setAttribute("style", "display: none;");

			var form = new Element("form", { method: "post", action: "editpost.php?action=deletepost&delete=1", style: "display: none;" });





if(my_post_key)
{


if(my_post_key)
{

				if(MyBB.browser == "ie")
{
var input = document.createElement("<input name=\"my_post_key\">");
}
else
{
var input = document.createElement("input");
input.setAttribute("name", "my_post_key");
}
input.setAttribute("type", "hidden");
input.setAttribute("value", my_post_key);
form.appendChild(input);
}

if(MyBB.browser == "ie")
{
var input = document.createElement("<input name=\"pid\">");
}
else
{
var input = document.createElement("input");
input.setAttribute("name", "pid");

				form.insert({ bottom: new Element("input",
{
name: "my_post_key",
type: "hidden",
value: my_post_key
})
});
















			}

			}

			input.setAttribute("type", "hidden");
input.setAttribute("value", pid);

form.appendChild(input);
document.getElementsByTagName("body")[0].appendChild(form);
form.submit();







form.insert({ bottom: new Element("input",
{
name: "pid",
type: "hidden",
value: pid
})
});

$$("body")[0].insert({ bottom: form });
form.submit();

		}

		}

	},


	},


	reportPost: function(pid)
{
MyBB.popupWindow("report.php?pid="+pid, "reportPost", 400, 300)
},

quickEdit: function(pid)

	reportPost: function(pid)
{
MyBB.popupWindow("report.php?pid="+pid, "reportPost", 400, 300)
},

quickEdit: function(pid)

	{

	{

		if(!$("pid_"+pid))

		if(!$("pid_"+pid))

		{
return false;
}

		{
return false;
}


if(Thread.qeCache[pid])
{


if(Thread.qeCache[pid])
{

Zeile 210Zeile 197
	},

quickEditLoaded: function(request, pid)

	},

quickEditLoaded: function(request, pid)

	{
if(request.responseText.match(/<error>(.*)<\/error>/))
{
message = request.responseText.match(/<error>(.*)<\/error>/);
if(!message[1])
{
message[1] = "An unknown error occurred.";
}
if(this.spinner)
{

	{
if(request.responseText.match(/<error>(.*)<\/error>/))
{
message = request.responseText.match(/<error>(.*)<\/error>/);
if(!message[1])
{
message[1] = "An unknown error occurred.";
}
if(this.spinner)
{

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

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

Zeile 240Zeile 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)
{
message = $("quickedit_"+pid).value;

	quickEditSave: function(pid)
{
message = $("quickedit_"+pid).value;

Zeile 256Zeile 243
			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 304Zeile 291
			$("pid_"+pid).innerHTML = message;
Thread.qeCache[pid] = "";
}

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

		



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

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

Zeile 338Zeile 325

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 387Zeile 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 403Zeile 391
		}
else
{

		}
else
{

			request.responseText.evalScripts(); 

			request.responseText.evalScripts();

		}

		}

		



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

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