-
Notifications
You must be signed in to change notification settings - Fork 2
/
client.min.js
1 lines (1 loc) · 1.13 KB
/
client.min.js
1
function save_one(){var t=rcmail.env.selected_attachment;rcmail.http_post("storage/save_one","_mbox="+urlencode(rcmail.env.mailbox)+"&_uid="+rcmail.env.uid+"&_part="+t)}function dmessage(t){alert(t.message)}function cform(){let t="location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,toolbar=no,width=840,height=370,";window.open("plugins/storage/elfinder/elopen.html?id="+location.search.split("id=")[1],"elopen",t,!1)}function elcallback(t,e,n){for(id in t)rcmail.http_post("storage/elattach","_tid="+n+"&_cid="+e+"&_file="+t[id].path)}window.rcmail&&rcmail.addEventListener("init",function(t){rcmail.register_command("plugin.storage.save_one",save_one,!0),rcmail.addEventListener("beforemenu-open",function(t){"attachmentmenu"==t.menu&&(rcmail.env.selected_attachment=t.id)});var e=$("#compose-attachments").contents().find(".button");e.after("<a class='button' tabindex='2' href='#' onclick='cform();'>"+rcmail.env.elbutton+"</a>"),$("#compose-attachments").contents().find("button").after("<button class='btn btn-secondary attach' tabindex='3' href='#' style='margin-left: 5px;' onclick='cform();'>"+rcmail.env.elbutton+"</button>")});