slightly improve the media viewer widget
This commit is contained in:
@@ -527,11 +527,13 @@ app.controller('FileManagerController', ['$scope', '$timeout', 'Client', functio
|
||||
show: function (entry) {
|
||||
var filePath = sanitize($scope.cwd + '/' + entry.fileName);
|
||||
|
||||
$scope.mediaViewer.entry = entry;
|
||||
$scope.mediaViewer.type = Mimer().get(entry.fileName).split('/')[0];
|
||||
$scope.mediaViewer.src = '';
|
||||
|
||||
Client.filesGet($scope.id, $scope.type, filePath, 'link', function (error, result) {
|
||||
if (error) return Client.error(error);
|
||||
|
||||
$scope.mediaViewer.entry = entry;
|
||||
$scope.mediaViewer.type = Mimer().get(entry.fileName).split('/')[0];
|
||||
$scope.mediaViewer.src = result;
|
||||
|
||||
$('#mediaViewerModal').modal('show');
|
||||
|
||||
Reference in New Issue
Block a user