Browse Source

Fixed couple of edge cases where chat animations got stuck or nothing was shown.

pull/16/head
Simon Eisenmann 11 years ago
parent
commit
26b82f2e90
  1. 5
      src/styles/components/_chat.scss
  2. 13
      static/js/directives/chat.js
  3. 8
      static/partials/chat.html

5
src/styles/components/_chat.scss

@ -26,7 +26,6 @@ width:260px; @@ -26,7 +26,6 @@ width:260px;
top:0px;
pointer-events: none;
z-index:45;
overflow:hidden;
-webkit-perspective: 1000;
-moz-perspective: 1000;
-o-perspective: 1000;
@ -49,6 +48,7 @@ left:260px; @@ -49,6 +48,7 @@ left:260px;
right:0px;
bottom:0px;
width:260px;
overflow:hidden;
-webkit-transition: left 200ms ease-in-out;
-moz-transition: left 200ms ease-in-out;
-ms-transition: left 200ms ease-in-out;
@ -92,6 +92,9 @@ transition: left 200ms ease-in-out; @@ -92,6 +92,9 @@ transition: left 200ms ease-in-out;
border: 1px solid white;
font-size:.8em;
}
.list-group-item.disabled {
color:#eee;
}
}
.chatpane {
position:absolute;

13
static/js/directives/chat.js

@ -414,25 +414,16 @@ define(['underscore', 'text!partials/chat.html', 'text!partials/chatroom.html'], @@ -414,25 +414,16 @@ define(['underscore', 'text!partials/chat.html', 'text!partials/chatroom.html'],
scope.$watch("layout.chat", function(chat) {
if (!chat) {
pane.removeClass("flip");
scope.layout.chatMaximized = false;
}
scope.layout.chatMaximized = false;
});
scope.$on("room", function(event, room) {
if (room == null) {
scope.hideRoom(controller.group);
} else {
var subscope;
if (!controller.visibleRooms.length) {
subscope = scope.showGroupRoom(null, {restore: true, noenable: true, noactivate: true});
} else {
subscope = controller.get(controller.group);
}
var subscope = scope.showGroupRoom(null, {restore: true, noenable: true, noactivate: true});
if (room) {
var msg = translation._("You are now in room %s ...", room);
subscope.$broadcast("display", null, $("<i><span>"+msg+"</span></i>"));
}
}
});
};

8
static/partials/chat.html

@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
<div class="chatcontainer" ng-class="{showchatlist: !currentRoomActive}">
<div class="chatcontainer" ng-class="{showchatlist: !currentRoomActive && layout.chat}">
<div class="chatpane"></div>
<div class="chatlist">
<div class="chat visible active">
<div class="chatheader"><div class="chatstatusicon" ng-click="activateRoom(currentRoom.id, true)"><i class="fa fa-angle-right"></i> <i class="fa fa fa-comments-o"></i></div><div class="chatheadertitle"><span>{{_("Chat sessions")}}</span></div> <div class="ctrl"><i ng-show="layout.chatMaximized" ng-click="toggleMax()" class="fa fa-compress"></i></div></div>
<div class="chatbody">
<div class="list-group nicescroll">
<a ng-if="roomstatus" ng-click="activateRoom('', true)" class="list-group-item">
<a ng-if="roomstatus" ng-click="activateRoom('', true)" class="list-group-item" ng-class="{newmessage: getGroupRoom().pending}">
<span class="badge" ng-show="getGroupRoom().pending">{{getGroupRoom().pending}}</span>
<i class="fa fa-users fa-lg"></i> {{_("Room chat")}}
<i class="fa fa-users fa-lg"></i> {{_("Room chat")}} {{roomid}}
</a>
<a ng-repeat="room in getVisibleRooms()" ng-click="activateRoom(room.id, true)" class="list-group-item" ng-class="{newmessage: room.pending}">
<a ng-repeat="room in getVisibleRooms()" ng-click="activateRoom(room.id, true)" class="list-group-item" ng-class="{newmessage: room.pending, disabled: !room.enabled}">
<span class="badge" ng-show="room.pending">{{room.pending}}</span><i class="fa fa-user fa-lg"></i> {{room.id|displayName}}
</a>
</div>

Loading…
Cancel
Save