/** * Enigma plugin script * * @licstart The following is the entire license notice for the * JavaScript code in this file. * * Copyright (c) The Roundcube Dev Team * * The JavaScript code in this page is free software: you can redistribute it * and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation, either version 3 of * the License, or (at your option) any later version. * * @licend The above is the entire license notice * for the JavaScript code in this file. */ window.rcmail&&rcmail.addEventListener("init",function(a){"settings"==rcmail.env.task?(rcmail.gui_objects.keyslist&&(rcmail.keys_list=new rcube_list_widget(rcmail.gui_objects.keyslist,{multiselect:!0,draggable:!1,keyboard:!0}),rcmail.keys_list.addEventListener("select",function(b){rcmail.enigma_keylist_select(b)}).addEventListener("keypress",function(b){rcmail.list_keypress(b,{del:"plugin.enigma-key-delete"})}).init().focus(),rcmail.enigma_list(),rcmail.register_command("firstpage",function(b){return rcmail.enigma_list_page("first")}), rcmail.register_command("previouspage",function(b){return rcmail.enigma_list_page("previous")}),rcmail.register_command("nextpage",function(b){return rcmail.enigma_list_page("next")}),rcmail.register_command("lastpage",function(b){return rcmail.enigma_list_page("last")})),"plugin.enigmakeys"==rcmail.env.action&&(rcmail.register_command("search",function(b){return rcmail.enigma_search(b)},!0),rcmail.register_command("reset-search",function(b){return rcmail.enigma_search_reset(b)},!0),rcmail.register_command("plugin.enigma-import", function(){rcmail.enigma_import()},!0),rcmail.register_command("plugin.enigma-import-search",function(){rcmail.enigma_import_search()},!0),rcmail.register_command("plugin.enigma-key-export",function(){rcmail.enigma_export()}),rcmail.register_command("plugin.enigma-key-export-selected",function(){rcmail.enigma_export(!0)}),rcmail.register_command("plugin.enigma-key-import",function(){rcmail.enigma_key_import()},!0),rcmail.register_command("plugin.enigma-key-import-search",function(){rcmail.enigma_key_import_search()}, !0),rcmail.register_command("plugin.enigma-key-delete",function(b){return rcmail.enigma_delete()}),rcmail.register_command("plugin.enigma-key-create",function(b){return rcmail.enigma_key_create()},!0),rcmail.register_command("plugin.enigma-key-save",function(b){return rcmail.enigma_key_create_save()},!0),rcmail.addEventListener("responseafterplugin.enigmakeys",function(){rcmail.enable_command("plugin.enigma-key-export",0 a").first().prop("tabindex")),$.each(["encrypt","sign"],function(){var b=this,c=$("#enigma"+b+"opt");rcmail.env["enigma_force_"+b]&&c.prop("checked",!0);if(window.UI&&UI.compose_status)c.on("change",function(){UI.compose_status(b,this.checked)});c.trigger("change")})),rcmail.env.enigma_password_request&&rcmail.enigma_password_request(rcmail.env.enigma_password_request))}); rcube_webmail.prototype.enigma_key_import=function(){var a=$("