summary refs log tree commit diff
path: root/webclient/room/room-controller.js
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-10-30 11:14:29 +0000
committerKegan Dougal <kegan@matrix.org>2014-10-30 11:15:44 +0000
commitd5aa9655223d5a57b76194b155a6366791dd084c (patch)
treec0e13896fbe7394d3ad1e857d5bef4fb40dcac80 /webclient/room/room-controller.js
parentFix pep8 warnings (diff)
downloadsynapse-d5aa9655223d5a57b76194b155a6366791dd084c.tar.xz
SYWEB-12: Add a 'Room Info' button which displays all state content.
Content displayed in a modal dialog. Currently only read-only.
Diffstat (limited to 'webclient/room/room-controller.js')
-rw-r--r--webclient/room/room-controller.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js
index 841b5cccdd..37f51c4e91 100644
--- a/webclient/room/room-controller.js
+++ b/webclient/room/room-controller.js
@@ -1017,6 +1017,15 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput'])
         });
     };
 
+    $scope.openRoomInfo = function() {
+        var modalInstance = $modal.open({
+            templateUrl: 'roomInfoTemplate.html',
+            controller: 'RoomInfoController',
+            size: 'lg',
+            scope: $scope
+        });
+    };
+
 }])
 .controller('EventInfoController', function($scope, $modalInstance) {
     console.log("Displaying modal dialog for >>>> " + JSON.stringify($scope.event_selected));
@@ -1026,4 +1035,14 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput'])
         console.log("Redact event >> " + JSON.stringify($scope.event_selected));
         $modalInstance.close("redact");
     };
+})
+.controller('RoomInfoController', function($scope, $modalInstance, $filter) {
+    console.log("Displaying room info.");
+
+    $scope.submitState = function(eventType, content) {
+        console.log("Submitting " + eventType + " with " + content);
+    }
+
+    $scope.dismiss = $modalInstance.dismiss;
+
 });