From: Tom Hughes Date: Fri, 16 Aug 2013 16:04:13 +0000 (+0100) Subject: Allow iD and Potlatch 2 to load assets outside the asset pipeline X-Git-Tag: live~4746 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/d8a504d8dbc7262dee96678e98d017d918dfa111?ds=sidebyside Allow iD and Potlatch 2 to load assets outside the asset pipeline --- diff --git a/app/views/site/_potlatch2.html.erb b/app/views/site/_potlatch2.html.erb index 9edf6b5f7..a6cde5960 100644 --- a/app/views/site/_potlatch2.html.erb +++ b/app/views/site/_potlatch2.html.erb @@ -32,6 +32,8 @@ flashvars.font_library = "<%= asset_path "potlatch2/FontLibrary.swf" %>"; flashvars.locale = "<%= Potlatch2::LOCALES[locale] %>"; flashvars.locale_paths = "<%= Potlatch2::LOCALES[locale] %>=<%= asset_path("potlatch2/locales/#{Potlatch2::LOCALES[locale]}.swf") %>"; + flashvars.intro_image = "<%= asset_path "help/introduction.jpg" %>"; + flashvars.intro_video = "<%= asset_path "help/introduction.mp4" %>"; <% if params['gpx'] %> flashvars.gpx = '<%= h(params['gpx']) %>'; <% end %> diff --git a/app/views/site/id.html.erb b/app/views/site/id.html.erb index 469bb3f91..fde4a07cd 100644 --- a/app/views/site/id.html.erb +++ b/app/views/site/id.html.erb @@ -20,7 +20,7 @@ var id = iD() .embed(true) - .assetPath("/assets/iD/") <%# Can't use asset_path('iD/') in production. %> + .assetPath("/iD/") <%# Can't use asset_path('iD/') in production. %> .assetMap(<%= assets("iD").to_json.html_safe %>) .locale("<%= locale %>", "<%= asset_path("iD/locales/#{locale}.json") %>") .preauth({ diff --git a/public/iD b/public/iD new file mode 120000 index 000000000..5ef1ad48e --- /dev/null +++ b/public/iD @@ -0,0 +1 @@ +../vendor/assets/iD/iD \ No newline at end of file