[Vtigercrm-commits] [vtiger-commits] r7521 - in /vtigercrm/trunk: Smarty/templates/Emails.tpl include/language/en_us.lang.php modules/Emails/language/en_us.lang.php modules/Webmails/WebmailsAjax.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Mon Jun 26 08:14:27 EDT 2006


Author: richie
Date: Mon Jun 26 06:14:19 2006
New Revision: 7521

Log:
Mail Server check done through Ajaz

Modified:
    vtigercrm/trunk/Smarty/templates/Emails.tpl
    vtigercrm/trunk/include/language/en_us.lang.php
    vtigercrm/trunk/modules/Emails/language/en_us.lang.php
    vtigercrm/trunk/modules/Webmails/WebmailsAjax.php

Modified: vtigercrm/trunk/Smarty/templates/Emails.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/Emails.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/Emails.tpl Mon Jun 26 06:14:19 2006
@@ -11,6 +11,23 @@
 -->*}
 <!--  USER  SETTINGS PAGE STARTS HERE -->
 <script language="javascript">
+function gotoWebmail()
+{ldelim}
+	new Ajax.Request(
+		'index.php',
+		{ldelim}queue: {ldelim}position: 'end', scope: 'command'{rdelim},
+                	method: 'post',
+			postBody: "module=Webmails&action=WebmailsAjax&file=ListView&config_chk=true",
+			onComplete: function(response) {ldelim}
+				if(response.responseText != 'SUCESS')
+					$('mailconfchk').style.display = 'block';
+				else
+					window.location.href = "index.php?module=Webmails&action=index&parenttab=My Home Page";
+			{rdelim}
+		{rdelim}
+	);
+
+{rdelim}
 
 function setSubject(subject)
 {ldelim}
@@ -112,7 +129,7 @@
 </script>
 		{include file='Buttons_List.tpl'}
 <script language="JavaScript" type="text/javascript" src="modules/Emails/Email.js"></script>
-
+<div class="fixedLay" id="mailconfchk" style="display:none;left:350px;top:160px;height:27px;white-space:nowrap;z-index:10000007px;"><font color='red'><h3>{$MOD.LBL_CONFIGURE_MAIL_SETTINGS}.<br> {$APP.LBL_PLEASE_CLICK} <a href="index.php?module=Settings&action=AddMailAccount&record={$USERID}">{$APP.LBL_HERE}</a> {$APP.LBL_TO_CONFIGURE}</h3></font></div>
 <!-- Shadow starts here -->
 <table width="100%" border="0" cellpadding="0" cellspacing="0" height="100%">
 	<tr>
@@ -169,7 +186,7 @@
 										<a href="javascript:;" onClick="ShowFolders(6)" class="webMnu">{$MOD.LBL_QUAL_CONTACT}</a>&nbsp;<b></b>
 									</li>
 									<li><img src="{$IMAGE_PATH}webmail_downarrow.gif" align="absmiddle" />&nbsp;&nbsp;
-									<a href="index.php?module=Webmails&action=index&parenttab=My Home Page" class="webMnu">{$MOD.LBL_MY_MAILS}</a>&nbsp;<b></b>
+									<a href="javascript:;" onClick="gotoWebmail();" class="webMnu">{$MOD.LBL_MY_MAILS}</a>&nbsp;<b></b>
 									</li>
 								</ul>
 								<!-- Sent mail -->

Modified: vtigercrm/trunk/include/language/en_us.lang.php
==============================================================================
--- vtigercrm/trunk/include/language/en_us.lang.php (original)
+++ vtigercrm/trunk/include/language/en_us.lang.php Mon Jun 26 06:14:19 2006
@@ -936,7 +936,9 @@
 'This Week'=>'This Week',
 'This Month'=>'This Month',
 'This Year'=>'This Year',
-
+'LBL_PLEASE_CLICK'=>'Please Click',
+'LBL_TO_CONFIGURE'=>'to Configure',
+'LBL_HERE'=>'here',
 );
 
 

Modified: vtigercrm/trunk/modules/Emails/language/en_us.lang.php
==============================================================================
--- vtigercrm/trunk/modules/Emails/language/en_us.lang.php (original)
+++ vtigercrm/trunk/modules/Emails/language/en_us.lang.php Mon Jun 26 06:14:19 2006
@@ -142,6 +142,7 @@
 'LBL_IN_SUBJECT_OR_SENDER'=>'in Subject or Sender',
 'CHOSE_EMAIL'=>'Choose Email ID',
 'Sender'=>'Sender',
+'LBL_CONFIGURE_MAIL_SETTINGS'=>'Your Incoming Mail Server is not configured',
 );
 
 ?>

Modified: vtigercrm/trunk/modules/Webmails/WebmailsAjax.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/WebmailsAjax.php (original)
+++ vtigercrm/trunk/modules/Webmails/WebmailsAjax.php Mon Jun 26 06:14:19 2006
@@ -16,6 +16,17 @@
 
 global $adb,$mbox,$current_user;
 $mailInfo = getMailServerInfo($current_user);
+if($_REQUEST['config_chk'] == 'true')
+{
+	if($adb->num_rows($mailInfo) < 1) {
+		echo 'FAILED';
+		exit();
+	}else
+	{
+		echo 'SUCESS';
+		exit();
+	}
+}
 if($adb->num_rows($mailInfo) < 1) {
         echo "<center><font color='red'><h3>Please configure your mail settings</h3></font></center>";
         exit();





More information about the vtigercrm-commits mailing list