aboutsummaryrefslogtreecommitdiffstats
path: root/files/js
diff options
context:
space:
mode:
Diffstat (limited to 'files/js')
-rw-r--r--files/js/files.js24
1 files changed, 23 insertions, 1 deletions
diff --git a/files/js/files.js b/files/js/files.js
index 9eeeb7f6bfd..44506763032 100644
--- a/files/js/files.js
+++ b/files/js/files.js
@@ -55,6 +55,28 @@ function uploadFinished() {
if(result.status == "error") {
alert('An error occcured, upload failed.\nError code: ' + result.data.error);
} else {
- location.href = 'index.php?dir=' + $('#dir').val();
+ dir = $('#dir').val();
+ $.ajax({
+ url: 'ajax/list.php',
+ data: "dir="+dir,
+ complete: refreshContents
+ });
}
}
+
+function refreshContents(data) {
+ result = eval("("+data.responseText+");");
+ if(typeof(result.data.breadcrumb) != 'undefined'){
+ updateBreadcrumb(result.data.breadcrumb);
+ }
+ updateFileList(result.data.files);
+ $('#file_upload_button').click();
+}
+
+function updateBreadcrumb(breadcrumbHtml) {
+ $('p.nav').empty().html(breadcrumbHtml);
+}
+
+function updateFileList(fileListHtml) {
+ $('#fileList').empty().html(fileListHtml);
+}