{"size": 1037, "ext": "js", "max_stars_repo_path": "app/js/directives/ui-chatwindow.js", "max_stars_repo_name": "joysaha456/meditex-angular-hostpital-admin", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/js/directives/ui-chatwindow.js", "max_issues_repo_name": "joysaha456/meditex-angular-hostpital-admin", "max_issues_repo_issues_event_min_datetime": "2022-02-13T18:32:44.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-13T18:32:44.000Z", "max_forks_repo_path": "app/js/directives/ui-chatwindow.js", "max_forks_repo_name": "joysaha456/meditex-angular-hostpital-admin", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 28.8055555556, "max_line_length": 144, "alphanum_fraction": 0.4397299904}
angular.module('app')
  .directive('uiChatwindow', ['$timeout', function($timeout) {
    return {
      restrict: 'AC',
      link: function(scope, el, attr) {
      
        el.on('click', '.user-row', function(e) {
            var _this = $(this);
            $(".chaton").show() && e.preventDefault();
        });

        el.on('click', '.closewindow', function(e) {
            var _this = $(this);
            $(".chaton").hide() && e.preventDefault();
        });


        el.on('keypress', '.wid-add-task input', function(e) {
            if (e.keyCode == 13) {
                var _this = $(this);
                var msg = _this.val();
                var msg = '<li><label class="icheck icheck-white form-label "><input type="checkbox" value=""><i></i> ' + msg + '</label></li>';
                _this.parent().parent().find(".wid-all-tasks ul").append(msg);
                _this.val("");
                _this.focus();
                console.log("entered");            
            }
        });




      }

    };
  }]);