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:
Robert
2018-05-03 10:35:23 +02:00
parent f447294c0b
commit b5ec775833

View File

@@ -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) {