diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 6468b29..ec3175a 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,8 +4,10 @@ X-editable changelog Version 1.2.1 wip ---------------------------- -[enh] removed dataType='json' from 'submit' api method. Use 'ajaxOptions' to specify dataType if needed (vitalets) -[enh] removed dataType='json' from saving request. Use 'ajaxOptions' to specify dataType if needed (vitalets) +[enh] 'submit' method changed: error-callback's parameter simplified (vitalets) +[enh] 'submit' method changed: now when response 200 OK it does not set pk automatically, use success callback (vitalets) +[enh] 'submit' method changed: removed dataType='json'. Use 'ajaxOptions' to specify dataType if needed (vitalets) +[enh] removed default ajax dataType='json'. Use 'ajaxOptions' to specify dataType if needed (vitalets) [enh] select: do not show 'sourceError' in element during autotext execution (vitalets) diff --git a/src/element/editable-element.js b/src/element/editable-element.js index 8f29fe0..85c4861 100644 --- a/src/element/editable-element.js +++ b/src/element/editable-element.js @@ -422,16 +422,17 @@ Makes editable any HTML element on the page. Applied as jQuery method. return result; /** - This method collects values from several editable elements and submit them all to server. - Internally it runs client-side validation for all fields and submits only in case of success. + This method collects values from several editable elements and submit them all to server. + Internally it runs client-side validation for all fields and submits only in case of success. + See <a href="#newrecord">creating new records</a> for details. @method submit(options) @param {object} options @param {object} options.url url to submit data @param {object} options.data additional data to submit @param {object} options.ajaxOptions additional ajax options - @param {function} options.error(errors) error handler - @param {function} options.success(response, config) success handler. Passing __config__ to be able to call error handler. + @param {function} options.error(obj) error handler + @param {function} options.success(obj,config) success handler @returns {Object} jQuery object **/ case 'submit': //collects value, validate and submit to server for creating new record