aboutsummaryrefslogtreecommitdiff
path: root/web/public
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2010-12-13 21:36:39 +0100
committerJochen Topf <jochen@topf.org>2010-12-13 21:36:39 +0100
commit1debdfe42cf0830388839d0a5fa2fa99de043e6d (patch)
tree9ddb88489bbc67d264b46fa024f0d73f0546bcf1 /web/public
parent4e1689b4ff8a401d3326f94e91654ebc46bd89b2 (diff)
downloadtaginfo-1debdfe42cf0830388839d0a5fa2fa99de043e6d.tar
taginfo-1debdfe42cf0830388839d0a5fa2fa99de043e6d.tar.gz
more javascript new style stuff, more josm scale stuff removed
Diffstat (limited to 'web/public')
-rw-r--r--web/public/js/taginfo.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/web/public/js/taginfo.js b/web/public/js/taginfo.js
index 53ca1d3..4fa86bb 100644
--- a/web/public/js/taginfo.js
+++ b/web/public/js/taginfo.js
@@ -536,6 +536,36 @@ var create_flexigrid_for = {
// TODO
}
},
+ sources: {
+ josm: {
+ style: function(stylename) {
+ create_flexigrid('grid-rules', {
+ url: '/api/2/josm/styles/' + stylename,
+ colModel: [
+ { display: 'Key', name: 'k', width: 200, sortable: true, align: 'left' },
+ { display: 'Value', name: 'v', width: 200, sortable: true, align: 'left' },
+ { display: 'Rule XML', name: 'rule', width: 100, sortable: false, align: 'left' }
+ ],
+ searchitems: [
+ { display: 'Key/Value', name: 'k' }
+ ],
+ sortname: 'k',
+ sortorder: 'asc',
+ height: 400,
+ preProcess: function(data) {
+ data.rows = jQuery.map(data.data, function(row, i) {
+ return { 'cell': [
+ link_to_key(row.k),
+ row.v ? link_to_value(row.k, row.v) : row.b ? (row.b + ' (Boolean)') : '*',
+ '<span title="' + row.rule + '">XML</span>'
+ ] };
+ });
+ return data;
+ }
+ });
+ }
+ }
+ },
reports: {
characters_in_keys: {
statistics: function() {