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 | beforeClose : function() |
---|
34 | { |
---|
35 | $(this).dialog("destroy"); |
---|
36 | } |
---|
37 | }); |
---|
38 | |
---|
39 | this.divElement = div.parentNode; |
---|
40 | } |
---|
41 | |
---|
42 | emQuickSearchUser.prototype.closeWindow = function() |
---|
43 | { |
---|
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; |
---|
51 | } |
---|
52 | |
---|
53 | } |
---|
54 | |
---|
55 | emQuickSearchUser.prototype.create_new_message = function (cn, mail, uid) |
---|
56 | { |
---|
57 | QuickSearchUser.closeWindow(); |
---|
58 | var ldap_id = preferences.expressoMail_ldap_identifier_recipient; |
---|
59 | |
---|
60 | if (openTab.type[currentTab] != 4){ |
---|
61 | new_message("new","null"); |
---|
62 | } |
---|
63 | |
---|
64 | if(ldap_id){ |
---|
65 | draw_email_box(uid, $("#content_id_"+currentTab).find(".to").filter("input")); |
---|
66 | }else{ |
---|
67 | draw_email_box("\""+cn+"\" <"+mail+">", $("#content_id_"+currentTab).find(".to").filter("input")); |
---|
68 | } |
---|
69 | } |
---|
70 | |
---|
71 | /* Build the Object */ |
---|
72 | var QuickSearchUser = new emQuickSearchUser(); |
---|