source: sandbox/2.5.0-expresso1/expressoMail1_2/js/QuickSearchUser.js @ 6910

Revision 6910, 2.1 KB checked in by cristiano, 12 years ago (diff)

Ticket #2987 - Inconsistência excluindo com tela modal aberta - teclas de atalho

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1        function emQuickSearchUser ()
2        {
3                this.divElement = null;
4        }
5
6        emQuickSearchUser.prototype.showList = function(data)
7        {
8                var div = document.createElement("div");
9                        div.style.margin        = "5px";
10                        div.style.overflow      = "hidden";
11                        div.innerHTML           =       '<div id="div_QuickSearchUser" class="quicksearchcontacts" style="margin:3px;border:1px solid #cecece;">' +
12                                                                                '<table class="quicksearchcontacts"><tbody id="table_QuickSearchUser">' + data + '</tbody></table>' +
13                                                                        '</div>';
14       
15                $(div).dialog(
16                {
17                        resizable       : false,
18                        title           : get_lang('The results were found in the Global Catalog'),
19                        position        : 'center',
20                        width           : 620,
21                        height          : 390,
22                        modal           : false,
23                        buttons         : [
24                                                        {
25                                                                text: get_lang("Close"),
26                                                                click: function()
27                                                                {
28                                                                        $(this).dialog("close");
29                                                                        Element("em_message_search").value = "";                                                                       
30                                                                }
31                                                        }
32                        ],
33            open: function(event, ui)
34            {
35                if(typeof(shortcut) != 'undefined') shortcut.disabled = true;
36            },
37            close: function(event, ui)
38            {
39                if(typeof(shortcut) != 'undefined') shortcut.disabled = false;
40                $(this).dialog("destroy");
41            }
42                });     
43               
44                this.divElement = div.parentNode;
45        }
46       
47        emQuickSearchUser.prototype.closeWindow = function()
48        {
49                Element("em_message_search").value = "";
50               
51                if( this.divElement != null )
52                {
53                        $(this.divElement.parentNode).dialog("destroy");
54                        this.divElement.parentNode.removeChild(this.divElement);
55                        this.divElement = null;
56                }
57               
58        }
59       
60        emQuickSearchUser.prototype.create_new_message = function (cn, mail, uid)
61        {
62                QuickSearchUser.closeWindow();
63                var ldap_id = preferences.expressoMail_ldap_identifier_recipient;
64               
65                if (openTab.type[currentTab] != 4){
66                        new_message("new","null");
67                }
68               
69                if(ldap_id){
70                        draw_email_box(uid, $("#content_id_"+currentTab).find(".to").filter("input"));
71                }else{
72                        draw_email_box("\""+cn+"\" <"+mail+">", $("#content_id_"+currentTab).find(".to").filter("input"));
73                }
74        }
75
76/* Build the Object */
77var QuickSearchUser = new emQuickSearchUser();
Note: See TracBrowser for help on using the repository browser.