Vergleich jscripts/thread.js - 1.2.1 - 1.2.13

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 89Zeile 89
			if(!message[1])
{
message[1] = "An unknown error occurred.";

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

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

			}
alert('There was an error fetching the posts.\n\n'+message[1]);

			}
alert('There was an error fetching the posts.\n\n'+message[1]);

		}

		}

		else if(request.responseText)

		else if(request.responseText)

		{
if($('message').value)






		{
var id = 'message';
if(typeof clickableEditor != 'undefined')
{
id = clickableEditor.textarea;
}
if($(id).value)

			{

			{

				$('message').value += "\n";

				$(id).value += "\n";

			}

			}

			$('message').value += request.responseText;
}

			$(id).value += request.responseText;
}

		Thread.clearMultiQuoted();
$('quickreply_multiquote').style.display = 'none';
document.input.quoted_ids.value = 'all';

		Thread.clearMultiQuoted();
$('quickreply_multiquote').style.display = 'none';
document.input.quoted_ids.value = 'all';

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




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

		$('message').focus();	
},


		$('message').focus();	
},


Zeile 138Zeile 151
			form.setAttribute("method", "post");
form.setAttribute("action", "editpost.php?action=deletepost&delete=yes");
form.setAttribute("style", "display: none;");

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

 
			
if(my_post_key)
{
var input = document.createElement("input");
input.setAttribute("name", "my_post_key");
input.setAttribute("type", "hidden");
input.setAttribute("value", my_post_key);
form.appendChild(input);
}


var input = document.createElement("input");
input.setAttribute("name", "pid");


var input = document.createElement("input");
input.setAttribute("name", "pid");

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

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

		}
},

		}
},

	
reportPost: function(pid)

	
reportPost: function(pid)

	{

	{

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

quickEdit: function(pid)
{
if(!$("pid_"+pid))

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

quickEdit: function(pid)
{
if(!$("pid_"+pid))

		{
return false;
}

		{
return false;
}

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

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

		this.spinner = new ActivityIndicator("body", {image: "images/spinner_big.gif"});
new ajax('xmlhttp.php?action=edit_post&do=get_post&pid='+pid, {method: 'get', onComplete: function(request) { Thread.quickEditLoaded(request, pid); }});

		this.spinner = new ActivityIndicator("body", {image: "images/spinner_big.gif"});
new ajax('xmlhttp.php?action=edit_post&do=get_post&pid='+pid+'&my_post_key='+my_post_key, {method: 'get', onComplete: function(request) { Thread.quickEditLoaded(request, pid); }});

		return false;
},

quickEditLoaded: function(request, pid)

		return false;
},

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.";
}
alert('There was an error performing the update.\n\n'+message[1]);
Thread.qeCache[pid] = "";
}
else if(request.responseText)
{
$("pid_"+pid).innerHTML = request.responseText;






	{
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 = '';
}
alert('There was an error performing the update.\n\n'+message[1]);
Thread.qeCache[pid] = "";
}
else if(request.responseText)
{
$("pid_"+pid).innerHTML = request.responseText;

			element = $("quickedit_"+pid);
element.focus();
offsetTop = -60;

			element = $("quickedit_"+pid);
element.focus();
offsetTop = -60;

Zeile 198Zeile 225

scrollTo(0, offsetTop);
}


scrollTo(0, offsetTop);
}

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




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

	},

quickEditSave: function(pid)

	},

quickEditSave: function(pid)

Zeile 212Zeile 242
		this.spinner = new ActivityIndicator("body", {image: "images/spinner_big.gif"});

postData = "value="+encodeURIComponent(message).replace(/\+/g, "%2B");

		this.spinner = new ActivityIndicator("body", {image: "images/spinner_big.gif"});

postData = "value="+encodeURIComponent(message).replace(/\+/g, "%2B");

		new ajax('xmlhttp.php?action=edit_post&do=update_post&pid='+pid, {method: 'post', postBody: postData, onComplete: function(request) { Thread.quickEditSaved(request, pid); }});		

		new ajax('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); }});		

	},

quickEditCancel: function(pid)

	},

quickEditCancel: function(pid)

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

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

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

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

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

		}

		}

		else if(request.responseText)

		else if(request.responseText)

		{

		{

			$("pid_"+pid).innerHTML = request.responseText;

			$("pid_"+pid).innerHTML = request.responseText;

 
			Thread.qeCache[pid] = "";
}
if(this.spinner)
{
this.spinner.destroy();
this.spinner = '';

		}

		}

		Thread.qeCache[pid] = "";
this.spinner.destroy();
this.spinner = '';

 
	}
}
Event.observe(window, 'load', Thread.init);

	}
}
Event.observe(window, 'load', Thread.init);