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:59:26 -0700
committerKegan Dougal <kegan@matrix.org>2014-09-08 18:59:26 -0700
commite8f19b4c0d774bd6f1942aa4557ad0be728b9a4f (patch)
treed3246c5a47be733cdbf294065a909bdeaf4a9f36 /webclient/room/room.html
parentAdd ability to set topic by double-clicking on the topic text then hitting en... (diff)
downloadsynapse-e8f19b4c0d774bd6f1942aa4557ad0be728b9a4f.tar.xz
Display a 'Set Topic' button if there is no topic or it's a 0-len string.
Diffstat (limited to '')
-rw-r--r--webclient/room/room.html22
1 files changed, 13 insertions, 9 deletions
diff --git a/webclient/room/room.html b/webclient/room/room.html
index 0fe45499e0..01f0c4ee33 100644
--- a/webclient/room/room.html
+++ b/webclient/room/room.html
@@ -6,16 +6,20 @@
             <div id="roomName">
                 {{ room_id  | mRoomName }}
             </div>
-            <div id="roomTopic" ng-show="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 class="roomTopicSection">
+                <button ng-hide="events.rooms[room_id]['m.room.topic'].content.topic || topic.isEditing"
+                    ng-click="topic.editTopic()" class="roomTopicSetNew">
+                    Set Topic
+                </button>
+                <div ng-show="events.rooms[room_id]['m.room.topic'].content.topic || topic.isEditing">
+                    <div ng-hide="topic.isEditing" ng-dblclick="topic.editTopic()" id="roomTopic">
+                        {{ 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>
-                
-                <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>