convert javascript to asset_path syntax
This commit is contained in:
parent
6e9b0ac9ef
commit
235aa7a6b3
4 changed files with 9 additions and 9 deletions
|
@ -3127,7 +3127,7 @@ var Canvas;
|
||||||
ctx = base.getCtx(),
|
ctx = base.getCtx(),
|
||||||
scale = base.scaleOffsetX;
|
scale = base.scaleOffsetX;
|
||||||
//var pattern = new Image();
|
//var pattern = new Image();
|
||||||
//pattern.src = "/assets/cubes.png";
|
//pattern.src = "<%= asset_path('cubes.png') %>";
|
||||||
//var ptrn = ctx.createPattern(pattern, 'repeat');
|
//var ptrn = ctx.createPattern(pattern, 'repeat');
|
||||||
//ctx.fillStyle = ptrn;
|
//ctx.fillStyle = ptrn;
|
||||||
ctx.fillStyle = Metamaps.Settings.colors.background;
|
ctx.fillStyle = Metamaps.Settings.colors.background;
|
||||||
|
|
|
@ -495,7 +495,7 @@ Metamaps.GlobalUI.Search = {
|
||||||
dataset.push({
|
dataset.push({
|
||||||
value: "No results",
|
value: "No results",
|
||||||
label: "No results",
|
label: "No results",
|
||||||
typeImageURL: "/assets/icons/wildcard.png",
|
typeImageURL: "<%= asset_path('icons/wildcard.png') %>",
|
||||||
rtype: "noresult"
|
rtype: "noresult"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -549,7 +549,7 @@ Metamaps.GlobalUI.Search = {
|
||||||
filter: function (dataset) {
|
filter: function (dataset) {
|
||||||
if (dataset.length == 0) {
|
if (dataset.length == 0) {
|
||||||
dataset.push({
|
dataset.push({
|
||||||
profile: "/assets/user.png",
|
profile: "<%= asset_path('user.png') %>",
|
||||||
|
|
||||||
value: "No results",
|
value: "No results",
|
||||||
label: "No results",
|
label: "No results",
|
||||||
|
|
|
@ -29,10 +29,10 @@ Metamaps.JIT = {
|
||||||
$(".takeScreenshot").click(Metamaps.Map.exportImage);
|
$(".takeScreenshot").click(Metamaps.Map.exportImage);
|
||||||
|
|
||||||
self.topicDescImage = new Image();
|
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 = 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
|
* convert our topic JSON into something JIT can use
|
||||||
|
|
|
@ -337,7 +337,7 @@ Metamaps.Backbone.init = function () {
|
||||||
prepareLiForFilter: function () {
|
prepareLiForFilter: function () {
|
||||||
var li = '';
|
var li = '';
|
||||||
li += '<li data-id="' + this.get('desc') + '">';
|
li += '<li data-id="' + this.get('desc') + '">';
|
||||||
li += '<img src="/assets/synapse16.png"';
|
li += '<img src="<%= asset_path('synapse16.png') %>"';
|
||||||
li += ' alt="synapse icon" />';
|
li += ' alt="synapse icon" />';
|
||||||
li += '<p>' + this.get('desc') + '</p></li>';
|
li += '<p>' + this.get('desc') + '</p></li>';
|
||||||
return li;
|
return li;
|
||||||
|
@ -4791,7 +4791,7 @@ Metamaps.Map.InfoBox = {
|
||||||
obj["map_creator_tip"] = isCreator ? self.changePermissionText : "";
|
obj["map_creator_tip"] = isCreator ? self.changePermissionText : "";
|
||||||
obj["contributors_class"] = Metamaps.Mappers.length > 1 ? "multiple" : "";
|
obj["contributors_class"] = Metamaps.Mappers.length > 1 ? "multiple" : "";
|
||||||
obj["contributors_class"] += Metamaps.Mappers.length === 2 ? " mTwo" : "";
|
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["contributor_list"] = self.createContributorList();
|
||||||
obj["user_name"] = isCreator ? "You" : map.get("user_name");
|
obj["user_name"] = isCreator ? "You" : map.get("user_name");
|
||||||
obj["created_at"] = map.get("created_at_clean");
|
obj["created_at"] = map.get("created_at_clean");
|
||||||
|
@ -4888,7 +4888,7 @@ Metamaps.Map.InfoBox = {
|
||||||
if (Metamaps.Mappers.length === 2) contributors_class = "multiple mTwo";
|
if (Metamaps.Mappers.length === 2) contributors_class = "multiple mTwo";
|
||||||
else if (Metamaps.Mappers.length > 2) contributors_class = "multiple";
|
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) {
|
if (Metamaps.Mappers.length > 0) {
|
||||||
// get the first contributor and use their image
|
// get the first contributor and use their image
|
||||||
contributors_image = Metamaps.Mappers.models[0].get("image");
|
contributors_image = Metamaps.Mappers.models[0].get("image");
|
||||||
|
@ -5069,7 +5069,7 @@ Metamaps.Account = {
|
||||||
var self = Metamaps.Account;
|
var self = Metamaps.Account;
|
||||||
|
|
||||||
$('.userImageDiv canvas').remove();
|
$('.userImageDiv canvas').remove();
|
||||||
$('.userImageDiv img').attr('src', '/assets/user.png').show();
|
$('.userImageDiv img').attr('src', '<%= asset_path('user.png') %>').show();
|
||||||
$('.userImageMenu').hide();
|
$('.userImageMenu').hide();
|
||||||
|
|
||||||
var input = $('#user_image');
|
var input = $('#user_image');
|
||||||
|
|
Loading…
Reference in a new issue