source: sandbox/2.4.1-3/expressoMail1_2/js/QuickSearchUser.js @ 6405

Revision 6405, 1.7 KB checked in by gustavo, 12 years ago (diff)

Ticket #2768 - Melhorias na criação de mensagens

  • Property svn:eol-style set to native
  • Property svn:executable set to *
RevLine 
[37]1        function emQuickSearchUser ()
2        {
[5475]3                this.divElement = null;
[37]4        }
5
6        emQuickSearchUser.prototype.showList = function(data)
7        {
[5475]8                var div = document.createElement("div");
9                        div.style.margin        = "5px";
10                        div.style.overflow      = "hidden";
[5477]11                        div.innerHTML           =       '<div id="div_QuickSearchUser" class="quicksearchcontacts" style="margin:3px;border:1px solid #cecece;">' +
[5475]12                                                                                '<table class="quicksearchcontacts"><tbody id="table_QuickSearchUser">' + data + '</tbody></table>' +
13                                                                        '</div>';
14       
15                $(div).dialog(
[37]16                {
[5475]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                        beforeClose     : function()
34                        {
35                                $(this).dialog("destroy");
36                        }
37                });     
38               
39                this.divElement = div.parentNode;
[37]40        }
[5475]41       
42        emQuickSearchUser.prototype.closeWindow = function()
[37]43        {
[5475]44                Element("em_message_search").value = "";
45               
46                if( this.divElement != null )
47                {
48                        $(this.divElement.parentNode).dialog("destroy");
49                        this.divElement.parentNode.removeChild(this.divElement);
50                        this.divElement = null;
[37]51                }
[5475]52               
[37]53        }
54       
[5475]55        emQuickSearchUser.prototype.create_new_message = function (cn, mail)
56        {
57                QuickSearchUser.closeWindow();
58               
[607]59                if (openTab.type[currentTab] != 4)
60                {
61                        new_message("new","null");
[6405]62                        draw_email_box("\""+cn+"\" <"+mail+">", $("#content_id_"+currentTab).find(".to").filter("input"));
[607]63                }
[609]64                else
65                {
[6405]66                        draw_email_box("\""+cn+"\" <"+mail+">", $("#content_id_"+currentTab).find(".to").filter("input"));
[609]67                }
[37]68        }
69
70/* Build the Object */
[5475]71var QuickSearchUser = new emQuickSearchUser();
Note: See TracBrowser for help on using the repository browser.