;
(function() {
    'use strict';
    const
        apiService = require('app-service'),
        lodash = require('lodash'),
        EventEmitter = require('myevents');
    angular
        .module('app.widgets')
        .directive('recyclebinList', header);

    function header($timeout, $rootScope, fileTool, $mdDialog) {
        var directive = {
            link: link,
            templateUrl: './app/widgets/fileitem/table.list.html',
            restrict: 'EA',
            replace: true,
            scope: {
                files: '='
            }
        };

        return directive;

        function link(scope, element, attrs) {
            var vm = scope;
            vm.shareCtr = false;
            vm.fileClick = function() {
                return false;
            };
            scope.$watch('files',function(){ 
                $('.chk-all').hasClass('active') ? $('.chk-all').click() : $('.tr-file').removeClass('active'); 
            });
        }
    }

})();
    