function MenuEditor(t){this.input=$('input[name="tree"]'),this.element=t,this.config={maxDepth:99,collapseBtnHTML:"",expandBtnHTML:""},this.trans={add:jstrans("menu-editor-add"),"delete":jstrans("menu-editor-delete"),text:jstrans("menu-editor-text"),link:jstrans("menu-editor-link"),blank:jstrans("menu-editor-blank")},this.templates={root:'<div class="dd"></div>',list:'<ol class="dd-list"></div>',item:'<li class="dd-item dd3-item"><div class="dd-handle dd3-handle"></div><div class="dd-content dd3-content"><div class="row"> <div class="col-sm-6"> <input placeholder="'+this.trans.text+'" type="text" name="text" class="form-control input-sm"> </div> <div class="col-sm-6"> <input placeholder="'+this.trans.link+'" class="form-control input-sm" type="text" name="link"> </div> </div> <label class="checkbox-inline"><input type="checkbox" name="blank" value="1"> '+this.trans.blank+'</label><a href="#" class="pull-right delete">'+this.trans["delete"]+"</a></div></li>",add:'<div class="form-actions"><span class="btn btn-sm green-jungle">'+this.trans.add+"</span></div>"},this.init()}MenuEditor.prototype.init=function(){this.root=$(this.templates.root),this.list=$(this.templates.list),this.list.appendTo(this.root),this.root.appendTo(this.element),this.add=$(this.templates.add),this.add.on("click",this.insertItem.bind(this)),this.add.appendTo(this.element),this.input.val().length>0&&JSON.parse(this.input.val())[this.element.data("lang")]&&this.fill(JSON.parse(this.input.val())[this.element.data("lang")]),this.root.nestable(this.config),this.root.on("change keyup click",this.serialize.bind(this)),this.root.on("change keyup click","input",this.serialize.bind(this))},MenuEditor.prototype.fill=function(t){function i(t,e){var n=$(e.item);if(n.find("input").map(function(i,e){var n=$(e).attr("name");t[n]&&("checkbox"==$(e).attr("type")?$(e).prop("checked",t[n]):$(e).val(t[n]))}),t.children&&t.children.length>0){for(var s in t.children)var a=i(t.children[s],e);var d=$(e.list);a.appendTo(d),d.appendTo(n)}return n}for(var e in t){var n=i(t[e],this.templates);this.insertItem(n)}},MenuEditor.prototype.insertItem=function(t){if(t.target)var t=$(this.templates.item);t.on("click",".delete",function(t){$(t.target).closest(".dd-item").remove(),this.serialize()}.bind(this)),t.appendTo(this.list)},MenuEditor.prototype.serialize=function(){for(var t in $(".tab-pane")){var i=$(".tab-pane").eq(t);i.find(".dd").find("input").map(function(t,i){var e=$(i).closest(".dd-item");"checkbox"==$(i).attr("type")?$(e).data($(i).attr("name"),$(i).prop("checked")):$(e).data($(i).attr("name"),$(i).val())})}var e={};$(".menu-editor").map(function(t,i){e[$(i).data("lang")]=$(i).find(".dd").nestable("serialize")}.bind(this)),this.input.val(JSON.stringify(e))},$.fn.menuEditor=function(){new MenuEditor($(this))},$(function(){$(".menu-editor").length>0&&$(".menu-editor").map(function(t,i){$(i).menuEditor()})});
@@ -1916,24 +1916,40 @@
 ngth%3E0)%7B
+var s=$(e.list);
 for(var 
 s in t.c
@@ -1940,17 +1940,17 @@
 for(var 
-s
+a
  in t.ch
@@ -1956,21 +1956,22 @@
 hildren)
+%7B
 var 
-a
+d
 =i(t.chi
@@ -1980,31 +1980,15 @@
 ren%5B
-s
+a
 %5D,e);
-var d=$(e.list);a
+d
 .app
@@ -1997,12 +1997,12 @@
 dTo(
-d),d
+s)%7Ds
 .app

Fix menu editor children parse