Skip to content

Commit

Permalink
Remove usages of angular.forEach in settings and translation
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenn Jacobsen authored and nul800sebastiaan committed Jul 30, 2020
1 parent 2e22ada commit 56ca7fa
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function DictionaryListController($scope, $location, dictionaryResource, localiz
dictionaryResource.getList()
.then(function (data) {
vm.items = data;
angular.forEach(vm.items, function(item){
vm.items.forEach(function(item){
item.style = { "paddingLeft": item.level * 10 };
});
vm.loading = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
//load all culture/languages
promises.push(languageResource.getCultures().then(function (culturesDictionary) {
var cultures = [];
angular.forEach(culturesDictionary, function (value, key) {
Object.entries(culturesDictionary).forEach(function ([key, value]) {
cultures.push({
name: key,
displayName: value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
function getFilterName(array) {
var name = "All";
var found = false;
angular.forEach(array, function (item) {
array.forEach(function (item) {
if (item.selected) {
if (!found) {
name = item.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function RelationTypeEditController($scope, $routeParams, relationTypeResource,
function formatDates(relations) {
if (relations) {
userService.getCurrentUser().then(function (currentUser) {
angular.forEach(relations, function (relation) {
relations.forEach(function (relation) {
relation.timestampFormatted = dateHelper.getLocalDate(relation.createDate, currentUser.locale, 'LLL');
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@
var availableMasterTemplates = [];

// filter out the current template and the selected master template
angular.forEach(vm.templates, function (template) {
vm.templates.forEach(function (template) {
if (template.alias !== vm.template.alias && template.alias !== vm.template.masterTemplateAlias) {
var templatePathArray = template.path.split(',');
// filter descendant templates of current template
Expand Down Expand Up @@ -602,7 +602,7 @@
function getMasterTemplateName(masterTemplateAlias, templates) {
if (masterTemplateAlias) {
var templateName = "";
angular.forEach(templates, function (template) {
templates.forEach(function (template) {
if (template.alias === masterTemplateAlias) {
templateName = template.name;
}
Expand Down

0 comments on commit 56ca7fa

Please sign in to comment.