[Vtigercrm-commits] [vtiger-commits] r7909 - /branches/VTIGERCRM-5.0.2-MMBRICH/include/js/objects/CommSystem.js

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Sat Jul 8 18:42:06 EDT 2006


Author: mmbrich
Date: Sat Jul  8 16:42:05 2006
New Revision: 7909

Log:
fix for "undefined" user names no first messages

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 Sat Jul  8 16:42:05 2006
@@ -141,7 +141,7 @@
 			sending_user: otheruser,
 			msg_data: msg,
 			msg_type: 'P2PIM',
-			user_name: '',
+			user_name: globalCommSystem.user_name,
 			timestamp: myDate.getHours()+":"+myDate.getMinutes()+":"+myDate.getSeconds()
 		}
 		globalCommSystem = this;
@@ -197,7 +197,7 @@
 			/* Try to open a window from past messaging with this user */
 			function() {
 				new Effect.Appear("msgwindow_"+msg.sending_user,{duration:'0.2'});
-				if(msg.user_name == "")
+				if(msg.user_name == "" || typeof(msg.user_name) == "undefined")
 					msg.msg_data = "<BR><font color='blue'>"+globalCommSystem.user.user_name+"</font> ("+msg.timestamp+"): "+msg.msg_data;
 				else if(msg.user_name != globalCommSystem.user.user_name)
 					msg.msg_data = "<BR><font color='red'>"+msg.user_name+"</font> ("+msg.timestamp+"): "+msg.msg_data;
@@ -388,7 +388,7 @@
 				globalCommSystem.SendStatusMessage('begin',Event.element(evt).name);
 				globalCommSystem.keycount++;
 			}
-			globalCommSystem.keytimer = window.setTimeout('globalCommSystem.UserStopTyping("'+Event.element(evt).name+'")',2000);
+			globalCommSystem.keytimer = window.setTimeout('globalCommSystem.UserStopTyping("'+Event.element(evt).name+'")',1000);
 		}
 	},
 





More information about the vtigercrm-commits mailing list