/* <pre>
Title: ReinDeel33t Scirpt
Version: 0.1.1b (15:00 10.01.2006)
Author: Łukasz "TOR" Garczewski <[email protected]>, ]
License: GFDL, GPL, CC-by (choose one ;))
Note:
en: This script was written with the invaluable help of Peter-Paul Koch's
javascript tutorials found at his homepage, QuirksMode <http://www.quirksmode.org/>.
If you like what I've done here, send him some happy thoughts. ;)
pl: Ten skrypt został napisany dzięki nieocenionej pomocy tutoriali
Petera-Paula Kocha, które znajduja sie na jego stronie domowej,
QuirksMode <http://www.quirksmode.org/>.
Jesli podoba ci sie to co tutaj stworzylem, wyslij mu troche cieplych mysli. ;)
Disclaimer:
en: This script is under heavy development. I cannot guarantee anything.
I can't even guarantee it's a script. ;) Use at your own risk.
pl: Ten skrypt jest obecnie w fazie bardzo rozwojowej. Nie gwaratunje niczego.
Nie gwarantuje nawet, ze to jest skrypt. ;) Uzywasz na wlasne ryzyko.
*/
function setupRightClickEdit() {
if (document.getElementById) {
if (document.getElementById('deleteconfirm')) {
/* FEATURE: Hardcore Mode
changing the value of del_hardcore_mode to 1 will cause the script
to automatically submit the form if needs_add_info = 0
be *sure* you know what you're doing *before* you enable this */
del_hardcore_mode = 0;
target = document.getElementById('deleteconfirm').childNodes.childNodes.firstChild;
var temp = document.createElement('TD');
target.appendChild(temp);
var workspace = target.childNodes;
workspace.setAttribute('rowspan','2');
workspace.setAttribute('style','vertical-align: top');
/* OPTIONS section start */
labels = new Array(4);
labels = 'Commons';
labels = 'BL';
labels = 'NPA';
labels = 'substub';
reasons = new Array(4);
reasons] = 'jest na Commons';
reasons] = 'brak licencji';
reasons] = 'NPA';
reasons] = 'za mało na ]';
needs_add_info = new Array(4);
needs_add_info] = 0;
needs_add_info] = 0;
needs_add_info] = 1;
needs_add_info] = 0;
/* OPTIONS section end */
for (i=0; ((i+1) <= reasons.length); i++) {
workspace.appendChild(document.createElement('A'));
workspace.childNodes.setAttribute('href','javascript:giveReason("' + labels + '")');
workspace.childNodes.appendChild(document.createTextNode(labels));
workspace.appendChild(document.createTextNode(' '));
}
}
}
}
function giveReason(msg) {
document.getElementById('wpReason').setAttribute('value',reasons);
if (needs_add_info) {
document.getElementById('wpReason').focus();
}
else {
if (del_hardcore_mode == 1) {
document.getElementById('deleteconfirm').submit();
}
else {
target.parentNode.childNodes.childNodes.childNodes.focus();
}
}
}
/* </pre> */