Removed CiBuild in favour of already available CiBuild class
This commit is contained in:
parent
b9168b0759
commit
2d446267d6
3 changed files with 13 additions and 16 deletions
|
@ -4,6 +4,8 @@ class CiBuild
|
|||
constructor: (build_url, build_status) ->
|
||||
clearInterval(CiBuild.interval)
|
||||
|
||||
@initScrollButtonAffix()
|
||||
|
||||
if build_status == "running" || build_status == "pending"
|
||||
#
|
||||
# Bind autoscroll button to follow build output
|
||||
|
@ -38,4 +40,15 @@ class CiBuild
|
|||
checkAutoscroll: ->
|
||||
$("html,body").scrollTop $("#build-trace").height() if "enabled" is $("#autoscroll-button").data("state")
|
||||
|
||||
initScrollButtonAffix: ->
|
||||
buildScroll = $('#js-build-scroll')
|
||||
body = $('body')
|
||||
buildTrace = $('#build-trace')
|
||||
|
||||
buildScroll.affix(
|
||||
offset:
|
||||
bottom: ->
|
||||
body.outerHeight() - (buildTrace.outerHeight() + buildTrace.offset().top)
|
||||
)
|
||||
|
||||
@CiBuild = CiBuild
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
class @CiBuild
|
||||
constructor: ->
|
||||
@initScrollButtonAffix()
|
||||
|
||||
initScrollButtonAffix: ->
|
||||
buildScroll = $('#js-build-scroll')
|
||||
body = $('body')
|
||||
buildTrace = $('#build-trace')
|
||||
|
||||
buildScroll.affix(
|
||||
offset:
|
||||
bottom: ->
|
||||
body.outerHeight() - (buildTrace.outerHeight() + buildTrace.offset().top)
|
||||
)
|
|
@ -103,8 +103,6 @@ class Dispatcher
|
|||
new ProjectFork()
|
||||
when 'projects:artifacts:browse'
|
||||
new BuildArtifacts()
|
||||
when 'projects:builds:show'
|
||||
new CiBuild()
|
||||
|
||||
switch path.first()
|
||||
when 'admin'
|
||||
|
|
Loading…
Reference in a new issue