public/javascripts/lolita/menu-items.js in lolita-menu-0.0.6 vs public/javascripts/lolita/menu-items.js in lolita-menu-0.0.8
- old
+ new
@@ -55,9 +55,22 @@
$(this).append(html_data)
}
})
})
+ $(".delete-menu-item").click(function(){
+ var self = this;
+ $.ajax({
+ url:$(this).attr("data-url"),
+ type:"delete",
+ dataType: "json",
+ success:function(data){
+ $($(self).attr("data-row")).remove();
+ save_menu_tree($($(self).attr("data-menu")));
+ }
+ })
+ })
+
$(".save_menu_tree").click(function(){
save_menu_tree($(this).attr("data-id"))
})
$(".menu-tree-content input").live("focus",function(){
\ No newline at end of file