[MERGE] trunk-website-al
authorAntony Lesuisse <al@openerp.com>
Fri, 31 Jan 2014 00:52:02 +0000 (01:52 +0100)
committerAntony Lesuisse <al@openerp.com>
Fri, 31 Jan 2014 00:52:02 +0000 (01:52 +0100)
bzr revid: al@openerp.com-20140131005202-sjsfy3tc8ys1a325

1  2 
addons/web/controllers/main.py
addons/web/static/src/css/base.css
addons/web/static/src/css/base.sass
addons/web/static/src/js/openerpframework.js
addons/web/static/src/js/view_form.js

Simple merge
Simple merge
Simple merge
@@@ -821,28 -822,11 +822,31 @@@ var genericJsonRpc = function(fct_name
          var def = $.Deferred();
          return def.reject.apply(def, ["communication"].concat(_.toArray(arguments)));
      });
+     // FIXME: jsonp?
+     result.abort = function () { xhr.abort && xhr.abort(); };
+     return result;
  };
  
 +/**
 + * Replacer function for JSON.stringify, serializes Date objects to UTC
 + * datetime in the OpenERP Server format.
 + *
 + * However, if a serialized value has a toJSON method that method is called
 + * *before* the replacer is invoked. Date#toJSON exists, and thus the value
 + * passed to the replacer is a string, the original Date has to be fetched
 + * on the parent object (which is provided as the replacer's context).
 + *
 + * @param {String} k
 + * @param {Object} v
 + * @returns {Object}
 + */
 +function date_to_utc(k, v) {
 +    var value = this[k];
 +    if (!(value instanceof Date)) { return v; }
 +
 +    return openerp.datetime_to_str(value);
 +}
 +
  openerp.jsonRpc = function(url, fct_name, params, settings) {
      return genericJsonRpc(fct_name, params, function(data) {
          return $.ajax(url, _.extend({}, settings, {
Simple merge