[Vtigercrm-commits] [vtiger-commits] r6933 - /vtigercrm/trunk/Smarty/templates/Settings/EmailNotification.tpl
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Jun 7 07:42:54 EDT 2006
Author: saraj
Date: Wed Jun 7 05:42:50 2006
New Revision: 6933
Log:
ajax functionality has been modified
Modified:
vtigercrm/trunk/Smarty/templates/Settings/EmailNotification.tpl
Modified: vtigercrm/trunk/Smarty/templates/Settings/EmailNotification.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/Settings/EmailNotification.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/Settings/EmailNotification.tpl Wed Jun 7 05:42:50 2006
@@ -46,33 +46,39 @@
<script>
function fetchSaveNotify(id)
{
- hide('editdiv');
- show('status');
- var ajaxObj = new VtigerAjax(ajaxsavenotifyresponse);
- var active = document.getElementById("notify_status").options[document.getElementById("notify_status").options.selectedIndex].value;
- var subject = document.getElementById("notifysubject").value;
- var body = document.getElementById("notifybody").value;
- urlstring ='action=UsersAjax&module=Users&file=SaveNotification&active='+active+'¬ifysubject='+subject+'¬ifybody='+body+'&record='+id;
- ajaxObj.process("index.php?",urlstring);
-}
-function ajaxsavenotifyresponse(response)
-{
- hide("status");
- document.getElementById("notifycontents").innerHTML=response.responseText;
+ $("editdiv").style.display="none";
+ $("status").style.display="inline";
+ var active = $("notify_status").options[$("notify_status").options.selectedIndex].value;
+ var subject = $("notifysubject").value;
+ var body = $("notifybody").value;
+ new Ajax.Request(
+ 'index.php',
+ {queue: {position: 'end', scope: 'command'},
+ method: 'post',
+ postBody: 'action=UsersAjax&module=Users&file=SaveNotification&active='+active+'¬ifysubject='+subject+'¬ifybody='+body+'&record='+id,
+ onComplete: function(response) {
+ $("status").style.display="none";
+ $("notifycontents").innerHTML=response.responseText;
+ }
+ }
+ );
}
function fetchEditNotify(id)
{
- show('status');
- var ajaxObj = new VtigerAjax(ajaxnotifyresponse);
- urlstring ='action=UsersAjax&module=Users&file=EditNotification&record='+id;
- ajaxObj.process("index.php?",urlstring);
-}
-function ajaxnotifyresponse(response)
-{
- hide("status");
- document.getElementById("editdiv").innerHTML=response.responseText;
- show("editdiv");
+ $("status").style.display="inline";
+ new Ajax.Request(
+ 'index.php',
+ {queue: {position: 'end', scope: 'command'},
+ method: 'post',
+ postBody:'action=UsersAjax&module=Users&file=EditNotification&record='+id,
+ onComplete: function(response) {
+ $("status").style.display="none";
+ $("editdiv").innerHTML=response.responseText;
+ $("editdiv").style.display="inline";
+ }
+ }
+ );
}
</script>
{/literal}
More information about the vtigercrm-commits
mailing list