AnanthaKN / jquery-in-place-editor

Automatically exported from code.google.com/p/jquery-in-place-editor
Other
0 stars 0 forks source link

Allow setting of http method in options #115

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
To post to a restful controller I need to send a PUT request.

Here's how I modified the code:

$.fn.editInPlace.defaults = {
    url:                "", // string: POST URL to send edited content
    http_method:        "POST",
    bg_over:            "#ffc", // string: background color of hover of unactivated editor
...
}

...

        $.ajax({
            url: that.settings.url,
            type: that.settings.http_method,
            data: data,
            dataType: "html",

...
});

Original issue reported on code.google.com by evan.leo...@gmail.com on 1 Jul 2012 at 6:46