PANmedia/Raptor — pull request #97 by In4matik (2013-06-11 18:06:06+00:00)
Title: Add onSave for saveJson

Hello.

For a profesionnal project, I had to use callbacks after saving with saveJson plugin.
As I didn't found out how to make that, I add onSave parameter to this plugin.

It's possible to use it like this :
```
$('#element-to-edit').raptor({
plugins: {
// The save UI plugin/button
save: {
// Specifies the UI to call the saveJson plugin to do the actual saving
plugin: 'saveJson'
},
saveJson: {
// The URI to send the content to
url: 'save.php',
// The POST parameter name to use (e.g. for $_POST['raptor-content'] in PHP)
postName: 'raptor-content',
// The ID of the content (or a function the returns the ID)
id: function() {
return this.raptor.getElement().data('id');
},
// Run this callback after saving is done
onSave: function(data, status, xhr) {
console.log(data);
console.log(status);
console.log(xhr);
}
}
}
});
```