source: trunk/expressoMail1_2/js/QuickCatalogSearch.js @ 353

Revision 353, 21.2 KB checked in by niltonneto, 16 years ago (diff)
  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1        function emQuickCatalogSearch ()
2        {
3                this.arrayWin = new Array();
4                this.el;
5                this.cc_contacts = new Array();
6                this.cc_groups  = new Array();
7        }
8
9        emQuickCatalogSearch.prototype.showList = function(data, begin, end){
10                id = '1';
11                _this = this;
12
13                var el = document.createElement("DIV");
14                el.style.visibility = "hidden";
15                el.style.position = "absolute";
16                el.style.left = "0px";
17                el.style.top = "0px";
18                el.style.width = "0px";
19                el.style.height = "0px";
20                el.id = 'window_QuickCatalogSearch';
21                document.body.appendChild(el);
22                el.innerHTML = "";
23               
24                if (document.getElementById('select_QuickCatalogSearch') == null){
25
26                        var title_innerHTML = get_lang('Select a name') + ':';
27                        if (data.quickSearch_only_in_userSector)
28                                title_innerHTML += "<font color='BLACK' nowrap> ("+get_lang('Showing only the results found in your organization')+".)</font>"
29
30                        var title = document.createElement("SPAM");
31                        title.id = 'window_QuickCatalogSearch_title';
32                        title.innerHTML = "&nbsp;&nbsp;<b><font color='BLUE' nowrap>"+title_innerHTML+"</font></b><br>&nbsp;&nbsp;";
33                        el.appendChild(title);
34                       
35                        var cmb = document.createElement("SELECT");
36                        cmb.id = "select_QuickCatalogSearch";
37                        cmb.style.width = "685px";
38                        cmb.size = "12";
39                        cmb.onkeypress = function (e)
40                        {
41                                if (is_ie)
42                                {
43                                        if ((window.event.keyCode) == 13)
44                                        {
45                                                QuickCatalogSearch.transfer_result(data.field, data.ID, begin, end);
46                                        }
47                                        else if ((window.event.keyCode) == 27)
48                                        {
49                                                QuickCatalogSearch.close_QuickSearch_window(data.field, data.ID);
50                                        }
51                                }
52                                else
53                                {
54                                        if ((e.keyCode) == 13)
55                                        {
56                                                QuickCatalogSearch.transfer_result(data.field, data.ID, begin, end);
57                                        }
58                                        else if ((e.keyCode) == 27)
59                                        {
60                                                QuickCatalogSearch.close_QuickSearch_window(data.field, data.ID);
61                                        }
62                                }
63                        };
64                        el.appendChild(cmb);
65
66                        var space = document.createElement('SPAN');
67                        space.innerHTML = "<BR>&nbsp;&nbsp;";
68                        el.appendChild(space);
69
70                        var butt = document.createElement('BUTTON');
71                        var buttext = document.createTextNode('OK');
72                        butt.id = "QuickCatalogSearch_button_ok";
73                        butt.appendChild(buttext);
74                        butt.onclick = function () {QuickCatalogSearch.transfer_result(data.field, data.ID, begin, end);};
75                        el.appendChild(butt);
76
77                        var space = document.createElement('SPAN');
78                        space.innerHTML = "&nbsp;&nbsp;";
79                        el.appendChild(space);
80
81                        var butt = document.createElement('BUTTON');
82                        butt.id = "QuickCatalogSearch_button_close";
83                        var buttext = document.createTextNode(get_lang('Close'));
84                        butt.appendChild(buttext);
85                        butt.onclick = function () {QuickCatalogSearch.close_QuickSearch_window(data.field, data.ID);};
86                        el.appendChild(butt);
87                }
88                else{
89                        var title_innerHTML = get_lang('Select a name') + ':';
90                        if (data.quickSearch_only_in_userSector)
91                                title_innerHTML += "<font color='BLACK' nowrap> ("+get_lang('Showing only the results found in your organization')+".)</font>"
92
93                        var title = Element('window_QuickCatalogSearch_title');
94                        title.innerHTML = "&nbsp;&nbsp;<b><font color='BLUE' nowrap>"+title_innerHTML+"</font></b><br>&nbsp;&nbsp;";
95                       
96                        var cmb = document.getElementById('select_QuickCatalogSearch');
97                        cmb.onkeypress = function (e)
98                        {
99                                if (is_ie)
100                                {
101                                        if ((window.event.keyCode) == 13)
102                                        {
103                                                QuickCatalogSearch.transfer_result(data.field, data.ID, begin, end);
104                                        }
105                                        else if ((window.event.keyCode) == 27)
106                                        {
107                                                QuickCatalogSearch.close_QuickSearch_window(data.field, data.ID);
108                                        }
109                                }
110                                else
111                                {
112                                        if ((e.keyCode) == 13)
113                                        {
114                                                QuickCatalogSearch.transfer_result(data.field, data.ID, begin, end);
115                                        }
116                                        else if ((e.keyCode) == 27)
117                                        {
118                                                QuickCatalogSearch.close_QuickSearch_window(data.field, data.ID);
119                                        }
120                                }
121                        };
122
123                        for (i=0; i<cmb.length; i++)
124                                cmb.options[i--] = null;
125                       
126                        var butt_ok = document.getElementById("QuickCatalogSearch_button_ok");
127                        var butt_close = document.getElementById("QuickCatalogSearch_button_close");
128                        butt_ok.onclick = function () {QuickCatalogSearch.transfer_result(data.field, data.ID, begin, end);};
129                        butt_close.onclick = function () {QuickCatalogSearch.close_QuickSearch_window(data.field, data.ID);};
130                }
131
132                for (i=0; i<data.length; i++){
133                        var Op = document.createElement("OPTION");
134                        Op.text = data[i].cn + ' (' + data[i].mail + ')';
135                        if (data[i].phone != '')
136                                Op.text += ' - ' + data[i].phone;
137                        if (data[i].ou != '')
138                                Op.text += ' - ' + data[i].ou; // adicionado "data[i].ou" para exibir setor (F9)
139                        Op.value = '"' + data[i].cn + '" ' + '<' + data[i].mail + '>';
140                        cmb.options.add(Op);
141                }
142                cmb.options[0].selected = true;
143                _this.showWindow(el);
144        }
145       
146        emQuickCatalogSearch.prototype.showWindow = function (div)
147        {
148                if(! div) {
149                        alert(get_lang('The list has no participant.'));
150                        return;
151                }
152                                                       
153                if(! this.arrayWin[div.id]) {
154                        div.style.width = "700px";
155                        div.style.height = "230px";
156                        var title = get_lang('The results were found in the Global Catalog')+':';
157                        var wHeight = div.offsetHeight + "px";
158                        var wWidth =  div.offsetWidth   + "px";
159                        div.style.width = div.offsetWidth - 5;
160
161                        win = new dJSWin({                     
162                                id: 'QuickCatalogSearch_'+div.id,
163                                content_id: div.id,
164                                width: wWidth,
165                                height: wHeight,
166                                title_color: '#3978d6',
167                                bg_color: '#eee',
168                                title: title,                                           
169                                title_text_color: 'white',
170                                button_x_img: '../phpgwapi/images/winclose.gif',
171                                border: true });
172                       
173                        this.arrayWin[div.id] = win;
174                        win.draw();
175                }
176                else {
177                        win = this.arrayWin[div.id];
178                }
179                //document.getElementById('QuickCatalogSearch_window_QuickCatalogSearch').style.display = "";
180                win.open();
181                document.getElementById('select_QuickCatalogSearch').focus();
182        }
183       
184        emQuickCatalogSearch.prototype.transfer_result = function (field, ID, begin, end){
185                cm = document.getElementById('select_QuickCatalogSearch');
186                option_selected = cm.options[cm.selectedIndex].value + ", ";
187                emailList = document.getElementById(field + "_" + ID).value;
188               
189                new_emailList = emailList.substring(0, begin) + option_selected + emailList.substring((parseInt(end) + 2), emailList.length);
190                document.getElementById(field + "_" + ID).value = new_emailList;
191                document.getElementById(field + "_" + ID).focus();
192               
193                //document.getElementById('QuickCatalogSearch_window_QuickCatalogSearch').style.display = "none";
194                this.arrayWin['window_QuickCatalogSearch'].close();
195        }
196       
197        emQuickCatalogSearch.prototype.close_QuickSearch_window = function (field, ID){
198                //document.getElementById('QuickCatalogSearch_window_QuickCatalogSearch').style.display = "none";
199                document.getElementById(field + "_" + ID).focus();
200                this.arrayWin['window_QuickCatalogSearch'].close();
201        }
202
203        emQuickCatalogSearch.prototype.close_window = function(id) {
204                this.arrayWin[id].close();
205                var group_values = Element('list_values');
206                var user_values = Element('user_values');       
207        }
208        emQuickCatalogSearch.prototype.showCatalogList = function (border_id){
209                var el = Element('catalog_list');
210
211                if(el) {
212                        Element('border_id').value = border_id;
213                        win = this.arrayWin[el.id];
214                        win.open();
215                        return;         
216                }
217                var border_input   = document.createElement("INPUT");
218                border_input.type  = 'hidden';
219                border_input.id    = 'border_id';
220                border_input.value = border_id;
221                document.body.appendChild(border_input);
222                el = document.createElement("DIV");             
223                el.id = 'catalog_list';
224                document.body.appendChild(el);                 
225                el.style.visibility = "hidden";
226                el.style.position = "absolute";
227                el.style.width = "700px";
228                el.style.height = is_ie ? "360px" : "375px";           
229                el.style.left = "0px";
230                el.style.top = "0px";                   
231                el.innerHTML = "<table border='0' cellpading='0' cellspacing='0' width='100%'>"+
232                                           "<tr><td id='td1' style='cursor:pointer' align='center' onclick='QuickCatalogSearch.select_div(\"tab1\")'><a href='#' class='catalog' onclick='QuickCatalogSearch.select_div(\"tab1\");'>"+get_lang('Global Catalog')+"</a></td>"+
233                                           "<td id='td2' style='background:#cecece;cursor:pointer' onclick='QuickCatalogSearch.select_div(\"tab2\")' align='center'><a href='#' class='catalog' onclick='QuickCatalogSearch.select_div(\"tab2\");'>"+get_lang('Personal Catalog')+"</a></td></tr>"+
234                                           '</table>'+
235                                           '<div id="tab1" align="center"><br>'+
236                                           '<table border="0" cellpading="0" cellspacing="0">'+
237                                           '<tr><td>'+get_lang("Select an organization and click on button <b>Search</b>")+'&nbsp;:</td></tr>'+
238                                        '<tr><td><select style="width:150px" id="select_catalog" name="select_catalog" onchange="javascript:QuickCatalogSearch.update_organizations();"></select>&nbsp'+
239                                        '<select id="select_organization" style="width:100px" name="select_organization"></select>&nbsp;'+   
240                                        '<input type="text" id="search_for" name="search_for" value="" size="30" maxlength="20"/>&nbsp;<input type="button" onclick="QuickCatalogSearch.searchCatalogList(true)" class="button" value="'+get_lang('Search')+'">&nbsp;<input style="display:none" type="button" onclick="QuickCatalogSearch.searchCatalogList(false)" class="button" value="'+get_lang('List All')+'"></td></tr>'+
241                                           //'<tr><td><input onclick="javascript:QuickCatalogSearch.changeOptions(this.value)" id="type" type="radio" name="type" value="l"/>'+get_lang('Public Lists')+'&nbsp;&nbsp;<input type="radio" name="type" value="u" onclick="javascript:QuickCatalogSearch.changeOptions(this.value)" checked/>'+get_lang('Users')+'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+
242                                           '<span style="visibility:hidden;background:#cc4444" id=msg_search>&nbsp;&nbsp;<font face="Verdana" size="1" color="WHITE">'+get_lang('Search in Catalog')+'...</font>&nbsp;</span></td></tr>'+
243                                           '<tr><td>'+
244                                           '<span id="list_span"><select multiple style="display:none;width:450px" size="14" id="list_values"></select></span>'+
245                                           '<span id="user_span"><select multiple style="width:580px" size="14" id="user_values"></select></span>'+
246                                           '</td></tr>'+
247                                           '<tr><td nowrap><center>'+get_lang('Click here to add into the fields')+':&nbsp;<input type="button" class="button" value="'+get_lang('TO')+'" onClick="javascript:QuickCatalogSearch.addContacts(\'to\')">&nbsp;'+
248                                           '<input type="button" class="button" value="'+get_lang('CC')+'" onClick="javascript:QuickCatalogSearch.addContacts(\'cc\')">&nbsp;'+
249                                           '<input type="button" class="button" value="'+get_lang('CCo')+'" onClick="javascript:QuickCatalogSearch.addContacts(\'cco\')">'+
250                                           '</center></td></tr><tr><td nowrap><center><input type="button" value="'+get_lang('Close')+'" onClick="javascript:QuickCatalogSearch.close_window(\'catalog_list\')"></center></td></tr>'+
251                                           '</table>'+
252                                           '</div>'+
253                                           '<div style="display:none" id="tab2" align="center">'+
254                                           '<br><br><br>'+
255                                           '<table border="0" cellpading="0" cellspacing="0">'+
256                                           '<tr><td>'+get_lang("Select the type of contact that you want to view")+'&nbsp;:</td></tr>'+
257                                           '<tr><td><input onclick="javascript:QuickCatalogSearch.changeOptions(this.value)" id="type" type="radio" name="type" value="p"/>' + get_lang('People') + '&nbsp;&nbsp;<input type="radio" name="type" value="g" onclick="javascript:QuickCatalogSearch.changeOptions(this.value)"/>' + get_lang('Groups') + ' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+
258                                           '<tr><td>'+
259                                           '<span id="personal_span"><select multiple style="width:400px" size="14" id="list_personal"></select></span>'+
260                                           '<span id="groups_span"><select multiple style="display:none;width:400px" size="14" id="list_groups"></select></span>'+
261                                           '</td></tr>'+
262                                           '<tr><td nowrap><center>'+get_lang('Click here to add into the fields')+':&nbsp;<input type="button" class="button" value="'+get_lang('TO')+'" onClick="javascript:QuickCatalogSearch.addContacts(\'to1\')">&nbsp;'+
263                                           '<input type="button" class="button" value="'+get_lang('CC')+'" onClick="javascript:QuickCatalogSearch.addContacts(\'cc1\')">&nbsp;'+
264                                           '<input type="button" class="button" value="'+get_lang('CCo')+'" onClick="javascript:QuickCatalogSearch.addContacts(\'cco1\')">'+
265                                           '</center></td></tr><tr><td nowrap><center><input type="button" value="'+get_lang('Close')+'" onClick="javascript:QuickCatalogSearch.close_window(\'catalog_list\')"></center></td></tr>'+
266                                           '</table>'+
267                                           '</div>';
268
269                var title = get_lang('Search in the Global Catalog');
270                var wHeight = el.offsetHeight - (is_ie ? 10 : 0) + "px";
271                var wWidth =  el.offsetWidth   + "px";
272                el.style.width = el.offsetWidth;
273               
274                Element('search_for').onkeypress = function (e) {
275                        if ((is_ie && (window.event.keyCode == 13)) || (!is_ie && e.keyCode == 13)) {
276                                QuickCatalogSearch.searchCatalogList(true);
277                        }
278                };
279
280                win = new dJSWin({                     
281                        id: 'win_'+el.id,
282                        content_id: el.id,
283                        width: wWidth,
284                        height: wHeight,
285                        title_color: '#3978d6',
286                        bg_color: '#eee',
287                        title: title,                                           
288                        title_text_color: 'white',
289                        button_x_img: '../phpgwapi/images/winclose.gif',
290                        border: true });
291                       
292                this.arrayWin[el.id] = win;             
293                win.draw();
294                win.open();
295
296                var handler_catalogs = function(data){
297                        var user_catalog = "Catalogo Geral";
298
299                        if(data.length <= 1)
300                                Element('select_catalog').style.display = 'none';
301                        else {
302                                for(i = 0; i < data.length; i++) {             
303                                        Element('select_catalog').options[i] = new Option(data[i],i);
304                                        if(user_catalog.toUpperCase() == data[i].toUpperCase())
305                                                Element('select_catalog').options[i].selected = true;
306                                }
307                        }
308                }
309                cExecute ("$this.ldap_functions.get_catalogs", handler_catalogs);               
310               
311                this.update_organizations();
312                var handler_cc_contacts= function(data){
313                        if(data && data.length > 0){
314                                var aux = data.split(",");
315                                for(var i=0; i< aux.length; i++){
316                                        QuickCatalogSearch.cc_contacts[QuickCatalogSearch.cc_contacts.length] = aux[i];                         
317                                }
318                        }
319                }
320                cExecute("$this.db_functions.get_cc_contacts",handler_cc_contacts);
321
322                var handler_cc_groups = function(data){
323                        if(data && data.length > 0){
324                                var aux = data.split(",");
325                                for(var i=0; i < data.length; i++){
326                                        QuickCatalogSearch.cc_groups[QuickCatalogSearch.cc_groups.length] = aux[i];                                                             
327                                }       
328                        }
329                }
330                cExecute("$this.db_functions.get_cc_groups",handler_cc_groups);
331       
332        }
333       
334        emQuickCatalogSearch.prototype.select_div = function(element){
335                if(element == 'tab1'){
336                   Element('tab1').style.display = '';
337                   Element('tab2').style.display = 'none';
338                   Element('td1').style.background = '#eee';   
339                   Element('td2').style.background = '#cecece';
340                }
341                if(element == 'tab2'){
342                   Element('tab1').style.display = 'none';
343                   Element('tab2').style.display = '';
344                   Element('td1').style.background = '#cecece';
345                   Element('td2').style.background = '#eee';               
346
347                }
348        }
349       
350        emQuickCatalogSearch.prototype.load_catalog = function(){
351       
352                var _this = this;
353                var content = new Array;
354                var select = Element('list_personal').style.display == 'none'? Element('list_groups'): Element('list_personal');
355               
356                if(Element('list_personal').style.display == 'none'){
357                        content = _this.cc_groups;
358                }else{
359                        content = _this.cc_contacts;
360                }
361                if(select.options.length > 0){
362                        for(var i=0; i < select.options.length; i++){
363                                select.options[i] = null;
364                                i--;
365                        }
366                }
367                for(var i=0; i < content.length; i++){
368                        if(content[i] != undefined){
369                                var aux = content[i].split(";");
370                                var opt = new Option(aux[0] + ' (' + aux[1] + ')','"' + aux[0] + '" ' + '<' + aux[1] + '>',false,false);
371                                select[select.length] = opt;
372                        }
373                }
374                content.splice(0,(content.lenght));
375        }
376
377        emQuickCatalogSearch.prototype.update_organizations = function(){
378                while(Element('select_organization').options.length > 0) {
379                        Element('select_organization').remove(0);
380                }
381                var handler_org = function(data){
382                        Element('select_organization').options[0] = new Option(get_lang('all'),'all');
383                        if (data != null){
384                       
385                        for(x = 0; x < data.length; x++) {
386                                Element('select_organization').options[x+1] = new Option(data[x].toUpperCase(),data[x]);
387                                }
388                        }
389                       
390                }               
391                cExecute ("$this.ldap_functions.get_organizations&referral=false&catalog="+Element('select_catalog').value, handler_org);               
392        }
393
394        emQuickCatalogSearch.prototype.changeOptions = function(type){ 
395
396                switch(type){
397                        case 'u':
398                                Element('list_values').style.display = 'none';
399                                Element('user_values').style.display = '';
400                                break;
401                       
402                        case 'l':               
403                                Element('user_values').style.display = 'none';
404                                Element('list_values').style.display = '';             
405                                break;
406
407                        case 'p':
408                                Element('list_personal').style.display = '';
409                                Element('list_groups').style.display = 'none'
410                                QuickCatalogSearch.load_catalog();                             
411                                break;
412                       
413                        case 'g':
414                                Element('list_personal').style.display = 'none';
415                                Element('list_groups').style.display = ''
416                                QuickCatalogSearch.load_catalog();
417                                break;
418                }
419
420        }
421
422        emQuickCatalogSearch.prototype.addContacts = function(field) {
423               
424                var border_id   = Element('border_id').value;
425                var select              = Element('user_values').style.display == 'none' ? Element('list_values') : Element('user_values');
426                if(field == "to1" || field == "cc1" || field == "cco1"){
427                        field = field.substr(0,field.length - 1);
428                        var select = Element('list_personal').style.display == 'none' ? Element('list_groups') : Element('list_personal');
429                }
430                var fieldOpener = Element(field+"_"+border_id);
431                var not_selected = true;               
432                for (i = 0 ; i < select.length ; i++) {                 
433                        if (select.options[i].selected && select.options[i].value != '-1') {
434                                if(fieldOpener.value.length > 0 && (fieldOpener.value.lastIndexOf(',') != (fieldOpener.value.length -1))){
435                                        fieldOpener.value += ",";
436                                }
437                                fieldOpener.value += select.options[i].value + ",";
438                                not_selected = false;
439                                select.options[i].selected = false;
440                        }
441                }
442               
443                if(not_selected)
444                        return false;
445                       
446                if(field != 'to'){
447                        a_link = Element("a_"+field+"_link_"+border_id);
448                        if(a_link)
449                                a_link.onclick();                       
450                }                               
451        }
452       
453        emQuickCatalogSearch.prototype.searchCatalogList = function (itemSearch){
454
455                if(itemSearch && Element('search_for').value.length < 4){
456                        alert(get_lang('your search argument must be longer than 4 characters.'));
457                        Element('search_for').focus();
458                        return false;
459                }
460                var organization = Element('select_organization').value;               
461                var search               = itemSearch ? Element('search_for').value : '';
462                var catalog              = Element('select_catalog').value;
463                var max_result   = 300;
464
465                var handler_searchResults = function(data){
466
467                        Element('msg_search').style.visibility = 'hidden';
468                        if(data.error){
469                                alert(get_lang('More than %1 results. Please, try to refine your search.',max_result));
470                                return false;
471                        }
472                       
473                        var group = Element('list_span');
474                        var user  = Element('user_span');       
475                        if(is_ie){
476                                group.innerHTML = '';
477                                user.innerHTML = '';
478                        }
479                        else {
480                                group = Element('list_values');
481                                user  = Element('user_values');
482                                for(var i = 0;i < group.options.length; i++)                           
483                                        group.options[i--] = null;
484                                for(var i = 0;i < user.options.length; i++)                             
485                                        user.options[i--] = null;
486                        }
487
488                        var arr         = new Array(max_result);
489                        var display     = Element('type').value == 'l'? 'display:none;' : '';
490
491                        for(i = 0; data.groups && i < data.groups.length; i++) {                       
492                                if(is_ie)
493                                        arr[i] = '<option value="'+'&quot;'+data.groups[i].name+'&quot; &lt;'+data.groups[i].email+'&gt;">'+data.groups[i].name+' ('+data.groups[i].email+')'+'</option>';
494                                else
495                                        group.options[i] = new Option(data.groups[i].name+' ('+data.groups[i].email+')','"'+data.groups[i].name+'" <'+data.groups[i].email+'>');
496                        }
497       
498                        if(is_ie)
499                                group.innerHTML = '<select multiple style="'+display+'width:400px" size="14" id="list_values">'+ arr.join() +'</select>';
500
501                        arr = new Array(max_result);
502                        display = display ? "" : "display:none;";
503                       
504                        for(i = 0; data.users && i < data.users.length; i++) {                 
505                                if(is_ie)
506                                        arr[i] = '<option value="'+'&quot;'+data.users[i].name+'&quot; &lt;'+data.users[i].email+'&gt;">'+data.users[i].name+' ('+data.users[i].email+')'+'</option>';
507                                else {
508                                /*******************************************************************************************/
509                                /* O resultado pratico do bloco de codigo a seguir eh a exibicao dos valores em tela,
510                                ja que vai verificar se o departamento e o email estao vazios ou nulos e a partir dai o
511                                resultado apresentado em tela sera exibido de maneira mais apresentavel;
512                                */
513                                        //verifica se departamento eh null ou nao;
514                                        var departamento_nulo = 'false';
515                                        if((data.users[i].department == null) || (data.users[i].department == '')) {
516                                                data.users[i].department = '';
517                                                departamento_nulo = 'true';
518                                        }
519                                        else {
520                                                data.users[i].department = ' - ' + data.users[i].department;
521                                        }
522
523                                        //verifica se email eh null ou nao;
524                                        if((data.users[i].email == null) || (data.users[i].email == '')) {
525                                                if(departamento_nulo = 'true') {
526                                                        data.users[i].email = '';
527                                                }
528                                                else {
529                                                        data.users[i].email = ' - ';
530                                                }
531                                        }
532                                        else {
533                                                data.users[i].email = ' (' + data.users[i].email + ') ';
534                                        }
535
536                                        user.options[i] = new Option(data.users[i].name+data.users[i].email+data.users[i].department,'"'+data.users[i].name+'" <'+data.users[i].email+'>'); // incluido data.users[i].department para exibir setor na opcao "Pesquisar" do email;
537                                }
538                        }
539       
540                        if(is_ie)
541                                user.innerHTML = '<select multiple style="'+display+'width:400px" size="14" id="user_values">'+ arr.join() +'</select>';
542                }
543
544                Element('msg_search').style.visibility = 'visible';
545                cExecute ("$this.ldap_functions.catalogsearch&max_result="+max_result+"&organization="+organization+"&search_for="+search+"&catalog="+catalog, handler_searchResults);
546        }
547
548       
549/* Build the Object */
550        var QuickCatalogSearch;
551        QuickCatalogSearch = new emQuickCatalogSearch();
Note: See TracBrowser for help on using the repository browser.