diff --git a/app/assets/javascripts/angular/controllers/messages-controllers.js b/app/assets/javascripts/angular/controllers/messages-controllers.js index d5b4ab0dee..f315e443a6 100644 --- a/app/assets/javascripts/angular/controllers/messages-controllers.js +++ b/app/assets/javascripts/angular/controllers/messages-controllers.js @@ -28,7 +28,7 @@ angular.module('openproject.messages.controllers') -.controller('MessagesController', ['$scope', '$http', 'PathHelper', 'TimezoneService', 'SortService', 'PaginationService', function ($scope, $http, PathHelper, TimezoneService, SortService, PaginationService) { +.controller('MessagesController', ['$scope', '$http', 'PathHelper', 'SortService', 'PaginationService', function ($scope, $http, PathHelper, SortService, PaginationService) { $scope.PathHelper = PathHelper; $scope.messages = gon.messages; $scope.totalMessageCount = gon.total_count; @@ -36,8 +36,6 @@ angular.module('openproject.messages.controllers') $scope.projectId = gon.project_id; $scope.activityModuleEnabled = gon.activity_modul_enabled; - TimezoneService.setTimezone(gon.timezone); - SortService.setColumn(gon.sort_column); SortService.setDirection(gon.sort_direction); diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index 66342b5cf3..4c6bcba749 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -67,7 +67,9 @@ class BoardsController < ApplicationController gon.sort_column = 'updated_on' gon.sort_direction = 'desc' gon.total_count = @board.topics.count - gon.timezone = User.current.time_zone ? ActiveSupport::TimeZone::MAPPING[User.current.time_zone.name] : "" + gon.settings = { + user_preferences: current_user.pref + } @message = Message.new render :action => 'show', :layout => !request.xhr?