Vergleich jscripts/thread.js - 1.2.0 - 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 161Zeile 183
		{
return false;
}

		{
return false;
}

		if(Thread.qeCache[pid])
{
return false;
}

		if(Thread.qeCache[pid])
{
return false;
}

		Thread.qeCache[pid] = $("pid_"+pid).innerHTML;
this.spinner = new ActivityIndicator("body", {image: "images/spinner_big.gif"});

		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); }});

		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.";
}






	{
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]);

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

		}


			Thread.qeCache[pid] = "";
}

		else if(request.responseText)

		else if(request.responseText)

		{

		{

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

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

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









			element = $("quickedit_"+pid);
element.focus();
offsetTop = -60;
do
{
offsetTop += element.offsetTop || 0;
element = element.offsetParent;
}
while(element);

scrollTo(0, offsetTop);
}
if(this.spinner)

		{

		{

			offsetTop += element.offsetTop || 0;
element = element.offsetParent;
} while(element);

scrollTo(0, offsetTop);

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

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






	},

quickEditSave: function(pid)

	},

quickEditSave: function(pid)

Zeile 211Zeile 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 233Zeile 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);