[Vtigercrm-commits] [vtiger-commits] r7898 - /branches/VTIGERCRM-5.0.2-MMBRICH/include/js/objects/CommSystem.js
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Fri Jul 7 12:38:03 EDT 2006
Author: mmbrich
Date: Fri Jul 7 10:38:02 2006
New Revision: 7898
Log:
misc comm system fixes
Modified:
branches/VTIGERCRM-5.0.2-MMBRICH/include/js/objects/CommSystem.js
Modified: branches/VTIGERCRM-5.0.2-MMBRICH/include/js/objects/CommSystem.js
==============================================================================
--- branches/VTIGERCRM-5.0.2-MMBRICH/include/js/objects/CommSystem.js (original)
+++ branches/VTIGERCRM-5.0.2-MMBRICH/include/js/objects/CommSystem.js Fri Jul 7 10:38:02 2006
@@ -104,8 +104,7 @@
method: 'post',
postBody: 'module=CommSystem&action=CommSystemAjax&command=sendChatMessage&receivers='+otheruser+'&msg='+msg+'&msg_type=P2PIM',
onComplete: function(response) {
- if(!response.responseText.match(/^failed/)) {
- Object.extend(msgStruct, {msg_data:'<font color="blue">'+globalCommSystem.user.user_name+"</font>: "+response.responseText});
+ if(response.responseText != "failed") {
globalCommSystem.ShowNewChatMessage(msgStruct,"");
} else {
Object.extend(msgStruct, {msg_data:'<font color="red">Failed to deliver message</font>: '+msgStruct.msg_data});
@@ -143,8 +142,10 @@
Try.these (
function() {
new Effect.Appear("msgwindow_"+msg.sending_user,{duration:'0.2'});
- if(msg.user_name != globalCommSystem.user.user_name)
- msg.msg_data = "<BR><font color='red'>"+msg.user_name+"</font> "+msg.msg_data;
+ if(msg.user_name == "")
+ msg.msg_data = "<BR><font color='blue'>"+globalCommSystem.user.user_name+"</font>: "+msg.msg_data;
+ else if(msg.user_name != globalCommSystem.user.user_name)
+ msg.msg_data = "<BR><font color='red'>"+msg.user_name+"</font>: "+msg.msg_data;
else
msg.msg_data = "<br>"+msg.msg_data;
@@ -245,7 +246,8 @@
try {
Try.these (
function() {
- $("chat_data_"+msg.sending_user).innerHTML = "<br><font color='red'>"+msg.user_name+"</font>: "+msg.msg_data;
+ if(msg.msg_data != "")
+ $("chat_data_"+msg.sending_user).innerHTML = "<br><font color='red'>"+msg.user_name+"</font>: "+msg.msg_data;
},
function() {
$("chat_data_"+msg.sending_user).innerHTML += "<br>"+msg.msg_data;
@@ -281,7 +283,7 @@
},
HideAlertSlider: function() {
- new Effect.Fold($("alert_display"),{onFinish: function() {
+ new Effect.Fold($("alert_display"), {onFinish: function() {
$("alert_display").innerHTML = "";
}
}
@@ -363,13 +365,13 @@
alert(msgs.CommSysMessages[i].message.msg_data);
break;
case 'EMAIL':
- alert(msgs.CommSysMessages[i].message.recordid);
+ globalCommSystem.ShowAlertSlider("<b>New Email:</b><br> "+msgs.CommSysMessages[i].message.recordid);
break;
case 'INPHONE':
- alert(msgs.CommSysMessages[i].message.msg_data);
+ globalCommSystem.ShowAlertSlider("<b>Incoming Call:</b><br> "+msgs.CommSysMessages[i].message.msg_data);
break;
case 'VOICEMAIL':
- alert(msgs.CommSysMessages[i].message.msg_data);
+ globalCommSystem.ShowAlertSlider("<b>New Voicemial:</b><br> "+msgs.CommSysMessages[i].message.msg_data);
break;
}
}catch(h){}
More information about the vtigercrm-commits
mailing list