Commit e2ac1b5d authored by Leo Iannacone's avatar Leo Iannacone

autoscroll is now configurable

parent bde9cf4f
...@@ -11,5 +11,6 @@ config.web = {} ...@@ -11,5 +11,6 @@ config.web = {}
config.web.title = "deb-o-matic web.ui" config.web.title = "deb-o-matic web.ui"
config.web.description = "This is a web interface for debomatic" config.web.description = "This is a web interface for debomatic"
config.web.footer = "Fork me on github.com" config.web.footer = "Fork me on github.com"
config.web.autoscroll = true
module.exports = config module.exports = config
...@@ -108,8 +108,9 @@ var Page_Distrubion = { ...@@ -108,8 +108,9 @@ var Page_Distrubion = {
append: function(data) { append: function(data) {
new_html = $("#file pre").html() + data.file.new_content new_html = $("#file pre").html() + data.file.new_content
$("#file pre").html(new_html) $("#file pre").html(new_html)
// scroll down
$('body,html').animate({ scrollTop: $('#file pre').height() }, 500); if (AUTOSCROLL) // scroll down
$('body,html').animate({ scrollTop: $('#file pre').height() }, 500);
}, },
get: function(data) { get: function(data) {
if (! data) if (! data)
......
...@@ -14,6 +14,9 @@ ...@@ -14,6 +14,9 @@
<script src='/javascripts/utils.js'></script> <script src='/javascripts/utils.js'></script>
<script src='/javascripts/page_distribution.js'></script> <script src='/javascripts/page_distribution.js'></script>
<script src='/javascripts/main.js'></script> <script src='/javascripts/main.js'></script>
<script>
var AUTOSCROLL = <%= autoscroll %>
</script>
</head> </head>
<body> <body>
<div class="container-fluid"> <div class="container-fluid">
......
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