From f60a0062f01ed654e5bc9f36640d3bbf06581f92 Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Sun, 16 Mar 2014 18:19:53 +0100 Subject: [PATCH] Added chat maximize support. --- src/styles/components/_chat.scss | 6 +++++- static/js/directives/chat.js | 7 +++++++ static/partials/chatroom.html | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/styles/components/_chat.scss b/src/styles/components/_chat.scss index a2202ee8..68a4a79e 100644 --- a/src/styles/components/_chat.scss +++ b/src/styles/components/_chat.scss @@ -28,13 +28,17 @@ pointer-events: none; z-index:45; overflow:hidden; } +#chat.maximized { +left:0px; +width:auto; +} .chatpane { height:100%; position:absolute; top:0px; left:0px; bottom:0px; -width:260px; +right:0px; -webkit-transition: left 200ms ease-in-out; -moz-transition: left 200ms ease-in-out; -ms-transition: left 200ms ease-in-out; diff --git a/static/js/directives/chat.js b/static/js/directives/chat.js index cb88040f..6e4d54a9 100644 --- a/static/js/directives/chat.js +++ b/static/js/directives/chat.js @@ -145,6 +145,9 @@ define(['underscore', 'text!partials/chat.html', 'text!partials/chatroom.html'], } }; + subscope.toggleMax = function() { + scope.toggleMax(); + }; subscope.sendChat = function(to, message, status, mid, noloop) { //console.log("send chat", to, scope.peer); var peercall = mediaStream.webrtc.findTargetCall(to); @@ -313,6 +316,10 @@ define(['underscore', 'text!partials/chat.html', 'text!partials/chatroom.html'], subscope.$destroy(); }, 0); }; + scope.toggleMax = function() { + //TODO(longsleep): Angularize this. + iElement.parent().toggleClass("maximized"); + }; scope.$on("room", function(event, room) { if (room !== null) { diff --git a/static/partials/chatroom.html b/static/partials/chatroom.html index 636a23c9..bbc30ed7 100644 --- a/static/partials/chatroom.html +++ b/static/partials/chatroom.html @@ -1,5 +1,5 @@
-
{{settings.title}} {{id|displayName}}
+
{{settings.title}} {{id|displayName}}