make map contributor list dropdown into links to profiles
This commit is contained in:
parent
f938ffade3
commit
ce3ab9903a
3 changed files with 10 additions and 5 deletions
|
@ -4781,6 +4781,8 @@ Metamaps.Map.InfoBox = {
|
||||||
$('.mapContributors .tip').unbind().click(function(event){
|
$('.mapContributors .tip').unbind().click(function(event){
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
});
|
});
|
||||||
|
$('.mapContributors .tip li a').click(Metamaps.Router.intercept);
|
||||||
|
|
||||||
$('.mapInfoBox').unbind('.hideTip').bind('click.hideTip', function(){
|
$('.mapInfoBox').unbind('.hideTip').bind('click.hideTip', function(){
|
||||||
$('.mapContributors .tip').hide();
|
$('.mapContributors .tip').hide();
|
||||||
});
|
});
|
||||||
|
@ -4794,15 +4796,15 @@ Metamaps.Map.InfoBox = {
|
||||||
var self = Metamaps.Map.InfoBox;
|
var self = Metamaps.Map.InfoBox;
|
||||||
|
|
||||||
var string = "";
|
var string = "";
|
||||||
|
console.log("hello!!")
|
||||||
string += "<ul>";
|
string += "<ul>";
|
||||||
|
|
||||||
Metamaps.Mappers.each(function(m){
|
Metamaps.Mappers.each(function(m){
|
||||||
string += '<li><img class="rtUserImage" width="25" height="25" src="' + m.get("image") + '" />' + m.get("name") + '</li>';
|
string += '<li><a href="/explore/mapper/' + m.get("id") + '">' + '<img class="rtUserImage" width="25" height="25" src="' + m.get("image") + '" />' + m.get("name") + '</a></li>';
|
||||||
});
|
});
|
||||||
|
|
||||||
string += "</ul>";
|
string += "</ul>";
|
||||||
|
console.log(string);
|
||||||
return string;
|
return string;
|
||||||
},
|
},
|
||||||
updateNumbers: function () {
|
updateNumbers: function () {
|
||||||
|
|
|
@ -1708,6 +1708,9 @@ h3.realtimeBoxTitle {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mapContributors .tip li a {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
.mapContributors div:after {
|
.mapContributors div:after {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<span><%= @map.contributors.count %></span>
|
<span><%= @map.contributors.count %></span>
|
||||||
<div class="tip"> <ul><% @map.contributors.each_with_index do |c, index| %>
|
<div class="tip"> <ul><% @map.contributors.each_with_index do |c, index| %>
|
||||||
<li > <img class="rtUserImage" width="25" height="25" src="<%= c.image.url(:thirtytwo) %>" />
|
<li ><a href="/explore/mapper/<%= c.id %>" > <img class="rtUserImage" width="25" height="25" src="<%= c.image.url(:thirtytwo) %>" />
|
||||||
<%= c.name %>
|
<%= c.name %></a>
|
||||||
</li>
|
</li>
|
||||||
<% end %></ul></div>
|
<% end %></ul></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue