Zeile 89 | Zeile 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]); }
|
Zeile 96 | Zeile 101 |
---|
{ var id = 'message'; if(typeof clickableEditor != 'undefined')
|
{ var id = 'message'; if(typeof clickableEditor != 'undefined')
|
{
| {
|
id = clickableEditor.textarea;
|
id = clickableEditor.textarea;
|
}
| }
|
if($(id).value) { $(id).value += "\n";
| if($(id).value) { $(id).value += "\n";
|
Zeile 108 | Zeile 113 |
---|
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 143 | Zeile 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"); input.setAttribute("type", "hidden"); input.setAttribute("value", pid);
|
var input = document.createElement("input"); input.setAttribute("name", "pid"); input.setAttribute("type", "hidden"); input.setAttribute("value", pid);
|
|
|
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) {
|
Zeile 163 | Zeile 180 |
---|
quickEdit: function(pid) { if(!$("pid_"+pid))
|
quickEdit: function(pid) { if(!$("pid_"+pid))
|
{ return false; } if(Thread.qeCache[pid]) {
| {
|
return false;
|
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."; } alert('There was an error performing the update.\n\n'+message[1]); Thread.qeCache[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) { 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;
| else if(request.responseText) { $("pid_"+pid).innerHTML = request.responseText;
|
Zeile 203 | Zeile 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)
|
{
| {
|
message = $("quickedit_"+pid).value; if(message == "")
|
message = $("quickedit_"+pid).value; if(message == "")
|
{
| {
|
return false;
|
return false;
|
}
| }
|
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) { $("pid_"+pid).innerHTML = Thread.qeCache[pid]; Thread.qeCache[pid] = "";
|
}, quickEditCancel: function(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 237 | Zeile 262 |
---|
{ message = request.responseText.match(/<error>(.*)<\/error>/); if(!message[1])
|
{ message = request.responseText.match(/<error>(.*)<\/error>/); if(!message[1])
|
{
| {
|
message[1] = "An unknown error occurred.";
|
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]); } else if(request.responseText) { $("pid_"+pid).innerHTML = request.responseText;
|
} alert('There was an error performing the update.\n\n'+message[1]); } else if(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);
|