Move build artifacts javascripts into separate file
This commit is contained in:
parent
e5232ccc1e
commit
66b0927bb5
|
@ -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()
|
||||
|
|
|
@ -20,16 +20,3 @@
|
|||
|
||||
- if @entry.empty?
|
||||
.center Empty
|
||||
|
||||
:javascript
|
||||
$('.top-block').on('click', '.download', function(e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
$('.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 New Issue