From 57f047a05a310883d534a6b01ac99916586fa584 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 1 Sep 2014 17:15:26 +0100 Subject: Fairly simple move of the call status widget to the header bar (and therefore into the index page rather than the rooms page). --- webclient/room/room-controller.js | 28 +++------------------------- webclient/room/room.html | 11 ----------- 2 files changed, 3 insertions(+), 36 deletions(-) (limited to 'webclient/room') diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js index 046d1ca204..b20a72f25b 100644 --- a/webclient/room/room-controller.js +++ b/webclient/room/room-controller.js @@ -82,13 +82,6 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput']) updatePresence(event); }); - $rootScope.$on(matrixPhoneService.INCOMING_CALL_EVENT, function(ngEvent, call) { - console.trace("incoming call"); - call.onError = $scope.onCallError; - call.onHangup = $scope.onCallHangup; - $scope.currentCall = call; - }); - $scope.memberCount = function() { return Object.keys($scope.members).length; }; @@ -100,15 +93,6 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput']) } }; - $scope.answerCall = function() { - $scope.currentCall.answer(); - }; - - $scope.hangupCall = function() { - $scope.currentCall.hangup(); - $scope.currentCall = undefined; - }; - var paginate = function(numItems) { // console.log("paginate " + numItems); if ($scope.state.paginating || !$scope.room_id) { @@ -478,16 +462,10 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput']) $scope.startVoiceCall = function() { var call = new MatrixCall($scope.room_id); - call.onError = $scope.onCallError; - call.onHangup = $scope.onCallHangup; + call.onError = $rootScope.onCallError; + call.onHangup = $rootScope.onCallHangup; call.placeCall(); - $scope.currentCall = call; - } - - $scope.onCallError = function(errStr) { - $scope.feedback = errStr; + $rootScope.currentCall = call; } - $scope.onCallHangup = function() { - } }]); diff --git a/webclient/room/room.html b/webclient/room/room.html index d5b0f0ab96..a62477e9cc 100644 --- a/webclient/room/room.html +++ b/webclient/room/room.html @@ -101,17 +101,6 @@ -
- Incoming call from {{ currentCall.user_id }} - - -
- - Calling... - Call Connecting... - Call Connected - Call Ended - {{ currentCall.state }} {{ feedback }} -- cgit 1.5.1