[Vtigercrm-commits] [vtiger-commits] r6572 - in /vtigercrm/trunk: Smarty/templates/AddMailAccount.tpl Smarty/templates/Webmails.tpl modules/Settings/language/en_us.lang.php modules/Webmails/ListView.php modules/Webmails/webmails.js

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Sat May 27 23:42:17 EDT 2006


Author: mmbrich
Date: Sat May 27 21:42:12 2006
New Revision: 6572

Log:
new "Degraded Service" mode that allows POP and IMAPv1

Modified:
    vtigercrm/trunk/Smarty/templates/AddMailAccount.tpl
    vtigercrm/trunk/Smarty/templates/Webmails.tpl
    vtigercrm/trunk/modules/Settings/language/en_us.lang.php
    vtigercrm/trunk/modules/Webmails/ListView.php
    vtigercrm/trunk/modules/Webmails/webmails.js

Modified: vtigercrm/trunk/Smarty/templates/AddMailAccount.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/AddMailAccount.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/AddMailAccount.tpl Sat May 27 21:42:12 2006
@@ -101,8 +101,8 @@
        <tr>
            <td class="dvtCellLabel" align="right">{$MOD.LBL_MAIL_PROTOCOL}</td>
            <td class="dvtCellInfo">
-		<!-- <input type="radio" name="mailprotocol" value="imap" {$IMAP}/>&nbsp;{$MOD.LBL_IMAP} 
-		<input type="radio" name="mailprotocol" value="pop3" {$POP3}/>&nbsp;{$MOD.LBL_POP}  -->
+		<input type="radio" name="mailprotocol" value="pop3" {$POP3}/>&nbsp;{$MOD.LBL_POP} <font color="red">*</font>&nbsp;
+		<input type="radio" name="mailprotocol" value="imap" {$IMAP}/>&nbsp;{$MOD.LBL_IMAP} <font color="red">*</font>&nbsp;
 		<input type="radio" name="mailprotocol" value="imap2" {$IMAP2}/>&nbsp;{$MOD.LBL_IMAP2}
 		<input type="radio" name="mailprotocol" value="IMAP4" {$IMAP4}/>&nbsp;{$MOD.LBL_IMAP4}
 	   </td>	
@@ -140,6 +140,8 @@
            <td class="dvtCellLabel" align="right">{$MOD.LBL_EMAILS_PER_PAGE}</td>
            <td class="dvtCellInfo"><input type="text" name="mails_per_page" value="{$MAILS_PER_PAGE}" class="detailedViewTextBox" onfocus="this.className='detailedViewTextBoxOn'" onblur="this.className='detailedViewTextBox'"/></td>
            <td class="dvtCellInfo">&nbsp;</td>
+	</tr><tr>
+	<td colspan='3' align='center'>{$MOD.LBL_MAIL_DISCLAIM}</td>
        </tr>
        <tr><td colspan="3" style="border-bottom:1px dashed #CCCCCC;">&nbsp;</td></tr>
        <tr>

Modified: vtigercrm/trunk/Smarty/templates/Webmails.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/Webmails.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/Webmails.tpl Sat May 27 21:42:12 2006
@@ -104,11 +104,13 @@
                       <tr>
                         <td width="45%"><input type="button" name="Button2" value=" {$MOD.LBL_MOVE_TO} "  class="classWebBtn" onclick="move_messages();"/> {$FOLDER_SELECT}&nbsp;
                         </td>
+			{if $DEGRADED_SERVICE eq 'false'}
                         <td width="75%" align="right">
 							<font color="#000000">{$APP.LBL_SEARCH}</font>&nbsp;<input type="text" name="srch" class="importBox" id="search_input"/>&nbsp;
 							<select name="optionSel" class="importBox" id="search_type"><option selected value="SUBJECT">in Subject</option><option value="BODY">in Body</option><option value="TO">in To:</option><option value="CC">in CC:</option><option value="BCC">in BCC:</option><option value="FROM">in From:</option></select>&nbsp;
 							<input type="button" name="find" value=" {$APP.LBL_FIND_BUTTON} " class="classWebBtn" onclick="search_emails();" />
-						</td>
+			</td>
+			{/if}
                       </tr>
                     </table></td>
                   </tr>
@@ -120,7 +122,7 @@
 	                      <tr>
     	                    <th width="5%"><input type="checkbox" name="checkbox" value="checkbox"  onclick="select_all();"/></th>
 							{foreach item=element from=$LISTHEADER}
-                	        <th>{$element}</th>
+								{$element}
 							{/foreach}
                     	  </tr>
 						  {foreach item=row from=$LISTENTITY}

Modified: vtigercrm/trunk/modules/Settings/language/en_us.lang.php
==============================================================================
--- vtigercrm/trunk/modules/Settings/language/en_us.lang.php (original)
+++ vtigercrm/trunk/modules/Settings/language/en_us.lang.php Sat May 27 21:42:12 2006
@@ -476,10 +476,11 @@
 'LBL_TEST_BUTTON_KEY'=>'T',
 'LBL_TEST_BUTTON_LABEL'=>'Test my account now!',
 'LBL_DEFAULT'=>'Default',
-'LBL_IMAP'=>'IMAP',
 'LBL_IMAP2'=>'IMAP2',
 'LBL_IMAP4'=>'IMAP4',
 'LBL_POP'=>'POP',
+'LBL_IMAP'=>'IMAP',
+'LBL_MAIL_DISCLAIM'=>' Items marked with a <font color="red">*</font> are not fully supported',
 'LBL_SSL_OPTIONS'=>'SSL Options',
 'LBL_TLS'=>'TLS',
 'LBL_NO_TLS'=>'No TLS',

Modified: vtigercrm/trunk/modules/Webmails/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/ListView.php (original)
+++ vtigercrm/trunk/modules/Webmails/ListView.php Sat May 27 21:42:12 2006
@@ -35,6 +35,9 @@
 $account_name=$temprow["account_name"];
 $show_hidden=$_REQUEST["show_hidden"];
 
+$degraded_service='false';
+if($mail_protocol == "imap" || $mail_protocol == "pop3")
+	$degraded_service='true';
 
 ?>
 <script language="JavaScript" type="text/javascript" src="include/scriptaculous/prototype.js"></script>
@@ -42,6 +45,7 @@
 <script language="JavaScript" type="text/javascript" src="modules/Webmails/webmails.js"></script>
 
 <script type="text/javascript">
+<?php if($degraded_service == 'true') { echo 'var degraded_service="true";';}else{echo 'var degraded_service="false";';};?>
 var mailbox = "<?php echo $mailbox;?>";
 var box_refresh=<?php echo $box_refresh;?>;
 var webmail = new Array();
@@ -140,7 +144,7 @@
 
 // draw a row for the listview entry
 function show_msg($mails,$start_message) {
- 	global $mbox,$displayed_msgs;
+ 	global $mbox,$displayed_msgs,$show_hidden;
 
   	$num = $mails[$start_message]->msgno;
   	// TODO: scan the current db tables to find a
@@ -306,5 +310,6 @@
 $smarty->assign("MAILBOX", $mailbox);
 $smarty->assign("ACCOUNT", $account_name);
 $smarty->assign("BOXLIST",$folders);
+$smarty->assign("DEGRADED_SERVICE",$degraded_service);
 $smarty->display("Webmails.tpl");
 ?>

Modified: vtigercrm/trunk/modules/Webmails/webmails.js
==============================================================================
--- vtigercrm/trunk/modules/Webmails/webmails.js (original)
+++ vtigercrm/trunk/modules/Webmails/webmails.js Sat May 27 21:42:12 2006
@@ -72,6 +72,10 @@
         }
 }
 function check_for_new_mail(mbox) {
+	if(degraded_service == 'true') {
+		window.location=window.location;
+		return;
+	}
         $("status").style.display="block";
         new Ajax.Request(
                 'modules/Webmails/WebmailsAjax.php',
@@ -207,6 +211,10 @@
         timer = window.setTimeout("periodic_event()",box_refresh);
 }
 function show_hidden() {
+	if(degraded_service == 'true') {
+		window.location=window.location+"&show_hidden=true";
+		return;
+	}
         $("status").style.display="block";
         var els = document.getElementsByClassName("deletedRow");
         for(var i=0;i<els.length;i++) {





More information about the vtigercrm-commits mailing list