Removed duplicate code and fixed bug where dropdown would not go away when there were no document types that allowed variations
This commit is contained in:
@@ -210,7 +210,11 @@ function NavigationController($scope, $rootScope, $location, $log, $q, $routePar
|
||||
if (b === "true") {
|
||||
//load languages if there are more than 1
|
||||
loadLanguages();
|
||||
} else {
|
||||
$scope.languages = [];
|
||||
init();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}));
|
||||
@@ -249,7 +253,6 @@ function NavigationController($scope, $rootScope, $location, $log, $q, $routePar
|
||||
function loadLanguages() {
|
||||
languageResource.getAll().then(function (languages) {
|
||||
$scope.languages = languages;
|
||||
$scope.languages = languages;
|
||||
|
||||
if ($scope.languages.length > 1) {
|
||||
var defaultLang = _.find($scope.languages, function (l) {
|
||||
|
||||
Reference in New Issue
Block a user