diff --git a/web/app/assets/javascripts/utils.js b/web/app/assets/javascripts/utils.js index 56e752cec..306f54249 100644 --- a/web/app/assets/javascripts/utils.js +++ b/web/app/assets/javascripts/utils.js @@ -151,7 +151,11 @@ $element.bt(text, options); } - context.JK.bindHoverEvents = function () { + context.JK.bindHoverEvents = function ($parent) { + + if($parent) { + $parent = $('body'); + } function showBubble(bubble, $hoverElement) { $hoverElement.attr("bubble-id", bubble.id); @@ -171,7 +175,7 @@ } // MUSICIAN - $("[hoveraction='musician']").hoverIntent({ + $("[hoveraction='musician']", $parent).hoverIntent({ over: function () { var bubble = new JK.MusicianHoverBubble($(this).attr('user-id'), $(this).offset()); showBubble(bubble, $(this)); @@ -183,7 +187,7 @@ }); // FAN - $("[hoveraction='fan']").hoverIntent({ + $("[hoveraction='fan']", $parent).hoverIntent({ over: function () { var bubble = new JK.FanHoverBubble($(this).attr('user-id'), $(this).offset()); showBubble(bubble, $(this)); @@ -195,7 +199,7 @@ }); // BAND - $("[hoveraction='band']").hoverIntent({ + $("[hoveraction='band']", $parent).hoverIntent({ over: function () { var bubble = new JK.BandHoverBubble($(this).attr('band-id'), $(this).offset()); showBubble(bubble, $(this)); @@ -207,7 +211,7 @@ }); // SESSION - $("[hoveraction='session']").hoverIntent({ + $("[hoveraction='session']", $parent).hoverIntent({ over: function () { var bubble = new JK.SessionHoverBubble($(this).attr('session-id'), $(this).offset()); showBubble(bubble, $(this)); @@ -219,7 +223,7 @@ }); // RECORDING - $("[hoveraction='recording']").hoverIntent({ + $("[hoveraction='recording']", $parent).hoverIntent({ over: function () { var bubble = new JK.RecordingHoverBubble($(this).attr('recording-id'), $(this).offset()); showBubble(bubble, $(this)); diff --git a/web/app/controllers/api_claimed_recordings_controller.rb b/web/app/controllers/api_claimed_recordings_controller.rb index 471f76ae2..61eaa9de2 100644 --- a/web/app/controllers/api_claimed_recordings_controller.rb +++ b/web/app/controllers/api_claimed_recordings_controller.rb @@ -1,6 +1,6 @@ class ApiClaimedRecordingsController < ApiController - before_filter :api_signed_in_user, :except => [ :download ] + before_filter :api_signed_in_user, :except => [ :download, :show ] before_filter :look_up_claimed_recording, :only => [ :show, :update, :delete, :download ] respond_to :json diff --git a/web/app/controllers/api_music_sessions_controller.rb b/web/app/controllers/api_music_sessions_controller.rb index d5d973415..1e8cfd228 100644 --- a/web/app/controllers/api_music_sessions_controller.rb +++ b/web/app/controllers/api_music_sessions_controller.rb @@ -3,7 +3,7 @@ require 'aws-sdk' class ApiMusicSessionsController < ApiController # have to be signed in currently to see this screen - before_filter :api_signed_in_user, :except => [ :add_like, :show ] + before_filter :api_signed_in_user, :except => [ :add_like, :show, :history_show ] before_filter :lookup_session, only: [:show, :update, :delete, :claimed_recording_start, :claimed_recording_stop, :track_sync] skip_before_filter :api_signed_in_user, only: [:perf_upload] @@ -292,7 +292,7 @@ class ApiMusicSessionsController < ApiController end end - def history_show + def history_show @history = MusicSessionHistory.find(params[:id]) end diff --git a/web/app/views/users/_feed_music_session.html.haml b/web/app/views/users/_feed_music_session.html.haml index 706e85da1..c64534191 100644 --- a/web/app/views/users/_feed_music_session.html.haml +++ b/web/app/views/users/_feed_music_session.html.haml @@ -4,7 +4,7 @@ = session_avatar(feed_item) / type and artist .left.ml20.w15 - .title SESSION + .title{hoveraction: 'session', :'session-id' => feed_item.id } SESSION .artist = session_artist_name(feed_item) = timeago(feed_item.created_at, class: 'small created_at') diff --git a/web/app/views/users/_feed_recording.html.haml b/web/app/views/users/_feed_recording.html.haml index 9e8c252f6..db96df75f 100644 --- a/web/app/views/users/_feed_recording.html.haml +++ b/web/app/views/users/_feed_recording.html.haml @@ -4,7 +4,7 @@ = recording_avatar(feed_item) / type and artist .left.ml20.w15 - .title RECORDING + .title{hoveraction: 'recording', :'recording-id' => feed_item.candidate_claimed_recording.id } RECORDING .artist = recording_artist_name(feed_item) = timeago(feed_item.created_at, class: 'small created_at')