From 6e0ccaf1ed152912f6b9540a59c82097be777d41 Mon Sep 17 00:00:00 2001
From: Roque Porchetto <roque.porchetto@nexedi.com>
Date: Wed, 23 Sep 2020 20:09:03 +0000
Subject: [PATCH] erp5_officejs: change Notebook app editor from iodide_master
 to gadget_jsmd_eval

---
 .../gadget_officejs_jio_notebook_view.js.js   |  5 ++--
 .../gadget_officejs_jio_notebook_view.js.xml  | 28 ++++++++-----------
 bt5/erp5_officejs/bt/dependency_list          |  3 +-
 3 files changed, 16 insertions(+), 20 deletions(-)

diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_view.js.js b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_view.js.js
index cf228d7b1c..29964cea88 100644
--- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_view.js.js
+++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_view.js.js
@@ -1,14 +1,15 @@
 /*global window, rJS, RSVP */
 /*jslint nomen: true, indent: 2, maxerr: 3 */
 (function (window, rJS, RSVP) {
+
   "use strict";
 
   rJS(window)
+
     /////////////////////////////////////////////////////////////////
     // Acquired methods
     /////////////////////////////////////////////////////////////////
     .declareAcquiredMethod("updateHeader", "updateHeader")
-    .declareAcquiredMethod("getUrlParameter", "getUrlParameter")
     .declareAcquiredMethod("getUrlFor", "getUrlFor")
     .declareAcquiredMethod("updateDocument", "updateDocument")
     .declareAcquiredMethod("notifySubmitting", "notifySubmitting")
@@ -118,7 +119,7 @@
                   "type": "GadgetField",
                   "url": "gadget_editor.html",
                   "sandbox": "public",
-                  "renderjs_extra": '{"editor": "notebook_editor", "maximize": true}'
+                  "renderjs_extra": '{"editor": "jsmd_editor", "maximize": true}'
                 }
               }},
               "_links": {
diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_view.js.xml b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_view.js.xml
index e0b47ace23..c202709fcc 100644
--- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_view.js.xml
+++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_notebook_view.js.xml
@@ -62,15 +62,13 @@
             </value>
         </item>
         <item>
-            <key> <string>categories</string> </key>
+            <key> <string>content_md5</string> </key>
             <value>
-              <tuple>
-                <string>classification/collaborative/team</string>
-              </tuple>
+              <none/>
             </value>
         </item>
         <item>
-            <key> <string>content_md5</string> </key>
+            <key> <string>content_type</string> </key>
             <value>
               <none/>
             </value>
@@ -109,12 +107,6 @@
             <key> <string>title</string> </key>
             <value> <string>OfficeJS Jio Notebook View JS</string> </value>
         </item>
-        <item>
-            <key> <string>url_string</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
         <item>
             <key> <string>version</string> </key>
             <value> <string>001</string> </value>
@@ -201,7 +193,7 @@
                           </tuple>
                           <state>
                             <tuple>
-                              <float>1524555869.05</float>
+                              <float>1600889170.54</float>
                               <string>UTC</string>
                             </tuple>
                           </state>
@@ -250,7 +242,7 @@
                   </item>
                   <item>
                       <key> <string>serial</string> </key>
-                      <value> <string>970.42986.60138.7065</string> </value>
+                      <value> <string>986.53108.46138.3464</string> </value>
                   </item>
                   <item>
                       <key> <string>state</string> </key>
@@ -268,7 +260,7 @@
                           </tuple>
                           <state>
                             <tuple>
-                              <float>1538406432.04</float>
+                              <float>1600891646.9</float>
                               <string>UTC</string>
                             </tuple>
                           </state>
@@ -295,7 +287,9 @@
                 <dictionary>
                   <item>
                       <key> <string>action</string> </key>
-                      <value> <string>detect_converted_file</string> </value>
+                      <value>
+                        <none/>
+                      </value>
                   </item>
                   <item>
                       <key> <string>actor</string> </key>
@@ -311,7 +305,7 @@
                   </item>
                   <item>
                       <key> <string>external_processing_state</string> </key>
-                      <value> <string>converted</string> </value>
+                      <value> <string>empty</string> </value>
                   </item>
                   <item>
                       <key> <string>serial</string> </key>
@@ -329,7 +323,7 @@
                           </tuple>
                           <state>
                             <tuple>
-                              <float>1524555842.41</float>
+                              <float>1600888776.74</float>
                               <string>UTC</string>
                             </tuple>
                           </state>
diff --git a/bt5/erp5_officejs/bt/dependency_list b/bt5/erp5_officejs/bt/dependency_list
index 7db3f37b2d..8722403f8d 100644
--- a/bt5/erp5_officejs/bt/dependency_list
+++ b/bt5/erp5_officejs/bt/dependency_list
@@ -2,4 +2,5 @@ erp5_web_renderjs_ui
 erp5_code_mirror
 erp5_multimedia
 erp5_smart_assistant
-erp5_run_my_doc
\ No newline at end of file
+erp5_run_my_doc
+erp5_notebook
\ No newline at end of file
-- 
2.30.9