From 233760bd554bea88f3656a3f97116036b186daeb Mon Sep 17 00:00:00 2001 From: Syrus Mesdaghi Date: Thu, 24 Dec 2015 07:03:18 -0500 Subject: [PATCH] allow users to edit photos attached to a feature thorough the table view. Short term solution until we implement it properly. --- src/common/tableview/TableViewDirective.js | 7 ++++--- src/common/tableview/TableViewService.js | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/common/tableview/TableViewDirective.js b/src/common/tableview/TableViewDirective.js index 56760bf0..915f28c0 100644 --- a/src/common/tableview/TableViewDirective.js +++ b/src/common/tableview/TableViewDirective.js @@ -338,9 +338,10 @@ var feature = scope.rows[row].feature; scope.rows[row].modified = false; for (var prop in feature.properties) { - if (prop === 'photos' || prop === 'fotos') { - continue; - } + // allow editing of photos + //if (prop === 'photos' || prop === 'fotos') { + // continue; + //} if (feature.properties[prop] !== tableViewService.rows[row].feature.properties[prop]) { scope.rows[row].modified = true; } diff --git a/src/common/tableview/TableViewService.js b/src/common/tableview/TableViewService.js index bf255051..28212d8b 100644 --- a/src/common/tableview/TableViewService.js +++ b/src/common/tableview/TableViewService.js @@ -356,7 +356,8 @@ metadata.filters = {}; } for (var propName in metadata.schema) { - if (metadata.schema[propName]._type.search('gml:') === -1 && propName !== 'fotos' && propName !== 'photos') { + // allow fotos: && propName !== 'fotos' && propName !== 'photos' + if (metadata.schema[propName]._type.search('gml:') === -1) { if (!goog.isDefAndNotNull(metadata.filters[propName])) { metadata.filters[propName] = {text: '', searchType: 'exactMatch'}; }