소스 검색

HUE-837 [fb] Clicking on upload button sends to /

Fixed a bug with location.hash change on dialog show (upload and create folder)
Enrico Berti 13 년 전
부모
커밋
7494a2c69c
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      apps/filebrowser/src/filebrowser/templates/listdir_components.mako

+ 5 - 2
apps/filebrowser/src/filebrowser/templates/listdir_components.mako

@@ -445,8 +445,11 @@ from django.utils.translation import ugettext as _
             });
 
             $(window).bind("hashchange", function() {
-                viewModel.targetPath("${url('filebrowser.views.view', path=urlencode('/'))}" + window.location.hash.substring(2));
-                viewModel.retrieveData();
+                var hash = window.location.hash.substring(2);
+                if (hash != null && hash != "") {
+                    viewModel.targetPath("${url('filebrowser.views.view', path=urlencode('/'))}" + hash);
+                    viewModel.retrieveData();
+                }
             });