~qeef/damn-client.js

cf429a9ddd1ca6816a87438edc213f3220517880 — Jiri Vlasak 4 months ago 930a5c4 + 3238cf9
Merge branch 'hotfix/0.19.3'
1 files changed, 13 insertions(+), 0 deletions(-)

M static/mappy-area.js
M static/mappy-area.js => static/mappy-area.js +13 -0
@@ 12,6 12,8 @@ function html_mappy_area(area)
        "<- list": "javascript:go_to(\"list\")",
        "statistics": "javascript:go_to(\"stats\", " + aid + ")",
        "how to mappy": "javascript:how_to_mappy()",
        "no background": "javascript:no_background()",
        "osm backrgound": "javascript:osm_background(" + aid + ")",
    };
    if (!api.token()) nav_links["authenticate"] = "javascript:api.auth()";
    var tags = area["tags"];


@@ 73,6 75,17 @@ function how_to_mappy()
    ih += "</ul>";
    up("damn_info", ih);
}
function no_background()
{
    var sm = document.getElementById("svg_map");
    sm.style.backgroundImage = "none";
}
function osm_background(aid)
{
    var sm = document.getElementById("svg_map");
    var img_url = "url('https://osmsm.damn-project.org/" + aid + ".png')";
    sm.style.backgroundImage = img_url;
}
function act_square(e, aid, sid)
{
    e = e || window.event;