Django-pipeline (which is a css/js compressor) collects together all js files into a single js file, and then wraps it into an anonymous function like this:
(function(){ ... })();
This results in onclick scripts on all pages breaking because they cannot find Dajax. (Dajax is currently defined in jquery.dajax.core.js as a "var Dajax", so obviously it is not visible outside the anonymous function. Link.
Suggested fix: At the end of the file, expose the Dajax variable:
window.Dajax = Dajax
(as is done by jQuery).
Temporary workaround for others facing the same problem:
Set PIPELINE_DISABLE_WRAPPER = True
to disable wrapping all the code in an anonymous function. This works but is not an ideal solution.
Django-pipeline (which is a css/js compressor) collects together all js files into a single js file, and then wraps it into an anonymous function like this:
This results in onclick scripts on all pages breaking because they cannot find Dajax. (Dajax is currently defined in jquery.dajax.core.js as a "var Dajax", so obviously it is not visible outside the anonymous function. Link.
Suggested fix: At the end of the file, expose the Dajax variable:
(as is done by jQuery).
Temporary workaround for others facing the same problem:
Set PIPELINE_DISABLE_WRAPPER = True
to disable wrapping all the code in an anonymous function. This works but is not an ideal solution.