[Vtigercrm-commits] [vtiger-commits] r5276 - /vtigercrm/trunk/include/js/customview.js
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon Apr 24 09:50:08 EDT 2006
Author: saraj
Date: Mon Apr 24 07:50:04 2006
New Revision: 5276
Log:
changes made to fix the issue in CustomField
Modified:
vtigercrm/trunk/include/js/customview.js
Modified: vtigercrm/trunk/include/js/customview.js
==============================================================================
--- vtigercrm/trunk/include/js/customview.js (original)
+++ vtigercrm/trunk/include/js/customview.js Mon Apr 24 07:50:04 2006
@@ -27,6 +27,9 @@
function validate() {
+ lengthLayer=getObj("lengthdetails")
+ decimalLayer=getObj("decimaldetails")
+ pickListLayer=getObj("picklist")
var str = getObj("fldLabel").value;
if (!emptyCheck("fldLabel","Label"))
return false
@@ -38,7 +41,7 @@
return false;
}
- if (lengthLayer.style.display=="block") {
+ if (lengthLayer.style.visibility=="visible") {
if (!emptyCheck("fldLength","Length"))
return false
@@ -52,7 +55,7 @@
return false
}
- if (decimalLayer.style.display=="block") {
+ if (decimalLayer.style.visibility=="visible") {
if (getObj("fldDecimal").value.replace(/^\s+/g, '').replace(/\s+$/g, '').length>0)
if (!intValidate("fldDecimal","Decimal"))
return false
@@ -63,7 +66,7 @@
return false
}
var picklistObj=getObj("fldPickList")
- if (pickListLayer.style.display=="block") {
+ if (pickListLayer.style.visibility=="visible") {
if (emptyCheck("fldPickList","Picklist values")) {
var pickListAry=new Array()
pickListAry=splitValues()
@@ -144,21 +147,21 @@
var decimalLayer=getObj("decimaldetails");
var pickListLayer=getObj("picklist");
if (type=='text') {
- lengthLayer.style.display="block"
- decimalLayer.style.display="none"
- pickListLayer.style.display="none"
+ lengthLayer.style.visibility="visible"
+ decimalLayer.style.visibility="hidden"
+ pickListLayer.style.visibility="hidden"
} else if (type=='date' || type=='email' || type=='phone' || type=='url' || type=='checkbox' || type=='textarea') {
- getObj("lengthdetails").style.display="none"
- decimalLayer.style.display="none"
- pickListLayer.style.display="none"
+ getObj("lengthdetails").style.visibility="hidden"
+ decimalLayer.style.visibility="hidden"
+ pickListLayer.style.visibility="hidden"
} else if (type=='number' || type=='percent' || type=='currency') {
- lengthLayer.style.display="block"
- decimalLayer.style.display="block"
- pickListLayer.style.display="none"
+ lengthLayer.style.visibility="visible"
+ decimalLayer.style.visibility="visible"
+ pickListLayer.style.visibility="hidden"
} else if (type=='picklist' || type=='multiselectcombo') {
- lengthLayer.style.display="none"
- decimalLayer.style.display="none"
- pickListLayer.style.display="block"
+ lengthLayer.style.visibility="hidden"
+ decimalLayer.style.visibility="hidden"
+ pickListLayer.style.visibility="visible"
}
More information about the vtigercrm-commits
mailing list