[Vtigercrm-commits] [vtiger-commits] r4607 - /vtigercrm/trunk/modules/Calendar/calendar_share.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Tue Mar 28 10:01:24 EST 2006
Author: saraj
Date: Tue Mar 28 08:01:19 2006
New Revision: 4607
Log:
changes made for duplicate code removal
Modified:
vtigercrm/trunk/modules/Calendar/calendar_share.php
Modified: vtigercrm/trunk/modules/Calendar/calendar_share.php
==============================================================================
--- vtigercrm/trunk/modules/Calendar/calendar_share.php (original)
+++ vtigercrm/trunk/modules/Calendar/calendar_share.php Tue Mar 28 08:01:19 2006
@@ -156,108 +156,5 @@
return true;
}
-var moveupLinkObj,moveupDisabledObj,movedownLinkObj,movedownDisabledObj;
-function setObjects()
-{
- availListObj=getObj("available")
- selectedColumnsObj=getObj("selectedusers")
-
-}
-function addColumn()
-{
- var selectlength=selectedColumnsObj.length
- var availlength=availListObj.length
- var s=0
- for (i=0;i<selectlength;i++)
- {
- selectedColumnsObj.options[i].selected=false
- }
- for (i=0;i<availlength;i++)
- {
- if (availListObj.options[s].selected==true)
- {
- for (j=0;j<selectlength;j++)
- {
- if (selectedColumnsObj.options[j].value==availListObj.options[s].value)
- {
- var rowFound=true
- var existingObj=selectedColumnsObj.options[j]
- breaK;
- }
- }
- if (rowFound!=true)
- {
- var newColObj=document.createElement("OPTION")
- newColObj.value=availListObj.options[s].value
- if (browser_ie) newColObj.innerText=availListObj.options[s].innerText
- else if (browser_nn4 || browser_nn6) newColObj.text=availListObj.options[s].text
- selectedColumnsObj.appendChild(newColObj)
- availListObj.removeChild(availListObj.options[s])
- newColObj.selected=true
- rowFound=false
- }
- else
- {
- existingObj.selected=true
- }
- }
- else
- s++
- }
-}
-
-function delColumn()
-{
- var selectlength=selectedColumnsObj.length
- var availlength=availListObj.length
- var s=0
- for (i=0;i<availlength;i++)
- {
- availListObj.options[i].selected=false
- }
- for (i=0;i<selectlength;i++)
- {
- if (selectedColumnsObj.options[s].selected==true)
- {
- for (j=0;j<availlength;j++)
- {
- if (availListObj.options[j].value==selectedColumnsObj.options[s].value)
- {
- var rowFound=true
- var existingObj=availListObj.options[j]
- breaK;
- }
- }
-
- if (rowFound!=true)
- {
- var newColObj=document.createElement("OPTION")
- newColObj.value=selectedColumnsObj.options[s].value
- if (browser_ie) newColObj.innerText=selectedColumnsObj.options[s].innerText
- else if (browser_nn4 || browser_nn6) newColObj.text=selectedColumnsObj.options[s].text
- availListObj.appendChild(newColObj)
- selectedColumnsObj.removeChild(selectedColumnsObj.options[s])
- newColObj.selected=true
- rowFound=false
- }
- else
- {
- existingObj.selected=true
- }
- }
- else
- s++
- }
-}
-
-function formSelectColumnString()
- {
- var selectedColStr = "";
- for (i=0;i<selectedColumnsObj.options.length;i++)
- {
- selectedColStr += selectedColumnsObj.options[i].value + ";";
- }
- document.SharingForm.sharedid.value = selectedColStr;
- }
setObjects();
</script>
More information about the vtigercrm-commits
mailing list