       else
         $scope.setMessage $scope.updateStatusMessage, "", {}, false
 
+
     $scope.dirtyProductCount = ->
       Object.keys($scope.dirtyProducts).length
 ]
 
 
 productsApp.factory "dataFetcher", [
-  "$http"
-  "$q"
+  "$http", "$q"
   ($http, $q) ->
     return (dataLocation) ->
       deferred = $q.defer()



productsApp.controller "AdminBulkProductsCtrl", [
  "$scope"
  "$timeout"
  "$http"
  "dataFetcher"
  ($scope, $timeout, $http, dataFetcher) ->
    $scope.updateStatusMessage =
      text: ""
      style: {}

    $scope.columns =
      name:
        name: "Name"
        visible: true

      supplier:
        name: "Supplier"
        visible: true

      price:
        name: "Price"
        visible: true

      on_hand:
        name: "On Hand"
        visible: true

      available_on:
        name: "Available On"
        visible: true

    $scope.initialise = (spree_api_key) ->
      authorise_api_reponse = ""

      productsToSubmit = filterSubmitProducts($scope.dirtyProducts)
      $scope.updateProducts productsToSubmit


    $scope.setMessage = (model, text, style, timeout) ->
      model.text = text
      model.style = style
