xtras/mathuaerknedam 324:1845d91cebcf: Renkoo: For some reason t...
commits at adium.im
commits at adium.im
Tue Feb 9 04:43:25 UTC 2010
details: http://hg.adium.im/xtras/mathuaerknedam/rev/1845d91cebcf
revision: 324:1845d91cebcf
author: mathuaerknedam
date: Mon Feb 08 22:42:56 2010 -0600
Renkoo: For some reason the usual workaround for the Template.html alignchat bug (search for 'alignchat') didn't work for Renkoo. This puts the alignchat function (as patched in #7755) into footer.hmtl to make the scrollbar only appear when content warrants it.
diffs (26 lines):
diff -r 737200d18a97 -r 1845d91cebcf Renkoo ☿.AdiumMessageStyle/Contents/Resources/Footer.html
--- a/Renkoo ☿.AdiumMessageStyle/Contents/Resources/Footer.html Mon Feb 08 22:27:24 2010 -0600
+++ b/Renkoo ☿.AdiumMessageStyle/Contents/Resources/Footer.html Mon Feb 08 22:42:56 2010 -0600
@@ -220,4 +220,22 @@
});
}
+ //Align our chat to the bottom of the window. If true is passed, view will also be scrolled down
+ function alignChat(shouldScroll) {
+ var windowHeight = window.innerHeight;
+
+ if (windowHeight > 0) {
+ var contentElement = document.body;
+ var diffHeight = (windowHeight - document.documentElement.offsetHeight);
+ if (diffHeight > 0) {
+ contentElement.style.position = 'relative';
+ contentElement.style.top = diffHeight + 'px';
+ } else {
+ contentElement.style.position = 'static';
+ }
+ }
+
+ if (shouldScroll) scrollToBottom();
+ }
+
</script>
More information about the commits
mailing list