From cd06d16faa924afeb14f864b058e01ce8867057c Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Tue, 21 Jun 2011 13:30:18 +0200 Subject: Fix index Javascript, introduce compatibility.js * Removed "use strict" statement, since it does not work with our script file joining (the statement has to be the first in a file or function) * Make index a global object again to allow overriding and enhancing * Use prefix dw_ for index object * Reintroduce index.treeattach * Support deprecated index.toggle calling convention * Add $ prefix for jQuery variables * Use slide animation for freshly loaded sublists as well * Fix various errors --- lib/scripts/compatibility.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lib/scripts/compatibility.js (limited to 'lib/scripts/compatibility.js') diff --git a/lib/scripts/compatibility.js b/lib/scripts/compatibility.js new file mode 100644 index 000000000..559cc359a --- /dev/null +++ b/lib/scripts/compatibility.js @@ -0,0 +1,16 @@ +/*jslint sloppy: true */ +/*global dw_index, DEPRECATED */ + +var index = { + throbber_delay: dw_index.throbber_delay, + + toggle: function () { + DEPRECATED(); + dw_index.toggle.apply(dw_index, arguments); + }, + + treeattach: function () { + DEPRECATED(); + dw_index.treeattach.apply(dw_index, arguments); + } +}; -- cgit v1.2.3