SVG fix for IE 9+

This commit is contained in:
Godwin
2014-07-12 23:25:33 -06:00
parent 43351b0044
commit cbb3164c6a
4 changed files with 25 additions and 10 deletions
+6 -2
View File
@@ -436,7 +436,7 @@ module ApplicationHelper
end
def icon(id, attributes = nil)
('<svg' + hash_to_html_attributes(attributes) + '><use xlink:href="/assets/icons.svg#bb-icon-' + id + '"></use></svg>').html_safe
('<svg' + hash_to_html_attributes(attributes) + '><use xlink:href="' + cdn('/assets/icons.svg') + '#bb-icon-' + id + '"></use></svg>').html_safe
end
def static_map(location, zoom, width, height)
@@ -452,7 +452,11 @@ module ApplicationHelper
end
end
(Rails.application.config.action_controller.asset_host || '')+"/maps/#{local_file_name}"
cdn("/maps/#{local_file_name}")
end
def cdn(file)
(Rails.application.config.action_controller.asset_host || '') + file
end
private