Browse Source

[security] Fixed tree scroll to path

Enrico Berti 11 years ago
parent
commit
3ff1ea3
1 changed files with 2 additions and 2 deletions
  1. 2 2
      apps/security/src/security/templates/hdfs.mako

+ 2 - 2
apps/security/src/security/templates/hdfs.mako

@@ -435,8 +435,8 @@ ${ tree.import_templates(itemClick='$root.assist.setPath', itemSelected='$root.a
         _path = _path.substr(0, _path.length - 1);
       }
       if ($("a.anchor[href^='"+_path+"']").length > 0){
-        $("html, body").animate({
-          scrollTop: ($("a.anchor[href^='"+_path+"']").position().top - 140)+"px"
+        $("#hdfsTree").animate({
+          scrollTop: ($("a.anchor[href^='"+_path+"']:first").position().top + $("#hdfsTree").scrollTop() - $("#hdfsTree").position().top - 4)+"px"
         });
       }
     });