'use strict';

var DocumentSettingsController = angular.module('documents.controllers.settings', [
    'system'
])
    .controller('DocumentSettingsController', [
        '$scope',
        '$route',
        '$location',
        '$filter',
        'System',
        'DocumentService',
        function ($scope, $route, $location, $filter, System, DocumentService) {
            $(".tooltip").tooltip();

            $scope.refresh = function() {
                DocumentService.getSettings()
                    .then(function(data) {
                        $scope.settings = data;
                    });
            };

            $scope.back = function() {
                $location.url('/documents');
            };

            $scope.refresh();
        }
    ]);