Software: Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.12 with Suhosin-Patch mod_ssl/2.2.8 OpenSSL/0.9.8g. PHP/5.2.4-2ubuntu5.12 uname -a: Linux forum.circlefusion.com 2.6.24-19-server #1 SMP Wed Jun 18 15:18:00 UTC 2008 i686 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /home/doku/axrepos/axess/old/wiki/lib/scripts/ drwxrwxr-x |
Viewing file: index.js (2.81 KB) -rw-rw-r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) | /** * Javascript for index view * * @author Andreas Gohr <andi@splitbrain.org> */ index = { /** * Delay in ms before showing the throbber. * Used to skip the throbber for fast AJAX calls. */ throbber_delay: 500, /** * Attach event handlers to all "folders" below the given element * * @author Andreas Gohr <andi@splitbrain.org> */ treeattach: function(obj){ if(!obj) return; var items = getElementsByClass('idx_dir',obj,'a'); for(var i=0; i<items.length; i++){ var elem = items[i]; // attach action to make the link clickable by AJAX addEvent(elem,'click',function(e){ return index.toggle(e,this); }); } }, /** * Open or close a subtree using AJAX * The contents of subtrees are "cached" untill the page is reloaded. * A "loading" indicator is shown only when the AJAX call is slow. * * @author Andreas Gohr <andi@splitbrain.org> * @author Ben Coburn <btcoburn@silicodon.net> */ toggle: function(e,clicky){ var listitem = clicky.parentNode.parentNode; // if already open, close by removing the sublist var sublists = listitem.getElementsByTagName('ul'); if(sublists.length && listitem.className=='open'){ sublists[0].style.display='none'; listitem.className='closed'; e.preventDefault(); return false; } // just show if already loaded if(sublists.length && listitem.className=='closed'){ sublists[0].style.display=''; listitem.className='open'; e.preventDefault(); return false; } // prepare an AJAX call to fetch the subtree var ajax = new sack(DOKU_BASE + 'lib/exe/ajax.php'); ajax.AjaxFailedAlert = ''; ajax.encodeURIString = false; if(ajax.failed) return true; //prepare the new ul var ul = document.createElement('ul'); ul.className = 'idx'; timeout = window.setTimeout(function(){ // show the throbber as needed ul.innerHTML = '<li><img src="'+DOKU_BASE+'lib/images/throbber.gif" alt="loading..." title="loading..." /></li>'; listitem.appendChild(ul); listitem.className='open'; }, this.throbber_delay); ajax.elementObj = ul; ajax.afterCompletion = function(){ window.clearTimeout(timeout); index.treeattach(ul); if (listitem.className!='open') { listitem.appendChild(ul); listitem.className='open'; } }; ajax.runAJAX(clicky.search.substr(1)+'&call=index'); e.preventDefault(); return false; } }; addInitEvent(function(){ index.treeattach($('index__tree')); }); |
:: Command execute :: | |
--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0062 ]-- |