Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove usages of angular.forEach in property editors #8538

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ function contentPickerController($scope, $q, $routeParams, $location, entityReso
if (entityType !== "Member") {
entityResource.getUrl(entity.id, entityType).then(function (data) {
// update url
angular.forEach($scope.renderModel, function (item) {
$scope.renderModel.forEach(function (item) {
if (item.id === entity.id) {
if (entity.trashed) {
item.url = vm.labels.general_recycleBin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ angular.module("umbraco")
$scope.availableEditors = response.data;

//Localize the grid editor names
angular.forEach($scope.availableEditors, function (value, key) {
$scope.availableEditors.forEach(function (value) {
//If no translation is provided, keep using the editor name from the manifest
localizationService.localize("grid_" + value.alias, undefined, value.name).then(function (v) {
value.name = v;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,22 +86,20 @@
}

function markAsSensitive() {
angular.forEach($scope.options.includeProperties, function (option) {
$scope.options.includeProperties.forEach(function (option) {
option.isSensitive = false;

angular.forEach($scope.items,
function (item) {
$scope.items.forEach(function (item) {

angular.forEach(item.properties,
function (property) {
item.properties.forEach(function (property) {

if (option.alias === property.alias) {
option.isSensitive = property.isSensitive;
}
if (option.alias === property.alias) {
option.isSensitive = property.isSensitive;
}

});
});

});
});

});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,7 @@
if (tab) {
scaffold.variants[0].tabs.push(tab);

angular.forEach(tab.properties,
function (property) {
tab.properties.forEach(function (property) {
if (_.find(notSupported, function (x) { return x === property.editor; })) {
property.notSupported = true;
// TODO: Not supported message to be replaced with 'content_nestedContentEditorNotSupported' dictionary key. Currently not possible due to async/timing quirk.
Expand Down