summaryrefslogtreecommitdiff
path: root/web/viewsjs/reports/wiki_images.js.erb
blob: 2e9045341b3457473ad717a1ac476695d6cd5c3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<%
    osm = @trans.t.osm
    misc = @trans.t.misc
 %>
function page_init() {
    var keys = <%= @db.select("SELECT DISTINCT key FROM wiki.wikipages WHERE value IS NULL AND image IN (SELECT image FROM wiki.wiki_images) ORDER BY key").execute().map{ |row| row['key'] }.to_json; %>;
    console.log(keys);
    up = function() { window.location = '/reports'; };
    jQuery('.keyimg').each(function(index) {
        console.log(index, this);
        jQuery(this).attr('href', url_for_key(keys[index]));
        jQuery(this).text(fmt_key(keys[index]));
    });
}