From ac488e8fa2797b32b75b7e0879ed29547c60b589 Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Sun, 14 Sep 2014 16:02:00 +0200 Subject: Add filtering to key/tag project output. --- web/viewsjs/key.js.erb | 2 +- web/viewsjs/tag.js.erb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'web/viewsjs') 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 }, -- cgit v1.2.3