make map contributor list dropdown into links to profiles

This commit is contained in:
Bashar Jabbour 2014-11-29 15:56:38 -05:00
parent f938ffade3
commit ce3ab9903a
3 changed files with 10 additions and 5 deletions

View file

@ -4781,6 +4781,8 @@ Metamaps.Map.InfoBox = {
$('.mapContributors .tip').unbind().click(function(event){
event.stopPropagation();
});
$('.mapContributors .tip li a').click(Metamaps.Router.intercept);
$('.mapInfoBox').unbind('.hideTip').bind('click.hideTip', function(){
$('.mapContributors .tip').hide();
});
@ -4794,15 +4796,15 @@ Metamaps.Map.InfoBox = {
var self = Metamaps.Map.InfoBox;
var string = "";
console.log("hello!!")
string += "<ul>";
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>";
console.log(string);
return string;
},
updateNumbers: function () {

View file

@ -1708,6 +1708,9 @@ h3.realtimeBoxTitle {
color: white;
}
.mapContributors .tip li a {
color: white;
}
.mapContributors div:after {
content: '';
position: absolute;

View file

@ -23,8 +23,8 @@
<% end %>
<span><%= @map.contributors.count %></span>
<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) %>" />
<%= c.name %>
<li ><a href="/explore/mapper/<%= c.id %>" > <img class="rtUserImage" width="25" height="25" src="<%= c.image.url(:thirtytwo) %>" />
<%= c.name %></a>
</li>
<% end %></ul></div>
</div>