-@DatabasesCtrl = ($scope, $element, $log, tableFilterFactory, confirmationDialog, doAction) ->
+@DatabasesCtrl = ($scope, $element, tableFilterFactory, confirmationDialog, doAction) ->
   $scope.databases = $element.data("databases")
   $scope.tableFilter = tableFilterFactory($scope, "databases")
 

    confirmationDialog
      message: "Deleting #{collection.name}. Are you sure?"
      onOk: ->
        url = "/databases/#{$scope.dbName}/collections/#{collection.name}"
        doAction(url, "delete")

@DocumentsCtrl = ($scope, $element, confirmationDialog, doAction) ->
  $scope.dbName = $element.data("db-name")
  $scope.collectionName = $element.data("collection-name")

  $scope.delete = (id) ->
    confirmationDialog
      message: "Are you sure?"
      onOk: ->
        url = "/databases/#{$scope.dbName}/collections/#{$scope.collectionName}/#{id}"
        doAction(url, "delete")

        doAction(url, "delete")

@CollectionsCtrl = ($scope, $element, tableFilterFactory, confirmationDialog, doAction) ->
  dbName = $element.data("db-name")
  $scope.collections = $element.data("collections")
  $scope.tableFilter = tableFilterFactory($scope, "collections")

