|
@@ -51,6 +51,17 @@ define [
|
|
|
|
|
|
|
|
$scope.$on "delete:selected", () ->
|
|
$scope.$on "delete:selected", () ->
|
|
|
$scope.openDeleteModal() if $scope.entity.selected
|
|
$scope.openDeleteModal() if $scope.entity.selected
|
|
|
|
|
+
|
|
|
|
|
+ $scope.iconTypeFromName = (name) ->
|
|
|
|
|
+ ext = name.split(".").pop()?.toLowerCase()
|
|
|
|
|
+ if ext in ["png", "pdf", "jpg", "jpeg", "gif"]
|
|
|
|
|
+ return "image"
|
|
|
|
|
+ else if ext in ["csv", "xls", "xlsx"]
|
|
|
|
|
+ return "table"
|
|
|
|
|
+ else if ext in ["py", "r"]
|
|
|
|
|
+ return "file-text"
|
|
|
|
|
+ else
|
|
|
|
|
+ return "file"
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
App.controller "DeleteEntityModalController", [
|
|
App.controller "DeleteEntityModalController", [
|