'use strict';

var LibraryEditController = angular.module('libraries.controllers.main', [
    'system'
])
    .controller('LibraryEditController', [
        '$scope',
        '$route',
        '$location',
        '$filter',
        'System',
        'LibraryService',
        'ImageService',
        'DocumentService',
        function ($scope, $route, $location, $filter, System, LibraryService, ImageService, DocumentService) {



            ///////////////////////////////////
            // ui settings                   
            ///////////////////////////////////

            // will hold api for layout
            $scope.layout = {};
            // will hold api for table
            $scope.table = {};

            $scope.ui = {};

            $scope.ui.dialogUpload = {
                width: 700,
                title: "Upload",
                create: function () {
                    $scope.dialogUpload = $(this);
                }
            };

            $scope.ui.dialogEdit = {
                width: 700,
                title: "Izmeni fajl",
                create: function () {
                    $scope.dialogEdit = $(this);
                }
            };

            $scope.ui.deleteImage = {
                width: 700,
                title: "Potvrdi brisanje",
                create: function () {
                    $scope.deleteImage = $(this);
                }
            };

            $scope.ui.layout = {
                create: function () {
                    $scope.layout = $(this);
                }
            };

            $scope.refresh();
        }
    ]);