Merge branch 'fix/artifacts-download-progress-bar' into 'master'
Do not use progress bar when downloading build artifacts Closes #12491 See merge request !2531
This commit is contained in:
commit
3478030581
3 changed files with 17 additions and 10 deletions
14
app/assets/javascripts/build_artifacts.js.coffee
Normal file
14
app/assets/javascripts/build_artifacts.js.coffee
Normal file
|
@ -0,0 +1,14 @@
|
|||
class @BuildArtifacts
|
||||
constructor: () ->
|
||||
@disablePropagation()
|
||||
@setupEntryClick()
|
||||
|
||||
disablePropagation: ->
|
||||
$('.top-block').on 'click', '.download', (e) ->
|
||||
e.stopPropagation()
|
||||
$('.tree-holder').on 'click', 'tr[data-link] a', (e) ->
|
||||
e.stopImmediatePropagation()
|
||||
|
||||
setupEntryClick: ->
|
||||
$('.tree-holder').on 'click', 'tr[data-link]', (e) ->
|
||||
window.location = @dataset.link
|
|
@ -100,6 +100,8 @@ class Dispatcher
|
|||
shortcut_handler = true
|
||||
when 'projects:forks:new'
|
||||
new ProjectFork()
|
||||
when 'projects:artifacts:browse'
|
||||
new BuildArtifacts()
|
||||
when 'users:show'
|
||||
new User()
|
||||
new Activities()
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
.top-block.gray-content-block.clearfix
|
||||
.pull-right
|
||||
= link_to download_namespace_project_build_artifacts_path(@project.namespace, @project, @build),
|
||||
class: 'btn btn-default' do
|
||||
class: 'btn btn-default download' do
|
||||
= icon('download')
|
||||
Download artifacts archive
|
||||
|
||||
|
@ -20,12 +20,3 @@
|
|||
|
||||
- if @entry.empty?
|
||||
.center Empty
|
||||
|
||||
:javascript
|
||||
$('.tree-holder').on('click', 'tr[data-link] a', function(e) {
|
||||
e.stopImmediatePropagation();
|
||||
});
|
||||
|
||||
$('.tree-holder').on('click', 'tr[data-link]', function(e) {
|
||||
window.location = this.dataset.link;
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue