[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 | ], |
---|
[6910] | 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 | } |
---|
[5475] | 42 | }); |
---|
| 43 | |
---|
| 44 | this.divElement = div.parentNode; |
---|
[37] | 45 | } |
---|
[5475] | 46 | |
---|
| 47 | emQuickSearchUser.prototype.closeWindow = function() |
---|
[37] | 48 | { |
---|
[5475] | 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; |
---|
[37] | 56 | } |
---|
[5475] | 57 | |
---|
[37] | 58 | } |
---|
| 59 | |
---|
[6528] | 60 | emQuickSearchUser.prototype.create_new_message = function (cn, mail, uid) |
---|
[5475] | 61 | { |
---|
| 62 | QuickSearchUser.closeWindow(); |
---|
[6528] | 63 | var ldap_id = preferences.expressoMail_ldap_identifier_recipient; |
---|
[5475] | 64 | |
---|
[6528] | 65 | if (openTab.type[currentTab] != 4){ |
---|
[607] | 66 | new_message("new","null"); |
---|
| 67 | } |
---|
[6528] | 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")); |
---|
[609] | 73 | } |
---|
[37] | 74 | } |
---|
| 75 | |
---|
| 76 | /* Build the Object */ |
---|
[5475] | 77 | var QuickSearchUser = new emQuickSearchUser(); |
---|