   (
     $scope
     $rootScope
+    $document
     $modal
     Photosets
     Orders

.controller 'PhotosetsCtrl', [
  '$scope'
  '$rootScope'
  '$modal'
  'Photosets'
  'Orders'

      $scope.isFilterEnabled = !_.isEmpty(val)
      filter()

    $scope.perPage = if $document.outerWidth() < 768 then 5 else 12
    $scope.maxSize = 5
    $scope.page = 1
    $scope.availableOrders = Orders.Photosets.availableOrders
