summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/build_artifacts.js
blob: c423a548a308d32ee8329aaf36383d288c5f9dfb (plain)
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
/* eslint-disable func-names, space-before-function-paren, wrap-iife, prefer-arrow-callback, no-unused-vars, no-return-assign, padded-blocks, max-len */
(function() {
  this.BuildArtifacts = (function() {
    function BuildArtifacts() {
      this.disablePropagation();
      this.setupEntryClick();
    }

    BuildArtifacts.prototype.disablePropagation = function() {
      $('.top-block').on('click', '.download', function(e) {
        return e.stopPropagation();
      });
      return $('.tree-holder').on('click', 'tr[data-link] a', function(e) {
        return e.stopImmediatePropagation();
      });
    };

    BuildArtifacts.prototype.setupEntryClick = function() {
      return $('.tree-holder').on('click', 'tr[data-link]', function(e) {
        return window.location = this.dataset.link;
      });
    };

    return BuildArtifacts;

  })();

}).call(this);