app/assets/javascripts/lolita/menu/menu-items.js in lolita-menu-0.3.6 vs app/assets/javascripts/lolita/menu/menu-items.js in lolita-menu-0.4.0
- old
+ new
@@ -9,11 +9,11 @@
dataType:"html",
data:$.param({items:new_positions}),
success:function(){
tree.data("old_positions",tree.nestedSortable('serialize'))
}
- })
+ })
}
}
$("ol.nested-tree-items-tree").nestedSortable({
disableNesting: 'no-nest',
@@ -39,11 +39,11 @@
$(".openable-row").click(function(event){
var that=this
$(".subrow").hide(0)
$("#branch_"+$(this).attr("data-id")).show(0);
-
+
//event.preventDefault();
})
$(".add_new_nested_tree_item").click(function(){
$.ajax({
@@ -55,11 +55,11 @@
$(this).append(html_data)
}
})
})
- $(".delete-nested-tree-item").live("click",function(){
+ $(document).on("click",".delete-nested-tree-item",function(){
var self = this;
$.ajax({
url:$(this).attr("data-url"),
type:"delete",
dataType: "json",
@@ -68,14 +68,14 @@
save_menu_tree($($(self).attr("data-scope")));
}
})
})
- $(".nested-tree-content input").live("focus",function(){
+ $(document).on("focus",".nested-tree-content input",function(){
$(this).data("value",$(this).val())
})
- $(".nested-tree-content input").live("blur",function(){
+ $(document).on("blur",".nested-tree-content input",function(){
var input=$(this);
if(input.data("value")!=input.val()){
var match = input.attr("name").match(/\[(\w+)\]$/);
input.data("value",input.val())
$.ajax({