output-invoice-infrastructure.js 1.07 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
invoiceModule.directive('outputInvoiceInfrastructure', ['$log', '$rootScope', '$timeout', 'enums',
    function ($log, $rootScope, $timeout, enums) {
        'use strict';

        $log.debug('invoiceInfrastructure.ctor()...');

        return {
            restrict: 'E',
            templateUrl: '/app/vat/output-invoice/infrastructure/output-invoice-infrastructure.html' + '?_=' + Math.random(),
            replace: true,
            scope: {
                state: '='
            },
            controller: 'outputInvoiceInfrastructureController',
            link: function ($scope, $element, $attr) {

                Split(['#vat-report-nav-menu', '#vat-report-content'], {
                    sizes: [15, 85],
                    minSize: [10, 1330],
                    onDragEnd: function () {
                        $timeout(function () {
                            $rootScope.$broadcast(enums.vatEvent.layoutChanged, {});
                        }, 700);
                    }
                })


                $scope.isCollapsed = false;
            }
        };
    }
]);