diff --git a/webclient/app.css b/webclient/app.css
index bc23f76f00..16f9dd72b7 100644
--- a/webclient/app.css
+++ b/webclient/app.css
@@ -7,6 +7,16 @@
.leftBlock {
width: 8em ! important;
+ font-size: 8px ! important;
+ }
+
+ .rightBlock {
+ width: 0px ! important;
+ display: none ! important;
+ }
+
+ .avatar {
+ width: 36px ! important;
}
#header,
@@ -368,6 +378,10 @@ h1 {
background-color: #f8f8ff;
}
+.recentsRoomSelected {
+ background-color: #eee;
+}
+
.recentsRoomName {
font-size: 16px;
padding-top: 7px;
@@ -387,6 +401,15 @@ h1 {
padding-bottom: 5px;
}
+/*** Recents in the room page ***/
+#roomRecentsTableWrapper {
+ float: left;
+ max-width: 320px;
+ margin-right: 20px;
+ height: 100%;
+ overflow-y: auto;
+}
+
/*** Profile ***/
.profile-avatar {
diff --git a/webclient/recents/recents-controller.js b/webclient/recents/recents-controller.js
index a9805fc38a..8f8b08d5bd 100644
--- a/webclient/recents/recents-controller.js
+++ b/webclient/recents/recents-controller.js
@@ -20,7 +20,11 @@ angular.module('RecentsController', ['matrixService', 'eventHandlerService'])
.controller('RecentsController', ['$scope', 'matrixService', 'eventHandlerService', 'eventStreamService',
function($scope, matrixService, eventHandlerService, eventStreamService) {
$scope.rooms = {};
-
+
+ // $scope of the parent where the recents component is included can override this value
+ // in order to highlight a specific room in the list
+ $scope.recentsSelectedRoomID;
+
$scope.$on(eventHandlerService.MEMBER_EVENT, function(ngEvent, event, isLive) {
var config = matrixService.config();
if (event.state_key === config.user_id && event.content.membership === "invite") {
diff --git a/webclient/recents/recents.html b/webclient/recents/recents.html
index 6d2864ac97..6fda6c5c6b 100644
--- a/webclient/recents/recents.html
+++ b/webclient/recents/recents.html
@@ -1,6 +1,9 @@
<div ng-controller="RecentsController" data-ng-init="onInit()">
<table class="recentsTable">
- <tbody ng-repeat="(rm_id, room) in rooms | orderRecents" ng-click="goToPage('room/' + (room.room_alias ? room.room_alias : room.room_id) )" class ="recentsRoom" >
+ <tbody ng-repeat="(rm_id, room) in rooms | orderRecents"
+ ng-click="goToPage('room/' + (room.room_alias ? room.room_alias : room.room_id) )"
+ class ="recentsRoom"
+ ng-class="{'recentsRoomSelected': (room.room_id === recentsSelectedRoomID)}">
<tr>
<td class="recentsRoomName">
{{ room.room_display_name }}
diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js
index f49deaa489..6c98db269e 100644
--- a/webclient/room/room-controller.js
+++ b/webclient/room/room-controller.js
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-angular.module('RoomController', ['ngSanitize', 'mUtilities'])
+angular.module('RoomController', ['ngSanitize', 'mFileInput', 'mUtilities'])
.controller('RoomController', ['$scope', '$http', '$timeout', '$routeParams', '$location', 'matrixService', 'eventStreamService', 'eventHandlerService', 'mFileUpload', 'mUtilities', '$rootScope',
function($scope, $http, $timeout, $routeParams, $location, matrixService, eventStreamService, eventHandlerService, mFileUpload, mUtilities, $rootScope) {
'use strict';
@@ -327,6 +327,9 @@ angular.module('RoomController', ['ngSanitize', 'mUtilities'])
var onInit2 = function() {
eventHandlerService.reInitRoom($scope.room_id);
+ // Make recents highlight the current room
+ $scope.recentsSelectedRoomID = $scope.room_id;
+
// Join the room
matrixService.join($scope.room_id).then(
function() {
diff --git a/webclient/room/room.html b/webclient/room/room.html
index c167819f15..236ca0a89b 100644
--- a/webclient/room/room.html
+++ b/webclient/room/room.html
@@ -7,7 +7,11 @@
<div id="roomName">
{{ room_alias || room_id }}
</div>
-
+
+ <div id="roomRecentsTableWrapper">
+ <div ng-include="'recents/recents.html'"></div>
+ </div>
+
<div id="usersTableWrapper">
<table id="usersTable">
<tr ng-repeat="member in members | orderMembersList">
diff --git a/webclient/settings/settings-controller.js b/webclient/settings/settings-controller.js
index 5d3f7cb2b8..f7d5e8eb75 100644
--- a/webclient/settings/settings-controller.js
+++ b/webclient/settings/settings-controller.js
@@ -16,7 +16,7 @@ limitations under the License.
'use strict';
-angular.module('SettingsController', ['matrixService', 'mFileUpload'])
+angular.module('SettingsController', ['matrixService', 'mFileUpload', 'mFileInput'])
.controller('SettingsController', ['$scope', 'matrixService', 'mFileUpload',
function($scope, matrixService, mFileUpload) {
$scope.config = matrixService.config();
|