{"action":"opened","issue":{"url":"https://api.github.com/repos/ilikenwf/nestedSortable/issues/52","labels_url":"https://api.github.com/repos/ilikenwf/nestedSortable/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/ilikenwf/nestedSortable/issues/52/comments","events_url":"https://api.github.com/repos/ilikenwf/nestedSortable/issues/52/events","html_url":"https://github.com/ilikenwf/nestedSortable/issues/52","id":69922917,"number":52,"title":"disableParentChange","user":{"login":"wilguevara","id":753453,"avatar_url":"https://avatars.githubusercontent.com/u/753453?v=3","gravatar_id":"","url":"https://api.github.com/users/wilguevara","html_url":"https://github.com/wilguevara","followers_url":"https://api.github.com/users/wilguevara/followers","following_url":"https://api.github.com/users/wilguevara/following{/other_user}","gists_url":"https://api.github.com/users/wilguevara/gists{/gist_id}","starred_url":"https://api.github.com/users/wilguevara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilguevara/subscriptions","organizations_url":"https://api.github.com/users/wilguevara/orgs","repos_url":"https://api.github.com/users/wilguevara/repos","events_url":"https://api.github.com/users/wilguevara/events{/privacy}","received_events_url":"https://api.github.com/users/wilguevara/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-21T18:50:57Z","updated_at":"2015-04-21T18:50:57Z","closed_at":null,"body":"disableParentChange not working in the root of the hierarchy, i have set this property to true, cause i don't want that children of a hierarchy change form its parents, but when i move the first level of li elements the plugin is reverting the movements. this does not happen with the second level hierarchy.\r\n\r\n**Is there something wrong im doing, here is the initialization code:**\r\n\r\n```\r\n$('.nestedSortable').nestedSortable({\r\n            placeholder: \"sort-highlight\",\r\n            handle: 'div.sortable',\r\n            items: 'li',\r\n            toleranceElement: '> div.sortable',\r\n            disableParentChange : true,\r\n            revert: function(event, ui) {\r\n                var contentHtml = '<div class=\"alert alert-warning alert-dismissable\">'+\r\n                                        '<i class=\"fa fa-warning\"></i>'+\r\n                                        '<b>Nota:</b> No es permitido mover una subcategoria fuera del padre actual, para esto debe eliminarla y crearla dentro del nuevo padre. '+\r\n                                    '</div>';\r\n                $('#InformationModal div.modal-body').html( contentHtml );\r\n                $('#InformationModal').modal();\r\n            },\r\n            relocate: function(event, ui){\r\n                if( ui.item.parent().parent().attr('name') === 'root' ){\r\n                    //guardar la jerarquia root\r\n                    saveSortedRoot();\r\n                }else{\r\n                    //guardar la jerarquia hijos\r\n                    saveSortedCategory( ui.item.parent().parent() );\r\n                }\r\n            }\r\n        });\r\n```\r\n\r\n**here is the html**\r\n\r\n```\r\n<ol id=\"HierarchyCategoriesList\" class=\"nestedSortable-classimovil ui-sortable\">\r\n   <li style=\"cursor:move\" category-id=\"5\">\r\n      <div class=\"sortable categories-sortable\">\r\n         <span><i class=\"fa fa-ellipsis-v\"></i>&nbsp;<i class=\"fa fa-ellipsis-v\"></i>&nbsp;</span>&nbsp;Computadoras<button class=\"btn pull-right\" data-widget=\"ol-collapse\" style=\"padding: 0px 4px;\"><i class=\"fa fa-minus\"></i></button>\r\n         <badge></badge>\r\n      </div>\r\n      <ol>\r\n         <li style=\"cursor:move\" category-id=\"20\">\r\n            <div class=\"sortable categories-sortable\">\r\n               <span><i class=\"fa fa-ellipsis-v\"></i>&nbsp;<i class=\"fa fa-ellipsis-v\"></i>&nbsp;</span>&nbsp;PC<button class=\"btn pull-right\" data-widget=\"ol-collapse\" style=\"padding: 0px 4px;\"><i class=\"fa fa-minus\"></i></button>\r\n               <badge></badge>\r\n            </div>\r\n            <ol></ol>\r\n         </li>\r\n         <li style=\"cursor:move\" category-id=\"7\">\r\n            <div class=\"sortable categories-sortable\">\r\n               <span><i class=\"fa fa-ellipsis-v\"></i>&nbsp;<i class=\"fa fa-ellipsis-v\"></i>&nbsp;</span>&nbsp;Laptop<button class=\"btn pull-right\" data-widget=\"ol-collapse\" style=\"padding: 0px 4px;\"><i class=\"fa fa-minus\"></i></button>\r\n               <badge></badge>\r\n            </div>\r\n            <ol></ol>\r\n         </li>\r\n      </ol>\r\n   </li>\r\n   <li style=\"cursor:move\" category-id=\"12\">\r\n      <div class=\"sortable categories-sortable\">\r\n         <span><i class=\"fa fa-ellipsis-v\"></i>&nbsp;<i class=\"fa fa-ellipsis-v\"></i>&nbsp;</span>&nbsp;Aires acondicionados<button class=\"btn pull-right\" data-widget=\"ol-collapse\" style=\"padding: 0px 4px;\"><i class=\"fa fa-minus\"></i></button>\r\n         <badge></badge>\r\n      </div>\r\n      <ol></ol>\r\n   </li>\r\n   <li style=\"cursor:move\" category-id=\"2\">\r\n      <div class=\"sortable categories-sortable\">\r\n         <span><i class=\"fa fa-ellipsis-v\"></i>&nbsp;<i class=\"fa fa-ellipsis-v\"></i>&nbsp;</span>&nbsp;Electrodomesticos<button class=\"btn pull-right\" data-widget=\"ol-collapse\" style=\"padding: 0px 4px;\"><i class=\"fa fa-minus\"></i></button>\r\n         <badge></badge>\r\n      </div>\r\n      <ol>\r\n         <li style=\"cursor:move\" category-id=\"6\">\r\n            <div class=\"sortable categories-sortable\">\r\n               <span><i class=\"fa fa-ellipsis-v\"></i>&nbsp;<i class=\"fa fa-ellipsis-v\"></i>&nbsp;</span>&nbsp;Televisores<button class=\"btn pull-right\" data-widget=\"ol-collapse\" style=\"padding: 0px 4px;\"><i class=\"fa fa-minus\"></i></button>\r\n               <badge></badge>\r\n            </div>\r\n            <ol></ol>\r\n         </li>\r\n      </ol>\r\n   </li>\r\n   <li style=\"cursor:move\" category-id=\"11\">\r\n      <div class=\"sortable categories-sortable\">\r\n         <span><i class=\"fa fa-ellipsis-v\"></i>&nbsp;<i class=\"fa fa-ellipsis-v\"></i>&nbsp;</span>&nbsp;Refiregeradores<button class=\"btn pull-right\" data-widget=\"ol-collapse\" style=\"padding: 0px 4px;\"><i class=\"fa fa-minus\"></i></button>\r\n         <badge></badge>\r\n      </div>\r\n      <ol></ol>\r\n   </li>\r\n</ol>\r\n```"}}