Commit 2d446267 authored by Phil Hughes's avatar Phil Hughes

Removed CiBuild in favour of already available CiBuild class

parent b9168b07
...@@ -4,6 +4,8 @@ class CiBuild ...@@ -4,6 +4,8 @@ class CiBuild
constructor: (build_url, build_status) -> constructor: (build_url, build_status) ->
clearInterval(CiBuild.interval) clearInterval(CiBuild.interval)
@initScrollButtonAffix()
if build_status == "running" || build_status == "pending" if build_status == "running" || build_status == "pending"
# #
# Bind autoscroll button to follow build output # Bind autoscroll button to follow build output
...@@ -38,4 +40,15 @@ class CiBuild ...@@ -38,4 +40,15 @@ class CiBuild
checkAutoscroll: -> checkAutoscroll: ->
$("html,body").scrollTop $("#build-trace").height() if "enabled" is $("#autoscroll-button").data("state") $("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 @CiBuild = CiBuild
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 ...@@ -103,8 +103,6 @@ class Dispatcher
new ProjectFork() new ProjectFork()
when 'projects:artifacts:browse' when 'projects:artifacts:browse'
new BuildArtifacts() new BuildArtifacts()
when 'projects:builds:show'
new CiBuild()
switch path.first() switch path.first()
when 'admin' when 'admin'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment