[Vtigercrm-commits] [vtiger-commits] r4605 - /vtigercrm/trunk/modules/Calendar/addEventUI.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Tue Mar 28 09:54:26 EST 2006
Author: saraj
Date: Tue Mar 28 07:54:22 2006
New Revision: 4605
Log:
changes made for duplicate code removal
Modified:
vtigercrm/trunk/modules/Calendar/addEventUI.php
Modified: vtigercrm/trunk/modules/Calendar/addEventUI.php
==============================================================================
--- vtigercrm/trunk/modules/Calendar/addEventUI.php (original)
+++ vtigercrm/trunk/modules/Calendar/addEventUI.php Tue Mar 28 07:54:22 2006
@@ -302,101 +302,6 @@
</form>
</div>
<script language="JavaScript" type="text/JavaScript">
-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++
- }
-}
-
-
setObjects();
</script>
<!-- Add Activity DIV stops-->
More information about the vtigercrm-commits
mailing list