# HG changeset patch # User Aurelien Campeas # Date 1247745213 -7200 # Node ID c1dcb5aef4b4a81d31665b568d6a906dc4ea0157 # Parent 5d980ba57632940494ec48d7da04b04fcd0b6c1d [reledit] simplify a bit more diff -r 5d980ba57632 -r c1dcb5aef4b4 web/data/cubicweb.edition.js --- a/web/data/cubicweb.edition.js Thu Jul 16 08:08:11 2009 +0200 +++ b/web/data/cubicweb.edition.js Thu Jul 16 13:53:33 2009 +0200 @@ -501,8 +501,7 @@ var relname = rtype + ':' + eid; var newtarget = jQuery('[name=' + relname + ']').val(); var zipped = formContents(form); - var d = asyncRemoteExec('edit_relation', 'apply', zipped[0], zipped[1], rtype, role, - eid, vid, default_value, lzone); + var d = asyncRemoteExec('validate_form', 'apply', zipped[0], zipped[1]); } catch (ex) { log('got exception', ex); return false; @@ -513,7 +512,7 @@ document.location.href = result[1]; } else { if (result[0]) { - var d = asyncRemoteExec('reledit_form', eid, rtype, role, lzone); + var d = asyncRemoteExec('reledit_form', eid, rtype, role, default_value, lzone); d.addCallback(function (result) { jQuery('#'+divid+'-reledit').replaceWith(result); }); diff -r 5d980ba57632 -r c1dcb5aef4b4 web/views/basecontrollers.py --- a/web/views/basecontrollers.py Thu Jul 16 08:08:11 2009 +0200 +++ b/web/views/basecontrollers.py Thu Jul 16 13:53:33 2009 +0200 @@ -402,18 +402,11 @@ return (success, args, None) @jsonize - def js_edit_relation(self, action, names, values, rtype, - role, eid, vid, default, lzone): - if rtype == 'license_of': - print action, names, values, rtype, role, eid, vid, default - success, url = self.validate_form(action, names, values) - return (success, url) - - @jsonize - def js_reledit_form(self, eid, rtype, role, lzone): + def js_reledit_form(self, eid, rtype, role, default, lzone): + """XXX we should get rid of this and use loadxhtml""" entity = self.req.eid_rset(eid).get_entity(0, 0) return entity.view('reledit', rtype=rtype, role=role, - landing_zone=lzone) + default=default, landing_zone=lzone) @jsonize def js_i18n(self, msgids):