Commit c3af6d0e authored by Franziska Koehn's avatar Franziska Koehn
Browse files

bug fixed

parent f5c96e8b
......@@ -50,16 +50,16 @@
"<option>&gt;=</option><option>=</option></select>"+
"<input></input><a href=\"#\">x</a></li>");
$(newnode).children("select").val(n.predicate);
$(newnode).children("select").change(function(){ n.predicate = $(this).val(); });
$(newnode).children("select").change({target: n}, function(ev){ ev.data.target.predicate = $(this).val(); });
$(newnode).children("input").val(n.value);
$(newnode).children("input").change(function(){ n.value = $(this).val(); });
$(newnode).children("a").click(function(){ delete_node(n); update_tree(); });
$(newnode).children("input").change({target: n}, function(ev){ ev.data.target.value = $(this).val(); });
$(newnode).children("a").click({target: n}, function(ev){ delete_node(ev.data.target); update_tree(); });
el.append(newnode);
}
else if (n.operator) {
// OR AND
newnode = $("<li>"+n.operator+"<a href=\"#\">x</a></li>");
$(newnode).children("a").click(function(){ delete_node(n); update_tree(); });
$(newnode).children("a").click({target: n}, function(ev){ delete_node(ev.data.target); update_tree(); });
el.append(newnode);
el.append(build_tree(n.children));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment