![]() |
|---|
| [ Index ] |
Source Code Reference for V1.00 |
[Summary view] [Print] [Text view]
1 // $Id: view.js,v 1.2 2005/03/19 05:58:52 ajdonnison Exp $ 2 // Task view support routines. 3 function popEmailContacts() { 4 updateEmailContacts(); 5 var email_others = document.getElementById('email_others'); 6 window.open( 7 './index.php?m=public&a=contact_selector&dialog=1&call_back=setEmailContacts&selected_contacts_id=' 8 + email_others.value, 'contacts','height=600,width=400,resizable,scrollbars=yes'); 9 } 10 11 function setEmailContacts(contact_id_string) { 12 if (! contact_id_string) { 13 contact_id_string = ''; 14 } 15 var email_others = document.getElementById('email_others'); 16 email_others.value = contact_id_string; 17 } 18 19 function updateEmailContacts() { 20 var email_others = document.getElementById('email_others'); 21 var task_emails = document.getElementById('email_task_list'); 22 var proj_emails = document.getElementById('email_project_list'); 23 var do_task_emails = document.getElementById('email_task_contacts'); 24 var do_proj_emails = document.getElementById('email_project_contacts'); 25 26 // Build array out of list of contact ids. 27 var email_list = email_others.value.split(','); 28 if (do_task_emails.checked) { 29 var telist = task_emails.value.split(','); 30 var full_list = email_list.concat(telist); 31 email_list = full_list; 32 do_task_emails.checked = false; 33 } 34 35 if (do_proj_emails.checked) { 36 var prlist = proj_emails.value.split(','); 37 var full_proj = email_list.concat(prlist); 38 email_list = full_proj; 39 do_proj_emails.checked = false; 40 } 41 42 // Now do a reduction 43 email_list.sort(); 44 var output_array = new Array(); 45 var last_elem = -1; 46 for (var i = 0, i_cmp = email_list.length; i < i_cmp; i++) { 47 if (email_list[i] == last_elem) { 48 continue; 49 } 50 last_elem = email_list[i]; 51 output_array.push(email_list[i]); 52 } 53 email_others.value = output_array.join(); 54 } 55 56 function emailNumericCompare(a, b) { 57 return a - b; 58 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Jan 8 03:00:03 2009 | Cross-referenced by PHPXref 0.7 |