Explorar o código

HUE-5358 [fb] Rename file form should submit via AJAX

Enrico Berti %!s(int64=9) %!d(string=hai) anos
pai
achega
8cdf822

+ 8 - 0
apps/filebrowser/src/filebrowser/templates/listdir_components.mako

@@ -1280,6 +1280,14 @@ from django.utils.translation import ugettext as _
 
         $("#renameForm").attr("action", "/filebrowser/rename?next=${url('filebrowser.views.view', path='')}" + self.currentPath());
 
+        $('#renameForm').ajaxForm({
+          dataType:  'json',
+          success: function() {
+            $("#renameModal").modal('hide');
+            self.retrieveData();
+          }
+        });
+
         $("#renameModal").modal({
           keyboard:true,
           show:true