composite pk defined in data-pk attr

This commit is contained in:
vitalets
2012-12-04 18:21:18 +04:00
parent 4f5b5062b6
commit 6ff1364a86
3 changed files with 35 additions and 1 deletions
CHANGELOG.txt
src/editable-form
test/unit

@ -227,6 +227,9 @@ Editableform is linked with one of input types, e.g. 'text' or 'select'.
},
save: function(value) {
//try parse composite pk defined as json string in data-pk
this.options.pk = $.fn.editableutils.tryParseJson(this.options.pk, true);
var pk = (typeof this.options.pk === 'function') ? this.options.pk.call(this) : this.options.pk,
send = !!(typeof this.options.url === 'function' || (this.options.url && ((this.options.send === 'always') || (this.options.send === 'auto' && pk)))),
params, ajaxOptions;