Commit 1b7df777 authored by Steffen Michels's avatar Steffen Michels

use base64 encoding for initUI field of editor

parent 7047eada
Pipeline #27638 passed with stage
in 5 minutes and 5 seconds
......@@ -6,7 +6,7 @@ import iTasks.Internal.IWorld
import iTasks.Internal.Serialization
import iTasks.UI.Definition, iTasks.WF.Definition, iTasks.UI.JavaScript
import qualified Data.Map as DM
import Text, Text.GenJSON
import Text, Text.GenJSON, Text.Encodings.Base64
import Data.GenEq
derive JSONEncode EditState, LeafState, EditMode
......@@ -157,7 +157,7 @@ withClientSideInit initUI genUI attr dp val vst=:{VSt| taskId} = case genUI attr
# extraAttr = 'DM'.fromList
[("taskId", JSONString taskId)
,("editorId",JSONString (editorId dp))
,("initUI", JSONString initUI)
,("initUI", JSONString $ base64Encode initUI)
]
= (Ok (UI type ('DM'.union extraAttr attr) items,mask), vst)
e = e
......@@ -44,7 +44,7 @@ itasks.Component = {
var me=this;
if (me.attributes.initUI!=null && me.attributes.initUI!='') {
return ABC_loading_promise.then(function(){
var initUI=ABC.deserialize(me.attributes.initUI);
var initUI=ABC.deserialize(atob(me.attributes.initUI));
var ref=ABC.share_clean_value(initUI,me);
ABC.interpret(new SharedCleanValue(ref), [me, ABC.initialized ? 0 : 1]);
ABC.clear_shared_clean_value(ref);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment