Skip to content

Commit

Permalink
allow users to edit photos attached to a feature thorough the table v…
Browse files Browse the repository at this point in the history
…iew. Short term solution until we implement it properly.
  • Loading branch information
smesdaghi committed Dec 24, 2015
1 parent e878022 commit 233760b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/common/tableview/TableViewDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion src/common/tableview/TableViewService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'};
}
Expand Down

0 comments on commit 233760b

Please sign in to comment.