Fix a bug where clicking on "Object not found" in the browser tree
authorJehan-Guillaume (ioguix) de Rorthais <jgdr@dalibo.com>
Mon, 6 Sep 2010 16:48:15 +0000 (18:48 +0200)
committerioguix <ioguix@free.fr>
Mon, 6 Sep 2010 16:51:22 +0000 (18:51 +0200)
This action is suppose to reload the node but was actually just rising
a js error and not reloading it.

classes/Misc.php

index 032a7b69dfd0b02aaead3e92cd5ca0d352de839d..eeed5eecb15620033019ead2b99a8fd218477a2d 100644 (file)
                                }
                        } else {
                                $msg = isset($attrs['nodata']) ? $attrs['nodata'] : $lang['strnoobjects'];
-                               echo "<tree text=\"{$msg}\" onaction=\"this.parentNode.reload()\" icon=\"", $this->icon('ObjectNotFound'), "\" />\n";
+                               echo "<tree text=\"{$msg}\" onaction=\"tree.getSelected().getParent().reload()\" icon=\"", $this->icon('ObjectNotFound'), "\" />\n";
                        }
 
                        if (!isset($attrs['nofoot']) || $attrs['nofoot'] === false) {