[Vtigercrm-commits] [vtiger-commits] r7912 - in /branches/VTIGERCRM-5.0.2-MMBRICH: include/js/objects/CommSystem.js modules/CommSystem/CommSystem.php modules/CommSystem/CommSystemAjax.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Sun Jul 9 15:17:39 EDT 2006
Author: mmbrich
Date: Sun Jul 9 13:17:38 2006
New Revision: 7912
Log:
misc comm system fixes
Modified:
branches/VTIGERCRM-5.0.2-MMBRICH/include/js/objects/CommSystem.js
branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/CommSystem.php
branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/CommSystemAjax.php
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 Sun Jul 9 13:17:38 2006
@@ -109,8 +109,10 @@
OnFocusEvent: function(evt) {
if(evt.type == "focus")
this.Focused='true';
- else if(evt.type == "blur")
+ else if(evt.type == "blur") {
+ window.focus();
this.Focused='false';
+ }
},
/*
@@ -141,7 +143,7 @@
sending_user: otheruser,
msg_data: msg,
msg_type: 'P2PIM',
- user_name: globalCommSystem.user_name,
+ user_name: globalCommSystem.user.user_name,
timestamp: myDate.getHours()+":"+myDate.getMinutes()+":"+myDate.getSeconds()
}
globalCommSystem = this;
@@ -197,9 +199,9 @@
/* 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 == "" || typeof(msg.user_name) == "undefined")
+ if(msg.user_name == "" || typeof(msg.user_name) == "undefined" || msg.user_name == globalCommSystem.user.user_name) {
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)
+ } 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;
else
msg.msg_data = "<br>"+msg.msg_data;
Modified: branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/CommSystem.php
==============================================================================
--- branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/CommSystem.php (original)
+++ branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/CommSystem.php Sun Jul 9 13:17:38 2006
@@ -40,7 +40,7 @@
$q = "INSERT INTO vtiger_comm_system
(msg_type,sending_user,receivers,msg_data,sentdate)
VALUES
- ('".$msg_type."','".$sending_user."','".$receivers."','".addslashes($msg_data)."','".$nowdate."')";
+ ('".$msg_type."','".$sending_user."','".$receivers."','".$msg_data."','".$nowdate."')";
break;
case 'EMAIL':
if($recordid == 0 || $sending_user == 0 || $receivers == 0) { return "false"; }
Modified: branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/CommSystemAjax.php
==============================================================================
--- branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/CommSystemAjax.php (original)
+++ branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/CommSystemAjax.php Sun Jul 9 13:17:38 2006
@@ -57,7 +57,7 @@
$ret .= '"sending_user":"'.$msg[$i]["sending_user"].'",';
$ret .= '"user_name":"'.$msg[$i]["user_name"].'",';
$ret .= '"timestamp":"'.$msg[$i]["sentdate"].'",';
- $ret .= '"msg_data":"'.stripslashes($msg[$i]["msg_data"]).'"}';
+ $ret .= '"msg_data":"'.$msg[$i]["msg_data"].'"}';
if(($i+1) == $cnt)
$ret .= '}';
More information about the vtigercrm-commits
mailing list