aboutsummaryrefslogtreecommitdiff
path: root/web/viewsjs
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2013-01-06 22:00:25 +0100
committerJochen Topf <jochen@topf.org>2013-01-06 22:00:25 +0100
commit068fc5d43dd2a0e01025b018b682b39089a57338 (patch)
treef1a1211555d2539e7c887b7bed01b0c39425eca4 /web/viewsjs
parentd0998e64dcc402773b256907bc382e858368db90 (diff)
downloadtaginfo-068fc5d43dd2a0e01025b018b682b39089a57338.tar
taginfo-068fc5d43dd2a0e01025b018b682b39089a57338.tar.gz
New print_checkmark javascript function
Diffstat (limited to 'web/viewsjs')
-rw-r--r--web/viewsjs/keys.js.erb4
-rw-r--r--web/viewsjs/reports/characters_in_keys.js.erb12
-rw-r--r--web/viewsjs/reports/key_lengths.js.erb8
-rw-r--r--web/viewsjs/reports/name_tags.js.erb2
-rw-r--r--web/viewsjs/reports/wiki_pages_about_non_existing_keys.js.erb6
5 files changed, 14 insertions, 18 deletions
diff --git a/web/viewsjs/keys.js.erb b/web/viewsjs/keys.js.erb
index 8e9e4e2..2facbd1 100644
--- a/web/viewsjs/keys.js.erb
+++ b/web/viewsjs/keys.js.erb
@@ -31,8 +31,8 @@ function page_init() {
print_value_with_percent(row.count_ways, row.count_ways_fraction),
print_value_with_percent(row.count_relations, row.count_relations_fraction),
print_with_ts(row.users_all),
- row.in_wiki ? '&#x2714;' : '-',
- row.in_josm ? '&#x2714;' : '-',
+ print_checkmark(row.in_wiki),
+ print_checkmark(row.in_josm),
print_with_ts(row.values_all),
print_prevalent_value_list(row.key, row.prevalent_values)
] };
diff --git a/web/viewsjs/reports/characters_in_keys.js.erb b/web/viewsjs/reports/characters_in_keys.js.erb
index 612110e..077d4f0 100644
--- a/web/viewsjs/reports/characters_in_keys.js.erb
+++ b/web/viewsjs/reports/characters_in_keys.js.erb
@@ -24,10 +24,10 @@ var create_flexigrid_for = {
data.rows = jQuery.map(data.data, function(row, i) {
return { 'cell': [
link_to_key(row.key),
- print_value_with_percent(row.count_all, row.count_all_fraction),
+ print_value_with_percent(row.count_all, row.count_all_fraction),
print_with_ts(row.users_all),
- row.in_wiki ? '&#x2714;' : '-',
- row.in_josm ? '&#x2714;' : '-',
+ print_checkmark(row.in_wiki),
+ print_checkmark(row.in_josm),
print_with_ts(row.values_all),
print_prevalent_value_list(row.key, row.prevalent_values)
] };
@@ -57,10 +57,10 @@ var create_flexigrid_for = {
data.rows = jQuery.map(data.data, function(row, i) {
return { 'cell': [
link_to_key(row.key),
- print_value_with_percent(row.count_all, row.count_all_fraction),
+ print_value_with_percent(row.count_all, row.count_all_fraction),
print_with_ts(row.users_all),
- row.in_wiki ? '&#x2714;' : '-',
- row.in_josm ? '&#x2714;' : '-',
+ print_checkmark(row.in_wiki),
+ print_checkmark(row.in_josm),
print_with_ts(row.values_all),
print_prevalent_value_list(row.key, row.prevalent_values)
] };
diff --git a/web/viewsjs/reports/key_lengths.js.erb b/web/viewsjs/reports/key_lengths.js.erb
index 4062808..dc4c9f5 100644
--- a/web/viewsjs/reports/key_lengths.js.erb
+++ b/web/viewsjs/reports/key_lengths.js.erb
@@ -26,11 +26,9 @@ var create_flexigrid_for = {
return { 'cell': [
row.key.length,
link_to_key(row.key),
- print_value_with_percent(row.count_all, row.count_all_fraction),
- row.in_wiki ? '&#x2714;' : '-',
- row.in_josm ? '&#x2714;' : '-',
- // row.in_potlatch ? '&#x2714;' : '-',
- // row.in_merkaartor ? '&#x2714;' : '-',
+ print_value_with_percent(row.count_all, row.count_all_fraction),
+ print_checkmark(row.in_wiki),
+ print_checkmark(row.in_josm),
print_with_ts(row.values_all),
print_prevalent_value_list(row.key, row.prevalent_values)
] };
diff --git a/web/viewsjs/reports/name_tags.js.erb b/web/viewsjs/reports/name_tags.js.erb
index e0aed07..241bdc3 100644
--- a/web/viewsjs/reports/name_tags.js.erb
+++ b/web/viewsjs/reports/name_tags.js.erb
@@ -28,7 +28,7 @@ var create_flexigrid_for = {
return { 'cell': [
link_to_key(row.key),
print_with_ts(row.count_all),
- row.in_wiki ? '&#x2714;' : '-',
+ print_checkmark(row.in_wiki),
row.prefix,
row.type,
row.langtag,
diff --git a/web/viewsjs/reports/wiki_pages_about_non_existing_keys.js.erb b/web/viewsjs/reports/wiki_pages_about_non_existing_keys.js.erb
index 06c0162..136108e 100644
--- a/web/viewsjs/reports/wiki_pages_about_non_existing_keys.js.erb
+++ b/web/viewsjs/reports/wiki_pages_about_non_existing_keys.js.erb
@@ -25,10 +25,8 @@ function page_init() {
wikilinks.push(print_wiki_link(wikipage.title));
});
return { 'cell': [
- row.in_wiki ? '&#x2714;' : '-',
- row.in_josm ? '&#x2714;' : '-',
- // row.in_potlatch ? '&#x2714;' : '-',
- // row.in_merkaartor ? '&#x2714;' : '-',
+ print_checkmark(row.in_wiki),
+ print_checkmark(row.in_josm),
link_to_key(row.key),
wikilinks.join(' &nbsp;&bull;&nbsp; ')
] };