Added backwards compatibility to Pagetree for non AJAX-capable browsers (by Benjamin...
authorIngmar Schlecht <ingmar.schlecht@typo3.org>
Thu, 25 Jan 2007 11:53:21 +0000 (11:53 +0000)
committerIngmar Schlecht <ingmar.schlecht@typo3.org>
Thu, 25 Jan 2007 11:53:21 +0000 (11:53 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@1942 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/tree.js

index f99f956..5ff4f0f 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-01-25  Ingmar Schlecht  <ingmar@typo3.org>
+
+       * Added backwards compatibility to Pagetree for non AJAX-capable browsers (by Benjamin Mack)
+
 2007-01-24  Michael Stucki  <michael@typo3.org>
 
        * Install Tool: Network 192.168.0.0/255.255.0.0 was allowed to enter the Install Tool regardless of the die() presence in typo3/install/index.php. This exception has been removed, only 127.0.0.1 may now enter the Install Tool regardless of any other conditions.
index c73cb1f..b32a8c7 100755 (executable)
@@ -42,6 +42,11 @@ var Tree = {
 
        // reloads a part of the page tree (useful when "expand" / "collapse")
        load: function(params, isExpand, obj) {
+                       // fallback if AJAX is not possible (e.g. IE < 6)
+               if (!Ajax.getTransport()) {
+                       window.location.href = this.thisScript + '?PM=' + params;
+                       return;
+               }
                $(obj).style.cursor = 'wait';
                new Ajax.Request(this.thisScript, {
                        method: 'get',
@@ -49,9 +54,9 @@ var Tree = {
                        onComplete: function(xhr) {
                                        // the parent node needs to be overwritten, not the object
                                $(obj.parentNode).replace(xhr.responseText);
-                               Tree.registerDragDropHandlers();
-                               Tree.reSelectActiveItem();
-                       }
+                               this.registerDragDropHandlers();
+                               this.reSelectActiveItem();
+                       }.bind(this)
                });
        },