~unifield-team/unifield-web/web_aio_28

Viewing all changes in revision 4884.

  • Committer: Xavier ALT
  • Date: 2012-10-09 08:58:48 UTC
  • mfrom: (4877.2.7 6.0-opw-577661-xal)
  • Revision ID: xal@openerp.com-20121009085848-4rgyz9gtdqai828i
[MERGE] OPW 577661: web: fix error popup replacing "view" when submitted data contains binary

 - in browsers not supporting FileAPI, standard XMLHttpRequest does not allow
   sending <input type="file"/> binary content, so in that case jquery.form.js
   use a _hack_ by inclusing content within an iframe form and submitting that
   form.

   Normally, if server raise an error during an XHR request, we get the correct
   error status on the response, but with <input type="file"/> and _iframe hack_,
   we have no way to get the real response status (always think there is no error);
   We then wrongly call the 'sucess' callback, i.e replace view content by the
   received response.

   jQuery form plugin has been upgraded to support XHR status emulation and from
   web-client we intercept error message to add emulated status allowing us to
   call the right 'error callback'.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: