mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUAC-1293: Refresh file browser when any upload completes.
This commit is contained in:
@@ -122,6 +122,13 @@ angular.module('client').directive('guacFileBrowser', [function guacFileBrowser(
|
|||||||
ManagedFilesystem.downloadFile($scope.client, $scope.filesystem, file.streamName);
|
ManagedFilesystem.downloadFile($scope.client, $scope.filesystem, file.streamName);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Refreshes the contents of the current directory.
|
||||||
|
*/
|
||||||
|
$scope.refresh = function refresh() {
|
||||||
|
ManagedFilesystem.refresh($scope.filesystem, $scope.filesystem.currentDirectory);
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new element representing the given file and properly
|
* Creates a new element representing the given file and properly
|
||||||
* handling user events, bypassing the overhead incurred through
|
* handling user events, bypassing the overhead incurred through
|
||||||
@@ -248,6 +255,11 @@ angular.module('client').directive('guacFileBrowser', [function guacFileBrowser(
|
|||||||
|
|
||||||
}); // end retrieve file template
|
}); // end retrieve file template
|
||||||
|
|
||||||
|
// Refresh file browser when any upload completes
|
||||||
|
$scope.$on('guacUploadComplete', function uploadComplete(event, filename) {
|
||||||
|
$scope.refresh();
|
||||||
|
});
|
||||||
|
|
||||||
}]
|
}]
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user