;
(function() {
    'use strict';
    const
        apiService = require('app-service'),
        lodash = require('lodash'),
        EventEmitter = require('myevents');
    angular
        .module('app.widgets')
        .directive('myShareList', header);
    header.$inject = ['$timeout' , '$rootScope' , 'fileTool' , '$mdDialog'] ;
    function header($timeout, $rootScope, fileTool, $mdDialog) {
        var directive = {
            link: link,
            templateUrl: "./app/widgets/myShare_list/myShare_list.html",
            restrict: 'EA',
            replace: true,
            scope: {
                files: '=', 
                num:'=',
                cancelShareFile:'='
            } 
        };

        return directive;

        function link(scope, element, attrs) {

            scope.$watch('files',function(){ 
                $('.chk-all').hasClass('active') ? $('.chk-all').click() : $('.tr-file').removeClass('active'); 
            });

        }


    }



})();
