diff options
author | Jochen Topf <jochen@topf.org> | 2013-01-06 16:58:43 +0100 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2013-01-06 16:58:43 +0100 |
commit | 395b80de72ce59c42135e9e68579ae1ee039f79a (patch) | |
tree | 25ff58266c69915e887797ce227fee9d0a9f2f20 /web/viewsjs | |
parent | 465a86c863ce81d77079240d33a48d9520182e92 (diff) | |
download | taginfo-395b80de72ce59c42135e9e68579ae1ee039f79a.tar taginfo-395b80de72ce59c42135e9e68579ae1ee039f79a.tar.gz |
Updated josm API calls
Diffstat (limited to 'web/viewsjs')
-rw-r--r-- | web/viewsjs/key.js.erb | 10 | ||||
-rw-r--r-- | web/viewsjs/reports/josm_styles.js.erb | 16 | ||||
-rw-r--r-- | web/viewsjs/tag.js.erb | 10 |
3 files changed, 18 insertions, 18 deletions
diff --git a/web/viewsjs/key.js.erb b/web/viewsjs/key.js.erb index 744dde7..bbf142c 100644 --- a/web/viewsjs/key.js.erb +++ b/web/viewsjs/key.js.erb @@ -120,21 +120,21 @@ var create_flexigrid_for = { }, josm: function(key, filter_type) { create_flexigrid('grid-josm', { - url: '/api/2/josm/styles/standard/keys?key=' + encodeURIComponent(key), + url: '/api/4/key/josm/style/rules?style=standard&key=' + encodeURIComponent(key), colModel: [ - { display: '<%= osm.value %>', name: 'v', width: 400, sortable: true }, + { display: '<%= osm.value %>', name: 'value', width: 400, sortable: true }, { display: '<%= misc.icon %>', name: 'icon', width: 40, sortable: false, align: 'center' }, { display: '<%= misc.line %>', name: 'line', width: 40, sortable: false, align: 'center' }, { display: '<%= misc.area %>', name: 'area', width: 40, sortable: false, align: 'center' } ], - sortname: 'v', + sortname: 'value', sortorder: 'asc', emptymsg: '<%= page.josm.no_styles %>', preProcess: function(data) { data.rows = jQuery.map(data.data, function(row, i) { return { 'cell': [ - row.v ? link_to_value(row.k, row.v) : row.b ? (row.b + ' (Boolean)') : '*', - row.icon ? '<img src="/api/2/josm/styles/images?style=standard&image=' + row.icon + '" title="' + row.icon + '" alt=""/>' : '', + row.value ? link_to_value(row.key, row.value) : row.b ? (row.b + ' (Boolean)') : '*', + row.icon ? '<img src="/api/4/josm/style/image?style=standard&image=' + row.icon + '" title="' + row.icon + '" alt=""/>' : '', '<div>' + (row.line_width > 0 ? '<div title="' + row.line_color + '" style="height: ' + row.line_width + 'px; margin-top: ' + (10 - Math.round(row.line_width/2)) + 'px; padding: 0; background-color: ' + row.line_color + '"></div>' : '') + '</div>', row.area_color ? '<div title="' + row.area_color + '" style="height: 18px; background-color: ' + row.area_color + '"></div>' : '' ] }; diff --git a/web/viewsjs/reports/josm_styles.js.erb b/web/viewsjs/reports/josm_styles.js.erb index d051a41..a8ce85e 100644 --- a/web/viewsjs/reports/josm_styles.js.erb +++ b/web/viewsjs/reports/josm_styles.js.erb @@ -4,25 +4,25 @@ %> function create_flexigrid_with_option(stylename) { create_flexigrid('grid-rules', { - url: '/api/2/josm/styles/' + stylename, + url: '/api/4/josm/style/rules?style=' + stylename, colModel: [ - { display: '<%= osm.key %>', name: 'k', width: 300, sortable: true }, - { display: '<%= osm.value %>', name: 'v', width: 300, sortable: true }, + { display: '<%= osm.key %>', name: 'key', width: 300, sortable: true }, + { display: '<%= osm.value %>', name: 'value', width: 300, sortable: true }, { display: '<%= misc.icon %>', name: 'icon', width: 40, sortable: false, align: 'center' }, { display: '<%= misc.line %>', name: 'line', width: 40, sortable: false, align: 'center' }, { display: '<%= misc.area %>', name: 'area', width: 40, sortable: false, align: 'center' } ], searchitems: [ - { display: '<%= osm.key %>/<%= osm.value %>', name: 'k' } + { display: '<%= osm.key %>/<%= osm.value %>', name: 'key' } ], - sortname: 'k', + sortname: 'key', sortorder: 'asc', 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)') : '*', - row.icon ? '<img src="/api/2/josm/styles/images?style=standard&image=' + row.icon + '" title="' + row.icon + '" alt=""/>' : '', + link_to_key(row.key), + row.value ? link_to_value(row.key, row.value) : row.b ? (row.b + ' (Boolean)') : '*', + row.icon ? '<img src="/api/4/josm/style/image?style=standard&image=' + row.icon + '" title="' + row.icon + '" alt=""/>' : '', '<div>' + (row.line_width > 0 ? '<div title="' + row.line_color + '" style="height: ' + row.line_width + 'px; margin-top: ' + (10 - Math.round(row.line_width/2)) + 'px; padding: 0; background-color: ' + row.line_color + '"></div>' : '') + '</div>', row.area_color ? '<div title="' + row.area_color + '" style="height: 18px; background-color: ' + row.area_color + '"></div>' : '' ] }; diff --git a/web/viewsjs/tag.js.erb b/web/viewsjs/tag.js.erb index e0fb9f8..173fab0 100644 --- a/web/viewsjs/tag.js.erb +++ b/web/viewsjs/tag.js.erb @@ -93,21 +93,21 @@ var create_flexigrid_for = { }, josm: function(key, value) { create_flexigrid('grid-josm', { - url: '/api/2/josm/styles/standard/tags?key=' + encodeURIComponent(key) + '&value=' + encodeURIComponent(value), + url: '/api/4/tag/josm/style/rules?style=standard&key=' + encodeURIComponent(key) + '&value=' + encodeURIComponent(value), colModel: [ - { display: '<%= osm.value %>', name: 'v', width: 400, sortable: false }, + { display: '<%= osm.value %>', name: 'value', width: 400, sortable: false }, { display: '<%= misc.icon %>', name: 'icon', width: 40, sortable: false, align: 'center' }, { display: '<%= misc.line %>', name: 'line', width: 40, sortable: false, align: 'center' }, { display: '<%= misc.area %>', name: 'area', width: 40, sortable: false, align: 'center' } ], - sortname: 'v', + sortname: 'value', sortorder: 'asc', emptymsg: '<%= page.josm.no_styles %>', preProcess: function(data) { data.rows = jQuery.map(data.data, function(row, i) { return { 'cell': [ - row.v ? link_to_value(row.k, row.v) : row.b ? (row.b + ' (Boolean)') : '*', - row.icon ? '<img src="/api/2/josm/styles/images?style=standard&image=' + row.icon + '" title="' + row.icon + '" alt=""/>' : '', + row.value ? link_to_value(row.key, row.value) : row.b ? (row.b + ' (Boolean)') : '*', + row.icon ? '<img src="/api/4/josm/style/image?style=standard&image=' + row.icon + '" title="' + row.icon + '" alt=""/>' : '', '<div>' + (row.line_width > 0 ? '<div title="' + row.line_color + '" style="height: ' + row.line_width + 'px; margin-top: ' + (10 - Math.round(row.line_width/2)) + 'px; padding: 0; background-color: ' + row.line_color + '"></div>' : '') + '</div>', row.area_color ? '<div title="' + row.area_color + '" style="height: 18px; background-color: ' + row.area_color + '"></div>' : '' ] }; |