the possible fix for #58
parent
b57bcb6b0e
commit
c4431b1ee5
File diff suppressed because one or more lines are too long
|
@ -77,6 +77,12 @@ $(document).on('page:editor', function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var submitActor = null;
|
||||||
|
|
||||||
|
$('#content').on('click', 'form input[type=submit]', function(event) {
|
||||||
|
submitActor = this;
|
||||||
|
});
|
||||||
|
|
||||||
// Submites any form in the page in JSON format
|
// Submites any form in the page in JSON format
|
||||||
$('#content').on('submit', 'form', function(event) {
|
$('#content').on('submit', 'form', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
@ -89,7 +95,7 @@ $(document).on('page:editor', function() {
|
||||||
editor.fadeIn();
|
editor.fadeIn();
|
||||||
}
|
}
|
||||||
|
|
||||||
var button = $(this).find("input[type=submit]:focus");
|
var button = $(submitActor);
|
||||||
var data = {
|
var data = {
|
||||||
content: $(this).serializeJSON(),
|
content: $(this).serializeJSON(),
|
||||||
contentType: button.data("type"),
|
contentType: button.data("type"),
|
||||||
|
|
Loading…
Reference in New Issue