[Vtigercrm-commits] [vtiger-commits] r9254 - /vtigercrm/trunk/include/js/dtlviewajax.js
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon Sep 4 07:36:20 EDT 2006
Author: richie
Date: Mon Sep 4 05:36:06 2006
New Revision: 9254
Log:
Ajax edit provided for multi selection combo box --Jeri
Modified:
vtigercrm/trunk/include/js/dtlviewajax.js
Modified: vtigercrm/trunk/include/js/dtlviewajax.js
==============================================================================
--- vtigercrm/trunk/include/js/dtlviewajax.js (original)
+++ vtigercrm/trunk/include/js/dtlviewajax.js Mon Sep 4 05:36:06 2006
@@ -113,6 +113,7 @@
var dtlView = "dtlview_"+ fieldLabel;
var editArea = "editarea_"+ fieldLabel;
var groupurl = "";
+
if(globaluitype == 53)
{
if(typeof(document.DetailView.assigntype[0]) != 'undefined')
@@ -134,10 +135,22 @@
var groupurl = "&assigned_group_name="+group_name+"&assigntype=T"
}
- }else
+ }if(globaluitype == 33)
+ {
+ var txtBox= "txtbox_"+ fieldLabel;
+ var oMulSelect = $(txtBox);
+ var r = new Array();
+ for (iter=0;iter < oMulSelect.options.length ; iter++)
+ {
+ if (oMulSelect.options[iter].selected)
+ r[r.length] = oMulSelect.options[iter].value;
+ }
+ }
+ else
{
var txtBox= "txtbox_"+ fieldLabel;
}
+
var popupTxt= "popuptxt_"+ fieldLabel;
var hdTxt = "hdtxt_"+ fieldLabel;
@@ -162,8 +175,7 @@
{
tagValue = "0";
}
- }
- if(uitype == '156')
+ }else if(uitype == '156')
{
if(document.getElementById(txtBox).checked == true)
{
@@ -172,7 +184,10 @@
{
tagValue = "off";
}
- }
+ }else if(uitype == '33')
+ {
+ tagValue = r.join(" |##| ");
+ }
var data = "file=DetailViewAjax&module=" + module + "&action=" + module + "Ajax&record=" + crmId+"&recordid=" + crmId ;
@@ -183,17 +198,17 @@
method: 'post',
postBody: data,
onComplete: function(response) {
- if(response.responseText.indexOf(":#:FAILURE")>-1)
- {
- alert("Error while Editing");
- }
- else if(response.responseText.indexOf(":#:SUCCESS")>-1)
- {
- $("vtbusy_info").style.display="none";
- }
- }
+ if(response.responseText.indexOf(":#:FAILURE")>-1)
+ {
+ alert("Error while Editing");
+ }
+ else if(response.responseText.indexOf(":#:SUCCESS")>-1)
+ {
+ $("vtbusy_info").style.display="none";
+ }
+ }
}
- );
+ );
if(uitype == '13' || uitype == '104')
{
getObj(dtlView).innerHTML = "<a href=\"mailto:"+ tagValue+"\" target=\"_blank\">"+tagValue+" </a>";
@@ -296,7 +311,10 @@
{
getObj(dtlView).innerHTML = popObj.value;
}
- }else
+ }else if(uitype == '33')
+ {
+ getObj(dtlView).innerHTML = r.join(" , ");
+ }else
{
getObj(dtlView).innerHTML = tagValue;
}
More information about the vtigercrm-commits
mailing list