I don't know if I'm just burnt out or don't have a handle on it, but, here is what I need help on.
I am tinkering with messenger_core.js
I am here...
// if isset new messages for current chat box;
if (oResponse.senders[i].messages_list) {
// if chat box's messages come in section as `message_block`;
if ( oResponse.senders[i].messages_list != 'built-in') {
var iChatBoxHeight = $el.outerHeight();
var iOldChatBoxContentHeight = this.getChatBoxContentHeight($el);
var sVisibleState = this.getVisibility($el);
if( (sVisibleState == 'hidden' && !this.oDefinedChatBoxes.boxes[iChatBoxIndex].blink_handler) || bBoxUndefined ) {
// send the flesh signals;
this.setBlinkMode(iChatBoxIndex, $el);
//SteveSoft
//02-10-2013
//Not in focus
soundManager.play('beep');
}else{
//beep and flash if not in focus <-----
}
// add received messages into current chat box;
$el.append(oResponse.senders[i].messages_list);
if this box is NOT in focus, I need to to beep and flash.
Then when you click on it, stop flashing.
I know somewhere I need to do this
$(this).attr('tabindex', index)
where this is the chat box with the id that gets created.
Then check if that tabindex is in focus.
when I do .is("focus"); on the text input box its always true so that's driving me crazy too!
So, basically if the chat box is open, and you have clicked somewhere else, OR on another tab, I need it to flash and beep.
Thanks!