GUAC-968: Reduce number of namespaces. Adopt consistent string naming. Reorganize and reformat. Remove unused strings.

This commit is contained in:
Michael Jumper
2014-12-26 17:00:31 -08:00
parent 83bd541925
commit 74b94f9b2e
22 changed files with 607 additions and 454 deletions

View File

@@ -57,7 +57,11 @@ angular.module('manage').directive('guacConnectionParameter', [function connecti
},
templateUrl: 'app/manage/templates/connectionParameter.html',
controller: ['$scope', '$q', function connectionParameterController($scope, $q) {
controller: ['$scope', '$injector', function connectionParameterController($scope, $injector) {
// Required services
var $q = $injector.get('$q');
var translationStringService = $injector.get('translationStringService');
/**
* Deferred load of the parameter definition, pending availability
@@ -152,6 +156,31 @@ angular.module('manage').directive('guacConnectionParameter', [function connecti
}); // end watch typedValue
/**
* Given the internal name of a protocol, the internal name of a
* parameter for that protocol, and the internal name for a valid
* value of that parameter, produces the translation string for the
* localized, human-readable name of that parameter value.
*
* @param {String} protocolName
* The name of the protocol.
*
* @param {String} parameterName
* The name of the protocol parameter.
*
* @param {String} parameterValue
* The name of the parameter value.
*
* @returns {String}
* The translation string which produces the translated name of the
* parameter value specified.
*/
$scope.getProtocolParameterOption = function getProtocolParameterOption(protocolName, parameterName, parameterValue) {
return 'PROTOCOL_' + translationStringService.canonicalize(protocolName)
+ '.FIELD_OPTION_' + translationStringService.canonicalize(parameterName)
+ '_' + translationStringService.canonicalize(parameterValue || 'EMPTY');
};
}] // end controller
};