[Vtigercrm-commits] [vtiger-commits] r6944 - /vtigercrm/trunk/modules/Calendar/script.js
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Jun 7 08:42:44 EDT 2006
Author: saraj
Date: Wed Jun 7 06:42:41 2006
New Revision: 6944
Log:
ajax functionality has been modified
Modified:
vtigercrm/trunk/modules/Calendar/script.js
Modified: vtigercrm/trunk/modules/Calendar/script.js
==============================================================================
--- vtigercrm/trunk/modules/Calendar/script.js (original)
+++ vtigercrm/trunk/modules/Calendar/script.js Wed Jun 7 06:42:41 2006
@@ -391,23 +391,20 @@
usr_id.value = selectedColStr;
}
-function ajaxCalSaveResponse(response)
-{
- document.getElementById("hrView_default").style.display = "none";
- document.getElementById("toggleDiv").innerHTML=response.responseText;
-}
-
-function fnRedirect(view,hour,day,month,year){
- var ajaxObj = new VtigerAjax(ajaxCalSaveResponse);
- var tagName = document.getElementById('viewBox');
- var OptionData = tagName.options[tagName.selectedIndex].value;
- if(OptionData == 'hourview'){
- var urlstring ="module=Calendar&action=CalendarAjax&view="+view+"&hour="+hour+"&day="+day+"&month="+month+"&year="+year+"&type="+OptionData+"&parenttab=My Home Page&ajax=true";
- }
- else if(OptionData == 'listview'){
- var urlstring ="module=Calendar&action=CalendarAjax&view="+view+"&hour="+hour+"&day="+day+"&month="+month+"&year="+year+"&type="+OptionData+"&parenttab=My Home Page&ajax=true";
- }
- ajaxObj.process("index.php?",urlstring);
+function fnRedirect(view,hour,day,month,year) {
+ var OptionData = $('viewBox').options[$('viewBox').selectedIndex].value;
+ new Ajax.Request(
+ 'index.php',
+ {queue: {position: 'end', scope: 'command'},
+ method: 'post',
+ postBody: 'module=Calendar&action=CalendarAjax&view='+view+'&hour='+hour+'&day='+day+'&month='+month+'&year='+year+'&type='+OptionData+'&parenttab=My Home Page&ajax=true',
+ onComplete: function(response) {
+ $("hrView_default").style.display = "none";
+ $("toggleDiv").innerHTML=response.responseText;
+ }
+ }
+
+ );
}
function fnAddEvent(obj,CurrObj,start_date,end_date,start_hr,start_min,start_fmt,end_hr,end_min,end_fmt){
@@ -431,29 +428,32 @@
var tagName = document.getElementById('addEventDropDown').style.display= 'block';
}
-function ajaxMiniCalSaveResponse(response)
-{
- document.getElementById("miniCal").innerHTML=response.responseText;
-}
-
-function getMiniCal()
-{
- var ajaxObj = new VtigerAjax(ajaxMiniCalSaveResponse);
- var urlstring ="module=Calendar&action=CalendarAjax&type=minical&parenttab=My Home Page&ajax=true";
- ajaxObj.process("index.php?",urlstring);
-
-}
-
-function getCalSettings()
-{
- var ajaxObj = new VtigerAjax(ajaxCalSettingsSaveResponse);
- var urlstring ="module=Calendar&action=CalendarAjax&type=settings&parenttab=My Home Page&ajax=true";
- ajaxObj.process("index.php?",urlstring);
-}
-
-function ajaxCalSettingsSaveResponse(response)
-{
- document.getElementById("calSettings").innerHTML=response.responseText;
+function getMiniCal(){
+ new Ajax.Request(
+ 'index.php',
+ {queue: {position: 'end', scope: 'command'},
+ method: 'post',
+ postBody: 'module=Calendar&action=CalendarAjax&type=minical&parenttab=My Home Page&ajax=true',
+ onComplete: function(response) {
+ $("miniCal").innerHTML=response.responseText;
+ }
+ }
+
+ );
+}
+
+function getCalSettings(){
+ new Ajax.Request(
+ 'index.php',
+ {queue: {position: 'end', scope: 'command'},
+ method: 'post',
+ postBody: 'module=Calendar&action=CalendarAjax&type=settings&parenttab=My Home Page&ajax=true',
+ onComplete: function(response) {
+ $("calSettings").innerHTML=response.responseText;
+ }
+ }
+
+ );
}
function getcalAction(obj,Lay,id,view,hour,day,month,year,type){
More information about the vtigercrm-commits
mailing list