From 861e12658eae9e531a6f711c8cc8cbbbdcddfbb9 Mon Sep 17 00:00:00 2001 From: Steffen Kamper Date: Tue, 30 Nov 2010 10:37:49 +0000 Subject: [PATCH] =?utf8?q?Fixed=20bug=20#16614:=20common.js=20resets=20TYP?= =?utf8?q?O3=20namespace=20(Thanks=20to=20Peter=20K=C3=BChn)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9685 709f56b5-9817-0410-a4d7-c38de5d9e867 --- ChangeLog | 1 + typo3/js/common.js | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 301413507355..a35be2376989 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2010-11-30 Steffen Kamper + * Fixed bug #16614: common.js resets TYPO3 namespace (Thanks to Peter Kühn) * Fixed bug #16443: FAL Hooks (Thanks to Mathias Schreiber) * Fixed bug #16459 Add uid of overlay record to rootline (Thanks to Mathias Schreiber) diff --git a/typo3/js/common.js b/typo3/js/common.js index 863e388df884..948c50fcf6ba 100644 --- a/typo3/js/common.js +++ b/typo3/js/common.js @@ -29,7 +29,7 @@ if (Prototype) { Ajax.Responders.register({ onCreate: function(request, transport) { - // if the TYPO3 AJAX backend is used, + // if the TYPO3 AJAX backend is used, // the onSuccess & onComplete callbacks are hooked if (request.url.indexOf("ajax.php") === -1) { return; @@ -77,7 +77,8 @@ T3AJAX.showError = function(xhr, json) { }; // common storage and global object, could later hold more information about the current user etc. -var TYPO3 = { +var TYPO3 = TYPO3 || {}; +TYPO3 = Ext.apply(TYPO3, { // store instances that only should be running once _instances: {}, getInstance: function(className) { @@ -87,9 +88,9 @@ var TYPO3 = { TYPO3._instances[className] = instance; return instance; }, - + helpers: { - // creates an array by splitting a string into parts, taking a delimiter + // creates an array by splitting a string into parts, taking a delimiter split: function(str, delim) { var res = []; while (str.indexOf(delim) > 0) { @@ -99,4 +100,4 @@ var TYPO3 = { return res; } } -}; +}); -- 2.20.1