var initMenu=function(){var e="li:not(.toggle-blade-helper)",n=function(e,t){var a=[];return e.children(t).map(function(e,o){var l={key:$(o).data("key")};$(o).children("ul").length>0&&(l.children=n($(o).children("ul"),t)),a.push(l)}),a},t=$("#main-menu");t.sortable({items:e,stop:function(a){var o=n(t,e);console.log(o),$.ajax({url:t.data("ajax"),headers:{"X-CSRF-TOKEN":$('meta[name="_token"]').attr("content")},type:"POST",data:{menus:JSON.stringify(o)}})}})};$(function(){$(".delete-confirm").on("click",function(){var e=new Confirm("mconsole-table-delete",trans("delete-modal-title"),trans("delete-modal-body"),trans("delete-modal-ok"),trans("delete-modal-cancel"),"btn-danger");return e.show(function(){$(this).closest("form").submit()}.bind(this)),!1}),$(".color-picker").length>0&&$(".color-picker").map(function(e,n){$(n).minicolors({defaultValue:"#0088cc",theme:"bootstrap"})}),initMenu()});
var initMenu=function(){var e="li:not(.toggle-blade-helper)",n=function(e,t){var a=[];return e.children(t).map(function(e,o){var l={key:$(o).data("key")};$(o).children("ul").length>0&&(l.children=n($(o).children("ul"),t)),a.push(l)}),a},t=$("#main-menu");t.sortable({containment:"parent",items:e,stop:function(a){var o=n(t,e);console.log(o),$.ajax({url:t.data("ajax"),headers:{"X-CSRF-TOKEN":$('meta[name="_token"]').attr("content")},type:"POST",data:{menus:JSON.stringify(o)}})}})};$(function(){$(".delete-confirm").on("click",function(){var e=new Confirm("mconsole-table-delete",trans("delete-modal-title"),trans("delete-modal-body"),trans("delete-modal-ok"),trans("delete-modal-cancel"),"btn-danger");return e.show(function(){$(this).closest("form").submit()}.bind(this)),!1}),$(".color-picker").length>0&&$(".color-picker").map(function(e,n){$(n).minicolors({defaultValue:"#0088cc",theme:"bootstrap"})}),initMenu()});
Sort menus only in parent containment
Sort menus only in parent containment
