<% osm = @trans.t.osm misc = @trans.t.misc %> function create_flexigrid_with_option(stylename) { create_flexigrid('grid-rules', { url: '/api/4/josm/style/rules?style=' + stylename, colModel: [ { display: '<%= h(osm.key) %>', name: 'key', width: 300, sortable: true }, { display: '<%= h(osm.value) %>', name: 'value', width: 300, sortable: true }, { display: '<%= h(misc.icon) %>', name: 'icon', width: 40, sortable: false, align: 'center' }, { display: '<%= h(misc.line) %>', name: 'line', width: 40, sortable: false, align: 'center' }, { display: '<%= h(misc.area) %>', name: 'area', width: 40, sortable: false, align: 'center' } ], searchitems: [ { display: '<%= h(osm.key) %>/<%= h(osm.value) %>', name: 'key' } ], sortname: 'key', sortorder: 'asc', preProcess: function(data) { data.rows = jQuery.map(data.data, function(row, i) { return { 'cell': [ link_to_key(row.key), fmt_josm_value(row.key, row.value, row.value_bool), fmt_josm_icon('standard', row.icon), fmt_josm_line(row.line_width, row.line_color), fmt_josm_area(row.area_color) ] }; }); return data; } }); } function page_init() { up = function() { window.location = '/reports'; }; page_init2(); }