add mappam... also stuff in user controller that must have been done by TomH?

This commit is contained in:
Steve Coast 2007-06-29 10:18:08 +00:00
parent 7901811752
commit 5a66dbf907
2 changed files with 16 additions and 1 deletions

View file

@ -3,7 +3,7 @@ class UserController < ApplicationController
before_filter :authorize, :only => [:preferences, :api_details, :api_gpx_files]
before_filter :authorize_web, :only => [:account, :go_public, :view, :diary, :make_friend]
before_filter :require_user, :only => [:set_home, :account, :go_public, :make_friend]
before_filter :require_user, :only => [:set_home, :account, :go_public, :make_friend, :api_details]
def save
@title = 'create account'

View file

@ -20,6 +20,12 @@
<script type="text/javascript" src="/openlayers/OpenLayers.js"></script>
<%= javascript_include_tag 'map.js' %>
<% unless @user %>
<script src="http://www.mappam.com/javascripts/mappam.js" type="text/javascript"></script>
<% end %>
<script type="text/javascript">
<!--
var ie6 = ! ( window.addEventListener || window.XMLHttpRequest );
@ -42,6 +48,15 @@
map.events.register("moveend", map, updateLocation);
updateLocation();
<% unless @user %>
if( window.location.host.match( /^www/ ) ) {
mappam.register( map, '10011756636067178496', '1');
} else {
mappam.register( map, '6738410720121976832', '1');
}
<% end %>
document.getElementById('map_OpenLayers_ViewPort').style.position = 'absolute';
if ( ie6 ) {
handleResize();