| [ Index ] |
PHP Cross Reference of Jalakai Designs - DokuWiki Plugins & Templates |
[Summary view] [Print] [Text view]
1 var DOKU_BASE = 'http://wiki.jalakai.co.uk/dokuwiki_0/';var alertText = 'Please enter the text you want to format.\nIt will be appended to the end of the document.';var notSavedYet = 'Unsaved changes will be lost.\nReally continue?';var reallyDel = 'Really delete selected item(s)?';LANG = {"keepopen":"Keep window open on selection","hidedetails":"Hide Details"}; 2 3 4 /* XXXXXXXXXX begin of /var/www/jalakai.co.uk/subdomains/wiki/dokuwiki_0/lib/scripts/events.js XXXXXXXXXX */ 5 6 // written by Dean Edwards, 2005 7 // with input from Tino Zijdel 8 9 // http://dean.edwards.name/weblog/2005/10/add-event/ 10 11 function addEvent(element, type, handler) { 12 // assign each event handler a unique ID 13 if (!handler.$$guid) handler.$$guid = addEvent.guid++; 14 // create a hash table of event types for the element 15 if (!element.events) element.events = {}; 16 // create a hash table of event handlers for each element/event pair 17 var handlers = element.events[type]; 18 if (!handlers) { 19 handlers = element.events[type] = {}; 20 // store the existing event handler (if there is one) 21 if (element["on" + type]) { 22 handlers[0] = element["on" + type]; 23 } 24 } 25 // store the event handler in the hash table 26 handlers[handler.$$guid] = handler; 27 // assign a global event handler to do all the work 28 element["on" + type] = handleEvent; 29 }; 30 // a counter used to create unique IDs 31 addEvent.guid = 1; 32 33 function removeEvent(element, type, handler) { 34 // delete the event handler from the hash table 35 if (element.events && element.events[type]) { 36 delete element.events[type][handler.$$guid]; 37 } 38 }; 39 40 function handleEvent(event) { 41 var returnValue = true; 42 // grab the event object (IE uses a global event object) 43 event = event || fixEvent(window.event); 44 // get a reference to the hash table of event handlers 45 var handlers = this.events[event.type]; 46 // execute each event handler 47 for (var i in handlers) { 48 this.$$handleEvent = handlers[i]; 49 if (this.$$handleEvent(event) === false) { 50 returnValue = false; 51 } 52 } 53 return returnValue; 54 }; 55 56 function fixEvent(event) { 57 // add W3C standard event methods 58 event.preventDefault = fixEvent.preventDefault; 59 event.stopPropagation = fixEvent.stopPropagation; 60 // fix target 61 event.target = event.srcElement; 62 return event; 63 }; 64 fixEvent.preventDefault = function() { 65 this.returnValue = false; 66 }; 67 fixEvent.stopPropagation = function() { 68 this.cancelBubble = true; 69 }; 70 71 72 /** 73 * Pseudo event handler to be fired after the DOM was parsed or 74 * on window load at last. 75 * 76 * @author based upon some code by Dean Edwards 77 * @author Dean Edwards 78 * @link http://dean.edwards.name/weblog/2006/06/again/ 79 */ 80 window.fireoninit = function() { 81 // quit if this function has already been called 82 if (arguments.callee.done) return; 83 // flag this function so we don't do the same thing twice 84 arguments.callee.done = true; 85 // kill the timer 86 if (_timer) { 87 clearInterval(_timer); 88 _timer = null; 89 } 90 91 if (typeof window.oninit == 'function') { 92 window.oninit(); 93 } 94 }; 95 96 /** 97 * Run the fireoninit function as soon as possible after 98 * the DOM was loaded, using different methods for different 99 * Browsers 100 * 101 * @author Dean Edwards 102 * @link http://dean.edwards.name/weblog/2006/06/again/ 103 */ 104 // for Mozilla 105 if (document.addEventListener) { 106 document.addEventListener("DOMContentLoaded", window.fireoninit, null); 107 } 108 109 // for Internet Explorer (using conditional comments) 110 /*@cc_on @*/ 111 /*@if (@_win32) 112 document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>"); 113 var script = document.getElementById("__ie_onload"); 114 script.onreadystatechange = function() { 115 if (this.readyState == "complete") { 116 window.fireoninit(); // call the onload handler 117 } 118 }; 119 /*@end @*/ 120 121 // for Safari 122 if (/WebKit/i.test(navigator.userAgent)) { // sniff 123 var _timer = setInterval(function() { 124 if (/loaded|complete/.test(document.readyState)) { 125 window.fireoninit(); // call the onload handler 126 } 127 }, 10); 128 } 129 130 // for other browsers 131 window.onload = window.fireoninit; 132 133 134 /** 135 * This is a pseudo Event that will be fired by the fireoninit 136 * function above. 137 * 138 * Use addInitEvent to bind to this event! 139 * 140 * @author Andreas Gohr <andi@splitbrain.org> 141 * @see fireoninit() 142 */ 143 window.oninit = function(){}; 144 145 /** 146 * Bind a function to the window.init pseudo event 147 * 148 * @author Simon Willison 149 * @see http://simon.incutio.com/archive/2004/05/26/addLoadEvent 150 */ 151 function addInitEvent(func) { 152 var oldoninit = window.oninit; 153 if (typeof window.oninit != 'function') { 154 window.oninit = func; 155 } else { 156 window.oninit = function() { 157 oldoninit(); 158 func(); 159 }; 160 } 161 } 162 163 164 165 166 /* XXXXXXXXXX end of /var/www/jalakai.co.uk/subdomains/wiki/dokuwiki_0/lib/scripts/events.js XXXXXXXXXX */ 167 168 169 170 /* XXXXXXXXXX begin of /var/www/jalakai.co.uk/subdomains/wiki/dokuwiki_0/lib/scripts/cookie.js XXXXXXXXXX */ 171 172 /** 173 * Handles the cookie used by several JavaScript functions 174 * 175 * Only a single cookie is written and read. You may only save 176 * sime name-value pairs - no complex types! 177 * 178 * You should only use the getValue and setValue methods 179 * 180 * @author Andreas Gohr <andi@splitbrain.org> 181 */ 182 DokuCookie = { 183 data: Array(), 184 name: 'DOKU_PREFS', 185 186 /** 187 * Save a value to the cookie 188 * 189 * @author Andreas Gohr <andi@splitbrain.org> 190 */ 191 setValue: function(key,val){ 192 DokuCookie.init(); 193 DokuCookie.data[key] = val; 194 195 // prepare expire date 196 var now = new Date(); 197 DokuCookie.fixDate(now); 198 now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000); //expire in a year 199 200 //save the whole data array 201 var text = ''; 202 for(var key in DokuCookie.data){ 203 text += '#'+escape(key)+'#'+DokuCookie.data[key]; 204 } 205 DokuCookie.setCookie(DokuCookie.name,text.substr(1),now,DOKU_BASE); 206 }, 207 208 /** 209 * Get a Value from the Cookie 210 * 211 * @author Andreas Gohr <andi@splitbrain.org> 212 */ 213 getValue: function(key){ 214 DokuCookie.init(); 215 return DokuCookie.data[key]; 216 }, 217 218 /** 219 * Loads the current set cookie 220 * 221 * @author Andreas Gohr <andi@splitbrain.org> 222 */ 223 init: function(){ 224 if(DokuCookie.data.length) return; 225 var text = DokuCookie.getCookie(DokuCookie.name); 226 if(text){ 227 var parts = text.split('#'); 228 for(var i=0; i<parts.length; i+=2){ 229 DokuCookie.data[unescape(parts[i])] = unescape(parts[i+1]); 230 } 231 } 232 }, 233 234 /** 235 * This sets a cookie by JavaScript 236 * 237 * @link http://www.webreference.com/js/column8/functions.html 238 */ 239 setCookie: function(name, value, expires, path, domain, secure) { 240 var curCookie = name + "=" + escape(value) + 241 ((expires) ? "; expires=" + expires.toGMTString() : "") + 242 ((path) ? "; path=" + path : "") + 243 ((domain) ? "; domain=" + domain : "") + 244 ((secure) ? "; secure" : ""); 245 document.cookie = curCookie; 246 }, 247 248 /** 249 * This reads a cookie by JavaScript 250 * 251 * @link http://www.webreference.com/js/column8/functions.html 252 */ 253 getCookie: function(name) { 254 var dc = document.cookie; 255 var prefix = name + "="; 256 var begin = dc.indexOf("; " + prefix); 257 if (begin == -1) { 258 begin = dc.indexOf(prefix); 259 if (begin !== 0){ return null; } 260 } else { 261 begin += 2; 262 } 263 var end = document.cookie.indexOf(";", begin); 264 if (end == -1){ 265 end = dc.length; 266 } 267 return unescape(dc.substring(begin + prefix.length, end)); 268 }, 269 270 /** 271 * This is needed for the cookie functions 272 * 273 * @link http://www.webreference.com/js/column8/functions.html 274 */ 275 fixDate: function(date) { 276 var base = new Date(0); 277 var skew = base.getTime(); 278 if (skew > 0){ 279 date.setTime(date.getTime() - skew); 280 } 281 } 282 }; 283 284 285 /* XXXXXXXXXX end of /var/www/jalakai.co.uk/subdomains/wiki/dokuwiki_0/lib/scripts/cookie.js XXXXXXXXXX */ 286 287 288 289 /* XXXXXXXXXX begin of /var/www/jalakai.co.uk/subdomains/wiki/dokuwiki_0/lib/scripts/script.js XXXXXXXXXX */ 290 291 /** 292 * Some of these scripts were taken from wikipedia.org and were modified for DokuWiki 293 */ 294 295 /** 296 * Some browser detection 297 */ 298 var clientPC = navigator.userAgent.toLowerCase(); // Get client info 299 var is_gecko = ((clientPC.indexOf('gecko')!=-1) && (clientPC.indexOf('spoofer')==-1) && 300 (clientPC.indexOf('khtml') == -1) && (clientPC.indexOf('netscape/7.0')==-1)); 301 var is_safari = ((clientPC.indexOf('AppleWebKit')!=-1) && (clientPC.indexOf('spoofer')==-1)); 302 var is_khtml = (navigator.vendor == 'KDE' || ( document.childNodes && !document.all && !navigator.taintEnabled )); 303 if (clientPC.indexOf('opera')!=-1) { 304 var is_opera = true; 305 var is_opera_preseven = (window.opera && !document.childNodes); 306 var is_opera_seven = (window.opera && document.childNodes); 307 } 308 309 /** 310 * Rewrite the accesskey tooltips to be more browser and OS specific. 311 * 312 * Accesskey tooltips are still only a best-guess of what will work 313 * on well known systems. 314 * 315 * @author Ben Coburn <btcoburn@silicodon.net> 316 */ 317 function updateAccessKeyTooltip() { 318 // determin tooltip text (order matters) 319 var tip = 'ALT+'; //default 320 if (domLib_isMac) { tip = 'CTRL+'; } 321 if (domLib_isOpera) { tip = 'SHIFT+ESC '; } 322 // add other cases here... 323 324 // do tooltip update 325 if (tip=='ALT+') { return; } 326 var exp = /\[ALT\+/i; 327 var rep = '['+tip; 328 var elements = domLib_getElementsByTagNames(['a', 'input', 'button']); 329 for (var i=0; i<elements.length; i++) { 330 if (elements[i].accessKey.length==1 && elements[i].title.length>0) { 331 elements[i].title = elements[i].title.replace(exp, rep); 332 } 333 } 334 } 335 336 /** 337 * Handy shortcut to document.getElementById 338 * 339 * This function was taken from the prototype library 340 * 341 * @link http://prototype.conio.net/ 342 */ 343 function $() { 344 var elements = new Array(); 345 346 for (var i = 0; i < arguments.length; i++) { 347 var element = arguments[i]; 348 if (typeof element == 'string') 349 element = document.getElementById(element); 350 351 if (arguments.length == 1) 352 return element; 353 354 elements.push(element); 355 } 356 357 return elements; 358 } 359 360 /** 361 * Simple function to check if a global var is defined 362 * 363 * @author Kae Verens 364 * @link http://verens.com/archives/2005/07/25/isset-for-javascript/#comment-2835 365 */ 366 function isset(varname){ 367 return(typeof(window[varname])!='undefined'); 368 } 369 370 /** 371 * Select elements by their class name 372 * 373 * @author Dustin Diaz <dustin [at] dustindiaz [dot] com> 374 * @link http://www.dustindiaz.com/getelementsbyclass/ 375 */ 376 function getElementsByClass(searchClass,node,tag) { 377 var classElements = new Array(); 378 if ( node == null ) 379 node = document; 380 if ( tag == null ) 381 tag = '*'; 382 var els = node.getElementsByTagName(tag); 383 var elsLen = els.length; 384 var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)"); 385 for (i = 0, j = 0; i < elsLen; i++) { 386 if ( pattern.test(els[i].className) ) { 387 classElements[j] = els[i]; 388 j++; 389 } 390 } 391 return classElements; 392 } 393 394 /** 395 * Get the X offset of the top left corner of the given object 396 * 397 * @link http://www.quirksmode.org/index.html?/js/findpos.html 398 */ 399 function findPosX(object){ 400 var curleft = 0; 401 var obj = $(object); 402 if (obj.offsetParent){ 403 while (obj.offsetParent){ 404 curleft += obj.offsetLeft; 405 obj = obj.offsetParent; 406 } 407 } 408 else if (obj.x){ 409 curleft += obj.x; 410 } 411 return curleft; 412 } //end findPosX function 413 414 /** 415 * Get the Y offset of the top left corner of the given object 416 * 417 * @link http://www.quirksmode.org/index.html?/js/findpos.html 418 */ 419 function findPosY(object){ 420 var curtop = 0; 421 var obj = $(object); 422 if (obj.offsetParent){ 423 while (obj.offsetParent){ 424 curtop += obj.offsetTop; 425 obj = obj.offsetParent; 426 } 427 } 428 else if (obj.y){ 429 curtop += obj.y; 430 } 431 return curtop; 432 } //end findPosY function 433 434 /** 435 * Escape special chars in JavaScript 436 * 437 * @author Andreas Gohr <andi@splitbrain.org> 438 */ 439 function jsEscape(text){ 440 var re=new RegExp("\\\\","g"); 441 text=text.replace(re,"\\\\"); 442 re=new RegExp("'","g"); 443 text=text.replace(re,"\\'"); 444 re=new RegExp('"',"g"); 445 text=text.replace(re,'"'); 446 re=new RegExp("\\\\\\\\n","g"); 447 text=text.replace(re,"\\n"); 448 return text; 449 } 450 451 /** 452 * This function escapes some special chars 453 * @deprecated by above function 454 */ 455 function escapeQuotes(text) { 456 var re=new RegExp("'","g"); 457 text=text.replace(re,"\\'"); 458 re=new RegExp('"',"g"); 459 text=text.replace(re,'"'); 460 re=new RegExp("\\n","g"); 461 text=text.replace(re,"\\n"); 462 return text; 463 } 464 465 /** 466 * Adds a node as the first childenode to the given parent 467 * 468 * @see appendChild() 469 */ 470 function prependChild(parent,element) { 471 if(!parent.firstChild){ 472 parent.appendChild(element); 473 }else{ 474 parent.insertBefore(element,parent.firstChild); 475 } 476 } 477 478 /** 479 * Prints a animated gif to show the search is performed 480 * 481 * @author Andreas Gohr <andi@splitbrain.org> 482 */ 483 function showLoadBar(id){ 484 obj = $(id); 485 486 if(obj){ 487 obj.innerHTML = '<img src="'+DOKU_BASE+'lib/images/loading.gif" '+ 488 'width="150" height="12" alt="..." />'; 489 obj.style.display="block"; 490 } 491 } 492 493 /** 494 * Disables the animated gif to show the search is done 495 * 496 * @author Andreas Gohr <andi@splitbrain.org> 497 */ 498 function hideLoadBar(id){ 499 obj = $(id); 500 if(obj) obj.style.display="none"; 501 } 502 503 /** 504 * Adds the toggle switch to the TOC 505 */ 506 function addTocToggle() { 507 if(!document.getElementById) return; 508 var header = $('toc__header'); 509 if(!header) return; 510 511 var showimg = document.createElement('img'); 512 showimg.id = 'toc__show'; 513 showimg.src = DOKU_BASE+'lib/images/arrow_down.gif'; 514 showimg.alt = '+'; 515 showimg.onclick = toggleToc; 516 showimg.style.display = 'none'; 517 518 var hideimg = document.createElement('img'); 519 hideimg.id = 'toc__hide'; 520 hideimg.src = DOKU_BASE+'lib/images/arrow_up.gif'; 521 hideimg.alt = '-'; 522 hideimg.onclick = toggleToc; 523 524 prependChild(header,showimg); 525 prependChild(header,hideimg); 526 } 527 528 /** 529 * This toggles the visibility of the Table of Contents 530 */ 531 function toggleToc() { 532 var toc = $('toc__inside'); 533 var showimg = $('toc__show'); 534 var hideimg = $('toc__hide'); 535 if(toc.style.display == 'none') { 536 toc.style.display = ''; 537 hideimg.style.display = ''; 538 showimg.style.display = 'none'; 539 } else { 540 toc.style.display = 'none'; 541 hideimg.style.display = 'none'; 542 showimg.style.display = ''; 543 } 544 } 545 546 /* 547 * This enables/disables checkboxes for acl-administration 548 * 549 * @author Frank Schubert <frank@schokilade.de> 550 */ 551 function checkAclLevel(){ 552 if(document.getElementById) { 553 var scope = $('acl_scope').value; 554 555 //check for namespace 556 if( (scope.indexOf(":*") > 0) || (scope == "*") ){ 557 document.getElementsByName('acl_checkbox[4]')[0].disabled=false; 558 document.getElementsByName('acl_checkbox[8]')[0].disabled=false; 559 }else{ 560 document.getElementsByName('acl_checkbox[4]')[0].checked=false; 561 document.getElementsByName('acl_checkbox[8]')[0].checked=false; 562 563 document.getElementsByName('acl_checkbox[4]')[0].disabled=true; 564 document.getElementsByName('acl_checkbox[8]')[0].disabled=true; 565 } 566 } 567 } 568 569 /** 570 * insitu footnote addition 571 * 572 * provide a wrapper for domTT javascript library 573 * this function is placed in the onmouseover event of footnote references in the main page 574 * 575 * @author Chris Smith <chris [at] jalakai [dot] co [dot] uk> 576 */ 577 var currentFootnote = 0; 578 function fnt(id, e, evt) { 579 580 if (currentFootnote && id != currentFootnote) { 581 domTT_close($('insitu__fn'+currentFootnote)); 582 } 583 584 // does the footnote tooltip already exist? 585 var fnote = $('insitu__fn'+id); 586 var footnote; 587 if (!fnote) { 588 // if not create it... 589 590 // locate the footnote anchor element 591 var a = $( "fn__"+id ); 592 if (!a){ return; } 593 594 // anchor parent is the footnote container, get its innerHTML 595 footnote = new String (a.parentNode.innerHTML); 596 597 // strip the leading footnote anchors and their comma separators 598 footnote = footnote.replace(/<a\s.*?href=\".*\#fnt__\d+\".*?<\/a>/gi, ''); 599 footnote = footnote.replace(/^\s+(,\s+)+/,''); 600 601 // prefix ids on any elements with "insitu__" to ensure they remain unique 602 footnote = footnote.replace(/\bid=\"(.*?)\"/gi,'id="insitu__$1'); 603 } else { 604 footnote = new String(fnt.innerHTML); 605 } 606 607 // activate the tooltip 608 domTT_activate(e, evt, 'content', footnote, 'type', 'velcro', 'id', 'insitu__fn'+id, 'styleClass', 'insitu-footnote JSpopup dokuwiki', 'maxWidth', document.body.offsetWidth*0.4); 609 currentFootnote = id; 610 } 611 612 613 /** 614 * Add the edit window size controls 615 */ 616 function initSizeCtl(ctlid,edid){ 617 if(!document.getElementById){ return; } 618 619 var ctl = $(ctlid); 620 var textarea = $(edid); 621 if(!ctl || !textarea) return; 622 623 var hgt = DokuCookie.getValue('sizeCtl'); 624 if(hgt){ 625 textarea.style.height = hgt; 626 }else{ 627 textarea.style.height = '300px'; 628 } 629 630 var l = document.createElement('img'); 631 var s = document.createElement('img'); 632 var w = document.createElement('img'); 633 l.src = DOKU_BASE+'lib/images/larger.gif'; 634 s.src = DOKU_BASE+'lib/images/smaller.gif'; 635 w.src = DOKU_BASE+'lib/images/wrap.gif'; 636 addEvent(l,'click',function(){sizeCtl(edid,100);}); 637 addEvent(s,'click',function(){sizeCtl(edid,-100);}); 638 addEvent(w,'click',function(){toggleWrap(edid);}); 639 ctl.appendChild(l); 640 ctl.appendChild(s); 641 ctl.appendChild(w); 642 } 643 644 /** 645 * This sets the vertical size of the editbox 646 */ 647 function sizeCtl(edid,val){ 648 var textarea = $(edid); 649 var height = parseInt(textarea.style.height.substr(0,textarea.style.height.length-2)); 650 height += val; 651 textarea.style.height = height+'px'; 652 653 DokuCookie.setValue('sizeCtl',textarea.style.height); 654 } 655 656 /** 657 * Toggle the wrapping mode of a textarea 658 * 659 * @author Fluffy Convict <fluffyconvict@hotmail.com> 660 * @link http://news.hping.org/comp.lang.javascript.archive/12265.html 661 * @author <shutdown@flashmail.com> 662 * @link https://bugzilla.mozilla.org/show_bug.cgi?id=302710#c2 663 */ 664 function toggleWrap(edid){ 665 var txtarea = $(edid); 666 var wrap = txtarea.getAttribute('wrap'); 667 if(wrap && wrap.toLowerCase() == 'off'){ 668 txtarea.setAttribute('wrap', 'soft'); 669 }else{ 670 txtarea.setAttribute('wrap', 'off'); 671 } 672 // Fix display for mozilla 673 var parNod = txtarea.parentNode; 674 var nxtSib = txtarea.nextSibling; 675 parNod.removeChild(txtarea); 676 parNod.insertBefore(txtarea, nxtSib); 677 } 678 679 /** 680 * Handler to close all open Popups 681 */ 682 function closePopups(){ 683 if(!document.getElementById){ return; } 684 685 var divs = document.getElementsByTagName('div'); 686 for(var i=0; i < divs.length; i++){ 687 if(divs[i].className.indexOf('JSpopup') != -1){ 688 divs[i].style.display = 'none'; 689 } 690 } 691 } 692 693 /** 694 * Looks for an element with the ID scroll__here at scrolls to it 695 */ 696 function scrollToMarker(){ 697 var obj = $('scroll__here'); 698 if(obj) obj.scrollIntoView(); 699 } 700 701 /** 702 * Looks for an element with the ID focus__this at sets focus to it 703 */ 704 function focusMarker(){ 705 var obj = $('focus__this'); 706 if(obj) obj.focus(); 707 } 708 709 /** 710 * Remove messages 711 */ 712 function cleanMsgArea(){ 713 var elems = getElementsByClass('(success|info|error)',document,'div'); 714 if(elems){ 715 for(var i=0; i<elems.length; i++){ 716 elems[i].style.display = 'none'; 717 } 718 } 719 } 720 721 722 /* XXXXXXXXXX end of /var/www/jalakai.co.uk/subdomains/wiki/dokuwiki_0/lib/scripts/script.js XXXXXXXXXX */ 723 724 725 726 /* XXXXXXXXXX begin of /var/www/jalakai.co.uk/subdomains/wiki/dokuwiki_0/lib/scripts/tw-sack.js XXXXXXXXXX */ 727 728 /* Simple AJAX Code-Kit (SACK) */ 729 /* ©2005 Gregory Wild-Smith */ 730 /* www.twilightuniverse.com */ 731 /* Software licenced under a modified X11 licence, see documentation or authors website for more details */ 732 733 function sack(file){ 734 this.AjaxFailedAlert = "Your browser does not support the enhanced functionality of this website, and therefore you will have an experience that differs from the intended one.\n"; 735 this.requestFile = file; 736 this.method = "POST"; 737 this.URLString = ""; 738 this.encodeURIString = true; 739 this.execute = false; 740 741 this.onLoading = function() { }; 742 this.onLoaded = function() { }; 743 this.onInteractive = function() { }; 744 this.onCompletion = function() { }; 745 this.afterCompletion = function() { }; 746 747 this.createAJAX = function() { 748 try { 749 this.xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 750 } catch (e) { 751 try { 752 this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 753 } catch (err) { 754 this.xmlhttp = null; 755 } 756 } 757 if(!this.xmlhttp && typeof XMLHttpRequest != "undefined"){ 758 this.xmlhttp = new XMLHttpRequest(); 759 } 760 if (!this.xmlhttp){ 761 this.failed = true; 762 } 763 }; 764 765 this.setVar = function(name, value){ 766 if (this.URLString.length < 3){ 767 this.URLString = name + "=" + value; 768 } else { 769 this.URLString += "&" + name + "=" + value; 770 } 771 }; 772 773 this.encVar = function(name, value){ 774 var varString = encodeURIComponent(name) + "=" + encodeURIComponent(value); 775 return varString; 776 }; 777 778 this.encodeURLString = function(string){ 779 varArray = string.split('&'); 780 for (i = 0; i < varArray.length; i++){ 781 urlVars = varArray[i].split('='); 782 if (urlVars[0].indexOf('amp;') != -1){ 783 urlVars[0] = urlVars[0].substring(4); 784 } 785 varArray[i] = this.encVar(urlVars[0],urlVars[1]); 786 } 787 return varArray.join('&'); 788 }; 789 790 this.runResponse = function(){ 791 eval(this.response); 792 }; 793 794 this.runAJAX = function(urlstring){ 795 this.responseStatus = new Array(2); 796 if(this.failed && this.AjaxFailedAlert){ 797 alert(this.AjaxFailedAlert); 798 } else { 799 if (urlstring){ 800 if (this.URLString.length){ 801 this.URLString = this.URLString + "&" + urlstring; 802 } else { 803 this.URLString = urlstring; 804 } 805 } 806 if (this.encodeURIString){ 807 var timeval = new Date().getTime(); 808 this.URLString = this.encodeURLString(this.URLString); 809 this.setVar("rndval", timeval); 810 } 811 if (this.element) { this.elementObj = document.getElementById(this.element); } 812 if (this.xmlhttp) { 813 var self = this; 814 if (this.method == "GET") { 815 var totalurlstring = this.requestFile + "?" + this.URLString; 816 this.xmlhttp.open(this.method, totalurlstring, true); 817 } else { 818 this.xmlhttp.open(this.method, this.requestFile, true); 819 } 820 if (this.method == "POST"){ 821 try { 822 this.xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); 823 } catch (e) {} 824 } 825 826 this.xmlhttp.onreadystatechange = function() { 827 switch (self.xmlhttp.readyState){ 828 case 1: 829 self.onLoading(); 830 break; 831 case 2: 832 self.onLoaded(); 833 break; 834 case 3: 835 self.onInteractive(); 836 break; 837 case 4: 838 self.response = self.xmlhttp.responseText; 839 self.responseXML = self.xmlhttp.responseXML; 840 self.responseStatus[0] = self.xmlhttp.status; 841 self.responseStatus[1] = self.xmlhttp.statusText; 842 self.onCompletion(); 843 if(self.execute){ self.runResponse(); } 844 if (self.elementObj) { 845 var elemNodeName = self.elementObj.nodeName; 846 elemNodeName.toLowerCase(); 847 if (elemNodeName == "input" || elemNodeName == "select" || elemNodeName == "option" || elemNodeName == "textarea"){ 848 self.elementObj.value = self.response; 849 } else { 850 self.elementObj.innerHTML = self.response; 851 } 852 } 853 self.afterCompletion(); 854 self.URLString = ""; 855 break; 856 } 857 }; 858 this.xmlhttp.send(this.URLString); 859 } 860 } 861 }; 862 this.createAJAX(); 863 } 864 865 866 /* XXXXXXXXXX end of /var/www/jalakai.co.uk/subdomains/wiki/dokuwiki_0/lib/scripts/tw-sack.js XXXXXXXXXX */ 867 868 869 870 /* XXXXXXXXXX begin of /var/www/jalakai.co.uk/subdomains/wiki/dokuwiki_0/lib/scripts/ajax.js XXXXXXXXXX */ 871 872 /** 873 * AJAX functions for the pagename quicksearch 874 * 875 * We're using a global object with self referencing methods 876 * here to make callbacks work 877 * 878 * @license GPL2 (http://www.gnu.org/licenses/gpl.html) 879 * @author Andreas Gohr <andi@splitbrain.org> 880 */ 881 882 //prepare class 883 function ajax_qsearch_class(){ 884 this.sack = null; 885 this.inObj = null; 886 this.outObj = null; 887 this.timer = null; 888 } 889 890 //create global object and add functions 891 var ajax_qsearch = new ajax_qsearch_class(); 892 ajax_qsearch.sack = new sack(DOKU_BASE + 'lib/exe/ajax.php'); 893 ajax_qsearch.sack.AjaxFailedAlert = ''; 894 ajax_qsearch.sack.encodeURIString = false; 895 896 ajax_qsearch.init = function(inID,outID){ 897 ajax_qsearch.inObj = document.getElementById(inID); 898 ajax_qsearch.outObj = document.getElementById(outID); 899 900 // objects found? 901 if(ajax_qsearch.inObj === null){ return; } 902 if(ajax_qsearch.outObj === null){ return; } 903 904 // attach eventhandler to search field 905 addEvent(ajax_qsearch.inObj,'keyup',ajax_qsearch.call); 906 907 // attach eventhandler to output field 908 addEvent(ajax_qsearch.outObj,'click',function(){ ajax_qsearch.outObj.style.display='none'; }); 909 }; 910 911 ajax_qsearch.clear = function(){ 912 ajax_qsearch.outObj.style.display = 'none'; 913 ajax_qsearch.outObj.innerHTML = ''; 914 if(ajax_qsearch.timer !== null){ 915 window.clearTimeout(ajax_qsearch.timer); 916 ajax_qsearch.timer = null; 917 } 918 }; 919 920 ajax_qsearch.exec = function(){ 921 ajax_qsearch.clear(); 922 var value = ajax_qsearch.inObj.value; 923 if(value === ''){ return; } 924 ajax_qsearch.sack.runAJAX('call=qsearch&q='+encodeURI(value)); 925 }; 926 927 ajax_qsearch.sack.onCompletion = function(){ 928 var data = ajax_qsearch.sack.response; 929 if(data === ''){ return; } 930 931 ajax_qsearch.outObj.innerHTML = data; 932 ajax_qsearch.outObj.style.display = 'block'; 933 }; 934 935 ajax_qsearch.call = function(){ 936 ajax_qsearch.clear(); 937 ajax_qsearch.timer = window.setTimeout("ajax_qsearch.exec()",500); 938 }; 939 940 941 942 /* XXXXXXXXXX end of /var/www/jalakai.co.uk/subdomains/wiki/dokuwiki_0/lib/scripts/ajax.js XXXXXXXXXX */ 943 944 945 946 /* XXXXXXXXXX begin of /var/www/jalakai.co.uk/subdomains/wiki/dokuwiki_0/lib/scripts/domLib.js XXXXXXXXXX */ 947 948 /** $Id: domLib.js 1952 2005-07-17 16:24:05Z dallen $ */ 949 // {{{ license 950 951 /* 952 * Copyright 2002-2005 Dan Allen, Mojavelinux.com (dan.allen@mojavelinux.com) 953 * 954 * Licensed under the Apache License, Version 2.0 (the "License"); 955 * you may not use this file except in compliance with the License. 956 * You may obtain a copy of the License at 957 * 958 * http://www.apache.org/licenses/LICENSE-2.0 959 * 960 * Unless required by applicable law or agreed to in writing, software 961 * distributed under the License is distributed on an "AS IS" BASIS, 962 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 963 * See the License for the specific language governing permissions and 964 * limitations under the License. 965 */ 966 967 // }}} 968 // {{{ intro 969 970 /** 971 * Title: DOM Library Core 972 * Version: 0.70 973 * 974 * Summary: 975 * A set of commonly used functions that make it easier to create javascript 976 * applications that rely on the DOM. 977 * 978 * Updated: 2005/05/17 979 * 980 * Maintainer: Dan Allen <dan.allen@mojavelinux.com> 981 * Maintainer: Jason Rust <jrust@rustyparts.com> 982 * 983 * License: Apache 2.0 984 */ 985 986 // }}} 987 // {{{ global constants (DO NOT EDIT) 988 989 // -- Browser Detection -- 990 var domLib_userAgent = navigator.userAgent.toLowerCase(); 991 var domLib_isMac = navigator.appVersion.indexOf('Mac') != -1; 992 var domLib_isWin = domLib_userAgent.indexOf('windows') != -1; 993 // NOTE: could use window.opera for detecting Opera 994 var domLib_isOpera = domLib_userAgent.indexOf('opera') != -1; 995 var domLib_isOpera7up = domLib_userAgent.match(/opera.(7|8)/i); 996 var domLib_isSafari = domLib_userAgent.indexOf('safari') != -1; 997 var domLib_isKonq = domLib_userAgent.indexOf('konqueror') != -1; 998 // Both konqueror and safari use the khtml rendering engine 999 var domLib_isKHTML = (domLib_isKonq || domLib_isSafari || domLib_userAgent.indexOf('khtml') != -1); 1000 var domLib_isIE = (!domLib_isKHTML && !domLib_isOpera && (domLib_userAgent.indexOf('msie 5') != -1 || domLib_userAgent.indexOf('msie 6') != -1 || domLib_userAgent.indexOf('msie 7') != -1)); 1001 var domLib_isIE5up = domLib_isIE; 1002 var domLib_isIE50 = (domLib_isIE && domLib_userAgent.indexOf('msie 5.0') != -1); 1003 var domLib_isIE55 = (domLib_isIE && domLib_userAgent.indexOf('msie 5.5') != -1); 1004 var domLib_isIE5 = (domLib_isIE50 || domLib_isIE55); 1005 // safari and konq may use string "khtml, like gecko", so check for destinctive / 1006 var domLib_isGecko = domLib_userAgent.indexOf('gecko/') != -1; 1007 var domLib_isMacIE = (domLib_isIE && domLib_isMac); 1008 var domLib_isIE55up = domLib_isIE5up && !domLib_isIE50 && !domLib_isMacIE; 1009 var domLib_isIE6up = domLib_isIE55up && !domLib_isIE55; 1010 1011 // -- Browser Abilities -- 1012 var domLib_standardsMode = (document.compatMode && document.compatMode == 'CSS1Compat'); 1013 var domLib_useLibrary = (domLib_isOpera7up || domLib_isKHTML || domLib_isIE5up || domLib_isGecko || domLib_isMacIE || document.defaultView); 1014 // fixed in Konq3.2 1015 var domLib_hasBrokenTimeout = (domLib_isMacIE || (domLib_isKonq && domLib_userAgent.match(/konqueror\/3.([2-9])/) === null)); 1016 var domLib_canFade = (domLib_isGecko || domLib_isIE || domLib_isSafari || domLib_isOpera); 1017 var domLib_canDrawOverSelect = (domLib_isMac || domLib_isOpera || domLib_isGecko); 1018 var domLib_canDrawOverFlash = (domLib_isMac || domLib_isWin); 1019 1020 // -- Event Variables -- 1021 var domLib_eventTarget = domLib_isIE ? 'srcElement' : 'currentTarget'; 1022 var domLib_eventButton = domLib_isIE ? 'button' : 'which'; 1023 var domLib_eventTo = domLib_isIE ? 'toElement' : 'relatedTarget'; 1024 var domLib_stylePointer = domLib_isIE ? 'hand' : 'pointer'; 1025 // NOTE: a bug exists in Opera that prevents maxWidth from being set to 'none', so we make it huge 1026 var domLib_styleNoMaxWidth = domLib_isOpera ? '10000px' : 'none'; 1027 var domLib_hidePosition = '-1000px'; 1028 var domLib_scrollbarWidth = 14; 1029 var domLib_autoId = 1; 1030 var domLib_zIndex = 100; 1031 1032 // -- Detection -- 1033 var domLib_collisionElements; 1034 var domLib_collisionsCached = false; 1035 1036 var domLib_timeoutStateId = 0; 1037 var domLib_timeoutStates = new Hash(); 1038 1039 // }}} 1040 // {{{ DOM enhancements 1041 1042 if (!document.ELEMENT_NODE) 1043 { 1044 document.ELEMENT_NODE = 1; 1045 document.ATTRIBUTE_NODE = 2; 1046 document.TEXT_NODE = 3; 1047 document.DOCUMENT_NODE = 9; 1048 document.DOCUMENT_FRAGMENT_NODE = 11; 1049 } 1050 1051 function domLib_clone(obj) 1052 { 1053 var copy = {}; 1054 for (var i in obj) 1055 { 1056 var value = obj[i]; 1057 try 1058 { 1059 if (value !== null && typeof(value) == 'object' && value != window && !value.nodeType) 1060 { 1061 copy[i] = domLib_clone(value); 1062 } 1063 else 1064 { 1065 copy[i] = value; 1066 } 1067 } 1068 catch(e) 1069 { 1070 copy[i] = value; 1071 } 1072 } 1073 1074 return copy; 1075 } 1076 1077 // }}} 1078 // {{{ class Hash() 1079 1080 function Hash() 1081 { 1082 this.length = 0; 1083 this.numericLength = 0; 1084 this.elementData = []; 1085 for (var i = 0; i < arguments.length; i += 2) 1086 { 1087 if (typeof(arguments[i + 1]) != 'undefined') 1088 { 1089 this.elementData[arguments[i]] = arguments[i + 1]; 1090 this.length++; 1091 if (arguments[i] == parseInt(arguments[i])) 1092 { 1093 this.numericLength++; 1094 } 1095 } 1096 } 1097 } 1098 1099 // using prototype as opposed to inner functions saves on memory 1100 Hash.prototype.get = function(in_key) 1101 { 1102 return this.elementData[in_key]; 1103 }; 1104 1105 Hash.prototype.set = function(in_key, in_value) 1106 { 1107 if (typeof(in_value) != 'undefined') 1108 { 1109 if (typeof(this.elementData[in_key]) == 'undefined') 1110 { 1111 this.length++; 1112 if (in_key == parseInt(in_key)) 1113 { 1114 this.numericLength++; 1115 } 1116 } 1117 1118 this.elementData[in_key] = in_value; 1119 return this.elementData[in_key]; 1120 } 1121 1122 return false; 1123 }; 1124 1125 Hash.prototype.remove = function(in_key) 1126 { 1127 var tmp_value; 1128 if (typeof(this.elementData[in_key]) != 'undefined') 1129 { 1130 this.length--; 1131 if (in_key == parseInt(in_key)) 1132 { 1133 this.numericLength--; 1134 } 1135 1136 tmp_value = this.elementData[in_key]; 1137 delete this.elementData[in_key]; 1138 } 1139 1140 return tmp_value; 1141 }; 1142 1143 Hash.prototype.size = function() 1144 { 1145 return this.length; 1146 }; 1147 1148 Hash.prototype.has = function(in_key) 1149 { 1150 return typeof(this.elementData[in_key]) != 'undefined'; 1151 }; 1152 1153 Hash.prototype.find = function(in_obj) 1154 { 1155 for (var tmp_key in this.elementData) 1156 { 1157 if (this.elementData[tmp_key] == in_obj) 1158 { 1159 return tmp_key; 1160 } 1161 } 1162 }; 1163 1164 Hash.prototype.merge = function(in_hash) 1165 { 1166 for (var tmp_key in in_hash.elementData) 1167 { 1168 if (typeof(this.elementData[tmp_key]) == 'undefined') 1169 { 1170 this.length++; 1171 if (tmp_key == parseInt(tmp_key)) 1172 { 1173 this.numericLength++; 1174 } 1175 } 1176 1177 this.elementData[tmp_key] = in_hash.elementData[tmp_key]; 1178 } 1179 }; 1180 1181 Hash.prototype.compare = function(in_hash) 1182 { 1183 if (this.length != in_hash.length) 1184 { 1185 return false; 1186 } 1187 1188 for (var tmp_key in this.elementData) 1189 { 1190 if (this.elementData[tmp_key] != in_hash.elementData[tmp_key]) 1191 { 1192 return false; 1193 } 1194 } 1195 1196 return true; 1197 }; 1198 1199 // }}} 1200 // {{{ domLib_isDescendantOf() 1201 1202 function domLib_isDescendantOf(in_object, in_ancestor) 1203 { 1204 if (in_object == in_ancestor) 1205 { 1206 return true; 1207 } 1208 1209 while (in_object != document.documentElement) 1210 { 1211 try 1212 { 1213 if ((tmp_object = in_object.offsetParent) && tmp_object == in_ancestor) 1214 { 1215 return true; 1216 } 1217 else if ((tmp_object = in_object.parentNode) == in_ancestor) 1218 { 1219 return true; 1220 } 1221 else 1222 { 1223 in_object = tmp_object; 1224 } 1225 } 1226 // in case we get some wierd error, just assume we haven't gone out yet 1227 catch(e) 1228 { 1229 return true; 1230 } 1231 } 1232 1233 return false; 1234 } 1235 1236 // }}} 1237 // {{{ domLib_detectCollisions() 1238 1239 /** 1240 * For any given target element, determine if elements on the page 1241 * are colliding with it that do not obey the rules of z-index. 1242 */ 1243 function domLib_detectCollisions(in_object, in_recover, in_useCache) 1244 { 1245 // the reason for the cache is that if the root menu is built before 1246 // the page is done loading, then it might not find all the elements. 1247 // so really the only time you don't use cache is when building the 1248 // menu as part of the page load 1249 if (!domLib_collisionsCached) 1250 { 1251 var tags = []; 1252 1253 if (!domLib_canDrawOverFlash) 1254 { 1255 tags[tags.length] = 'object'; 1256 } 1257 1258 if (!domLib_canDrawOverSelect) 1259 { 1260 tags[tags.length] = 'select'; 1261 } 1262 1263 domLib_collisionElements = domLib_getElementsByTagNames(tags, true); 1264 domLib_collisionsCached = in_useCache; 1265 } 1266 1267 // if we don't have a tip, then unhide selects 1268 if (in_recover) 1269 { 1270 for (var cnt = 0; cnt < domLib_collisionElements.length; cnt++) 1271 { 1272 var thisElement = domLib_collisionElements[cnt]; 1273 1274 if (!thisElement.hideList) 1275 { 1276 thisElement.hideList = new Hash(); 1277 } 1278 1279 thisElement.hideList.remove(in_object.id); 1280 if (!thisElement.hideList.length) 1281 { 1282 domLib_collisionElements[cnt].style.visibility = 'visible'; 1283 if (domLib_isKonq) 1284 { 1285 domLib_collisionElements[cnt].style.display = ''; 1286 } 1287 } 1288 } 1289 1290 return; 1291 } 1292 else if (domLib_collisionElements.length === 0) 1293 { 1294 return; 1295 } 1296 1297 // okay, we have a tip, so hunt and destroy 1298 var objectOffsets = domLib_getOffsets(in_object); 1299 1300 for (cnt = 0; cnt < domLib_collisionElements.length; cnt++) 1301 { 1302 thisElement = domLib_collisionElements[cnt]; 1303 1304 // if collision element is in active element, move on 1305 // WARNING: is this too costly? 1306 if (domLib_isDescendantOf(thisElement, in_object)) 1307 { 1308 continue; 1309 } 1310 1311 // konqueror only has trouble with multirow selects 1312 if (domLib_isKonq && 1313 thisElement.tagName == 'SELECT' && 1314 (thisElement.size <= 1 && !thisElement.multiple)) 1315 { 1316 continue; 1317 } 1318 1319 if (!thisElement.hideList) 1320 { 1321 thisElement.hideList = new Hash(); 1322 } 1323 1324 var selectOffsets = domLib_getOffsets(thisElement); 1325 var center2centerDistance = Math.sqrt(Math.pow(selectOffsets.get('leftCenter') - objectOffsets.get('leftCenter'), 2) + Math.pow(selectOffsets.get('topCenter') - objectOffsets.get('topCenter'), 2)); 1326 var radiusSum = selectOffsets.get('radius') + objectOffsets.get('radius'); 1327 // the encompassing circles are overlapping, get in for a closer look 1328 if (center2centerDistance < radiusSum) 1329 { 1330 // tip is left of select 1331 if ((objectOffsets.get('leftCenter') <= selectOffsets.get('leftCenter') && objectOffsets.get('right') < selectOffsets.get('left')) || 1332 // tip is right of select 1333 (objectOffsets.get('leftCenter') > selectOffsets.get('leftCenter') && objectOffsets.get('left') > selectOffsets.get('right')) || 1334 // tip is above select 1335 (objectOffsets.get('topCenter') <= selectOffsets.get('topCenter') && objectOffsets.get('bottom') < selectOffsets.get('top')) || 1336 // tip is below select 1337 (objectOffsets.get('topCenter') > selectOffsets.get('topCenter') && objectOffsets.get('top') > selectOffsets.get('bottom'))) 1338 { 1339 thisElement.hideList.remove(in_object.id); 1340 if (!thisElement.hideList.length) 1341 { 1342 thisElement.style.visibility = 'visible'; 1343 if (domLib_isKonq) 1344 { 1345 thisElement.style.display = ''; 1346 } 1347 } 1348 } 1349 else 1350 { 1351 thisElement.hideList.set(in_object.id, true); 1352 thisElement.style.visibility = 'hidden'; 1353 if (domLib_isKonq) 1354 { 1355 thisElement.style.display = 'none'; 1356 } 1357 } 1358 } 1359 } 1360 } 1361 1362 // }}} 1363 // {{{ domLib_getOffsets() 1364 1365 function domLib_getOffsets(in_object) 1366 { 1367 var originalObject = in_object; 1368 var originalWidth = in_object.offsetWidth; 1369 var originalHeight = in_object.offsetHeight; 1370 var offsetLeft = 0; 1371 var offsetTop = 0; 1372 1373 while (in_object) 1374 { 1375 offsetLeft += in_object.offsetLeft; 1376 offsetTop += in_object.offsetTop; 1377 in_object = in_object.offsetParent; 1378 } 1379 1380 // MacIE misreports the offsets (even with margin: 0 in body{}), still not perfect 1381 if (domLib_isMacIE) { 1382 offsetLeft += 10; 1383 offsetTop += 10; 1384 } 1385 1386 return new Hash( 1387 'left', offsetLeft, 1388 'top', offsetTop, 1389 'right', offsetLeft + originalWidth, 1390 'bottom', offsetTop + originalHeight, 1391 'leftCenter', offsetLeft + originalWidth/2, 1392 'topCenter', offsetTop + originalHeight/2, 1393 'radius', Math.max(originalWidth, originalHeight) ); 1394 } 1395 1396 // }}} 1397 // {{{ domLib_setTimeout() 1398 1399 function domLib_setTimeout(in_function, in_timeout, in_args) 1400 { 1401 if (typeof(in_args) == 'undefined') 1402 { 1403 in_args = []; 1404 } 1405 1406 if (in_timeout == -1) 1407 { 1408 // timeout event is disabled 1409 return; 1410 } 1411 else if (in_timeout === 0) 1412 { 1413 in_function(in_args); 1414 return 0; 1415 } 1416 1417 // must make a copy of the arguments so that we release the reference 1418 var args = domLib_clone(in_args); 1419 1420 if (!domLib_hasBrokenTimeout) 1421 { 1422 return setTimeout(function() { in_function(args); }, in_timeout); 1423 } 1424 else 1425 { 1426 var id = domLib_timeoutStateId++; 1427 var data = new Hash(); 1428 data.set('function', in_function); 1429 data.set('args', args); 1430 domLib_timeoutStates.set(id, data); 1431 1432 data.set('timeoutId', setTimeout('domLib_timeoutStates.get(' + id + ').get(\'function\')(domLib_timeoutStates.get(' + id + ').get(\'args\')); domLib_timeoutStates.remove(' + id + ');', in_timeout)); 1433 return id; 1434 } 1435 } 1436 1437 // }}} 1438 // {{{ domLib_clearTimeout() 1439 1440 function domLib_clearTimeout(in_id) 1441 { 1442 if (!domLib_hasBrokenTimeout) 1443 { 1444 clearTimeout(in_id); 1445 } 1446 else 1447 { 1448 if (domLib_timeoutStates.has(in_id)) 1449 { 1450 clearTimeout(domLib_timeoutStates.get(in_id).get('timeoutId')); 1451 domLib_timeoutStates.remove(in_id); 1452 } 1453 } 1454 } 1455 1456 // }}} 1457 // {{{ domLib_getEventPosition() 1458 1459 function domLib_getEventPosition(in_eventObj) 1460 { 1461 var eventPosition = new Hash('x', 0, 'y', 0, 'scrollX', 0, 'scrollY', 0); 1462 1463 // IE varies depending on standard compliance mode 1464 if (domLib_isIE) 1465 { 1466 var doc = (domLib_standardsMode ? document.documentElement : document.body); 1467 // NOTE: events may fire before the body has been loaded 1468 if (doc) 1469 { 1470 eventPosition.set('x', in_eventObj.clientX + doc.scrollLeft); 1471 eventPosition.set('y', in_eventObj.clientY + doc.scrollTop); 1472 eventPosition.set('scrollX', doc.scrollLeft); 1473 eventPosition.set('scrollY', doc.scrollTop); 1474 } 1475 } 1476 else 1477 { 1478 eventPosition.set('x', in_eventObj.pageX); 1479 eventPosition.set('y', in_eventObj.pageY); 1480 eventPosition.set('scrollX', in_eventObj.pageX - in_eventObj.clientX); 1481 eventPosition.set('scrollY', in_eventObj.pageY - in_eventObj.clientY); 1482 } 1483 1484 return eventPosition; 1485 } 1486 1487 // }}} 1488 // {{{ domLib_cancelBubble() 1489 1490 function domLib_cancelBubble(in_event) 1491 { 1492 var eventObj = in_event ? in_event : window.event; 1493 eventObj.cancelBubble = true; 1494 } 1495 1496 // }}} 1497 // {{{ domLib_getIFrameReference() 1498 1499 function domLib_getIFrameReference(in_frame) 1500 { 1501 if (domLib_isGecko || domLib_isIE) 1502 { 1503 return in_frame.frameElement; 1504 } 1505 else 1506 { 1507 // we could either do it this way or require an id on the frame 1508 // equivalent to the name 1509 var name = in_frame.name; 1510 if (!name || !in_frame.parent) 1511 { 1512 return; 1513 } 1514 1515 var candidates = in_frame.parent.document.getElementsByTagName('iframe'); 1516 for (var i = 0; i < candidates.length; i++) 1517 { 1518 if (candidates[i].name == name) 1519 { 1520 return candidates[i]; 1521 } 1522 } 1523 } 1524 } 1525 1526 // }}} 1527 // {{{ domLib_getElementsByClass() 1528 1529 function domLib_getElementsByClass(in_class) 1530 { 1531 var elements = domLib_isIE5 ? document.all : document.getElementsByTagName('*'); 1532 var matches = []; 1533 var cnt = 0; 1534 for (var i = 0; i < elements.length; i++) 1535 { 1536 if ((" " + elements[i].className + " ").indexOf(" " + in_class + " ") != -1) 1537 { 1538 matches[cnt++] = elements[i]; 1539 } 1540 } 1541 1542 return matches; 1543 } 1544 1545 // }}} 1546 // {{{ 1547 1548 function domLib_getElementsByTagNames(in_list, in_excludeHidden) 1549 { 1550 var elements = []; 1551 for (var i = 0; i < in_list.length; i++) 1552 { 1553 var matches = document.getElementsByTagName(in_list[i]); 1554 for (var j = 0; j < matches.length; j++) 1555 { 1556 if (in_excludeHidden && domLib_getComputedStyle(matches[j], 'visibility') == 'hidden') 1557 { 1558 continue; 1559 } 1560 1561 elements[elements.length] = matches[j]; 1562 } 1563 } 1564 1565 return elements; 1566 } 1567 1568 // }}} 1569 // {{{ 1570 1571 function domLib_getComputedStyle(in_obj, in_property) 1572 { 1573 if (domLib_isIE) 1574 { 1575 var humpBackProp = in_property.replace(/-(.)/, function (a, b) { return b.toUpperCase(); }); 1576 return eval('in_obj.currentStyle.' + humpBackProp); 1577 } 1578 // getComputedStyle() is broken in konqueror, so let's go for the style object 1579 else if (domLib_isKonq) 1580 { 1581 humpBackProp = in_property.replace(/-(.)/, function (a, b) { return b.toUpperCase(); }); 1582 return eval('in_obj.style.' + in_property); 1583 } 1584 else 1585 { 1586 return document.defaultView.getComputedStyle(in_obj, null).getPropertyValue(in_property); 1587 } 1588 } 1589 1590 // }}} 1591 // {{{ makeTrue() 1592 1593 function makeTrue() 1594 { 1595 return true; 1596 } 1597 1598 // }}} 1599 // {{{ makeFalse() 1600 1601 function makeFalse() 1602 { 1603 return false; 1604 } 1605 1606 // }}} 1607 1608 1609 1610 /* XXXXXXXXXX end of /var/www/jalakai.co.uk/subdomains/wiki/dokuwiki_0/lib/scripts/domLib.js XXXXXXXXXX */ 1611 1612 1613 1614 /* XXXXXXXXXX begin of /var/www/jalakai.co.uk/subdomains/wiki/dokuwiki_0/lib/scripts/domTT.js XXXXXXXXXX */ 1615 1616 /** $Id: domTT.js 1951 2005-07-17 16:22:34Z dallen $ */ 1617 // {{{ license 1618 1619 /* 1620 * Copyright 2002-2005 Dan Allen, Mojavelinux.com (dan.allen@mojavelinux.com) 1621 * 1622 * Licensed under the Apache License, Version 2.0 (the "License"); 1623 * you may not use this file except in compliance with the License. 1624 * You may obtain a copy of the License at 1625 * 1626 * http://www.apache.org/licenses/LICENSE-2.0 1627 * 1628 * Unless required by applicable law or agreed to in writing, software 1629 * distributed under the License is distributed on an "AS IS" BASIS, 1630 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1631 * See the License for the specific language governing permissions and 1632 * limitations under the License. 1633 */ 1634 1635 // }}} 1636 // {{{ intro 1637 1638 /** 1639 * Title: DOM Tooltip Library 1640 * Version: 0.7.1 1641 * 1642 * Summary: 1643 * Allows developers to add custom tooltips to the webpages. Tooltips are 1644 * generated using the domTT_activate() function and customized by setting 1645 * a handful of options. 1646 * 1647 * Maintainer: Dan Allen <dan.allen@mojavelinux.com> 1648 * Contributors: 1649 * Josh Gross <josh@jportalhome.com> 1650 * Jason Rust <jason@rustyparts.com> 1651 * 1652 * License: Apache 2.0 1653 * However, if you use this library, you earn the position of official bug 1654 * reporter :) Please post questions or problem reports to the newsgroup: 1655 * 1656 * http://groups-beta.google.com/group/dom-tooltip 1657 * 1658 * If you are doing this for commercial work, perhaps you could send me a few 1659 * Starbucks Coffee gift dollars or PayPal bucks to encourage future 1660 * developement (NOT REQUIRED). E-mail me for my snail mail address. 1661 1662 * 1663 * Homepage: http://www.mojavelinux.com/projects/domtooltip/ 1664 * 1665 * Newsgroup: http://groups-beta.google.com/group/dom-tooltip 1666 * 1667 * Freshmeat Project: http://freshmeat.net/projects/domtt/?topic_id=92 1668 * 1669 * Updated: 2005/07/16 1670 * 1671 * Supported Browsers: 1672 * Mozilla (Gecko), IE 5.5+, IE on Mac, Safari, Konqueror, Opera 7 1673 * 1674 * Usage: 1675 * Please see the HOWTO documentation. 1676 **/ 1677 1678 // }}} 1679 // {{{ settings (editable) 1680 1681 // IE mouse events seem to be off by 2 pixels 1682 var domTT_offsetX = (domLib_isIE ? -2 : 0); 1683 var domTT_offsetY = (domLib_isIE ? 4 : 2); 1684 var domTT_direction = 'southeast'; 1685 var domTT_mouseHeight = domLib_isIE ? 13 : 19; 1686 var domTT_closeLink = 'X'; 1687 var domTT_closeAction = 'hide'; 1688 var domTT_activateDelay = 500; 1689 var domTT_maxWidth = false; 1690 var domTT_styleClass = 'domTT'; 1691 var domTT_fade = 'neither'; 1692 var domTT_lifetime = 0; 1693 var domTT_grid = 0; 1694 var domTT_trailDelay = 200; 1695 var domTT_useGlobalMousePosition = true; 1696 var domTT_screenEdgeDetection = true; 1697 var domTT_screenEdgePadding = 4; 1698 var domTT_oneOnly = false; 1699 var domTT_draggable = false; 1700 if (typeof(domTT_dragEnabled) == 'undefined') 1701 { 1702 domTT_dragEnabled = false; 1703 } 1704 1705 // }}} 1706 // {{{ globals (DO NOT EDIT) 1707 1708 var domTT_predefined = new Hash(); 1709 // tooltips are keyed on both the tip id and the owner id, 1710 // since events can originate on either object 1711 var domTT_tooltips = new Hash(); 1712 var domTT_lastOpened = 0; 1713 1714 // }}} 1715 // {{{ document.onmousemove 1716 1717 if (domLib_useLibrary && domTT_useGlobalMousePosition) 1718 { 1719 var domTT_mousePosition = new Hash(); 1720 document.onmousemove = function(in_event) 1721 { 1722 if (typeof(in_event) == 'undefined') 1723 { 1724 in_event = event; 1725 } 1726 1727 domTT_mousePosition = domLib_getEventPosition(in_event); 1728 if (domTT_dragEnabled && domTT_dragMouseDown) 1729 { 1730 domTT_dragUpdate(in_event); 1731 } 1732 }; 1733 } 1734 1735 // }}} 1736 // {{{ domTT_activate() 1737 1738 function domTT_activate(in_this, in_event) 1739 { 1740 if (!domLib_useLibrary) { return false; } 1741 1742 // make sure in_event is set (for IE, some cases we have to use window.event) 1743 if (typeof(in_event) == 'undefined') 1744 { 1745 in_event = window.event; 1746 } 1747 1748 var owner = document.body; 1749 // we have an active event so get the owner 1750 if (in_event.type.match(/key|mouse|click|contextmenu/i)) 1751 { 1752 // make sure we have nothing higher than the body element 1753 if (in_this.nodeType && in_this.nodeType != document.DOCUMENT_NODE) 1754 { 1755 var owner = in_this; 1756 } 1757 } 1758 // non active event (make sure we were passed a string id) 1759 else 1760 { 1761 if (typeof(in_this) != 'object' && !(owner = domTT_tooltips.get(in_this))) 1762 { 1763 owner = document.body.appendChild(document.createElement('div')); 1764 owner.style.display = 'none'; 1765 owner.id = in_this; 1766 } 1767 } 1768 1769 // make sure the owner has a unique id 1770 if (!owner.id) 1771 { 1772 owner.id = '__autoId' + domLib_autoId++; 1773 } 1774 1775 // see if we should only be openning one tip at a time 1776 // NOTE: this is not "perfect" yet since it really steps on any other 1777 // tip working on fade out or delayed close, but it get's the job done 1778 if (domTT_oneOnly && domTT_lastOpened) 1779 { 1780 domTT_deactivate(domTT_lastOpened); 1781 } 1782 1783 domTT_lastOpened = owner.id; 1784 1785 var tooltip = domTT_tooltips.get(owner.id); 1786 if (tooltip) 1787 { 1788 if (tooltip.get('eventType') != in_event.type) 1789 { 1790 if (tooltip.get('type') == 'greasy') 1791 { 1792 tooltip.set('closeAction', 'destroy'); 1793 domTT_deactivate(owner.id); 1794 } 1795 else if (tooltip.get('status') != 'inactive') 1796 { 1797 return owner.id; 1798 } 1799 } 1800 else 1801 { 1802 if (tooltip.get('status') == 'inactive') 1803 { 1804 tooltip.set('status', 'pending'); 1805 tooltip.set('activateTimeout', domLib_setTimeout(domTT_runShow, tooltip.get('delay'), [owner.id, in_event])); 1806 1807 return owner.id; 1808 } 1809 // either pending or active, let it be 1810 else 1811 { 1812 return owner.id; 1813 } 1814 } 1815 } 1816 1817 // setup the default options hash 1818 var options = new Hash( 1819 'caption', '', 1820 'content', '', 1821 'clearMouse', true, 1822 'closeAction', domTT_closeAction, 1823 'closeLink', domTT_closeLink, 1824 'delay', domTT_activateDelay, 1825 'direction', domTT_direction, 1826 'draggable', domTT_draggable, 1827 'fade', domTT_fade, 1828 'fadeMax', 100, 1829 'grid', domTT_grid, 1830 'id', '[domTT]' + owner.id, 1831 'inframe', false, 1832 'lifetime', domTT_lifetime, 1833 'offsetX', domTT_offsetX, 1834 'offsetY', domTT_offsetY, 1835 'parent', document.body, 1836 'position', 'absolute', 1837 'styleClass', domTT_styleClass, 1838 'type', 'greasy', 1839 'trail', false, 1840 'lazy', false 1841 ); 1842 1843 // load in the options from the function call 1844 for (var i = 2; i < arguments.length; i += 2) 1845 { 1846 // load in predefined 1847 if (arguments[i] == 'predefined') 1848 { 1849 var predefinedOptions = domTT_predefined.get(arguments[i + 1]); 1850 for (var j in predefinedOptions.elementData) 1851 { 1852 options.set(j, predefinedOptions.get(j)); 1853 } 1854 } 1855 // set option 1856 else 1857 { 1858 options.set(arguments[i], arguments[i + 1]); 1859 } 1860 } 1861 1862 options.set('eventType', in_event.type); 1863 1864 // immediately set the status text if provided 1865 if (options.has('statusText')) 1866 { 1867 try { window.status = options.get('statusText'); } catch(e) {} 1868 } 1869 1870 // if we didn't give content...assume we just wanted to change the status and return 1871 if (!options.has('content') || options.get('content') == '' || options.get('content') == null) 1872 { 1873 if (typeof(owner.onmouseout) != 'function') 1874 { 1875 owner.onmouseout = function(in_event) { domTT_mouseout(this, in_event); }; 1876 } 1877 1878 return owner.id; 1879 } 1880 1881 options.set('owner', owner); 1882 1883 domTT_create(options); 1884 1885 // determine the show delay 1886 options.set('delay', in_event.type.match(/click|mousedown|contextmenu/i) ? 0 : parseInt(options.get('delay'))); 1887 domTT_tooltips.set(owner.id, options); 1888 domTT_tooltips.set(options.get('id'), options); 1889 options.set('status', 'pending'); 1890 options.set('activateTimeout', domLib_setTimeout(domTT_runShow, options.get('delay'), [owner.id, in_event])); 1891 1892 return owner.id; 1893 }; 1894 1895 // }}} 1896 // {{{ domTT_create() 1897 1898 function domTT_create(in_options) 1899 { 1900 var tipOwner = in_options.get('owner'); 1901 var parentObj = in_options.get('parent'); 1902 var parentDoc = parentObj.ownerDocument || parentObj.document; 1903 1904 // create the tooltip and hide it 1905 var tipObj = parentObj.appendChild(parentDoc.createElement('div')); 1906 tipObj.style.position = 'absolute'; 1907 tipObj.style.left = '0px'; 1908 tipObj.style.top = '0px'; 1909 tipObj.style.visibility = 'hidden'; 1910 tipObj.id = in_options.get('id'); 1911 tipObj.className = in_options.get('styleClass'); 1912 1913 // content of tip as object 1914 var content; 1915 var tableLayout = false; 1916 1917 if (in_options.get('caption') || (in_options.get('type') == 'sticky' && in_options.get('caption') !== false)) 1918 { 1919 tableLayout = true; 1920 // layout the tip with a hidden formatting table 1921 var tipLayoutTable = tipObj.appendChild(parentDoc.createElement('table')); 1922 tipLayoutTable.style.borderCollapse = 'collapse'; 1923 if (domLib_isKHTML) 1924 { 1925 tipLayoutTable.cellSpacing = 0; 1926 } 1927 1928 var tipLayoutTbody = tipLayoutTable.appendChild(parentDoc.createElement('tbody')); 1929 1930 var numCaptionCells = 0; 1931 var captionRow = tipLayoutTbody.appendChild(parentDoc.createElement('tr')); 1932 var captionCell = captionRow.appendChild(parentDoc.createElement('td')); 1933 captionCell.style.padding = '0px'; 1934 var caption = captionCell.appendChild(parentDoc.createElement('div')); 1935 caption.className = 'caption'; 1936 if (domLib_isIE50) 1937 { 1938 caption.style.height = '100%'; 1939 } 1940 1941 if (in_options.get('caption').nodeType) 1942 { 1943 caption.appendChild(in_options.get('caption').cloneNode(1)); 1944 } 1945 else 1946 { 1947 caption.innerHTML = in_options.get('caption'); 1948 } 1949 1950 if (in_options.get('type') == 'sticky') 1951 { 1952 var numCaptionCells = 2; 1953 var closeLinkCell = captionRow.appendChild(parentDoc.createElement('td')); 1954 closeLinkCell.style.padding = '0px'; 1955 var closeLink = closeLinkCell.appendChild(parentDoc.createElement('div')); 1956 closeLink.className = 'caption'; 1957 if (domLib_isIE50) 1958 { 1959 closeLink.style.height = '100%'; 1960 } 1961 1962 closeLink.style.textAlign = 'right'; 1963 closeLink.style.cursor = domLib_stylePointer; 1964 // merge the styles of the two cells 1965 closeLink.style.borderLeftWidth = caption.style.borderRightWidth = '0px'; 1966 closeLink.style.paddingLeft = caption.style.paddingRight = '0px'; 1967 closeLink.style.marginLeft = caption.style.marginRight = '0px'; 1968 if (in_options.get('closeLink').nodeType) 1969 { 1970 closeLink.appendChild(in_options.get('closeLink').cloneNode(1)); 1971 } 1972 else 1973 { 1974 closeLink.innerHTML = in_options.get('closeLink'); 1975 } 1976 1977 closeLink.onclick = function() { domTT_deactivate(tipOwner.id); }; 1978 closeLink.onmousedown = function(in_event) { if (typeof(in_event) == 'undefined') { in_event = event; } in_event.cancelBubble = true; }; 1979 // MacIE has to have a newline at the end and must be made with createTextNode() 1980 if (domLib_isMacIE) 1981 { 1982 closeLinkCell.appendChild(parentDoc.createTextNode("\n")); 1983 } 1984 } 1985 1986 // MacIE has to have a newline at the end and must be made with createTextNode() 1987 if (domLib_isMacIE) 1988 { 1989 captionCell.appendChild(parentDoc.createTextNode("\n")); 1990 } 1991 1992 var contentRow = tipLayoutTbody.appendChild(parentDoc.createElement('tr')); 1993 var contentCell = contentRow.appendChild(parentDoc.createElement('td')); 1994 contentCell.style.padding = '0px'; 1995 if (numCaptionCells) 1996 { 1997 if (domLib_isIE || domLib_isOpera) 1998 { 1999 contentCell.colSpan = numCaptionCells; 2000 } 2001 else 2002 { 2003 contentCell.setAttribute('colspan', numCaptionCells); 2004 } 2005 } 2006 2007 content = contentCell.appendChild(parentDoc.createElement('div')); 2008 if (domLib_isIE50) 2009 { 2010 content.style.height = '100%'; 2011 } 2012 } 2013 else 2014 { 2015 content = tipObj.appendChild(parentDoc.createElement('div')); 2016 } 2017 2018 content.className = 'contents'; 2019 2020 if (in_options.get('content').nodeType) 2021 { 2022 content.appendChild(in_options.get('content').cloneNode(1)); 2023 } 2024 else 2025 { 2026 content.innerHTML = in_options.get('content'); 2027 } 2028 2029 // adjust the width if specified 2030 if (in_options.has('width')) 2031 { 2032 tipObj.style.width = parseInt(in_options.get('width')) + 'px'; 2033 } 2034 2035 // check if we are overridding the maxWidth 2036 // if the browser supports maxWidth, the global setting will be ignored (assume stylesheet) 2037 var maxWidth = domTT_maxWidth; 2038 if (in_options.has('maxWidth')) 2039 { 2040 if ((maxWidth = in_options.get('maxWidth')) === false) 2041 { 2042 tipObj.style.maxWidth = domLib_styleNoMaxWidth; 2043 } 2044 else 2045 { 2046 maxWidth = parseInt(in_options.get('maxWidth')); 2047 tipObj.style.maxWidth = maxWidth + 'px'; 2048 } 2049 } 2050 2051 // HACK: fix lack of maxWidth in CSS for KHTML and IE 2052 if (maxWidth !== false && (domLib_isIE || domLib_isKHTML) && tipObj.offsetWidth > maxWidth) 2053 { 2054 tipObj.style.width = maxWidth + 'px'; 2055 } 2056 2057 in_options.set('offsetWidth', tipObj.offsetWidth); 2058 in_options.set('offsetHeight', tipObj.offsetHeight); 2059 2060 // konqueror miscalcuates the width of the containing div when using the layout table based on the 2061 // border size of the containing div 2062 if (domLib_isKonq && tableLayout && !tipObj.style.width) 2063 { 2064 var left = document.defaultView.getComputedStyle(tipObj, '').getPropertyValue('border-left-width'); 2065 var right = document.defaultView.getComputedStyle(tipObj, '').getPropertyValue('border-right-width'); 2066 2067 left = left.substring(left.indexOf(':') + 2, left.indexOf(';')); 2068 right = right.substring(right.indexOf(':') + 2, right.indexOf(';')); 2069 var correction = 2 * ((left ? parseInt(left) : 0) + (right ? parseInt(right) : 0)); 2070 tipObj.style.width = (tipObj.offsetWidth - correction) + 'px'; 2071 } 2072 2073 // if a width is not set on an absolutely positioned object, both IE and Opera 2074 // will attempt to wrap when it spills outside of body...we cannot have that 2075 if (domLib_isIE || domLib_isOpera) 2076 { 2077 if (!tipObj.style.width) 2078 { 2079 // HACK: the correction here is for a border 2080 tipObj.style.width = (tipObj.offsetWidth - 2) + 'px'; 2081 } 2082 2083 // HACK: the correction here is for a border 2084 tipObj.style.height = (tipObj.offsetHeight - 2) + 'px'; 2085 } 2086 2087 // store placement offsets from event position 2088 var offsetX, offsetY; 2089 2090 // tooltip floats 2091 if (in_options.get('position') == 'absolute' && !(in_options.has('x') && in_options.has('y'))) 2092 { 2093 // determine the offset relative to the pointer 2094 switch (in_options.get('direction')) 2095 { 2096 case 'northeast': 2097 offsetX = in_options.get('offsetX'); 2098 offsetY = 0 - tipObj.offsetHeight - in_options.get('offsetY'); 2099 break; 2100 case 'northwest': 2101 offsetX = 0 - tipObj.offsetWidth - in_options.get('offsetX'); 2102 offsetY = 0 - tipObj.offsetHeight - in_options.get('offsetY'); 2103 break; 2104 case 'north': 2105 offsetX = 0 - parseInt(tipObj.offsetWidth/2); 2106 offsetY = 0 - tipObj.offsetHeight - in_options.get('offsetY'); 2107 break; 2108 case 'southwest': 2109 offsetX = 0 - tipObj.offsetWidth - in_options.get('offsetX'); 2110 offsetY = in_options.get('offsetY'); 2111 break; 2112 case 'southeast': 2113 offsetX = in_options.get('offsetX'); 2114 offsetY = in_options.get('offsetY'); 2115 break; 2116 case 'south': 2117 offsetX = 0 - parseInt(tipObj.offsetWidth/2); 2118 offsetY = in_options.get('offsetY'); 2119 break; 2120 } 2121 2122 // if we are in an iframe, get the offsets of the iframe in the parent document 2123 if (in_options.get('inframe')) 2124 { 2125 var iframeObj = domLib_getIFrameReference(window); 2126 if (iframeObj) 2127 { 2128 var frameOffsets = domLib_getOffsets(iframeObj); 2129 offsetX += frameOffsets.get('left'); 2130 offsetY += frameOffsets.get('top'); 2131 } 2132 } 2133 } 2134 // tooltip is fixed 2135 else 2136 { 2137 offsetX = 0; 2138 offsetY = 0; 2139 in_options.set('trail', false); 2140 } 2141 2142 // set the direction-specific offsetX/Y 2143 in_options.set('offsetX', offsetX); 2144 in_options.set('offsetY', offsetY); 2145 if (in_options.get('clearMouse') && in_options.get('direction').indexOf('south') != -1) 2146 { 2147 in_options.set('mouseOffset', domTT_mouseHeight); 2148 } 2149 else 2150 { 2151 in_options.set('mouseOffset', 0); 2152 } 2153 2154 if (domLib_canFade && typeof(Fadomatic) == 'function') 2155 { 2156 if (in_options.get('fade') != 'neither') 2157 { 2158 var fadeHandler = new Fadomatic(tipObj, 10, 0, 0, in_options.get('fadeMax')); 2159 in_options.set('fadeHandler', fadeHandler); 2160 } 2161 } 2162 else 2163 { 2164 in_options.set('fade', 'neither'); 2165 } 2166 2167 // setup mouse events 2168 if (in_options.get('trail') && typeof(tipOwner.onmousemove) != 'function') 2169 { 2170 tipOwner.onmousemove = function(in_event) { domTT_mousemove(this, in_event); }; 2171 } 2172 2173 if (typeof(tipOwner.onmouseout) != 'function') 2174 { 2175 tipOwner.onmouseout = function(in_event) { domTT_mouseout(this, in_event); }; 2176 } 2177 2178 if (in_options.get('type') == 'sticky') 2179 { 2180 if (in_options.get('position') == 'absolute' && domTT_dragEnabled && in_options.get('draggable')) 2181 { 2182 if (domLib_isIE) 2183 { 2184 captionRow.onselectstart = function() { return false; }; 2185 } 2186 2187 // setup drag 2188 captionRow.onmousedown = function(in_event) { domTT_dragStart(tipObj, in_event); }; 2189 captionRow.onmousemove = function(in_event) { domTT_dragUpdate(in_event); }; 2190 captionRow.onmouseup = function() { domTT_dragStop(); }; 2191 } 2192 } 2193 else if (in_options.get('type') == 'velcro') 2194 { 2195 tipObj.onmouseout = function(in_event) { if (typeof(in_event) == 'undefined') { in_event = event; } if (!domLib_isDescendantOf(in_event[domLib_eventTo], tipObj)) { domTT_deactivate(tipOwner.id); }}; 2196 } 2197 2198 if (in_options.get('position') == 'relative') 2199 { 2200 tipObj.style.position = 'relative'; 2201 } 2202 2203 in_options.set('node', tipObj); 2204 in_options.set('status', 'inactive'); 2205 }; 2206 2207 // }}} 2208 // {{{ domTT_show() 2209 2210 // in_id is either tip id or the owner id 2211 function domTT_show(in_id, in_event) 2212 { 2213 // should always find one since this call would be cancelled if tip was killed 2214 var tooltip = domTT_tooltips.get(in_id); 2215 var status = tooltip.get('status'); 2216 var tipObj = tooltip.get('node'); 2217 2218 if (tooltip.get('position') == 'absolute') 2219 { 2220 var mouseX, mouseY; 2221 2222 if (tooltip.has('x') && tooltip.has('y')) 2223 { 2224 mouseX = tooltip.get('x'); 2225 mouseY = tooltip.get('y'); 2226 } 2227 else if (!domTT_useGlobalMousePosition || status == 'active' || tooltip.get('delay') == 0) 2228 { 2229 var eventPosition = domLib_getEventPosition(in_event); 2230 var eventX = eventPosition.get('x'); 2231 var eventY = eventPosition.get('y'); 2232 if (tooltip.get('inframe')) 2233 { 2234 eventX -= eventPosition.get('scrollX'); 2235 eventY -= eventPosition.get('scrollY'); 2236 } 2237 2238 // only move tip along requested trail axis when updating position 2239 if (status == 'active' && tooltip.get('trail') !== true) 2240 { 2241 var trail = tooltip.get('trail'); 2242 if (trail == 'x') 2243 { 2244 mouseX = eventX; 2245 mouseY = tooltip.get('mouseY'); 2246 } 2247 else if (trail == 'y') 2248 { 2249 mouseX = tooltip.get('mouseX'); 2250 mouseY = eventY; 2251 } 2252 } 2253 else 2254 { 2255 mouseX = eventX; 2256 mouseY = eventY; 2257 } 2258 } 2259 else 2260 { 2261 mouseX = domTT_mousePosition.get('x'); 2262 mouseY = domTT_mousePosition.get('y'); 2263 if (tooltip.get('inframe')) 2264 { 2265 mouseX -= domTT_mousePosition.get('scrollX'); 2266 mouseY -= domTT_mousePosition.get('scrollY'); 2267 } 2268 } 2269 2270 // we are using a grid for updates 2271 if (tooltip.get('grid')) 2272 { 2273 // if this is not a mousemove event or it is a mousemove event on an active tip and 2274 // the movement is bigger than the grid 2275 if (in_event.type != 'mousemove' || (status == 'active' && (Math.abs(tooltip.get('lastX') - mouseX) > tooltip.get('grid') || Math.abs(tooltip.get('lastY') - mouseY) > tooltip.get('grid')))) 2276 { 2277 tooltip.set('lastX', mouseX); 2278 tooltip.set('lastY', mouseY); 2279 } 2280 // did not satisfy the grid movement requirement 2281 else 2282 { 2283 return false; 2284 } 2285 } 2286 2287 // mouseX and mouseY store the last acknowleged mouse position, 2288 // good for trailing on one axis 2289 tooltip.set('mouseX', mouseX); 2290 tooltip.set('mouseY', mouseY); 2291 2292 var coordinates; 2293 if (domTT_screenEdgeDetection) 2294 { 2295 coordinates = domTT_correctEdgeBleed( 2296 tooltip.get('offsetWidth'), 2297 tooltip.get('offsetHeight'), 2298 mouseX, 2299 mouseY, 2300 tooltip.get('offsetX'), 2301 tooltip.get('offsetY'), 2302 tooltip.get('mouseOffset'), 2303 tooltip.get('inframe') ? window.parent : window 2304 ); 2305 } 2306 else 2307 { 2308 coordinates = { 2309 'x' : mouseX + tooltip.get('offsetX'), 2310 'y' : mouseY + tooltip.get('offsetY') + tooltip.get('mouseOffset') 2311 }; 2312 } 2313 2314 // update the position 2315 tipObj.style.left = coordinates.x + 'px'; 2316 tipObj.style.top = coordinates.y + 'px'; 2317 2318 // increase the tip zIndex so it goes over previously shown tips 2319 tipObj.style.zIndex = domLib_zIndex++; 2320 } 2321 2322 // if tip is not active, active it now and check for a fade in 2323 if (status == 'pending') 2324 { 2325 // unhide the tooltip 2326 tooltip.set('status', 'active'); 2327 tipObj.style.display = ''; 2328 tipObj.style.visibility = 'visible'; 2329 2330 var fade = tooltip.get('fade'); 2331 if (fade != 'neither') 2332 { 2333 var fadeHandler = tooltip.get('fadeHandler'); 2334 if (fade == 'out' || fade == 'both') 2335 { 2336 fadeHandler.haltFade(); 2337 if (fade == 'out') 2338 { 2339 fadeHandler.halt(); 2340 } 2341 } 2342 2343 if (fade == 'in' || fade == 'both') 2344 { 2345 fadeHandler.fadeIn(); 2346 } 2347 } 2348 2349 if (tooltip.get('type') == 'greasy' && tooltip.get('lifetime') != 0) 2350 { 2351 tooltip.set('lifetimeTimeout', domLib_setTimeout(domTT_runDeactivate, tooltip.get('lifetime'), [tipObj.id])); 2352 } 2353 } 2354 2355 if (tooltip.get('position') == 'absolute') 2356 { 2357 domLib_detectCollisions(tipObj); 2358 } 2359 } 2360 2361 // }}} 2362 // {{{ domTT_close() 2363 2364 // in_handle can either be an child object of the tip, the tip id or the owner id 2365 function domTT_close(in_handle) 2366 { 2367 var id; 2368 if (typeof(in_handle) == 'object' && in_handle.nodeType) 2369 { 2370 var obj = in_handle; 2371 while (!obj.id || !domTT_tooltips.get(obj.id)) 2372 { 2373 obj = obj.parentNode; 2374 2375 if (obj.nodeType != document.ELEMENT_NODE) { return; } 2376 } 2377 2378 id = obj.id; 2379 } 2380 else 2381 { 2382 id = in_handle; 2383 } 2384 2385 domTT_deactivate(id); 2386 } 2387 2388 // }}} 2389 // {{{ domTT_deactivate() 2390 2391 // in_id is either the tip id or the owner id 2392 function domTT_deactivate(in_id) 2393 { 2394 var tooltip = domTT_tooltips.get(in_id); 2395 if (tooltip) 2396 { 2397 var status = tooltip.get('status'); 2398 if (status == 'pending') 2399 { 2400 // cancel the creation of this tip if it is still pending 2401 domLib_clearTimeout(tooltip.get('activateTimeout')); 2402 tooltip.set('status', 'inactive'); 2403 } 2404 else if (status == 'active') 2405 { 2406 if (tooltip.get('lifetime')) 2407 { 2408 domLib_clearTimeout(tooltip.get('lifetimeTimeout')); 2409 } 2410 2411 var tipObj = tooltip.get('node'); 2412 if (tooltip.get('closeAction') == 'hide') 2413 { 2414 var fade = tooltip.get('fade'); 2415 if (fade != 'neither') 2416 { 2417 var fadeHandler = tooltip.get('fadeHandler'); 2418 if (fade == 'out' || fade == 'both') 2419 { 2420 fadeHandler.fadeOut(); 2421 } 2422 else 2423 { 2424 fadeHandler.hide(); 2425 } 2426 } 2427 else 2428 { 2429 tipObj.style.display = 'none'; 2430 } 2431 } 2432 else 2433 { 2434 tooltip.get('parent').removeChild(tipObj); 2435 domTT_tooltips.remove(tooltip.get('owner').id); 2436 domTT_tooltips.remove(tooltip.get('id')); 2437 } 2438 2439 tooltip.set('status', 'inactive'); 2440 // unhide all of the selects that are owned by this object 2441 domLib_detectCollisions(tipObj, true); 2442 } 2443 } 2444 } 2445 2446 // }}} 2447 // {{{ domTT_mouseout() 2448 2449 function domTT_mouseout(in_owner, in_event) 2450 { 2451 if (!domLib_useLibrary) { return false; } 2452 2453 if (typeof(in_event) == 'undefined') 2454 { 2455 in_event = event; 2456 } 2457 2458 var toChild = domLib_isDescendantOf(in_event[domLib_eventTo], in_owner); 2459 var tooltip = domTT_tooltips.get(in_owner.id); 2460 if (tooltip && (tooltip.get('type') == 'greasy' || tooltip.get('status') != 'active')) 2461 { 2462 // deactivate tip if exists and we moved away from the owner 2463 if (!toChild) 2464 { 2465 domTT_deactivate(in_owner.id); 2466 try { window.status = window.defaultStatus; } catch(e) {} 2467 } 2468 } 2469 else if (!toChild) 2470 { 2471 try { window.status = window.defaultStatus; } catch(e) {} 2472 } 2473 } 2474 2475 // }}} 2476 // {{{ domTT_mousemove() 2477 2478 function domTT_mousemove(in_owner, in_event) 2479 { 2480 if (!domLib_useLibrary) { return false; } 2481 2482 if (typeof(in_event) == 'undefined') 2483 { 2484 in_event = event; 2485 } 2486 2487 var tooltip = domTT_tooltips.get(in_owner.id); 2488 if (tooltip && tooltip.get('trail') && tooltip.get('status') == 'active') 2489 { 2490 // see if we are trailing lazy 2491 if (tooltip.get('lazy')) 2492 { 2493 domLib_setTimeout(domTT_runShow, domTT_trailDelay, [in_owner.id, in_event]); 2494 } 2495 else 2496 { 2497 domTT_show(in_owner.id, in_event); 2498 } 2499 } 2500 } 2501 2502 // }}} 2503 // {{{ domTT_addPredefined() 2504 2505 function domTT_addPredefined(in_id) 2506 { 2507 var options = new Hash(); 2508 for (var i = 1; i < arguments.length; i += 2) 2509 { 2510 options.set(arguments[i], arguments[i + 1]); 2511 } 2512 2513 domTT_predefined.set(in_id, options); 2514 } 2515 2516 // }}} 2517 // {{{ domTT_correctEdgeBleed() 2518 2519 function domTT_correctEdgeBleed(in_width, in_height, in_x, in_y, in_offsetX, in_offsetY, in_mouseOffset, in_window) 2520 { 2521 var win, doc; 2522 var bleedRight, bleedBottom; 2523 var pageHeight, pageWidth, pageYOffset, pageXOffset; 2524 2525 var x = in_x + in_offsetX; 2526 var y = in_y + in_offsetY + in_mouseOffset; 2527 2528 win = (typeof(in_window) == 'undefined' ? window : in_window); 2529 2530 // Gecko and IE swaps values of clientHeight, clientWidth properties when 2531 // in standards compliance mode from documentElement to document.body 2532 doc = ((domLib_standardsMode && (domLib_isIE || domLib_isGecko)) ? win.document.documentElement : win.document.body); 2533 2534 // for IE in compliance mode 2535 if (domLib_isIE) 2536 { 2537 pageHeight = doc.clientHeight; 2538 pageWidth = doc.clientWidth; 2539 pageYOffset = doc.scrollTop; 2540 pageXOffset = doc.scrollLeft; 2541 } 2542 else 2543 { 2544 pageHeight = doc.clientHeight; 2545 pageWidth = doc.clientWidth; 2546 2547 if (domLib_isKHTML) 2548 { 2549 pageHeight = win.innerHeight; 2550 } 2551 2552 pageYOffset = win.pageYOffset; 2553 pageXOffset = win.pageXOffset; 2554 } 2555 2556 // we are bleeding off the right, move tip over to stay on page 2557 // logic: take x position, add width and subtract from effective page width 2558 if ((bleedRight = (x - pageXOffset) + in_width - (pageWidth - domTT_screenEdgePadding)) > 0) 2559 { 2560 x -= bleedRight; 2561 } 2562 2563 // we are bleeding to the left, move tip over to stay on page 2564 // if tip doesn't fit, we will go back to bleeding off the right 2565 // logic: take x position and check if less than edge padding 2566 if ((x - pageXOffset) < domTT_screenEdgePadding) 2567 { 2568 x = domTT_screenEdgePadding + pageXOffset; 2569 } 2570 2571 // if we are bleeding off the bottom, flip to north 2572 // logic: take y position, add height and subtract from effective page height 2573 if ((bleedBottom = (y - pageYOffset) + in_height - (pageHeight - domTT_screenEdgePadding)) > 0) 2574 { 2575 y = in_y - in_height - in_offsetY; 2576 } 2577 2578 // if we are bleeding off the top, flip to south 2579 // if tip doesn't fit, we will go back to bleeding off the bottom 2580 // logic: take y position and check if less than edge padding 2581 if ((y - pageYOffset) < domTT_screenEdgePadding) 2582 { 2583 y = in_y + domTT_mouseHeight + in_offsetY; 2584 } 2585 2586 return {'x' : x, 'y' : y}; 2587 } 2588 2589 // }}} 2590 // {{{ domTT_isActive() 2591 2592 // in_id is either the tip id or the owner id 2593 function domTT_isActive(in_id) 2594 { 2595 var tooltip = domTT_tooltips.get(in_id); 2596 if (!tooltip || tooltip.get('status') != 'active') 2597 { 2598 return false; 2599 } 2600 else 2601 { 2602 return true; 2603 } 2604 } 2605 2606 // }}} 2607 // {{{ domTT_runXXX() 2608 2609 // All of these domMenu_runXXX() methods are used by the event handling sections to 2610 // avoid the circular memory leaks caused by inner functions 2611 function domTT_runDeactivate(args) { domTT_deactivate(args[0]); } 2612 function domTT_runShow(args) { domTT_show(args[0], args[1]); } 2613 2614 // }}} 2615 // {{{ domTT_replaceTitles() 2616 2617 function domTT_replaceTitles(in_decorator) 2618 { 2619 var elements = domLib_getElementsByClass('tooltip'); 2620 for (var i = 0; i < elements.length; i++) 2621 { 2622 if (elements[i].title) 2623 { 2624 var content; 2625 if (typeof(in_decorator) == 'function') 2626 { 2627 content = in_decorator(elements[i]); 2628 } 2629 else 2630 { 2631 content = elements[i].title; 2632 } 2633 2634 content = content.replace(new RegExp('\'', 'g'), '\\\''); 2635 elements[i].onmouseover = new Function('in_event', "domTT_activate(this, in_event, 'content', '" + content + "')"); 2636 elements[i].title = ''; 2637 } 2638 } 2639 } 2640 2641 // }}} 2642 // {{{ domTT_update() 2643 2644 // Allow authors to update the contents of existing tips using the DOM 2645 function domTT_update(handle, content, type) 2646 { 2647 // type defaults to 'content', can also be 'caption' 2648 if (typeof(type) == 'undefined') 2649 { 2650 type = 'content'; 2651 } 2652 2653 var tip = domTT_tooltips.get(handle); 2654 if (!tip) 2655 { 2656 return; 2657 } 2658 2659 var tipObj = tip.get('node'); 2660 var updateNode; 2661 if (type == 'content') 2662 { 2663 // <div class="contents">... 2664 updateNode = tipObj.firstChild; 2665 if (updateNode.className != 'contents') 2666 { 2667 // <table><tbody><tr>...</tr><tr><td><div class="contents">... 2668 updateNode = updateNode.firstChild.firstChild.nextSibling.firstChild.firstChild; 2669 } 2670 } 2671 else 2672 { 2673 updateNode = tipObj.firstChild; 2674 if (updateNode.className == 'contents') 2675 { 2676 // missing caption 2677 return; 2678 } 2679 2680 // <table><tbody><tr><td><div class="caption">... 2681 updateNode = updateNode.firstChild.firstChild.firstChild.firstChild; 2682 } 2683 2684 // TODO: allow for a DOM node as content 2685 updateNode.innerHTML = content; 2686 } 2687 2688 // }}} 2689 2690 2691 2692 /* XXXXXXXXXX end of /var/www/jalakai.co.uk/subdomains/wiki/dokuwiki_0/lib/scripts/domTT.js XXXXXXXXXX */ 2693 2694 2695 2696 /* XXXXXXXXXX begin of /var/www/jalakai.co.uk/subdomains/wiki/dokuwiki_0/lib/scripts/edit.js XXXXXXXXXX */ 2697 2698 /** 2699 * Functions for text editing (toolbar stuff) 2700 * 2701 * @todo I'm no JS guru please help if you know how to improve 2702 * @author Andreas Gohr <andi@splitbrain.org> 2703 */ 2704 2705 /** 2706 * Creates a toolbar button through the DOM 2707 * 2708 * Style the buttons through the toolbutton class 2709 * 2710 * @author Andreas Gohr <andi@splitbrain.org> 2711 */ 2712 function createToolButton(icon,label,key,id){ 2713 var btn = document.createElement('button'); 2714 var ico = document.createElement('img'); 2715 2716 // preapare the basic button stuff 2717 btn.className = 'toolbutton'; 2718 btn.title = label; 2719 if(key){ 2720 btn.title += ' [ALT+'+key.toUpperCase()+']'; 2721 btn.accessKey = key; 2722 } 2723 2724 // set IDs if given 2725 if(id){ 2726 btn.id = id; 2727 ico.id = id+'_ico'; 2728 } 2729 2730 // create the icon and add it to the button 2731 ico.src = DOKU_BASE+'lib/images/toolbar/'+icon; 2732 btn.appendChild(ico); 2733 2734 return btn; 2735 } 2736 2737 /** 2738 * Creates a picker window for inserting text 2739 * 2740 * The given list can be an associative array with text,icon pairs 2741 * or a simple list of text. Style the picker window through the picker 2742 * class or the picker buttons with the pickerbutton class. Picker 2743 * windows are appended to the body and created invisible. 2744 * 2745 * @author Andreas Gohr <andi@splitbrain.org> 2746 */ 2747 function createPicker(id,list,icobase,edid){ 2748 var cnt = list.length; 2749 2750 var picker = document.createElement('div'); 2751 picker.className = 'picker'; 2752 picker.id = id; 2753 picker.style.position = 'absolute'; 2754 picker.style.display = 'none'; 2755 2756 for(var key in list){ 2757 var btn = document.createElement('button'); 2758 2759 btn.className = 'pickerbutton'; 2760 2761 // associative array? 2762 if(isNaN(key)){ 2763 var ico = document.createElement('img'); 2764 ico.src = DOKU_BASE+'lib/images/'+icobase+'/'+list[key]; 2765 btn.title = key; 2766 btn.appendChild(ico); 2767 eval("btn.onclick = function(){pickerInsert('"+id+"','"+ 2768 jsEscape(key)+"','"+ 2769 jsEscape(edid)+"');return false;}"); 2770 }else{ 2771 var txt = document.createTextNode(list[key]); 2772 btn.title = list[key]; 2773 btn.appendChild(txt); 2774 eval("btn.onclick = function(){pickerInsert('"+id+"','"+ 2775 jsEscape(list[key])+"','"+ 2776 jsEscape(edid)+"');return false;}"); 2777 } 2778 2779 picker.appendChild(btn); 2780 } 2781 var body = document.getElementsByTagName('body')[0]; 2782 body.appendChild(picker); 2783 } 2784 2785 /** 2786 * Called by picker buttons to insert Text and close the picker again 2787 * 2788 * @author Andreas Gohr <andi@splitbrain.org> 2789 */ 2790 function pickerInsert(pickerid,text,edid){ 2791 // insert 2792 insertAtCarret(edid,text); 2793 // close picker 2794 pobj = document.getElementById(pickerid); 2795 pobj.style.display = 'none'; 2796 } 2797 2798 /** 2799 * Show a previosly created picker window 2800 * 2801 * @author Andreas Gohr <andi@splitbrain.org> 2802 */ 2803 function showPicker(pickerid,btn){ 2804 var picker = document.getElementById(pickerid); 2805 var x = findPosX(btn); 2806 var y = findPosY(btn); 2807 if(picker.style.display == 'none'){ 2808 picker.style.display = 'block'; 2809 picker.style.left = (x+3)+'px'; 2810 picker.style.top = (y+btn.offsetHeight+3)+'px'; 2811 }else{ 2812 picker.style.display = 'none'; 2813 } 2814 } 2815 2816 /** 2817 * Create a toolbar 2818 * 2819 * @param string tbid ID of the element where to insert the toolbar 2820 * @param string edid ID of the editor textarea 2821 * @param array tb Associative array defining the buttons 2822 * @author Andreas Gohr <andi@splitbrain.org> 2823 */ 2824 function initToolbar(tbid,edid,tb){ 2825 var toolbar = $(tbid); 2826 if(!toolbar) return; 2827 2828 //empty the toolbar area: 2829 toolbar.innerHTML=''; 2830 2831 var cnt = tb.length; 2832 for(var i=0; i<cnt; i++){ 2833 // create new button 2834 btn = createToolButton(tb[i]['icon'], 2835 tb[i]['title'], 2836 tb[i]['key']); 2837 2838 // add button action dependend on type 2839 switch(tb[i]['type']){ 2840 case 'format': 2841 var sample = tb[i]['title']; 2842 if(tb[i]['sample']){ sample = tb[i]['sample']; } 2843 2844 eval("btn.onclick = function(){insertTags('"+ 2845 jsEscape(edid)+"','"+ 2846 jsEscape(tb[i]['open'])+"','"+ 2847 jsEscape(tb[i]['close'])+"','"+ 2848 jsEscape(sample)+ 2849 "');return false;}"); 2850 toolbar.appendChild(btn); 2851 break; 2852 case 'insert': 2853 eval("btn.onclick = function(){insertAtCarret('"+ 2854 jsEscape(edid)+"','"+ 2855 jsEscape(tb[i]['insert'])+ 2856 "');return false;}"); 2857 toolbar.appendChild(btn); 2858 break; 2859 case 'signature': 2860 if(typeof(SIG) != 'undefined' && SIG != ''){ 2861 eval("btn.onclick = function(){insertAtCarret('"+ 2862 jsEscape(edid)+"','"+ 2863 jsEscape(SIG)+ 2864 "');return false;}"); 2865 toolbar.appendChild(btn); 2866 } 2867 break; 2868 case 'picker': 2869 createPicker('picker'+i, 2870 tb[i]['list'], 2871 tb[i]['icobase'], 2872 edid); 2873 eval("btn.onclick = function(){showPicker('picker"+i+ 2874 "',this);return false;}"); 2875 toolbar.appendChild(btn); 2876 break; 2877 case 'mediapopup': 2878 eval("btn.onclick = function(){window.open('"+ 2879 jsEscape(tb[i]['url']+NS)+"','"+ 2880 jsEscape(tb[i]['name'])+"','"+ 2881 jsEscape(tb[i]['options'])+ 2882 "');return false;}"); 2883 toolbar.appendChild(btn); 2884 break; 2885 } // end switch 2886 } // end for 2887 } 2888 2889 /** 2890 * Format selection 2891 * 2892 * Apply tagOpen/tagClose to selection in textarea, use sampleText instead 2893 * of selection if there is none. Copied and adapted from phpBB 2894 * 2895 * @author phpBB development team 2896 * @author MediaWiki development team 2897 * @author Andreas Gohr <andi@splitbrain.org> 2898 * @author Jim Raynor <jim_raynor@web.de> 2899 */ 2900 function insertTags(edid,tagOpen, tagClose, sampleText) { 2901 var txtarea = document.getElementById(edid); 2902 // IE 2903 if(document.selection && !is_gecko) { 2904 var theSelection = document.selection.createRange().text; 2905 var replaced = true; 2906 if(!theSelection){ 2907 replaced = false; 2908 theSelection=sampleText; 2909 } 2910 txtarea.focus(); 2911 2912 // This has change 2913 var text = theSelection; 2914 if(theSelection.charAt(theSelection.length - 1) == " "){// exclude ending space char, if any 2915 theSelection = theSelection.substring(0, theSelection.length - 1); 2916 r = document.selection.createRange(); 2917 r.text = tagOpen + theSelection + tagClose + " "; 2918 } else { 2919 r = document.selection.createRange(); 2920 r.text = tagOpen + theSelection + tagClose; 2921 } 2922 if(!replaced){ 2923 r.moveStart('character',-text.length-tagClose.length); 2924 r.moveEnd('character',-tagClose.length); 2925 } 2926 r.select(); 2927 // Mozilla 2928 } else if(txtarea.selectionStart || txtarea.selectionStart == '0') { 2929 replaced = false; 2930 var startPos = txtarea.selectionStart; 2931 var endPos = txtarea.selectionEnd; 2932 if(endPos - startPos){ replaced = true; } 2933 var scrollTop=txtarea.scrollTop; 2934 var myText = (txtarea.value).substring(startPos, endPos); 2935 if(!myText) { myText=sampleText;} 2936 if(myText.charAt(myText.length - 1) == " "){ // exclude ending space char, if any 2937 subst = tagOpen + myText.substring(0, (myText.length - 1)) + tagClose + " "; 2938 } else { 2939 subst = tagOpen + myText + tagClose; 2940 } 2941 txtarea.value = txtarea.value.substring(0, startPos) + subst + 2942 txtarea.value.substring(endPos, txtarea.value.length); 2943 txtarea.focus(); 2944 2945 //set new selection 2946 if(replaced){ 2947 var cPos=startPos+(tagOpen.length+myText.length+tagClose.length); 2948 txtarea.selectionStart=cPos; 2949 txtarea.selectionEnd=cPos; 2950 }else{ 2951 txtarea.selectionStart=startPos+tagOpen.length; 2952 txtarea.selectionEnd=startPos+tagOpen.length+myText.length; 2953 } 2954 txtarea.scrollTop=scrollTop; 2955 // All others 2956 } else { 2957 var copy_alertText=alertText; 2958 var re1=new RegExp("\\$1","g"); 2959 var re2=new RegExp("\\$2","g"); 2960 copy_alertText=copy_alertText.replace(re1,sampleText); 2961 copy_alertText=copy_alertText.replace(re2,tagOpen+sampleText+tagClose); 2962 2963 if (sampleText) { 2964 text=prompt(copy_alertText); 2965 } else { 2966 text=""; 2967 } 2968 if(!text) { text=sampleText;} 2969 text=tagOpen+text+tagClose; 2970 //append to the end 2971 txtarea.value += "\n"+text; 2972 2973 // in Safari this causes scrolling 2974 if(!is_safari) { 2975 txtarea.focus(); 2976 } 2977 2978 } 2979 // reposition cursor if possible 2980 if (txtarea.createTextRange){ 2981 txtarea.caretPos = document.selection.createRange().duplicate(); 2982 } 2983 } 2984 2985 /* 2986 * Insert the given value at the current cursor position 2987 * 2988 * @see http://www.alexking.org/index.php?content=software/javascript/content.php 2989 */ 2990 function insertAtCarret(edid,value){ 2991 var field = document.getElementById(edid); 2992 2993 //IE support 2994 if (document.selection) { 2995 field.focus(); 2996 sel = document.selection.createRange(); 2997 sel.text = value; 2998 //MOZILLA/NETSCAPE support 2999 }else if (field.selectionStart || field.selectionStart == '0') { 3000 var startPos = field.selectionStart; 3001 var endPos = field.selectionEnd; 3002 var scrollTop = field.scrollTop; 3003 field.value = field.value.substring(0, startPos) + 3004 value + 3005 field.value.substring(endPos, field.value.length); 3006 3007 field.focus(); 3008 var cPos=startPos+(value.length); 3009 field.selectionStart=cPos; 3010 field.selectionEnd=cPos; 3011 field.scrollTop=scrollTop; 3012 } else { 3013 field.value += "\n"+value; 3014 } 3015 // reposition cursor if possible 3016 if (field.createTextRange){ 3017 field.caretPos = document.selection.createRange().duplicate(); 3018 } 3019 } 3020 3021 3022 /** 3023 * global var used for not saved yet warning 3024 */ 3025 var textChanged = false; 3026 3027 /** 3028 * Check for changes before leaving the page 3029 */ 3030 function changeCheck(msg){ 3031 if(textChanged){ 3032 var ok = confirm(msg); 3033 if(ok){ 3034 // remove a possibly saved draft using ajax 3035 var dwform = $('dw__editform'); 3036 if(dwform){ 3037 var params = 'call=draftdel'; 3038 params += '&id='+dwform.elements.id.value; 3039 3040 var sackobj = new sack(DOKU_BASE + 'lib/exe/ajax.php'); 3041 sackobj.AjaxFailedAlert = ''; 3042 sackobj.encodeURIString = false; 3043 sackobj.runAJAX(params); 3044 // we send this request blind without waiting for 3045 // and handling the returned data 3046 } 3047 } 3048 return ok; 3049 }else{ 3050 return true; 3051 } 3052 } 3053 3054 /** 3055 * Add changeCheck to all Links and Forms (except those with a 3056 * JSnocheck class), add handlers to monitor changes 3057 * 3058 * Sets focus to the editbox as well 3059 */ 3060 function initChangeCheck(msg){ 3061 if(!document.getElementById){ return false; } 3062 // add change check for links 3063 var links = document.getElementsByTagName('a'); 3064 for(var i=0; i < links.length; i++){ 3065 if(links[i].className.indexOf('JSnocheck') == -1){ 3066 links[i].onclick = function(){ 3067 var rc = changeCheck(msg); 3068 if(window.event) window.event.returnValue = rc; 3069 return rc; 3070 }; 3071 links[i].onkeypress = function(){ 3072 var rc = changeCheck(msg); 3073 if(window.event) window.event.returnValue = rc; 3074 return rc; 3075 }; 3076 } 3077 } 3078 // add change check for forms 3079 var forms = document.forms; 3080 for(i=0; i < forms.length; i++){ 3081 if(forms[i].className.indexOf('JSnocheck') == -1){ 3082 forms[i].onsubmit = function(){ 3083 var rc = changeCheck(msg); 3084 if(window.event) window.event.returnValue = rc; 3085 return rc; 3086 }; 3087 } 3088 } 3089 3090 // reset change memory var on submit 3091 var btn_save = document.getElementById('edbtn__save'); 3092 btn_save.onclick = function(){ textChanged = false; }; 3093 btn_save.onkeypress = function(){ textChanged = false; }; 3094 var btn_prev = document.getElementById('edbtn__preview'); 3095 btn_prev.onclick = function(){ textChanged = false; }; 3096 btn_prev.onkeypress = function(){ textChanged = false; }; 3097 3098 // add change memory setter 3099 var edit_text = document.getElementById('wiki__text'); 3100 edit_text.onchange = function(){ 3101 textChanged = true; //global var 3102 summaryCheck(); 3103 }; 3104 edit_text.onkeyup = summaryCheck; 3105 var summary = document.getElementById('edit__summary'); 3106 addEvent(summary, 'change', summaryCheck); 3107 addEvent(summary, 'keyup', summaryCheck); 3108 3109 // set focus 3110 edit_text.focus(); 3111 } 3112 3113 /** 3114 * Checks if a summary was entered - if not the style is changed 3115 * 3116 * @author Andreas Gohr <andi@splitbrain.org> 3117 */ 3118 function summaryCheck(){ 3119 var sum = document.getElementById('edit__summary'); 3120 if(sum.value === ''){ 3121 sum.className='missing'; 3122 }else{ 3123 sum.className='edit'; 3124 } 3125 } 3126 3127 3128 /** 3129 * Class managing the timer to display a warning on a expiring lock 3130 */ 3131 function locktimer_class(){ 3132 this.sack = null; 3133 this.timeout = 0; 3134 this.timerID = null; 3135 this.lasttime = null; 3136 this.msg = ''; 3137 this.pageid = ''; 3138 }; 3139 var locktimer = new locktimer_class(); 3140 locktimer.init = function(timeout,msg,draft){ 3141 // init values 3142 locktimer.timeout = timeout*1000; 3143 locktimer.msg = msg; 3144 locktimer.draft = draft; 3145 locktimer.lasttime = new Date(); 3146 3147 if(!$('dw__editform')) return; 3148 locktimer.pageid = $('dw__editform').elements.id.value; 3149 if(!locktimer.pageid) return; 3150 3151 // init ajax component 3152 locktimer.sack = new sack(DOKU_BASE + 'lib/exe/ajax.php'); 3153 locktimer.sack.AjaxFailedAlert = ''; 3154 locktimer.sack.encodeURIString = false; 3155 locktimer.sack.onCompletion = locktimer.refreshed; 3156 3157 // register refresh event 3158 addEvent($('dw__editform').elements.wikitext,'keyup',function(){locktimer.refresh();}); 3159 3160 // start timer 3161 locktimer.reset(); 3162 }; 3163 3164 /** 3165 * (Re)start the warning timer 3166 */ 3167 locktimer.reset = function(){ 3168 locktimer.clear(); 3169 locktimer.timerID = window.setTimeout("locktimer.warning()", locktimer.timeout); 3170 }; 3171 3172 /** 3173 * Display the warning about the expiring lock 3174 */ 3175 locktimer.warning = function(){ 3176 locktimer.clear(); 3177 alert(locktimer.msg); 3178 }; 3179 3180 /** 3181 * Remove the current warning timer 3182 */ 3183 locktimer.clear = function(){ 3184 if(locktimer.timerID !== null){ 3185 window.clearTimeout(locktimer.timerID); 3186 locktimer.timerID = null; 3187 } 3188 }; 3189 3190 /** 3191 * Refresh the lock via AJAX 3192 * 3193 * Called on keypresses in the edit area 3194 */ 3195 locktimer.refresh = function(){ 3196 var now = new Date(); 3197 // refresh every minute only 3198 if(now.getTime() - locktimer.lasttime.getTime() > 30*1000){ //FIXME decide on time 3199 var params = 'call=lock&id='+encodeURI(locktimer.pageid); 3200 if(locktimer.draft){ 3201 var dwform = $('dw__editform'); 3202 params += '&prefix='+encodeURI(dwform.elements.prefix.value); 3203 params += '&wikitext='+encodeURI(dwform.elements.wikitext.value); 3204 params += '&suffix='+encodeURI(dwform.elements.suffix.value); 3205 params += '&date='+encodeURI(dwform.elements.date.value); 3206 } 3207 locktimer.sack.runAJAX(params); 3208 locktimer.lasttime = now; 3209 } 3210 }; 3211 3212 3213 /** 3214 * Callback. Resets the warning timer 3215 */ 3216 locktimer.refreshed = function(){ 3217 var data = this.response; 3218 var error = data.charAt(0); 3219 data = data.substring(1); 3220 3221 $('draft__status').innerHTML=data; 3222 if(error != '1') return; // locking failed 3223 locktimer.reset(); 3224 }; 3225 // end of locktimer class functions 3226 3227 3228 3229 /* XXXXXXXXXX end of /var/www/jalakai.co.uk/subdomains/wiki/dokuwiki_0/lib/scripts/edit.js XXXXXXXXXX */ 3230 3231 3232 3233 /* XXXXXXXXXX begin of /var/www/jalakai.co.uk/subdomains/wiki/dokuwiki_0/lib/scripts/media.js XXXXXXXXXX */ 3234 3235 /** 3236 * JavaScript functionalitiy for the media management popup 3237 * 3238 * @author Andreas Gohr <andi@splitbrain.org> 3239 */ 3240 media = { 3241 keepopen: false, 3242 hide: false, 3243 3244 /** 3245 * Attach event handlers to all "folders" below the given element 3246 * 3247 * @author Andreas Gohr <andi@splitbrain.org> 3248 */ 3249 treeattach: function(obj){ 3250 if(!obj) return; 3251 3252 var items = obj.getElementsByTagName('li'); 3253 for(var i=0; i<items.length; i++){ 3254 var elem = items[i]; 3255 3256 // attach action to make the +/- clickable 3257 var clicky = elem.getElementsByTagName('img')[0]; 3258 clicky.style.cursor = 'pointer'; 3259 addEvent(clicky,'click',function(event){ return media.toggle(event,this); }); 3260 3261 // attach action load folder list via AJAX 3262 var link = elem.getElementsByTagName('a')[0]; 3263 link.style.cursor = 'pointer'; 3264 addEvent(link,'click',function(event){ return media.list(event,this); }); 3265 } 3266 }, 3267 3268 /** 3269 * Attach the image selector action to all links below the given element 3270 * also add the action to autofill the "upload as" field 3271 * 3272 * @author Andreas Gohr <andi@splitbrain.org> 3273 */ 3274 selectorattach: function(obj){ 3275 if(!obj) return; 3276 3277 var items = getElementsByClass('select',obj,'a'); 3278 for(var i=0; i<items.length; i++){ 3279 var elem = items[i]; 3280 elem.style.cursor = 'pointer'; 3281 addEvent(elem,'click',function(event){ return media.select(event,this); }); 3282 } 3283 3284 // hide syntax example 3285 items = getElementsByClass('example',obj,'div'); 3286 for(var i=0; i<items.length; i++){ 3287 elem = items[i]; 3288 elem.style.display = 'none'; 3289 } 3290 3291 var file = $('upload__file'); 3292 if(!file) return; 3293 addEvent(file,'change',media.suggest); 3294 }, 3295 3296 /** 3297 * Creates checkboxes for additional options 3298 * 3299 * @author Andreas Gohr <andi@splitbrain.org> 3300 */ 3301 attachoptions: function(obj){ 3302 if(!obj) return; 3303 3304 // keep open 3305 if(opener){ 3306 var kobox = document.createElement('input'); 3307 kobox.type = 'checkbox'; 3308 kobox.id = 'media__keepopen'; 3309 if(DokuCookie.getValue('keepopen')){ 3310 kobox.checked = true; 3311 kobox.defaultChecked = true; //IE wants this 3312 media.keepopen = true; 3313 } 3314 addEvent(kobox,'click',function(event){ return media.togglekeepopen(event,this); }); 3315 3316 var kolbl = document.createElement('label'); 3317 kolbl.htmlFor = 'media__keepopen'; 3318 kolbl.innerHTML = LANG['keepopen']; 3319 3320 var kobr = document.createElement('br'); 3321 3322 obj.appendChild(kobox); 3323 obj.appendChild(kolbl); 3324 obj.appendChild(kobr); 3325 } 3326 3327 // hide details 3328 var hdbox = document.createElement('input'); 3329 hdbox.type = 'checkbox'; 3330 hdbox.id = 'media__hide'; 3331 if(DokuCookie.getValue('hide')){ 3332 hdbox.checked = true; 3333 hdbox.defaultChecked = true; //IE wants this 3334 media.hide = true; 3335 } 3336 addEvent(hdbox,'click',function(event){ return media.togglehide(event,this); }); 3337 3338 var hdlbl = document.createElement('label'); 3339 hdlbl.htmlFor = 'media__hide'; 3340 hdlbl.innerHTML = LANG['hidedetails']; 3341 3342 var hdbr = document.createElement('br'); 3343 3344 obj.appendChild(hdbox); 3345 obj.appendChild(hdlbl); 3346 obj.appendChild(hdbr); 3347 media.updatehide(); 3348 }, 3349 3350 /** 3351 * Toggles the keep open state 3352 * 3353 * @author Andreas Gohr <andi@splitbrain.org> 3354 */ 3355 togglekeepopen: function(event,cb){ 3356 if(cb.checked){ 3357 DokuCookie.setValue('keepopen',1); 3358 media.keepopen = true; 3359 }else{ 3360 DokuCookie.setValue('keepopen',''); 3361 media.keepopen = false; 3362 } 3363 }, 3364 3365 /** 3366 * Toggles the hide details state 3367 * 3368 * @author Andreas Gohr <andi@splitbrain.org> 3369 */ 3370 togglehide: function(event,cb){ 3371 if(cb.checked){ 3372 DokuCookie.setValue('hide',1); 3373 media.hide = true; 3374 }else{ 3375 DokuCookie.setValue('hide',''); 3376 media.hide = false; 3377 } 3378 media.updatehide(); 3379 }, 3380 3381 /** 3382 * Sets the visibility of the image details accordingly to the 3383 * chosen hide state 3384 * 3385 * @author Andreas Gohr <andi@splitbrain.org> 3386 */ 3387 updatehide: function(){ 3388 var obj = $('media__content'); 3389 if(!obj) return; 3390 var details = getElementsByClass('detail',obj,'div'); 3391 for(var i=0; i<details.length; i++){ 3392 if(media.hide){ 3393 details[i].style.display = 'none'; 3394 }else{ 3395 details[i].style.display = ''; 3396 } 3397 } 3398 }, 3399 3400 /** 3401 * Insert the clicked image into the opener's textarea 3402 * 3403 * @author Andreas Gohr <andi@splitbrain.org> 3404 */ 3405 select: function(event,link){ 3406 var id = link.name.substr(2); 3407 3408 if(!opener){ 3409 // if we don't run in popup display example 3410 var ex = $('ex_'+id); 3411 if(ex.style.display == ''){ 3412 ex.style.display = 'none'; 3413 }else{ 3414 ex.style.display = ''; 3415 } 3416 return false; 3417 } 3418 opener.insertTags('wiki__text','{{'+id+'|','}}',''); 3419 3420 if(!media.keepopen) window.close(); 3421 opener.focus(); 3422 return false; 3423 }, 3424 3425 /** 3426 * list the content of a namespace using AJAX 3427 * 3428 * @author Andreas Gohr <andi@splitbrain.org> 3429 */ 3430 list: function(event,link){ 3431 // prepare an AJAX call to fetch the subtree 3432 var ajax = new sack(DOKU_BASE + 'lib/exe/ajax.php'); 3433 ajax.AjaxFailedAlert = ''; 3434 ajax.encodeURIString = false; 3435 if(ajax.failed) return true; 3436 3437 cleanMsgArea(); 3438 3439 var content = $('media__content'); 3440 content.innerHTML = '<img src="'+DOKU_BASE+'lib/images/loading.gif" alt="..." class="load" />'; 3441 3442 ajax.elementObj = content; 3443 ajax.afterCompletion = function(){ 3444 media.selectorattach(content); 3445 media.updatehide(); 3446 }; 3447 ajax.runAJAX(link.search.substr(1)+'&call=medialist'); 3448 return false; 3449 }, 3450 3451 3452 /** 3453 * Open or close a subtree using AJAX 3454 * 3455 * @author Andreas Gohr <andi@splitbrain.org> 3456 */ 3457 toggle: function(event,clicky){ 3458 var listitem = clicky.parentNode; 3459 3460 // if already open, close by removing the sublist 3461 var sublists = listitem.getElementsByTagName('ul'); 3462 if(sublists.length){ 3463 listitem.removeChild(sublists[0]); 3464 clicky.src = DOKU_BASE+'lib/images/plus.gif'; 3465 return false; 3466 } 3467 3468 // get the enclosed link (is always the first one) 3469 var link = listitem.getElementsByTagName('a')[0]; 3470 3471 // prepare an AJAX call to fetch the subtree 3472 var ajax = new sack(DOKU_BASE + 'lib/exe/ajax.php'); 3473 ajax.AjaxFailedAlert = ''; 3474 ajax.encodeURIString = false; 3475 if(ajax.failed) return true; 3476 3477 //prepare the new ul 3478 var ul = document.createElement('ul'); 3479 //fixme add classname here 3480 listitem.appendChild(ul); 3481 ajax.elementObj = ul; 3482 ajax.afterCompletion = function(){ media.treeattach(ul); }; 3483 ajax.runAJAX(link.search.substr(1)+'&call=medians'); 3484 clicky.src = DOKU_BASE+'lib/images/minus.gif'; 3485 return false; 3486 }, 3487 3488 /** 3489 * Prefills the wikiname. 3490 * 3491 * @author Andreas Gohr <andi@splitbrain.org> 3492 */ 3493 suggest: function(){ 3494 var file = $('upload__file'); 3495 var name = $('upload__name'); 3496 if(!file || !name) return; 3497 3498 var text = file.value; 3499 text = text.substr(text.lastIndexOf('/')+1); 3500 text = text.substr(text.lastIndexOf('\\')+1); 3501 name.value = text; 3502 } 3503 3504 }; 3505 3506 addInitEvent(function(){ 3507 media.treeattach($('media__tree')); 3508 media.selectorattach($('media__content')); 3509 media.attachoptions($('media__opts')); 3510 }); 3511 3512 3513 /* XXXXXXXXXX end of /var/www/jalakai.co.uk/subdomains/wiki/dokuwiki_0/lib/scripts/media.js XXXXXXXXXX */ 3514 3515 3516 3517 /* XXXXXXXXXX begin of /var/www/jalakai.co.uk/subdomains/wiki/dokuwiki_0/lib/tpl/default/script.js XXXXXXXXXX */ 3518 3519 3520 3521 /* XXXXXXXXXX end of /var/www/jalakai.co.uk/subdomains/wiki/dokuwiki_0/lib/tpl/default/script.js XXXXXXXXXX */ 3522 3523 addInitEvent(function(){ ajax_qsearch.init('qsearch__in','qsearch__out'); }); 3524 addInitEvent(function(){ addEvent(document,'click',closePopups); }); 3525 addInitEvent(function(){ addTocToggle(); }); 3526 addInitEvent(function(){ initSizeCtl('size__ctl','wiki__text'); }); 3527 var toolbar = [{"type":"format","title":"Bold Text","icon":"bold.png","key":"b","open":"**","close":"**"},{"type":"format","title":"Italic Text","icon":"italic.png","key":"i","open":"\/\/","close":"\/\/"},{"type":"format","title":"Underlined Text","icon":"underline.png","key":"u","open":"__","close":"__"},{"type":"format","title":"Code Text","icon":"mono.png","key":"c","open":"''","close":"''"},{"type":"format","title":"Strike-through Text","icon":"strike.png","key":"d","open":"<del>","close":"<\/del>"},{"type":"format","title":"Level 1 Headline","icon":"h1.png","key":"1","open":"====== ","close":" ======\\n"},{"type":"format","title":"Level 2 Headline","icon":"h2.png","key":"2","open":"===== ","close":" =====\\n"},{"type":"format","title":"Level 3 Headline","icon":"h3.png","key":"3","open":"==== ","close":" ====\\n"},{"type":"format","title":"Level 4 Headline","icon":"h4.png","key":"4","open":"=== ","close":" ===\\n"},{"type":"format","title":"Level 5 Headline","icon":"h5.png","key":"5","open":"== ","close":" ==\\n"},{"type":"format","title":"Internal Link","icon":"link.png","key":"l","open":"[[","close":"]]"},{"type":"format","title":"External Link","icon":"linkextern.png","open":"[[","close":"]]","sample":"http:\/\/example.com|External Link"},{"type":"format","title":"Ordered List Item","icon":"ol.png","open":" - ","close":"\\n"},{"type":"format","title":"Unordered List Item","icon":"ul.png","open":" * ","close":"\\n"},{"type":"insert","title":"Horizontal Rule","icon":"hr.png","insert":"----\\n"},{"type":"mediapopup","title":"Add Images and other files","icon":"image.png","url":"http:\/\/wiki.jalakai.co.uk\/dokuwiki_0\/lib\/exe\/mediamanager.php?ns=","name":"mediaselect","options":"width=750,height=500,left=20,top=20,scrollbars=yes,resizable=yes"},{"type":"picker","title":"Smileys","icon":"smiley.png","list":{"8-)":"icon_cool.gif","8-O":"icon_eek.gif","8-o":"icon_eek.gif",":-(":"icon_sad.gif",":-)":"icon_smile.gif","=)":"icon_smile2.gif",":-\/":"icon_doubt.gif",":-\\":"icon_doubt2.gif",":-?":"icon_confused.gif",":-D":"icon_biggrin.gif",":-P":"icon_razz.gif",":-o":"icon_surprised.gif",":-O":"icon_surprised.gif",":-x":"icon_silenced.gif",":-X":"icon_silenced.gif",":-|":"icon_neutral.gif",";-)":"icon_wink.gif","^_^":"icon_fun.gif",":?:":"icon_question.gif",":!:":"icon_exclaim.gif","LOL":"icon_lol.gif","FIXME":"fixme.gif","DELETEME":"delete.gif"},"icobase":"smileys"},{"type":"picker","title":"Special Chars","icon":"chars.png","list":["\u00c0","\u00e0","\u00c1","\u00e1","\u00c2","\u00e2","\u00c3","\u00e3","\u00c4","\u00e4","\u01cd","\u01ce","\u0102","\u0103","\u00c5","\u00e5","\u0100","\u0101","\u0104","\u0105","\u00c6","\u00e6","\u0106","\u0107","\u00c7","\u00e7","\u010c","\u010d","\u0108","\u0109","\u010a","\u010b","\u00d0","\u0111","\u00f0","\u010e","\u010f","\u00c8","\u00e8","\u00c9","\u00e9","\u00ca","\u00ea","\u00cb","\u00eb","\u011a","\u011b","\u0112","\u0113","\u0116","\u0117","\u0118","\u0119","\u0122","\u0123","\u011c","\u011d","\u011e","\u011f","\u0120","\u0121","\u0124","\u0125","\u00cc","\u00ec","\u00cd","\u00ed","\u00ce","\u00ee","\u00cf","\u00ef","\u01cf","\u01d0","\u012a","\u012b","\u0130","\u0131","\u012e","\u012f","\u0134","\u0135","\u0136","\u0137","\u0139","\u013a","\u013b","\u013c","\u013d","\u013e","\u0141","\u0142","\u013f","\u0140","\u0143","\u0144","\u00d1","\u00f1","\u0145","\u0146","\u0147","\u0148","\u00d2","\u00f2","\u00d3","\u00f3","\u00d4","\u00f4","\u00d5","\u00f5","\u00d6","\u00f6","\u01d1","\u01d2","\u014c","\u014d","\u0150","\u0151","\u0152","\u0153","\u00d8","\u00f8","\u0154","\u0155","\u0156","\u0157","\u0158","\u0159","\u015a","\u015b","\u015e","\u015f","\u0160","\u0161","\u015c","\u015d","\u0162","\u0163","\u0164","\u0165","\u00d9","\u00f9","\u00da","\u00fa","\u00db","\u00fb","\u00dc","\u00fc","\u01d3","\u01d4","\u016c","\u016d","\u016a","\u016b","\u016e","\u016f","\u01d6","\u01d8","\u01da","\u01dc","\u0172","\u0173","\u0170","\u0171","\u0174","\u0175","\u00dd","\u00fd","\u0178","\u00ff","\u0176","\u0177","\u0179","\u017a","\u017d","\u017e","\u017b","\u017c","\u00de","\u00fe","\u00df","\u0126","\u0127","\u00bf","\u00a1","\u00a2","\u00a3","\u00a4","\u00a5","\u20ac","\u00a6","\u00a7","\u00aa","\u00ac","\u00af","\u00b0","\u00b1","\u00f7","\u2030","\u00bc","\u00bd","\u00be","\u00b9","\u00b2","\u00b3","\u00b5","\u00b6","\u2020","\u2021","\u00b7","\u2022","\u00ba","\u2200","\u2202","\u2203","\u018f","\u0259","\u2205","\u2207","\u2208","\u2209","\u220b","\u220f","\u2211","\u203e","\u2212","\u2217","\u221a","\u221d","\u221e","\u2220","\u2227","\u2228","\u2229","\u222a","\u222b","\u2234","\u223c","\u2245","\u2248","\u2260","\u2261","\u2264","\u2265","\u2282","\u2283","\u2284","\u2286","\u2287","\u2295","\u2297","\u22a5","\u22c5","\u25ca","\u2118","\u2111","\u211c","\u2135","\u2660","\u2663","\u2665","\u2666","\u03b1","\u03b2","\u0393","\u03b3","\u0394","\u03b4","\u03b5","\u03b6","\u03b7","\u0398","\u03b8","\u03b9","\u03ba","\u039b","\u03bb","\u03bc","\u039e","\u03be","\u03a0","\u03c0","\u03c1","\u03a3","\u03c3","\u03a4","\u03c4","\u03c5","\u03a6","\u03c6","\u03c7","\u03a8","\u03c8","\u03a9","\u03c9","\u2605","\u2606","\u260e","\u261a","\u261b","\u261c","\u261d","\u261e","\u261f","\u2639","\u263a","\u2714","\u2718"]},{"type":"signature","title":"Insert Signature","icon":"sig.png","key":"y"}]; 3528 addInitEvent(function(){ initToolbar('tool__bar','wiki__text',toolbar); }); 3529 addInitEvent(function(){ initChangeCheck('Unsaved changes will be lost.\nReally continue?'); }); 3530 addInitEvent(function(){ locktimer.init(840,'Your lock for editing this page is about to expire in a minute.\nTo avoid conflicts use the preview button to reset the locktimer.',1); }); 3531 addInitEvent(function(){ updateAccessKeyTooltip(); }); 3532 addInitEvent(function(){ scrollToMarker(); }); 3533 addInitEvent(function(){ focusMarker(); });
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Sat Dec 16 05:46:24 2006 | Cross-referenced by PHPXref 0.6 |