From 826d39a749492ea9f78a490a162832f28dfe2f6b Mon Sep 17 00:00:00 2001 From: Henry Date: Thu, 14 Jan 2016 15:02:22 -0800 Subject: [PATCH] [New Edit Mode] Fixed logic in EditActionPolicy to use positive logic --- platform/commonUI/edit/src/policies/EditActionPolicy.js | 4 ++-- platform/features/layout/bundle.json | 1 + platform/features/timeline/bundle.json | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/commonUI/edit/src/policies/EditActionPolicy.js b/platform/commonUI/edit/src/policies/EditActionPolicy.js index a591945ae9..81efe27a26 100644 --- a/platform/commonUI/edit/src/policies/EditActionPolicy.js +++ b/platform/commonUI/edit/src/policies/EditActionPolicy.js @@ -65,13 +65,13 @@ define( // A view is editable unless explicitly flagged as not (views || []).forEach(function (view) { - if (view.editable===true && !(applicableView(view.key) && !editableType(type.getKey()))){ + if (view.editable === true || (applicableView(view.key) && editableType(type.getKey()))){ count++; } }); return count; - }; + } /** * Checks whether the domain object is currently being edited. If diff --git a/platform/features/layout/bundle.json b/platform/features/layout/bundle.json index 75aca9a4a9..f0cd069bf8 100644 --- a/platform/features/layout/bundle.json +++ b/platform/features/layout/bundle.json @@ -9,6 +9,7 @@ "glyph": "L", "type": "layout", "templateUrl": "templates/layout.html", + "editable": true, "uses": [] }, { diff --git a/platform/features/timeline/bundle.json b/platform/features/timeline/bundle.json index e7363ab160..9f3f89ed99 100644 --- a/platform/features/timeline/bundle.json +++ b/platform/features/timeline/bundle.json @@ -139,6 +139,7 @@ "type": "timeline", "description": "A timeline view of Timelines and Activities.", "templateUrl": "templates/timeline.html", + "editable": true, "toolbar": { "sections": [ {