Use /home everywhere

This commit is contained in:
Emmanuel ROHEE 2014-08-22 18:08:03 +02:00
parent 4c7df52360
commit de0706493a
6 changed files with 12 additions and 12 deletions

View File

@ -19,7 +19,7 @@ var matrixWebClient = angular.module('matrixWebClient', [
'MatrixWebClientController', 'MatrixWebClientController',
'LoginController', 'LoginController',
'RoomController', 'RoomController',
'RoomsController', 'HomeController',
'SettingsController', 'SettingsController',
'UserController', 'UserController',
'matrixService', 'matrixService',
@ -45,9 +45,9 @@ matrixWebClient.config(['$routeProvider', '$provide', '$httpProvider',
templateUrl: 'room/room.html', templateUrl: 'room/room.html',
controller: 'RoomController' controller: 'RoomController'
}). }).
when('/rooms', { when('/home', {
templateUrl: 'rooms/rooms.html', templateUrl: 'home/home.html',
controller: 'RoomsController' controller: 'HomeController'
}). }).
when('/settings', { when('/settings', {
templateUrl: 'settings/settings.html', templateUrl: 'settings/settings.html',
@ -58,7 +58,7 @@ matrixWebClient.config(['$routeProvider', '$provide', '$httpProvider',
controller: 'UserController' controller: 'UserController'
}). }).
otherwise({ otherwise({
redirectTo: '/rooms' redirectTo: '/home'
}); });
$provide.factory('AccessTokenInterceptor', ['$q', '$rootScope', $provide.factory('AccessTokenInterceptor', ['$q', '$rootScope',

View File

@ -16,8 +16,8 @@ limitations under the License.
'use strict'; 'use strict';
angular.module('RoomsController', ['matrixService', 'mFileInput', 'mFileUpload', 'eventHandlerService']) angular.module('HomeController', ['matrixService', 'mFileInput', 'mFileUpload', 'eventHandlerService'])
.controller('RoomsController', ['$scope', '$location', 'matrixService', 'mFileUpload', 'eventHandlerService', 'eventStreamService', .controller('HomeController', ['$scope', '$location', 'matrixService', 'mFileUpload', 'eventHandlerService', 'eventStreamService',
function($scope, $location, matrixService, mFileUpload, eventHandlerService, eventStreamService) { function($scope, $location, matrixService, mFileUpload, eventHandlerService, eventStreamService) {
$scope.config = matrixService.config(); $scope.config = matrixService.config();

View File

@ -1,4 +1,4 @@
<div ng-controller="RoomsController" class="rooms"> <div ng-controller="HomeController">
<div id="page"> <div id="page">
<div id="wrapper"> <div id="wrapper">

View File

@ -15,10 +15,10 @@
<script src="app-controller.js"></script> <script src="app-controller.js"></script>
<script src="app-directive.js"></script> <script src="app-directive.js"></script>
<script src="app-filter.js"></script> <script src="app-filter.js"></script>
<script src="home/home-controller.js"></script>
<script src="login/login-controller.js"></script> <script src="login/login-controller.js"></script>
<script src="room/room-controller.js"></script> <script src="room/room-controller.js"></script>
<script src="room/room-directive.js"></script> <script src="room/room-directive.js"></script>
<script src="rooms/rooms-controller.js"></script>
<script src="settings/settings-controller.js"></script> <script src="settings/settings-controller.js"></script>
<script src="user/user-controller.js"></script> <script src="user/user-controller.js"></script>
<script src="components/matrix/matrix-service.js"></script> <script src="components/matrix/matrix-service.js"></script>

View File

@ -53,7 +53,7 @@ angular.module('LoginController', ['matrixService'])
matrixService.saveConfig(); matrixService.saveConfig();
eventStreamService.resume(); eventStreamService.resume();
// Go to the user's rooms list page // Go to the user's rooms list page
$location.url("rooms"); $location.url("home");
}, },
function(error) { function(error) {
if (error.data) { if (error.data) {
@ -84,7 +84,7 @@ angular.module('LoginController', ['matrixService'])
}); });
matrixService.saveConfig(); matrixService.saveConfig();
eventStreamService.resume(); eventStreamService.resume();
$location.url("rooms"); $location.url("home");
} }
else { else {
$scope.feedback = "Failed to login: " + JSON.stringify(response.data); $scope.feedback = "Failed to login: " + JSON.stringify(response.data);

View File

@ -364,7 +364,7 @@ angular.module('RoomController', ['ngSanitize', 'mUtilities'])
matrixService.leave($scope.room_id).then( matrixService.leave($scope.room_id).then(
function(response) { function(response) {
console.log("Left room "); console.log("Left room ");
$location.url("rooms"); $location.url("home");
}, },
function(error) { function(error) {
$scope.feedback = "Failed to leave room: " + error.data.error; $scope.feedback = "Failed to leave room: " + error.data.error;