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 9edf6b5..a6cde59 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 469bb3f..fde4a07 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