summary refs log tree commit diff
path: root/webclient/room
diff options
context:
space:
mode:
authorEmmanuel ROHEE <erohee@amdocs.com>2014-08-12 18:11:38 +0200
committerEmmanuel ROHEE <erohee@amdocs.com>2014-08-12 18:11:38 +0200
commitf99168de06d4f0de8a05ba89f1b56cd0d7f578d0 (patch)
treec10547bbe806727b67e0d870a32d445bb0f20be0 /webclient/room
parentCapture the .gitignore file (diff)
downloadsynapse-f99168de06d4f0de8a05ba89f1b56cd0d7f578d0.tar.xz
Make messages list and room users list scroll-overflow
Diffstat (limited to 'webclient/room')
-rw-r--r--webclient/room/room-controller.js3
-rw-r--r--webclient/room/room.html20
2 files changed, 13 insertions, 10 deletions
diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js
index f3836c536b..e54751ef6d 100644
--- a/webclient/room/room-controller.js
+++ b/webclient/room/room-controller.js
@@ -33,7 +33,8 @@ angular.module('RoomController', [])
                         }
                         $scope.messages.push(chunk);
                         $timeout(function() {
-                            window.scrollTo(0, document.body.scrollHeight);
+                            var objDiv = document.getElementsByClassName("messageTableWrapper")[0];
+                            objDiv.scrollTop = objDiv.scrollHeight;
                         },0);
                     }
                     else if (chunk.room_id == $scope.room_id && chunk.type == "m.room.member") {
diff --git a/webclient/room/room.html b/webclient/room/room.html
index 3439f1a786..276c3caa5a 100644
--- a/webclient/room/room.html
+++ b/webclient/room/room.html
@@ -6,15 +6,17 @@
         {{ room_alias || room_id }}
     </div>
     
-    <table class="usersTable">
-        <tr ng-repeat="(name, info) in members">
-            <td class="userAvatar">
-                <img class="userAvatarImage" ng-src="{{info.avatar_url || 'img/default-profile.jpg'}}" width="80" height="80"/>
-                <img class="userAvatarGradient" src="img/gradient.png" width="80" height="24"/>
-                <div class="userName">{{ info.displayname || name }}</div>
-            </td>
-            <td class="userPresence" ng-class="info.presenceState === 'online' ? 'online' : (info.presenceState === 'away' ? 'away' : '')" />
-    </table>
+    <div class="usersTableWrapper">
+        <table class="usersTable">
+            <tr ng-repeat="(name, info) in members">
+                <td class="userAvatar">
+                    <img class="userAvatarImage" ng-src="{{info.avatar_url || 'img/default-profile.jpg'}}" width="80" height="80"/>
+                    <img class="userAvatarGradient" src="img/gradient.png" width="80" height="24"/>
+                    <div class="userName">{{ info.displayname || name }}</div>
+                </td>
+                <td class="userPresence" ng-class="info.presenceState === 'online' ? 'online' : (info.presenceState === 'away' ? 'away' : '')" />
+        </table>
+    </div>
     
     <div class="messageTableWrapper">
         <table class="messageTable">