[TYPO3-core] RFC: Bug #0016614: common.js resets TYPO3 namespace
Peter Kuehn [wmdb]
peter.kuehn at wmdb.de
Tue Nov 30 10:42:05 CET 2010
This is an SVN patch request.
Type: Bugfix
Bugtracker reference:
http://bugs.typo3.org/view.php?id=16614
Branches:
4.3, 4.4 and Trunk
Problem:
If some JavaScript already registered a class in the global namespace
TYPO3. prior to loading common.js in the backend.php (which is the case
if added using $GLOBALS['TBE_TEMPLATE']->getPageRenderer()->addJsFile())
the class gets overwritten in common.js with
var TYPO3 = {
...
};
Solution:
using Ext.apply()
var TYPO3 = TYPO3 ? TYPO3 : {};
TYPO3 = Ext.apply(TYPO3,{
...
});
gRTz
pekue
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0016614_v2.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101130/6e45f524/attachment.asc>
More information about the TYPO3-team-core
mailing list