* VRFS-2097 - move around hover hookups
This commit is contained in:
parent
f27673eb31
commit
6b5cd42432
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
this.showBubble = function($hoverElement) {
|
||||
|
||||
rest.getBand(bandId)
|
||||
return rest.getBand(bandId)
|
||||
.done(function(response) {
|
||||
$(hoverSelector).html('');
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
this.showBubble = function($hoverElement) {
|
||||
|
||||
rest.getUserDetail({id: userId})
|
||||
return rest.getUserDetail({id: userId})
|
||||
.done(function(response) {
|
||||
$(hoverSelector).html('');
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
this.showBubble = function($hoverElement) {
|
||||
$templateLatency = $("#template-account-session-latency");
|
||||
|
||||
rest.getUserDetail({id: userId})
|
||||
return rest.getUserDetail({id: userId})
|
||||
.done(function(response) {
|
||||
$(hoverSelector).html('');
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
this.showBubble = function($hoverElement) {
|
||||
|
||||
rest.getClaimedRecording(recordingId)
|
||||
return rest.getClaimedRecording(recordingId)
|
||||
.done(function(response) {
|
||||
var claimedRecording = response;
|
||||
var recording = response.recording;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
this.showBubble = function($hoverElement) {
|
||||
|
||||
rest.getSessionHistory(sessionId)
|
||||
return rest.getSessionHistory(sessionId)
|
||||
.done(function(response) {
|
||||
$(hoverSelector).html('');
|
||||
|
||||
|
|
|
|||
|
|
@ -333,23 +333,26 @@
|
|||
|
||||
function showBubble(bubble, $hoverElement) {
|
||||
$hoverElement.attr("bubble-id", bubble.id);
|
||||
bubble.showBubble($hoverElement);
|
||||
bubble.showBubble($hoverElement)
|
||||
.done(function() {
|
||||
|
||||
$(bubble.id()).hover(
|
||||
function () {
|
||||
$(this).data('hovering', true)
|
||||
// do nothing when entering the bubble
|
||||
},
|
||||
function () {
|
||||
$(this).data('hovering', false).fadeOut(100);
|
||||
}
|
||||
);
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
function hideBubble($hoverElement) {
|
||||
|
||||
var bubbleSelector = $hoverElement.attr("bubble-id");
|
||||
|
||||
$(bubbleSelector).hover(
|
||||
function () {
|
||||
$(this).data('hovering', true)
|
||||
// do nothing when entering the bubble
|
||||
},
|
||||
function () {
|
||||
$(this).data('hovering', false).fadeOut(fadeoutValue);
|
||||
}
|
||||
);
|
||||
|
||||
// first check to see if the user isn't hovering over the hover bubble
|
||||
if (!$(bubbleSelector).data('hovering')) {
|
||||
$(bubbleSelector).fadeOut(fadeoutValue);
|
||||
|
|
@ -360,8 +363,10 @@
|
|||
$("[hoveraction='musician']", $parent).hoverIntent({
|
||||
over: function(e) {
|
||||
var bubble = new JK.MusicianHoverBubble($(this).attr('user-id'), e.pageX, e.pageY);
|
||||
|
||||
showBubble(bubble, $(this));
|
||||
|
||||
|
||||
},
|
||||
out: function () { // this registers for leaving the hoverable element
|
||||
hideBubble($(this));
|
||||
|
|
|
|||
Loading…
Reference in New Issue