From ff9f05e3afcbf131c99a52dbd04541fd1ba4e387 Mon Sep 17 00:00:00 2001
From: Arnaud Fontaine <arnaud.fontaine@nexedi.com>
Date: Tue, 13 Aug 2013 15:02:23 +0900
Subject: [PATCH] ZODB Components: Force resize of Ace Editor on
 maximize/fullscreen.

Otherwise, without passing the new height/width to resize() and without force,
text is not visible when switching to maximize/fullscreen mode.
---
 .../portal_skins/erp5_ace_editor/ace_editor_support.xml   | 8 ++++----
 bt5/erp5_ace_editor/bt/change_log                         | 3 +++
 bt5/erp5_ace_editor/bt/revision                           | 2 +-
 3 files changed, 8 insertions(+), 5 deletions(-)

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 b3b30d3906..6568e3fde1 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
@@ -200,7 +200,7 @@
       else if(element.webkitRequestFullScreen) {\n
         element.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);\n
       }\n
-      ace_editor.resize();\n
+      ace_editor.resize(true);\n
     }\n
   }\n
 \n
@@ -216,7 +216,7 @@
     ace_editor_container_div.height(height);\n
 \n
     if(event != null)\n
-      ace_editor.resize();\n
+      ace_editor.resize(true);\n
   }\n
 \n
   ace_editor_container_div_parent_before_maximized = null;\n
@@ -249,7 +249,7 @@
                                              function() { $(this).remove(); });\n
 \n
     $(document).keyup(unmaximize);\n
-    ace_editor.resize();\n
+    ace_editor.resize(true);\n
   }\n
 \n
   // Save source code only through an AJAX request\n
@@ -365,7 +365,7 @@
         readOnly: true\n
     }]);\n
 \n
-    ace_editor.resize();\n
+    ace_editor.resize(true);\n
 \n
     var PythonMode = require(\'ace/mode/python\').Mode;\n
     ace_editor.getSession().setMode(new PythonMode());\n
diff --git a/bt5/erp5_ace_editor/bt/change_log b/bt5/erp5_ace_editor/bt/change_log
index 1dd749a7e7..d75e4b7e66 100644
--- a/bt5/erp5_ace_editor/bt/change_log
+++ b/bt5/erp5_ace_editor/bt/change_log
@@ -1,3 +1,6 @@
+2013-08-13 arnaud.fontaine
+* ZODB Components: Force resize of Ace Editor on maximize/fullscreen. Otherwise, without passing the new height/width to resize() and without force, text is not visible when switching to maximize/fullscreen mode.
+
 2013-08-13 arnaud.fontaine
 * ZODB Components: Add Ace Editor settings menu (Alt+p) to set up keybinding styles for example.
 
diff --git a/bt5/erp5_ace_editor/bt/revision b/bt5/erp5_ace_editor/bt/revision
index 3cacc0b93c..ca7bf83ac5 100644
--- a/bt5/erp5_ace_editor/bt/revision
+++ b/bt5/erp5_ace_editor/bt/revision
@@ -1 +1 @@
-12
\ No newline at end of file
+13
\ No newline at end of file
-- 
2.30.9