aboutsummaryrefslogtreecommitdiff
path: root/web/viewsjs
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2014-09-14 16:02:00 +0200
committerJochen Topf <jochen@topf.org>2014-09-14 16:02:00 +0200
commitac488e8fa2797b32b75b7e0879ed29547c60b589 (patch)
tree4ba1a914a8641b1f60aee762c24ea93759185c90 /web/viewsjs
parent3d9bda39eab56852a42312e876d02d32de0f55e0 (diff)
downloadtaginfo-ac488e8fa2797b32b75b7e0879ed29547c60b589.tar
taginfo-ac488e8fa2797b32b75b7e0879ed29547c60b589.tar.gz
Add filtering to key/tag project output.
Diffstat (limited to 'web/viewsjs')
-rw-r--r--web/viewsjs/key.js.erb2
-rw-r--r--web/viewsjs/tag.js.erb4
2 files changed, 3 insertions, 3 deletions
diff --git a/web/viewsjs/key.js.erb b/web/viewsjs/key.js.erb
index 945b2e6..9b8698f 100644
--- a/web/viewsjs/key.js.erb
+++ b/web/viewsjs/key.js.erb
@@ -147,7 +147,7 @@ var create_flexigrid_for = {
},
projects: function(key, filter_type) {
create_flexigrid('grid-projects', {
- url: '/api/4/key/projects?key=' + encodeURIComponent(key),
+ url: '/api/4/key/projects?key=' + encodeURIComponent(key) + '&filter=' + encodeURIComponent(filter_type),
colModel: [
{ display: '<%= h(taginfo.project) %>', name: 'project_name', width: 280, sortable: true },
{ display: '<%= h(osm.tag) %>', name: 'tag', width: 220, sortable: true },
diff --git a/web/viewsjs/tag.js.erb b/web/viewsjs/tag.js.erb
index 7cd9787..4616acc 100644
--- a/web/viewsjs/tag.js.erb
+++ b/web/viewsjs/tag.js.erb
@@ -125,9 +125,9 @@ var create_flexigrid_for = {
}
});
},
- projects: function(key, value) {
+ projects: function(key, value, filter_type) {
create_flexigrid('grid-projects', {
- url: '/api/4/tag/projects?key=' + encodeURIComponent(key) + '&value=' + encodeURIComponent(value),
+ url: '/api/4/tag/projects?key=' + encodeURIComponent(key) + '&value=' + encodeURIComponent(value) + '&filter=' + encodeURIComponent(filter_type),
colModel: [
{ display: '<%= h(taginfo.project) %>', name: 'project_name', width: 280, sortable: true },
{ display: '<%= h(osm.tag) %>', name: 'tag', width: 220, sortable: true },