diff --git a/web/app/assets/javascripts/hoverBand.js b/web/app/assets/javascripts/hoverBand.js index ea408da91..ecdfaa860 100644 --- a/web/app/assets/javascripts/hoverBand.js +++ b/web/app/assets/javascripts/hoverBand.js @@ -10,7 +10,7 @@ var hoverSelector = "#band-hover"; this.showBubble = function() { - $(hoverSelector).css({left: position.left, top: position.top+200}); + $(hoverSelector).css({left: position.left-100, top: position.top}); $(hoverSelector).fadeIn(500); rest.getBand(bandId) diff --git a/web/app/assets/javascripts/hoverFan.js b/web/app/assets/javascripts/hoverFan.js index aac8914f5..69af6ee01 100644 --- a/web/app/assets/javascripts/hoverFan.js +++ b/web/app/assets/javascripts/hoverFan.js @@ -1,14 +1,76 @@ (function(context,$) { - "use strict"; - context.JK = context.JK || {}; - context.JK.FanHoverBubble = function(app) { + "use strict"; + context.JK = context.JK || {}; + context.JK.FanHoverBubble = function(userId, position) { - function initialize() { + var logger = context.JK.logger; + var rest = context.JK.Rest(); + var instrumentLogoMap = context.JK.getInstrumentIconMap24(); + var hoverSelector = "#fan-hover"; - } - - this.initialize = initialize; - this.showBubble = showBubble; - } + this.showBubble = function() { + $(hoverSelector).css({left: position.left-100, top: position.top}); + $(hoverSelector).fadeIn(500); + + rest.getUserDetail({id: userId}) + .done(function(response) { + $(hoverSelector).html(''); + + // followings + var followingHtml = ''; + $.each(response.followings, function(index, val) { + if (index < 4) { // display max of 4 followings (NOTE: this only displays USER followings, not BAND followings) + if (index % 2 === 0) { + followingHtml += '
| " + val.name + " |
| " + val.name + " |
|
-
+
<% unless track.musician.photo_url.blank? %>
<%= image_tag "#{track.musician.photo_url}", {:alt => ""} %>
<% else %>
@@ -16,7 +16,7 @@
<% end %>
|
- <%= track.musician.name %> |
+ <%= track.musician.name %> |
<%= image_tag "content/icon_instrument_#{track.instrument_id.tr(" ", "_")}45.png", {:width => 32, :alt => "", :title => "#{track.instrument_id}"} %>
|