Removed CiBuild in favour of already available CiBuild class

This commit is contained in:
Phil Hughes 2016-03-10 15:48:53 +00:00
parent b9168b0759
commit 2d446267d6
3 changed files with 13 additions and 16 deletions

View file

@ -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

View file

@ -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)
)

View file

@ -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'