Merge branch 'develop' of github.com:Connoropolous/metamaps_gen002 into develop
This commit is contained in:
commit
411efa9692
5 changed files with 17 additions and 11 deletions
|
@ -225,7 +225,6 @@
|
||||||
|
|
||||||
if (href.attr === "") Metamaps.Router.home();
|
if (href.attr === "") Metamaps.Router.home();
|
||||||
else {
|
else {
|
||||||
console.log(segments);
|
|
||||||
Metamaps.Router[segments[0]](segments[1], segments[2]);
|
Metamaps.Router[segments[0]](segments[1], segments[2]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ Metamaps.Views.init = function () {
|
||||||
|
|
||||||
template: Hogan.compile( $('#mapperCardTemplate').html() ),
|
template: Hogan.compile( $('#mapperCardTemplate').html() ),
|
||||||
|
|
||||||
tagName: "div",
|
tagNamea: "div",
|
||||||
|
|
||||||
className: "mapper",
|
className: "mapper",
|
||||||
|
|
||||||
|
@ -91,8 +91,10 @@ Metamaps.Views.init = function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
Metamaps.Loading.hide();
|
Metamaps.Loading.hide();
|
||||||
setTimeout(function(){
|
|
||||||
var path = Metamaps.currentSection == "" ? "" : "/explore/" + Metamaps.currentPage;
|
clearTimeout(Metamaps.routerTimeoutFunctionIds);
|
||||||
|
Metamaps.routerTimeoutId = setTimeout((function(localCurrentPage){ return function(){
|
||||||
|
var path = (Metamaps.currentSection == "") ? "" : "/explore/" + localCurrentPage;
|
||||||
|
|
||||||
// alter url if for mapper profile page
|
// alter url if for mapper profile page
|
||||||
if (that.collection && that.collection.mapperId) {
|
if (that.collection && that.collection.mapperId) {
|
||||||
|
@ -100,7 +102,7 @@ Metamaps.Views.init = function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
Metamaps.Router.navigate(path);
|
Metamaps.Router.navigate(path);
|
||||||
}, 500);
|
}})(Metamaps.currentPage), 500);
|
||||||
},
|
},
|
||||||
handleSuccess: function () {
|
handleSuccess: function () {
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
|
@ -4765,6 +4765,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();
|
||||||
});
|
});
|
||||||
|
@ -4778,15 +4780,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