I Installed it, but nothing is displayed when I hover username in these links '/heartbeat/microactivity' and '/heartbeat/publicheartbeat'
I can't find the docs, where is it?

Comments

bonn’s picture

Status: Active » Closed (fixed)

here is my small fix to make it work out of the box with module heartbeat.

$('.heartbeat-messages-wrapper div:visible.beat-item').each(function() {
  var $element = $(this);
  var uid = $('a.user', this).attr('href').replace('/user/', '');
  if (parseInt(uid) == uid) {
    MicroActivity.bindControls(uid, $('a.user', $element));
  }
});

Add the code above, inside file micro_activity.js line 80 right after the selector $('span.micro-activity').

After installing this module, just go to link '/heartbeat/publicheartbeat', hover on usernames to see the pop-up.

superfedya’s picture

Can you provide please a look of full micro_activity.js code?

superfedya’s picture

Status: Closed (fixed) » Active

Because it doesn't work. Maybe I didn't add this code the right way.

Thanks

ianraf’s picture

does not work
is just the point where I put the code posted above.

MicroActivity.selectors.microActivity = {
execute : function() {
// Test to trigger it in the stream.
$('span.micro-activity').each(function() {
var $element = $(this);
var classes = $element.attr('class').split(' ');
for (n in classes) {
var uid = classes[n].replace('micro-activity-', '');
if (parseInt(uid) == uid) {
MicroActivity.bindControls(uid, $('a', $element));
}
}
}); ----> line 80

$('.heartbeat-messages-wrapper div:visible.beat-item').each(function() {
var $element = $(this);
var uid = $('a.user', this).attr('href').replace('/user/', '');
if (parseInt(uid) == uid) {
MicroActivity.bindControls(uid, $('a.user', $element));
}
});

}
}