Change to allow pk=0

Another try - hopefully this time in dev.
This commit is contained in:
mdeweerd 2013-04-07 19:00:07 +03:00
parent b0684d0174
commit 3f177bc1bc

@ -265,7 +265,7 @@ Editableform is linked with one of input types, e.g. 'text', 'select' etc.
this.options.pk = $.fn.editableutils.tryParseJson(this.options.pk, true);
var pk = (typeof this.options.pk === 'function') ? this.options.pk.call(this.options.scope) : this.options.pk,
send = !!(typeof this.options.url === 'function' || (this.options.url && ((this.options.send === 'always') || (this.options.send === 'auto' && pk)))),
send = !!(typeof this.options.url === 'function' || (this.options.url && ((this.options.send === 'always') || (this.options.send === 'auto' && pk !== null)))),
params;
if (send) { //send to server
@ -558,4 +558,4 @@ Editableform is linked with one of input types, e.g. 'text', 'select' etc.
//error class attached to editable-error-block
$.fn.editableform.errorBlockClass = 'editable-error';
}(window.jQuery));
}(window.jQuery));