1 <% if defined? ID_KEY %>
2 <iframe frameBorder="0" id="id-embed" class="id-embed"></iframe>
3 <% token = @user.access_token(ID_KEY) %>
6 '<%= request.protocol + request.host_with_port %>': {
7 oauth_consumer_key: "<%= token.client_application.key %>",
8 oauth_secret: "<%= token.client_application.secret %>",
9 oauth_token: "<%= token.token %>",
10 oauth_token_secret: "<%= token.secret %>"
15 <% if @lat && @lon && @zoom -%>
16 coord.lat = <%= @lat %>;
17 coord.lon = <%= @lon %>;
18 coord.zoom = <%= @zoom %>;
20 var params = OSM.mapParams();
21 coord.lat = params.lat;
22 coord.lon = params.lon;
23 coord.zoom = params.zoom;
25 var url = 'id_iframe#map=' + coord.zoom + '/' + coord.lon + '/' + coord.lat +
26 '&preauth=' + JSON.stringify(keys);
27 $('#id-embed').attr('src', url);
30 <script type="text/javascript">alert("<%= t 'site.edit.id_not_configured' %>")</script>
33 <script type="text/javascript">