web/views/basecontrollers.py
changeset 5333 9eea4a5eaf1a
parent 5244 5467674ad101
child 5385 b6e250dd7a7d
equal deleted inserted replaced
5332:5a70a3c70b9d 5333:9eea4a5eaf1a
   237         errback = str(self._cw.form.get('__onfailure', 'null'))
   237         errback = str(self._cw.form.get('__onfailure', 'null'))
   238         cbargs = str(self._cw.form.get('__cbargs', 'null'))
   238         cbargs = str(self._cw.form.get('__cbargs', 'null'))
   239         self._cw.set_content_type('text/html')
   239         self._cw.set_content_type('text/html')
   240         jsargs = simplejson.dumps((status, args, entity), cls=CubicWebJsonEncoder)
   240         jsargs = simplejson.dumps((status, args, entity), cls=CubicWebJsonEncoder)
   241         return """<script type="text/javascript">
   241         return """<script type="text/javascript">
   242  wp = window.parent;
       
   243  window.parent.handleFormValidationResponse('%s', %s, %s, %s, %s);
   242  window.parent.handleFormValidationResponse('%s', %s, %s, %s, %s);
   244 </script>""" %  (domid, callback, errback, jsargs, cbargs)
   243 </script>""" %  (domid, callback, errback, jsargs, cbargs)
   245 
   244 
   246     def publish(self, rset=None):
   245     def publish(self, rset=None):
   247         self._cw.json_request = True
   246         self._cw.json_request = True