mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 17:13:21 +00:00 
			
		
		
		
	GUAC-1138: Use date format from translation string.
This commit is contained in:
		| @@ -35,6 +35,7 @@ angular.module('manage').controller('manageConnectionController', ['$scope', '$i | ||||
|     // Required services | ||||
|     var $location                = $injector.get('$location'); | ||||
|     var $routeParams             = $injector.get('$routeParams'); | ||||
|     var $translate               = $injector.get('$translate'); | ||||
|     var authenticationService    = $injector.get('authenticationService'); | ||||
|     var guacNotification         = $injector.get('guacNotification'); | ||||
|     var connectionService        = $injector.get('connectionService'); | ||||
| @@ -100,6 +101,13 @@ angular.module('manage').controller('manageConnectionController', ['$scope', '$i | ||||
|      */ | ||||
|     $scope.parameters = null; | ||||
|  | ||||
|     /** | ||||
|      * The date format for use within the connection history. | ||||
|      * | ||||
|      * @type String | ||||
|      */ | ||||
|     $scope.historyDateFormat = null; | ||||
|  | ||||
|     /** | ||||
|      * The usage history of the connection being modified. | ||||
|      * | ||||
| @@ -150,6 +158,7 @@ angular.module('manage').controller('manageConnectionController', ['$scope', '$i | ||||
|             && $scope.rootGroup            !== null | ||||
|             && $scope.connection           !== null | ||||
|             && $scope.parameters           !== null | ||||
|             && $scope.historyDateFormat    !== null | ||||
|             && $scope.historyEntryWrappers !== null | ||||
|             && $scope.permissions          !== null | ||||
|             && $scope.canSaveConnection    !== null | ||||
| @@ -199,7 +208,12 @@ angular.module('manage').controller('manageConnectionController', ['$scope', '$i | ||||
|     protocolService.getProtocols().success(function protocolsReceived(protocols) { | ||||
|         $scope.protocols = protocols; | ||||
|     }); | ||||
|     | ||||
|  | ||||
|     // Get history date format | ||||
|     $translate('MANAGE_CONNECTION.FORMAT_HISTORY_START').then(function historyDateFormatReceived(historyDateFormat) { | ||||
|         $scope.historyDateFormat = historyDateFormat; | ||||
|     }); | ||||
|  | ||||
|     // If we are editing an existing connection, pull its data | ||||
|     if (identifier) { | ||||
|  | ||||
|   | ||||
| @@ -32,6 +32,7 @@ angular.module('manage').controller('manageSessionsController', ['$scope', '$inj | ||||
|     var SortOrder               = $injector.get('SortOrder'); | ||||
|  | ||||
|     // Required services | ||||
|     var $translate              = $injector.get('$translate'); | ||||
|     var activeConnectionService = $injector.get('activeConnectionService'); | ||||
|     var authenticationService   = $injector.get('authenticationService'); | ||||
|     var connectionGroupService  = $injector.get('connectionGroupService'); | ||||
| @@ -54,6 +55,13 @@ angular.module('manage').controller('manageSessionsController', ['$scope', '$inj | ||||
|      */ | ||||
|     $scope.wrappers = null; | ||||
|  | ||||
|     /** | ||||
|      * The date format for use for session-related dates. | ||||
|      * | ||||
|      * @type String | ||||
|      */ | ||||
|     $scope.sessionDateFormat = null; | ||||
|  | ||||
|     /** | ||||
|      * SortOrder instance which maintains the sort order of the visible | ||||
|      * connection wrappers. | ||||
| @@ -192,6 +200,11 @@ angular.module('manage').controller('manageSessionsController', ['$scope', '$inj | ||||
|  | ||||
|     }); | ||||
|  | ||||
|     // Get session date format | ||||
|     $translate('MANAGE_SESSION.FORMAT_STARTDATE').then(function sessionDateFormatReceived(sessionDateFormat) { | ||||
|         $scope.sessionDateFormat = sessionDateFormat; | ||||
|     }); | ||||
|  | ||||
|     /** | ||||
|      * Returns whether critical data has completed being loaded. | ||||
|      * | ||||
| @@ -201,8 +214,9 @@ angular.module('manage').controller('manageSessionsController', ['$scope', '$inj | ||||
|      */ | ||||
|     $scope.isLoaded = function isLoaded() { | ||||
|  | ||||
|         return $scope.wrappers    !== null | ||||
|             && $scope.permissions !== null; | ||||
|         return $scope.wrappers          !== null | ||||
|             && $scope.sessionDateFormat !== null | ||||
|             && $scope.permissions       !== null; | ||||
|  | ||||
|     }; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user