equal
deleted
inserted
replaced
275 name = wdgnode.getAttribute('name').split(':'); |
275 name = wdgnode.getAttribute('name').split(':'); |
276 this.rel = name[0]; |
276 this.rel = name[0]; |
277 this.eid_to = name[1]; |
277 this.eid_to = name[1]; |
278 this.etype_to = wdgnode.getAttribute('cubicweb:etype_to'); |
278 this.etype_to = wdgnode.getAttribute('cubicweb:etype_to'); |
279 this.etype_from = wdgnode.getAttribute('cubicweb:etype_from'); |
279 this.etype_from = wdgnode.getAttribute('cubicweb:etype_from'); |
280 var d = async_remote_exec('add_and_link_new_entity', this.etype_to, this.rel, this.eid_to, this.etype_from, 'new_val'); |
280 var d = asyncRemoteExec('add_and_link_new_entity', this.etype_to, this.rel, this.eid_to, this.etype_from, 'new_val'); |
281 d.addCallback(function (eid) { |
281 d.addCallback(function (eid) { |
282 jQuery(wdgnode).find("option[selected]").removeAttr("selected"); |
282 jQuery(wdgnode).find("option[selected]").removeAttr("selected"); |
283 var new_option = OPTION({'value':eid, 'selected':'selected'}, value=new_val); |
283 var new_option = OPTION({'value':eid, 'selected':'selected'}, value=new_val); |
284 wdgnode.appendChild(new_option); |
284 wdgnode.appendChild(new_option); |
285 }); |
285 }); |