diff options
author | Emmanuel ROHEE <erohee@amdocs.com> | 2014-09-11 11:53:37 +0200 |
---|---|---|
committer | Emmanuel ROHEE <erohee@amdocs.com> | 2014-09-11 11:53:37 +0200 |
commit | 14a9652324a1dbfec55b83ae4fbfb7ee3bf1f3da (patch) | |
tree | 0ab18e9b8fceedd1f21760af74888b8348fa8f7d /webclient/room/room-controller.js | |
parent | BF: made input autofocus work when opening the room topic input (diff) | |
download | synapse-14a9652324a1dbfec55b83ae4fbfb7ee3bf1f3da.tar.xz |
Room topic: if the request fails, show the error in the feedback
Diffstat (limited to '')
-rw-r--r-- | webclient/room/room-controller.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js index 94c7688907..fe3821eb45 100644 --- a/webclient/room/room-controller.js +++ b/webclient/room/room-controller.js @@ -67,7 +67,14 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput']) }, updateTopic: function() { console.log("Updating topic to "+$scope.topic.newTopicText); - matrixService.setTopic($scope.room_id, $scope.topic.newTopicText); + matrixService.setTopic($scope.room_id, $scope.topic.newTopicText).then( + function() { + }, + function(error) { + $scope.feedback = "Request failed: " + error.data.error; + } + ); + $scope.topic.isEditing = false; }, cancelEdit: function() { |