[Vtigercrm-commits] [vtiger-commits] r6911 - /vtigercrm/trunk/Smarty/templates/Emails.tpl
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Jun 7 02:04:27 EDT 2006
Author: saraj
Date: Wed Jun 7 00:04:23 2006
New Revision: 6911
Log:
ajax functionality has been modified
Modified:
vtigercrm/trunk/Smarty/templates/Emails.tpl
Modified: vtigercrm/trunk/Smarty/templates/Emails.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/Emails.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/Emails.tpl Wed Jun 7 00:04:23 2006
@@ -11,24 +11,15 @@
-->*}
<!-- USER SETTINGS PAGE STARTS HERE -->
<script language="javascript">
-function ajaxSaveResponse(response)
-{ldelim}
- hide("status");
- document.getElementById("email_con").innerHTML=response.responseText;
- execJS(document.getElementById('email_con'));
-{rdelim}
-function ajaxgetResponse(response)
-{ldelim}
- hide("status");
- document.getElementById("EmailDetails").innerHTML=response.responseText;
-{rdelim}
+
function setSubject(subject)
{ldelim}
-document.getElementById("subjectsetter").innerHTML=subject
-{rdelim}
+ document.getElementById("subjectsetter").innerHTML=subject
+{rdelim}
+
function getEmailContents(id)
{ldelim}
- show("status");
+ $("status").style.display="inline";
var rowid = 'row_'+id;
getObj(rowid).className = 'prvPrfHoverOn';
if(gselectedrowid != 0 && gselectedrowid != id)
@@ -37,34 +28,22 @@
getObj(prev_selected_rowid).className = 'prvPrfHoverOff';
{rdelim}
gselectedrowid = id;
- var ajaxObj = new VtigerAjax(ajaxgetResponse);
- var urlstring ="module=Emails&action=EmailsAjax&file=DetailView&mode=ajax&record="+id;
- ajaxObj.process("index.php?",urlstring);
-{rdelim}
-{literal}
-
-function ajaxDelResponse(response)
-{
- hide("status");
- document.getElementById('EmailDetails').innerHTML = '<table valign="top" border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="forwardBg"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td colspan="2"> </td></tr></tbody></table></td></tr><tr><td style="padding-top: 10px;" bgcolor="#ffffff" height="300" valign="top"></td></tr></tbody></table>';
- document.getElementById("subjectsetter").innerHTML='';
- document.getElementById("email_con").innerHTML=response.responseText;
- execJS(document.getElementById('email_con'));
-}
-
-{/literal}
+ new Ajax.Request(
+ 'index.php',
+ {ldelim}queue: {ldelim}position: 'end', scope: 'command'{rdelim},
+ method: 'post',
+ postBody: 'module=Emails&action=EmailsAjax&file=DetailView&mode=ajax&record='+id,
+ onComplete: function(response) {ldelim}
+ $("status").style.display="none";
+ $("EmailDetails").innerHTML = response.responseText;
+ {rdelim}
+ {rdelim}
+ );
+{rdelim}
+
function ShowFolders(folderid)
{ldelim}
- show("status");
- if(gFolderid != folderid)
- {ldelim}
- var ajaxObj = new VtigerAjax(ajaxSaveResponse);
- gselectedrowid = 0;
- {rdelim}
- else
- {ldelim}
- var ajaxObj = new VtigerAjax(ajaxDelResponse);
- {rdelim}
+ $("status").style.display="inline";
gFolderid = folderid;
getObj('search_text').value = '';
switch(folderid)
@@ -87,8 +66,31 @@
case 6:
getObj('mail_fldrname').innerHTML = '{$MOD.LBL_QUAL_CONTACT}';
{rdelim}
- var urlstring ="module=Emails&ajax=true&action=EmailsAjax&file=ListView&folderid="+folderid;
- ajaxObj.process("index.php?",urlstring);
+
+ new Ajax.Request(
+ 'index.php',
+ {ldelim}queue: {ldelim}position: 'end', scope: 'command'{rdelim},
+ method: 'post',
+ postBody: 'module=Emails&ajax=true&action=EmailsAjax&file=ListView&folderid='+folderid,
+ onComplete: function(response) {ldelim}
+ $("status").style.display="none";
+ if(gFolderid != folderid)
+ {ldelim}
+ gselectedrowid = 0;
+ $("email_con").innerHTML=response.responseText;
+ execJS($('email_con'));
+ {rdelim}
+ else
+ {ldelim}
+ $('EmailDetails').innerHTML = '<table valign="top" border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td class="forwardBg"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td colspan="2"> </td></tr></tbody></table></td></tr><tr><td style="padding-top:10px;" bgcolor="#ffffff" height="300" valign="top"></td></tr></tbody></table>';
+ $("subjectsetter").innerHTML='';
+ $("email_con").innerHTML=response.responseText;
+ execJS($('email_con'));
+ {rdelim}
+ {rdelim}
+ {rdelim}
+ );
+
{rdelim}
function getListViewEntries_js(module,url)
{ldelim}
More information about the vtigercrm-commits
mailing list