[BUGFIX] IE9 compatibility clear cache menu 74/17974/2
authorAndreas Kiessling <andreas.kiessling@web.de>
Sun, 3 Feb 2013 09:54:02 +0000 (10:54 +0100)
committerJigal van Hemert <jigal@xs4all.nl>
Sun, 3 Feb 2013 12:46:05 +0000 (13:46 +0100)
The prototype library shipped with TYPO3 is not compatible with IE9
anymore. Since prototype will be replaced in the near future the easiest
solution is to use plain JavaScript.

Change-Id: I1dc732a61531fa585ed8e0ba6ce8df1b23f3b8bd
Resolves: #36364
Releases: 6.1, 6.0, 4.7, 4.6, 4.5
Reviewed-on: https://review.typo3.org/17974
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
typo3/js/clearcachemenu.js

index 689e858..e07dbef 100644 (file)
@@ -37,6 +37,7 @@ var ClearCacheMenu = Class.create({
        initialize: function() {
 
                Ext.onReady(function() {
+                       var self = this;
                        Event.observe(
                                window, 'resize',
                                function() { TYPO3BackendToolbarManager.positionMenu('clear-cache-actions-menu'); }
@@ -44,12 +45,15 @@ var ClearCacheMenu = Class.create({
                        TYPO3BackendToolbarManager.positionMenu('clear-cache-actions-menu');
                        this.toolbarItemIcon = $$('#clear-cache-actions-menu .toolbar-item span.t3-icon')[0];
 
-                       Event.observe('clear-cache-actions-menu', 'click', this.toggleMenu)
+                       Event.observe('clear-cache-actions-menu', 'click', this.toggleMenu);
 
                                // observe all clicks on clear cache actions in the menu
                        $$('#clear-cache-actions-menu li a').each(function(element) {
-                               Event.observe(element, 'click', this.clearCache.bind(this));
-                       }.bindAsEventListener(this));
+                               $(element).onclick = function(event) {
+                                       self.clearCache.call(self, event);
+                                       return false;
+                               };
+                       });
                }, this);
        },