From 96af931c0b8a9aaa89085c935c3aecbcdd8f4304 Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 23 May 2016 16:48:31 -0700 Subject: [PATCH] Modified EditActionPolicy to prevent editing of table views unless object is a table type --- platform/commonUI/edit/src/policies/EditActionPolicy.js | 5 ++++- platform/features/table/bundle.js | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/platform/commonUI/edit/src/policies/EditActionPolicy.js b/platform/commonUI/edit/src/policies/EditActionPolicy.js index f0c2910c11..cc40c32d9f 100644 --- a/platform/commonUI/edit/src/policies/EditActionPolicy.js +++ b/platform/commonUI/edit/src/policies/EditActionPolicy.js @@ -56,7 +56,10 @@ define( // A view is editable unless explicitly flagged as not (views || []).forEach(function (view) { if (view.editable === true || - (view.key === 'plot' && type.getKey() === 'telemetry.panel')) { + (view.key === 'plot' && type.getKey() === 'telemetry.panel') || + (view.key === 'table' && type.getKey() === 'table') || + (view.key === 'rt-table' && type.getKey() === 'rttable') + ) { count++; } }); diff --git a/platform/features/table/bundle.js b/platform/features/table/bundle.js index ee907bc963..cdcb6603d9 100644 --- a/platform/features/table/bundle.js +++ b/platform/features/table/bundle.js @@ -133,7 +133,7 @@ define([ "telemetry" ], "delegation": true, - "editable": true + "editable": false }, { "name": "Real-time Table", @@ -144,7 +144,7 @@ define([ "telemetry" ], "delegation": true, - "editable": true + "editable": false } ], "directives": [