Commit 5e3648f8 authored by Bas Lijnse's avatar Bas Lijnse

Merge branch 'base64InitUi' into 'master'

use base64 encoding for initUI field of editor

See merge request !293
parents c1dbc057 1b7df777
Pipeline #27640 passed with stage
in 5 minutes and 14 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]);
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