summaryrefslogtreecommitdiff
path: root/program/js/list.js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-10-30 16:06:27 +0100
committerAleksander Machniak <alec@alec.pl>2013-10-30 16:06:27 +0100
commit8f8e263977cc356bf754236ed0182515b26337ca (patch)
tree63814d8e8a4c8bcc9128b86fb84cd373da4d4bc1 /program/js/list.js
parent2aacf1a31d63e0f88e1a06fda9a99519a9f29e1a (diff)
CS fixes
Diffstat (limited to 'program/js/list.js')
-rw-r--r--program/js/list.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/program/js/list.js b/program/js/list.js
index a814c325c..46d9d2757 100644
--- a/program/js/list.js
+++ b/program/js/list.js
@@ -1245,14 +1245,15 @@ scrollto: function(id)
scroll_to = Number(row.offsetTop);
}
- if(this.fixed_header)
+ if (this.fixed_header)
head_offset = Number(this.thead.offsetHeight);
-
+
// if row is above the frame (or behind header)
if (scroll_to < Number(this.frame.scrollTop) + head_offset) {
// scroll window so that row isn't behind header
this.frame.scrollTop = scroll_to - head_offset;
- } else if (scroll_to + Number(row.offsetHeight) > Number(this.frame.scrollTop) + Number(this.frame.offsetHeight))
+ }
+ else if (scroll_to + Number(row.offsetHeight) > Number(this.frame.scrollTop) + Number(this.frame.offsetHeight))
this.frame.scrollTop = (scroll_to + Number(row.offsetHeight)) - Number(this.frame.offsetHeight);
}
},