source: trunk/calendar/templates/celepar/js/edit.js @ 2

Revision 2, 3.1 KB checked in by niltonneto, 17 years ago (diff)

Removida todas as tags usadas pelo CVS ($Id, $Source).
Primeira versão no CVS externo.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1/******************************************************************************\
2|**************************   MODULO   AGENDA   *******************************|
3|********** SCRIPT REFERENTE A CAIXA DE INCLUSAO DE PARTICIPANTES  ************|
4\******************************************************************************/
5
6// Variaveis Locais
7        var select_in  = document.getElementById('user_list');
8        var select_out  = document.getElementById('user_list_in');     
9        var users_out = select_out.cloneNode(true);
10        var finderTimeout = '';
11                                                                                                                                               
12// Funcoes                             
13        function showExParticipants(el,path){
14                document.getElementById('tbl_ext_participants').style.display='';
15                el.style.display='none';
16        }
17       
18        function hideExParticipants(el,path){
19                document.getElementById('a_ext_participants').style.display = '';
20                document.getElementById('tbl_ext_participants').style.display ='none';
21        }
22                                                       
23        function optionFinderTimeout(obj){
24
25                clearTimeout(finderTimeout);   
26                var oWait = document.getElementById("wait");
27                oWait.innerHTML = 'Buscando...';
28                finderTimeout = setTimeout("optionFinder('"+obj.id+"')",500);
29        }
30        function optionFinder(id) {     
31                var oWait = document.getElementById("wait");
32                var oText = document.getElementById(id);
33                for(var i = 0;i < select_out.options.length; i++)                               
34                        select_out.options[i--] = null;
35                                                                                                                                                                                       
36                for(i = 0; i < users_out.length; i++){                                                                                                                                                                                 
37                        if(users_out[i].text.substring(0 ,oText.value.length).toUpperCase() == oText.value.toUpperCase()) {
38                                sel = select_out.options;                                               
39                                option = new Option(users_out[i].text,users_out[i].value);                             
40                                sel[sel.length] = option;
41                        }
42                }
43                oWait.innerHTML = '&nbsp;';
44        }                       
45                                                                       
46        function rem()
47        {
48                for(var i = 0;i < select_in.options.length; i++)                               
49                        if(select_in.options[i].selected)
50                                select_in.options[i--] = null;                                                                                                                                 
51        }
52                                                                                                                                                                               
53        function submitValues(){                               
54                for(i = 0; i < select_in.length; i++)
55                        select_in.options[i].selected = true;
56        }
57       
58       
59       
60        function openListUsers(newWidth,newHeight, owner){                                     
61                newScreenX  = screen.width - newWidth;         
62                newScreenY  = 0;               
63                window.open('calendar/templates/celepar/listUsers.php?owner='+owner,"","width="+newWidth+",height="+newHeight+",screenX="+newScreenX+",left="+newScreenX+",screenY="+newScreenY+",top="+newScreenY+",toolbar=no,scrollbars=yes,resizable=no");
64        }
65
66        function adicionaListaCalendar()
67        {
68                var select = window.document.getElementById('user_list_in');
69                var selectOpener = window.opener.document.getElementById('user_list');
70                for (i = 0 ; i < select.length ; i++) {                         
71
72                        if (select.options[i].selected) {
73                                isSelected = false;
74
75                                for(var j = 0;j < selectOpener.options.length; j++) {                                                                                                                                                   
76                                        if(selectOpener.options[j].value == select.options[i].value){
77                                                isSelected = true;                                             
78                                                break; 
79                                        }
80                                }
81
82                                if(!isSelected){
83
84                                        option = window.opener.document.createElement('option');
85                                        option.value =select.options[i].value;
86                                        option.text = select.options[i].text;
87                                        selectOpener.options[selectOpener.options.length] = option;     
88                                }
89                               
90                        }
91                }
92                selectOpener.options[selectOpener.options.length-1].selected = true;
93        }
94       
95// Fim       
Note: See TracBrowser for help on using the repository browser.