diff options
author | Adrian Lang <mail@adrianlang.de> | 2011-06-22 21:05:17 +0200 |
---|---|---|
committer | Adrian Lang <mail@adrianlang.de> | 2011-06-23 18:04:16 +0200 |
commit | c949174a2e8c324e3e463a9d10e9e6dc07b0ba9e (patch) | |
tree | 46188ecb6faa8eed7765e408ff4905197e868e38 /lib/scripts/script.js | |
parent | 0748b4c7cb6a4918212b51bdedad710322ab2a0b (diff) | |
download | dokuwiki-c949174a2e8c324e3e463a9d10e9e6dc07b0ba9e.tar.gz dokuwiki-c949174a2e8c324e3e463a9d10e9e6dc07b0ba9e.zip |
Fix and refactor ajax.js
* Move file to qsearch.js
* Rename object to dw_qsearch
* Remove unnecessary usage of Delay
* Use $ prefix for jQuery objects
* Fix result list hiding on click
* Fix namespace shorting
Diffstat (limited to 'lib/scripts/script.js')
-rw-r--r-- | lib/scripts/script.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/scripts/script.js b/lib/scripts/script.js index a673cdc02..8adba829c 100644 --- a/lib/scripts/script.js +++ b/lib/scripts/script.js @@ -28,6 +28,21 @@ function DEPRECATED(msg){ if(console.trace) console.trace(); } +/** + * Construct a wrapper function for deprecated function names + * + * This function returns a wrapper function which just calls DEPRECATED + * and the new function. + * + * @param func The new function + * @param context Optional; The context (`this`) of the call + */ +function DEPRECATED_WRAP(func, context) { + return function () { + DEPRECATED(); + return func.apply(context || this, arguments); + } +} /** * Some of these scripts were taken from wikipedia.org and were modified for DokuWiki |