summary refs log tree commit diff
path: root/webclient/room/room.html
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-09-08 18:40:34 -0700
committerKegan Dougal <kegan@matrix.org>2014-09-08 18:40:34 -0700
commit6bdb23449a7b4f5ca0426ec6c942332b245eec30 (patch)
tree223c9c950c8dd91b288315df50023a79ddbeac4c /webclient/room/room.html
parentFixed bug which displayed an older room topic because it was being returned f... (diff)
downloadsynapse-6bdb23449a7b4f5ca0426ec6c942332b245eec30.tar.xz
Add ability to set topic by double-clicking on the topic text then hitting enter.
Diffstat (limited to '')
-rw-r--r--webclient/room/room.html10
1 files changed, 9 insertions, 1 deletions
diff --git a/webclient/room/room.html b/webclient/room/room.html
index 4be2482f96..0fe45499e0 100644
--- a/webclient/room/room.html
+++ b/webclient/room/room.html
@@ -7,7 +7,15 @@
                 {{ room_id  | mRoomName }}
             </div>
             <div id="roomTopic" ng-show="events.rooms[room_id]['m.room.topic'].content.topic">
-                {{ events.rooms[room_id]['m.room.topic'].content.topic }}
+                <div ng-hide="topic.isEditing" ng-dblclick="topic.editTopic()">
+                    {{ events.rooms[room_id]['m.room.topic'].content.topic | limitTo: 200}}
+                </div>
+                
+                <form ng-submit="topic.updateTopic()" ng-show="topic.isEditing" class="roomTopicForm">
+                    <input ng-model="topic.newTopicText" ng-blur="topic.cancelEdit()" class="roomTopicInput" 
+                    autofocus />
+                </form>
+                
             </div>
         </div>
     </div>