diff --git a/bt5/erp5_ace_editor/SkinTemplateItem/portal_skins/erp5_ace_editor/ace_editor_support.xml b/bt5/erp5_ace_editor/SkinTemplateItem/portal_skins/erp5_ace_editor/ace_editor_support.xml index 2daccb547453bd2b57f378e9e71e5d0761824f52..6a5eccd2742a51cdfbe18bd30f1f6b5f110326cc 100644 --- a/bt5/erp5_ace_editor/SkinTemplateItem/portal_skins/erp5_ace_editor/ace_editor_support.xml +++ b/bt5/erp5_ace_editor/SkinTemplateItem/portal_skins/erp5_ace_editor/ace_editor_support.xml @@ -225,16 +225,14 @@ }\n \n ace_editor_container_div_parent_before_maximized = null;\n - ace_editor_maximize_mode_message = $(\'<span id="maximize_message">Press ESC to leave maximize mode</span>\');\n + ace_editor_maximize_mode_message = $(\'<span id="maximize_message">Press Alt-M to leave maximize mode</span>\');\n \n function unmaximize(event) {\n - if(event.keyCode == 27) {\n - maximizeFullscreenRemoveSaveMessage();\n - $(\'body\').css(\'overflow\', \'visible\');\n - ace_editor_container_div.removeClass(\'maximize\');\n - ace_editor_container_div.appendTo(ace_editor_container_div_parent_before_maximized);\n - setContainerDivSize(event);\n - }\n + maximizeFullscreenRemoveSaveMessage();\n + $(\'body\').css(\'overflow\', \'visible\');\n + ace_editor_container_div.removeClass(\'maximize\');\n + ace_editor_container_div.appendTo(ace_editor_container_div_parent_before_maximized);\n + setContainerDivSize(event);\n }\n \n function maximize() {\n @@ -253,8 +251,14 @@ ace_editor_maximize_mode_message.animate({opacity: 0.25}, 1500,\n function() { $(this).remove(); });\n \n - $(document).keyup(unmaximize);\n + ace_editor.commands.addCommand({\n + name: \'unmaximize\',\n + bindKey: {win: \'Alt-m\', mac: \'Alt-m\'},\n + exec: unmaximize\n + });\n +\n ace_editor.resize(true);\n + ace_editor.focus()\n }\n \n // Save source code only through an AJAX request\n diff --git a/bt5/erp5_ace_editor/bt/change_log b/bt5/erp5_ace_editor/bt/change_log index dcfe13493637f7762e92ee56c39ab817a4cc5097..f8e74882ac57e4fe0f63d05177a695f3bd103d7d 100644 --- a/bt5/erp5_ace_editor/bt/change_log +++ b/bt5/erp5_ace_editor/bt/change_log @@ -1,3 +1,7 @@ +2015-11-14 bk +* change unmaximize button to Alt-m +* set focus to ace editor after maximize + 2014-02-25 arnaud.fontaine * Allow to specify the line to go to from URL parameter.