aboutsummaryrefslogtreecommitdiff
path: root/web/viewsjs
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2014-09-06 22:06:15 +0200
committerJochen Topf <jochen@topf.org>2014-09-06 22:06:15 +0200
commit543a4a540b4f33e1933777a6bb47a3978bedf5c4 (patch)
treecd434ee461be10cba256e8a2fc5d6fa7b808afcf /web/viewsjs
parent056f9be8994e0b636d450fae19ebf10584614054 (diff)
downloadtaginfo-543a4a540b4f33e1933777a6bb47a3978bedf5c4.tar
taginfo-543a4a540b4f33e1933777a6bb47a3978bedf5c4.tar.gz
Project files can now contain a list of object types for each key/tag.
Diffstat (limited to 'web/viewsjs')
-rw-r--r--web/viewsjs/key.js.erb11
-rw-r--r--web/viewsjs/project.js.erb5
-rw-r--r--web/viewsjs/tag.js.erb11
3 files changed, 21 insertions, 6 deletions
diff --git a/web/viewsjs/key.js.erb b/web/viewsjs/key.js.erb
index e384d5b..9bf8583 100644
--- a/web/viewsjs/key.js.erb
+++ b/web/viewsjs/key.js.erb
@@ -108,9 +108,9 @@ var create_flexigrid_for = {
link_to_wiki(row.title),
html_escape(row.description),
fmt_wiki_image_popup(row.image),
- fmt_type_icon('node', row.on_node) +
- fmt_type_icon('way', row.on_way) +
- fmt_type_icon('area', row.on_area) +
+ fmt_type_icon('node', row.on_node) +
+ fmt_type_icon('way', row.on_way) +
+ fmt_type_icon('area', row.on_area) +
fmt_type_icon('relation', row.on_relation),
fmt_key_or_tag_list(row.tags_implies),
fmt_key_or_tag_list(row.tags_combination),
@@ -151,6 +151,7 @@ var create_flexigrid_for = {
colModel: [
{ display: '<%= h(taginfo.project) %>', name: 'project_name', width: 280, sortable: true },
{ display: '<%= h(osm.tag) %>', name: 'key', width: 220, sortable: true },
+ { display: '<%= h(osm.objects) %>', name: 'objects', width: 80, sortable: false },
{ display: '<%= h(page.projects.description) %>', name: 'description', width: 600, sortable: false, align: 'left' }
],
searchitems: [
@@ -163,6 +164,10 @@ var create_flexigrid_for = {
return { 'cell': [
link_to_project(row.project_id, row.project_name),
row.value ? link_to_tag(row.key, row.value) : (link_to_key(row.key) + '=*'),
+ fmt_type_icon('node', row.on_node) +
+ fmt_type_icon('way', row.on_way) +
+ fmt_type_icon('area', row.on_area) +
+ fmt_type_icon('relation', row.on_relation),
project_tag_desc(row.description, row.icon_url, row.doc_url)
] };
});
diff --git a/web/viewsjs/project.js.erb b/web/viewsjs/project.js.erb
index 59af6dd..435b07f 100644
--- a/web/viewsjs/project.js.erb
+++ b/web/viewsjs/project.js.erb
@@ -8,6 +8,7 @@ var create_flexigrid_for = {
url: '/api/4/project/tags?project=' + encodeURIComponent(project),
colModel: [
{ display: '<%= h(osm.tag) %>', name: 'tag', width: 260, sortable: true },
+ { display: '<%= h(osm.objects) %>', name: 'objects', width: 80, sortable: false },
{ display: '<%= h(misc.description) %>', name: 'description', width: 800, sortable: false, align: 'left' }
],
searchitems: [
@@ -19,6 +20,10 @@ var create_flexigrid_for = {
data.rows = jQuery.map(data.data, function(row, i) {
return { 'cell': [
row.value ? link_to_tag(row.key, row.value) : (link_to_key(row.key) + '=*'),
+ fmt_type_icon('node', row.on_node) +
+ fmt_type_icon('way', row.on_way) +
+ fmt_type_icon('area', row.on_area) +
+ fmt_type_icon('relation', row.on_relation),
project_tag_desc(row.description, row.doc_url, row.icon_url)
] };
});
diff --git a/web/viewsjs/tag.js.erb b/web/viewsjs/tag.js.erb
index 1cc6e89..34b5935 100644
--- a/web/viewsjs/tag.js.erb
+++ b/web/viewsjs/tag.js.erb
@@ -88,9 +88,9 @@ var create_flexigrid_for = {
link_to_wiki(row.title),
html_escape(row.description),
fmt_wiki_image_popup(row.image),
- fmt_type_icon('node', row.on_node) +
- fmt_type_icon('way', row.on_way) +
- fmt_type_icon('area', row.on_area) +
+ fmt_type_icon('node', row.on_node) +
+ fmt_type_icon('way', row.on_way) +
+ fmt_type_icon('area', row.on_area) +
fmt_type_icon('relation', row.on_relation),
fmt_key_or_tag_list(row.tags_implies),
fmt_key_or_tag_list(row.tags_combination),
@@ -131,6 +131,7 @@ var create_flexigrid_for = {
colModel: [
{ display: '<%= h(taginfo.project) %>', name: 'project_name', width: 280, sortable: true },
{ display: '<%= h(osm.tag) %>', name: 'key', width: 220, sortable: true },
+ { display: '<%= h(osm.objects) %>', name: 'objects', width: 80, sortable: false },
{ display: '<%= h(page.projects.description) %>', name: 'description', width: 600, sortable: false, align: 'left' }
],
searchitems: [
@@ -143,6 +144,10 @@ var create_flexigrid_for = {
return { 'cell': [
link_to_project(row.project_id, row.project_name),
row.value ? link_to_tag(row.key, row.value) : (link_to_key(row.key) + '=*'),
+ fmt_type_icon('node', row.on_node) +
+ fmt_type_icon('way', row.on_way) +
+ fmt_type_icon('area', row.on_area) +
+ fmt_type_icon('relation', row.on_relation),
project_tag_desc(row.description, row.icon_url, row.doc_url)
] };
});