diff --git a/app/assets/javascripts/src/JIT.js.erb b/app/assets/javascripts/src/JIT.js.erb index 79954271..81cc687d 100644 --- a/app/assets/javascripts/src/JIT.js.erb +++ b/app/assets/javascripts/src/JIT.js.erb @@ -3127,7 +3127,7 @@ var Canvas; ctx = base.getCtx(), scale = base.scaleOffsetX; //var pattern = new Image(); - //pattern.src = "/assets/cubes.png"; + //pattern.src = "<%= asset_path('cubes.png') %>"; //var ptrn = ctx.createPattern(pattern, 'repeat'); //ctx.fillStyle = ptrn; ctx.fillStyle = Metamaps.Settings.colors.background; diff --git a/app/assets/javascripts/src/Metamaps.GlobalUI.js.erb b/app/assets/javascripts/src/Metamaps.GlobalUI.js.erb index 656c62e5..5c575e88 100644 --- a/app/assets/javascripts/src/Metamaps.GlobalUI.js.erb +++ b/app/assets/javascripts/src/Metamaps.GlobalUI.js.erb @@ -495,7 +495,7 @@ Metamaps.GlobalUI.Search = { dataset.push({ value: "No results", label: "No results", - typeImageURL: "/assets/icons/wildcard.png", + typeImageURL: "<%= asset_path('icons/wildcard.png') %>", rtype: "noresult" }); } @@ -549,7 +549,7 @@ Metamaps.GlobalUI.Search = { filter: function (dataset) { if (dataset.length == 0) { dataset.push({ - profile: "/assets/user.png", + profile: "<%= asset_path('user.png') %>", value: "No results", label: "No results", diff --git a/app/assets/javascripts/src/Metamaps.JIT.js.erb b/app/assets/javascripts/src/Metamaps.JIT.js.erb index bef4ad59..a0ddf146 100644 --- a/app/assets/javascripts/src/Metamaps.JIT.js.erb +++ b/app/assets/javascripts/src/Metamaps.JIT.js.erb @@ -29,10 +29,10 @@ Metamaps.JIT = { $(".takeScreenshot").click(Metamaps.Map.exportImage); self.topicDescImage = new Image(); - self.topicDescImage.src = '/assets/topic_description_signifier.png'; + self.topicDescImage.src = '<%= asset_path('topic_description_signifier.png') %>'; self.topicLinkImage = new Image(); - self.topicLinkImage.src = '/assets/topic_link_signifier.png'; + self.topicLinkImage.src =<%= asset_path('topic_link_signifier.png') %>'; }, /** * convert our topic JSON into something JIT can use diff --git a/app/assets/javascripts/src/Metamaps.js.erb b/app/assets/javascripts/src/Metamaps.js.erb index 99377757..9846f4ea 100644 --- a/app/assets/javascripts/src/Metamaps.js.erb +++ b/app/assets/javascripts/src/Metamaps.js.erb @@ -337,7 +337,7 @@ Metamaps.Backbone.init = function () { prepareLiForFilter: function () { var li = ''; li += '
  • ';       - li += '"'; li += ' alt="synapse icon" />';       li += '

    ' + this.get('desc') + '

  • '; return li; @@ -4791,7 +4791,7 @@ Metamaps.Map.InfoBox = { obj["map_creator_tip"] = isCreator ? self.changePermissionText : ""; obj["contributors_class"] = Metamaps.Mappers.length > 1 ? "multiple" : ""; obj["contributors_class"] += Metamaps.Mappers.length === 2 ? " mTwo" : ""; - obj["contributor_image"] = Metamaps.Mappers.length > 0 ? Metamaps.Mappers.models[0].get("image") : "/assets/user.png"; + obj["contributor_image"] = Metamaps.Mappers.length > 0 ? Metamaps.Mappers.models[0].get("image") : "<%= asset_path('user.png') %>"; obj["contributor_list"] = self.createContributorList(); obj["user_name"] = isCreator ? "You" : map.get("user_name"); obj["created_at"] = map.get("created_at_clean"); @@ -4888,7 +4888,7 @@ Metamaps.Map.InfoBox = { if (Metamaps.Mappers.length === 2) contributors_class = "multiple mTwo"; else if (Metamaps.Mappers.length > 2) contributors_class = "multiple"; - var contributors_image = "/assets/user.png"; + var contributors_image = "<%= asset_path('user.png') %>"; if (Metamaps.Mappers.length > 0) { // get the first contributor and use their image contributors_image = Metamaps.Mappers.models[0].get("image"); @@ -5069,7 +5069,7 @@ Metamaps.Account = { var self = Metamaps.Account; $('.userImageDiv canvas').remove(); - $('.userImageDiv img').attr('src', '/assets/user.png').show(); + $('.userImageDiv img').attr('src', '<%= asset_path('user.png') %>').show(); $('.userImageMenu').hide(); var input = $('#user_image');