[Vtigercrm-commits] [vtiger-commits] r7897 - in /branches/VTIGERCRM-5.0.2-MMBRICH: include/js/objects/CommSystem.js modules/CommSystem/CommSystemAjax.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Fri Jul 7 11:45:04 EDT 2006


Author: mmbrich
Date: Fri Jul  7 09:45:02 2006
New Revision: 7897

Log:
small fixes for comm system

Modified:
    branches/VTIGERCRM-5.0.2-MMBRICH/include/js/objects/CommSystem.js
    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 Fri Jul  7 09:45:02 2006
@@ -269,20 +269,23 @@
 				$("alert_display").style.display = "block";
 				window.setTimeout(function() {
 					globalCommSystem.HideAlertSlider();
-				},3000);
+				},4500);
 			},
 			function() {
 				new Effect.Appear($("alert_display"));
 				window.setTimeout(function() {
 					globalCommSystem.HideAlertSlider();
-				},3000);
+				},4500);
 			}
 		);
 	},
 
 	HideAlertSlider: function() {
-		new Effect.Fade($("alert_display"));
-		$("alert_display").innerHTML = "";
+		new Effect.Fold($("alert_display"),{onFinish: function() {
+					$("alert_display").innerHTML = "";
+				}
+			}
+		);
 	},
 
 	ScrollChatWindow: function(evt) {
@@ -372,12 +375,12 @@
 				}catch(h){}
 				Try.these (
 					function() {
-						if(msgs.CommSysMessages[i].email.email_count > 0)
-							globalCommSystem.ShowAlertSlider("You have "+msgs.CommSysMessages[i].email.email_count+" new emails");
-					},
-					function() {
-						if(msgs.CommSysMessages[(i+1)].email.email_count > 0)
-							globalCommSystem.ShowAlertSlider("You have "+msgs.CommSysMessages[i].email.email_count+" new emails");
+						if(msgs.CommSysMessages[i].email.unseen_emails > 0)
+							globalCommSystem.ShowAlertSlider("You have "+msgs.CommSysMessages[i].email.unseen_emails+" new emails");
+					},
+					function() {
+						if(msgs.CommSysMessages[(i+1)].email.unseen_emails > 0)
+							globalCommSystem.ShowAlertSlider("You have "+msgs.CommSysMessages[i].email.unseen_emails+" new emails");
 					}
 				);
 			}

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 Fri Jul  7 09:45:02 2006
@@ -78,7 +78,8 @@
 		if($email_cnt > 0) {
                       $ret .= '{"email":';
                 	$ret .= '{';
-                	    $ret .= '"email_count":"'.$email_cnt.'",';
+                	    $ret .= '"unseen_emails":"'.$email_cnt.'",';
+                	    $ret .= '"total_emails":"'.$email_cnt.'"';
                 	$ret .= '}';
                       $ret .= '}';
                     $ret .= ']}';





More information about the vtigercrm-commits mailing list