[Vtigercrm-commits] [vtiger-commits] r7908 - /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:29:18 EDT 2006
Author: mmbrich
Date: Sat Jul 8 16:29:17 2006
New Revision: 7908
Log:
fixes for "user typing" messages flooding the system
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:29:17 2006
@@ -168,6 +168,7 @@
*/
SendMsg: function(evt) {
try {
+ globalCommSystem.UserStopTyping(Event.element(evt).name);
var dat = $("msg_input_"+Event.element(evt).name);
globalCommSystem.SendChatMessage(Event.element(evt).name,dat.value);
}catch(p){alert(p);}
@@ -380,16 +381,14 @@
* status message to the other user
*/
UserTyping: function(evt) {
- window.clearTimeout(this.keytimer);
var tname = "status_bar_"+Event.element(evt).name;
- if(evt.type === "keypress" && evt.keyCode != Event.KEY_RETURN) {
+ if(evt.type === "keypress") {
+ window.clearTimeout(globalCommSystem.keytimer);
if(globalCommSystem.keycount == 0) {
globalCommSystem.SendStatusMessage('begin',Event.element(evt).name);
globalCommSystem.keycount++;
}
globalCommSystem.keytimer = window.setTimeout('globalCommSystem.UserStopTyping("'+Event.element(evt).name+'")',2000);
- } else if (evt.keyCode == Event.KEY_RETURN) {
- //globalCommSystem.SendMsg(evt);
}
},
More information about the vtigercrm-commits
mailing list