diff options
author | Phil Hughes <me@iamphill.com> | 2016-08-03 09:08:24 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-08-03 09:08:24 +0100 |
commit | a45071d0ea18d9bb8a5209ef97e4858dda08cd33 (patch) | |
tree | d9f8e538c5c0e6ef2e25acf2520f31a419b34ec8 /app/assets/javascripts/build_artifacts.js | |
parent | e5b64f20c730bd6e18af694b2c1503020ba1db51 (diff) | |
parent | e63729d9e70a661fb3fb8cb558716f6a44a52798 (diff) | |
download | gitlab-ce-a45071d0ea18d9bb8a5209ef97e4858dda08cd33.tar.gz |
Merge branch 'master' into ref-switcher-enter-submit
Diffstat (limited to 'app/assets/javascripts/build_artifacts.js')
-rw-r--r-- | app/assets/javascripts/build_artifacts.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/app/assets/javascripts/build_artifacts.js b/app/assets/javascripts/build_artifacts.js new file mode 100644 index 00000000000..f345ba0abe6 --- /dev/null +++ b/app/assets/javascripts/build_artifacts.js @@ -0,0 +1,27 @@ +(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); |