From 4c7df5236098006b62a71e2e06a918a812d5dd3f Mon Sep 17 00:00:00 2001 From: Emmanuel ROHEE Date: Fri, 22 Aug 2014 18:01:08 +0200 Subject: renamed rooms to home - renamed files --- webclient/home/home-controller.js | 162 +++++++++++++++++++++++++++++++++++++ webclient/home/home.html | 63 +++++++++++++++ webclient/home/rooms-controller.js | 162 ------------------------------------- webclient/home/rooms.html | 63 --------------- 4 files changed, 225 insertions(+), 225 deletions(-) create mode 100644 webclient/home/home-controller.js create mode 100644 webclient/home/home.html delete mode 100644 webclient/home/rooms-controller.js delete mode 100644 webclient/home/rooms.html (limited to 'webclient/home') diff --git a/webclient/home/home-controller.js b/webclient/home/home-controller.js new file mode 100644 index 0000000000..d891558be5 --- /dev/null +++ b/webclient/home/home-controller.js @@ -0,0 +1,162 @@ +/* +Copyright 2014 matrix.org + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +'use strict'; + +angular.module('RoomsController', ['matrixService', 'mFileInput', 'mFileUpload', 'eventHandlerService']) +.controller('RoomsController', ['$scope', '$location', 'matrixService', 'mFileUpload', 'eventHandlerService', 'eventStreamService', + function($scope, $location, matrixService, mFileUpload, eventHandlerService, eventStreamService) { + + $scope.config = matrixService.config(); + $scope.rooms = {}; + $scope.public_rooms = []; + $scope.newRoomId = ""; + $scope.feedback = ""; + + $scope.newRoom = { + room_id: "", + private: false + }; + + $scope.goToRoom = { + room_id: "", + }; + + $scope.joinAlias = { + room_alias: "", + }; + + $scope.$on(eventHandlerService.MEMBER_EVENT, function(ngEvent, event, isLive) { + var config = matrixService.config(); + if (event.target_user_id === config.user_id && event.content.membership === "invite") { + console.log("Invited to room " + event.room_id); + // FIXME push membership to top level key to match /im/sync + event.membership = event.content.membership; + // FIXME bodge a nicer name than the room ID for this invite. + event.room_display_name = event.user_id + "'s room"; + $scope.rooms[event.room_id] = event; + } + }); + + var assignRoomAliases = function(data) { + for (var i=0; i + +
+
+ +
+
+ + + + + +
+
+ +
+
+
+
{{ config.displayName }}
+
{{ config.user_id }}
+
+
+
+
+ +

My rooms

+ +
+
+ {{ room.room_display_name }} {{room.membership === 'invite' ? ' (invited)' : ''}} +
+
+
+ +

Public rooms

+ + +
+ +
+
+ + private + +
+
+
+
+ + +
+
+
+ + {{ feedback }} + +
+
+ diff --git a/webclient/home/rooms-controller.js b/webclient/home/rooms-controller.js deleted file mode 100644 index d891558be5..0000000000 --- a/webclient/home/rooms-controller.js +++ /dev/null @@ -1,162 +0,0 @@ -/* -Copyright 2014 matrix.org - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -'use strict'; - -angular.module('RoomsController', ['matrixService', 'mFileInput', 'mFileUpload', 'eventHandlerService']) -.controller('RoomsController', ['$scope', '$location', 'matrixService', 'mFileUpload', 'eventHandlerService', 'eventStreamService', - function($scope, $location, matrixService, mFileUpload, eventHandlerService, eventStreamService) { - - $scope.config = matrixService.config(); - $scope.rooms = {}; - $scope.public_rooms = []; - $scope.newRoomId = ""; - $scope.feedback = ""; - - $scope.newRoom = { - room_id: "", - private: false - }; - - $scope.goToRoom = { - room_id: "", - }; - - $scope.joinAlias = { - room_alias: "", - }; - - $scope.$on(eventHandlerService.MEMBER_EVENT, function(ngEvent, event, isLive) { - var config = matrixService.config(); - if (event.target_user_id === config.user_id && event.content.membership === "invite") { - console.log("Invited to room " + event.room_id); - // FIXME push membership to top level key to match /im/sync - event.membership = event.content.membership; - // FIXME bodge a nicer name than the room ID for this invite. - event.room_display_name = event.user_id + "'s room"; - $scope.rooms[event.room_id] = event; - } - }); - - var assignRoomAliases = function(data) { - for (var i=0; i - -
-
- -
-
- - - - - -
-
- -
-
-
-
{{ config.displayName }}
-
{{ config.user_id }}
-
-
-
-
- -

My rooms

- -
-
- {{ room.room_display_name }} {{room.membership === 'invite' ? ' (invited)' : ''}} -
-
-
- -

Public rooms

- - -
- -
-
- - private - -
-
-
-
- - -
-
-
- - {{ feedback }} - -
-
- -- cgit 1.4.1