]> git.openstreetmap.org Git - rails.git/commitdiff
Allow iD and Potlatch 2 to load assets outside the asset pipeline
authorTom Hughes <tom@compton.nu>
Fri, 16 Aug 2013 16:04:13 +0000 (17:04 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 22 Sep 2013 09:33:31 +0000 (10:33 +0100)
app/views/site/_potlatch2.html.erb
app/views/site/id.html.erb
public/iD [new symlink]

index 9edf6b5f70a782a5c32736cdc6321ae766ce7988..a6cde596093a2cdf1ad8ef226ebf5ff003e68233 100644 (file)
@@ -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 %>
index 469bb3f91bb06e08cf4f47f3993b3a7e16fe18c3..fde4a07cd394fd10067517fb9c13fd9749342c08 100644 (file)
@@ -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 (symlink)
index 0000000..5ef1ad4
--- /dev/null
+++ b/public/iD
@@ -0,0 +1 @@
+../vendor/assets/iD/iD
\ No newline at end of file